1 #LyX 2.0 created this file. For more info see http://www.lyx.org/
7 % DO NOT ALTER THIS PREAMBLE!!!
9 % This preamble is designed to ensure that the manual prints
10 % out as advertised. If you mess with this preamble,
11 % parts of the manual may not print out as expected. If you
12 % have problems LaTeXing this file, please contact
13 % the documentation team
14 % email: lyx-docs@lists.lyx.org
20 % set fonts for nicer pdf view
21 \IfFileExists{lmodern.sty}
22 {\usepackage{lmodern}}{}
24 \fi % end if pdflatex is used
26 % the pages of the TOC are numbered roman
27 % and a PDF-bookmark for the TOC is added
29 \let\myTOC\tableofcontents
30 \renewcommand{\tableofcontents}{%
31 \pdfbookmark[1]{\contentsname}{}
34 \pagenumbering{arabic}}
36 % used for multi-column text
39 % extra space for tables
40 \newcommand{\extratablespace}[1]{\noalign{\vskip#1}}
42 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
43 \use_default_options false
50 \maintain_unincluded_children false
53 InsetLayout CharStyle:MenuItem
62 \newcommand*{\menuitem}[1]{{\sffamily #1}}
67 \language_package default
72 \font_typewriter default
73 \font_default_family default
74 \use_non_tex_fonts false
81 \default_output_format default
83 \bibtex_command default
84 \index_command default
88 \pdf_title "LyX's Additional Features manual"
89 \pdf_author "LyX Team"
90 \pdf_subject "LyX's additional features documentation"
91 \pdf_keywords "LyX, Documentation, Additional"
93 \pdf_bookmarksnumbered true
94 \pdf_bookmarksopen false
95 \pdf_bookmarksopenlevel 1
100 \pdf_pdfusetitle false
101 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
111 \paperorientation portrait
120 \paragraph_separation indent
121 \paragraph_indentation default
122 \quotes_language english
125 \paperpagestyle headings
126 \tracking_changes false
127 \output_changes false
136 Additional LyX Features
139 \begin_layout Subtitle
148 \begin_layout Plain Layout
150 Principal maintainer of this file is
155 If you have comments or error corrections, please send them to the LyX
156 Documentation mailing list,
157 \begin_inset Flex Code
160 \begin_layout Plain Layout
162 <lyx-docs@lists.lyx.org>
175 \begin_layout Standard
176 \begin_inset CommandInset toc
177 LatexCommand tableofcontents
184 \begin_layout Chapter
188 \begin_layout Standard
189 This manual is essentially Part II of the
191 User's Guide\SpecialChar \@.
194 The reason for separating this document out is simple: the
198 is already quite lengthy, and it contains information on all of the basic
199 features one needs to know in order to prepare most documents.
200 However, the LyX Team has worked to make LyX extensible through various
201 configuration files and external packages.
202 That means that if you want to support the Fizzwizzle LaTeX package, you
203 can create a layout file (or module) for it without having to alter LyX
205 We've already had contributions of several new features this way, and some
206 of them are documented here.
207 There are also some more `advanced' features, such as how to control the
208 presentation of bibliographies and how to work with multi-part documents,
209 that are not covered in the
213 and are discussed here.
216 \begin_layout Standard
217 This manual also documents some special features, like fax support, version
218 control, and SGML support, which require additional software to work properly.
219 There is also a chapter on LyX's support for HTML.
220 And lastly, there's a chapter of LaTeX tools and tips, things you can use
221 to spruce up your documents by directly using the powerful features of
227 only WYSIWYM and will only ever interface to some, not all, LaTeX features.
230 \begin_layout Standard
231 If you haven't read the
235 yet, you are definitely in the wrong manual.
240 is the first place to go, since it describes the notation and format of
242 You should also be thoroughly familiar with the
246 and all of the basic features of LyX before attempting to read this one.
249 \begin_layout Standard
250 Since many of the topics in this manual depend heavily on LyX's interaction
251 with LaTeX, this first chapter covers the inner workings of LyX and how
252 to direct LyX to generate exactly the LaTeX code you want.
253 It is obviously for more seasoned LyX users.
256 \begin_layout Chapter
260 \begin_layout Section
264 \begin_layout Standard
265 This chapter is for both TeX-nicians and the LaTeX-curious.
266 In it, we'll explain how LyX and LaTeX work together to produce printable
268 This is the only place in any of the manuals where we assume you know something
272 \begin_layout Standard
273 At one time, LyX was called a
274 \begin_inset Quotes eld
277 WYSIWYM frontend to LaTeX,
278 \begin_inset Quotes erd
281 but that's no longer true.
282 There are frontends to LaTeX out there.
286 \begin_layout Plain Layout
287 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
288 There are also the LaTeX modes for vi and emacs, of course.
293 These are basically text editors with the ability to run LaTeX and mark
294 any errors in the file you're editing.
303 run LaTeX, and it also indicates errors in the file, it also does much,
305 For one thing, you don't need to know LaTeX to use LyX effectively.
306 And LyX has added its own extensions to LaTeX.
307 Try the following sometime: select
308 \begin_inset Flex MenuItem
311 \begin_layout Plain Layout
312 Export\SpecialChar \menuseparator
319 \begin_inset Flex MenuItem
322 \begin_layout Plain Layout
329 \begin_inset Flex MenuItem
332 \begin_layout Plain Layout
333 View\SpecialChar \menuseparator
339 ), then look at the preamble of the resulting
340 \begin_inset Flex Code
343 \begin_layout Plain Layout
350 You'll notice a variety of new macros defined specifically by LyX.
351 These macros are defined automatically, according to the features you use
355 \begin_layout Standard
356 There are several commands that automatically invoke LaTeX.
360 \begin_layout Itemize
361 \begin_inset Flex MenuItem
364 \begin_layout Plain Layout
365 View\SpecialChar \menuseparator
374 \begin_layout Itemize
375 \begin_inset Flex MenuItem
378 \begin_layout Plain Layout
379 View\SpecialChar \menuseparator
380 Update\SpecialChar \menuseparator
389 \begin_layout Itemize
390 \begin_inset Flex MenuItem
393 \begin_layout Plain Layout
394 File\SpecialChar \menuseparator
403 \begin_layout Itemize
404 \begin_inset Flex MenuItem
407 \begin_layout Plain Layout
408 File\SpecialChar \menuseparator
417 \begin_layout Standard
418 They will only invoke LaTeX if the file has changed since the last time
423 \begin_layout Standard
424 When LyX runs LaTeX on the file you're editing, it performs these steps:
427 \begin_layout Enumerate
428 Convert the document to LaTeX and save to a file with the extension
429 \begin_inset Flex Code
432 \begin_layout Plain Layout
439 \begin_inset Flex Code
442 \begin_layout Plain Layout
451 \begin_layout Enumerate
453 \begin_inset Flex Code
456 \begin_layout Plain Layout
462 file (maybe several times), and run any other commands (such as
463 \begin_inset Flex Code
466 \begin_layout Plain Layout
473 \begin_inset Flex Code
476 \begin_layout Plain Layout
482 ) needed to compile the LaTeX file.
485 \begin_layout Enumerate
486 If there are any errors, show the error log.
489 \begin_layout Standard
490 If you've run LaTeX using
491 \begin_inset Flex MenuItem
494 \begin_layout Plain Layout
497 \SpecialChar \menuseparator
505 , LyX then runs a DVI viewer to display the DVI-file.
507 \begin_inset Flex MenuItem
510 \begin_layout Plain Layout
513 \SpecialChar \menuseparator
521 , LyX performs further steps:
524 \begin_layout Itemize
526 \begin_inset Flex Code
529 \begin_layout Plain Layout
535 to convert the DVI file to PostScript.
538 \begin_layout Itemize
539 Run a PostScript viewer, such as
540 \begin_inset Flex Code
543 \begin_layout Plain Layout
549 , to display the PostScript file.
552 \begin_layout Standard
553 LyX does similar things when viewing, or exporting, other formats.
556 \begin_layout Section
557 Translating LaTeX files into LyX
560 \begin_layout Standard
561 You can import a LaTeX file into LyX by using the
562 \begin_inset Flex MenuItem
565 \begin_layout Plain Layout
566 File\SpecialChar \menuseparator
567 Import\SpecialChar \menuseparator
574 This will call a program named
575 \begin_inset Flex Code
578 \begin_layout Plain Layout
584 which will create a file
585 \begin_inset Flex Code
588 \begin_layout Plain Layout
595 \begin_inset Flex Code
598 \begin_layout Plain Layout
605 LyX will then open that file.
609 \begin_layout Plain Layout
610 \begin_inset Flex Code
613 \begin_layout Plain Layout
619 can also be run from the command line, of course.
627 \begin_layout Standard
628 \begin_inset Flex Code
631 \begin_layout Plain Layout
637 will translate most legal LaTeX, but not everything.
638 It will put things it doesn't understand into TeX code, so after translating
640 \begin_inset Flex Code
643 \begin_layout Plain Layout
649 , you can look for TeX code and hand-edit it until it looks right.
652 \begin_layout Standard
653 If you don't know what TeX code is, read the next section.
656 \begin_layout Section
657 \begin_inset CommandInset label
659 name "sec:Inserting-TeX-Code"
663 Inserting TeX Code into LyX Documents
666 \begin_layout Standard
667 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
668 You can always insert TeX code into any LyX document.
669 LyX cannot, and will never be able to, display every possible LaTeX construct.
670 If ever you need to insert LaTeX commands into your LyX document, you can
672 \begin_inset Flex Code
675 \begin_layout Plain Layout
681 box, which you can insert into your document with
682 \begin_inset Flex MenuItem
685 \begin_layout Plain Layout
686 Insert\SpecialChar \menuseparator
695 \begin_layout Standard
696 Here's an example of inserting LaTeX commands in a LyX document.
697 The code looks like this:
700 \begin_layout LyX-Code
704 \begin_inset Newline newline
710 \begin_inset Newline newline
713 This is an example for a minipage environment.
715 \begin_inset Newline newline
718 can put nearly everything in it, even (non-floating)
719 \begin_inset Newline newline
724 \begin_inset Newline newline
730 \begin_inset Newline newline
734 \begin_inset Newline newline
740 \begin_inset Newline newline
746 \begin_inset Newline newline
752 \begin_inset Newline newline
757 \begin_inset Newline newline
763 \begin_inset Newline newline
769 \begin_inset Newline newline
775 \begin_inset Newline newline
783 \begin_layout LyX-Code
787 \begin_layout Standard
789 \begin_inset Flex Code
792 \begin_layout Plain Layout
798 box containing this text is directly after this paragraph.
799 Those of you reading the manual in LyX will only see the TeX code inset.
800 Those reading a printed version of the manuals will see the actual results:
803 \begin_layout Standard
807 \begin_layout Plain Layout
814 \begin_layout Plain Layout
821 \begin_layout Plain Layout
823 This is an example for a minipage environment.
824 You can put nearly everything in it, even (non-floating) figures and tables.
828 \begin_layout Plain Layout
835 \begin_layout Plain Layout
840 \begin_layout Plain Layout
847 \begin_layout Plain Layout
854 \begin_layout Plain Layout
861 \begin_layout Plain Layout
867 \begin_layout Plain Layout
874 \begin_layout Plain Layout
881 \begin_layout Plain Layout
888 \begin_layout Plain Layout
900 \begin_layout Standard
901 In addition to using TeX code, you can also create a separate file containing
902 some complex LaTeX structure and then use
903 \begin_inset Flex MenuItem
906 \begin_layout Plain Layout
907 Insert\SpecialChar \menuseparator
917 to include your file (you should select the type
918 \begin_inset Flex Code
921 \begin_layout Plain Layout
928 We recommend that you only do this if you have a
929 \begin_inset Flex Code
932 \begin_layout Plain Layout
943 Otherwise, you'll have a big job tracking down LaTeX errors.
946 \begin_layout Standard
947 There are a few last points to emphasize:
950 \begin_layout Itemize
955 check if your LaTeX code is correct.
958 \begin_layout Itemize
959 Beware reinventing the wheel.
962 \begin_layout Standard
963 On that last point, LyX does have quite a few features tucked into it, and
965 Be sure to check the manuals to make sure that LyX doesn't have such-and-such
966 feature before you decide you have to do it by hand.
967 Moreover, there are numerous LaTeX packages out there to do all sorts of
968 things, from labels to envelopes to fancy multipage tables.
970 \begin_inset CommandInset href
973 target "http://www.ctan.org/"
977 for details, and see chapter
978 \begin_inset CommandInset ref
980 reference "cha:secrets"
987 \begin_layout Standard
988 If you do need to do some wild and fancy things within your document, be
989 sure to check out a good LaTeX book for assistance.
990 There are a number of them listed in the bibliography of the
997 \begin_layout Section
998 LyX and the LaTeX Preamble
1001 \begin_layout Subsection
1002 About the LaTeX Preamble
1005 \begin_layout Standard
1006 If you already know LaTeX, there is no need to explain here what the preamble
1008 If you don't, the following will give you some ideas—we recommend again
1009 that you consult a LaTeX book for further information.
1010 In any case, you should read the points below, because they explain what
1011 you can do and what you don't need to do in the LaTeX preamble of a LyX
1015 \begin_layout Standard
1016 The LaTeX preamble comes at the very beginning of a document,
1024 \begin_layout Itemize
1025 Declare the document class.
1027 \begin_inset Newline newline
1030 LyX already does this for you.
1031 If you're a seasoned LaTeX-nician, and you have a custom document class
1032 you want to use, check out the
1034 Customization Manual
1036 for information on how to make LyX interface to it.
1039 \begin_layout Itemize
1040 Declare the usage of packages.
1042 \begin_inset Newline newline
1045 LaTeX packages provide special commands, which are only available within
1046 a document when the package has been declared in the preamble.
1047 For example, the package
1048 \begin_inset Flex Code
1051 \begin_layout Plain Layout
1057 forces all paragraphs to be indented.
1058 There are other packages for labels, envelopes, margins, etc.
1062 \begin_layout Itemize
1063 Set counters, variables, lengths and widths.
1065 \begin_inset Newline newline
1068 There are several LaTeX counters and variables which
1072 be set globally from within the preamble in order to have the desired effect.
1073 (There are variables which you can set and reset inside the document, too.)
1074 Margins are a good example of something which must be set in the preamble.
1075 Another example is the label format for lists.
1076 You can actually set these just about anywhere, but it's best to do it
1077 just once, inside the preamble.
1080 \begin_layout Itemize
1081 Declare user defined commands (with
1082 \begin_inset Flex Code
1085 \begin_layout Plain Layout
1094 \begin_inset Flex Code
1097 \begin_layout Plain Layout
1106 \begin_inset Newline newline
1109 These are abbreviations for LaTeX commands which appear very often inside
1111 Although the preamble is a good place to declare such commands, they
1115 be declared anywhere (before they are used for the first time, of course).
1116 This can be useful if there is a lot of raw LaTeX code in your document,
1117 which normally should not be the case.
1120 \begin_layout Standard
1121 LyX adds its own set of definitions to the preamble of the
1122 \begin_inset Flex Code
1125 \begin_layout Plain Layout
1132 This makes LaTeX files generated by LyX portable.
1135 \begin_layout Subsection
1136 Changing the Preamble
1139 \begin_layout Standard
1140 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1141 can't change them without patching LyX itself.
1142 You can, however, add your own stuff to the preamble by selecting
1143 \begin_inset Flex MenuItem
1146 \begin_layout Plain Layout
1148 \begin_inset space ~
1157 \begin_inset Flex MenuItem
1160 \begin_layout Plain Layout
1161 Document\SpecialChar \menuseparator
1168 LyX adds anything in the
1169 \begin_inset Flex MenuItem
1172 \begin_layout Plain Layout
1178 dialog to its own built-in preamble.
1179 Before adding your own declarations in the preamble, you should make sure
1180 that LyX doesn't already support what you want to do.
1181 (Remember what we said about reinventing the wheel?) Also,
1183 make sure your preamble code is correct
1186 LyX doesn't check it for you.
1187 If there is an error, you're likely to get an error like
1188 \begin_inset Quotes eld
1192 \begin_inset Flex Code
1195 \begin_layout Plain Layout
1204 \begin_inset Quotes erd
1208 If you see this error, check your preamble.
1211 \begin_layout Subsection
1215 \begin_layout Standard
1216 Here are some examples of what you can add to a preamble, and what they
1220 \begin_layout Subsubsection
1224 \begin_layout Standard
1225 There are two variables under LaTeX that control page position:
1226 \begin_inset Flex Code
1229 \begin_layout Plain Layout
1238 \begin_inset Flex Code
1241 \begin_layout Plain Layout
1250 Their names should be self-explanatory.
1251 These variables are useful if you think for a moment about computer labels.
1252 Sometimes, the size of a print medium and the area of the medium that you
1253 can actually print on aren't the same.
1255 \begin_inset Flex Code
1258 \begin_layout Plain Layout
1267 \begin_inset Flex Code
1270 \begin_layout Plain Layout
1281 \begin_layout Standard
1282 The default values for
1283 \begin_inset Flex Code
1286 \begin_layout Plain Layout
1295 \begin_inset Flex Code
1298 \begin_layout Plain Layout
1307 \begin_inset space \thinspace{}
1311 \begin_inset space \thinspace{}
1315 \begin_inset space \space{}
1318 the page isn't shifted.
1319 Unfortunately, some DVI drivers always seem to shift the page.
1320 We have no idea why, or why the sysadmin hasn't fixed such behavior.
1321 If you're using LyX on a system that you don't personally maintain, and
1322 your sysadmin is a doofus,
1323 \begin_inset Flex Code
1326 \begin_layout Plain Layout
1335 \begin_inset Flex Code
1338 \begin_layout Plain Layout
1347 Suppose your left and top margins are always 0.5
1348 \begin_inset space \thinspace{}
1352 You can add this to the preamble:
1355 \begin_layout LyX-Code
1363 \begin_layout LyX-Code
1371 \begin_layout Standard
1372 and your margins should now be correct.
1375 \begin_layout Subsubsection
1379 \begin_layout Standard
1380 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1381 There's a rather nice package, available at your nearest CTAN archive,
1382 for printing sheets of labels:
1383 \begin_inset Flex Code
1386 \begin_layout Plain Layout
1393 Now, your system may not have this package installed by default.
1394 We leave that up to you to check.
1395 You'll also want to read the documentation for it; we're not going to do
1397 Since this is an example, however, we'll give you an example of how you
1401 \begin_layout Standard
1402 First, make sure you're using the
1403 \begin_inset Flex Code
1406 \begin_layout Plain Layout
1413 Next, you need to put the following in your preamble:
1416 \begin_layout LyX-Code
1422 \begin_layout LyX-Code
1428 \begin_layout LyX-Code
1434 \begin_layout LyX-Code
1440 \begin_layout LyX-Code
1446 \begin_layout LyX-Code
1452 \begin_layout LyX-Code
1458 \begin_layout Standard
1459 This sets things up for Avery label sheets, stock #5360.
1460 You're now ready to print labels, but you'll need to insert LaTeX code,
1461 placing the commands
1462 \begin_inset Flex Code
1465 \begin_layout Plain Layout
1474 \begin_inset Flex Code
1477 \begin_layout Plain Layout
1485 around each label text.
1486 This and other special features of
1487 \begin_inset Flex Code
1490 \begin_layout Plain Layout
1496 are explained in its documentation.
1499 \begin_layout Standard
1500 Someday, someone may write a LyX layout file to support this package directly.
1501 Maybe that someone is you.
1504 \begin_layout Subsubsection
1505 Example #3: Paragraph Indentation
1508 \begin_layout Standard
1509 Americans are trained to indent the first line of
1514 As with all of their other weird quirks, most Americans will whine and
1515 moan until they can have their way and indent the first line of all paragraphs.
1524 \begin_layout Standard
1525 Of course, this behavior isn't standard typography.
1526 In books, you typically only indent the first line of a paragraph
1530 it follows another one.
1531 The idea behind indenting the first line of a paragraph is to distinguish
1532 neighboring paragraphs from one another.
1533 If there is no previous paragraph—for example, if it follows a figure or
1534 is the first paragraph in a section—then there is no need for indentation.
1538 \begin_layout Standard
1539 If you're a typical American (we're still joking!), though, you don't care
1540 about such esoteric things; you want your indentation! Add this to the
1544 \begin_layout LyX-Code
1547 usepackage{indentfirst}
1550 \begin_layout Standard
1551 If your TeX distribution isn't braindead, you'll have this package, and
1552 all of your paragraphs will get the indentation the Founding Fathers intended
1556 \begin_layout Subsubsection
1557 Example #4: This Document
1560 \begin_layout Standard
1561 You can also check out the preamble of this document to get an idea of some
1562 of the advanced things you can do.
1563 Also, there are more examples and an assortment of LaTeX
1564 \begin_inset Quotes eld
1568 \begin_inset Quotes erd
1572 \begin_inset space ~
1576 \begin_inset CommandInset ref
1578 reference "cha:secrets"
1586 \begin_layout Section
1587 LyX and LaTeX Errors
1590 \begin_layout Standard
1591 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1593 It then uses the logfile from the LaTeX run to do a post-mortem.
1594 After analyzing the logfile,LyX displays a dialog listing the errors.
1595 Clicking on any one of them will take you to the position in your LyX file
1596 where the error occurred.
1600 \begin_layout Plain Layout
1602 Analyzing the logfile is a tough job, and LyX doesn't always go to the
1604 There are also cases where LaTeX reports the error on one line, but the
1605 actual error is earlier.
1606 This is not unlike forgetting a closing brace in a program: You'll get
1607 an error, but only later.
1615 \begin_layout Standard
1616 Some folks also like to look at the log file directly: It is available from
1618 \begin_inset Flex MenuItem
1621 \begin_layout Plain Layout
1624 \SpecialChar \menuseparator
1628 \begin_inset space ~
1637 There are some fairly common error messages and warnings.
1638 We'll cover those here.
1639 You should look at a good LaTeX book for a complete listing.
1642 \begin_layout Itemize
1643 \begin_inset Flex Code
1646 \begin_layout Plain Layout
1653 \begin_inset Newline newline
1656 Anything beginning with these words is a warning message for the purpose
1658 \begin_inset Quotes eld
1662 \begin_inset Quotes erd
1665 the LaTeX code itself.
1666 You'll get messages like this if you added or changed cross-references
1667 or bibliography entries, in which case, LaTeX is trying to tell you that
1668 you need to make another run.
1669 You can by-and-large ignore these.
1672 \begin_layout Itemize
1673 \begin_inset Flex Code
1676 \begin_layout Plain Layout
1683 \begin_inset Newline newline
1686 Another warning message, this time about fonts which LaTeX couldn't find.
1687 The rest of the message will often say something about a replacement font
1689 You can safely ignore these, too.
1692 \begin_layout Itemize
1693 \begin_inset Flex Code
1696 \begin_layout Plain Layout
1705 \begin_inset Newline newline
1713 They are warnings about lines that were too long and run past the right
1715 Almost always, this is unnoticeable in the final output.
1716 (It can be just a point or two.) Or, only one or two characters extend past
1718 LaTeX seems to generate at least one of these messages for just about any
1720 \begin_inset Newline newline
1723 You can ignore these messages.
1724 Your eyes will tell you if there's a problem with something that's too
1725 wide; just look at the output.
1729 \begin_layout Plain Layout
1730 You can also enable the `draft' option in
1731 \begin_inset Flex MenuItem
1734 \begin_layout Plain Layout
1737 \SpecialChar \menuseparator
1745 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1753 \begin_layout Itemize
1754 \begin_inset Flex Code
1757 \begin_layout Plain Layout
1766 \begin_inset Newline newline
1769 Not quite as common as its cousin.
1770 LaTeX seems to like to print lines that are a bit too wide as opposed to
1771 ones that are a bit too narrow.
1772 We have no idea why.
1775 \begin_layout Itemize
1776 \begin_inset Flex Code
1779 \begin_layout Plain Layout
1788 \begin_inset Flex Code
1791 \begin_layout Plain Layout
1800 \begin_inset Newline newline
1803 Warnings about troubles breaking the page.
1804 Once again, just look at the output.
1805 Your eyes will tell you where something has gone wrong.
1808 \begin_layout Itemize
1809 \begin_inset Flex Code
1812 \begin_layout Plain Layout
1814 \begin_inset Quotes els
1818 \begin_inset Quotes ers
1827 \begin_inset Newline newline
1831 \begin_inset Quotes eld
1835 \begin_inset Quotes erd
1838 isn't installed on this system.
1839 This usually appears because some package your document needs isn't installed.
1840 If you didn't touch the preamble or didn't use the
1841 \begin_inset Flex Code
1844 \begin_layout Plain Layout
1852 command, then one of the packages LyX tried to load is missing.
1854 \begin_inset Flex MenuItem
1857 \begin_layout Plain Layout
1858 Help\SpecialChar \menuseparator
1864 to get a list of packages that LyX knows about.
1865 This file is updated whenever you reconfigure LyX (using
1866 \begin_inset Flex MenuItem
1869 \begin_layout Plain Layout
1870 Tools\SpecialChar \menuseparator
1876 ) and tells you which packages have been detected and what they do.
1877 \begin_inset Newline newline
1881 \begin_inset Flex Code
1884 \begin_layout Plain Layout
1892 command and the package in question isn't installed, then you'll need to
1893 install it yourself.
1896 \begin_layout Itemize
1897 \begin_inset Flex Code
1900 \begin_layout Plain Layout
1901 LaTeX Error: Unknown option
1907 \begin_inset Newline newline
1910 Error messages beginning with this are trying to tell you that you specified
1911 a bad or undefined option to a package.
1912 Check the package's documentation.
1915 \begin_layout Itemize
1916 \begin_inset Flex Code
1919 \begin_layout Plain Layout
1920 Undefined control sequence
1926 \begin_inset Newline newline
1929 If you've inserted LaTeX code into your document, but made a typo, you'll
1931 You may have forgotten to load a package.
1932 In any case, this error message usually means that you used an undefined
1937 \begin_layout Standard
1938 There are other error and warning messages.
1939 Some are self-explanatory.
1940 These are usually LaTeX messages.
1941 Others are downright cryptic.
1942 These are usually TeX error messages, and we really have
1946 what they mean or how to decipher them.
1950 \begin_layout Standard
1951 There's a general sequence you should follow if you get error messages:
1954 \begin_layout Enumerate
1955 Look at the LaTeX code you inserted for typos.
1958 \begin_layout Enumerate
1959 If there are no typos, check that you used the command(s) correctly.
1962 \begin_layout Enumerate
1963 If you get a bunch of error boxes piled up at the very top of the document—and
1964 especially if you see a
1965 \begin_inset Quotes eld
1969 \begin_inset Flex Code
1972 \begin_layout Plain Layout
1981 \begin_inset Quotes erd
1984 error—it means that there are errors in the preamble.
1985 Start debugging your preamble.
1988 \begin_layout Enumerate
1989 If you didn't add anything to the preamble and didn't add any LaTeX code
1990 to the document, the first suspect is your LaTeX distribution itself.
1991 Check for missing packages and install them.
1994 \begin_layout Enumerate
1995 Okay, so there are no missing packages.
1996 Did you use any of the fine-tuning options in LyX? Specifically, did you
2001 any of them, like trying to manually insert lots of
2002 \begin_inset Flex Code
2005 \begin_layout Plain Layout
2007 \begin_inset space ~
2016 \begin_inset Flex Code
2019 \begin_layout Plain Layout
2026 \begin_inset Flex Code
2029 \begin_layout Plain Layout
2035 ? Did you try to kludge something together with these instead of using the
2036 appropriate paragraph environment?
2039 \begin_layout Enumerate
2040 All right, you didn't use any of the fine-tuning options, you played by
2042 Did you try to pull a fancy maneuver? Did you do something funky inside
2043 a table or an equation, like inserting a graphic into a table cell?
2046 \begin_layout Enumerate
2047 Do you have long sections of text where LaTeX cannot find a place to break
2048 a line? By default, LaTeX is rather strict about how much extra inter-word
2049 spacing it will add in order to break a line.
2050 Preferably, you should rework the paragraph to avoid the problem.
2051 If this isn't an option, you can wrap your text in
2052 \begin_inset Flex Code
2055 \begin_layout Plain Layout
2063 to make LaTeX's line breaking more, well, sloppy.
2066 \begin_layout Enumerate
2067 Did you go overboard with the nesting? LyX (currently) doesn't check to
2068 make sure you're in the limits for nesting environments.
2069 If you nested a bunch of environments to the
2070 \begin_inset Formula $17^{\mathrm{th}}$
2073 level, that's the problem.
2074 (The limit in LaTeX is five.)
2077 \begin_layout Enumerate
2078 Okay, you didn't get any error messages, but your output looks awful.
2079 If you have a table or figure that's too wide or long for the page, you
2084 \begin_layout Enumerate
2085 rescale the figure so it fits.
2088 \begin_layout Enumerate
2089 trim down the table so it fits.
2093 \begin_layout Enumerate
2094 If something else is wrong with the output, and you didn't try to pull anything
2095 fancy or kludge the fine-tuning options, we're not sure what's wrong.
2098 \begin_layout Standard
2099 If all this doesn't help—well, then
2103 you might have found a bug in LyX\SpecialChar \ldots{}
2107 \begin_layout Chapter
2111 \begin_layout Section
2112 Customizing Bibliographies with BibTeX
2115 \begin_layout Standard
2116 The most basic information about how to use BibTeX with LyX is contained
2119 Bibliography databases (BibTeX)
2126 The following subsections explain special bibliography features supported
2130 \begin_layout Subsection
2131 Alternative Citation Styles
2134 \begin_layout Standard
2135 Standard BibTeX uses numbers (e.
2136 \begin_inset space \thinspace{}
2140 \begin_inset space \space{}
2144 \begin_inset Quotes eld
2148 \begin_inset Quotes erd
2151 ) to refer to a cited work.
2152 However, in many scientific disciplines, other citation styles are in use.
2153 The most common one is the author-year style (e.
2154 \begin_inset space \thinspace{}
2158 \begin_inset space \space{}
2162 \begin_inset Quotes eld
2166 \begin_inset Quotes erd
2170 LyX supports two packages that provide this style,
2171 \begin_inset Flex Code
2174 \begin_layout Plain Layout
2181 \begin_inset Flex Code
2184 \begin_layout Plain Layout
2191 Both packages have their pros and cons, which cannot be listed in detail.
2192 If you only want to have simple author-year (or author-numerical) style,
2193 or if you want to use one of the countless style files for
2194 \begin_inset Flex Code
2197 \begin_layout Plain Layout
2203 , than the established
2204 \begin_inset Flex Code
2207 \begin_layout Plain Layout
2213 package is probably your choice.
2214 If you need special features like short title references, ibidem etc., you
2216 \begin_inset Flex Code
2219 \begin_layout Plain Layout
2228 \begin_layout Standard
2229 The handling of both packages in LyX is basically the same.
2231 \begin_inset Flex MenuItem
2234 \begin_layout Plain Layout
2235 Document\SpecialChar \menuseparator
2242 \begin_inset Flex MenuItem
2245 \begin_layout Plain Layout
2252 \begin_inset Flex MenuItem
2255 \begin_layout Plain Layout
2262 \begin_inset Flex MenuItem
2265 \begin_layout Plain Layout
2272 With both packages, you will get some extra features in the citation dialog
2273 and you can select the style of the reference (
2274 \begin_inset Quotes eld
2278 \begin_inset Quotes erd
2282 \begin_inset Quotes eld
2286 \begin_inset Quotes erd
2290 \begin_inset Quotes eld
2294 \begin_inset Quotes erd
2298 \begin_inset Quotes eld
2302 \begin_inset Quotes erd
2306 Note that both packages need specifically designed style files.
2307 They both ship their own, but there are lots of additional style files,
2308 and there is even an interactive style file builder
2312 \begin_layout Plain Layout
2314 \begin_inset Flex URL
2317 \begin_layout Plain Layout
2319 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2330 \begin_inset Flex Code
2333 \begin_layout Plain Layout
2342 \begin_layout Subsection
2343 Sectioned Bibliographies
2346 \begin_layout Standard
2347 Sometimes you might need to divide your bibliography into several sections.
2348 If you are for instance a historian, the possibility to separate sources
2349 and scientific works is most likely a
2350 \begin_inset Quotes eld
2354 \begin_inset Quotes erd
2358 Unfortunately, BibTeX itself does not allow you to do this.
2359 But with the help of some LaTeX packages, BibTeX can be extended to fit
2363 \begin_layout Standard
2364 LyX provides native support for one of these packages,
2372 \begin_layout Plain Layout
2374 \begin_inset Flex URL
2377 \begin_layout Plain Layout
2379 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2389 The advantage of this package (compared to other packages like
2393 ) is that you don't need to define new citation commands.
2394 Instead, you need to prepare different bibliographic databases which include
2395 the entries for the different sections of the bibliography.
2396 For example: If you want to divide your bibliography into the sections
2398 \begin_inset Quotes eld
2402 \begin_inset Quotes erd
2406 \begin_inset Quotes eld
2410 \begin_inset Quotes erd
2413 , you first need to create two bibliographic databases, e.
2414 \begin_inset space \thinspace{}
2418 \begin_inset space \space{}
2422 \begin_inset Flex Code
2425 \begin_layout Plain Layout
2432 \begin_inset Flex Code
2435 \begin_layout Plain Layout
2445 \begin_layout Standard
2447 \begin_inset Flex MenuItem
2450 \begin_layout Plain Layout
2451 Document\SpecialChar \menuseparator
2458 \begin_inset Flex MenuItem
2461 \begin_layout Plain Layout
2468 \begin_inset Flex MenuItem
2471 \begin_layout Plain Layout
2472 Sectioned bibliography
2478 Now you can insert multiple BibTeX bibliographies, one for each section
2479 of your bibliography.
2480 Returning to our example: Insert the BibTeX bibliography
2481 \begin_inset Flex Code
2484 \begin_layout Plain Layout
2490 and a second one for the database
2491 \begin_inset Flex Code
2494 \begin_layout Plain Layout
2501 You are free to use the same or different styles for each section.
2502 Additionally, you can chose if the bibliography section should contain
2504 \begin_inset Quotes eld
2507 all cited references
2508 \begin_inset Quotes erd
2511 of the specified database(s) (which is the default),
2512 \begin_inset Quotes eld
2515 all uncited references
2516 \begin_inset Quotes erd
2520 \begin_inset Quotes eld
2524 \begin_inset Quotes erd
2528 This might be useful if you would like to separate your bibliography into
2530 \begin_inset Quotes eld
2534 \begin_inset Quotes erd
2538 \begin_inset Quotes eld
2542 \begin_inset Quotes erd
2546 \begin_inset Quotes eld
2550 \begin_inset Quotes erd
2554 The titles for the sections can be added as ordinary sections or subsections.
2556 \begin_inset Flex Code
2559 \begin_layout Plain Layout
2565 removes the bibliography title, you have manually re-add that, too (as
2566 a chapter* or section*, for instance).
2569 \begin_layout Subsection
2570 Multiple Bibliographies
2573 \begin_layout Standard
2574 Multiple bibliographies, e.
2575 \begin_inset space \thinspace{}
2579 \begin_inset space \space{}
2582 a bibliography for each section or chapter of the document, are not supported
2585 \begin_inset Flex Code
2588 \begin_layout Plain Layout
2594 package, which is used for the creation of sectioned bibliographies in
2595 LyX (see the previous section), provides an easy way to solve this task,
2596 if you are willing to use some
2597 \begin_inset Flex MenuItem
2600 \begin_layout Plain Layout
2607 \begin_inset space ~
2611 \begin_inset CommandInset ref
2613 reference "sec:Inserting-TeX-Code"
2621 \begin_layout Plain Layout
2622 An alternative approach is to use the
2623 \begin_inset Flex Code
2626 \begin_layout Plain Layout
2633 \begin_inset Flex Code
2636 \begin_layout Plain Layout
2642 package, respectively.
2650 \begin_layout Standard
2652 \begin_inset Flex MenuItem
2655 \begin_layout Plain Layout
2656 Document\SpecialChar \menuseparator
2663 \begin_inset Flex MenuItem
2666 \begin_layout Plain Layout
2673 \begin_inset Flex MenuItem
2676 \begin_layout Plain Layout
2677 Sectioned bibliography
2683 In the document, you have to enclose the sections, which shall contain
2684 their own bibliography (including the BibTeX bibliography itself), between
2686 \begin_inset Flex Code
2689 \begin_layout Plain Layout
2698 \begin_inset Flex Code
2701 \begin_layout Plain Layout
2709 (those commands have to be inserted as TeX code).
2710 The bibliography will contain all references which have been cited in the
2712 \begin_inset Flex Code
2715 \begin_layout Plain Layout
2726 If you are using this approach, then every citation reference has to be
2728 \begin_inset Flex Code
2731 \begin_layout Plain Layout
2739 \begin_inset Flex Code
2742 \begin_layout Plain Layout
2751 \begin_layout Section
2755 \begin_layout Subsection
2759 \begin_layout Standard
2760 When you are working on a large file with many sections, it is often convenient
2761 to break up the document into several files, or perhaps you have something
2762 where a table may change from time to time, but the preceding text does
2764 In these cases, you should seriously consider using multipart documents.
2765 For example, scientific papers often have five major sections: the introduction
2766 , observations, results, discussion, and conclusion.
2767 Each of these could be its own separate LyX file, with one
2768 \begin_inset Quotes eld
2772 \begin_inset Quotes erd
2775 file which contains the title, authors, abstract, references, etc., plus
2776 the five included files.
2777 It is important to note that each of these files is a full LyX file which
2778 can be formatted and printed on its own, as well as included in a master
2780 Each of these files must have the same document class, however—don't attempt
2781 to mix book classes with article classes.
2782 You may also include LaTeX files; however, these files must not have their
2784 \begin_inset space \thinspace{}
2788 \begin_inset space \space{}
2791 everything up to and including the
2792 \begin_inset Flex Code
2795 \begin_layout Plain Layout
2804 \begin_inset Flex Code
2807 \begin_layout Plain Layout
2815 line must be deleted) or else errors will be generated when you try to
2819 \begin_layout Standard
2820 LyX allows you to include files quite easily with
2821 \begin_inset Flex MenuItem
2824 \begin_layout Plain Layout
2825 Insert\SpecialChar \menuseparator
2827 \begin_inset space ~
2836 When you click on this selection a small box is inserted into the file
2837 at the current cursor location.
2838 Clicking on the box raises a dialog which allows you to select the file
2839 to be included, and the method of its inclusion.
2843 \begin_layout Standard
2844 The file selection box should by now be obvious.
2845 The three inclusion methods are
2846 \begin_inset Quotes eld
2850 \begin_inset Quotes erd
2854 \begin_inset Quotes eld
2858 \begin_inset Quotes erd
2862 \begin_inset Quotes eld
2866 \begin_inset Quotes erd
2870 The difference between
2871 \begin_inset Quotes eld
2875 \begin_inset Quotes erd
2879 \begin_inset Quotes eld
2883 \begin_inset Quotes erd
2886 is really only meaningful to LaTeXperts, but the practical difference is
2887 that files which are
2888 \begin_inset Quotes eld
2892 \begin_inset Quotes erd
2895 are typeset beginning on a new page, while files which are
2896 \begin_inset Quotes eld
2900 \begin_inset Quotes erd
2903 are typeset starting on the current page.
2906 \begin_layout Standard
2907 Generally, the master file is converted into a full LaTeX file before typesettin
2908 g, while the included files are converted to LaTeX files which do not have
2909 all the preamble information.
2912 \begin_layout Standard
2914 \begin_inset Quotes eld
2918 \begin_inset Quotes erd
2921 included file allows you to include a file typeset exactly as it appears
2923 \begin_inset space \thinspace{}
2927 \begin_inset space \space{}
2931 \begin_inset Flex Code
2934 \begin_layout Plain Layout
2940 mode, with the characters set in a fixed-width typewriter font.
2941 Normally, spaces in this file are invisible, though two consecutive spaces
2942 are conserved, unlike LyX's normal treatment of spaces.
2943 However, setting the
2944 \begin_inset Flex MenuItem
2947 \begin_layout Plain Layout
2949 \begin_inset space ~
2953 \begin_inset space ~
2957 \begin_inset space ~
2965 checkbox typesets a mark to unambiguously define the presence of a space.
2969 \begin_layout Subsection
2970 Cross-References Between Files
2973 \begin_layout Standard
2974 \begin_inset Box Shadowbox
2984 height_special "totalheight"
2987 \begin_layout Plain Layout
2988 This section is somewhat out of date.
2989 Need to describe default master documents and how children are opened when
2999 \begin_layout Standard
3000 It is possible to set up cross-references between the different files.
3001 First, open all the files in question: let's call them A and B in a two
3002 file example, where B is included in A.
3003 Let's say you insert a label in A, then want to reference it in B.
3004 Open the cross-reference dialog in whilst in document B, and you can select
3006 \begin_inset Quotes eld
3010 \begin_inset Quotes erd
3016 \begin_layout Subsection
3017 Bibliography Lists in all Subdocuments
3020 \begin_layout Standard
3021 \begin_inset Box Frameless
3031 height_special "totalheight"
3034 \begin_layout Plain Layout
3035 This section also needs updating.
3036 There is now material about this on the wiki, and it could be copied here.
3044 \begin_layout Standard
3045 Copy the bibliography list with all entries to all subdocuments and transform
3047 This way LyX will find the
3048 \begin_inset Flex Code
3051 \begin_layout Plain Layout
3057 -files and you can easily insert references without making the bibliography
3061 \begin_layout Standard
3062 As the bibliography list is in a comment, LaTeX won't use use it and the
3063 references will look like this: [?], instead of like this: [1].
3064 One solution is to use the LaTeX-package
3065 \begin_inset Flex Code
3068 \begin_layout Plain Layout
3074 that will only include comments by processing the files separately.
3075 To do this, add in the LaTeX preamble of every subdocument the following:
3078 \begin_layout LyX-Code
3084 \begin_layout LyX-Code
3087 includecomment{comment}
3090 \begin_layout Standard
3092 \begin_inset Flex URL
3095 \begin_layout Plain Layout
3097 http://wiki.lyx.org/FAQ/Unsorted#toc31
3105 \begin_layout Section
3109 \begin_layout Standard
3110 Users sometimes need to be able to
3111 \begin_inset Quotes eld
3115 \begin_inset Quotes erd
3118 a LyX file together with all the images (and other files) on which it depends,
3119 either for sending to a publisher or for sharing with a co-author.
3120 LyX 2.0 includes a Python script (
3121 \begin_inset Flex Code
3124 \begin_layout Plain Layout
3130 ) that automates this process.
3131 To use it, you must have either the
3132 \begin_inset Flex Code
3135 \begin_layout Plain Layout
3142 \begin_inset Flex Code
3145 \begin_layout Plain Layout
3151 python modules installed on your system.
3152 By default, the script prefers the
3153 \begin_inset Flex Code
3156 \begin_layout Plain Layout
3163 \begin_inset Flex Code
3166 \begin_layout Plain Layout
3172 format on Unix-like systems and the
3173 \begin_inset Flex Code
3176 \begin_layout Plain Layout
3185 \begin_layout Standard
3186 LyX's configuration process will set the script up to export a `LyX Archive',
3187 and this format will then be available under
3188 \begin_inset Flex Code
3191 \begin_layout Plain Layout
3192 File\SpecialChar \menuseparator
3201 \begin_layout Standard
3202 Independently of the platform, the generation of a particular archive format
3203 can be forced by adding either the
3204 \begin_inset Flex Code
3207 \begin_layout Plain Layout
3214 \begin_inset Flex Code
3217 \begin_layout Plain Layout
3224 \begin_inset Flex Code
3227 \begin_layout Plain Layout
3234 \begin_inset Flex Code
3237 \begin_layout Plain Layout
3243 format) switch to the
3244 \begin_inset Flex Code
3247 \begin_layout Plain Layout
3248 LyX\SpecialChar \menuseparator
3255 \begin_inset Flex Code
3258 \begin_layout Plain Layout
3259 Tools\SpecialChar \menuseparator
3260 Preferences\SpecialChar \menuseparator
3261 File Handling\SpecialChar \menuseparator
3268 (Make sure you add the switch after the script name, not before it.)
3271 \begin_layout Section
3272 Fancy Headers and Footers
3275 \begin_layout Standard
3276 The default page layout is rather plain; for an
3277 \begin_inset Flex Code
3280 \begin_layout Plain Layout
3286 document class, all you get is a centered page number at the bottom of
3288 This document uses KOMA-script's book class, so it appears to be a bit
3290 But to really put on a show, you need to set the document page style to
3292 \begin_inset Quotes eld
3296 \begin_inset Quotes erd
3299 , as mentioned in the
3304 This section describes the LaTeX code you need to insert in your LaTeX
3305 preamble in order to get the desired effects.
3308 \begin_layout Standard
3309 For more information on fancy headers, see the
3310 \begin_inset Flex Code
3313 \begin_layout Plain Layout
3319 package documentation.
3321 \begin_inset Flex URL
3324 \begin_layout Plain Layout
3326 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3334 \begin_layout Standard
3335 The page header is divided into three fields, not surprisingly labeled
3336 \begin_inset Quotes eld
3340 \begin_inset Quotes erd
3344 \begin_inset Quotes eld
3348 \begin_inset Quotes erd
3352 \begin_inset Quotes eld
3356 \begin_inset Quotes erd
3360 The footer is also divided into these three fields.
3361 The LaTeX commands to set these fields in the simplest manner are
3362 \begin_inset Flex Code
3365 \begin_layout Plain Layout
3374 \begin_inset Flex Code
3377 \begin_layout Plain Layout
3386 \begin_inset Flex Code
3389 \begin_layout Plain Layout
3398 \begin_inset Flex Code
3401 \begin_layout Plain Layout
3410 Suppose you wish to put your name in the upper left hand corner of each
3412 Simply insert the following command in the preamble:
3415 \begin_layout Standard
3424 \begin_layout Standard
3425 You will now see your name in the upper left.
3426 If a field has a default entry that you would like to get rid of (often
3427 the page number appears in the central footer, simply include a command
3428 with a blank argument, e.
3429 \begin_inset space \thinspace{}
3435 \begin_layout Standard
3443 \begin_layout Standard
3444 Let's get really fancy: lets put the section number with the word
3445 \begin_inset Quotes eld
3449 \begin_inset Quotes erd
3453 \begin_inset space \thinspace{}
3457 \begin_inset space \space{}
3460 Section 3) in the upper left, the page number (e.
3461 \begin_inset space \thinspace{}
3465 \begin_inset space \space{}
3468 Page 4) in the upper right, your name in the lower left, and the date in
3470 The following commands should now appear in the preamble:
3473 \begin_layout Standard
3483 \begin_layout Standard
3491 \begin_layout Standard
3501 \begin_layout Standard
3510 \begin_layout Standard
3518 \begin_layout Standard
3528 \begin_layout Standard
3530 \begin_inset Flex Code
3533 \begin_layout Plain Layout
3542 \begin_inset Flex Code
3545 \begin_layout Plain Layout
3553 access LaTeX's section and page counters, and so print out the current
3554 section and page numbers.
3556 \begin_inset Flex Code
3559 \begin_layout Plain Layout
3567 simply prints out today's date.
3570 \begin_layout Standard
3571 The thicknesses of the horizontal rules drawn beneath the header and above
3572 the footer can also be modified.
3573 If you don't want one of the rules, set its thickness to 0.
3574 The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3580 \begin_inset Flex Code
3583 \begin_layout Plain Layout
3588 headrulewidth}{0.4pt}
3594 \begin_inset Flex Code
3597 \begin_layout Plain Layout
3602 footrulewidth}{0.4pt}
3607 to set the thicknesses.
3610 \begin_layout Standard
3611 You can switch the header/footer settings on and off for individual pages
3613 \begin_inset Flex Code
3616 \begin_layout Plain Layout
3619 thispagestyle{empty}
3625 \begin_inset Flex Code
3628 \begin_layout Plain Layout
3631 thispagestyle{plain}
3637 \begin_inset Flex Code
3640 \begin_layout Plain Layout
3643 thispagestyle{fancy}
3649 Simply insert them in the text on the page you want changed and mark them
3651 In fact, title pages are marked as plain by default, while following pages
3652 are marked fancy when using the global fancy setting.
3655 \begin_layout Standard
3656 As a final example, it is possible to include an image in the header or
3658 Suppose you want to put a company logo in the upper lefthand corner.
3659 You might try something like
3662 \begin_layout Standard
3671 includegraphics{logo.eps}}}
3674 \begin_layout Standard
3676 (you may need to preface this with
3677 \begin_inset Flex Code
3680 \begin_layout Plain Layout
3684 usepackage{graphics}
3689 if you don't include graphics elsewhere in your document).
3692 \begin_layout Section
3693 Itemize Bullet Selection
3694 \begin_inset CommandInset label
3703 \begin_layout Standard
3709 \begin_layout Subsection
3713 \begin_layout Standard
3714 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3715 Using this dialog you can easily specify what bullet shape to use at each
3716 level of an itemized list.
3717 These settings are document-wide so you won't be able to specify different
3718 sets of bullets for different paragraphs.
3722 \begin_layout Plain Layout
3723 Well, actually you can but you'll have to do it by hand.
3731 \begin_layout Subsection
3735 \begin_layout Standard
3736 Open the dialog by selecting the
3737 \begin_inset Flex MenuItem
3740 \begin_layout Plain Layout
3741 Document\SpecialChar \menuseparator
3747 menu item and then select the
3748 \begin_inset Flex MenuItem
3751 \begin_layout Plain Layout
3760 \begin_layout Standard
3761 The dialog provides you with a table of bullet shapes.
3762 A column of buttons on the left of the table provides access to the six
3763 different panels of bullet shapes.
3764 The row of buttons across the top is used to select which bullet depth
3766 A text entry under the table shows the currently selected bullet shape's
3767 LaTeX equivalent and this can be edited if desired.
3768 If you do modify the text you will also need to specify any needed packages
3769 in the LaTeX preamble.
3772 \begin_layout Standard
3773 The six panels are divided up by the packages they require.
3774 The following table shows the mappings from button name to LaTeX packages.
3777 \begin_layout Standard
3779 \begin_inset Tabular
3780 <lyxtabular version="3" rows="7" columns="2">
3781 <features tabularvalignment="middle">
3782 <column alignment="center" valignment="top" width="0pt">
3783 <column alignment="center" valignment="top" width="0pt">
3785 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3788 \begin_layout Plain Layout
3803 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3806 \begin_layout Plain Layout
3823 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3826 \begin_layout Plain Layout
3841 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3844 \begin_layout Plain Layout
3860 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3863 \begin_layout Plain Layout
3878 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3881 \begin_layout Plain Layout
3898 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3901 \begin_layout Plain Layout
3916 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3919 \begin_layout Plain Layout
3936 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3939 \begin_layout Plain Layout
3954 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3957 \begin_layout Plain Layout
3974 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3977 \begin_layout Plain Layout
3992 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3995 \begin_layout Plain Layout
4012 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4015 \begin_layout Plain Layout
4030 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4033 \begin_layout Plain Layout
4056 \begin_layout Standard
4057 LyX doesn't stop you using bullets from packages you don't have.
4058 If you get errors from LaTeX when you try to view or print the file, then
4059 it is likely you are missing a package.
4063 \begin_layout Plain Layout
4064 LyX doesn't restrict your use since you may be editing locally and exporting
4073 \begin_layout Subsection
4077 \begin_layout Standard
4078 Select which bullet depth you want to change then select the bullet shape
4080 Any changes will not be visible in LyX, but are visible when viewing the
4084 \begin_layout Standard
4085 You can reset a bullet shape to the default simply by clicking your right
4086 mouse button on the appropriate bullet depth button.
4090 \begin_layout Plain Layout
4095 want to have multiple sets of paragraphs with different sets of bullets
4096 in each, then you're going to have to get your hands dirty with TeX code.
4097 The bullet selection dialog can help though because it provides you with
4098 the LaTeX code for a wide range of bullet shapes.
4099 To make your own custom paragraphs you have the following options:
4102 \begin_layout Plain Layout
4106 \begin_layout Plain Layout
4122 \begin_layout Plain Layout
4126 \begin_layout Plain Layout
4148 \begin_layout Itemize
4149 Use the LaTeX command
4150 \begin_inset Flex Code
4153 \begin_layout Plain Layout
4161 to specify a new bullet shape for a given depth.
4162 You'll also need to save the current bullet shape so you can restore it
4164 In this itemized list the following LaTeX code was used to change the bullet
4165 used for the first depth.
4169 \begin_layout LyX-Code
4179 \begin_layout LyX-Code
4196 \begin_layout Itemize
4197 Note that the itemize depth is specified in Roman numerals as part of the
4207 \begin_layout Itemize
4211 \begin_layout Plain Layout
4224 Specify each individual entry by starting each item with the bullet shape
4225 enclosed in square brackets and set as
4226 \begin_inset Flex MenuItem
4229 \begin_layout Plain Layout
4236 For example, this item was started with
4237 \begin_inset Flex Code
4240 \begin_layout Plain Layout
4255 \begin_layout Plain Layout
4259 \begin_layout Plain Layout
4275 \begin_layout Plain Layout
4276 You'll also need to revert the labelitem back to its previous setting for
4277 the global bullet shape settings to remain in effect.
4278 The way used here was:
4281 \begin_layout LyX-Code
4296 \begin_layout Chapter
4297 LyX and the World Wide Web
4300 \begin_layout Standard
4301 LyX has long supported the export of documents to various web-friendly formats,
4303 Before verson 2.0, however, HTML export was always accomplished by the use
4304 of external converters.
4308 \begin_layout Plain Layout
4309 For details on the use of external converters with LyX, see the
4313 section of the Customization manual.
4318 These fall into two large groups: there are converters that use LaTeX as
4319 an intermediate format, such as
4320 \begin_inset Flex Code
4323 \begin_layout Plain Layout
4330 \begin_inset Flex Code
4333 \begin_layout Plain Layout
4340 \begin_inset Flex Code
4343 \begin_layout Plain Layout
4349 , relying upon LyX to produce the LaTeX; and there is a converter that works
4350 directly on LyX files,
4351 \begin_inset Flex Code
4354 \begin_layout Plain Layout
4361 All of these have different advantages and disadvantages.
4365 \begin_layout Standard
4366 The LaTeX-based converters have the advantage that, in principle, they know
4367 everything about the exported document that LaTeX does.
4368 Such converters do not care, for example, if a certain block of code was
4369 produced by LyX or was Evil Red Text.
4370 These converters know about
4371 \begin_inset Flex Code
4374 \begin_layout Plain Layout
4380 files, counters, and references, and can often make use of the
4381 \begin_inset Flex Code
4384 \begin_layout Plain Layout
4390 files generated by BibTeX.
4391 On the other hand, LaTeX is a very hard language to parse---it is sometimes
4392 said that only TeX itself understands TeX---and LaTeX-based converters
4393 will often choke on what seem to be quite simple constructs; complex ones
4394 can throw them completely, and as of this writing, for example, the
4398 manual will not export with
4399 \begin_inset Flex Code
4402 \begin_layout Plain Layout
4408 , though the others will.
4409 The other issue concerns how math is handled.
4410 These converters typically convert the formulae into little pictures that
4411 are then linked from the HTML document.
4412 Since these are actually generated by LaTeX, they are accurate.
4413 But they do not scale well, and just getting them to look as if they are
4414 actually meant to be in your document---so that the font sizes seem to
4415 be roughly the same---can be a challenge.
4418 \begin_layout Standard
4420 \begin_inset Flex Code
4423 \begin_layout Plain Layout
4430 \begin_inset CommandInset href
4432 name "http://elyxer.nongnu.org/"
4433 target "http://elyxer.nongnu.org/"
4437 ) solves some of these problems.
4438 In particular, the formulae it produces scale perfectly, since it renders
4439 math using a combination of HTML and CSS rather than converting the formulae
4441 But even moderately complex formula are rendered less well than with
4442 \begin_inset Flex Code
4445 \begin_layout Plain Layout
4451 ; this reflects the limitations of HTML.
4455 \begin_layout Plain Layout
4457 \begin_inset Flex Code
4460 \begin_layout Plain Layout
4466 can also use jsMath and MathJax for equations, but this setting is only
4467 available globally and requires one to have access to a server that runs
4473 More importantly (as of version 1.1.1, at least),
4474 \begin_inset Flex Code
4477 \begin_layout Plain Layout
4483 has limited support for math macros and no support for user-defined paragraph
4484 or character styles.
4485 These limitations make
4486 \begin_inset Flex Code
4489 \begin_layout Plain Layout
4495 unsuitable for many of the documents LyX users produce.
4496 In principle, of course, these problems could be solved, but the LyX developers
4497 have decided to follow a different path and have made LyX itself capable
4498 of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4502 \begin_layout Standard
4503 As of this writing, XHTML output remains under development and should probably
4505 \begin_inset Quotes eld
4509 \begin_inset Quotes erd
4516 \begin_layout Plain Layout
4518 \begin_inset Flex Code
4521 \begin_layout Plain Layout
4522 development/HTML.notes
4527 , which can be found in the LyX source tree or
4528 \begin_inset CommandInset href
4530 name "accessed online"
4531 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4535 , usually contains up-to-date information about the state of XHTML output.
4536 See also the list of XHTML bugs on
4537 \begin_inset CommandInset href
4539 name "the bug tracker"
4540 target "http://www.lyx.org/trac/query?status=reopened&status=assigned&status=new&max=0&component=xhtml+export&order=id&col=id&col=summary&col=reporter&col=keywords&keywords=%21%7Efixedintrunk&desc=1"
4549 Still, the developers have chosen this approach because it has several
4550 potential advantages over the other two.
4553 \begin_layout Standard
4554 These advantages are primarily due to the fact that the XHTML output routines,
4555 since they are part of LyX, know everything LyX knows about the document
4560 \begin_layout Plain Layout
4561 Another advantage is that, since these routines are internal to LyX, they
4562 are immune to changes in LyX's file format, or to changes in the semantics
4568 So they know about the table of contents (as displayed in the outline),
4569 about the counters associated with different paragraph styles, and about
4570 user-defined styles.
4571 The XHTML output routines know what LyX knows about internationalization,
4572 too, so they will output
4573 \begin_inset Quotes eld
4577 \begin_inset Quotes erd
4581 \begin_inset Quotes eld
4589 \begin_inset Quotes erd
4592 , depending upon the language in effect at the time.
4596 \begin_layout Standard
4597 Quite generally, the output routines know what LyX knows about document
4598 layout, that is, about how the document is to be rendered on screen.
4599 We use this information when we output the document as XHTML.
4604 generates CSS style information corresponding to the layout information
4605 it uses to render the document on screen: if section headings are supposed
4606 to be sans-serif and bold as seen in LyX, then (by default) they will be
4607 sans-serif and bold when viewed in a web browser, too.
4608 And this is true not just for pre-defined styles, like Section, but for
4609 any style, including user-defined styles.
4610 Indeed, the XHTML output routines make no distinction between user-defined
4611 paragraph and character styles and LyX's own pre-defined styles: in each
4612 case, everything LyX knows about the styles is contained in the layout
4614 And much the same is true as regards pre-defined textual insets, such as
4615 footnotes, and various custom insets.
4619 \begin_layout Standard
4620 The result is that XHTML output can be customized and extended in exactly
4621 the same way LaTeX output can be customized and extended: through layout
4623 See chapter five of the
4627 manual for the details.
4630 \begin_layout Standard
4631 The remainder of this chapter contains more detailed information on XHTML
4632 output, its limitations, and ways to work around those limitations.
4635 \begin_layout Section
4636 Math Output in XHTML
4639 \begin_layout Standard
4640 LyX offers four choices for how math is rendered.
4641 These have various advantages and disadvantages:
4644 \begin_layout Itemize
4646 \begin_inset Newline newline
4649 MathML is a dialect of XML designed specifically for mathematics on the
4650 web, and it typically renders very well in browsers that support it.
4651 The disadvantage is that not all browsers support MathML, and support is
4652 not complete even in the Gecko-based browsers, such as Firefox.
4653 \begin_inset Newline newline
4656 If LyX is unable to render a formula as MathML---for example, if the formula
4658 \begin_inset Flex Code
4661 \begin_layout Plain Layout
4667 package or ERT---then it will instead output the formula as an image.
4671 \begin_layout Itemize
4673 \begin_inset Newline newline
4677 \begin_inset Flex Code
4680 \begin_layout Plain Layout
4686 outputs math as HTML, styled by CSS.
4690 \begin_layout Plain Layout
4691 LyX has borrowed some of the CSS for its HTML output from
4692 \begin_inset Flex Code
4695 \begin_layout Plain Layout
4706 For simple formulae, this can work quite well, though with more complicated
4707 formulae it tends to break down.
4708 Still, this method has the advantage that it is very widely supported and
4709 so it may be appropriate for documents that contain only a little, fairly
4711 \begin_inset Newline newline
4714 If Lyx is unable to render a formula as HTML---for example, if the formula
4716 \begin_inset Flex Code
4719 \begin_layout Plain Layout
4725 package or ERT---then it will instead output the formula as an image.
4729 \begin_layout Itemize
4731 \begin_inset Newline newline
4735 \begin_inset Flex Code
4738 \begin_layout Plain Layout
4744 , LyX will output formulae as images, the very same images, in fact, that
4745 are used for instant preview.
4749 \begin_layout Plain Layout
4750 Instant preview does
4754 have to be on for images to be output, however.
4759 The advantage to this method is that the images are simply generated by
4760 LaTeX, so they are very accurate.
4761 The disadvantage, as mentioned earlier, is that these are bitmapped images,
4762 so they do not scale terribly well, and one cannot copy them, etc.
4763 (As of this writing, there are also problems about equation numbering.
4765 \begin_inset CommandInset href
4768 target "http://www.lyx.org/trac/ticket/6894"
4773 \begin_inset Newline newline
4776 The size of the images can be controlled by setting the
4777 \begin_inset Quotes eld
4781 \begin_inset Quotes erd
4785 \begin_inset Flex MenuItem
4788 \begin_layout Plain Layout
4789 Document\SpecialChar \menuseparator
4790 Settings\SpecialChar \menuseparator
4800 \begin_layout Plain Layout
4801 For those who want to know, this controls the resolution of the image in
4802 dots per inch and is based upon a default of 75 dpi.
4808 \begin_inset Newline newline
4811 If LyX for some reason fails to create an image for a formula (e.g., if a
4812 required LaTeX package is not installed), then it will fall back to outputing
4816 \begin_layout Itemize
4818 \begin_inset Newline newline
4821 Finally, LyX will happily output math as LaTeX.
4822 As well as being the output of last resort, this method can be used with
4824 \begin_inset CommandInset href
4827 target "http://www.math.union.edu/~dpvc/jsMath/"
4831 , which uses JavaScript to render LaTeX embedded in HTML documents.
4832 LyX wraps the LaTeX in either a
4833 \begin_inset Flex Code
4836 \begin_layout Plain Layout
4842 (for inline formulas) or
4843 \begin_inset Flex Code
4846 \begin_layout Plain Layout
4852 (for displayed formulas) with
4853 \begin_inset Flex Code
4856 \begin_layout Plain Layout
4862 , as is required for jsMath.
4865 \begin_layout Standard
4866 One of these output methods must be selected under
4867 \begin_inset Flex MenuItem
4870 \begin_layout Plain Layout
4871 Document\SpecialChar \menuseparator
4872 Settings\SpecialChar \menuseparator
4879 By default, LyX outputs MathML.
4880 This is a document-wide setting, therefore.
4883 \begin_layout Standard
4884 Eventually, LyX will offer the user the option to select an alternate output
4885 method for a particular inset, say, one that isn't being rendered very
4890 \begin_layout Plain Layout
4891 That said, since LyX falls back to images if the inset contains ERT, then
4892 one can force output as an image by putting some harmless ERT into the
4894 \begin_inset Formula $a=b\relax$
4905 \begin_layout Section
4906 Bibliography and Citations
4909 \begin_layout Standard
4910 XHTML output fully supports bibliographies and citations.
4914 \begin_layout Standard
4915 Citation labels are generated by the same machinery that generates LyX's
4916 on-screen labels, so the labels will look in the output much as they do
4917 in LyX, though better.
4918 If you are using numerical citations, then LyX will output numerical labels,
4919 such as [1] or [17], rather than simply showing the citation key in square
4920 brackets, as it does on-screen.
4921 If you are using author-year citations, then LyX will add lowercase letters
4922 to the years, just as BibTeX does, if it finds more than one citation for
4923 a given author-year combination.
4924 The labels will be printed with the bibliography entries.
4925 Note that there is, at present, no way to customize the appearance of the
4926 labels, for example, to choose between square brackets and parentheses.
4929 \begin_layout Standard
4930 Bibliography output is handled by the same machinery that handles the presentati
4931 on of reference information in the citation dialog, so you will see in the
4932 XHTML output pretty much what you would see if you were to look at a given
4933 entry in the citation dialog.
4934 The formatting can be customized in your layout file or, preferably, in
4940 manual for the details.
4943 \begin_layout Standard
4944 The main defect at present is that cross-referenced information is printed
4945 with every entry with which it is associated.
4946 So you can see things like this:
4951 \begin_inset Quotes eld
4954 Context and Logical Form
4955 \begin_inset Quotes erd
4960 Language in Context: Selected Essays
4962 (Oxford: Oxford University Press, 2007), pp.
4968 \begin_inset Quotes eld
4971 Semantics in Context
4972 \begin_inset Quotes erd
4977 Language in Context: Selected Essays
4979 (Oxford: Oxford University Press, 2007), pp.
4983 \begin_layout Standard
4984 This should be fixed before long.
4987 \begin_layout Standard
4988 There is no support at present for sectioned bibliographies.
4989 If you have multiple bibliographies, then LyX will print the same bibliography
4993 \begin_layout Section
4997 \begin_layout Standard
4998 LyX will happily export indexes as XHTML, but with certain limitations at
5002 \begin_layout Standard
5003 Index export will be most reliable when you do not attempt to use the fancy
5004 constructs that are described in the section on indexes in the
5012 \begin_layout Plain Layout
5013 The main issue here is that LyX itself does not really handle these.
5014 It just lets you enter what you would have to enter in raw LaTeX.
5019 We'll describe how they are handled using the subsection headings from
5023 \begin_layout Itemize
5024 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
5025 these, but the entries must be separated by
5026 \begin_inset Quotes eld
5030 \begin_inset Quotes erd
5033 , that is, there must be spaces around the exclamation point.
5034 This is because it is otherwise too difficult to check for escaped exclamation
5035 points, ones in math, and so forth.
5038 \begin_layout Itemize
5039 Page Ranges: There is no support at all for page ranges, since these make
5040 no sense with XHMTL.
5041 Instead, you will just get two index entries, one at either end.
5044 \begin_layout Itemize
5045 Cross-referencing: There is no support for cross-referencing.
5046 If LyX finds an entry containing the
5047 \begin_inset Quotes eld
5050 |see\SpecialChar \ldots{}
5052 \begin_inset Quotes erd
5055 construct, it is just dropped, and the rest is treated as an ordinary index
5059 \begin_layout Itemize
5060 Index Entry Order: LyX does support attempts to fix the sorting order.
5061 It will take what is before the first `@' it finds and use that for sorting,
5062 taking what follows the first `@' to be the actual entry.
5063 At present, LyX does not check for escaped `@', so do not try to index
5067 \begin_layout Itemize
5068 Index Entry Layout: You can format entries by using the text style dialog,
5069 or by using any other method available within LyX itself.
5070 There is no support for constructs like:
5071 \begin_inset Quotes eld
5075 \begin_inset Quotes erd
5079 Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
5080 and everything that follows it.
5083 \begin_layout Itemize
5084 Multiple Indexes: There is no support for multiple indexes.
5085 Rather, all index entries will be printed as one large index.
5086 To avoid our printing several versions of the index, we print only the
5087 main index, so make sure you have one.
5090 \begin_layout Section
5091 Nomenclature and Glossary
5094 \begin_layout Standard
5095 There is at present no support for glossaries.
5096 Adding it would be fairly trivial, and welcome.
5099 \begin_layout Chapter
5103 \begin_layout Section
5107 \begin_layout Standard
5108 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
5109 and retrieve information about the LyX internal state.
5110 This is only intended for advanced users, but they should find it useful.
5111 It is by writing to the LyX server, for example, that bibliography managers,
5112 such as JabRef, are able to
5113 \begin_inset Quotes eld
5117 \begin_inset Quotes erd
5123 \begin_layout Section
5124 Starting the LyX Server
5127 \begin_layout Standard
5128 The LyX server works through the use of a pair of named pipes.
5129 These are usually located in
5130 \begin_inset Flex Code
5133 \begin_layout Plain Layout
5139 , (except on Windows, where
5143 named pipes are special objects located in
5144 \begin_inset Flex Code
5147 \begin_layout Plain Layout
5159 ) and have the names
5160 \begin_inset Quotes eld
5164 \begin_inset Flex Code
5167 \begin_layout Plain Layout
5174 \begin_inset Quotes erd
5178 \begin_inset Quotes eld
5182 \begin_inset Flex Code
5185 \begin_layout Plain Layout
5192 \begin_inset Quotes erd
5196 External programs write into
5197 \begin_inset Flex Code
5200 \begin_layout Plain Layout
5206 and read back data from
5207 \begin_inset Flex Code
5210 \begin_layout Plain Layout
5217 The stem of the pipe names can be defined in the
5218 \begin_inset Flex MenuItem
5221 \begin_layout Plain Layout
5222 Tools\SpecialChar \menuseparator
5229 \begin_inset Flex Code
5232 \begin_layout Plain Layout
5233 "/home/myhome/lyxpipe"
5239 \begin_inset Flex Code
5242 \begin_layout Plain Layout
5256 on Windows (but any working path can be used).
5261 configure this manually in order for the server to start.
5264 \begin_layout Standard
5266 \begin_inset Flex Code
5269 \begin_layout Plain Layout
5276 \begin_inset Flex Code
5279 \begin_layout Plain Layout
5285 ' to create the pipes.
5286 If one of the pipes already exists, LyX will assume that another LyX process
5287 is already running and will not start the server.
5288 On POSIX (Unix like) systems, if for some other reason, an unused
5289 \begin_inset Quotes eld
5293 \begin_inset Quotes erd
5296 pipe is left in existence when LyX closes, then LyX will try to delete
5298 If this fails for some reason, you will need to delete the pipes manually
5299 and then restart LyX.
5300 On Windows, pipes are deleted by the OS on program termination or crash,
5302 \begin_inset Quotes eld
5306 \begin_inset Quotes erd
5309 pipes should not be possible.
5312 \begin_layout Standard
5313 To have several LyX processes with servers at the same time, you have to
5314 use different configurations, perhaps by using separate user directories,
5316 \begin_inset Flex Code
5319 \begin_layout Plain Layout
5325 file, for each process.
5328 \begin_layout Standard
5329 If you are developing a client program, you might find it useful to enable
5330 debugging information from the LyX server.
5331 Do this by starting LyX as
5332 \begin_inset Flex Code
5335 \begin_layout Plain Layout
5344 \begin_layout Standard
5345 You can find a complete example client written in C in the source distribution
5347 \begin_inset Flex Code
5350 \begin_layout Plain Layout
5351 development/lyxserver/server_monitor.c
5359 \begin_layout Standard
5360 Another useful tool is command-line based client you will find in
5361 \begin_inset Flex Code
5364 \begin_layout Plain Layout
5365 src/client/lyxclient
5373 \begin_layout Section
5374 Normal communication
5377 \begin_layout Standard
5378 To issue a LyX call, the client writes a line of ASCII text into the input
5380 This line has the following format:
5397 \begin_layout Description
5398 clientname is a name that the client can choose arbitrarily.
5399 Its only use is that LyX will echo it if it sends an answer—so a client
5400 can dispatch results from different requesters.
5403 \begin_layout Description
5404 function is the function you want LyX to perform.
5405 It is the same as the commands you'd use in the minibuffer.
5408 \begin_layout Description
5409 argument is an optional argument which is meaningful only to some functions
5411 \begin_inset Quotes eld
5415 \begin_inset Quotes erd
5418 LFUN will insert the argument as text at the cursor position).
5421 \begin_layout Standard
5422 The answer from LyX will arrive in the output pipe and be of the form
5439 \begin_layout Standard
5448 are just echoed from the command request, while
5452 is more or less useful information filled according to how the command
5453 execution worked out.
5454 Some commands, such as
5455 \begin_inset Quotes eld
5459 \begin_inset Quotes erd
5462 , will return information about the internal state of LyX, while other will
5463 return an empty data-response.
5464 This means that the command execution went fine.
5467 \begin_layout Standard
5468 In case of errors, the response from LyX will have this form
5485 \begin_layout Standard
5490 should contain an explanation of why the command failed.
5493 \begin_layout Standard
5497 \begin_layout LyX-Code
5498 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5499 \begin_inset Newline newline
5502 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5503 \begin_inset Newline newline
5506 read a <~/.lyxpipe.out
5507 \begin_inset Newline newline
5513 \begin_layout Section
5517 \begin_layout Standard
5518 LyX can notify clients of events going on asynchronously.
5519 Currently it will only do this if the user binds a key sequence with the
5521 \begin_inset Quotes eld
5525 \begin_inset Quotes erd
5529 The format of the string LyX sends is as follows:
5533 \begin_inset Flex Code
5536 \begin_layout Plain Layout
5547 \begin_layout Standard
5552 is the printed representation of the key sequence that was actually typed
5556 \begin_layout Standard
5557 This mechanism can be used to extend LyX's command set and implement macros.
5558 Bind some key sequence to
5559 \begin_inset Quotes eld
5563 \begin_inset Quotes erd
5567 Then start a client that listens on the output pipe, dispatches the command
5568 according to the sequence, and starts a function that may use LyX calls
5569 and LyX requests to issue a command or a series of commands to LyX.
5572 \begin_layout Section
5573 The simple LyX Server Protocol
5576 \begin_layout Standard
5577 LyX implements a simple protocol that can be used for session management.
5578 All messages are of the form
5591 \begin_layout Standard
5597 \begin_inset Quotes eld
5601 \begin_inset Quotes erd
5605 \begin_inset Quotes eld
5609 \begin_inset Quotes erd
5614 \begin_inset Quotes eld
5618 \begin_inset Quotes erd
5621 is received from a client, LyX will report back to inform the client that
5622 it's listening to it's messages, while
5623 \begin_inset Quotes eld
5627 \begin_inset Quotes erd
5630 sent from LyX will inform clients that LyX is closing.
5633 \begin_layout Section
5634 Reverse DVI/PDF search
5637 \begin_layout Standard
5638 Some DVI/PDF viewers
5642 \begin_layout Plain Layout
5643 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5644 Skim on Mac OSX and SumatraPDF on Windows.
5653 facility (also called
5658 This means that you can tell LyX to put the cursor to a specific line in
5659 the document by clicking at the respective position in the DVI/PDF output.
5660 To achieve this, the viewer must be able to communicate with LyX.
5661 This is done via the LyX server either by using the named pipe (
5665 ), or the UNIX domain socket (
5669 ) that LyX creates in its temporary directory (this is the way the
5670 \begin_inset Flex Code
5673 \begin_layout Plain Layout
5679 program communicates with LyX).
5680 In some cases, you need a helper script that mediates between the viewer
5681 and LyX, in others, the viewer can communicate with LyX directly.
5682 This depends on the selected viewer and on your operating system.
5683 The same applies to the way viewers need to be configured and the way the
5684 reverse search is actually performed.
5685 In what follows, we will thus describe how to setup reverse search for
5687 Before we turn to this, though, we will explain what needs to be done generally
5688 to enable reverse search in the DVI/PDF output.
5691 \begin_layout Subsection
5693 \begin_inset CommandInset label
5695 name "sub:rev-search"
5702 \begin_layout Standard
5703 In most cases LyX will do the work for you by enabling
5704 \begin_inset Flex MenuItem
5707 \begin_layout Plain Layout
5708 Document\SpecialChar \menuseparator
5709 Output\SpecialChar \menuseparator
5710 Synchronize with Output
5716 In such a case LyX will automatically insert the necessary SyncTeX macro
5717 (for PDF) or load the srcltx package (for DVI) respectively.
5718 This option can be easily reached also on
5719 \begin_inset Flex Code
5722 \begin_layout Plain Layout
5731 \begin_layout Standard
5732 If you need a different setting, you can select or input a custom macro
5733 from the drop down box just below
5734 \begin_inset Flex MenuItem
5737 \begin_layout Plain Layout
5738 Document\SpecialChar \menuseparator
5739 Settings\SpecialChar \menuseparator
5740 Output\SpecialChar \menuseparator
5741 Synchronize with Output
5749 \begin_layout Standard
5750 Please note that including the
5751 \begin_inset Flex Code
5754 \begin_layout Plain Layout
5761 \begin_inset Flex Code
5764 \begin_layout Plain Layout
5770 sometimes has an undesired impact on the typesetting.
5771 Thus, you should switch output synchronization off for the final typesetting
5773 \begin_inset Flex Code
5776 \begin_layout Plain Layout
5783 \begin_inset Flex Code
5786 \begin_layout Plain Layout
5795 \begin_layout Standard
5796 In case you need some more special settings that are not covered by the
5797 automatic settings, read the next section about how to set up output synchroniz
5799 If the automatic setup suits your needs, you can readily jump to section
5800 \begin_inset space ~
5804 \begin_inset CommandInset ref
5806 reference "sub:configuring-viewers"
5810 , where the necessary configuration steps in your viewer -- needed both
5811 with the automatic and the manual setup -- are described.
5814 \begin_layout Subsection
5818 \begin_layout Standard
5819 LaTeX provides several different methods for reverse search.
5820 Some are built-in in the
5821 \begin_inset Flex Code
5824 \begin_layout Plain Layout
5830 program, some are provided by external packages.
5831 Your choice depends on whether your LaTeX distribution already provides
5832 a given method (the built-in methods are rather new) and whether your viewer
5834 The available methods are described in the following.
5837 \begin_layout Subsubsection*
5838 Built-in DVI-search via src-specials (DVI only)
5841 \begin_layout Standard
5842 This method provides the DVI file with the necessary information for reverse
5844 It is available in LaTeX since quite some time (any somewhat recent LaTeX
5845 distribution should include it), and it works reliably.
5846 To enable it, change the
5847 \begin_inset Flex MenuItem
5850 \begin_layout Plain Layout
5855 \begin_layout Plain Layout
5868 \begin_inset Flex MenuItem
5871 \begin_layout Plain Layout
5876 \begin_layout Plain Layout
5883 eX (plain)->DraftDVI
5889 \begin_inset Flex MenuItem
5892 \begin_layout Plain Layout
5893 Preferences\SpecialChar \menuseparator
5894 File Handling\SpecialChar \menuseparator
5901 \begin_inset Flex Code
5904 \begin_layout Plain Layout
5905 latex -src-specials $$i
5911 If this doesn't work, check if your TeX engine needs different options
5912 (the syntax might differ in some distributions).
5915 \begin_layout Subsubsection*
5916 External Packages (PDFSync and scrltx)
5919 \begin_layout Standard
5928 provide reverse search facility for PDF output (via pdflatex) and DVI output,
5930 In order to enable it, load the packages in the LyX preamble:
5933 \begin_layout Itemize
5934 \begin_inset Flex Code
5937 \begin_layout Plain Layout
5945 for reverse PDF search,
5948 \begin_layout Itemize
5949 \begin_inset Flex Code
5952 \begin_layout Plain Layout
5955 usepackage[active]{srcltx}
5960 for reverse DVI search.
5963 \begin_layout Standard
5964 If you want to be able to perform both DVI and PDF reverse searches, you
5965 can also insert in the preamble the following lines
5968 \begin_layout LyX-Code
5972 \begin_inset Newline newline
5978 \begin_inset Newline newline
5984 \begin_inset Newline newline
5990 \begin_inset Newline newline
5995 usepackage[active]{srcltx}
5996 \begin_inset Newline newline
6004 \begin_layout Standard
6005 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6006 right package will be used.
6009 \begin_layout Standard
6010 Note that PDFSync might affect the output layout of your document.
6011 It is therefore advised to disable PDFsync for final documents.
6014 \begin_layout Subsubsection*
6015 Built-in reverse search via SyncTeX (DVI and PDF)
6018 \begin_layout Standard
6020 \begin_inset Flex Code
6023 \begin_layout Plain Layout
6029 have built-in support for both PDF and DVI reverse search.
6034 facility is basically the result of the integration of the PDFSync package
6035 to the pdftex program and its merge with the
6040 You need at least TeXLive 2008 or a recent MikTeX distribution in order
6042 Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
6043 already provide SyncTeX support.
6046 \begin_layout Standard
6047 To enable SyncTeX for DVI output, change the
6048 \begin_inset Flex MenuItem
6051 \begin_layout Plain Layout
6056 \begin_layout Plain Layout
6069 \begin_inset Flex MenuItem
6072 \begin_layout Plain Layout
6077 \begin_layout Plain Layout
6084 eX (plain) -> DraftDVI
6090 \begin_inset Flex MenuItem
6093 \begin_layout Plain Layout
6094 Preferences\SpecialChar \menuseparator
6095 File Handling\SpecialChar \menuseparator
6102 \begin_inset Flex Code
6105 \begin_layout Plain Layout
6106 latex -synctex=1 $$i
6111 , and for PDF output, change the
6112 \begin_inset Flex MenuItem
6115 \begin_layout Plain Layout
6120 \begin_layout Plain Layout
6127 eX (pdflatex) -> PDF (pdflatex)
6133 \begin_inset Flex Code
6136 \begin_layout Plain Layout
6137 pdflatex -synctex=1 $$i
6143 Check the documentation of your viewer whether the viewer needs to be configure
6144 d for the use with SyncTeX.
6148 \begin_layout Plain Layout
6150 \begin_inset Flex Code
6153 \begin_layout Plain Layout
6159 option enables gzip compression.
6160 If your viewer does not support it, you should instead use
6161 \begin_inset Flex Code
6164 \begin_layout Plain Layout
6178 \begin_layout Subsection
6179 Configuring and using specific viewers
6180 \begin_inset CommandInset label
6182 name "sub:configuring-viewers"
6189 \begin_layout Subsubsection*
6190 Xdvi (all platforms)
6193 \begin_layout Standard
6195 \begin_inset Flex Code
6198 \begin_layout Plain Layout
6204 , you don't need to do anything else for performing a reverse DVI search,
6205 as LyX already provides the necessary hooks for automatically using the
6207 \begin_inset Flex Code
6210 \begin_layout Plain Layout
6217 Just setup your document as described above (reverse search is triggered
6218 by Ctrl-click or Alt-click on Mac OSX, respectively).
6221 \begin_layout Standard
6222 However, if for whatever reason you want to use the named pipe instead of
6223 the socket for communicating with LyX, simply change the DVI viewer in
6225 \begin_inset Flex MenuItem
6228 \begin_layout Plain Layout
6229 Preferences\SpecialChar \menuseparator
6230 File Handling\SpecialChar \menuseparator
6240 \begin_layout Plain Layout
6241 On Mac OSX you have to use
6242 \begin_inset Flex Code
6245 \begin_layout Plain Layout
6246 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6257 \begin_inset Flex Code
6260 \begin_layout Plain Layout
6261 xdvi -editor 'lyxeditor.sh %f %l'
6267 \begin_inset Flex Code
6270 \begin_layout Plain Layout
6276 is a suitable script.
6277 For example, a minimal shell script is the following one:
6280 \begin_layout LyX-Code
6282 \begin_inset Newline newline
6285 LYXPIPE="/path/to/lyxpipe"
6286 \begin_inset Newline newline
6289 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6290 \begin_inset Newline newline
6293 echo "$COMMAND" > "${LYXPIPE}".in || exit
6294 \begin_inset Newline newline
6297 read < "${LYXPIPE}".out || exit
6300 \begin_layout Standard
6302 \begin_inset Flex Code
6305 \begin_layout Plain Layout
6315 \begin_layout Plain Layout
6322 XServer pipe path specified in
6323 \begin_inset Flex MenuItem
6326 \begin_layout Plain Layout
6327 Preferences\SpecialChar \menuseparator
6337 \begin_layout Plain Layout
6339 \begin_inset Flex Code
6342 \begin_layout Plain Layout
6348 folder of a source distribution you can find a
6349 \begin_inset Flex Code
6352 \begin_layout Plain Layout
6358 script which is able to locate the
6362 based on your preferences.
6370 \begin_layout Subsubsection*
6374 \begin_layout Standard
6376 \begin_inset Flex Code
6379 \begin_layout Plain Layout
6380 /Applications/MacDviX_Folder/calleditor.script
6385 , add the following lines:
6388 \begin_layout LyX-Code
6393 \begin_layout Plain Layout
6400 X.app/Contents/MacOS/lyxeditor "$2" $1
6401 \begin_inset Newline newline
6407 \begin_layout Standard
6408 Modify the lines accordingly if you install LyX somewhere else than in the
6409 Applications folder.
6412 \begin_layout Standard
6413 Reverse search is triggered by Alt-click (OPTION-click).
6416 \begin_layout Subsubsection*
6420 \begin_layout Standard
6422 \begin_inset Flex Code
6425 \begin_layout Plain Layout
6426 open -a Skim.app $$i
6431 to the viewer setting in
6432 \begin_inset Flex MenuItem
6435 \begin_layout Plain Layout
6436 Preferences\SpecialChar \menuseparator
6437 File Handling\SpecialChar \menuseparator
6438 File formats\SpecialChar \menuseparator
6445 \begin_inset Flex MenuItem
6448 \begin_layout Plain Layout
6449 Skim\SpecialChar \menuseparator
6450 Preferences\SpecialChar \menuseparator
6460 \begin_layout Plain Layout
6470 \begin_layout Standard
6471 Reverse search is triggered by COMMAND-SHIFT-click
6474 \begin_layout Subsubsection*
6478 \begin_layout Standard
6480 \begin_inset Flex MenuItem
6483 \begin_layout Plain Layout
6484 Settings\SpecialChar \menuseparator
6485 Configure Okular\SpecialChar \ldots{}
6486 \SpecialChar \menuseparator
6493 \begin_inset Quotes eld
6497 \begin_inset Quotes erd
6501 \begin_inset Flex Code
6504 \begin_layout Plain Layout
6513 \begin_layout Standard
6514 Reverse search is triggered by SHIFT-click.
6517 \begin_layout Subsubsection*
6521 \begin_layout Standard
6522 Launch yap, choose its
6523 \begin_inset Flex MenuItem
6526 \begin_layout Plain Layout
6527 View\SpecialChar \menuseparator
6534 \begin_inset Quotes eld
6538 \begin_inset Quotes erd
6543 \begin_inset Quotes eld
6546 New\SpecialChar \ldots{}
6548 \begin_inset Quotes erd
6551 button and, in the window that opens, enter
6552 \begin_inset Quotes eld
6556 \begin_inset Quotes erd
6559 (or any other name you like) in the
6560 \begin_inset Quotes eld
6564 \begin_inset Quotes erd
6568 Now click on the button labeled
6569 \begin_inset Quotes eld
6572 \SpecialChar \ldots{}
6574 \begin_inset Quotes erd
6577 to open a file dialog and navigate to the directory containing the batch
6579 \begin_inset Flex Code
6582 \begin_layout Plain Layout
6590 \begin_inset Flex Code
6593 \begin_layout Plain Layout
6599 and then specify the program arguments as
6600 \begin_inset Flex Code
6603 \begin_layout Plain Layout
6611 \begin_inset Flex Code
6614 \begin_layout Plain Layout
6620 wrapper is used for communicating with LyX through the
6627 \begin_layout LyX-Code
6629 \begin_inset Newline newline
6632 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
6641 \begin_inset Newline newline
6655 \begin_layout Standard
6656 Make sure that the LyXServer pipe path you specified in LyX is
6657 \begin_inset Flex Code
6660 \begin_layout Plain Layout
6674 , otherwise change the
6675 \begin_inset Flex Code
6678 \begin_layout Plain Layout
6684 wrapper accordingly.
6687 \begin_layout Standard
6688 In yap, reverse search is triggered by double-click.
6691 \begin_layout Subsubsection*
6692 SumatraPDF (Windows)
6695 \begin_layout Standard
6696 In order to use SumatraPDF for inverse search, enter
6697 \begin_inset Flex Code
6700 \begin_layout Plain Layout
6701 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6706 in the viewer setting in
6707 \begin_inset Flex MenuItem
6710 \begin_layout Plain Layout
6711 Preferences\SpecialChar \menuseparator
6712 File Handling\SpecialChar \menuseparator
6713 File formats\SpecialChar \menuseparator
6720 \begin_inset Flex Code
6723 \begin_layout Plain Layout
6729 is the previous wrapper.
6730 If SumatraPDF.exe is not in your command PATH, use its full file name.
6733 \begin_layout Standard
6734 Reverse search is triggered by double-click.
6737 \begin_layout Subsubsection*
6741 \begin_layout Standard
6742 First of all, make sure that yap is your default DVI viewer in the Windows
6743 environment, then launch it, choose its
6744 \begin_inset Flex MenuItem
6747 \begin_layout Plain Layout
6748 View\SpecialChar \menuseparator
6755 \begin_inset Quotes eld
6759 \begin_inset Quotes erd
6764 \begin_inset Quotes eld
6767 New\SpecialChar \ldots{}
6769 \begin_inset Quotes erd
6772 button and, in the window that opens, enter
6773 \begin_inset Quotes eld
6777 \begin_inset Quotes erd
6780 (or any other name you like) in the
6781 \begin_inset Quotes eld
6785 \begin_inset Quotes erd
6789 Now click on the button labeled
6790 \begin_inset Quotes eld
6793 \SpecialChar \ldots{}
6795 \begin_inset Quotes erd
6798 to open a file dialog and navigate to the directory containing the
6799 \begin_inset Flex Code
6802 \begin_layout Plain Layout
6808 program (which is installed by default on Cygwin along with the LyX executable).
6810 \begin_inset Flex Code
6813 \begin_layout Plain Layout
6819 and then specify the program arguments as
6820 \begin_inset Flex Code
6823 \begin_layout Plain Layout
6830 In this way, you will be using the
6834 for communicating with LyX.
6835 If, for whatever reason, you want to use the
6840 \begin_inset Flex Code
6843 \begin_layout Plain Layout
6849 option and be sure to specify the LyXServer pipe path in the LyX preferences.
6852 \begin_layout Standard
6853 In yap, reverse search is triggered by double-click.
6856 \begin_layout Subsubsection*
6860 \begin_layout Standard
6861 In order to use SumatraPDF for inverse search, enter
6862 \begin_inset Flex Code
6865 \begin_layout Plain Layout
6866 SumatraPDF -inverse-search "lyxeditor -g %f %l"
6871 in the viewer setting in
6872 \begin_inset Flex MenuItem
6875 \begin_layout Plain Layout
6876 Preferences\SpecialChar \menuseparator
6877 File Handling\SpecialChar \menuseparator
6878 File formats\SpecialChar \menuseparator
6885 If SumatraPDF.exe is not in your command PATH, use its full posix path.
6887 \begin_inset Flex Code
6890 \begin_layout Plain Layout
6896 enables communication via the
6902 \begin_inset Flex Code
6905 \begin_layout Plain Layout
6911 option if you want to use the
6915 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6918 \begin_layout Standard
6919 Reverse search is triggered by double-click.
6922 \begin_layout Section
6926 \begin_layout Standard
6927 Forward search is, as the name implies, in a sense the
6928 \begin_inset Quotes eld
6932 \begin_inset Quotes erd
6936 It allows you to let the viewer jump to a given position from within LyX.
6937 If forward search is set up (as described in what follows), you can put
6938 the cursor anywhere in your LyX document, and hit
6939 \begin_inset Flex MenuItem
6942 \begin_layout Plain Layout
6943 Navigate\SpecialChar \menuseparator
6950 \begin_inset Flex MenuItem
6953 \begin_layout Plain Layout
6959 in the context menu via right mouse click), and then the viewer will jump
6960 to that position as well.
6961 This implies, of course, that your viewer supports this function.
6964 \begin_layout Standard
6965 To make forward search possible, you first need to provide the generated
6966 output PDF/DVI file with additional information about the TeX sources.
6967 This can be done via the methods described in the section
6968 \begin_inset CommandInset ref
6970 reference "sub:rev-search"
6977 \begin_layout Standard
6978 Additionally, you need to configure LyX for using your viewers in
6979 \begin_inset Flex MenuItem
6982 \begin_layout Plain Layout
6983 Tools\SpecialChar \menuseparator
6984 Preferences\SpecialChar \menuseparator
6985 Output\SpecialChar \menuseparator
6992 We provide a range of tested configurations for some viewers, which you
6993 can select from the drop down list.
6994 If none of these configurations suits you, you have to find out and enter
6995 a suitable configuration yourself.
6996 The definition syntax uses the following placeholders:
6999 \begin_layout Itemize
7001 \begin_inset Flex Code
7004 \begin_layout Plain Layout
7013 \begin_layout Itemize
7015 \begin_inset Flex Code
7018 \begin_layout Plain Layout
7024 : name of the (temporary) exported .tex file
7027 \begin_layout Itemize
7029 \begin_inset Flex Code
7032 \begin_layout Plain Layout
7038 : name of the exported output file (either dvi or pdf, depending on which
7039 one exists in the temporary directory)
7042 \begin_layout Standard
7043 Note that only some of the viewers provide full forward search functionality,
7044 among them yap, xdvi, okular and Sumatra PDF
7048 \begin_layout Plain Layout
7049 For Sumatra CMCDDE is needed --- downloadable from http://www.istri.fr/zip/CMCDDE.z
7056 While many of the widespread PDF viewers (most notably Adobe Reader) do
7057 not support forward search at all, some other viewers -- e.
7058 \begin_inset space \thinspace{}
7062 evince and xpdf -- allow at least to reload the document and jump to a
7063 specific page of the file, so you can at least navigate
7064 \begin_inset Quotes eld
7068 \begin_inset Quotes erd
7072 These latter functionality is provided by an external call of synctex (see
7073 the predefined example configurations).
7077 \begin_layout Standard
7078 Forward search works both with DVI and PDF output.
7079 LyX simply checks which preview format you have used before (i.
7080 \begin_inset space \thinspace{}
7083 e., which format is already there in the temporary directory) and chooses
7084 the appropriate configuration for the respective format.
7087 \begin_layout Chapter
7088 Special Document Classes
7091 \begin_layout Section
7095 \begin_layout Standard
7101 \begin_layout Subsection
7105 \begin_layout Standard
7106 This section describes how LyX can be used to write articles for submission
7107 to the scientific journal
7109 Astronomy and Astrophysics
7111 (www.edpsciences.fr/aa/
7112 \begin_inset Flex URL
7115 \begin_layout Plain Layout
7117 http://www.edpsciences.fr/aa/
7122 ) using Version 5.01 of the document class
7127 This package can be downloaded from the ftp site
7130 \begin_layout Standard
7131 \begin_inset VSpace medskip
7137 \begin_layout Standard
7139 \begin_inset Flex URL
7142 \begin_layout Plain Layout
7144 ftp://ftp.edpsciences.org/pub/aa/readme.html
7152 \begin_layout Standard
7153 \begin_inset VSpace medskip
7159 \begin_layout Standard
7160 A manual comes together with that package, and this text is not meant to
7161 replace the original manual but is merely a short guide in how to realize
7162 the correct form of your paper.
7166 \begin_layout Standard
7167 Please note that the publisher of the journal was changed from Springer
7168 to EDP Sciences starting January 1, 2001.
7169 That change involved also some slight changes to the style files, namely
7170 the removal of the thesaurus command.
7171 The LyX class aa supports the newest version of these style files, V 5.01.
7172 If you have an older version installed, please upgrade.
7173 For compatibility, the old (version 4) layout has been kept as
7178 Please refer to the comments in
7180 LyXDir/layouts/aapaper.layout
7185 \begin_layout Subsection
7189 \begin_layout Standard
7190 It is recommended you start from the example template distributed with LyX.
7191 If you are not using a template, note the following settings:
7194 \begin_layout Itemize
7201 Document\SpecialChar \menuseparator
7204 dialog (OK, that one was obvious).
7207 \begin_layout Itemize
7208 Don't change the option
7211 \begin_inset space ~
7221 The whole layout is done by the macros, you shouldn't change anything.
7224 \begin_layout Subsection
7228 \begin_layout Standard
7229 First thing to enter is the header information.
7230 It consists of seven entries, of which some are optional.
7234 \begin_layout Itemize
7242 \begin_layout Itemize
7250 \begin_layout Itemize
7258 \begin_layout Itemize
7266 \begin_layout Itemize
7271 : [optional] if more than one author: whom to contact for offprint requests.
7274 \begin_layout Itemize
7279 : [optional] mail address for contacts.
7282 \begin_layout Itemize
7290 Received: <date>; Accepted <date>
7293 \begin_layout Standard
7294 There is no need to issue the
7300 command, this is done automatically by LyX when the header is finished.
7301 Although the order of the single header entries doesn't matter it is advised
7302 to keep the above sequence, just to get the best optics and meets the layout
7303 of the real document.
7306 \begin_layout Standard
7307 If you want to place footnotes in the header block, e.
7308 \begin_inset space \thinspace{}
7312 \begin_inset space \space{}
7315 to state your present address, just use the standard footnote via the menu
7318 Insert\SpecialChar \menuseparator
7322 LyX will automagically use the term
7331 \begin_layout Standard
7332 In addition to these topics, the macros use three additional LaTeX commands
7333 that have no counterpart in LyX:
7336 \begin_layout Itemize
7343 to separate different names for more than one author and institute, respectivel
7347 \begin_layout Itemize
7354 to mark corresponding author/institute pairs.
7355 The institutes are numbered sequentially as they appear in the
7359 field, so you have to put a marker to each author.
7362 \begin_layout Itemize
7369 to supply an email address for fast contact.
7372 \begin_layout Standard
7373 In all cases, the appropriate command has to be entered in LyX and marked
7379 \begin_layout Subsection
7383 \begin_layout Standard
7384 The abstract should immediately follow the header block.
7385 With version 5 the abstract environment was changed to a command, and there
7386 is now a resctriction to only one paragraph.
7387 In addition, it should contain an entry with the keywords.
7388 This is not yet implemented for LyX, therefore you have to enter the LaTeX
7395 by hand and mark it as LaTeX code.
7396 Refer to the example paper.
7399 \begin_layout Subsection
7400 Supported environments
7403 \begin_layout Standard
7404 The A&A paper layout supports the following environments for structuring
7408 \begin_layout Itemize
7414 \begin_layout Itemize
7420 \begin_layout Itemize
7426 \begin_layout Itemize
7432 \begin_layout Itemize
7438 \begin_layout Itemize
7444 \begin_layout Itemize
7450 \begin_layout Itemize
7456 \begin_layout Itemize
7462 \begin_layout Itemize
7468 \begin_layout Itemize
7474 \begin_layout Itemize
7480 \begin_layout Subsection
7481 Commands not supported by LyX
7484 \begin_layout Standard
7485 Some commands are not yet supported by the
7490 Some have already been mentioned.
7491 For the sake of completeness, they are listed all together here:
7494 \begin_layout Itemize
7502 \begin_layout Itemize
7510 \begin_layout Itemize
7518 \begin_layout Itemize
7526 \begin_layout Itemize
7534 \begin_layout Itemize
7542 \begin_layout Itemize
7550 \begin_layout Itemize
7558 \begin_layout Standard
7559 If you want to use any of these commands, you have to enter them yourself.
7562 Do not forget to mark them as LaTeX code!
7565 \begin_layout Subsection
7566 Figure and Table Floats
7569 \begin_layout Standard
7570 LyX provides support for the necessary float environments
7572 figure, figure*, table
7578 , therefore we won't tell much about it here.
7582 \begin_inset space ~
7588 Just remember that tables should be left-aligned.
7589 For that, select the table and change the alignment in
7591 Edit\SpecialChar \menuseparator
7593 \begin_inset space ~
7599 \begin_layout Standard
7600 There is only one special thing: the figures with caption besides the figure.
7601 To create such a figure, you have to do the following:
7604 \begin_layout Enumerate
7605 Create a wide figure float:
7607 Insert\SpecialChar \menuseparator
7608 Float\SpecialChar \menuseparator
7611 , then right click in the figure and select
7617 \begin_inset space ~
7625 \begin_layout Enumerate
7626 Enter your caption text.
7629 \begin_layout Enumerate
7634 to move the cursor above the caption.
7637 \begin_layout Enumerate
7641 \begin_layout Enumerate
7642 Position the cursor behind the figure and insert a horizontal fill:
7644 Insert\SpecialChar \menuseparator
7646 \begin_inset space ~
7649 Character\SpecialChar \menuseparator
7651 \begin_inset space ~
7659 \begin_layout Enumerate
7660 Switch to LaTeX mode:
7663 \begin_inset space ~
7671 \begin_layout Enumerate
7681 Do not close the brace!
7684 \begin_layout Enumerate
7685 Position the cursor behind the caption text, switch to LaTeX mode and insert
7689 \begin_inset space ~
7701 \begin_layout Standard
7702 Also, refer to the figures in the example paper.
7705 \begin_layout Subsection
7709 \begin_layout Standard
7710 For submission, the paper has to be formated in a special double-spacing
7712 For this purpose, you have to give the option
7716 to the documentclass.
7717 This must be done using the extra class options field in the
7719 Document\SpecialChar \menuseparator
7723 Just enter the string
7730 \begin_layout Subsection
7734 \begin_layout Standard
7739 directory contains an example paper written with LyX.
7740 It is the example paper from the original macro package, translated to
7742 Use it for inspiration, and compare the original LaTeX code with LyX way
7746 \begin_layout Section
7750 \begin_layout Standard
7756 \begin_layout Subsection
7760 \begin_layout Standard
7761 AASTeX is a set of macros produced by the American Astronomical Society
7762 to facilitate electronic manuscript submission to the three journals they
7763 publish: the Astrophysical Journal (including the Letters and Supplement),
7764 the Astronomical Journal, and the Publications of the Astronomical Society
7766 LyX has proven to be an excellent tool for generating these documents,
7767 especially given its equation, citation, and figure handling capabilities.
7768 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7769 is the version described here, or higher.
7770 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7771 incompatible with LyX.
7772 The AASTeX package may be downloaded from the AASTeX Web site
7775 \begin_layout Standard
7776 \begin_inset VSpace medskip
7782 \begin_layout Standard
7784 \begin_inset Flex URL
7787 \begin_layout Plain Layout
7789 http://www.journals.uchicago.edu/AAS/AASTeX
7797 \begin_layout Standard
7798 \begin_inset VSpace medskip
7804 \begin_layout Standard
7805 A complete user guide is contained in that package and you should familiarize
7806 yourself with it thoroughly before embarking on writing a paper in LyX.
7807 LyX will not reduce the need to figure out all the AASTeX commands, it
7808 will only reduce the drudgery of typing everything in.
7809 It is your responsibility to ensure that the final exported LaTeX document
7810 conforms completely to the requirements of the journal to which you are
7811 submitting your paper.
7814 \begin_layout Subsection
7815 Starting a New Paper
7818 \begin_layout Standard
7819 I strongly suggest that you start with the AASTeX template file.
7822 File\SpecialChar \menuseparator
7829 , enter the new file name, then choose the
7834 This will show the most common fields found in a manuscript.
7835 Simply overwrite the existing text (including the brackets,
7839 ) with the correct information.
7840 Many of the AASTeX commands and environments can be implemented directly
7841 in LyX, but some cannot: most noticeably
7853 , which should stick out like a sore thumb if you actually just opened the
7855 For commands such as these, the LaTeX code must be entered directly and
7857 Such commands are referred to as TeX code, or Evil Red Text.
7858 I tried to minimize the amount of TeX code needed in an AASTeX document,
7859 but there is still a bit more required than any of us would like.
7862 \begin_layout Subsection
7863 Finishing Your Paper
7866 \begin_layout Standard
7867 When the paper is finished to your satisfaction and previews/prints correctly,
7869 \begin_inset Quotes eld
7873 \begin_inset Quotes erd
7876 actions which need to be done before you submit it to the journals.
7880 \begin_layout Enumerate
7881 Export your paper as a LaTeX file (
7883 File\SpecialChar \menuseparator
7884 Export\SpecialChar \menuseparator
7891 \begin_layout Enumerate
7896 file with your favorite text editor
7900 \begin_layout Enumerate
7901 remove the comment lines before the
7910 \begin_layout Enumerate
7915 usepackage...{fontenc}
7917 line if it appears (usually just after
7932 \begin_layout Enumerate
7933 remove everything between (and including) the
7945 commands, except for any commands you specifically put into the LaTeX preamble
7946 (which should appear immediately after the
7947 \begin_inset Quotes eld
7950 User specified LaTeX commands
7951 \begin_inset Quotes erd
7962 \begin_layout Enumerate
7963 Run the resulting file through LaTeX to make sure it still processes correctly.
7966 \begin_layout Enumerate
7967 Reread the journal requirements to make sure your filenames and formats
7971 \begin_layout Enumerate
7975 \begin_layout Subsection
7976 Comments On Specific Commands
7979 \begin_layout Standard
7980 I will not describe the detailed usage of the individual AASTeX commands:
7981 the AASTeX User Guide (
7985 ) gives a good description of each.
7986 Thus it's probably easiest for me to go down the list as found in the guide
7987 and offer comments where necessary.
7988 So let's begin \SpecialChar \ldots{}
7992 \begin_layout Subsubsection
7993 Things that work as expected
7996 \begin_layout Standard
7997 Because they work as you might expect, I simply list them and the section
8098 begin{thebibliography}
8106 (2.13.2), all the cite commands and their variations (2.13.2), the generic
8107 graphicx figure commands (2.14.1),
8131 (2.15.4, amongst other places),
8158 \begin_layout Standard
8159 The following style options also work correctly:
8180 Simply put them in the
8186 Layout\SpecialChar \menuseparator
8192 \begin_layout Subsubsection
8193 Things that work, but require more comment
8196 \begin_layout Standard
8197 The following items work, but require a little more discussion:
8200 \begin_layout Itemize
8201 These items are reserved for use by the journal editors, but you can put
8202 them into the LaTeX preamble if you feel compelled to do so:
8235 \begin_layout Itemize
8236 These items may be placed in the LaTeX preamble, and are included as blanks
8237 in the template file:
8258 \begin_layout Itemize
8265 (2.3) – can only be used
8266 \begin_inset Quotes eld
8270 \begin_inset Quotes erd
8273 , not in the middle of a paragraph.
8274 Use TeX code if you need to embed it.
8277 \begin_layout Itemize
8284 (2.3) – will have extra {} after it.
8285 This should not cause an error.
8288 \begin_layout Itemize
8295 (2.6) – can only be used
8296 \begin_inset Quotes eld
8300 \begin_inset Quotes erd
8303 , not in the middle of a paragraph.
8304 Use TeX code if you need to embed it.
8307 \begin_layout Itemize
8314 (2.8) – can't insert a cross-reference tag, you must type the tag name by
8318 \begin_layout Itemize
8332 \begin_layout Itemize
8339 (2.9) – will have extra {} after it.
8340 This should not cause an error.
8343 \begin_layout Itemize
8350 (2.11) – will have extra {} after it.
8351 This should not cause an error.
8354 \begin_layout Itemize
8361 (2.14.2) – you can insert an optional filename argument by placing the cursor
8362 at the beginning of the text and selecting
8364 Insert\SpecialChar \menuseparator
8369 \begin_inset Quotes eld
8373 \begin_inset Quotes erd
8376 inserts an optional argument of the type needed by
8383 Hopefully it will be renamed someday.
8386 \begin_layout Itemize
8399 for the catalog ID optional parameter
8402 \begin_layout Itemize
8415 for the catalog ID optional parameter
8418 \begin_layout Subsubsection
8419 Things not implemented, use TeX code
8422 \begin_layout Standard
8445 setcounter{equation}
8447 (2.12), Journal name abbreviations (2.13.4),
8483 (2.15.4, insert it as the first element in the lefthand cell after where
8485 Don't use any of LyX's rules in the table),
8497 (2.15.5), much of Misc (2.17, except
8548 \begin_layout Subsubsection
8549 Things that cannot be implemented
8552 \begin_layout Standard
8553 \SpecialChar \ldots{}
8554 at least in any meaningful sort of way, so I suggest ignoring them.
8555 They are the references environment (2.13.3), and the deluxetable environment
8557 If you really, really need to use deluxetable, I suggest editing it in
8558 a separate file with a text editor, then using
8560 Insert\SpecialChar \menuseparator
8562 \begin_inset space ~
8567 to include it in your LyX document.
8572 file to see an example of this.
8575 \begin_layout Subsection
8576 FAQs, Tips, Tricks, and Other Ruminations
8579 \begin_layout Subsubsection
8580 Getting LyX and AASTeX to cooperate
8583 \begin_layout Standard
8584 It can be a bit tricky to get LyX to recognize a new layout and document
8586 When all else fails, do this:
8589 \begin_layout Enumerate
8590 Make certain that LaTeX can find AASTeX.
8591 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8592 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
8599 \begin_layout Enumerate
8611 \begin_layout Enumerate
8614 Tools\SpecialChar \menuseparator
8617 in LyX, then restart LyX.
8620 \begin_layout Enumerate
8621 Open a regular new file, not from a template.
8622 Does AASTeX appear in the class list in
8624 Document\SpecialChar \menuseparator
8630 \begin_layout Standard
8631 If you get a warning from an existing AASTeX document about not being able
8632 to find the AASTeX layout or a message about
8633 \begin_inset Quotes eld
8636 You should not mix title layouts with normal ones
8637 \begin_inset Quotes erd
8640 , things haven't been installed correctly.
8643 \begin_layout Subsubsection
8644 LaTeX error processing a table
8647 \begin_layout Standard
8648 LyX, by default, attempts to center the table caption/title.
8649 This seems to produce a bad interaction in AASTeX so you should click somewhere
8650 in the caption/title, then select
8652 Edit\SpecialChar \menuseparator
8654 \begin_inset space ~
8668 This took care of it for me.
8671 \begin_layout Subsubsection
8675 \begin_layout Standard
8676 A couple of things: 1) I have noticed some funny spacing in the reference
8677 entries in the text.
8678 When you enter the bibliography item data, make sure their is
8682 space between the last author and the parenthesis setting off the year;
8686 \begin_inset space \thinspace{}
8690 \begin_inset space \space{}
8704 2) Entering the references at all is not obvious.
8705 The easiest thing is to start typing your first reference at the end of
8706 the document, then mark it as type
8711 That will put a small gray box in front of what you just typed.
8712 Click on the box to fill in the rest of the information.
8713 For new references, go to the end of an existing reference and press return.
8714 That will create a new line with its own box, etc.
8717 \begin_layout Subsubsection
8721 \begin_layout Standard
8722 Even though AASTeX provides its own figure commands (
8728 , for example), I much prefer LaTeX's standard figure commands (with the
8737 \begin_inset space ~
8740 commands as TeX code into a Figure Float box if you desire, but I never
8741 have much luck getting the layout right.
8742 With the standard graphics, LyX will insert a
8746 usepackage{graphicx}
8748 command into the LaTeX preamble and handle the figures in the standard
8749 LaTeX2e way, interspersing the figures in the text.
8750 I believe ApJ accepts figures exactly this way now; AJ might still use
8752 \begin_inset Quotes eld
8755 stack everything at the end
8756 \begin_inset Quotes erd
8762 \begin_layout Subsubsection
8763 Things I could have done, but didn't
8766 \begin_layout Standard
8768 \begin_inset Quotes eld
8772 \begin_inset Quotes erd
8775 things I could have implemented, but chose not to.
8776 For instance, I saw no point in double-spacing the text in the LyX window,
8777 even though it is double-spaced in the paper manuscript.
8778 Also, I chose not to make separate layouts for the preprint and preprint2
8780 Since I assume you will spend most of your time in the plain manuscript
8781 mode anyway, I decided not to chew up more disk space with this.
8785 \begin_layout Subsection
8789 \begin_layout Standard
8790 Your mileage may vary.
8791 I've now had papers published by both ApJ and AJ that have had 98% of the
8792 effort done in LyX; the last 2% was the LaTeX post-processing and a few
8794 I have had no trouble with the submission process, and I'm sure the journals
8795 were never aware that there might be a difference.
8796 So, go forth and publish!
8799 \begin_layout Section
8803 \begin_layout Standard
8813 \begin_layout Standard
8814 \begin_inset VSpace bigskip
8820 \begin_layout Standard
8822 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8823 papers to be submitted to American Mathematical Society publications.
8824 The layouts are not tailored to a specific journal, but easily can be.
8825 You should refer to the AMS documentation for specific instructions for
8826 each journal (usually it will entail only changing a single line in the
8828 That documentation is available on the Web at
8829 \begin_inset Flex URL
8832 \begin_layout Plain Layout
8840 \begin_inset Flex URL
8843 \begin_layout Plain Layout
8845 ftp://ftp.ams.org/pub/tex/amslatex/
8851 These layouts are appropriate, and useful, for any mathematical writing.
8855 \begin_layout Standard
8856 There are two basic AMS LaTeX layouts:
8859 \begin_layout Itemize
8860 amsart: The standard AMS article format.
8863 \begin_layout Itemize
8864 amsbook: the standard AMS book (really, monograph) format.
8868 \begin_layout Standard
8869 The layouts themselves contain only the minimum necessary to use the AMS
8871 They do not, in particular, contain any of the `theorem' environments used
8872 for setting theorems, lemmas, and the like.
8873 These are contained, instead, in the
8874 \begin_inset Flex Code
8877 \begin_layout Plain Layout
8883 module, which is loaded by default when when you select one of the AMS
8885 (It can also be used with other classes and can be removed, if you would
8886 rather use something else.) Less commonly used environments are in the
8887 \begin_inset Flex Code
8890 \begin_layout Plain Layout
8891 Theorems (AMS-Extended)
8896 module, which must be loaded manually.
8899 \begin_layout Standard
8900 By default, theorems and the like are numbered consecutively throughout
8901 the document, but this may be modified by loading the module
8902 \begin_inset Flex Code
8905 \begin_layout Plain Layout
8906 Theorems (Order by Section)
8911 or, if you are using
8912 \begin_inset Flex Code
8915 \begin_layout Plain Layout
8922 \begin_inset Flex Code
8925 \begin_layout Plain Layout
8926 Theorems (Order by Chapter)
8932 These will number the results as
8933 \begin_inset Formula $n.m$
8936 , where the first number refers to the section (or chapter) and the second
8937 refers to the total number of results so far in that section (or chapter).
8938 Many environments are also available unnumbered.
8939 These are indicated by an asterisk at the end.
8940 If you happen to want
8944 unnumbered results, the module
8945 \begin_inset Flex Code
8948 \begin_layout Plain Layout
8954 provides that option.
8957 \begin_layout Standard
8958 Note that these modules do not
8962 to be used with the AMS classes.
8963 It is perfectly possible to use the
8964 \begin_inset Flex Code
8967 \begin_layout Plain Layout
8973 module, and the others mentioned, with other classes, such as
8974 \begin_inset Flex Code
8977 \begin_layout Plain Layout
8984 \begin_inset Flex Code
8987 \begin_layout Plain Layout
8994 \begin_inset Flex Code
8997 \begin_layout Plain Layout
9006 \begin_layout Subsection
9007 What these layouts provide
9010 \begin_layout Standard
9011 There is a long list of included environments provided by these layouts.
9012 In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9013 variety of `theorem' environments.
9014 However, the AMS recommends the environments that are available in LyX.
9018 \begin_layout Standard
9019 The following environments—as well as the standard environments, such as
9021 \begin_inset Flex Noun
9024 \begin_layout Plain Layout
9031 \begin_inset Flex Noun
9034 \begin_layout Plain Layout
9041 \begin_inset Flex Noun
9044 \begin_layout Plain Layout
9051 \begin_inset Flex Noun
9054 \begin_layout Plain Layout
9061 \begin_inset Flex Noun
9064 \begin_layout Plain Layout
9071 \begin_inset Flex Code
9074 \begin_layout Plain Layout
9081 \begin_inset Flex Code
9084 \begin_layout Plain Layout
9093 \begin_layout Description
9094 Address This should be the author's permanent address.
9097 \begin_layout Description
9099 \begin_inset space ~
9102 Address This should be the author's temporary address at the time of submission,
9103 if different from the Address.
9106 \begin_layout Description
9107 Email Author's e-mail address
9110 \begin_layout Description
9111 URL Author's Web address, if desired.
9114 \begin_layout Description
9115 Keywords Key words or phrases used to identify specific topics discussed
9119 \begin_layout Description
9120 Subjectclass These refer to the AMS Subject Classifications, published and
9123 Mathematical Reviews
9126 These are also available online at the AMS cites listed above.
9129 \begin_layout Description
9133 \begin_layout Description
9137 \begin_layout Description
9141 \begin_layout Standard
9142 The following environments are provided by both the
9143 \begin_inset Flex Code
9146 \begin_layout Plain Layout
9153 \begin_inset Flex Code
9156 \begin_layout Plain Layout
9162 modules, in the latter case in both starred (unnumbered) and unstarred
9163 (numbered) versions.
9164 These same environments are provided only in the starred versions by the
9166 \begin_inset Flex Code
9169 \begin_layout Plain Layout
9178 \begin_layout Theorem
9179 This is typically used for the statements of major results.
9183 \begin_layout Corollary*
9184 This is used for statements which follow fairly directly from previous statement
9186 Again, these can be major results.
9191 These are smaller results needed to prove other statements.
9194 \begin_layout Proposition
9195 These are less major results which (hopefully) add to the general theory
9199 \begin_layout Conjecture
9200 These are statements provided without justification, which the author does
9201 not know how to prove, but which seem to be true (to the author, at least).
9204 \begin_layout Definition*
9205 Guess what this is for.
9206 The font is different for this environment than for the previous ones.
9210 \begin_layout Example*
9211 Used for examples illustrating proven results.
9214 \begin_layout Problem
9215 It's not really known what this is for.
9216 You should figure it out.
9219 \begin_layout Exercise*
9220 Write a description for this one.
9223 \begin_layout Remark
9224 This environment is also a type of theorem, usually a lesser sort of observation.
9227 \begin_layout Claim*
9228 Often used in the course of giving a proof of a larger result.
9232 Generally, these are used to break up long arguments, using specific instances
9238 The numbering scheme for cases is on its own, not together with other numbered
9244 At the end of this environment, a QED symbol (usually a square, but it can
9245 vary with different styles) is placed.
9246 If you want to have other environments within this one—for example, Case
9247 environments—and have the QED symbol appear only after them, then the other
9248 environments need to be nested within the proof environment.
9251 Nesting Environments
9257 for information on nesting.
9260 \begin_layout Standard
9261 And these environments are provided by
9262 \begin_inset Flex Code
9265 \begin_layout Plain Layout
9266 Theorems (AMS-Extended)
9274 \begin_layout Criterion*
9275 A required condition.
9278 \begin_layout Algorithm*
9279 A general procedure to be used.
9282 \begin_layout Axiom*
9283 This is a property or statement taken as true within the system being discussed.
9286 \begin_layout Condition*
9287 Sometimes used to state a condition assumed within the present context of
9292 Similar to a Remark.
9295 \begin_layout Notation*
9296 Used for the explanation of, yes, notation.
9299 \begin_layout Summary
9300 Do we really need to tell you?
9303 \begin_layout Acknowledgement*
9307 \begin_layout Conclusion*
9308 Sometimes used at the end of a long train of argument.
9312 Used in a way similar to Proposition, though perhaps lower on the scale.
9315 \begin_layout Standard
9316 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9318 They need to be available on your system in order to use these environments.
9321 \begin_layout Section
9329 \begin_layout Standard
9335 \begin_layout Subsection
9339 \begin_layout Standard
9340 These are the layout files for some of the journals of the American Geophysical
9342 It is assumed that you have both the AGU's own class files and AGUplus
9343 installed (everything to be found at
9344 \begin_inset Flex URL
9347 \begin_layout Plain Layout
9349 ftp://ftp.agu.org/journals/latex/journals
9357 \begin_layout Subsection
9361 \begin_layout Standard
9371 They are still called this in the LyX GUI, though their LaTeX equivalents
9372 in the AGU classes are
9383 \begin_layout Standard
9384 Newly defined styles are
9421 These are mostly manuscript attributes and defined in the AGU class documentati
9425 \begin_layout Standard
9426 I suspect this is still badly incomplete.
9429 \begin_layout Subsection
9433 \begin_layout Standard
9450 \begin_layout Subsection
9454 \begin_layout Itemize
9457 Journal of Geophysical Research
9466 \begin_layout Standard
9467 Add your own, it isn't so hard! Look at the
9478 \begin_layout Subsection
9479 Bugs and things to remember
9482 \begin_layout Standard
9483 In order to use the new layouts, you must remember to do the following for
9487 \begin_layout Enumerate
9493 This can be done in the
9495 Layout\SpecialChar \menuseparator
9500 Document\SpecialChar \menuseparator
9504 (AGU articles are always in English, right? So
9511 \begin_layout Enumerate
9521 (Yes, this is a bug.)
9524 \begin_layout Enumerate
9525 Make sure you use the
9529 bibliography style, by entering
9533 into the second field of the BibTeX inset.
9534 None of the standard styles will do.
9537 \begin_layout Section
9541 \begin_layout Standard
9547 \begin_layout Subsection
9551 \begin_layout Standard
9552 Broadway is for writing plays.
9553 The format is more decorative than Hollywood, and much less standardized.
9554 This format should be suitable for workshops.
9557 \begin_layout Subsection
9561 \begin_layout Standard
9562 The same as in Hollywood.
9565 \begin_layout Subsection
9569 \begin_layout Standard
9574 names as labels then cross-reference the label to insert the name.
9575 The cross-reference dialog will show the current cast of characters.
9578 \begin_layout Subsection
9579 Paper size and Margins
9582 \begin_layout Standard
9583 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9586 \begin_layout Subsection
9590 \begin_layout Standard
9591 The following environments are available.
9592 You can use broadway.bind to get the bind keys shown at the right.
9595 \begin_layout Itemize
9599 \begin_inset Newline newline
9604 You should not have to use this, but it is here for anything that does not
9608 \begin_layout Itemize
9612 \begin_inset space \hfill{}
9616 \begin_inset Newline newline
9621 Used to describe stage setting and the action.
9622 First use of speaker names in all CAPs.
9625 \begin_layout Itemize
9629 \begin_inset space \hfill{}
9633 \begin_inset Newline newline
9638 Automatically numbered.
9639 On screen it will be arabic, but will print as Roman.
9642 \begin_layout Itemize
9646 \begin_inset space \hfill{}
9650 \begin_inset Newline newline
9660 It is just centered text.
9663 \begin_layout Itemize
9667 \begin_inset space \hfill{}
9671 \begin_inset Newline newline
9676 Not automatically numbered.
9677 You supply the number.
9678 This is because I couldn't figure out how.
9681 \begin_layout Itemize
9685 \begin_inset space \hfill{}
9689 \begin_inset Newline newline
9694 A special case of Narrative to describe the setting and action as the curtain
9698 \begin_layout Itemize
9702 \begin_inset space \hfill{}
9706 \begin_inset Newline newline
9711 The speaker's (actor's) title, centered in all CAPS.
9714 \begin_layout Itemize
9718 \begin_inset space \hfill{}
9722 \begin_inset Newline newline
9727 Instructions to the speaker.
9728 The parentheses are automatically inserted.
9729 The ( will appear on screen, but both will be in the printed play.
9730 This environment is only used within
9737 \begin_layout Itemize
9741 \begin_inset space \hfill{}
9745 \begin_inset Newline newline
9750 What the Speaker says.
9753 \begin_layout Itemize
9757 \begin_inset space \hfill{}
9761 \begin_inset Newline newline
9766 The curtain comes down.
9769 \begin_layout Itemize
9773 \begin_inset space \hfill{}
9779 \begin_layout Itemize
9783 \begin_inset space \hfill{}
9789 \begin_layout Itemize
9793 \begin_inset space \hfill{}
9799 \begin_layout Standard
9803 \begin_layout Section
9807 \begin_layout Standard
9812 can be used to type letters according to German conventions.
9813 A template file is included in
9815 .../lyx/share/templates
9817 for you to use as a starting point.
9820 \begin_layout Section
9828 \begin_layout Standard
9834 \begin_layout Subsection
9838 \begin_layout Standard
9839 This is the layout file for the European Geophysical Society journals.
9844 can be downloaded from the web site of the EGS under
9845 \begin_inset Flex URL
9848 \begin_layout Plain Layout
9858 \begin_layout Subsection
9862 \begin_layout Standard
9865 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9873 The current layout file is unfortunately very unmodular and would benefit
9874 from using the various
9881 \begin_layout Section
9885 \begin_layout Standard
9886 See the LyX template file
9891 It contains all infos you need.
9894 \begin_layout Section
9900 \begin_inset CommandInset label
9909 \begin_layout Standard
9915 \begin_layout Subsection
9919 \begin_layout Standard
9920 This section describes how to use LyX to make slides for overhead projectors.
9921 There are two document classes that can do this: the default slides class
9927 This section documents the latter.
9930 \begin_layout Standard
9931 I'm going to say this again, nice and clear, so that there's no misunderstanding
9935 \begin_layout Standard
9936 \begin_inset VSpace bigskip
9942 \begin_layout Standard
9946 This section documents the class
9947 \begin_inset Quotes eld
9955 \begin_inset Quotes erd
9963 \begin_layout Standard
9964 \begin_inset VSpace bigskip
9970 \begin_layout Standard
9971 If you're looking for the documentation for
9972 \begin_inset Quotes eld
9980 \begin_inset Quotes erd
9984 \begin_inset space ~
9988 \begin_inset CommandInset ref
9990 reference "sec:slitex"
9995 If your machine doesn't have the
10000 \begin_inset Quotes eld
10008 \begin_inset Quotes erd
10011 ] installed, you'll probably have to use the default
10015 class, which isn't quite as good as
10020 \begin_layout Standard
10025 class is designed for use with version 2.1 of the
10029 LaTeX class file which is now an integral part of LaTeX2e.
10032 \begin_layout Subsection
10036 \begin_layout Standard
10037 Obviously, to use this document class, you need to select
10038 \begin_inset Quotes eld
10046 \begin_inset Quotes erd
10056 \begin_inset space ~
10062 There are some settings in the
10065 \begin_inset space ~
10070 dialog that you should know about that are specific to this class:
10073 \begin_layout Itemize
10074 Don't change the options
10085 \begin_inset space ~
10091 They're ignored by the
10098 \begin_layout Itemize
10099 The default font size is 20
10100 \begin_inset space \thinspace{}
10103 pt with the other options being 17
10104 \begin_inset space \thinspace{}
10108 \begin_inset space \thinspace{}
10112 \begin_inset space \thinspace{}
10118 \begin_layout Itemize
10119 The default font is
10127 but all math equations are still typeset in the usual roman font.
10130 \begin_layout Itemize
10135 supports A4 and Letter paper sizes as well as a special size for working
10137 \begin_inset space \thinspace{}
10141 It doesn't support A5, B5, legal or executive paper sizes.
10144 \begin_layout Itemize
10145 Don't bother changing the
10149 settings because they are ignored anyway.
10150 All floats appear where they are defined in the text.
10153 \begin_layout Itemize
10158 setting behaves a bit differently for this class.
10163 provides extensive footer and header capabilities including a user-defined
10166 \begin_inset space ~
10170 \begin_inset CommandInset ref
10172 reference "sec:foilfoot"
10177 The title page is treated differently to all other pages in the document
10186 has the logo centered at the bottom of the page (if one is defined).
10187 The possible page style choices and what they do are as follows:
10191 \begin_layout Labeling
10192 \labelwidthstring MMMMMMM
10199 The final output contains no page numbers, or other headers or footers
10200 (except footnotes of course).
10204 \begin_layout Labeling
10205 \labelwidthstring MMMMMMM
10212 The final output contains page numbers centered at the bottom of the page.
10213 No other headings or footers (other than footnotes).
10216 \begin_layout Labeling
10217 \labelwidthstring MMMMMMM
10222 Page numbers in lower right corner.
10223 Additional headers and footers are also shown.
10224 This is also the default.
10227 \begin_layout Labeling
10228 \labelwidthstring MMMMMMM
10233 Gives you access to the
10237 package although its use with
10241 is discouraged by the writer of the
10245 package because of some potential page layout clashes.
10249 \begin_layout Subsubsection
10253 \begin_layout Standard
10254 The following options may be used in the extra class options in the
10256 Document\SpecialChar \menuseparator
10262 \begin_layout Labeling
10263 \labelwidthstring MMMMMMx
10268 This sets up the page layout for 7.33
10269 \begin_inset space \thinspace{}
10273 \begin_inset space \thinspace{}
10276 in paper, which is about the same aspect ratio as a 35
10277 \begin_inset space \thinspace{}
10280 mm slide, making it a bit easier to work with this medium.
10283 \begin_layout Labeling
10284 \labelwidthstring MMMMMMx
10289 Places a rule across the page below the header on every page except the
10293 \begin_layout Labeling
10294 \labelwidthstring MMMMMMx
10299 Places a rule across the page above the footer on every page except the
10303 \begin_layout Labeling
10304 \labelwidthstring MMMMMMx
10309 This is automatically set each time you create a new
10318 to use the dvips driver to rotate those pages that are set as landscape
10322 \begin_layout Labeling
10323 \labelwidthstring MMMMMMx
10328 Simply changes the page dimensions to those of a landscape page but doesn't
10330 Thus if you use this option you need to use an external program to rotate
10331 each page or feed your paper through your printer as landscape.
10332 Note that this option effectively reverses the roles of the
10340 environments (don't worry these are described in the next section).
10343 \begin_layout Labeling
10344 \labelwidthstring MMMMMMx
10349 Equation numbers on the left.
10352 \begin_layout Labeling
10353 \labelwidthstring MMMMMMx
10358 Flush-left equations.
10361 \begin_layout Subsection
10362 Supported Environments
10365 \begin_layout Standard
10366 Most of the environments commonly supported in other classes are also supported
10372 There are several additional environments provided by
10376 as well as a couple added by LyX.
10377 The following environments are shared with other classes:
10380 \begin_layout Standard
10384 \begin_layout Plain Layout
10388 begin{multicols}{2}
10396 \begin_layout Itemize
10402 \begin_layout Itemize
10408 \begin_layout Itemize
10414 \begin_layout Itemize
10420 \begin_layout Itemize
10426 \begin_layout Itemize
10432 \begin_layout Itemize
10438 \begin_layout Itemize
10444 \begin_layout Itemize
10450 \begin_layout Itemize
10456 \begin_layout Itemize
10462 \begin_layout Itemize
10468 \begin_layout Itemize
10474 \begin_layout Itemize
10480 \begin_layout Itemize
10486 \begin_layout Itemize
10492 \begin_layout Itemize
10498 \begin_layout Itemize
10504 \begin_layout Standard
10508 \begin_layout Plain Layout
10520 \begin_layout Standard
10521 That is, all the major environments apart from the sectioning environments.
10522 Since foils are essentially self-contained sections, with a title and body,
10527 provides specific commands for starting new foils and these are:
10530 \begin_layout Itemize
10536 \begin_layout Itemize
10542 \begin_layout Standard
10543 LyX also provides slightly modified versions of these two environments called:
10546 \begin_layout Itemize
10552 \begin_layout Itemize
10555 ShortRotatefoilhead
10558 \begin_layout Standard
10559 and the differences will be explained in the next section.
10562 \begin_layout Standard
10563 Since foils are often used in presenting ideas or new theorems and such
10568 also provides a comprehensive box of goodies for presenting them:
10571 \begin_layout Standard
10575 \begin_layout Plain Layout
10579 begin{multicols}{2}
10587 \begin_layout Itemize
10593 \begin_layout Itemize
10599 \begin_layout Itemize
10605 \begin_layout Itemize
10611 \begin_layout Itemize
10617 \begin_layout Itemize
10623 \begin_layout Itemize
10629 \begin_layout Itemize
10635 \begin_layout Itemize
10641 \begin_layout Itemize
10647 \begin_layout Itemize
10653 \begin_layout Standard
10657 \begin_layout Plain Layout
10669 \begin_layout Standard
10670 The starred versions are unnumbered while the unstarred versions are numbered.
10671 There are also two list environments added by LyX and these are:
10674 \begin_layout Itemize
10680 \begin_layout Itemize
10686 \begin_layout Standard
10691 provides some powerful header and footer capabilities that are best set
10692 in the preamble although they may be set at any point in a document.
10693 If you want to change these settings in your document the best place to
10694 do so is at the very top of a foil, i.
10695 \begin_inset space \thinspace{}
10701 \begin_inset space \space{}
10706 straight after the foilhead.
10709 \begin_layout Standard
10710 For this purpose, the following command styles are provided [
10717 \begin_layout Standard
10721 \begin_layout Plain Layout
10725 begin{multicols}{2}
10733 \begin_layout Itemize
10737 \begin_inset space ~
10743 \begin_layout Itemize
10749 \begin_layout Itemize
10753 \begin_inset space ~
10759 \begin_layout Itemize
10763 \begin_inset space ~
10769 \begin_layout Itemize
10773 \begin_inset space ~
10780 \begin_layout Standard
10781 \begin_inset space ~
10788 \begin_layout Standard
10792 \begin_layout Plain Layout
10804 \begin_layout Standard
10805 There are also a few commands provided by
10809 that aren't directly supported by LyX but I'll tell you what they do and
10810 how to use them in section
10811 \begin_inset space ~
10815 \begin_inset CommandInset ref
10817 reference "sec:unsuppfoils"
10824 \begin_layout Subsection
10825 Building a Set of Foils
10828 \begin_layout Standard
10829 This section will give a simple introduction to using the different environments
10830 to build a set of foils.
10831 If you want to see an example set of foils, take a look at the
10835 file you find in LyX's
10842 \begin_layout Subsubsection
10843 Give It a Title Page
10846 \begin_layout Standard
10847 Unlike other classes that provide
10867 creates the title on a page of its own.
10868 If you leave out the
10872 environment LaTeX will substitute the current date (every time you regenerate
10876 \begin_layout Subsubsection
10880 \begin_layout Standard
10881 As I mentioned earlier, there are four ways of starting a new foil.
10882 For portrait foils you should use
10891 The difference between these two environments is the amount of space between
10892 the title of the foil (the foilhead) and the body of the foil.
10895 \begin_layout Standard
10896 Landscape foils are generated using the
10902 ShortRotatefoilhead
10905 Again the only difference is the spacing between foilhead and body.
10906 Both of the short versions have 0.5 inches less separation between the foilhead
10911 \begin_layout Standard
10912 One problem with the support for landscape foils is the requirement that
10913 you have to use the
10917 driver to generate the PostScript output otherwise the foils won't be rotated.
10918 It is possible to get landscape foils even if you haven't got the
10922 driver provided you can feed your foils sideways through your printer ;-)
10925 \begin_layout Subsubsection
10926 Theorems, Lemmas, Proofs and more
10929 \begin_layout Standard
10930 Due to a small bug in LyX you can't have two of the same type of these environme
10931 nts directly following each other.
10932 They must be separated by something.
10933 If you try, you will just be extending the previous environment as if you
10934 had merged the two environments together.
10935 So, how do you get around this problem? The simplest option is to insert
10936 some text between the two environments or add a
10940 environment between the two with just a
10941 \begin_inset Quotes eld
10949 \begin_inset Quotes erd
10953 This will force LyX to produce two separate environments and hence the
10954 correct LaTeX output.
10955 An example is provided in the example file included with the LyX distribution.
10956 Remember, this problem only occurs if you are trying to place two of the
10957 same type of theorem-like environments one directly after the other.
10960 \begin_layout Subsubsection
10964 \begin_layout Standard
10965 You get all the commonly supported list styles found in other classes as
10966 well as two new ones.
10967 I'll only describe the new ones here.
10968 If you want to find out more about the other list environments check out
10974 If you intend to use itemized lists you might also want to read about the
10978 \begin_inset space ~
10982 \begin_inset space ~
10987 dialog described above in section
10988 \begin_inset space ~
10992 \begin_inset CommandInset ref
10994 reference "sec:bullet"
11001 \begin_layout Standard
11002 The two new list styles,
11010 , are designed to make it easier for you to create lists of do's and don'ts
11011 or right and wrong by providing dedicated environments that use a tick
11012 or a cross as the label of the list.
11013 These lists are in fact dedicated variants of the
11018 They do however require that you have the
11022 packages installed.
11025 \begin_layout Subsubsection
11029 \begin_layout Standard
11034 redefines the floating tables and figures so that they appear exactly where
11035 they are in the text rather than pushing them to the top of the page or
11036 to some user specified location.
11037 In fact if you change the float placement settings they are simply ignored.
11040 \begin_layout Subsubsection
11041 Page Headers and Footers
11042 \begin_inset CommandInset label
11044 name "sec:foilfoot"
11051 \begin_layout Standard
11055 \begin_inset space ~
11064 are two commands used to control the left-footer text string.
11065 The first is meant to allow you to include a graphic logo on your foils
11067 \begin_inset Quotes eld
11075 \begin_inset Quotes erd
11079 While the second is meant to provide a classification for the audience,
11083 \begin_inset space \thinspace{}
11089 \begin_inset space \space{}
11093 It is empty by default.
11096 \begin_layout Standard
11097 The remaining page corners can be filled by
11100 \begin_inset space ~
11105 (which defaults to page numbers),
11108 \begin_inset space ~
11116 \begin_inset space ~
11124 \begin_layout Subsection
11130 \begin_inset CommandInset label
11132 name "sec:unsuppfoils"
11139 \begin_layout Standard
11140 All the commands mentioned below need to be set in a
11148 within another environment.
11151 \begin_layout Subsubsection
11155 \begin_layout Standard
11156 All lengths are adjusted using the
11179 should be replaced by the name given to the length you want to change and
11184 is the length value.
11185 All lengths should be specified in units of length such as inches (
11197 ) or relative to some document or font-based length such as
11207 \begin_layout Standard
11208 It's possible to change the spacing between a foilhead and the body of the
11209 foil by adjusting the length specified by
11216 For example, to make
11221 \begin_inset space \space{}
11224 in closer to their bodies put the following in the preamble:
11230 foilheadskip}{-0.5in}
11233 \begin_layout Standard
11234 The spacings around floats can be adjusted by setting these lengths:
11237 \begin_layout Labeling
11238 \labelwidthstring MMMMMMMMMMM
11245 Separation between the text and the top of the float
11248 \begin_layout Labeling
11249 \labelwidthstring MMMMMMMMMMM
11256 Separation between the float and the caption
11259 \begin_layout Labeling
11260 \labelwidthstring MMMMMMMMMMM
11267 Separation between the caption and the following text
11270 \begin_layout Labeling
11271 \labelwidthstring MMMMMMMMMMM
11278 You can make the captions narrower than the surrounding text by adjusting
11280 Best done relative to
11289 \begin_layout Standard
11290 There are also several title page related lengths that you may find useful
11291 if you have a long title or several authors:
11294 \begin_layout Labeling
11295 \labelwidthstring MMMMMMMMMMM
11302 Separation from headers to
11307 \begin_layout Labeling
11308 \labelwidthstring MMMMMMMMMMM
11326 \begin_layout Labeling
11327 \labelwidthstring MMMMMMMMMMM
11341 \begin_layout Labeling
11342 \labelwidthstring MMMMMMMMMMM
11358 \begin_layout Labeling
11359 \labelwidthstring MMMMMMMMMMM
11375 \begin_layout Standard
11376 The last length related command affects all the list environments.
11387 a list environment then all the vertical spacing between the list items
11389 Note that this is a command not a length so it doesn't require
11395 like the stuff mentioned above.
11398 \begin_layout Subsubsection
11399 Headers and Footers
11402 \begin_layout Standard
11415 commands control whether the logo in the
11419 definition appear on a given page.
11426 in the preamble then none of the foils will have the logo on them.
11427 If you don't want the logo on a particular page place the
11433 directly after the foilhead of that page and the
11439 directly after the next foilhead.
11442 \begin_layout Standard
11443 If you decide to use the
11447 page style setting in the
11450 \begin_inset space ~
11455 dialog you should probably add
11465 to your preamble so headers and footers on landscape pages are correctly
11466 placed when rotated.
11467 This is due to some clashes between the page layouts provided by the
11478 \begin_layout Section
11479 Hollywood (Hollywood spec scripts)
11482 \begin_layout Standard
11488 \begin_layout Subsection
11492 \begin_layout Standard
11493 Getting the format of a Hollywood script right is a
11494 \begin_inset Quotes eld
11498 \begin_inset Quotes erd
11501 It is designed to make the readers focus on content and to be easy and
11502 familiar for the actors to read.
11503 Each page of a script should be one minute of film.
11504 Nothing goes in a script that you cannot see or hear on screen.
11505 The courier 12 pt font should be used throughout.
11509 \begin_layout Subsection
11513 \begin_layout Standard
11514 Speakers' lines should NEVER break in mid-sentence.
11515 If a speaker's lines continue over a page break, repeat the
11519 title followed by (Cont'd).
11522 \begin_layout Subsection
11526 \begin_layout Standard
11531 names as labels then cross-reference the label to insert the name.
11532 The cross-reference dialog will show the current cast of characters.
11533 You can use this to insert the speaker name in narratives also.
11536 \begin_layout Subsection
11537 Paper size and Margins
11540 \begin_layout Standard
11541 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11544 \begin_layout Subsection
11548 \begin_layout Standard
11549 The following environments are available.
11550 You can use hollywood.bind to get the bind keys shown at the right.
11553 \begin_layout Itemize
11557 \begin_inset Newline newline
11562 Used where nothing else works.
11566 \begin_layout Itemize
11572 \begin_inset space \hfill{}
11580 \begin_inset Newline newline
11583 Usually followed by something like
11584 \begin_inset Quotes eld
11587 on Sally waking up.
11588 \begin_inset Quotes erd
11594 \begin_layout Itemize
11598 \begin_inset space \hfill{}
11602 \begin_inset Newline newline
11607 Introduces a new INTERIOR camera set-up.
11608 Always followed by DAY or NIGHT, or something similar to define the lighting
11610 Everthing on this line in CAPS.
11613 \begin_layout Itemize
11617 \begin_inset space \hfill{}
11621 \begin_inset Newline newline
11626 Introduces a new EXTERIOR camera set-up.
11627 Everthing on this line in CAPS.
11630 \begin_layout Itemize
11634 \begin_inset space \hfill{}
11638 \begin_inset Newline newline
11643 The character speaking.
11646 \begin_layout Itemize
11650 \begin_inset space \hfill{}
11654 \begin_inset Newline newline
11659 Instructions to the speaker.
11660 The () are automatically inserted, but only the ( will show in LyX.
11661 Both will be printed.
11664 \begin_layout Itemize
11668 \begin_inset space \hfill{}
11672 \begin_inset Newline newline
11684 \begin_layout Itemize
11688 \begin_inset space \hfill{}
11692 \begin_inset Newline newline
11697 Camera movement instruction.
11699 \begin_inset space \thinspace{}
11703 \begin_inset space \space{}
11709 \begin_layout Itemize
11713 \begin_inset space \hfill{}
11719 \begin_layout Itemize
11723 \begin_inset space \hfill{}
11729 \begin_layout Itemize
11733 \begin_inset space \hfill{}
11739 \begin_layout Itemize
11743 \begin_inset space \hfill{}
11749 \begin_layout Subsection
11753 \begin_layout Itemize
11757 \begin_layout Itemize
11761 \begin_layout Itemize
11763 \begin_inset space \thinspace{}
11770 \begin_layout Itemize
11775 \begin_layout Itemize
11776 PAN — camera movement
11779 \begin_layout Itemize
11780 INSERT — cut to close-up of
11783 \begin_layout Section
11787 \begin_layout Standard
11790 Panayotis Papasotiriou
11793 \begin_layout Subsection
11797 \begin_layout Standard
11798 The ijmpc package is a set of macros that facilitates electronic manuscript
11801 International Journal of Modern Physics C
11804 Similarly, the ijmpd package is for creating manuscripts to be submitted
11807 International Journal of Modern Physics D
11810 Both journals are published by World Scientific.
11811 The corresponding document classes are named
11820 These files, together with instructions for the authors, can be downloaded
11822 \begin_inset Flex URL
11825 \begin_layout Plain Layout
11827 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11833 \begin_inset Flex URL
11836 \begin_layout Plain Layout
11838 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11844 Both packages are modified versions of the standard
11845 \begin_inset Quotes eld
11849 \begin_inset Quotes erd
11852 package, and they are almost (but not exactly) identical.
11853 Most of their features are supported by LyX.
11854 I have used LyX successfully to write articles submitted to both journals
11855 without any problem.
11858 \begin_layout Subsection
11862 \begin_layout Standard
11863 As usual, the easiest way to write a paper is to start with a template.
11866 File\SpecialChar \menuseparator
11885 This will give an (almost) empty document that includes the most common
11886 fields found in a manuscript.
11887 Simply overwrite the existing text (including the brackets,
11892 You should keep in mind the following remarks.
11895 \begin_layout Enumerate
11896 LyX won't let you change the font size and the page style of the document,
11897 because such modifications are not allowed by both packages.
11900 \begin_layout Enumerate
11901 The language of the document should not be changed.
11902 Before previewing your paper, be sure that the babel package is not used.
11903 To do this, click on
11905 Tools\SpecialChar \menuseparator
11916 checkbox in the language settings, and click on
11924 , if you wish to make this change permanent).
11927 \begin_layout Enumerate
11929 \begin_inset Quotes eld
11933 \begin_inset Quotes erd
11936 style must be used to define keywords.
11939 \begin_layout Enumerate
11940 The ijmpc package provides a style named
11941 \begin_inset Quotes eld
11944 Classification Codes
11945 \begin_inset Quotes erd
11948 , which can be used to define classification codes, such as PACS numbers.
11949 Note that this facility is not supported by the ijmpd package.
11952 \begin_layout Enumerate
11953 Several new environments are available:
11954 \begin_inset Quotes eld
11958 \begin_inset Quotes erd
11962 \begin_inset Quotes eld
11966 \begin_inset Quotes erd
11970 \begin_inset Quotes eld
11974 \begin_inset Quotes erd
11978 \begin_inset Quotes eld
11982 \begin_inset Quotes erd
11986 \begin_inset Quotes eld
11990 \begin_inset Quotes erd
11994 \begin_inset Quotes eld
11998 \begin_inset Quotes erd
12002 \begin_inset Quotes eld
12006 \begin_inset Quotes erd
12010 \begin_inset Quotes eld
12014 \begin_inset Quotes erd
12018 \begin_inset Quotes eld
12022 \begin_inset Quotes erd
12026 \begin_inset Quotes eld
12030 \begin_inset Quotes erd
12034 \begin_inset Quotes eld
12038 \begin_inset Quotes erd
12042 \begin_inset Quotes eld
12046 \begin_inset Quotes erd
12050 \begin_inset Quotes eld
12054 \begin_inset Quotes erd
12058 \begin_inset Quotes eld
12062 \begin_inset Quotes erd
12066 Their use is more or less obvious.
12067 LyX supports all these environments; it will use the proper label, text
12068 style, and numbering scheme for each of them.
12071 \begin_layout Enumerate
12072 Both packages use basic citations; the natbib package should not be used.
12073 In LyX, citation references are shown as usual; in the output, citations
12074 are shown as superscripts.
12075 If you want to use a citation as normal text, you should use the
12080 \begin_inset space \thinspace{}
12084 \begin_inset space \space{}
12088 \begin_inset Quotes eld
12092 \begin_inset space \space{}
12102 \begin_inset Quotes erd
12108 \begin_layout Enumerate
12110 \begin_inset Quotes eld
12114 \begin_inset Quotes erd
12117 section in both packages.
12118 To put acknowledgments, just use the
12119 \begin_inset Quotes eld
12123 \begin_inset Quotes erd
12129 \begin_layout Enumerate
12130 Appendices may be added to the paper,
12134 the Acknowledgments and
12139 LyX provides a special environment, called
12140 \begin_inset Quotes eld
12144 \begin_inset Quotes erd
12147 which marks the beginning of the appendices.
12148 This environment should be left blank; it just sends a LaTeX command, but
12149 nothing is really printed.
12151 \begin_inset Quotes eld
12155 \begin_inset Quotes erd
12158 is printed with blue letters, as a signal that all sections after that
12159 point are appendices.
12160 To write an appendix, use the
12161 \begin_inset Quotes eld
12165 \begin_inset Quotes erd
12169 LyX will number each appendix with capital letters, as required by both
12172 \begin_inset Quotes eld
12176 \begin_inset Quotes erd
12183 be present before the first appendix; if not, all appendices will be numbered
12184 as normal sections in the output.
12187 \begin_layout Enumerate
12188 The ijmpc and the ijmpd packages use the
12192 command to implement table captions.
12193 As a result, a table created by LyX is printed correctly, but its caption
12195 However, you can use some TeX code to overcome this problem, so that captions
12196 are printed as expected.
12197 To do so, create a float table as usual, remove the caption, and replace
12198 it with the TeX code
12208 (sic); you must also the TeX code
12212 immediately after the tabular material.
12213 Study the example table included in the template files to see how this
12214 trick is implemented.
12215 Alternatively, If you need table captions, you should implement the whole
12220 file, then include this file to the LyX document (
12222 Insert\SpecialChar \menuseparator
12223 File\SpecialChar \menuseparator
12225 \begin_inset space ~
12231 Details on how to create a table float can be found in the files
12239 , included in the corresponding packages.
12242 \begin_layout Subsection
12243 Preparing a paper for submission
12246 \begin_layout Standard
12247 Before you submit your paper you must export the LyX document as a LaTeX
12250 File\SpecialChar \menuseparator
12251 Export\SpecialChar \menuseparator
12258 \begin_layout Plain Layout
12259 Actually you have the choice between LaTeX (plain) and pdflatex.
12260 If you intend to use pdflatex to prepare the paper, you should use the
12261 pdflatex option so that included graphics are converted to PDF format,
12262 ready for use by pdflatex.
12267 , then make the following changes to the resulting
12274 \begin_layout Enumerate
12275 Remove the comment lines before the
12284 \begin_layout Enumerate
12285 Remove everything between (and including) the
12297 commands, except for any commands you specifically put into the LaTeX preamble.
12300 \begin_layout Standard
12305 file should be saved and processed through LaTeX as many times as necessary.
12306 You may also want to check the resulting
12313 \begin_layout Subsection
12317 \begin_layout Standard
12318 The use of TeX code is reduced to two commands, which must be placed at
12319 the top of the document.
12320 If you started writing your paper by using the
12328 template, the TeX code needed is already in its place; you usually don't
12330 You may only modify the first TeX code to specify the information printed
12331 to the top of odd and even pages (authors' names and short paper's title,
12333 This TeX code must have the form
12337 markboth{Authors' Names}{Short Paper's Title}
12342 \begin_layout Section
12346 \begin_layout Standard
12352 \begin_layout Subsection
12356 \begin_layout Standard
12357 The iopart package provides a document class to create electronic manuscript
12358 submission to the journals published by the Institute of Physics.
12359 Instructions for the authors how to create a paper using the iopart class
12360 can be downloaded together with the iopart package from the site
12361 \begin_inset Flex URL
12364 \begin_layout Plain Layout
12366 ftp://ftp.iop.org/pub/journals/latex2e
12374 \begin_layout Subsection
12378 \begin_layout Standard
12379 The easiest way to write a paper is to start with the file
12383 that is available in LyX's examples files folder.
12384 Open this file, save it under a new name, and start writing.
12385 The example file explains how to use the special text environments.
12386 Here are the most important advices:
12389 \begin_layout Itemize
12390 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12393 Use AMS math package
12395 in the document settings under
12402 \begin_layout Itemize
12405 The title environment defines the kind of your paper.
12406 So use one of the following environments for the title:
12410 \begin_layout Itemize
12419 \begin_layout Itemize
12428 \begin_layout Itemize
12434 for a Topical review
12437 \begin_layout Itemize
12446 \begin_layout Itemize
12455 \begin_layout Itemize
12461 for a Paper (same as Title)
12464 \begin_layout Itemize
12470 for a Preliminary communication
12473 \begin_layout Itemize
12479 for a Rapid communication
12482 \begin_layout Itemize
12488 for a Letter to the editor
12492 \begin_layout Itemize
12495 All title environments except of
12499 can have an optional short title.
12502 \begin_layout Itemize
12503 There is a general title environment
12507 which is not directly supported by the LyX.
12508 This can be used as TeX code when your document doesn't fit into one of
12509 the other title types.
12512 \begin_layout Standard
12513 For more informations like hints for special table and formula formatting,
12514 look at the IOP author guidelines.
12517 \begin_layout Section
12521 \begin_layout Standard
12524 Panayotis Papasotiriou
12527 \begin_layout Subsection
12531 \begin_layout Standard
12532 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12533 that facilitates electronic manuscript submission to the journals they
12535 Most known of them (at least in my domain of interest) are
12537 Astrophysics and Space Science
12543 , but there are many others (see a complete list at
12544 \begin_inset Flex URL
12547 \begin_layout Plain Layout
12549 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12555 The Kluwer package may be downloaded from the site
12556 \begin_inset Flex URL
12559 \begin_layout Plain Layout
12561 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12567 A complete user guide is contained in that package (but it can also be
12568 downloaded separately).
12571 \begin_layout Standard
12572 LyX supports many features of the package but not everything.
12573 However, the TeX code needed is reduced to some
12574 \begin_inset Quotes eld
12578 \begin_inset Quotes erd
12581 commands of the package (see
12582 \begin_inset space ~
12586 \begin_inset CommandInset ref
12588 reference "subsec:kluwer_peculiarities"
12593 I have recently used LyX to write an article submitted to the
12595 Astrophysics and Space Science
12597 without any problem.
12600 \begin_layout Subsection
12604 \begin_layout Standard
12605 The easiest way to write a paper is to start with the Kluwer template file.
12608 File\SpecialChar \menuseparator
12620 This will give an (almost) empty document that includes the most common
12621 fields found in a manuscript and a short description of their use.
12622 As in most templates, simply overwrite the existing text (including the
12627 ) with the correct information.
12630 \begin_layout Subsection
12631 Preparing a paper for submission
12634 \begin_layout Standard
12635 As in the AASTeX package, before you submit your paper to a journal you
12637 \begin_inset Quotes eld
12641 \begin_inset Quotes erd
12647 \begin_layout Enumerate
12648 Export your paper as a LaTeX file.
12649 To do this, click on
12651 File\SpecialChar \menuseparator
12652 Export\SpecialChar \menuseparator
12659 \begin_layout Enumerate
12664 file with a text editor and make the following changes
12668 \begin_layout Enumerate
12669 remove the comment lines before the
12678 \begin_layout Enumerate
12679 remove everything between (and including) the
12691 commands, except for any commands you specifically put into the LaTeX preamble.
12694 \begin_layout Standard
12703 \begin_layout Enumerate
12708 file through LaTeX as many times as necessary (usually up to three).
12711 \begin_layout Enumerate
12717 \begin_inset space \thinspace{}
12721 \begin_inset space \space{}
12728 , and check if everything is OK (it should, if you didn't make any mistake).
12731 \begin_layout Subsection
12732 \begin_inset Quotes eld
12736 \begin_inset Quotes erd
12739 of the Kluwer package
12740 \begin_inset CommandInset label
12742 name "subsec:kluwer_peculiarities"
12749 \begin_layout Standard
12750 The Kluwer package has the following
12751 \begin_inset Quotes eld
12755 \begin_inset Quotes erd
12761 \begin_layout Enumerate
12762 It is possible to write multiple articles in the same LaTeX file
12766 \begin_layout Plain Layout
12767 I can't imagine any good reason to do this.
12773 Each article must be included in the environment
12774 \begin_inset Quotes eld
12778 \begin_inset Quotes erd
12782 Unfortunately, this environment cannot be omitted, even if you write just
12784 Therefore, each article starts with the command
12790 and, obviously, ends with the command
12797 Although this can be implemented in LyX, I didn't included it, since it
12798 looks ugly and can confuse the novice user.
12799 Therefore, you need to enter them directly and mark them as LaTeX code
12801 \begin_inset Quotes eld
12805 \begin_inset Quotes erd
12811 \begin_layout Enumerate
12812 Information given at the beginning of the article (i.
12813 \begin_inset space \thinspace{}
12817 \begin_inset space \space{}
12820 title, subtitle, author, institution, running title, running author, abstract
12821 and keywords) must be included in an environment called
12822 \begin_inset Quotes eld
12826 \begin_inset Quotes erd
12830 This is not implemented in LyX, so you must enter title, subtitle etc.
12831 \begin_inset space ~
12834 between two TeX code lines (
12849 \begin_layout Enumerate
12850 According to the user manual, the label of each bibliography item must be
12874 \begin_layout Standard
12879 template takes care of all these
12880 \begin_inset Quotes eld
12884 \begin_inset Quotes erd
12888 If you start a new paper using this template you don't need to do anything
12893 \begin_layout Enumerate
12894 don't delete the TeX code included in the template, and
12897 \begin_layout Enumerate
12898 copy the example bibliography item included in the template and modify it
12899 as necessary to enter new bibliography items.
12902 \begin_layout Section
12906 \begin_layout Standard
12912 \begin_layout Subsection
12916 \begin_layout Standard
12917 The LyX document classes
12919 article (koma-script)
12923 report (koma-script)
12941 correspond to the LaTeX document classes
12958 \begin_inset space ~
12961 of the Koma-Script family.
12962 They are replacements for the standard document classes
12978 , resp., and fit better to European typography conventions in a number of
12982 \begin_layout Itemize
12983 Standard character size is 11pt in
12985 article (koma-script)
12989 report (koma-script)
12997 letter (koma-script)
13002 \begin_layout Itemize
13003 Headings, labels of the description environment, and a number of elements
13006 letter (koma-script)
13008 document class are set in a bold sans serif font.
13012 \begin_layout Plain Layout
13013 There is a big difference between the bold sans serif old cm fonts and new
13014 ec fonts, especially in the appearance of headings.
13015 In comparison, the ec bold sans serif fonts look a bit thin.
13016 Here the LaTeX package
13024 helps to produce the
13025 \begin_inset Quotes eld
13029 \begin_inset Quotes erd
13032 appearance when using the ec fonts.
13037 The numbering of chapter headings is made in the same way as the numbering
13038 of section headings, that is without the extra line
13039 \begin_inset Quotes eld
13042 Chapter\SpecialChar \ldots{}
13044 \begin_inset Quotes erd
13048 In addition, the appearance of the headings can be modified by using a
13049 number of options (in LyX to be entered in the field
13052 \begin_inset space ~
13059 Layout\SpecialChar \menuseparator
13066 \begin_layout Itemize
13067 The main means in the Koma-Script document classes to design the type area
13076 (in LyX to be entered in the extra class options field in the dialog
13078 Document\SpecialChar \menuseparator
13082 They make a clearer modification of page margins possible as do the options
13085 Document\SpecialChar \menuseparator
13092 \begin_layout Itemize
13093 The LaTeX document classes of the Koma-Script family define a number of
13094 additional commands.
13095 Those part of it which makes sense in LyX is implemented in corresponding
13099 \begin_layout Standard
13100 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13101 can be found in the Koma-Script documentation
13112 \begin_layout Subsection
13113 article (koma-script), report (koma-script), and book (koma-script)
13116 \begin_layout Standard
13117 The document classes
13119 article (koma-script)
13123 report (koma-script)
13133 are implemented in the layout files
13146 They contain all the paragraph types of the corresponding standard document
13159 , resp., partly modified, with the exception of the LyX specific
13163 -type, which is replaced by the new
13167 -type having the same functionality.
13172 -Type there is a number of new paragraph types added.
13179 letter (koma-script)
13184 \begin_layout Itemize
13193 : are equivalents to
13201 , resp., additionally inserting an entry in the table of contents.
13210 are not contained in
13212 article (koma-script)
13217 \begin_layout Itemize
13226 : behave exactly as
13234 , resp., additionally clearing running heads.
13239 is not contained in
13241 article (koma-script)
13247 \begin_layout Plain Layout
13260 report (koma-script)
13262 , but since this is identical to
13266 , is has not been implemented in LyX.
13274 \begin_layout Itemize
13279 : generates a heading directly above the following paragraph in the standard
13280 character size without affecting the structure of the document.
13283 \begin_layout Itemize
13292 are special captions which respect the different space settings needed
13293 for captions placed above or below an element (if you follow strict typographic
13294 rules, you might want to place table captions always above the table).
13295 You can also use the class option
13299 , which will switch
13312 You need at least Koma-Script version 2.8q to use this.
13315 \begin_layout Itemize
13320 : can be used to set a bonmot, e.
13321 \begin_inset space \thinspace{}
13325 \begin_inset space \space{}
13328 at the beginning of a chapter.
13329 If you use the optional argument (
13331 Insert\SpecialChar \menuseparator
13333 \begin_inset space ~
13338 ), you can insert the dictum's author there.
13339 Dictum and author are separated by a line.
13340 You need at least Koma-Script version 2.8q to use this.
13345 is not contained in
13347 article (koma-script)
13352 \begin_layout Standard
13353 The following types, together with the standard types
13365 , form the title area of the document.
13366 They must be entered ahead of the first
13367 \begin_inset Quotes eld
13371 \begin_inset Quotes erd
13378 \begin_layout Plain Layout
13379 The corresponding LaTeX commands must appear before the
13390 When such a type is used more than once, the latter usage overwrites the
13391 former one, that means, for every type only the latest usage is valid.
13392 The order of the different types however has, like
13404 , no effect on the appearance of the produced document.
13407 \begin_layout Itemize
13412 : produces a centered paragraph above the ordinary title (
13424 ) for the subject of the document.
13427 \begin_layout Itemize
13432 : produces a centered paragraph below the ordinary title (
13444 ) for the publishers' name.
13447 \begin_layout Itemize
13454 report (koma-script)
13460 produces a centered paragraph on its own page behind the title page, or
13463 article (koma-script)
13465 produces a centered paragraph below the ordinary title (
13481 ) for a dedication.
13484 \begin_layout Itemize
13489 : produces a left aligned paragraph above the ordinary title (
13505 ) for a document`s head.
13508 \begin_layout Itemize
13513 : produces in a double-sided print in
13515 report (koma-script)
13521 a left-aligned paragraph at the top of the title page`s back or has no
13522 effect in a single-sided print or in
13524 article (koma-script)
13529 \begin_layout Itemize
13534 : produces in a double-sided print in
13536 report (koma-script)
13542 a left-aligned paragraph at the bottom of the title page`s back or has
13543 no effect in a single-sided print or in
13545 article (koma-script)
13550 \begin_layout Itemize
13555 : produces a special
13556 \begin_inset Quotes eld
13560 \begin_inset Quotes erd
13563 page ahead of the actual document containing a paragraph without special
13567 \begin_layout Standard
13568 The layout files for the document classes
13570 article (koma-script)
13574 report (koma-script)
13580 do include the file
13585 This is thought of as a place to define your own types.
13590 in your personal layout directory and edit the file!
13593 \begin_layout Subsection
13594 letter (koma-script)
13597 \begin_layout Standard
13601 letter (koma-script)
13603 is implemented in the layout file
13608 It contains all the paragraph types of the corresponding standard document
13613 , partly modified, with the exception of the LyX specific types
13625 type, which is replaced by the new
13630 In addition, it contains, in contrast to the standard document class, the
13648 Furthermore, there are a number of new letter specific types.
13651 \begin_layout Standard
13652 The appearance of the letter produced by this document class can be controlled
13653 by a number of LaTeX commands, which you can put in the LaTeX preamble.
13657 \begin_layout Plain Layout
13658 For example, the standard appearance of the letter`s heading, consisting
13659 of name and address, is quite self-willed.
13661 \begin_inset Quotes eld
13665 \begin_inset Quotes erd
13668 heading is produced by the following LaTeX commands in the preamble:
13671 \begin_layout LyX-Code
13681 \begin_layout LyX-Code
13697 \begin_layout LyX-Code
13707 \begin_layout LyX-Code
13727 A detailed German description of such LaTeX commands can be found in the
13728 Koma-Script documentation
13733 With it, the letter's author can produce his personal letter layout.
13736 \begin_layout Standard
13745 define the beginning of the letter and must be used in every letter.
13746 To emphasize them in the LyX document class, they are marked with the letter
13756 \begin_inset space ~
13759 in the left margin.
13760 It is possible to write any number of letters in one file.
13765 type produces a new letter using the same addressee and a
13769 type produces a new addressee.
13786 are ordinary paragraph types and can also be used several times in one
13787 and the same letter.
13790 \begin_layout Itemize
13795 : produces a paragraph for the addressee and implicitly defines the beginning
13799 \begin_layout Itemize
13804 : produces a paragraph for the form of address and implicitly produces a
13808 \begin_layout Itemize
13813 : produces a paragraph for a close.
13816 \begin_layout Itemize
13821 : produces a paragraph for a postscript.
13824 \begin_layout Itemize
13829 : produces a paragraph for a distribution list.
13832 \begin_layout Itemize
13837 : produces a paragraph for enclosures.
13840 \begin_layout Standard
13881 are input types provided with a label to enter information, which will
13882 be processed by the document class.
13886 \begin_layout Plain Layout
13887 It could be seen as a matter of inconsequence, that the types
13895 described above are not such input types as well.
13896 Because of the special meaning of those types, however, I have implemented
13897 them as ordinary paragraph types with a one letter mark in the left margin.
13898 Moreover, it would affect my feeling of symmetry, if the
13906 type had such a serious different appearance.
13911 The types must be used ahead of the corresponding
13918 \begin_layout Standard
13919 An implementation of these types in a WYSIWYG fashion does not seem to make
13920 sense, because the real appearance of the produced letter does not only
13921 depend on the usage of the particular type, but also on other factors.
13922 For example, a signature entered in the
13926 type will in the standard behavior appear in the produced letter only,
13927 when in the same letter also a
13932 The entered value of the
13936 type will in the standard behavior not appear in the produced letter at
13938 The possibility to design the letter`s heading freely is already indicated
13939 in a footnote above.
13942 \begin_layout Standard
13943 The input types can also be used as empty paragraphs.
13944 This makes sense e.
13945 \begin_inset space \thinspace{}
13949 \begin_inset space \space{}
13961 type is not used at all, in the standard behavior the value of the
13965 type is used as signature, whereas if an empty
13969 type is used, no signature value is defined.
13972 \begin_layout Standard
13973 By using the input types it is possible to write a letter template, containing
13974 filled input types with your personal dates (name, address, etc.) and empty
13975 input types for other dates you want to enter.
13978 \begin_layout Itemize
13983 : sender's name, in the standard behavior appears as a centered paragraph
13984 in small caps in the letter`s heading.
13987 \begin_layout Itemize
13992 : sender's signature, in the standard behavior appears below the
14001 type is used, the value of the
14005 type appears instead.
14008 \begin_layout Itemize
14013 : sender's address, in the standard behavior appears in a centered paragraph
14014 in the letter`s heading below the sender's name.
14017 \begin_layout Itemize
14022 : sender's telephone number, in the standard behavior only sets the LaTeX
14032 \begin_layout Itemize
14037 : place of the letter`s making.
14040 \begin_layout Itemize
14045 : date of the letter`s making.
14054 , in the standard behavior, produce the place and the date in a right-aligned
14055 line below the addressee's field.
14060 type is used, neither place nor date appear, independent of the value of
14070 type is used, the date of the letter `s production is used.
14073 \begin_layout Itemize
14078 : sender`s back address, in the standard behavior appears above the addressee's
14079 field in a small sans serif font.
14082 \begin_layout Itemize
14087 : special mail information, in the standard behavior appears underlined
14088 above the addressee's field below the back address.
14091 \begin_layout Itemize
14096 : additional information, in the standard behavior appears on right side
14097 below the addressee`s field.
14100 \begin_layout Itemize
14105 : the letter's title, in the standard behavior appears in a big, bold, sans
14106 serif font above the subject.
14109 \begin_layout Itemize
14114 : the letter's subject, in the standard behavior appears in a bold font
14122 \begin_layout Standard
14143 produce a business letter like line above the
14147 line containing the fields
14148 \begin_inset Quotes eld
14152 \begin_inset Quotes erd
14156 \begin_inset Quotes eld
14160 \begin_inset Quotes erd
14164 \begin_inset Quotes eld
14168 \begin_inset Quotes erd
14172 \begin_inset Quotes eld
14176 \begin_inset Quotes erd
14180 \begin_inset Quotes eld
14184 \begin_inset Quotes erd
14188 \begin_inset Quotes eld
14192 \begin_inset Quotes erd
14196 For the date field, the value of the
14202 \begin_inset Quotes eld
14205 business letter types
14206 \begin_inset Quotes erd
14209 is used, the value of the
14213 type however does not appear, but only the LaTeX variable
14220 The ordinary output of place and date in a right-aligned line below the
14221 addressee`s field is suppressed.
14222 The types are implemented as input types provided with a label and must
14223 be used ahead of the corresponding
14230 \begin_layout Itemize
14238 \begin_layout Itemize
14246 \begin_layout Itemize
14254 \begin_layout Itemize
14262 \begin_layout Itemize
14270 \begin_layout Subsection
14271 The new letter class: letter (koma-script v.2)
14274 \begin_layout Standard
14280 \begin_layout Standard
14281 \begin_inset VSpace medskip
14287 \begin_layout Standard
14289 Koma-Script version 2.8 has introduced a new letter class
14293 which supersedes the now unsupported
14298 It has — on the LaTeX side — a completely new interface and is not compatible
14299 with the old class.
14300 Therefore, LyX supports both, though it is recommended you use the new
14304 \begin_layout Standard
14305 This class covers the same functionality as
14307 letter (koma-script),
14310 The basic items are
14314 (receiver's address, same as
14318 in the old layout),
14331 will start a new letter (i.
14332 \begin_inset space \thinspace{}
14336 \begin_inset space \space{}
14339 you can write several letters per document).
14340 New elements are sender's
14356 and the possibility to use a
14362 Insert\SpecialChar \menuseparator
14368 \begin_layout Standard
14369 The biggest improvement is, though, that the letter's layout is configurable
14370 to meet almost any needs.
14371 This can be done via the preamble or with a special style file (Letter
14372 Class Option, extension
14376 ), that will be read in as a class option.
14380 \begin_layout Plain Layout
14381 The KOMA package comes with some default
14386 There is, for instance, a
14390 file that follows german typesetting rules, or a
14394 that provides the default layout of the old
14399 The latter can be loaded with the class option
14408 ayout\SpecialChar \menuseparator
14413 ocument\SpecialChar \menuseparator
14425 template that is included in LyX for examples.
14426 A detailed description is to be found in the Koma-Script documentation
14434 \begin_layout Subsection
14438 \begin_layout Standard
14439 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14443 \begin_layout Itemize
14444 The chapter number of a
14448 type appears on a line of its own above the chapter heading instead of
14449 appearing in the same line ahead of it.
14450 The cause for that is the LyX internal behavior for the labeltype
14454 in the layout file.
14457 \begin_layout Itemize
14458 The headings of the types
14466 are only put in the
14467 \begin_inset Quotes eld
14471 \begin_inset Quotes erd
14474 LaTeX table of contents, but not in the LyX table of contents (
14476 Document\SpecialChar \menuseparator
14478 \begin_inset space ~
14482 \begin_inset space ~
14490 \begin_layout Itemize
14491 The paragraphs in a
14495 document class appear in a skip separation mode, not indented.
14496 This is the standard behavior, no special LaTeX commands are needed for
14500 Document\SpecialChar \menuseparator
14503 dialog the corresponding radio button indicates
14512 value always has the effect that extra LaTeX commands are inserted in the
14513 document to produce the gap, which is not what is wanted in this case.
14516 \begin_layout Section
14520 \begin_layout Standard
14526 \begin_layout Subsection
14530 \begin_layout Standard
14531 Memoir is a very powerful and constantly evolving class.
14532 It has been designed with regard to fictional and non-fictional literature.
14533 Its aim is to let the user have maximum control over the typesetting of
14535 Memoir is based on the standard book class, but it can also emulate the
14536 article class (see below).
14539 \begin_layout Standard
14540 Peter Wilson, the developer of Memoir, is known as the author of lots of
14541 useful packages in the LaTeX world.
14542 Most of them have been merged with Memoir.
14543 Therefore, it is much easier to layout the table of contents, appendices,
14544 chapter designs and such.
14545 LyX, though, does not support all of these goodies natively.
14546 Some of them might be added to forthcoming releases
14550 \begin_layout Plain Layout
14551 You are invited to send suggestions to
14552 \begin_inset Flex URL
14555 \begin_layout Plain Layout
14557 lyx-devel@lists.lyx.org
14567 , lots will probably never, due to the limitations of LyX's framework.
14568 Of course you can still use all features with the help of some native LaTeX
14573 \begin_layout Plain Layout
14578 \begin_layout Plain Layout
14588 \begin_inset space ~
14592 \begin_inset CommandInset ref
14594 reference "sec:Inserting-TeX-Code"
14604 In this section, we can only list those features which are natively supported
14606 For detailed descriptions (and for the rest of features) we recommend you
14607 have a look at the detailed manual of the Memoir class
14611 \begin_layout Plain Layout
14616 \begin_layout Plain Layout
14626 \begin_inset Flex URL
14629 \begin_layout Plain Layout
14631 CTAN:/macros/latex/memoir/memman.pdf
14641 , which is not only a user guide for the class, but also both a comprehensive
14642 description on good typesetting and a superb example for good typesetting
14646 \begin_layout Subsection
14647 Basic features and restrictions
14650 \begin_layout Standard
14651 Memoir supports basically all features of the standard book classes.
14652 There are, however, some differences, as follows:
14655 \begin_layout Description
14657 \begin_inset space ~
14660 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14663 \begin_layout Description
14665 \begin_inset space ~
14668 style: The fancy page style is not supported, due to a command clash between
14669 Memoir and the fancyhdr package (they both define a command with the same
14670 name, which confuses LaTeX).
14671 Instead, Memoir comes with a number of its own page styles (see
14673 Layout\SpecialChar \menuseparator
14674 Document\SpecialChar \menuseparator
14676 \begin_inset space ~
14682 If you want to use these for the chapter pages, you have to use the command
14689 in the main text or in preamble (e.
14690 \begin_inset space \thinspace{}
14694 \begin_inset space \space{}
14701 chapterstyle{companion}
14706 \begin_layout Description
14707 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14708 optional argument in the standard classes.
14709 With this, you can specify an alternative version of the title for the
14710 table of contents and the headers (for instance, if the title is too long).
14711 In LyX, you can do this via
14713 Insert\SpecialChar \menuseparator
14715 \begin_inset space ~
14720 at the beginning of a chapter/section.
14721 Memoir features a second optional argument and thus separates the table
14722 of contents from the header.
14723 You can define three variants of a title with this: one for the main text,
14724 one for the table of contents, and one for the headers.
14725 Simply insert two optional arguments if you need this feature, the first
14726 one containing the short title for the Table of Contents, the second one
14727 containing an alternative short title for the headers.
14730 \begin_layout Description
14731 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14732 of contents, the list of figures and the list of table start a new page
14734 Memoir does not follow this route.
14735 You have to insert a page break yourself, if you want to have one.
14738 \begin_layout Description
14739 Titlepage: For some unknown reason, Memoir uses pagination on the title
14740 page (in the standard classes, title pages are
14741 \begin_inset Quotes eld
14745 \begin_inset Quotes erd
14749 \begin_inset space \thinspace{}
14753 \begin_inset space \space{}
14757 If you want an empty title page, type
14761 aliaspagestyle{title}{empty}
14766 \begin_layout Description
14767 Article: With the class option
14773 Layout\SpecialChar \menuseparator
14774 Document\SpecialChar \menuseparator
14776 \begin_inset space ~
14781 ), you can emulate article style.
14782 That is, counters (footnotes, figures, tables etc.) will not be reset on
14783 new chapters, chapters don't start a new page (but are—in contrary to
14784 \begin_inset Quotes eld
14788 \begin_inset Quotes erd
14791 article classes—still allowed), parts, though, use their own page, as in
14795 \begin_layout Description
14796 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14797 font commands, which have been used in the old LaTeX version 2.09 (e.
14798 \begin_inset space \thinspace{}
14802 \begin_inset space \space{}
14818 It produces an error and stops LaTeX whenever such a command appears.
14823 reallows the commands and spits out warnings instead (which does at least
14825 Since a lot of packages and particularly BibTeX style files are still using
14826 those commands, we have decided to use this option by default.
14829 \begin_layout Subsection
14833 \begin_layout Standard
14834 We will only describe the features supported by LyX (which is not much currently
14836 Please consult the Memoir manual
14840 \begin_layout Plain Layout
14845 \begin_layout Plain Layout
14855 \begin_inset Flex URL
14858 \begin_layout Plain Layout
14860 CTAN:/macros/latex/memoir/memman.pdf
14873 \begin_layout Description
14874 Abstract: You may wonder why an abstract is an extra feature.
14875 Well, it is in book class.
14876 Usually books don't have abstracts.
14877 Memoir, however, has.
14878 You can use it wherever and how often you like.
14881 \begin_layout Description
14882 Chapterprecis: You may know this older typesetting style: The contents of
14883 a chapter are summarized below the title and also in the table of contents
14885 \begin_inset space \thinspace{}
14889 \begin_inset space \space{}
14894 Our hero arrives in Troia; he loses some friends; he finds others
14897 Chapterprecis does exactly this.
14898 It is therefore only sensible below a chapter.
14901 \begin_layout Description
14902 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14903 The epigraph environment provides an elegant way of typesetting such a
14905 The motto itself (text) and its author (source) are divided by a short
14907 Unfortunately, we have to fool LyX a bit here again, since the environment
14908 needs two arguments (text and source).
14909 In this case, we have to use curly brackets (in TeX mode) between the two
14920 <author of the slogan>.
14923 \begin_layout Description
14924 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14925 complex figurative poems).
14926 LyX can only support a few of them.
14927 One is poemtitle, which is a centered title for poems, which will also
14928 be added to the table of contents (verse is the standard environment for
14930 Memoir has some enhanced versions of verse, but you need to use TeX code,
14931 because they have to be nested inside regular verse environments, which
14932 is not possible with LyX).
14935 \begin_layout Description
14936 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14939 \begin_layout Section
14940 Article (mwart), book (mwbk) and report (mwrep)
14941 \begin_inset Argument
14944 \begin_layout Plain Layout
14957 \begin_layout Standard
14963 \begin_layout Standard
14964 The LyX document classes
14980 correspond to the LaTeX document classes
14993 They are replacements for the standard document classes
15005 , resp., and fit better to Polish typography conventions in a number of points.
15009 \begin_layout Standard
15013 \begin_layout Itemize
15014 Unnumbered titles (with star, e.
15015 \begin_inset space \thinspace{}
15019 \begin_inset space \space{}
15026 ) are added into table of contents,
15029 \begin_layout Itemize
15030 Additional page styles:
15034 \begin_layout Description
15035 uheadings header with separated lines,
15038 \begin_layout Description
15039 myheadings custom header, contents headers via commands:
15054 \begin_layout Description
15055 myuheadings custom header with separated lines,
15058 \begin_layout Description
15059 outer page number is placed on outer side of page
15063 \begin_layout Itemize
15068 \begin_layout Description
15069 rmheadings serif titles — default,
15072 \begin_layout Description
15073 sfheadings sansserif titles,
15076 \begin_layout Description
15077 authortitle on title page first placed is author next title — default,
15080 \begin_layout Description
15081 titleauthor on title page first placed is title next author,
15084 \begin_layout Description
15085 withmarginpar reserve place on page for margins.
15089 \begin_layout Section
15093 \begin_layout Standard
15098 provides an alternative to the standard
15103 It provides similar functionality, but you might prefer this layout with
15104 sans serif sections, headings, and more.
15107 \begin_layout Section
15111 \begin_layout Standard
15117 \begin_layout Standard
15118 \begin_inset VSpace bigskip
15124 \begin_layout Standard
15129 \begin_inset space ~
15134 textclass works with the American Physical Sociey's RevTeX 4.0 (the
15135 \begin_inset Formula $\beta$
15138 release of May, 1999) class.
15141 \begin_layout Standard
15146 textclass, which works with RevTeX 3.1.
15147 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15148 That means that it doesn't interact very well with LyX, which requires
15149 LaTeX2e, although it has been kludged to work.
15150 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15154 \begin_inset space ~
15159 textclass should also be pretty easy to use.
15162 \begin_layout Standard
15163 These documents are supposed to be used in
15167 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15168 macros, and assume you'll know what to put in the preamble if necessary.
15171 \begin_layout Subsection
15175 \begin_layout Standard
15176 All you need to do is install RevTeX 4, as described in the package's README
15178 The package can be found at The RevTeX 4 Web Site
15179 \begin_inset Flex URL
15182 \begin_layout Plain Layout
15184 http://publish.aps.org/revtex4/
15190 Install it somewhere that LaTeX can see it.
15191 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15193 \begin_inset space \thinspace{}
15197 \begin_inset space \space{}
15200 not the directory where you installed the class file.) Then, if you reconfigure
15201 LyX, it will find the class file and let you use the RevTeX4 textclass.
15204 \begin_layout Standard
15205 Probably the easiest way to get started is either to import a RevTeX 4 document
15213 \begin_inset space ~
15218 template, found in the templates directory.
15221 \begin_layout Subsection
15225 \begin_layout Standard
15226 Optional arguments to
15233 \begin_inset Quotes eld
15237 \begin_inset Quotes erd
15241 \begin_inset Quotes eld
15245 \begin_inset Quotes erd
15255 \begin_inset space ~
15263 \begin_inset space ~
15269 Remember that in RevTeX, at least one optional argument is required!
15272 \begin_layout Standard
15273 Other preamble matter, like
15280 \begin_inset space ~
15286 \begin_inset space ~
15291 dialog, also as usual.
15294 \begin_layout Subsection
15298 \begin_layout Standard
15299 The layouts basically correspond to the commands in RevTeX4.0.
15300 For example, the Email layout corresponds to
15307 Note that (at least as of RevTeX 4.0 Beta), the
15315 layouts are exactly equivalent, so you shouldn't need to use both.
15319 \begin_layout Plain Layout
15320 In case you're curious, both were included so that
15324 would be able to translate both
15344 \begin_layout Subsection
15348 \begin_layout Standard
15349 There are a couple of important unique aspects of RevTeX 4 which might cause
15350 bugs that will be even more confusing in LyX.
15353 \begin_layout Standard
15371 The LyX equivalent is that there is a separate Thanks layout.
15376 write footnotes in the
15380 layout, or weird things may happen.
15381 See the RevTeX 4 documentation for more details.
15384 \begin_layout Standard
15388 \begin_inset space ~
15396 \begin_inset space ~
15405 layouts must be placed
15413 layout and the corresponding
15430 , the LaTeX won't compile.
15433 \begin_layout Subsection
15437 \begin_layout Standard
15438 The main problem with this layout is that you can't use the optional arguments
15439 to layouts like Email and Title.
15440 (The problem is not unique to this layout; you can't use optional arguments
15441 to the Section layouts either.) This means that after you export that file
15442 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15443 need to edit the LaTeX file with a text editor to add the optional arguments
15445 \begin_inset space \thinspace{}
15449 \begin_inset space \space{}
15452 the running title for the page headers.
15453 Lacking these layouts makes the
15459 (and the equivalent
15465 ) useless, so the corresponding layouts don't exist, and will have to be
15470 \begin_layout Plain Layout
15475 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15476 has not been updated yet to take advantage of it.
15484 \begin_layout Section
15485 Springer Journals (
15492 \begin_layout Standard
15498 \begin_layout Subsection
15502 \begin_layout Standard
15503 These are the layout files for some of the journal formats used by Springer
15504 Verlag and listed on
15505 \begin_inset Flex URL
15508 \begin_layout Plain Layout
15510 http://www.springer.de/author/tex/help-journals.html
15515 , where you should also go to fetch the class files (yes, these are LaTeX2e
15517 It is a modular system: the things common to all journals are implemented
15522 , which journal-specific layout files (such as, e.
15523 \begin_inset space \thinspace{}
15527 \begin_inset space \space{}
15534 for Journal of Geodesy) can include.
15537 \begin_layout Standard
15538 This means that implementing support for any other Springer journal on this
15539 list is as simple as writing your own
15547 file following the outline given in
15555 \begin_layout Standard
15556 It is reasonably well tested only for the Journal of Geodesy.
15565 come with the standard LyX distribution.
15566 Install the relevant class file (downloaded from Springer) in a proper
15567 directory, reconfigure LaTeX (in the teTeX case by running
15571 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15572 and it should work.
15575 \begin_layout Subsection
15579 \begin_layout Standard
15580 A large number of theorem-like styles —
15586 \SpecialChar \ldots{}
15592 \begin_layout Standard
15595 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15596 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15599 See the Springer class file documentation for details.
15602 \begin_layout Subsection
15606 \begin_layout Itemize
15618 \begin_layout Itemize
15621 Probability Theory and Related Fields
15627 — Jean-Marc Lasgouttes
15630 \begin_layout Standard
15631 Add your own, it isn't so hard!
15634 \begin_layout Subsection
15638 \begin_layout Standard
15639 These files are partly based on the older
15643 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15644 file from Springer.
15649 layout, are now defunct.
15650 Jean-Marc Lasgouttes helped out big in making me find my way around the
15651 LyX layout file mechanism.
15654 \begin_layout Subsection
15658 \begin_layout Standard
15660 But probably less than in the old hacked-LaTeX
15667 \begin_layout Standard
15669 \begin_inset space \thinspace{}
15672 g.: does not display the number for theorem-like layouts, just #.
15675 \begin_layout Section
15681 \begin_inset CommandInset label
15690 \begin_layout Standard
15698 \begin_layout Subsection
15702 \begin_layout Standard
15703 This section describes how to use LyX to make slides for overhead projectors.
15704 There are two document classes that can do this: the default slides class
15710 This section documents the former.
15713 \begin_layout Standard
15714 I'm going to say this again, nice and clear, so that there's no misunderstanding
15718 \begin_layout Standard
15719 \begin_inset VSpace bigskip
15725 \begin_layout Standard
15729 This section documents the class
15730 \begin_inset Quotes eld
15738 \begin_inset Quotes erd
15746 \begin_layout Standard
15747 \begin_inset VSpace bigskip
15753 \begin_layout Standard
15754 If you're looking for the documentation for
15755 \begin_inset Quotes eld
15763 \begin_inset Quotes erd
15766 , check out section
15767 \begin_inset space ~
15771 \begin_inset CommandInset ref
15773 reference "sec:foiltex"
15783 \begin_inset Quotes eld
15791 \begin_inset Quotes erd
15794 ] is actually somewhat better than the default
15802 \begin_layout Plain Layout
15803 \SpecialChar \ldots{}
15804 or so I've been told repeatedly by its advocates.
15805 Having never used it, I have no idea if this claim is true or not.
15810 which this section documents.
15813 \begin_layout Standard
15814 This class is the LaTeX2e improvement of the old
15819 Every LaTeX2e distribution includes this class [which I'll just refer to
15821 \begin_inset Quotes eld
15829 \begin_inset Quotes erd
15832 from now on], so you're bound to have it.
15833 As I noted earlier, there are other classes, such as
15837 , which also produce slides for overhead projectors and do a better job
15839 However, there are some things which
15843 can do which the others can't, such as generate overlays.
15844 Read on to learn more!
15847 \begin_layout Subsection
15849 \begin_inset CommandInset label
15851 name "sec:slidesetup"
15858 \begin_layout Standard
15859 Obviously, to use this document class, you need to select
15860 \begin_inset Quotes eld
15868 \begin_inset Quotes erd
15871 from the class list in the
15873 Document\SpecialChar \menuseparator
15877 There are some other special things you should know about this class:
15880 \begin_layout Itemize
15881 Don't bother changing the options
15886 They're not supported by the
15893 \begin_layout Itemize
15897 \begin_inset space ~
15902 behaves a bit differently for this class.
15903 The possible choices and what they do are as follows:
15907 \begin_layout Description
15912 The final output contains page numbers in the lower right corner.
15915 \begin_layout Description
15924 , but also prints out any time markers you've put in.
15925 This is the default.
15928 \begin_layout Description
15933 The final output contains no page numbers, time markers, or alignment markers.
15937 \begin_layout Itemize
15942 class has an extra option:
15948 \begin_inset Quotes eld
15956 \begin_inset Quotes erd
15959 in the extra class options.
15963 \begin_layout Standard
15964 Using this options allows you to add time markers to
15970 \begin_inset space ~
15974 \begin_inset CommandInset ref
15976 reference "sec:slideNote"
15984 \begin_layout Standard
15985 You can also use the template file
15986 \begin_inset Quotes eld
15994 \begin_inset Quotes erd
15997 to automatically set up a document to use the
16003 File\SpecialChar \menuseparator
16005 \begin_inset space ~
16009 \begin_inset space ~
16014 to open your new document].
16015 The template file also contains some examples of the special paragraph
16016 environments used by this class.
16017 I'll describe those next.
16020 \begin_layout Subsection
16021 Paragraph Environments
16024 \begin_layout Subsubsection
16025 Supported Environments
16028 \begin_layout Standard
16029 The first thing you'll notice when you start up a new
16033 document is the font size and type: it's the equivalent of the size
16034 \begin_inset Quotes eld
16042 \begin_inset Quotes erd
16048 \begin_inset space ~
16054 This is also what's used in the output.
16056 \begin_inset Quotes eld
16060 \begin_inset Quotes erd
16063 to remind you that this is a slide.
16064 Your final slides will use a larger font; ergo, you'll have less space.
16065 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16068 \begin_layout Standard
16069 The next thing that becomes obvious is the changes to the paragraph environment
16070 pull-down box [at the far-left end of the toolbar].
16071 Most of the paragraph environments you're used to seeing are missing.
16072 There are also five new ones.
16077 class itself only supports certain paragraph environments:
16080 \begin_layout Itemize
16086 \begin_layout Itemize
16092 \begin_layout Itemize
16098 \begin_layout Itemize
16104 \begin_layout Itemize
16110 \begin_layout Itemize
16116 \begin_layout Itemize
16122 \begin_layout Itemize
16128 \begin_layout Itemize
16134 \begin_layout Itemize
16140 \begin_layout Itemize
16146 \begin_layout Standard
16147 All of the other standard environments, including the section-heading environmen
16148 ts, aren't used in the
16155 \begin_layout Standard
16156 On the other hand, you'll notice the following new environments:
16159 \begin_layout Itemize
16165 \begin_layout Itemize
16171 \begin_layout Itemize
16177 \begin_layout Itemize
16183 \begin_layout Itemize
16189 \begin_layout Standard
16190 These five are kind of quirky, due to a
16191 \begin_inset Quotes eld
16195 \begin_inset Quotes erd
16199 You see, LyX doesn't permit you to nest any other paragraph environment
16200 into an empty environment.
16201 Now, that's fine and dandy, but it means that you wouldn't be able to start
16202 a slide with anything except plain text.
16203 To deal with this, I've performed a little
16204 \begin_inset Quotes eld
16208 \begin_inset Quotes erd
16214 \begin_layout Subsubsection
16215 Quirks of the New Environments
16216 \begin_inset CommandInset label
16218 name "sec:slideQuirk"
16225 \begin_layout Standard
16226 All five of the new paragraph environments are somewhat quirky due to inherent
16227 limitiations in the current version of LyX.
16228 As I just mentioned, LyX forbids environments that begin with another environme
16230 To get around this, the
16234 environment isn't a paragraph environment as described in the
16242 \begin_layout Standard
16243 You should consider
16256 \begin_inset Quotes eld
16259 pseudo-environments.
16260 \begin_inset Quotes erd
16263 They look like a section heading or a
16264 \begin_inset Quotes eld
16272 \begin_inset Quotes erd
16275 but really begin a [and, if necessary, end the previous] paragraph environment.
16285 \begin_inset Quotes eld
16289 \begin_inset Quotes erd
16292 These two perform some action.
16295 \begin_layout Standard
16296 A common feature of all five environments,
16316 , is a rather long-ish label.
16317 The text following this label — ordinarily the contents of the paragraph
16318 environment — is utterly irrelevant for
16339 LyX completely ignores it.
16340 In fact, you can leave these five environments completely empty.
16344 \begin_layout Standard
16349 to put any text after the rather long-ish label, you might want to.
16350 This could be a short description of the contents of the
16355 In that case, enter your descriptive comment and hit
16359 as you normally would.
16362 \begin_layout Standard
16363 If, on the other hand, you don't want to enter any descriptive text, you'll
16364 hit another LyX quirk.
16365 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16366 environment until you put something in the old one.
16370 \begin_layout Itemize
16371 Start entering the text that will
16399 \begin_layout Itemize
16400 Now move to the beginning of that paragraph.
16404 \begin_layout Itemize
16413 \begin_layout Itemize
16414 Finally, change this new, empty paragraph to a
16438 \begin_layout Standard
16439 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16443 \begin_layout Subsection
16444 Making a Presentation with
16457 \begin_layout Subsubsection
16465 \begin_layout Standard
16466 If you're expecting this section to teach you how to actually make a presentatio
16467 n, you'll be sorely disappointed.
16468 Naturally, I'll describe all of the ways the
16472 class can assist you in preparing the materials for a presentation.
16473 Filling in the contents, however, is up to you.
16478 the LyX philosophy.]
16481 \begin_layout Standard
16486 environment [in the manner described in section
16487 \begin_inset space ~
16491 \begin_inset CommandInset ref
16493 reference "sec:slideQuirk"
16497 ] tells LyX to begin a new slide [duh].
16498 The label for this environment/
16499 \begin_inset Quotes erd
16503 \begin_inset Quotes erd
16507 \begin_inset Quotes eld
16511 \begin_inset Quotes erd
16514 in cool blue, followed by the label,
16515 \begin_inset Quotes eld
16519 \begin_inset Quotes erd
16523 Any text or paragraph environments that follow this one go on the new slide.
16527 \begin_layout Standard
16528 Slides are probably the only time you'll need to forcibly end pages in LyX
16529 (this can be specified in the
16534 In fact, you'll want to, once you finish entering the contents of one slide.
16535 If you've entered more text than can physically fit on a slide, the extra
16536 overflows onto a new slide.
16537 I don't recommend doing this, however, since the overflow slide won't have
16538 any page number on it.
16539 Furthermore, it may interfere with any
16543 you've made to accompany the oversized
16550 \begin_layout Standard
16559 environments work the same way as the
16564 They both create an
16565 \begin_inset Quotes eld
16569 \begin_inset Quotes erd
16572 followed by a label [
16573 \begin_inset Quotes eld
16577 \begin_inset Quotes erd
16581 \begin_inset Quotes eld
16585 \begin_inset Quotes erd
16589 The color is a stunning magenta instead of blue, and the
16590 \begin_inset Quotes eld
16594 \begin_inset Quotes erd
16597 will look different, in style and in length.
16598 The label fonts of all three also differ from one another.
16601 \begin_layout Standard
16606 , if the contents of a
16614 exceed the physical size of a slide or sheet of paper, the extra will overflow
16616 Again, you should avoid this.
16617 It defeats the whole purpose of
16628 \begin_layout Subsubsection
16638 \begin_layout Standard
16643 is a slide that sits atop another slide.
16644 Perhaps you wish to discuss a figure on the main
16648 before displaying the text associated with it.
16649 One way to accomplish this is tape a flap of dark paper over the part of
16654 you want to display later.
16655 This method fails, however, if you wish to overlap one graph with another,
16657 You would then have to fumble while speaking to align the two separate,
16662 s to align the two graphs.
16667 environment in both cases makes life much easier.
16670 \begin_layout Standard
16675 receives the page number of its
16676 \begin_inset Quotes eld
16680 \begin_inset Quotes erd
16688 \begin_inset Quotes eld
16696 \begin_inset Quotes erd
16703 \begin_layout Plain Layout
16704 Presumably, mutliple
16709 \begin_inset Quotes eld
16717 \begin_inset Quotes erd
16721 \begin_inset Quotes eld
16729 \begin_inset Quotes erd
16733 \begin_inset Quotes eld
16741 \begin_inset Quotes erd
16745 \begin_inset space ~
16748 appended to the page number of the parent
16758 Clearly, you want the contents of both the
16766 to each fit on a single physical slide! You should probably consider an
16772 \begin_inset Quotes eld
16776 \begin_inset Quotes erd
16788 class provides a visual cue for this: the label at the start of an
16792 is shorter than that at the start of a
16797 Lastly, when you generate printable output, you'll find alignment markers
16798 in all four corners of both the
16802 page and its parent
16807 These will assist you in lining up the two physical slides.
16810 \begin_layout Standard
16811 The major problem in overlaying two slides is aligning the contents of the
16812 two transparencies.
16813 How much space should you leave for that graph on the second slide? Worse
16814 still, what if you want a graph and a sentence on second slide, but there
16815 is text on the main transparency that goes in between them? You could try
16816 and insert vertical space of the right size.
16817 The better way is to use
16828 \begin_layout Standard
16829 As their names imply,
16837 are two command-like paragraph environments that make all subsequent text
16838 invisible and visible, respectively.
16840 \begin_inset space ~
16844 \begin_inset CommandInset ref
16846 reference "sec:slideQuirk"
16850 that you don't place anything
16854 these two environments, however.
16859 , it inserts a centered, sky-blue label into the page reading
16860 \begin_inset Quotes eld
16863 <Invisible Text Follows>
16864 \begin_inset Quotes erd
16868 For paragraphs following this label, the parts of the
16876 ; it doesn't matter which] where they would be contain instead blank space.
16880 \begin_layout Standard
16885 , the corresponding centered label is
16886 \begin_inset Quotes eld
16889 <Visible Text Follows>
16890 \begin_inset Quotes erd
16894 Paragraphs following this label behave normally.
16895 Note that the beginning of a new
16907 automatically shuts off an
16912 It's therefore not necessary to use
16923 \begin_layout Standard
16924 By now, it should be obvious how to create overlay transparencies using
16925 the proper combination of
16944 \begin_layout Enumerate
16949 , including everything that will appear on it, whether on the main slide
16957 \begin_layout Enumerate
16958 Before each figure or paragraph that will appear only on the
16967 If necessary, insert a
16971 environment after the
16978 \begin_layout Enumerate
16983 immediately following the
16990 \begin_layout Enumerate
16991 Copy the contents of this
17002 \begin_layout Enumerate
17007 , change all of the
17018 \begin_layout Standard
17020 You've just made an
17027 \begin_layout Standard
17028 There's one problem with the way I've designed the LyX
17032 class: you can't make text in the middle of a paragraph invisible, nor
17033 make text in the middle of an invisible paragraph visible again.
17034 To accomplish this feat, you'll need to use some inlined LaTeX codes.
17038 \begin_layout Plain Layout
17039 The commands of interest are:
17042 \begin_layout Itemize
17047 invisible \SpecialChar \ldots{}
17051 \begin_layout Itemize
17056 visible \SpecialChar \ldots{}
17060 \begin_layout Plain Layout
17061 \SpecialChar \ldots{}
17062 and need to be marked as TeX.
17064 \begin_inset Quotes eld
17068 \begin_inset Quotes erd
17071 you wish to change goes in between the brackets [and after the
17084 If you don't know how to mark text as TeX, see the appropriate section
17097 \begin_layout Subsubsection
17107 \begin_inset CommandInset label
17109 name "sec:slideNote"
17116 \begin_layout Standard
17125 is associated with a
17126 \begin_inset Quotes eld
17130 \begin_inset Quotes erd
17142 class provides visual cues.
17147 is shorter than that of a
17151 [yet longer than that of an
17155 ] and, like the label of an
17159 is shockingly magenta.
17160 Additionally, the printed
17164 has the page number of its
17165 \begin_inset Quotes eld
17169 \begin_inset Quotes erd
17177 \begin_inset Quotes eld
17185 \begin_inset Quotes erd
17189 \begin_inset Quotes eld
17197 \begin_inset Quotes erd
17201 \begin_inset Quotes eld
17209 \begin_inset Quotes erd
17213 You can have multiple
17217 s associated with a single
17229 , you'll probably want to break up long
17233 s so that they fit on a single sheet of paper.
17236 \begin_layout Standard
17241 is obvious: it contains anything additional you might want to say about
17247 It could also be used as a sheet of reminders for a particular
17252 In the case of the latter, you might want to make use of time markers.
17258 \begin_inset Quotes eld
17262 \begin_inset Quotes erd
17265 support for time markers, a
17270 So, you'll have to resort to using the LaTeX codes.
17273 \begin_layout Standard
17274 To use time markers, you'll need to specify the extra class option
17275 \begin_inset Quotes eld
17283 \begin_inset Quotes erd
17287 \begin_inset space ~
17291 \begin_inset CommandInset ref
17293 reference "sec:slidesetup"
17298 This option turns on timing marks, which will appear in the lower-left-hand
17304 To set what appears in the time marker, you use the LaTeX commands
17305 \begin_inset Quotes eld
17315 \begin_inset Quotes erd
17319 \begin_inset Quotes eld
17329 \begin_inset Quotes erd
17333 The arguments of both commands are time measured in seconds.
17335 \begin_inset Quotes eld
17345 \begin_inset Quotes erd
17348 sets the time marker to a given time.
17350 \begin_inset Quotes eld
17360 \begin_inset Quotes erd
17363 increments the time marker by the specified amount.
17364 Using time markers and
17368 s in this fashion, you can remind yourself how much time to spend on a particula
17376 \begin_layout Standard
17377 There's one last feature to describe.
17378 Clearly, you'd like to print out all of your
17386 s on transparencies while printing all of your
17403 with which it is associated.
17404 What's a person to do?
17407 \begin_layout Standard
17408 Luckily, there are two LaTeX commands that allow you to select what to print
17410 Both must be placed into the preamble of your document.
17412 \begin_inset Quotes eld
17424 \begin_inset Quotes erd
17427 will cause the output to contain only the
17436 Correspondingly, the command
17437 \begin_inset Quotes eld
17449 \begin_inset Quotes erd
17452 prevents the output of anything but
17457 I'd advise placing both commands in the preamble and initially comment
17459 You can then preview your entire presentation as you write.
17460 When you're done writing, you can then uncomment one of the two to select
17461 what you want to print.
17462 I like to uncomment
17463 \begin_inset Quotes eld
17475 \begin_inset Quotes erd
17478 , print to a file with
17479 \begin_inset Quotes eld
17487 \begin_inset Quotes erd
17490 in its name, comment it back out, then uncomment
17491 \begin_inset Quotes eld
17503 \begin_inset Quotes erd
17507 \begin_inset Quotes eld
17515 \begin_inset Quotes erd
17519 I can then send either file to a printer, loading transparencies or plain
17520 paper as appropriate.
17523 \begin_layout Standard
17524 You can also provide other arguments to the
17525 \begin_inset Quotes eld
17535 \begin_inset Quotes erd
17539 \begin_inset Quotes eld
17549 \begin_inset Quotes erd
17553 See a good LaTeX book for details.
17556 \begin_layout Subsection
17561 Class Template File
17564 \begin_layout Standard
17565 I have also provided a template file,
17566 \begin_inset Quotes eld
17574 \begin_inset Quotes erd
17582 To use it, begin your new presentation with
17587 ile\SpecialChar \menuseparator
17589 \begin_inset space ~
17593 \begin_inset space ~
17603 Your new LyX presentation file will contain an example
17624 additionally contain an example of the use of
17633 Lastly, the preamble will contain:
17636 \begin_layout LyX-Code
17637 % Uncomment to print out only slides and overlays
17640 \begin_layout LyX-Code
17644 \begin_layout LyX-Code
17650 \begin_inset Newline newline
17656 \begin_layout LyX-Code
17657 % Uncomment to print out only notes
17660 \begin_layout LyX-Code
17664 \begin_layout LyX-Code
17672 \begin_layout Standard
17673 One final thing: I created this class to support the LaTeX2e
17674 \begin_inset Quotes eld
17682 \begin_inset Quotes erd
17685 class, one of the built-in LaTeX2e classes.
17686 Neither I nor the rest of the LyX Team endorse or oppose the use of this
17687 built-in slide class.
17688 It's here if you want it or need it.
17689 There exist other LaTeX2e classes for creating presentations, such as the
17695 \begin_inset space ~
17699 \begin_inset CommandInset ref
17701 reference "sec:foiltex"
17706 \begin_inset Quotes eld
17714 \begin_inset Quotes erd
17717 package [present on some TeX distributions].
17718 The latter is not yet supported under LyX.
17722 \begin_layout Plain Layout
17723 Perhaps you can take on the task\SpecialChar \ldots{}
17729 I know nothing about these other classes.
17730 Try them out to see what sort of alternative they provide.
17733 \begin_layout Chapter
17734 LyX Features needing Extra Software
17737 \begin_layout Section
17741 \begin_layout Standard
17747 \begin_layout Subsection
17751 \begin_layout Standard
17760 \begin_layout Plain Layout
17765 is not yet available when you are using the LaTeX distribution MiKTeX.
17770 , you'll find in the
17777 \begin_inset space ~
17788 \begin_inset CommandInset href
17790 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17797 \begin_layout Standard
17802 package is a program that was written by
17803 \begin_inset Flex Noun
17806 \begin_layout Plain Layout
17808 \begin_inset space ~
17816 in frustration because some constructs in LaTeX are sometimes non-intuitive,
17817 and easy to forget.
17818 The program runs over your LaTeX file, checks the integrity of the file,
17819 and flags some common errors.
17820 In other technical words, it is
17827 \begin_layout Standard
17828 Well, what is a syntax checker doing in LyX which is supposed to produce
17829 correct LaTeX anyways? The answer is simple: Just as
17833 not only checks the
17837 of C programs, but also does
17841 checks for type-errors,
17845 catches some common
17849 errors, in addition to the syntactical ones.
17854 is capable of detecting several common errors, such as
17857 \begin_layout Itemize
17858 Ellipsis detection:
17859 \begin_inset Newline newline
17862 Use \SpecialChar \ldots{}
17866 \begin_layout Itemize
17867 No space in front of/after parenthesis:
17868 \begin_inset Newline newline
17874 \begin_layout Itemize
17875 Enforcement of normal space after common abbreviations:
17876 \begin_inset Newline newline
17880 \begin_inset space \thinspace{}
17884 \begin_inset space \space{}
17887 is too wide spacing.
17890 \begin_layout Itemize
17891 Enforcement of end-of-sentence space when the last sentence ends with a
17893 \begin_inset Newline newline
17897 And this is wrong spacing.
17900 \begin_layout Itemize
17901 Space in front of labels and similar commands:
17902 \begin_inset Newline newline
17905 The label should stick right up to the text to avoid falling to a wrong
17908 \begin_inset CommandInset label
17918 \begin_layout Plain Layout
17919 This footnote is in danger of falling off to a wrong page
17924 The label is separated too much.
17927 \begin_layout Itemize
17928 Space in front of references, instead of hard spaces:
17929 \begin_inset Newline newline
17932 In you are in bad luck, the text will break right between the referenced
17933 text and reference number, and that's a pity.
17935 \begin_inset CommandInset ref
17937 reference "sec:chktex"
17944 \begin_layout Itemize
17946 \begin_inset Quotes eld
17950 \begin_inset Quotes erd
17954 \begin_inset Formula $\times$
17958 \begin_inset Newline newline
17961 2x2 looks cheap compared to
17962 \begin_inset Formula $2\times2$
17968 \begin_layout Standard
17969 and more \SpecialChar \ldots{}
17970 It is an invaluable tool when you are
17971 \begin_inset Quotes eld
17975 \begin_inset Quotes erd
17978 your document before printing, and you should run it right after the obligatory
17979 spelling check, and before you go fine tuning the typesetting.
17982 \begin_layout Subsection
17986 \begin_layout Standard
17987 If you have the program installed, usage is as simple as choosing
17989 Tools\SpecialChar \menuseparator
17991 \begin_inset space ~
17997 This will make LyX generate a LaTeX file of your document, start
18001 to check it, and then make LyX insert
18002 \begin_inset Quotes eld
18006 \begin_inset Quotes erd
18009 with the warnings from
18013 , if there were any.
18014 The warnings will be placed close to the point of the mistake, and you
18015 can quickly find them by using the
18017 Navigate\SpecialChar \menuseparator
18020 menu item, or the shortcut key
18029 Open the error boxes by clicking on them with the mouse, or use the shortcut
18038 bindings, or the corresponding
18047 Read the warning and correct the mistake, if it is a mistake.
18048 If you have trouble understanding what the warning is about, you can safely
18050 Remember that there is a hidden layer between the document on screen and
18051 the technical details in invoking
18055 , and this gap can make some warnings seem arcane or just right down plain
18059 \begin_layout Standard
18060 This document is an excellent testing bed for the feature, and it should
18061 provide quite a few warnings for you to fiddle with.
18062 Since computers are only so smart, expect most of the warnings to be false
18066 \begin_layout Subsection
18067 How to fine tune it
18070 \begin_layout Standard
18071 Sometimes, you'll find that
18075 makes more noise than suits your mood.
18076 Then you can choose not to use it, wait until your mood changes, or try
18081 to get better along with you.
18084 \begin_layout Standard
18093 very configurable and extensible, you shouldn't expect to solve all problems
18099 Since LyX has to generate a somewhat special LaTeX file to be able to match
18100 the line numbers from the
18108 \begin_layout Plain Layout
18109 You can inspect the specific output from
18115 Edit\SpecialChar \menuseparator
18117 \begin_inset space ~
18121 \begin_inset space ~
18135 to the internal document structure, some of the warnings will not seen
18136 to appear correctly.
18137 There are two things you can do about this:
18140 \begin_layout Itemize
18145 invocation command line in
18161 installation configuration file (usually with the file
18166 See below to learn what warnings can be enabled and disabled on the command
18171 \begin_layout Itemize
18172 Export your document as a raw LaTeX file using
18174 File\SpecialChar \menuseparator
18175 Export\SpecialChar \menuseparator
18183 Invoked in this way, it can be a hassle to find the corresponding place
18184 in the document inside LyX, but with a little patience, you should be able
18188 \begin_layout Standard
18189 Here follows the warning messages that can be enabled and disabled in
18198 to disable a warning, and
18202 to enable a warning.
18203 The emphasized entries are disabled by default, because the default is
18206 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18211 \begin_layout Standard
18212 Notice that you should only use the options that enable and disable warnings,
18213 because LyX relies on some of the other command line parameters to be set
18214 in a specific way to have a chance to communicate with
18221 \begin_layout Enumerate
18225 Command terminated with space.
18228 \begin_layout Enumerate
18231 Non-breaking space (
18232 \begin_inset Quotes eld
18240 \begin_inset Quotes erd
18243 ) should have been used.
18246 \begin_layout Enumerate
18250 You should enclose the previous parenthesis with
18251 \begin_inset Quotes eld
18259 \begin_inset Quotes erd
18265 \begin_layout Enumerate
18268 Italic correction (
18269 \begin_inset Quotes eld
18279 \begin_inset Quotes erd
18282 ) found in non-italic buffer.
18285 \begin_layout Enumerate
18288 Italic correction (
18289 \begin_inset Quotes eld
18299 \begin_inset Quotes erd
18302 ) found more than once.
18305 \begin_layout Enumerate
18309 No italic correction (
18310 \begin_inset Quotes eld
18320 \begin_inset Quotes erd
18326 \begin_layout Enumerate
18330 \begin_inset Quotes eld
18338 \begin_inset Quotes erd
18342 \begin_inset Quotes eld
18350 \begin_inset Quotes erd
18356 \begin_layout Enumerate
18359 Wrong length of dash may have been used.
18362 \begin_layout Enumerate
18366 \begin_inset Quotes eld
18374 \begin_inset Quotes erd
18378 \begin_inset Quotes eld
18386 \begin_inset Quotes erd
18392 \begin_layout Enumerate
18396 \begin_inset Quotes eld
18404 \begin_inset Quotes erd
18410 \begin_layout Enumerate
18414 \begin_inset Quotes eld
18422 \begin_inset Quotes erd
18425 to achieve an ellipsis.
18428 \begin_layout Enumerate
18431 Inter-word spacing (
18432 \begin_inset Quotes eld
18442 \begin_inset Quotes eld
18445 ) should perhaps be used.
18448 \begin_layout Enumerate
18451 Inter-sentence spacing (
18452 \begin_inset Quotes eld
18462 \begin_inset Quotes erd
18465 ) should perhaps be used.
18468 \begin_layout Enumerate
18471 Could not find argument for command.
18474 \begin_layout Enumerate
18478 \begin_inset Quotes eld
18486 \begin_inset Quotes erd
18492 \begin_layout Enumerate
18495 Math mode still on at end of LaTeX file.
18498 \begin_layout Enumerate
18502 \begin_inset Quotes eld
18510 \begin_inset Quotes erd
18513 doesn't match the number of
18514 \begin_inset Quotes eld
18522 \begin_inset Quotes erd
18528 \begin_layout Enumerate
18531 You should use either
18534 \begin_inset Quotes eld
18542 \begin_inset Quotes erd
18547 as an alternative to
18548 \begin_inset Quotes eld
18556 \begin_inset Quotes erd
18562 \begin_layout Enumerate
18569 " (ASCII 39) instead of "
18576 \begin_layout Enumerate
18579 User-specified pattern found.
18582 \begin_layout Enumerate
18585 This command might not be intended.
18588 \begin_layout Enumerate
18595 \begin_layout Enumerate
18613 \begin_layout Enumerate
18616 Delete this space to maintain correct page references.
18619 \begin_layout Enumerate
18623 You might wish to put this between a pair of
18624 \begin_inset Quotes eld
18632 \begin_inset Quotes erd
18638 \begin_layout Enumerate
18641 You ought to remove spaces in front of punctuation.
18644 \begin_layout Enumerate
18647 Could not execute LaTeX command.
18650 \begin_layout Enumerate
18659 in front of small punctuation.
18662 \begin_layout Enumerate
18670 may look prettier here.
18673 \begin_layout Enumerate
18677 Multiple spaces detected in output.
18680 \begin_layout Enumerate
18683 This text may be ignored.
18686 \begin_layout Enumerate
18692 \begin_inset Quotes eld
18697 to begin quotation, not
18704 \begin_layout Enumerate
18711 to end quotation, not
18714 \begin_inset Quotes eld
18722 \begin_layout Enumerate
18728 \begin_layout Enumerate
18731 You should perhaps use
18732 \begin_inset Quotes eld
18740 \begin_inset Quotes erd
18746 \begin_layout Enumerate
18749 You should put a space in front of/after parenthesis.
18752 \begin_layout Enumerate
18755 You should avoid spaces in front of/after parenthesis.
18758 \begin_layout Enumerate
18762 You should not use punctuation in front of/after quotes.
18765 \begin_layout Enumerate
18768 Double space found.
18771 \begin_layout Enumerate
18774 You should put punctuation outside inner/inside display math mode.
18777 \begin_layout Enumerate
18780 You ought to not use primitive TeX in LaTeX code.
18783 \begin_layout Enumerate
18786 You should remove spaces in front of
18787 \begin_inset Quotes eld
18795 \begin_inset Quotes erd
18801 \begin_layout Enumerate
18804 \begin_inset Quotes eld
18812 \begin_inset Quotes erd
18815 is normally not followed by
18816 \begin_inset Quotes eld
18824 \begin_inset Quotes erd
18830 \begin_layout Standard
18831 In later versions of LyX, we hope to provide a more complete interface to
18832 this tool (and it's smaller cousin
18836 ) to exploit the full power of it.
18837 But it's not exactly useless as it is now: go try it on one of your existing
18838 documents of a certain length and be surprised.
18841 \begin_layout Section
18842 Version Control in LyX
18845 \begin_layout Standard
18848 Lars Gullik Bjønnes
18855 \begin_layout Subsection
18859 \begin_layout Standard
18860 A friend of mine wanted to try LyX for a group project.
18861 When he didn't find support for version control or file locking, he dropped
18863 This angered me a bit, so I thought that I should at least make support
18864 for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
18865 This has been done.
18866 LyX now supports some of the most basic RCS/CVS/SVN commands.
18867 If you need something a bit more sophisticated you will have to do that
18868 manually in a terminal.
18871 \begin_layout Standard
18872 Also note that CVS support is not as good as subversion support so we advice
18874 Good place to start with Subversion is SVN Book
18878 \begin_layout Plain Layout
18879 \begin_inset CommandInset href
18881 target "http://svnbook.red-bean.com/"
18891 In case of RCS you should read
18892 \begin_inset Quotes eld
18896 \begin_inset Quotes erd
18899 (a man file, read it with
18904 This file describes all the basic features of RCS.
18905 You should especially notice the comment about a RCS directory, and the
18906 notion of a master RCS file (the file ending in
18913 \begin_layout Standard
18914 Before you begin to use the version control features in LyX, you should
18915 be familiar with RCS/CVS/SVN usage.
18916 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18917 package—no guarantees are made for older versions.
18918 Most of the log messages are not currently displayed after operations —
18919 you can check them in Messages pane if unsure.
18922 \begin_layout Standard
18923 For introducing your own external commands consult vc-command in the manual
18927 \begin_layout Subsection
18928 RCS commands in LyX
18931 \begin_layout Standard
18932 The following sections describe the RCS commands supported by LyX.
18933 You can find them in the
18935 File\SpecialChar \menuseparator
18937 \begin_inset space ~
18943 LyX was tested against RCS 5.7.
18946 \begin_layout Subsubsection
18952 \begin_layout Standard
18953 If your document is not under revision control, this is the only item shown
18955 And if it is under revision control, the
18959 item is not visible.
18963 \begin_layout Standard
18964 This command registers your document with RCS (unless you are under the
18965 directory managed by CVS)\SpecialChar \@.
18966 You are asked interactively to supply an initial
18967 description of the document.
18968 The document is now set in Read-Only mode and you have to
18971 \begin_inset space ~
18975 \begin_inset space ~
18979 \begin_inset space ~
18984 , before making any changes to it.
18985 A document under revision control has a
18986 \begin_inset Quotes eld
18989 [RCS:<version> <locker>]
18990 \begin_inset Quotes erd
18993 item tagged to the filename in the minibuffer.
18996 \begin_layout Standard
18997 RCS command that is run:
18999 ci -q -u -i -t-"<initial description>" <file-name>
19002 \begin_layout Standard
19007 to understand the switches.
19011 \begin_layout Subsubsection
19017 \begin_layout Standard
19018 When you are finished editing a file, you check in your changes.
19019 When you do this, you are asked for a description of the changes.
19020 This is stored in the history log.
19021 The version number is bumped, your changes are applied to the master RCS
19022 file, the document is unlocked and set to Read-Only mode.
19026 \begin_layout Standard
19029 ci -q -u -m"<description>" <file-name>
19032 \begin_layout Subsubsection
19038 \begin_layout Standard
19039 By doing this you lock the document so that only you can edit it.
19040 This will also make the document Read-Write only for you.
19041 You will usually continue editing for a while and when you are finished
19042 you check in your changes.
19043 The status line is changed to reflect that you have locked the file.
19047 \begin_layout Standard
19050 co -q -l <file-name>
19053 \begin_layout Subsubsection
19056 Revert To Repository Version
19059 \begin_layout Standard
19060 This will discard all changes made to the document since the last check
19062 You get a warning before changes are discarded.
19065 \begin_layout Standard
19068 co -f -u<version> <file-name>
19071 \begin_layout Subsubsection
19077 \begin_layout Standard
19078 This makes as if the last check in never happened.
19079 No changes are made to the document loaded into LyX, but the last version
19080 is removed from the master RCS file.
19084 \begin_layout Standard
19087 rcs -o<version> <file-name>
19090 \begin_layout Subsubsection
19096 \begin_layout Standard
19097 This shows the complete history of the RCS document.
19102 is shown in a browser.
19110 \begin_layout Subsubsection
19114 \begin_layout Standard
19115 LyX supports RCS version number, author name, date and time of last commit.
19116 All those are extracted from
19118 rlog -r <file-name>
19121 For other details see
19122 \begin_inset CommandInset ref
19124 reference "sub:VCS-Revision-Information"
19131 \begin_layout Subsection
19132 CVS commands in LyX
19135 \begin_layout Standard
19136 A subset of CVS operations is supported by LyX.
19137 You can find the commands in the
19139 File\SpecialChar \menuseparator
19141 \begin_inset space ~
19147 The version control system SVN is more powerful, so please use it instead
19148 of CVS if possible.
19151 \begin_layout Subsubsection
19157 \begin_layout Standard
19158 If you start from scratch with CVS you have to create your repository and
19159 checkout the working copy with external tools.
19160 If you're using a client-server setup you may need to login before doing
19161 the first repository checkout.
19164 \begin_layout Standard
19165 If your documents are under revision control and others are using the same
19166 repository problems arise when different changes to the same document at
19167 the same location happen.
19168 Standard CVS repositories doesn't operate with a file locking mechanism.
19169 This may be surprising, but conflicts only occur if people disagree on
19170 the proper content of the same part of a document.
19171 So, if co-workers are used to communicate regularly, these conflicts occur
19173 If they don't communicate they have a fundamental problem anyway.
19174 Nevertheless some people like to work with so called
19175 \begin_inset Quotes eld
19179 \begin_inset Quotes erd
19183 If they do so the working copy of all files is readonly when checked out
19184 first and the user starts editing after using a special command to make
19185 the working copy writable.
19186 When the changes are checked in the working copy returns to readonly state.
19187 With LyX one has to edit the
19188 \begin_inset Flex Code
19191 \begin_layout Plain Layout
19197 file and add the line
19198 \begin_inset Flex Code
19201 \begin_layout Plain Layout
19207 to work with reserved checkouts.
19208 The benefit is the possibility to see who is using a writable copy of some
19210 It's not guaranteed only one user makes a copy writable.
19213 \begin_layout Standard
19214 LyX tries to guess if you're using reserved or non-reserved checkouts.
19215 If your working copy is readonly or it is writable and an additional copy
19216 of your document exists in the CVS/Base sub-directory a reserved otherwise
19217 a non-reserved checkout is assumed.
19218 When a reserved checkout is detected you have to use
19219 \begin_inset Flex MenuItem
19222 \begin_layout Plain Layout
19228 to make your working copy writable if it's readonly.
19230 \begin_inset Flex MenuItem
19233 \begin_layout Plain Layout
19239 operation is possible and that makes your working copy readonly again after
19240 transferring your changes to the repository.
19243 \begin_layout Standard
19244 More information about CVS can be found here
19245 \begin_inset Flex URL
19248 \begin_layout Plain Layout
19250 http://www.nongnu.org/cvs
19256 \begin_inset Flex URL
19259 \begin_layout Plain Layout
19261 http://ximbiot.com/cvs
19269 \begin_layout Standard
19274 to understand the sub-commands and the switches mentioned below.
19277 \begin_layout Subsubsection
19283 \begin_layout Standard
19284 If your document is not under revision control, this is the only item shown
19286 And if it is under revision control, the
19293 item is not visible.
19297 \begin_layout Standard
19298 This command registers in CVS your document
19299 \begin_inset Flex Strong
19302 \begin_layout Plain Layout
19310 in case you have already the documents directory under CVS control (in
19316 This means you have to create or checkout the archive by yourself using
19318 (In case you forget that step LyX registers the document with RCS.)
19321 \begin_layout Standard
19322 Then you are asked interactively to supply an initial description of the
19324 Don't forget that registered file is not yet checked in.
19327 \begin_layout Standard
19328 CVS command that is run:
19330 cvs -q add -m"<entered message>" "<file-name>"
19333 \begin_layout Standard
19338 above and for all other CVS commands is an abbreviation for
19339 \begin_inset Quotes eld
19342 change the current working directory to file location and use the file name
19343 without path component as argument
19344 \begin_inset Quotes erd
19350 \begin_layout Subsubsection
19356 \begin_layout Standard
19357 When you are finished editing a file, you commit your changes.
19358 When you do this and you had changed the document, you are asked for a
19359 description of the changes.
19360 After that changes are written to the repository.
19361 In case you didn't change the document and a reserved checkout is detected
19362 the reservation made on
19363 \begin_inset Flex MenuItem
19366 \begin_layout Plain Layout
19375 \begin_layout Labeling
19376 \labelwidthstring 00.00.0000
19378 \begin_inset space ~
19382 \begin_inset space ~
19386 \begin_inset Newline newline
19390 \begin_inset Flex Code
19393 \begin_layout Plain Layout
19396 -q commit -m"<description>" "<file-name>"
19402 \begin_inset Newline newline
19406 \begin_inset Flex Code
19409 \begin_layout Plain Layout
19420 \begin_layout Subsubsection
19426 \begin_layout Standard
19427 When you are sharing a repository with others, you may have to incorporate
19428 their changes into your working copy.
19431 \begin_layout Standard
19434 cvs -q update "<file-name>"
19437 \begin_layout Standard
19438 If a readonly checkout is detected the working copy is made writable and
19442 \begin_layout Standard
19445 cvs -q edit "<file-name>"
19448 \begin_layout Subsubsection
19451 Revert To Repository Version
19454 \begin_layout Standard
19455 This will discard all changes made to the document since the last check
19457 You get a warning before changes are discarded.
19458 Firstly the file is deleted, secondly CVS update command is run.
19461 \begin_layout Standard
19464 cvs -q update "<file-name>"
19467 \begin_layout Standard
19468 If a reserved checkout is detected and the working copy has no changes only
19469 the reservation is undone.
19472 \begin_layout Standard
19475 cvs -q unedit "<file-name>"
19478 \begin_layout Subsubsection
19479 Update of the local directory checkout from repository
19482 \begin_layout Standard
19483 Once your documents gets more complex, containing sub-documents and pictures,
19485 \begin_inset Flex Code
19488 \begin_layout Plain Layout
19494 files and so on using version control becomes more complicated.
19495 LyX supports updating the whole tree in which resides the document.
19496 This become especially useful once you cooperate with people which neither
19497 have detailed knowledge about CVS usage nor they have ambition to commit
19498 additional material to the repository.
19499 You have to organize the files structure so that all external files are
19500 in the same directory or subdirectories of the document.
19501 It's good practice anyway to store multipart documents in an extra directory.
19504 \begin_layout Standard
19506 \begin_inset Flex Code
19509 \begin_layout Plain Layout
19510 Update local directory from repository
19515 command updates the whole directory.
19516 If local changes are detected user is warned before update starts.
19517 In case of merge conflicts both versions of the conflicting document parts
19518 are placed in the final document.
19519 You have to review and correct the result of the merge.
19520 You'll find the conflicts enclosed in pairs of
19521 \begin_inset Flex Code
19524 \begin_layout Plain Layout
19531 \begin_inset Flex Code
19534 \begin_layout Plain Layout
19541 \begin_inset Flex Code
19544 \begin_layout Plain Layout
19551 The first part is your version as before the update operation with the
19552 document name prepended.
19553 The second one is the repository version with the version number after
19555 \begin_inset Flex Code
19558 \begin_layout Plain Layout
19567 \begin_layout Labeling
19568 \labelwidthstring 00.00.0000
19570 \begin_inset space ~
19574 \begin_inset space ~
19578 \begin_inset Newline newline
19582 \begin_inset Flex Code
19585 \begin_layout Plain Layout
19593 (Ask if changes are detected.)
19594 \begin_inset Newline newline
19598 \begin_inset Flex Code
19601 \begin_layout Plain Layout
19602 cd $path; cvs -q update
19612 \begin_layout Standard
19614 \begin_inset Flex Code
19617 \begin_layout Plain Layout
19623 stands for the path to the document.
19626 \begin_layout Subsubsection
19632 \begin_layout Standard
19633 This shows the complete history of the CVS document.
19636 cvs log "<file-name>"
19638 is shown in a browser.
19641 \begin_layout Subsection
19642 SVN commands in LyX
19645 \begin_layout Standard
19646 SVN is now partially supported by LyX.
19647 You can find the commands in the
19649 File\SpecialChar \menuseparator
19651 \begin_inset space ~
19657 Please note that if you use password protected access to repository via
19658 ssh, you will be asked in terminal window.
19659 LyX was tested against SVN 1.5 and 1.6
19663 \begin_layout Plain Layout
19664 Most of the commands will work with 1.4 too, see
19665 \begin_inset CommandInset ref
19667 reference "sub:SVN-Repo-Update"
19679 \begin_layout Subsubsection
19685 \begin_layout Standard
19686 If your document is not under revision control, this is the only item shown
19688 And if it is under revision control, the
19695 item is not visible.
19699 \begin_layout Standard
19700 This command registers in SVN your document ONLY in case you have already
19701 the documents directory under SVN control (in particular
19706 This means you have to checkout the archive by yourself.
19710 \begin_layout Standard
19711 Then you are asked interactively to supply an initial description of the
19713 Don't forget that registered file is not yet commited.
19716 \begin_layout Standard
19717 SVN command that is run:
19720 \begin_inset Quotes eld
19724 \begin_inset Quotes erd
19730 \begin_layout Standard
19735 to understand the switches.
19739 \begin_layout Subsubsection
19745 \begin_layout Standard
19746 When you are finished editing a file, you commit your changes.
19747 When you do this, you are asked for a description of the changes.
19748 After that changes are commited.
19751 \begin_layout Standard
19756 \begin_layout Plain Layout
19757 In case locking is not enabled.
19759 \begin_inset CommandInset ref
19761 reference "subsec:SVN-File-Locking"
19772 svn commit -q -m"<description>" <file-name>
19775 \begin_layout Subsubsection
19781 \begin_layout Standard
19782 Updates the changes of this file from the repository.
19783 Be sure you understand SVN merging and conflicts resolving before using
19784 this function, because all conflicts has to be resolved manually by you!
19787 \begin_layout Standard
19792 \begin_layout Plain Layout
19800 svn update --non-interactive
19801 \begin_inset Quotes eld
19805 \begin_inset Quotes erd
19811 \begin_layout Subsubsection
19814 Revert To Repository Version
19817 \begin_layout Standard
19818 This will discard all changes made to the document since the last check
19820 You get a warning before changes are discarded.
19824 \begin_layout Standard
19828 \begin_inset Quotes eld
19832 \begin_inset Quotes erd
19838 \begin_layout Subsubsection
19839 \begin_inset CommandInset label
19841 name "sub:SVN-Repo-Update"
19845 Update of the local directory checkout from repository
19849 \begin_layout Plain Layout
19850 Note that this command will work only with subversion
19851 \begin_inset Formula $\geqq1.5$
19862 \begin_layout Standard
19863 All the commands above have one shortcomming - they deal with the current
19865 Once your document contains pictures, includes external
19866 \begin_inset Flex Code
19869 \begin_layout Plain Layout
19875 files and so on administration becomes more complicated.
19876 LyX now supports updating the whole tree in which resides the document
19880 \begin_layout Plain Layout
19881 One need to organize the files structure so that all external files are
19882 in the same directory or subdirectories of the document.
19889 This become especially useful once you cooperate with people which neither
19890 know about subversion management nor they have ambition to commit additional
19891 material to the repository.
19895 \begin_layout Standard
19896 \begin_inset Flex Code
19899 \begin_layout Plain Layout
19900 Update local directory from repository
19905 command updates the whole directory and in case of merge conflicts local
19906 version of the files are left, so no unintended data loss occurs.
19907 If local changes are detected user is warned before update starts.
19910 \begin_layout Labeling
19911 \labelwidthstring 00.00.0000
19913 \begin_inset space ~
19917 \begin_inset space ~
19921 \begin_inset Newline newline
19925 \begin_inset Flex Code
19928 \begin_layout Plain Layout
19934 (Ask if changes are detected.)
19935 \begin_inset Newline newline
19939 \begin_inset Flex Code
19942 \begin_layout Plain Layout
19943 svn update --accept mine-full $path
19951 \begin_layout Standard
19953 \begin_inset Flex Code
19956 \begin_layout Plain Layout
19962 stands for the path to the document.
19965 \begin_layout Subsubsection
19971 \begin_layout Standard
19972 This shows the complete history of the SVN document.
19976 \begin_inset Quotes eld
19980 \begin_inset Quotes erd
19985 is shown in a browser.
19988 \begin_layout Subsubsection
19990 \begin_inset CommandInset label
19992 name "subsec:SVN-File-Locking"
19999 \begin_layout Standard
20000 The file exchange through various revision control systems brings the problem
20001 of merge conflicts in case two different users try to edit the same (parts
20003 When such a conflict happens it needs manual resolving and one reasonable
20004 alternative is to provide some kind of locking mechanism, which guarantees
20005 that only one user is allowed to edit file at the given time.
20008 \begin_layout Standard
20009 SVN has two such mechanisms to provide mutual exclusivity for file access
20010 - locks and automatic setting of write permissions (see sec.
20012 \begin_inset CommandInset ref
20014 reference "subsec:Automatical-Locking-Property"
20019 \begin_inset Flex Code
20022 \begin_layout Plain Layout
20032 \begin_layout Plain Layout
20033 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20039 If this property is detected for a given document LyX starts to use SVN
20040 locks for document editing automatically and the whole check-in/out mechanism
20041 switches to the same regimen as for RCS.
20042 This in particular means there are two different modes of file use in LyX:
20045 \begin_layout Itemize
20047 The loaded file is in the read-only mode.
20048 For editing on needs to check-out.
20053 consists of updating from the repository and gaining write lock.
20054 If the lock is not possible to obtain, we remain in unlocked state.
20057 \begin_layout Itemize
20059 The loaded file is in the 'normal' edit mode.
20060 No other user is allowed to edit the file.
20065 consists of commiting changes and releasing write-lock.
20066 If no changes have been made to the document, no commit will be produced
20070 \begin_layout Plain Layout
20071 Don't be puzzled by the fact that you will be asked for commit message anyway.
20076 and only the write-lock will be released.
20079 \begin_layout Standard
20083 \begin_layout Labeling
20084 \labelwidthstring 00.00.0000
20087 svn commit -q -m"<description>" "<file-name>"
20088 \begin_inset Newline newline
20091 svn unlock "<file-name>"
20094 \begin_layout Labeling
20095 \labelwidthstring 00.00.0000
20098 svn update "<file-name>"
20099 \begin_inset Newline newline
20102 svn lock "<file-name>"
20105 \begin_layout Subsubsection
20108 \begin_inset CommandInset label
20110 name "subsec:Automatical-Locking-Property"
20116 Automatic Locking Property
20119 \begin_layout Standard
20120 The above mentioned automatic setting of write permissions of the .lyx file
20126 ile\SpecialChar \menuseparator
20132 \begin_inset space ~
20135 Control\SpecialChar \menuseparator
20140 oggle locking property
20143 This command is active only when the file is not locked on the svn server
20145 you need to check-out before proceeding).
20148 \begin_layout Labeling
20149 \labelwidthstring 00.00.0000
20151 \begin_inset space ~
20157 \begin_layout Labeling
20158 \labelwidthstring 00.00.0000
20161 svn propset svn:needs-lock ON "<file-name>"
20164 \begin_layout Labeling
20165 \labelwidthstring 00.00.0000
20168 svn propdel svn:needs-lock "<file-name>"
20171 \begin_layout Subsubsection
20172 \begin_inset CommandInset label
20174 name "sub:VCS-Revision-Information"
20178 Revision Information in Documents
20181 \begin_layout Standard
20182 There are more possibilities how to activate revision information in our
20186 \begin_layout Itemize
20187 LyX supports directly:
20191 \begin_layout Itemize
20192 tree revision information (
20193 \begin_inset Flex Code
20196 \begin_layout Plain Layout
20203 The result is the output of the
20204 \begin_inset Flex Code
20207 \begin_layout Plain Layout
20213 command, the following table gives you an idea, how to read the results.
20216 \begin_layout Standard
20218 \begin_inset Tabular
20219 <lyxtabular version="3" rows="6" columns="2">
20220 <features tabularvalignment="middle">
20221 <column alignment="center" valignment="top" width="0">
20222 <column alignment="center" valignment="top" width="0">
20224 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20227 \begin_layout Plain Layout
20233 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20236 \begin_layout Plain Layout
20244 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20247 \begin_layout Plain Layout
20253 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20256 \begin_layout Plain Layout
20257 mixed revision working copy
20264 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20267 \begin_layout Plain Layout
20273 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20276 \begin_layout Plain Layout
20277 modified working copy
20284 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20287 \begin_layout Plain Layout
20293 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20296 \begin_layout Plain Layout
20297 switched working copy
20304 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20307 \begin_layout Plain Layout
20313 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20316 \begin_layout Plain Layout
20317 partial working copy, from a sparse checkout
20324 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20327 \begin_layout Plain Layout
20333 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20336 \begin_layout Plain Layout
20337 mixed revision, modified, switched working copy
20350 \begin_layout Itemize
20351 file revision information.
20352 The result comes from parsing the output of
20353 \begin_inset Flex Code
20356 \begin_layout Plain Layout
20358 \begin_inset space ~
20362 \begin_inset space ~
20366 \begin_inset space ~
20375 Supported flags are:
20379 \begin_layout Itemize
20380 version number of the last commit (
20381 \begin_inset Flex Code
20384 \begin_layout Plain Layout
20393 \begin_layout Itemize
20394 author of the last commit (
20395 \begin_inset Flex Code
20398 \begin_layout Plain Layout
20407 \begin_layout Itemize
20408 date of the last commit (
20409 \begin_inset Flex Code
20412 \begin_layout Plain Layout
20421 \begin_layout Itemize
20422 time of the last commit (
20423 \begin_inset Flex Code
20426 \begin_layout Plain Layout
20436 \begin_layout Standard
20437 You can obtain this info via InsetInfo (e.g.
20439 \begin_inset Flex Code
20442 \begin_layout Plain Layout
20443 info-insert buffer vcs-date
20449 The information will be available only when you have the file stored under
20450 svn managment (i.e.
20452 \begin_inset Flex Code
20455 \begin_layout Plain Layout
20461 directory is available with your document).
20465 \begin_layout Itemize
20466 Another---a hacking one---possibility is to use svn keywords
20470 \begin_layout Plain Layout
20471 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20477 In short -- you set file keywords property (e.g.
20480 svn propset svn:keywords 'Rev' file.lyx
20482 ) and then paste keyword TeX code
20486 \begin_layout Plain Layout
20487 This is an easy way how to ensure that LyX won't break the line in the middle
20493 tag in your document (e.g.
20498 \begin_layout Plain Layout
20506 This way svn client will automatically substitute revision number (e.g.
20511 \begin_layout Plain Layout
20518 ) after each update and commit.
20519 There are more problems with this approach.
20520 Firstly, the '$' character is used in TeX world for math equations, so
20521 any occurence of math formula
20522 \begin_inset Formula $Rev$
20526 \begin_inset Formula $Rev:59$
20529 in your LyX document.
20530 Similarly for other keywords like Id, Date, Author, etc.
20531 Secondly svn output is dependent on your locales, so its very easy that
20532 svn would produce some problematic strings once Date is used.
20533 Thirdly you get the whole 'Rev: 59' string in your document instead of
20535 Until subversion implements user's custom keywords it will be hard to use
20536 this approach reliably or let LyX to support it directly.
20539 \begin_layout Subsection
20540 SVN and Windows Environment
20543 \begin_layout Quote
20544 My inclination is to say that if the user cannot figure out the command
20545 line operations on their own fairly quickly, they would be well advised
20546 to use TortoiseSVN.
20552 \begin_layout Subsubsection
20556 \begin_layout Standard
20557 In addition to installing LyX, and having access to a Subversion repository,
20558 the user will need to install the Subversion client program.
20559 A Windows installer for the client program is available from
20560 \begin_inset CommandInset href
20563 target "http://www.collab.net/nonav/downloads/subversion/"
20568 The user may also want to install
20569 \begin_inset CommandInset href
20572 target "http://tortoisesvn.tigris.org/"
20576 , which integrates Subversion operations into the context (rightclick) menu
20577 of Windows Explorer.
20578 Operations done outside LyX will typically be more convenient using the
20579 Explorer context menu.
20580 Note that TortoiseSVN is not a replacement for the client program, which
20581 is what LyX itself will use.
20584 \begin_layout Subsubsection
20585 Bringing a document under Subversion control
20588 \begin_layout Standard
20589 Before a LyX document can be brought under version control in Subversion,
20590 its parent directory needs to be under version control.
20591 If the document is being added to a project already in the repository,
20592 this is accomplished by checking the project out to the directory where
20593 the new document will be placed.
20594 If the project itself is not yet under version control (for instance, if
20595 this document starts a new project), the directory must be imported into
20597 This is done outside LyX.
20598 Both import and checkout are easily accomplished from the Explorer context
20599 menu using TortoiseSVN, or alternatively can be done using the command
20600 line client at a DOS prompt.
20601 The procedure for importing the project using TortoiseSVN is described
20602 below, assuming an existing repository and a new project being started
20610 For information on using the Subversion client program, run
20617 \begin_layout Enumerate
20624 in Windows Explorer, right click it, and select
20626 TortoiseSVN > Repo-browser
20629 If necessary, adjust the URL for the repository, then click OK.
20632 \begin_layout Enumerate
20633 Right click the level of the repository under which you want to place the
20634 new project folder (typically the top level) and click
20636 Create folder\SpecialChar \ldots{}
20639 Supply a name for the project folder and click OK.
20640 Add a message for the log file if desired, then click OK again.
20641 The new project folder should appear in the repository.
20642 Finally, click OK again to exit the repository browser.
20645 \begin_layout Enumerate
20646 Once again right click
20652 , this time selecting SVN Checkout\SpecialChar \ldots{}
20653 Select the URL of the project folder
20654 you just created in the repository, and set the checkout directory to
20662 You will be warned about a non-empty folder; click OK to proceed.
20663 You should now have a
20674 \begin_layout Enumerate
20675 Create or open your document in LyX and click
20680 ile\SpecialChar \menuseparator
20686 \begin_inset space ~
20689 Control\SpecialChar \menuseparator
20697 Add a log message and click OK to commit the document to version control.
20700 \begin_layout Standard
20701 From this point onward, you should have full functionality in the
20706 ile\SpecialChar \menuseparator
20712 \begin_inset space ~
20718 You also have the option of checking the document in and out, viewing its
20720 using the TortoiseSVN context menu in Windows Explorer or the Subversion
20721 client program from a command prompt.
20724 \begin_layout Subsubsection
20725 SSH tunnel used with SVN under Windows
20728 \begin_layout Standard
20729 Compared with Linux setting up svn client to communicate over ssh under
20730 Windows is a rather troublesome task.
20731 We will at least offer some hints how to setup the client side but prior
20732 knowledge about ssh and the Windows command line is needed, also be prepared
20733 for a great deal of frustration\SpecialChar \ldots{}
20737 \begin_layout Enumerate
20738 Get a svn client for windows, as described in the previous sections.
20739 When it is a fresh install run some svn command (e.g.
20741 \begin_inset Flex Code
20744 \begin_layout Plain Layout
20750 ) to create config files, which you will need to change later on.
20753 \begin_layout Enumerate
20754 Choose a ssh client for Windows.
20755 There are several possibilities, we will use the one from Putty tools
20759 \begin_layout Plain Layout
20760 \begin_inset Flex URL
20763 \begin_layout Plain Layout
20765 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20776 You will need to set the connection up so that the client doesn't ask for
20777 any password from you.
20778 To keep things easy we will use only keys without any additional password
20783 \begin_layout Enumerate
20785 \begin_inset Flex Code
20788 \begin_layout Plain Layout
20795 Save your private .ppk key file and put the public one on the server side.
20796 If the SVN server runs on Linux, note that the format of the public key
20797 is not compatible with Linux openssh and you will need to direcly copy-paste
20800 Public key for pasting into OpenSSH authorized_keys file
20802 :” edit field into the server's
20803 \begin_inset Flex Code
20806 \begin_layout Plain Layout
20807 ~/.ssh/authorized_keys
20813 \begin_inset Flex Code
20816 \begin_layout Plain Layout
20825 \begin_layout Enumerate
20827 \begin_inset Flex Code
20830 \begin_layout Plain Layout
20837 In the SVN config file
20841 \begin_layout Plain Layout
20842 Exact path depends on Windows version, usually somewhere around
20843 \begin_inset Flex Code
20846 \begin_layout Plain Layout
20849 Documents and Settings
20863 \begin_inset Flex Code
20866 \begin_layout Plain Layout
20881 , section [tunnels], setup ssh command, e.g.
20883 \begin_inset Flex Code
20886 \begin_layout Plain Layout
20887 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20896 \begin_layout Plain Layout
20897 It will usually take a lot of time to get exact command right and it depends
20899 For example do not have some remote server saved as a default session in
20901 If things fail, try to connect via plink without SVN first.
20910 \begin_layout Enumerate
20911 Checkout the SVN archive, e.g.
20913 \begin_inset Flex Code
20916 \begin_layout Plain Layout
20917 svn co svn+ssh://user@server/repository_path
20925 \begin_layout Subsubsection
20926 End-of-Line Conversions
20929 \begin_layout Standard
20930 When the collaborators are mixing Linux and Windows environments, LyX will
20931 use different line endings inside the .lyx files.
20932 This is not a problem as far as LyX functionality is concerned, but the
20933 commit diffs will be huge and merge-conflicts prone.
20934 Fortunately SVN itself knows
20938 \begin_layout Plain Layout
20939 \begin_inset Flex URL
20942 \begin_layout Plain Layout
20944 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
20954 how to deal with CR/LF problems when switching .lyx files to the
20955 \begin_inset Flex Code
20958 \begin_layout Plain Layout
20968 \begin_layout Plain Layout
20970 \begin_inset Flex Code
20973 \begin_layout Plain Layout
20974 svn propset svn:eol-style native FILE_NAME
20987 \begin_layout Subsection
20991 \begin_layout Standard
20992 With the recent addition of the vc-command function LyX power users are
20993 allowed to create their own commands for revision control.
20996 \begin_layout Standard
20997 As an example you can see how two TortoiseSVN commands could be integrated
21001 \begin_layout Description
21003 \begin_inset Flex Code
21006 \begin_layout Plain Layout
21007 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21015 \begin_layout Description
21017 \begin_inset Flex Code
21020 \begin_layout Plain Layout
21021 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21029 \begin_layout Subsection
21030 Version control and Document comparison
21033 \begin_layout Standard
21034 One of the typical uses of version control is to inspect the changes between
21035 revisions, usually by creating
21036 \begin_inset Flex Code
21039 \begin_layout Plain Layout
21046 While this is useful for plain text files, it is much less useful in the
21047 case of LyX files, which have more complicated structure.
21048 Hence we provide binding to the Document comparison feature.
21049 They are two ways of calling this feature - either by direct call of
21050 \begin_inset Flex Code
21053 \begin_layout Plain Layout
21059 LyX function (for details see LyX functions manual) or by icon/menu item
21061 \begin_inset Flex MenuItem
21064 \begin_layout Plain Layout
21065 Compare with older revision...
21071 One can either compare two chosen revisions of the document or he can simply
21072 compare the current version of edited text with older revisions (where
21074 \begin_inset Flex MenuItem
21077 \begin_layout Plain Layout
21083 ' revisions back means comparison of the edited file with last commited
21088 \begin_layout Standard
21089 This feature is supported for SVN and RCS though due to the more complicated
21090 versioning scheme of RCS there is a constraint -- when addressing the revisions
21091 in dialog, numbers always point to the last number in RCS revision number,
21096 \begin_layout Section
21097 Literate Programming
21100 \begin_layout Standard
21105 (kayvan@sylvan.com)
21109 original documentation written by
21111 Edmar Wienskoski Jr.
21114 (edmar-w-jr@technologist.com)
21117 \begin_layout Subsection
21121 \begin_layout Standard
21122 The main purpose of this documentation is to show you how to use LyX for
21123 literate programming, where it is assumed that you are familiar with this
21124 programming technique, and know what
21125 \begin_inset Quotes eld
21129 \begin_inset Quotes erd
21133 \begin_inset Quotes eld
21137 \begin_inset Quotes erd
21141 If that is not the case, please follow the web links provided in the following
21143 There is a lot of good documentation out there covering old development
21144 history to the latest tools tips.
21147 \begin_layout Standard
21148 It is also assumed that you are familiar with LyX itself to a point that
21149 you are comfortable changing your LyX preferences, and X resources file.
21150 If that is not the case please refer to other LyX documentation to cover
21151 your specific needs.
21154 \begin_layout Subsection
21155 Literate Programming
21158 \begin_layout Standard
21159 From the Literate Programming FAQ:
21162 \begin_layout Quotation
21163 Literate programming is the combination of documentation and source together
21164 in a fashion suited for reading by human beings.
21165 In fact, literate programs should be enjoyable reading, even inviting!
21166 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21167 and documentation in a single file.
21168 Literate programming tools then parse the file to produce either readable
21169 documentation or compilable source.
21170 The WEB style of literate programming was created by D.
21171 \begin_inset space \thinspace{}
21175 Knuth during the development of his TeX typesetting software.
21179 \begin_layout Standard
21180 Another excerpt says:
21183 \begin_layout Quotation
21186 How is literate programming different from verbose commenting?
21189 \begin_layout Quotation
21190 There are three distinguishing characteristics.
21191 In order of importance, they are:
21195 \begin_layout Itemize
21196 flexible order of elaboration
21199 \begin_layout Itemize
21200 automatic support for browsing
21203 \begin_layout Itemize
21204 typeset documentation, especially diagrams and mathematics
21208 \begin_layout Standard
21209 Now that I sparked your curiosity, take a look in the references.
21212 \begin_layout Subsubsection
21216 \begin_layout Standard
21217 The complete Literate Programming FAQ can be found at:
21220 \begin_layout Quote
21221 Literate Programming FAQ
21222 \begin_inset Flex URL
21225 \begin_layout Plain Layout
21227 http://www.literateprogramming.com/lpfaq.pdf
21235 \begin_layout Standard
21236 The FAQ lists 23 (twenty three!) different literate programming tools.
21237 Where some are specialized or
21238 \begin_inset Quotes eld
21242 \begin_inset Quotes erd
21245 for particular programming languages, while other have general scope.
21250 for my own use for several reasons:
21253 \begin_layout Itemize
21254 It can generate the documentation either in LaTeX or HTML.
21257 \begin_layout Itemize
21258 It has a open architecture, i.
21259 \begin_inset space \thinspace{}
21263 \begin_inset space \space{}
21266 it is easy to plug in new filters and to perform special processing that
21271 \begin_layout Itemize
21272 There is a good selection of filters available already (the HTML is one
21276 \begin_layout Itemize
21280 \begin_layout Standard
21281 The Noweb web page can be found at:
21284 \begin_layout Quote
21286 \begin_inset Flex URL
21289 \begin_layout Plain Layout
21291 http://www.cs.virginia.edu/~nr/noweb/
21299 \begin_layout Standard
21300 Starting from there you can reach many other interesting links and even
21301 some literate program examples.
21304 \begin_layout Subsection
21305 LyX and Literate Programming
21308 \begin_layout Standard
21309 The LyX support for Literate Programming is provided by using the generic
21310 LyX converters mechanism.
21311 This support is provided in a
21312 \begin_inset Quotes eld
21316 \begin_inset Quotes erd
21320 \begin_inset space \thinspace{}
21324 \begin_inset space \space{}
21327 you will be able to use this new LyX feature with some other literate programmin
21328 g tool of your choice by just changing your LyX preferences.
21331 \begin_layout Subsubsection
21332 Generating documents and code (weaving and tangling)
21335 \begin_layout Paragraph
21336 Selecting the document class
21339 \begin_layout Standard
21340 If you have installed Noweb and LyX successfully, whenever you open a new
21341 document or try to change the document class of an existing one, you will
21342 find that there are three new document classes available:
21345 \begin_layout Itemize
21349 \begin_layout Itemize
21353 \begin_layout Itemize
21357 \begin_layout Standard
21358 You must select one of them to create your literate documents from.
21362 \begin_layout Standard
21363 Note that literate documents are not limited to these three classes.
21364 New classes can be generated from other styles like letter or in combination
21365 with other class variations like Article (AMS).
21366 If you have special needs that cannot be covered by one of the existing
21367 classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21368 will arrange to insert a new entry, or teach you how to do it.
21372 \begin_layout Plain Layout
21373 It is very simple, it involves the creation of a file with four lines, and
21374 re-running of the auto configuration.
21379 Moreover, if you use a literate tool other than Noweb you may need to create
21380 a new set of document classes for it.
21383 \begin_layout Paragraph
21387 \begin_layout Standard
21388 LyX enables you to write code with a layout named
21396 \begin_layout Plain Layout
21397 The equivalent Noweb term is
21398 \begin_inset Quotes eld
21402 \begin_inset Quotes erd
21406 For historical reasons, I got used to the term
21407 \begin_inset Quotes eld
21411 \begin_inset Quotes erd
21414 introduced by other literate tool named Nuweb, which I used for many years
21415 before rendering myself to Noweb.
21420 Noweb delimits scraps like this:
21423 \begin_layout LyX-Code
21427 \begin_layout LyX-Code
21431 \begin_layout LyX-Code
21435 \begin_layout LyX-Code
21439 \begin_layout LyX-Code
21443 \begin_layout Standard
21444 The problem is that whatever is written in between the << and the
21448 must be taken literally, i.
21449 \begin_inset space \thinspace{}
21453 \begin_inset space \space{}
21456 LyX should be prevented from making any special interpretation of what has
21458 This is handled by a special layout named Scrap, that works like a normal
21459 paragraph but has a free spacing capability.
21462 \begin_layout Standard
21463 The down side of the Scrap paragraph layout is that consecutive paragraphs
21464 of code will be spaced with one empty line in the source code and also
21465 in the printed documentation.
21466 The work around is to enter each line of code within a single Scrap, with
21467 a newline (ctrl-return).
21468 The example above will look like this:
21472 \begin_layout Plain Layout
21473 If you have a printed version of this document you will not see any difference
21474 between the previous example and this one.
21482 \begin_layout LyX-Code
21484 \begin_inset Newline newline
21488 \begin_inset Newline newline
21492 \begin_inset Newline newline
21496 \begin_inset Newline newline
21502 \begin_layout Standard
21503 This layout works fine.
21504 The only real inconvenience is that you have to type ctrl-return instead
21509 \begin_layout Plain Layout
21510 It is in my list of
21511 \begin_inset Quotes eld
21515 \begin_inset Quotes erd
21526 \begin_layout Standard
21527 As a special note, you can also use the
21528 \begin_inset Quotes eld
21532 \begin_inset Quotes erd
21535 construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21539 \begin_layout LyX-Code
21541 \begin_inset Newline newline
21544 def some_function(args):
21545 \begin_inset Newline newline
21548 "This is the doc string for this function."
21549 \begin_inset Newline newline
21552 print "My args: ", args
21555 \begin_layout LyX-Code
21556 @ %def some_function
21559 \begin_layout Standard
21560 For an example of this usage and the resulting cross-reference output, look
21561 at the Literate python program in
21563 LIBDIR/examples/listerrors.lyx
21565 which should make this all clear.
21568 \begin_layout Paragraph
21569 Generating the documentation
21572 \begin_layout Standard
21573 At this point you already have a new document file with a proper document
21574 class, and with some code and text on it.
21575 How do I print it? The answer is simple, you select
21577 View\SpecialChar \menuseparator
21581 Just like you would do for a plain document.
21582 No special procedure is required.
21585 \begin_layout Standard
21586 To help orientate you, I will now explain what happens inside LyX:
21589 \begin_layout Enumerate
21592 Update\SpecialChar \menuseparator
21595 menu option is chosen, a LaTeX file is generated.
21600 \begin_layout Standard
21601 If the document is of any literate class the generated file will be named
21602 with an extension name defined by the
21603 \begin_inset Quotes eld
21607 \begin_inset Quotes erd
21610 format (defined in the Preferences panel), otherwise the file will have
21619 \begin_layout Enumerate
21620 Note that the only difference so far is in the name of the file, no special
21621 processing is required by LyX.
21622 Given that you formatted the code using the Scrap layout that, by itself,
21623 takes care of the business.
21626 \begin_layout Enumerate
21627 If the document is of any literate class LyX will then use the internal
21628 LyX to Noweb converter, followed by the Noweb to LaTeX converter
21632 \begin_layout Plain Layout
21633 The converters are defined in the
21635 Tools\SpecialChar \menuseparator
21639 \begin_inset Quotes eld
21643 \begin_inset Quotes erd
21655 manual for general information about converters.
21660 to generate the LaTeX file.
21664 \begin_layout Standard
21665 Otherwise it will just skip this step.
21669 \begin_layout Enumerate
21670 Finally, LaTeX is invoked and the regular post processing continues as in
21674 \begin_layout Standard
21675 Independence from a particular
21676 \begin_inset Quotes eld
21680 \begin_inset Quotes erd
21683 is easily achieved by changing the commands that are run by the various
21687 \begin_layout Paragraph
21688 Generating the code
21691 \begin_layout Standard
21692 When the build menu option is chosen or the corresponding button in the
21693 toolbar is pressed, a LaTeX file is generated just like step 1 above.
21694 Next, LyX invokes the
21699 This converter needs to be defined by the user and is not installed by
21700 default, though the Program format is.
21701 This converter (like any other converter) will have two parts:
21704 \begin_layout Enumerate
21705 The converter program itself.
21706 This program performs the conversion from the one format to the other (in
21707 this case, from the Noweb format to the Program pseudo-format).
21710 \begin_layout Enumerate
21711 The error log parser.
21712 This is a program whose sole purpose is to rewrite error messages in a
21713 format that LyX understands.
21714 This makes it possible for LyX to place error boxes in the right places
21715 in the file buffer.
21718 \begin_layout Standard
21719 The first part, the
21720 \begin_inset Quotes eld
21724 \begin_inset Quotes erd
21727 setting, should be set to
21728 \begin_inset Quotes eld
21736 \begin_inset Quotes erd
21740 This basically means that LyX will call
21741 \begin_inset Quotes eld
21745 \begin_inset Quotes erd
21748 (a program or script) with the name of the Noweb file (normally a file
21749 in the LyX temp directory).
21753 \begin_layout Standard
21754 This is an implementation of
21755 \begin_inset Quotes eld
21759 \begin_inset Quotes erd
21762 that you can place in a directory on your path:
21765 \begin_layout LyX-Code
21769 \begin_layout LyX-Code
21773 \begin_layout LyX-Code
21774 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
21777 \begin_layout Standard
21778 The next part of the converter setting is the
21779 \begin_inset Quotes eld
21783 \begin_inset Quotes erd
21786 which is to be set to
21787 \begin_inset Quotes eld
21792 parselog=listerrors
21795 \begin_inset Quotes erd
21799 This will run any errors that are generated by the
21800 \begin_inset Quotes eld
21804 \begin_inset Quotes erd
21807 process through the
21808 \begin_inset Quotes eld
21812 \begin_inset Quotes erd
21818 \begin_layout Standard
21819 The converter code looks in
21827 then on the path for the
21828 \begin_inset Quotes eld
21832 \begin_inset Quotes erd
21838 \begin_layout Standard
21839 The build will normally take place in LyX's temporary directory, so the
21840 files produced by the conversion will be in that directory.
21841 LyX will copy out what it regards as the `main' file, but the
21845 conversion may produce several files, and so most of these would then be
21846 deleted when LyX was closed.
21847 The present solution is to use a `copier',
21851 \begin_layout Plain Layout
21860 manual for information on these.
21869 script in its default mode, so that the entire contents of the temporary
21870 directory is copied.
21871 More will get copied than is needed, to be sure, but nothing will be lost.
21872 If, however, you know what extensions the generated files will have, this
21873 can be improved by using the
21882 This option takes a comma-separated list of extensions to copy.
21883 So, for example, if the conversion will generate only files with the extensions
21892 , then the correct definition would be:
21895 \begin_layout LyX-Code
21896 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
21899 \begin_layout Standard
21900 The result will be that only files with these two extensions will be copied
21904 \begin_layout Paragraph
21905 Build instructions in the document
21908 \begin_layout Standard
21909 The last piece of the integration between LyX and noweb is the
21910 \begin_inset Quotes eld
21914 \begin_inset Quotes erd
21918 Generally, the instructions for building your program should be embedded
21919 in a scrap of its own.
21921 \begin_inset Quotes eld
21925 \begin_inset Quotes erd
21928 above uses the notangle command to look for this scrap (called
21929 \begin_inset Quotes eld
21933 \begin_inset Quotes erd
21936 ) and runs its contents through
21937 \begin_inset Quotes eld
21941 \begin_inset Quotes erd
21947 \begin_layout Standard
21948 Typically, such a scrap would look something like this:
21951 \begin_layout LyX-Code
21953 \begin_inset Newline newline
21957 \begin_inset Newline newline
21961 \begin_inset Newline newline
21964 if [ -z "${NOWEB_SOURCE}" ]
21965 \begin_inset Newline newline
21969 \begin_inset Newline newline
21972 NOWEB_SOURCE=myfile.nw
21973 \begin_inset Newline newline
21977 \begin_inset Newline newline
21981 code to extract files ...]
21982 \begin_inset Newline newline
21986 code to compile files ...]
21987 \begin_inset Newline newline
21993 \begin_layout Standard
21996 LIBDIR/examples/listerrors.lyx
22000 LIBDIR/examples/Literate.lyx
22002 which implement two versions of the
22003 \begin_inset Quotes eld
22007 \begin_inset Quotes erd
22010 program for some illustrations of how all of these pieces go together or
22013 LIBDIR/examples/noweb2lyx.lyx.
22016 Interestingly, these three files show off the language-indepence of the
22017 LyX literate programming support since they are written in Python, C and
22021 \begin_layout Subsubsection
22025 \begin_layout Standard
22026 All the Literate Programming support is configured by the
22028 Tools\SpecialChar \menuseparator
22032 \begin_inset Quotes eld
22036 \begin_inset Quotes erd
22040 The important parts are:
22043 \begin_layout Description
22045 \begin_inset space ~
22049 \begin_inset Quotes eld
22053 \begin_inset Quotes erd
22057 \begin_inset space ~
22060 format Set up via the Formats tab, this is where the Noweb-specific pieces
22070 , the file extension is set to
22075 This tells LyX to create a file with a
22079 extension in the first step of the conversion process.
22082 \begin_layout Description
22084 \begin_inset space ~
22092 \begin_inset space ~
22095 format This is an empty format whose sole purpose is to be the endpoint
22096 of a conversion (which then allows us to set up a converter for it).
22099 \begin_layout Description
22108 This converter performs the
22109 \begin_inset Quotes eld
22113 \begin_inset Quotes erd
22116 of the literate document.
22117 For Noweb, it is set to
22118 \begin_inset Quotes eld
22123 noweave -delay -index $$i > $$o
22126 \begin_inset Quotes erd
22132 \begin_layout Description
22142 \begin_inset Quotes eld
22146 \begin_inset Quotes erd
22150 As stated above, the Converter is set to
22151 \begin_inset Quotes eld
22159 \begin_inset Quotes erd
22162 , with Flags set to
22163 \begin_inset Quotes eld
22168 originaldir,parselog=listerrors
22171 \begin_inset Quotes erd
22177 \begin_layout Subsubsection
22181 \begin_layout Standard
22182 There is also a new function implemented in the LyX server, the
22183 \begin_inset Quotes eld
22186 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22190 \begin_layout Standard
22191 When debugging code with ddd/gdb, it is possible to invoke a text editor
22192 at the current execution position with a single key stroke.
22193 The default ddd configuration for that is shift-ctrl-V.
22194 It happens that you can define the editor command line invocation in ddd
22197 Edit\SpecialChar \menuseparator
22198 Preferences\SpecialChar \menuseparator
22201 dialog and changing the "Edit Sources" entry.
22204 \begin_layout Standard
22205 I take advantage of the new created LyX server function and this ddd feature,
22207 \begin_inset Quotes eld
22211 \begin_inset Quotes erd
22217 \begin_layout LyX-Code
22218 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22221 \begin_layout Standard
22222 With this, whenever you are using ddd and find a point in the program that
22223 you want to edit, you just press shift-ctrl-V (in the ddd window), and
22224 ddd you forward this information to LyX through the LyX server and then
22225 the LyX window will show the same file with the cursor at the same position
22226 ddd was pointing to.
22227 No more guessing or long scrolling to locate a point in the program back
22231 \begin_layout Standard
22232 Note however that you must enable the LyX server to get this feature working
22233 (it is disabled by default).
22234 You can enable it in
22246 ) by entering in the
22251 \begin_inset Quotes eld
22256 /home/<your-home-directory>/.lyx/lyxpipe
22259 \begin_inset Quotes erd
22265 \begin_layout Standard
22266 Read the LyX server documentation in the
22268 Customization Manual
22270 for further information.
22273 \begin_layout Subsubsection
22277 \begin_layout Standard
22278 There are six new buttons that can be added to your LyX toolbar.
22279 Five of these buttons are short cuts to layout styles:
22300 The last one is a short cut to the
22301 \begin_inset Quotes eld
22305 \begin_inset Quotes erd
22312 \begin_layout Standard
22313 LyX has a range of buttons that are available for tool bar customization.
22314 In my toolbar I like to combine the six short cuts above with two more:
22319 \SpecialChar \menuseparator
22324 \SpecialChar \menuseparator
22331 View\SpecialChar \menuseparator
22335 Here is how it looks like:
22338 \begin_layout LyX-Code
22342 \begin_layout LyX-Code
22346 \begin_layout LyX-Code
22347 Icon "layout Standard"
22350 \begin_layout LyX-Code
22351 Icon "layout Section"
22354 \begin_layout LyX-Code
22355 Icon "layout LaTeX"
22358 \begin_layout LyX-Code
22359 Icon "layout LyX-Code"
22362 \begin_layout LyX-Code
22363 Icon "layout Scrap"
22366 \begin_layout LyX-Code
22370 \begin_layout LyX-Code
22374 \begin_layout LyX-Code
22375 Icon "buffer-typeset"
22378 \begin_layout LyX-Code
22379 Icon "build-program"
22382 \begin_layout LyX-Code
22386 \begin_layout LyX-Code
22390 \begin_layout LyX-Code
22394 \begin_layout LyX-Code
22398 \begin_layout LyX-Code
22402 \begin_layout Subsubsection
22403 Colors customization
22406 \begin_layout Standard
22407 There are a number of colors in LyX that can be customized in
22412 One of the things that bothers people is the LaTeX font color.
22413 The default color is red, since the scraps uses LaTeX font, and there is
22414 a lot of scraps in literate documents, you may get tired of seeing everything
22416 You can change it by going to the tabs
22425 \begin_layout Standard
22426 The next thing is the visible presence of the newline character in the screen.
22427 You can choose the color of this particular character and make it blend
22429 I recommend you choosing a color that is close to the background but not
22430 equal, that way you still can see it is there, but it is not bothering
22435 \begin_layout Chapter
22439 \begin_layout Standard
22440 You can do everything with LyX that you can do with LaTeX.
22441 However, LyX cannot support every LaTeX feature directly.
22442 But you can always use TeX Code.
22443 This chapter shows you some more special things you might want to use.
22444 For other special things you can do with figures, tables, floats, boxes
22445 and notes, have a look at the
22452 \begin_layout Section
22453 Multiple Text Columns
22456 \begin_layout Standard
22457 This feature is independent of the option
22459 Two-column document
22461 in the document settings under
22466 If you want to have 2
22467 \begin_inset space ~
22470 columns for the whole document, it is recommended to use the
22472 Two-column document
22475 For all other cases use this feature.
22478 \begin_layout Standard
22479 To use multiple text columns in your document, you have to load the module
22486 Document\SpecialChar \menuseparator
22487 Settings\SpecialChar \menuseparator
22490 ) and must have the LaTeX-package
22495 \begin_inset Index idx
22498 \begin_layout Plain Layout
22499 LaTeX-packages ! multicol
22507 \begin_layout Standard
22508 Footnotes within multiple columns will be placed at the bottom of the page
22509 and not under each column.
22510 Within the different columns you can use everything, with the limitation
22511 that for floats you need to use the float option
22518 \begin_layout Subsection
22522 \begin_layout Standard
22523 If you want to have 2 columns in your text, use the style
22525 Begin Multiple Columns
22527 where the columns should start.
22528 The content of the style is the number of the columns, so in this case
22530 \begin_inset Quotes eld
22534 \begin_inset Quotes erd
22538 At the point where the columns should end use the style
22540 End Multiple Columns
22545 \begin_layout Standard
22546 Here is an example:
22549 \begin_layout Begin Multiple Columns
22553 \begin_layout Standard
22558 The Adventure of the Empty House
22561 \begin_inset Newline newline
22566 Sir Arthur Conan Doyle
22569 \begin_layout Standard
22572 It was in the spring of the year 1894 that all London was interested, and
22573 the fashionable world dismayed, by the murder of the Honourable Ronald
22574 Adair under most unusual and inexplicable circumstances.
22575 The public has already learned those particulars of the crime which came
22576 out in the police investigation, but a good deal was suppressed upon that
22577 occasion, since the case for the prosecution was so overwhelmingly strong
22578 that it was not necessary to bring forward all the facts.
22579 Only now, at the end of nearly ten years, am I allowed to supply those
22580 missing links which make up the whole of that remarkable chain.
22581 The crime was of interest in itself, but that interest was as nothing to
22582 me compared to the inconceivable sequel, which afforded me the greatest
22583 shock and surprise of any event in my adventurous life.
22584 Even now, after this long interval, I find myself thrilling as I think
22585 of it, and feeling once more that sudden flood of joy, amazement, and increduli
22586 ty which utterly submerged my mind.
22587 Let me say to that public, which has shown some interest in those glimpses
22588 which I have occasionally given them of the thoughts and actions of a very
22589 remarkable man, that they are not to blame me if I have not shared my knowledge
22590 with them, for I should have considered it my first duty to do so, had
22591 I not been barred by a positive prohibition from his own lips, which was
22592 only withdrawn upon the third of last month.
22595 \begin_layout End Multiple Columns
22599 \begin_layout Standard
22600 Here is an example with 3
22601 \begin_inset space ~
22607 \begin_layout Begin Multiple Columns
22611 \begin_layout Standard
22614 It can be imagined that my close intimacy with Sherlock Holmes had interested
22615 me deeply in crime, and that after his disappearance I never failed to
22616 read with care the various problems which came before the public.
22617 And I even attempted, more than once, for my own private satisfaction,
22618 to employ his methods in their solution, though with indifferent success.
22619 There was none, however, which appealed to me like this tragedy of Ronald
22621 As I read the evidence at the inquest, which led up to a verdict of willful
22622 murder against some person or persons unknown, I realized more clearly
22623 than I had ever done the loss which the community had sustained by the
22624 death of Sherlock Holmes.
22625 There were points about this strange business which would, I was sure,
22626 have specially appealed to him, and the efforts of the police would have
22627 been supplemented, or more probably anticipated, by the trained observation
22628 and the alert mind of the first criminal agent in Europe.
22629 All day, as I drove upon my round, I turned over the case in my mind and
22630 found no explanation which appeared to me to be adequate.
22631 At the risk of telling a twice-told tale, I will recapitulate the facts
22632 as they were known to the public at the conclusion of the inquest.
22635 \begin_layout End Multiple Columns
22639 \begin_layout Standard
22640 You can have up to 10
22641 \begin_inset space ~
22644 columns if you want to, but that might not be very pleasant for the readers
22648 \begin_layout Standard
22649 \begin_inset Newpage newpage
22655 \begin_layout Subsection
22656 Columns inside Columns
22659 \begin_layout Standard
22660 You can also have columns inside columns:
22663 \begin_layout Begin Multiple Columns
22667 \begin_layout Standard
22670 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22671 at that time governor of one of the Australian colonies.
22672 Adair's mother had returned from Australia to undergo the operation for
22673 cataract, and she, her son Ronald, and her daughter Hilda were living together
22677 \begin_layout Begin Multiple Columns
22681 \begin_layout Standard
22684 The youth moved in the best society–had, so far as was known, no enemies
22685 and no particular vices.
22686 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22687 had been broken off by mutual consent some months before, and there was
22688 no sign that it had left any very profound feeling behind it.
22689 For the rest {sic} the man's life moved in a narrow and conventional circle,
22690 for his habits were quiet and his nature unemotional.
22691 Yet it was upon this easy-going young aristocrat that death came, in most
22692 strange and unexpected form, between the hours of ten and eleven-twenty
22693 on the night of March 30, 1894.
22696 \begin_layout End Multiple Columns
22700 \begin_layout Standard
22703 Ronald Adair was fond of cards–playing continually, but never for such stakes
22705 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22706 It was shown that, after dinner on the day of his death, he had played
22707 a rubber of whist at the latter club.
22708 He had also played there in the afternoon.
22713 The evidence of those who had played with him– Mr.
22714 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
22715 and that there was a fairly equal fall of the cards.
22716 Adair might have lost five pounds, but not more.
22717 His fortune was a considerable one, and such a loss could not in any way
22719 He had played nearly every day at one club or other, but he was a cautious
22720 player, and usually rose a winner.
22721 It came out in evidence that, in partnership with Colonel Moran, he had
22722 actually won as much as four hundred and twenty pounds in a sitting, some
22723 weeks before, from Godfrey Milner and Lord Balmoral.
22724 So much for his recent history as it came out at the inquest.
22727 \begin_layout End Multiple Columns
22731 \begin_layout Subsection
22735 \begin_layout Standard
22736 The examples in this section show some more special features of multiple
22740 \begin_layout Standard
22741 For more features of multiple columns, have a look at the documentation
22742 of the LaTeX-package
22747 \begin_inset Index idx
22750 \begin_layout Plain Layout
22751 LaTeX-packages ! multicol
22757 \begin_inset CommandInset citation
22766 \begin_layout Subsubsection
22770 \begin_layout Standard
22771 To add a preface text for multiple columns, add the command
22774 \begin_layout Standard
22780 \begin_layout Standard
22781 as TeX Code behind the number of columns in the
22783 Begin Multiple Columns
22786 behind the command write the text.
22787 At the end of the style use the command
22790 \begin_layout Standard
22796 \begin_layout Standard
22798 An example with some preface text:
22801 \begin_layout Standard
22802 \begin_inset VSpace bigskip
22808 \begin_layout Begin Multiple Columns
22813 \begin_layout Plain Layout
22820 And the story continues and continues and continues and continues\SpecialChar \ldots{}
22825 \begin_layout Plain Layout
22835 \begin_layout Standard
22838 On the evening of the crime, he returned from the club exactly at ten.
22839 His mother and sister were out spending the evening with a relation.
22840 The servant deposed that she heard him enter the front room on the second
22841 floor, generally used as his sitting-room.
22842 She had lit a fire there, and as it smoked she had opened the window.
22843 No sound was heard from the room until eleven-twenty, the hour of the return
22844 of Lady Maynooth and her daughter.
22845 Desiring to say good-night, she attempted to enter her son's room.
22846 The door was locked on the inside, and no answer could be got to their
22847 cries and knocking.
22848 Help was obtained, and the door forced.
22849 The unfortunate young man was found lying near the table.
22850 His head had been horribly mutilated by an expanding revolver bullet, but
22851 no weapon of any sort was to be found in the room.
22854 \begin_layout End Multiple Columns
22858 \begin_layout Standard
22859 You can also use a section heading as the preface if you use a section command
22860 as TeX Code behind the first TeX Code.
22861 For example the command
22864 \begin_layout Standard
22869 subsection{subsection title}
22872 \begin_layout Standard
22873 creates a subsection.
22874 In this example the preface is a subsubsection:
22877 \begin_layout Begin Multiple Columns
22882 \begin_layout Plain Layout
22893 \begin_layout Plain Layout
22902 This is a subsubsection heading as a preface
22906 \begin_layout Plain Layout
22917 \begin_layout Plain Layout
22927 \begin_layout Standard
22930 A minute examination of the circumstances served only to make the case more
22932 In the first place, no reason could be given why the young man should have
22933 fastened the door upon the inside.
22934 There was the possibility that the murderer had done this, and had afterwards
22935 escaped by the window.
22936 The drop was at least twenty feet, however, and a bed of crocuses in full
22938 Neither the flowers nor the earth showed any sign of having been disturbed,
22939 nor were there any marks upon the narrow strip of grass which separated
22940 the house from the road.
22941 Apparently, therefore, it was the young man himself who had fastened the
22943 But how did he come by his death? No one could have climbed up to the window
22944 without leaving traces.
22945 Suppose a man had fired through the window, he would indeed be a remarkable
22946 shot who could with a revolver inflict so deadly a wound.
22947 Again, Park Lane is a frequented thoroughfare; there is a cab stand within
22948 a hundred yards of the house.
22949 No one had heard a shot.
22952 \begin_layout End Multiple Columns
22956 \begin_layout Standard
22957 If there is less vertical space left on the page at the beginning of the
22958 multiple columns than needed for 6
22959 \begin_inset space ~
22962 text lines, a page break will be inserted before the multiple columns.
22963 Depending on the number of lines of the preface text, you might want to
22965 It is determined by inserting the command
22968 \begin_layout Standard
22976 \begin_layout Standard
22977 as TeX Code behind the preface definition but before the final
22986 is hereby the number of text lines.
22987 In this example the space is set to 7
22988 \begin_inset space ~
22994 \begin_layout Begin Multiple Columns
22999 \begin_layout Plain Layout
23010 \begin_layout Plain Layout
23019 This is the sectioning command
23020 \begin_inset Newline newline
23024 \begin_inset Newline newline
23027 with multiple text lines
23031 \begin_layout Plain Layout
23042 \begin_layout Plain Layout
23055 \begin_layout Plain Layout
23065 \begin_layout Standard
23068 On the evening of the crime, he returned from the club exactly at ten.
23069 His mother and sister were out spending the evening with a relation.
23070 The servant deposed that she heard him enter the front room on the second
23071 floor, generally used as his sitting-room.
23072 She had lit a fire there, and as it smoked she had opened the window.
23073 No sound was heard from the room until eleven-twenty, the hour of the return
23074 of Lady Maynooth and her daughter.
23075 Desiring to say good-night, she attempted to enter her son's room.
23076 The door was locked on the inside, and no answer could be got to their
23077 cries and knocking.
23078 Help was obtained, and the door forced.
23079 The unfortunate young man was found lying near the table.
23080 His head had been horribly mutilated by an expanding revolver bullet, but
23081 no weapon of any sort was to be found in the room.
23084 \begin_layout End Multiple Columns
23088 \begin_layout Subsubsection
23092 \begin_layout Standard
23093 The amount of space before and after multiple columns can be changed by
23094 changing the length
23101 For example the command
23104 \begin_layout Standard
23114 \begin_layout Standard
23115 in TeX Code changes its value to 3
23116 \begin_inset space \thinspace{}
23120 The change must be made before the multiple columns' start.
23121 The predefined value is 13
23122 \begin_inset space \thinspace{}
23128 \begin_layout Standard
23136 \begin_inset space \thinspace{}
23142 \begin_layout Standard
23146 \begin_layout Plain Layout
23152 multicolsep}{2.5cm}
23160 \begin_layout Begin Multiple Columns
23164 \begin_layout Standard
23167 All day I turned these facts over in my mind, endeavouring to hit upon some
23168 theory which could reconcile them all, and to find that line of least resistanc
23169 e which my poor friend had declared to be the starting-point of every investigat
23171 I confess that I made little progress.
23172 In the evening I strolled across the Park, and found myself about six o'clock
23173 at the Oxford Street end of Park Lane.
23174 A group of loafers upon the pavements, all staring up at a particular window,
23175 directed me to the house which I had come to see.
23176 A tall, thin man with coloured glasses, whom I strongly suspected of being
23177 a plain-clothes detective, was pointing out some theory of his own, while
23178 the others crowded round to listen to what he said.
23179 I got as near him as I could, but his observations seemed to me to be absurd,
23180 so I withdrew again in some disgust.
23181 As I did so I struck against an elderly, deformed man, who had been behind
23182 me, and I knocked down several books which he was carrying.
23185 \begin_layout End Multiple Columns
23189 \begin_layout Standard
23190 \begin_inset Note Greyedout
23193 \begin_layout Plain Layout
23198 The values you set with
23204 will be used for all following multiple columns until to change them again.
23212 \begin_layout Standard
23216 \begin_layout Plain Layout
23228 \begin_inset Note Note
23231 \begin_layout Plain Layout
23232 go back to the default
23240 \begin_layout Subsubsection
23244 \begin_layout Standard
23245 The width of the columns is automatically calculated, but you can modify
23246 the space between the columns.
23247 This is done by changing the length
23254 Its predefined value is 10
23255 \begin_inset space \thinspace{}
23259 Here is an example where
23266 \begin_inset space \thinspace{}
23272 \begin_layout Standard
23276 \begin_layout Plain Layout
23290 \begin_layout Begin Multiple Columns
23294 \begin_layout Standard
23297 My observations of No.
23298 \begin_inset space \space{}
23301 427 Park Lane did little to clear up the problem in which I was interested.
23302 The house was separated from the street by a low wall and railing, the
23303 whole not more than five feet high.
23304 It was perfectly easy, therefore, for anyone to get into the garden, but
23305 the window was entirely inaccessible, since there was no water pipe or
23306 anything which could help the most active man to climb it.
23307 More puzzled than ever, I retraced my steps to Kensington.
23308 I had not been in my study five minutes when the maid entered to say that
23309 a person desired to see me.
23310 To my astonishment it was none other than my strange old book collector,
23311 his sharp, wizened face peering out from a frame of white hair, and his
23312 precious volumes, a dozen of them at least, wedged under his right arm.
23315 \begin_layout End Multiple Columns
23319 \begin_layout Standard
23323 \begin_layout Plain Layout
23335 \begin_inset Note Note
23338 \begin_layout Plain Layout
23339 go back to the default
23347 \begin_layout Subsubsection
23351 \begin_layout Standard
23352 Between the columns a rule with a width of the length
23359 If this rule width is set to 0
23360 \begin_inset space \thinspace{}
23363 pt (this is the default), the rule is suppressed.
23364 In the following example, the line separating the columns is 2
23365 \begin_inset space \thinspace{}
23371 \begin_layout Standard
23375 \begin_layout Plain Layout
23381 columnseprule}{2pt}
23389 \begin_layout Begin Multiple Columns
23393 \begin_layout Standard
23396 \begin_inset Quotes eld
23399 You're surprised to see me, sir,
23400 \begin_inset Quotes erd
23403 said he, in a strange, croaking voice.
23406 \begin_layout Standard
23409 I acknowledged that I was.
23412 \begin_layout Standard
23415 \begin_inset Quotes eld
23418 Well, I've a conscience, sir, and when I chanced to see you go into this
23419 house, as I came hobbling after you, I thought to myself, I'll just step
23420 in and see that kind gentleman, and tell him that if I was a bit gruff
23421 in my manner there was not any harm meant, and that I am much obliged to
23422 him for picking up my books.
23423 \begin_inset Quotes erd
23429 \begin_layout Standard
23432 \begin_inset Quotes eld
23435 You make too much of a trifle,
23436 \begin_inset Quotes erd
23441 \begin_inset Quotes eld
23444 May I ask how you knew who I was?
23445 \begin_inset Quotes erd
23451 \begin_layout Standard
23454 \begin_inset Quotes eld
23457 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
23458 you'll find my little bookshop at the corner of Church Street, and very
23459 happy to see you, I am sure.
23460 Maybe you collect yourself, sir.
23464 \begin_inset space ~
23477 --a bargain, every one of them.
23478 With five volumes you could just fill that gap on that second shelf.
23479 It looks untidy, does it not, sir?
23480 \begin_inset Quotes erd
23486 \begin_layout End Multiple Columns
23490 \begin_layout Standard
23494 \begin_layout Plain Layout
23500 columnseprule}{0pt}
23506 \begin_inset Note Note
23509 \begin_layout Plain Layout
23510 go back to the default
23518 \begin_layout Standard
23519 \begin_inset Newpage newpage
23525 \begin_layout Section
23526 Non-standard Paragraph Shapes
23529 \begin_layout Standard
23533 \begin_layout Plain Layout
23545 \begin_layout Standard
23549 \begin_layout Plain Layout
23558 \begin_layout Plain Layout
23572 \begin_layout Standard
23577 \begin_layout Plain Layout
23588 \begin_layout Plain Layout
23597 \begin_layout Plain Layout
23606 \begin_layout Plain Layout
23615 \begin_layout Plain Layout
23624 \begin_layout Plain Layout
23633 \begin_layout Plain Layout
23642 \begin_layout Plain Layout
23651 \begin_layout Plain Layout
23660 \begin_layout Plain Layout
23669 \begin_layout Plain Layout
23678 \begin_layout Plain Layout
23687 \begin_layout Plain Layout
23696 \begin_layout Plain Layout
23705 \begin_layout Plain Layout
23714 \begin_layout Plain Layout
23723 \begin_layout Plain Layout
23732 \begin_layout Plain Layout
23741 \begin_layout Plain Layout
23750 \begin_layout Plain Layout
23756 There are times when the tyranny of rectangular paragraphs must be overthrown.
23757 In such situations, a call to the delightful plain TeX command
23764 As you can see, completely arbitrary shapes can be laid out with a suitable
23765 set of line length definitions.
23766 While this parshape may look a bit silly and useless, one could conceive
23767 of situations such as finely tuned dropped capitals, word wrapping around
23768 non-rectangular graphics, etc.
23769 which will benefit from such handcrafting.
23772 \begin_layout Standard
23773 \begin_inset VSpace bigskip
23779 \begin_layout Standard
23784 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23791 is the number of lines of text which define the paragraph.
23792 If there turn out to be fewer lines, the shape is truncated; if there are
23793 more, the excess lines have the same dimensions as the last line of the
23803 entries specify the indentation of the line from the left margin, and the
23804 length of the line as measured from that point.
23805 The shape applies only to the current paragraph; everything is reset to
23806 normal for the next paragraph.
23809 \begin_layout Standard
23813 \begin_layout Plain Layout
23825 \begin_layout Bibliography
23826 \begin_inset CommandInset bibitem
23827 LatexCommand bibitem
23832 Documentation of the LaTeX-package
23833 \begin_inset CommandInset href
23836 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
23841 \begin_inset Index idx
23844 \begin_layout Plain Layout
23845 LaTeX-packages ! multicol