1 #LyX 2.0.0svn 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 % redefine the \LyX macro for PDF bookmarks
37 \def\LyX{\texorpdfstring{%
38 L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}
41 % used for multi-column text
44 % extra space for tables
45 \newcommand{\extratablespace}[1]{\noalign{\vskip#1}}
47 \options fleqn,liststotoc,bibtotoc,idxtotoc,BCOR7.5mm,titlepage,tablecaptionabove
48 \use_default_options false
54 \maintain_unincluded_children false
57 InsetLayout CharStyle:MenuItem
66 \newcommand*{\menuitem}[1]{{\sffamily #1}}
75 \font_typewriter default
76 \font_default_family default
84 \default_output_format default
86 \bibtex_command default
87 \index_command default
91 \pdf_title "LyX's Additional Features manual"
92 \pdf_author "LyX Team"
93 \pdf_subject "LyX's additional features documentation"
94 \pdf_keywords "LyX, Documentation, Additional"
96 \pdf_bookmarksnumbered true
97 \pdf_bookmarksopen false
98 \pdf_bookmarksopenlevel 1
103 \pdf_pdfusetitle false
104 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false, pdfpagelabels"
113 \paperorientation portrait
121 \paragraph_separation indent
122 \paragraph_indentation default
123 \quotes_language english
126 \paperpagestyle headings
127 \tracking_changes true
128 \output_changes false
138 Additional LyX Features
146 \begin_layout Plain Layout
148 Principal maintainer of this file is
153 If you have comments or error corrections, please send them to the LyX
154 Documentation mailing list,
155 \begin_inset Flex CharStyle:Code
158 \begin_layout Plain Layout
160 <lyx-docs@lists.lyx.org>
173 \begin_layout Standard
174 \begin_inset CommandInset toc
175 LatexCommand tableofcontents
182 \begin_layout Chapter
186 \begin_layout Standard
187 This manual is essentially Part II of the
189 User's Guide\SpecialChar \@.
192 The reason for separating this document out is simple: the
196 is already quite lengthy, and it contains information on all of the basic
197 features one needs to know in order to prepare most documents.
198 However, the LyX Team has worked to make LyX extensible through various
199 configuration files and external packages.
200 That means that if you want to support the Fizzwizzle LaTeX package, you
201 can create a layout file (or module) for it without having to alter LyX
203 We've already had contributions of several new features this way, and some
204 of them are documented here.
205 There are also some more `advanced' features, such as how to control the
206 presentation of bibliographies and how to work with multi-part documents,
207 that are not covered in the
211 and are discussed here.
214 \begin_layout Standard
215 This manual also documents some special features, like fax support, version
216 control, and SGML support, which require additional software to work properly.
217 There is also a chapter on LyX's support for HTML.
218 And lastly, there's a chapter of LaTeX tools and tips, things you can use
219 to spruce up your documents by directly using the powerful features of
225 only WYSIWYM and will only ever interface to some, not all, LaTeX features.
228 \begin_layout Standard
229 If you haven't read the
233 yet, you are definitely in the wrong manual.
238 is the first place to go, since it describes the notation and format of
240 You should also be thoroughly familiar with the
244 and all of the basic features of LyX before attempting to read this one.
247 \begin_layout Standard
248 Since many of the topics in this manual depend heavily on LyX's interaction
249 with LaTeX, this first chapter covers the inner workings of LyX and how
250 to direct LyX to generate exactly the LaTeX code you want.
251 It is obviously for more seasoned LyX users.
254 \begin_layout Chapter
258 \begin_layout Section
262 \begin_layout Standard
263 This chapter is for both TeX-nicians and the LaTeX-curious.
264 In it, we'll explain how LyX and LaTeX work together to produce printable
266 This is the only place in any of the manuals where we assume you know something
270 \begin_layout Standard
271 At one time, LyX was called a
272 \begin_inset Quotes eld
275 WYSIWYM frontend to LaTeX,
276 \begin_inset Quotes erd
279 but that's no longer true.
280 There are frontends to LaTeX out there.
284 \begin_layout Plain Layout
285 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
286 There are also the LaTeX modes for vi and emacs, of course.
291 These are basically text editors with the ability to run LaTeX and mark
292 any errors in the file you're editing.
301 run LaTeX, and it also indicates errors in the file, it also does much,
303 For one thing, you don't need to know LaTeX to use LyX effectively.
304 And LyX has added its own extensions to LaTeX.
305 Try the following sometime: select
306 \begin_inset Flex CharStyle:MenuItem
309 \begin_layout Plain Layout
310 Export\SpecialChar \menuseparator
317 \begin_inset Flex CharStyle:MenuItem
320 \begin_layout Plain Layout
327 \begin_inset Flex CharStyle:MenuItem
330 \begin_layout Plain Layout
331 View\SpecialChar \menuseparator
337 ), then look at the preamble of the resulting
338 \begin_inset Flex CharStyle:Code
341 \begin_layout Plain Layout
348 You'll notice a variety of new macros defined specifically by LyX.
349 These macros are defined automatically, according to the features you use
353 \begin_layout Standard
354 There are several commands that automatically invoke LaTeX.
358 \begin_layout Itemize
359 \begin_inset Flex CharStyle:MenuItem
362 \begin_layout Plain Layout
363 View\SpecialChar \menuseparator
372 \begin_layout Itemize
373 \begin_inset Flex CharStyle:MenuItem
376 \begin_layout Plain Layout
377 View\SpecialChar \menuseparator
378 Update\SpecialChar \menuseparator
387 \begin_layout Itemize
388 \begin_inset Flex CharStyle:MenuItem
391 \begin_layout Plain Layout
392 File\SpecialChar \menuseparator
401 \begin_layout Itemize
402 \begin_inset Flex CharStyle:MenuItem
405 \begin_layout Plain Layout
406 File\SpecialChar \menuseparator
415 \begin_layout Standard
416 They will only invoke LaTeX if the file has changed since the last time
421 \begin_layout Standard
422 When LyX runs LaTeX on the file you're editing, it performs these steps:
425 \begin_layout Enumerate
426 Convert the document to LaTeX and save to a file with the extension
427 \begin_inset Flex CharStyle:Code
430 \begin_layout Plain Layout
437 \begin_inset Flex CharStyle:Code
440 \begin_layout Plain Layout
449 \begin_layout Enumerate
451 \begin_inset Flex CharStyle:Code
454 \begin_layout Plain Layout
460 file (maybe several times), and run any other commands (such as
461 \begin_inset Flex CharStyle:Code
464 \begin_layout Plain Layout
471 \begin_inset Flex CharStyle:Code
474 \begin_layout Plain Layout
480 ) needed to compile the LaTeX file.
483 \begin_layout Enumerate
484 If there are any errors, show the error log.
487 \begin_layout Standard
488 If you've run LaTeX using
489 \begin_inset Flex CharStyle:MenuItem
492 \begin_layout Plain Layout
495 \SpecialChar \menuseparator
503 , LyX then runs a DVI viewer to display the DVI-file.
505 \begin_inset Flex CharStyle:MenuItem
508 \begin_layout Plain Layout
511 \SpecialChar \menuseparator
519 , LyX performs further steps:
522 \begin_layout Itemize
524 \begin_inset Flex CharStyle:Code
527 \begin_layout Plain Layout
533 to convert the DVI file to PostScript.
536 \begin_layout Itemize
537 Run a PostScript viewer, such as
538 \begin_inset Flex CharStyle:Code
541 \begin_layout Plain Layout
547 , to display the PostScript file.
550 \begin_layout Standard
551 LyX does similar things when viewing, or exporting, other formats.
554 \begin_layout Section
555 Translating LaTeX files into LyX
558 \begin_layout Standard
559 You can import a LaTeX file into LyX by using the
560 \begin_inset Flex CharStyle:MenuItem
563 \begin_layout Plain Layout
564 File\SpecialChar \menuseparator
565 Import\SpecialChar \menuseparator
572 This will call a program named
573 \begin_inset Flex CharStyle:Code
576 \begin_layout Plain Layout
582 which will create a file
583 \begin_inset Flex CharStyle:Code
586 \begin_layout Plain Layout
593 \begin_inset Flex CharStyle:Code
596 \begin_layout Plain Layout
603 LyX will then open that file.
607 \begin_layout Plain Layout
608 \begin_inset Flex CharStyle:Code
611 \begin_layout Plain Layout
617 can also be run from the command line, of course.
625 \begin_layout Standard
626 \begin_inset Flex CharStyle:Code
629 \begin_layout Plain Layout
635 will translate most legal LaTeX, but not everything.
636 It will put things it doesn't understand into TeX code, so after translating
638 \begin_inset Flex CharStyle:Code
641 \begin_layout Plain Layout
647 , you can look for TeX code and hand-edit it until it looks right.
650 \begin_layout Standard
651 If you don't know what TeX code is, read the next section.
654 \begin_layout Section
655 \begin_inset CommandInset label
657 name "sec:Inserting-TeX-Code"
661 Inserting TeX Code into LyX Documents
664 \begin_layout Standard
665 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
666 You can always insert TeX code into any LyX document.
667 LyX cannot, and will never be able to, display every possible LaTeX construct.
668 If ever you need to insert LaTeX commands into your LyX document, you can
670 \begin_inset Flex CharStyle:Code
673 \begin_layout Plain Layout
679 box, which you can insert into your document with
680 \begin_inset Flex CharStyle:MenuItem
683 \begin_layout Plain Layout
684 Insert\SpecialChar \menuseparator
693 \begin_layout Standard
694 Here's an example of inserting LaTeX commands in a LyX document.
695 The code looks like this:
698 \begin_layout LyX-Code
702 \begin_inset Newline newline
708 \begin_inset Newline newline
711 This is an example for a minipage environment.
713 \begin_inset Newline newline
716 can put nearly everything in it, even (non-floating)
717 \begin_inset Newline newline
722 \begin_inset Newline newline
728 \begin_inset Newline newline
732 \begin_inset Newline newline
738 \begin_inset Newline newline
744 \begin_inset Newline newline
750 \begin_inset Newline newline
755 \begin_inset Newline newline
761 \begin_inset Newline newline
767 \begin_inset Newline newline
773 \begin_inset Newline newline
781 \begin_layout LyX-Code
785 \begin_layout Standard
787 \begin_inset Flex CharStyle:Code
790 \begin_layout Plain Layout
796 box containing this text is directly after this paragraph.
797 Those of you reading the manual in LyX will only see the TeX code inset.
798 Those reading a printed version of the manuals will see the actual results:
801 \begin_layout Standard
805 \begin_layout Plain Layout
812 \begin_layout Plain Layout
819 \begin_layout Plain Layout
821 This is an example for a minipage environment.
822 You can put nearly everything in it, even (non-floating) figures and tables.
826 \begin_layout Plain Layout
833 \begin_layout Plain Layout
838 \begin_layout Plain Layout
845 \begin_layout Plain Layout
852 \begin_layout Plain Layout
859 \begin_layout Plain Layout
865 \begin_layout Plain Layout
872 \begin_layout Plain Layout
879 \begin_layout Plain Layout
886 \begin_layout Plain Layout
898 \begin_layout Standard
899 In addition to using TeX code, you can also create a separate file containing
900 some complex LaTeX structure and then use
901 \begin_inset Flex CharStyle:MenuItem
904 \begin_layout Plain Layout
905 Insert\SpecialChar \menuseparator
915 to include your file (you should select the type
916 \begin_inset Flex CharStyle:Code
919 \begin_layout Plain Layout
926 We recommend that you only do this if you have a
927 \begin_inset Flex CharStyle:Code
930 \begin_layout Plain Layout
941 Otherwise, you'll have a big job tracking down LaTeX errors.
944 \begin_layout Standard
945 There are a few last points to emphasize:
948 \begin_layout Itemize
953 check if your LaTeX code is correct.
956 \begin_layout Itemize
957 Beware reinventing the wheel.
960 \begin_layout Standard
961 On that last point, LyX does have quite a few features tucked into it, and
963 Be sure to check the manuals to make sure that LyX doesn't have such-and-such
964 feature before you decide you have to do it by hand.
965 Moreover, there are numerous LaTeX packages out there to do all sorts of
966 things, from labels to envelopes to fancy multipage tables.
968 \begin_inset CommandInset href
971 target "http://www.ctan.org/"
975 for details, and see chapter
976 \begin_inset CommandInset ref
978 reference "cha:secrets"
985 \begin_layout Standard
986 If you do need to do some wild and fancy things within your document, be
987 sure to check out a good LaTeX book for assistance.
988 There are a number of them listed in the bibliography of the
995 \begin_layout Section
996 LyX and the LaTeX Preamble
999 \begin_layout Subsection
1000 About the LaTeX Preamble
1003 \begin_layout Standard
1004 If you already know LaTeX, there is no need to explain here what the preamble
1006 If you don't, the following will give you some ideas—we recommend again
1007 that you consult a LaTeX book for further information.
1008 In any case, you should read the points below, because they explain what
1009 you can do and what you don't need to do in the LaTeX preamble of a LyX
1013 \begin_layout Standard
1014 The LaTeX preamble comes at the very beginning of a document,
1022 \begin_layout Itemize
1023 Declare the document class.
1025 \begin_inset Newline newline
1028 LyX already does this for you.
1029 If you're a seasoned LaTeX-nician, and you have a custom document class
1030 you want to use, check out the
1032 Customization Manual
1034 for information on how to make LyX interface to it.
1037 \begin_layout Itemize
1038 Declare the usage of packages.
1040 \begin_inset Newline newline
1043 LaTeX packages provide special commands, which are only available within
1044 a document when the package has been declared in the preamble.
1045 For example, the package
1046 \begin_inset Flex CharStyle:Code
1049 \begin_layout Plain Layout
1055 forces all paragraphs to be indented.
1056 There are other packages for labels, envelopes, margins, etc.
1060 \begin_layout Itemize
1061 Set counters, variables, lengths and widths.
1063 \begin_inset Newline newline
1066 There are several LaTeX counters and variables which
1070 be set globally from within the preamble in order to have the desired effect.
1071 (There are variables which you can set and reset inside the document, too.)
1072 Margins are a good example of something which must be set in the preamble.
1073 Another example is the label format for lists.
1074 You can actually set these just about anywhere, but it's best to do it
1075 just once, inside the preamble.
1078 \begin_layout Itemize
1079 Declare user defined commands (with
1080 \begin_inset Flex CharStyle:Code
1083 \begin_layout Plain Layout
1092 \begin_inset Flex CharStyle:Code
1095 \begin_layout Plain Layout
1104 \begin_inset Newline newline
1107 These are abbreviations for LaTeX commands which appear very often inside
1109 Although the preamble is a good place to declare such commands, they
1113 be declared anywhere (before they are used for the first time, of course).
1114 This can be useful if there is a lot of raw LaTeX code in your document,
1115 which normally should not be the case.
1118 \begin_layout Standard
1119 LyX adds its own set of definitions to the preamble of the
1120 \begin_inset Flex CharStyle:Code
1123 \begin_layout Plain Layout
1130 This makes LaTeX files generated by LyX portable.
1133 \begin_layout Subsection
1134 Changing the Preamble
1137 \begin_layout Standard
1138 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1139 can't change them without patching LyX itself.
1140 You can, however, add your own stuff to the preamble by selecting
1141 \begin_inset Flex CharStyle:MenuItem
1144 \begin_layout Plain Layout
1146 \begin_inset space ~
1155 \begin_inset Flex CharStyle:MenuItem
1158 \begin_layout Plain Layout
1159 Document\SpecialChar \menuseparator
1166 LyX adds anything in the
1167 \begin_inset Flex CharStyle:MenuItem
1170 \begin_layout Plain Layout
1176 dialog to its own built-in preamble.
1177 Before adding your own declarations in the preamble, you should make sure
1178 that LyX doesn't already support what you want to do.
1179 (Remember what we said about reinventing the wheel?) Also,
1181 make sure your preamble code is correct
1184 LyX doesn't check it for you.
1185 If there is an error, you're likely to get an error like
1186 \begin_inset Quotes eld
1190 \begin_inset Flex CharStyle:Code
1193 \begin_layout Plain Layout
1202 \begin_inset Quotes erd
1206 If you see this error, check your preamble.
1209 \begin_layout Subsection
1213 \begin_layout Standard
1214 Here are some examples of what you can add to a preamble, and what they
1218 \begin_layout Subsubsection
1222 \begin_layout Standard
1223 There are two variables under LaTeX that control page position:
1224 \begin_inset Flex CharStyle:Code
1227 \begin_layout Plain Layout
1236 \begin_inset Flex CharStyle:Code
1239 \begin_layout Plain Layout
1248 Their names should be self-explanatory.
1249 These variables are useful if you think for a moment about computer labels.
1250 Sometimes, the size of a print medium and the area of the medium that you
1251 can actually print on aren't the same.
1253 \begin_inset Flex CharStyle:Code
1256 \begin_layout Plain Layout
1265 \begin_inset Flex CharStyle:Code
1268 \begin_layout Plain Layout
1279 \begin_layout Standard
1280 The default values for
1281 \begin_inset Flex CharStyle:Code
1284 \begin_layout Plain Layout
1293 \begin_inset Flex CharStyle:Code
1296 \begin_layout Plain Layout
1305 \begin_inset space \thinspace{}
1309 \begin_inset space \thinspace{}
1313 \begin_inset space \space{}
1316 the page isn't shifted.
1317 Unfortunately, some DVI drivers always seem to shift the page.
1318 We have no idea why, or why the sysadmin hasn't fixed such behavior.
1319 If you're using LyX on a system that you don't personally maintain, and
1320 your sysadmin is a doofus,
1321 \begin_inset Flex CharStyle:Code
1324 \begin_layout Plain Layout
1333 \begin_inset Flex CharStyle:Code
1336 \begin_layout Plain Layout
1345 Suppose you're left and top margins are always 0.5
1346 \begin_inset space \thinspace{}
1350 You can add this to the preamble:
1353 \begin_layout LyX-Code
1361 \begin_layout LyX-Code
1369 \begin_layout Standard
1370 and your margins should now be correct.
1373 \begin_layout Subsubsection
1377 \begin_layout Standard
1378 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1379 There's a rather nice package, available at your nearest CTAN archive,
1380 for printing sheets of labels:
1381 \begin_inset Flex CharStyle:Code
1384 \begin_layout Plain Layout
1391 Now, your system may not have this package installed by default.
1392 We leave that up to you to check.
1393 You'll also want to read the documentation for it; we're not going to do
1395 Since this is an example, however, we'll give you an example of how you
1399 \begin_layout Standard
1400 First, make sure you're using the
1401 \begin_inset Flex CharStyle:Code
1404 \begin_layout Plain Layout
1411 Next, you need to put the following in your preamble:
1414 \begin_layout LyX-Code
1420 \begin_layout LyX-Code
1426 \begin_layout LyX-Code
1432 \begin_layout LyX-Code
1438 \begin_layout LyX-Code
1444 \begin_layout LyX-Code
1450 \begin_layout LyX-Code
1456 \begin_layout Standard
1457 This sets things up for Avery label sheets, stock #5360.
1458 You're now ready to print labels, but you'll need to insert LaTeX code,
1459 placing the commands
1460 \begin_inset Flex CharStyle:Code
1463 \begin_layout Plain Layout
1472 \begin_inset Flex CharStyle:Code
1475 \begin_layout Plain Layout
1483 around each label text.
1484 This and other special features of
1485 \begin_inset Flex CharStyle:Code
1488 \begin_layout Plain Layout
1494 are explained in its documentation.
1497 \begin_layout Standard
1498 Someday, someone may write a LyX layout file to support this package directly.
1499 Maybe that someone is you.
1502 \begin_layout Subsubsection
1503 Example #3: Paragraph Indentation
1506 \begin_layout Standard
1507 Americans are trained to indent the first line of
1512 As with all of their other weird quirks, most Americans will whine and
1513 moan until they can have their way and indent the first line of all paragraphs.
1522 \begin_layout Standard
1523 Of course, this behavior isn't standard typography.
1524 In books, you typically only indent the first line of a paragraph
1528 it follows another one.
1529 The idea behind indenting the first line of a paragraph is to distinguish
1530 neighboring paragraphs from one another.
1531 If there is no previous paragraph—for example, if it follows a figure or
1532 is the first paragraph in a section—then there is no need for indentation.
1536 \begin_layout Standard
1537 If you're a typical American (we're still joking!), though, you don't care
1538 about such esoteric things; you want your indentation! Add this to the
1542 \begin_layout LyX-Code
1545 usepackage{indentfirst}
1548 \begin_layout Standard
1549 If your TeX distribution isn't braindead, you'll have this package, and
1550 all of your paragraphs will get the indentation the Founding Fathers intended
1554 \begin_layout Subsubsection
1555 Example #4: This Document
1558 \begin_layout Standard
1559 You can also check out the preamble of this document to get an idea of some
1560 of the advanced things you can do.
1561 Also, there are more examples and an assortment of LaTeX
1562 \begin_inset Quotes eld
1566 \begin_inset Quotes erd
1570 \begin_inset space ~
1574 \begin_inset CommandInset ref
1576 reference "cha:secrets"
1584 \begin_layout Section
1585 LyX and LaTeX Errors
1588 \begin_layout Standard
1589 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1591 It then uses the logfile from the LaTeX run to do a post-mortem.
1592 After analyzing the logfile,LyX displays a dialog listing the errors.
1593 Clicking on any one of them will take you to the position in your LyX file
1594 where the error occurred.
1598 \begin_layout Plain Layout
1600 Analyzing the logfile is a tough job, and LyX doesn't always go to the
1602 There are also cases where LaTeX reports the error on one line, but the
1603 actual error is earlier.
1604 This is not unlike forgetting a closing brace in a program: You'll get
1605 an error, but only later.
1613 \begin_layout Standard
1614 Some folks also like to look at the log file directly: It is available from
1616 \begin_inset Flex CharStyle:MenuItem
1619 \begin_layout Plain Layout
1622 \SpecialChar \menuseparator
1626 \begin_inset space ~
1635 There are some fairly common error messages and warnings.
1636 We'll cover those here.
1637 You should look at a good LaTeX book for a complete listing.
1640 \begin_layout Itemize
1641 \begin_inset Flex CharStyle:Code
1644 \begin_layout Plain Layout
1651 \begin_inset Newline newline
1654 Anything beginning with these words is a warning message for the purpose
1656 \begin_inset Quotes eld
1660 \begin_inset Quotes erd
1663 the LaTeX code itself.
1664 You'll get messages like this if you added or changed cross-references
1665 or bibliography entries, in which case, LaTeX is trying to tell you that
1666 you need to make another run.
1667 You can by-and-large ignore these.
1670 \begin_layout Itemize
1671 \begin_inset Flex CharStyle:Code
1674 \begin_layout Plain Layout
1681 \begin_inset Newline newline
1684 Another warning message, this time about fonts which LaTeX couldn't find.
1685 The rest of the message will often say something about a replacement font
1687 You can safely ignore these, too.
1690 \begin_layout Itemize
1691 \begin_inset Flex CharStyle:Code
1694 \begin_layout Plain Layout
1703 \begin_inset Newline newline
1711 They are warnings about lines that were too long and run past the right
1713 Almost always, this is unnoticeable in the final output.
1714 (It can be just a point or two.) Or, only one or two characters extend past
1716 LaTeX seems to generate at least one of these messages for just about any
1718 \begin_inset Newline newline
1721 You can ignore these messages.
1722 Your eyes will tell you if there's a problem with something that's too
1723 wide; just look at the output.
1727 \begin_layout Plain Layout
1728 You can also enable the `draft' option in
1729 \begin_inset Flex CharStyle:MenuItem
1732 \begin_layout Plain Layout
1735 \SpecialChar \menuseparator
1743 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1751 \begin_layout Itemize
1752 \begin_inset Flex CharStyle:Code
1755 \begin_layout Plain Layout
1764 \begin_inset Newline newline
1767 Not quite as common as its cousin.
1768 LaTeX seems to like to print lines that are a bit too wide as opposed to
1769 ones that are a bit too narrow.
1770 We have no idea why.
1773 \begin_layout Itemize
1774 \begin_inset Flex CharStyle:Code
1777 \begin_layout Plain Layout
1786 \begin_inset Flex CharStyle:Code
1789 \begin_layout Plain Layout
1798 \begin_inset Newline newline
1801 Warnings about troubles breaking the page.
1802 Once again, just look at the output.
1803 Your eyes will tell you where something has gone wrong.
1806 \begin_layout Itemize
1807 \begin_inset Flex CharStyle:Code
1810 \begin_layout Plain Layout
1812 \begin_inset Quotes els
1816 \begin_inset Quotes ers
1825 \begin_inset Newline newline
1829 \begin_inset Quotes eld
1833 \begin_inset Quotes erd
1836 isn't installed on this system.
1837 This usually appears because some package your document needs isn't installed.
1838 If you didn't touch the preamble or didn't use the
1839 \begin_inset Flex CharStyle:Code
1842 \begin_layout Plain Layout
1850 command, then one of the packages LyX tried to load is missing.
1852 \begin_inset Flex CharStyle:MenuItem
1855 \begin_layout Plain Layout
1856 Help\SpecialChar \menuseparator
1862 to get a list of packages that LyX knows about.
1863 This file is updated whenever you reconfigure LyX (using
1864 \begin_inset Flex CharStyle:MenuItem
1867 \begin_layout Plain Layout
1868 Tools\SpecialChar \menuseparator
1874 ) and tells you which packages have been detected and what they do.
1875 \begin_inset Newline newline
1879 \begin_inset Flex CharStyle:Code
1882 \begin_layout Plain Layout
1890 command and the package in question isn't installed, then you'll need to
1891 install it yourself.
1894 \begin_layout Itemize
1895 \begin_inset Flex CharStyle:Code
1898 \begin_layout Plain Layout
1899 LaTeX Error: Unknown option
1905 \begin_inset Newline newline
1908 Error messages beginning with this are trying to tell you that you specified
1909 a bad or undefined option to a package.
1910 Check the package's documentation.
1913 \begin_layout Itemize
1914 \begin_inset Flex CharStyle:Code
1917 \begin_layout Plain Layout
1918 Undefined control sequence
1924 \begin_inset Newline newline
1927 If you've inserted LaTeX code into your document, but made a typo, you'll
1929 You may have forgotten to load a package.
1930 In any case, this error message usually means that you used an undefined
1935 \begin_layout Standard
1936 There are other error and warning messages.
1937 Some are self-explanatory.
1938 These are usually LaTeX messages.
1939 Others are downright cryptic.
1940 These are usually TeX error messages, and we really have
1944 what they mean or how to decipher them.
1948 \begin_layout Standard
1949 There's a general sequence you should follow if you get error messages:
1952 \begin_layout Enumerate
1953 Look at the LaTeX code you inserted for typos.
1956 \begin_layout Enumerate
1957 If there are no typos, check that you used the command(s) correctly.
1960 \begin_layout Enumerate
1961 If you get a bunch of error boxes piled up at the very top of the document—and
1962 especially if you see a
1963 \begin_inset Quotes eld
1967 \begin_inset Flex CharStyle:Code
1970 \begin_layout Plain Layout
1979 \begin_inset Quotes erd
1982 error—it means that there are errors in the preamble.
1983 Start debugging your preamble.
1986 \begin_layout Enumerate
1987 If you didn't add anything to the preamble and didn't add any LaTeX code
1988 to the document, the first suspect is your LaTeX distribution itself.
1989 Check for missing packages and install them.
1992 \begin_layout Enumerate
1993 Okay, so there are no missing packages.
1994 Did you use any of the fine-tuning options in LyX? Specifically, did you
1999 any of them, like trying to manually insert lots of
2000 \begin_inset Flex CharStyle:Code
2003 \begin_layout Plain Layout
2005 \begin_inset space ~
2014 \begin_inset Flex CharStyle:Code
2017 \begin_layout Plain Layout
2024 \begin_inset Flex CharStyle:Code
2027 \begin_layout Plain Layout
2033 ? Did you try to kludge something together with these instead of using the
2034 appropriate paragraph environment?
2037 \begin_layout Enumerate
2038 All right, you didn't use any of the fine-tuning options, you played by
2040 Did you try to pull a fancy maneuver? Did you do something funky inside
2041 a table or an equation, like inserting a graphic into a table cell?
2044 \begin_layout Enumerate
2045 Do you have long sections of text where LaTeX cannot find a place to break
2046 a line? By default, LaTeX is rather strict about how much extra inter-word
2047 spacing it will add in order to break a line.
2048 Preferably, you should rework the paragraph to avoid the problem.
2049 If this isn't an option, you can wrap your text in
2050 \begin_inset Flex CharStyle:Code
2053 \begin_layout Plain Layout
2061 to make LaTeX's line breaking more, well, sloppy.
2064 \begin_layout Enumerate
2065 Did you go overboard with the nesting? LyX (currently) doesn't check to
2066 make sure you're in the limits for nesting environments.
2067 If you nested a bunch of environments to the
2068 \begin_inset Formula $17^{\mathrm{th}}$
2071 level, that's the problem.
2072 (The limit in LaTeX is five.)
2075 \begin_layout Enumerate
2076 Okay, you didn't get any error messages, but your output looks awful.
2077 If you have a table or figure that's too wide or long for the page, you
2082 \begin_layout Enumerate
2083 rescale the figure so it fits.
2086 \begin_layout Enumerate
2087 trim down the table so it fits.
2091 \begin_layout Enumerate
2092 If something else is wrong with the output, and you didn't try to pull anything
2093 fancy or kludge the fine-tuning options, we're not sure what's wrong.
2096 \begin_layout Standard
2097 If all this doesn't help—well, then
2101 you might have found a bug in LyX\SpecialChar \ldots{}
2105 \begin_layout Chapter
2109 \begin_layout Section
2110 Customizing Bibliographies with BibTeX
2113 \begin_layout Standard
2114 The most basic information about how to use BibTeX with LyX is contained
2117 Bibliography databases (BibTeX)
2124 The following subsections explain special bibliography features supported
2128 \begin_layout Subsection
2129 Alternative Citation Styles
2132 \begin_layout Standard
2133 Standard BibTeX uses numbers (e.
2134 \begin_inset space \thinspace{}
2138 \begin_inset space \space{}
2142 \begin_inset Quotes eld
2146 \begin_inset Quotes erd
2149 ) to refer to a cited work.
2150 However, in many scientific disciplines, other citation styles are in use.
2151 The most common one is the author-year style (e.
2152 \begin_inset space \thinspace{}
2156 \begin_inset space \space{}
2160 \begin_inset Quotes eld
2164 \begin_inset Quotes erd
2168 LyX supports two packages that provide this style,
2169 \begin_inset Flex CharStyle:Code
2172 \begin_layout Plain Layout
2179 \begin_inset Flex CharStyle:Code
2182 \begin_layout Plain Layout
2189 Both packages have their pros and cons, which cannot be listed in detail.
2190 If you only want to have simple author-year (or author-numerical) style,
2191 or if you want to use one of the countless style files for
2192 \begin_inset Flex CharStyle:Code
2195 \begin_layout Plain Layout
2201 , than the established
2202 \begin_inset Flex CharStyle:Code
2205 \begin_layout Plain Layout
2211 package is probably your choice.
2212 If you need special features like short title references, ibidem etc., you
2214 \begin_inset Flex CharStyle:Code
2217 \begin_layout Plain Layout
2226 \begin_layout Standard
2227 The handling of both packages in LyX is basically the same.
2229 \begin_inset Flex CharStyle:MenuItem
2232 \begin_layout Plain Layout
2233 Document\SpecialChar \menuseparator
2240 \begin_inset Flex CharStyle:MenuItem
2243 \begin_layout Plain Layout
2250 \begin_inset Flex CharStyle:MenuItem
2253 \begin_layout Plain Layout
2260 \begin_inset Flex CharStyle:MenuItem
2263 \begin_layout Plain Layout
2270 With both packages, you will get some extra features in the citation dialog
2271 and you can select the style of the reference (
2272 \begin_inset Quotes eld
2276 \begin_inset Quotes erd
2280 \begin_inset Quotes eld
2284 \begin_inset Quotes erd
2288 \begin_inset Quotes eld
2292 \begin_inset Quotes erd
2296 \begin_inset Quotes eld
2300 \begin_inset Quotes erd
2304 Note that both packages need specifically designed style files.
2305 They both ship their own, but there are lots of additional style files,
2306 and there is even an interactive style file builder
2310 \begin_layout Plain Layout
2312 \begin_inset Flex URL
2315 \begin_layout Plain Layout
2317 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2328 \begin_inset Flex CharStyle:Code
2331 \begin_layout Plain Layout
2340 \begin_layout Subsection
2341 Sectioned Bibliographies
2344 \begin_layout Standard
2345 Sometimes you might need to divide your bibliography into several sections.
2346 If you are for instance a historian, the possibility to separate sources
2347 and scientific works is most likely a
2348 \begin_inset Quotes eld
2352 \begin_inset Quotes erd
2356 Unfortunately, BibTeX itself does not allow you to do this.
2357 But with the help of some LaTeX packages, BibTeX can be extended to fit
2361 \begin_layout Standard
2362 LyX provides native support for one of these packages,
2370 \begin_layout Plain Layout
2372 \begin_inset Flex URL
2375 \begin_layout Plain Layout
2377 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2387 The advantage of this package (compared to other packages like
2391 ) is that you don't need to define new citation commands.
2392 Instead, you need to prepare different bibliographic databases which include
2393 the entries for the different sections of the bibliography.
2394 For example: If you want to divide your bibliography into the sections
2396 \begin_inset Quotes eld
2400 \begin_inset Quotes erd
2404 \begin_inset Quotes eld
2408 \begin_inset Quotes erd
2411 , you first need to create two bibliographic databases, e.
2412 \begin_inset space \thinspace{}
2416 \begin_inset space \space{}
2420 \begin_inset Flex CharStyle:Code
2423 \begin_layout Plain Layout
2430 \begin_inset Flex CharStyle:Code
2433 \begin_layout Plain Layout
2443 \begin_layout Standard
2445 \begin_inset Flex CharStyle:MenuItem
2448 \begin_layout Plain Layout
2449 Document\SpecialChar \menuseparator
2456 \begin_inset Flex CharStyle:MenuItem
2459 \begin_layout Plain Layout
2466 \begin_inset Flex CharStyle:MenuItem
2469 \begin_layout Plain Layout
2470 Sectioned bibliography
2476 Now you can insert multiple BibTeX bibliographies, one for each section
2477 of your bibliography.
2478 Returning to our example: Insert the BibTeX bibliography
2479 \begin_inset Flex CharStyle:Code
2482 \begin_layout Plain Layout
2488 and a second one for the database
2489 \begin_inset Flex CharStyle:Code
2492 \begin_layout Plain Layout
2499 You are free to use the same or different styles for each section.
2500 Additionally, you can chose if the bibliography section should contain
2502 \begin_inset Quotes eld
2505 all cited references
2506 \begin_inset Quotes erd
2509 of the specified database(s) (which is the default),
2510 \begin_inset Quotes eld
2513 all uncited references
2514 \begin_inset Quotes erd
2518 \begin_inset Quotes eld
2522 \begin_inset Quotes erd
2526 This might be useful if you would like to separate your bibliography into
2528 \begin_inset Quotes eld
2532 \begin_inset Quotes erd
2536 \begin_inset Quotes eld
2540 \begin_inset Quotes erd
2544 \begin_inset Quotes eld
2548 \begin_inset Quotes erd
2552 The titles for the sections can be added as ordinary sections or subsections.
2554 \begin_inset Flex CharStyle:Code
2557 \begin_layout Plain Layout
2563 removes the bibliography title, you have manually re-add that, too (as
2564 a chapter* or section*, for instance).
2567 \begin_layout Subsection
2568 Multiple Bibliographies
2571 \begin_layout Standard
2572 Multiple bibliographies, e.
2573 \begin_inset space \thinspace{}
2577 \begin_inset space \space{}
2580 a bibliography for each section or chapter of the document, are not supported
2583 \begin_inset Flex CharStyle:Code
2586 \begin_layout Plain Layout
2592 package, which is used for the creation of sectioned bibliographies in
2593 LyX (see the previous section), provides an easy way to solve this task,
2594 if you are willing to use some
2595 \begin_inset Flex CharStyle:MenuItem
2598 \begin_layout Plain Layout
2605 \begin_inset space ~
2609 \begin_inset CommandInset ref
2611 reference "sec:Inserting-TeX-Code"
2619 \begin_layout Plain Layout
2620 An alternative approach is to use the
2621 \begin_inset Flex CharStyle:Code
2624 \begin_layout Plain Layout
2631 \begin_inset Flex CharStyle:Code
2634 \begin_layout Plain Layout
2640 package, respectively.
2648 \begin_layout Standard
2650 \begin_inset Flex CharStyle:MenuItem
2653 \begin_layout Plain Layout
2654 Document\SpecialChar \menuseparator
2661 \begin_inset Flex CharStyle:MenuItem
2664 \begin_layout Plain Layout
2671 \begin_inset Flex CharStyle:MenuItem
2674 \begin_layout Plain Layout
2675 Sectioned bibliography
2681 In the document, you have to enclose the sections, which shall contain
2682 their own bibliography (including the BibTeX bibliography itself), between
2684 \begin_inset Flex CharStyle:Code
2687 \begin_layout Plain Layout
2696 \begin_inset Flex CharStyle:Code
2699 \begin_layout Plain Layout
2707 (those commands have to be inserted as TeX code).
2708 The bibliography will contain all references which have been cited in the
2710 \begin_inset Flex CharStyle:Code
2713 \begin_layout Plain Layout
2724 If you are using this approach, then every citation reference has to be
2726 \begin_inset Flex CharStyle:Code
2729 \begin_layout Plain Layout
2737 \begin_inset Flex CharStyle:Code
2740 \begin_layout Plain Layout
2749 \begin_layout Section
2753 \begin_layout Subsection
2757 \begin_layout Standard
2758 When you are working on a large file with many sections, it is often convenient
2759 to break up the document into several files, or perhaps you have something
2760 where a table may change from time to time, but the preceding text does
2762 In these cases, you should seriously consider using multipart documents.
2763 For example, scientific papers often have five major sections: the introduction
2764 , observations, results, discussion, and conclusion.
2765 Each of these could be its own separate LyX file, with one
2766 \begin_inset Quotes eld
2770 \begin_inset Quotes erd
2773 file which contains the title, authors, abstract, references, etc., plus
2774 the five included files.
2775 It is important to note that each of these files is a full LyX file which
2776 can be formatted and printed on its own, as well as included in a master
2778 Each of these files must have the same document class, however—don't attempt
2779 to mix book classes with article classes.
2780 You may also include LaTeX files; however, these files must not have their
2782 \begin_inset space \thinspace{}
2786 \begin_inset space \space{}
2789 everything up to and including the
2790 \begin_inset Flex CharStyle:Code
2793 \begin_layout Plain Layout
2802 \begin_inset Flex CharStyle:Code
2805 \begin_layout Plain Layout
2813 line must be deleted) or else errors will be generated when you try to
2817 \begin_layout Standard
2818 LyX allows you to include files quite easily with
2819 \begin_inset Flex CharStyle:MenuItem
2822 \begin_layout Plain Layout
2823 Insert\SpecialChar \menuseparator
2825 \begin_inset space ~
2834 When you click on this selection a small box is inserted into the file
2835 at the current cursor location.
2836 Clicking on the box raises a dialog which allows you to select the file
2837 to be included, and the method of its inclusion.
2841 \begin_layout Standard
2842 The file selection box should by now be obvious.
2843 The three inclusion methods are
2844 \begin_inset Quotes eld
2848 \begin_inset Quotes erd
2852 \begin_inset Quotes eld
2856 \begin_inset Quotes erd
2860 \begin_inset Quotes eld
2864 \begin_inset Quotes erd
2868 The difference between
2869 \begin_inset Quotes eld
2873 \begin_inset Quotes erd
2877 \begin_inset Quotes eld
2881 \begin_inset Quotes erd
2884 is really only meaningful to LaTeXperts, but the practical difference is
2885 that files which are
2886 \begin_inset Quotes eld
2890 \begin_inset Quotes erd
2893 are typeset beginning on a new page, while files which are
2894 \begin_inset Quotes eld
2898 \begin_inset Quotes erd
2901 are typeset starting on the current page.
2904 \begin_layout Standard
2905 Generally, the master file is converted into a full LaTeX file before typesettin
2906 g, while the included files are converted to LaTeX files which do not have
2907 all the preamble information.
2910 \begin_layout Standard
2912 \begin_inset Quotes eld
2916 \begin_inset Quotes erd
2919 included file allows you to include a file typeset exactly as it appears
2921 \begin_inset space \thinspace{}
2925 \begin_inset space \space{}
2929 \begin_inset Flex CharStyle:Code
2932 \begin_layout Plain Layout
2938 mode, with the characters set in a fixed-width typewriter font.
2939 Normally, spaces in this file are invisible, though two consecutive spaces
2940 are conserved, unlike LyX's normal treatment of spaces.
2941 However, setting the
2942 \begin_inset Flex CharStyle:MenuItem
2945 \begin_layout Plain Layout
2947 \begin_inset space ~
2951 \begin_inset space ~
2955 \begin_inset space ~
2963 checkbox typesets a mark to unambiguously define the presence of a space.
2967 \begin_layout Subsection
2968 Cross-References Between Files
2971 \begin_layout Standard
2972 \begin_inset Box Shadowbox
2981 height_special "totalheight"
2984 \begin_layout Plain Layout
2985 This section is somewhat out of date.
2986 Need to describe default master documents and how children are opened when
2996 \begin_layout Standard
2997 It is possible to set up cross-references between the different files.
2998 First, open all the files in question: let's call them A and B in a two
2999 file example, where B is included in A.
3000 Let's say you insert a label in A, then want to reference it in B.
3001 Open the cross-reference dialog in whilst in document B, and you can select
3003 \begin_inset Quotes eld
3007 \begin_inset Quotes erd
3013 \begin_layout Subsection
3014 Bibliography Lists in all Subdocuments
3017 \begin_layout Standard
3018 \begin_inset Box Frameless
3027 height_special "totalheight"
3030 \begin_layout Plain Layout
3031 This section also needs updating.
3032 There is now material about this on the wiki, and it could be copied here.
3040 \begin_layout Standard
3041 Copy the bibliography list with all entries to all subdocuments and transform
3043 This way LyX will find the
3044 \begin_inset Flex CharStyle:Code
3047 \begin_layout Plain Layout
3053 -files and you can easily insert references without making the bibliography
3057 \begin_layout Standard
3058 As the bibliography list is in a comment, LaTeX won't use use it and the
3059 references will look like this: [?], instead of like this: [1].
3060 One solution is to use the LaTeX-package
3061 \begin_inset Flex CharStyle:Code
3064 \begin_layout Plain Layout
3070 that will only include comments by processing the files separately.
3071 To do this, add in the LaTeX preamble of every subdocument the following:
3074 \begin_layout LyX-Code
3080 \begin_layout LyX-Code
3083 includecomment{comment}
3086 \begin_layout Standard
3088 \begin_inset Flex URL
3091 \begin_layout Plain Layout
3093 http://wiki.lyx.org/FAQ/Unsorted#toc31
3101 \begin_layout Section
3102 Fancy Headers and Footers
3105 \begin_layout Standard
3106 The default page layout is rather plain; for an
3107 \begin_inset Flex CharStyle:Code
3110 \begin_layout Plain Layout
3116 document class, all you get is a centered page number at the bottom of
3118 This document uses KOMA-script's book class, so it appears to be a bit
3120 But to really put on a show, you need to set the document page style to
3122 \begin_inset Quotes eld
3126 \begin_inset Quotes erd
3129 , as mentioned in the
3134 This section describes the LaTeX code you need to insert in your LaTeX
3135 preamble in order to get the desired effects.
3138 \begin_layout Standard
3139 For more information on fancy headers, see the
3140 \begin_inset Flex CharStyle:Code
3143 \begin_layout Plain Layout
3149 package documentation.
3151 \begin_inset Flex URL
3154 \begin_layout Plain Layout
3156 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3164 \begin_layout Standard
3165 The page header is divided into three fields, not surprisingly labeled
3166 \begin_inset Quotes eld
3170 \begin_inset Quotes erd
3174 \begin_inset Quotes eld
3178 \begin_inset Quotes erd
3182 \begin_inset Quotes eld
3186 \begin_inset Quotes erd
3190 The footer is also divided into these three fields.
3191 The LaTeX commands to set these fields in the simplest manner are
3192 \begin_inset Flex CharStyle:Code
3195 \begin_layout Plain Layout
3204 \begin_inset Flex CharStyle:Code
3207 \begin_layout Plain Layout
3216 \begin_inset Flex CharStyle:Code
3219 \begin_layout Plain Layout
3228 \begin_inset Flex CharStyle:Code
3231 \begin_layout Plain Layout
3240 Suppose you wish to put your name in the upper left hand corner of each
3242 Simply insert the following command in the preamble:
3245 \begin_layout Standard
3254 \begin_layout Standard
3255 You will now see your name in the upper left.
3256 If a field has a default entry that you would like to get rid of (often
3257 the page number appears in the central footer, simply include a command
3258 with a blank argument, e.
3259 \begin_inset space \thinspace{}
3265 \begin_layout Standard
3273 \begin_layout Standard
3274 Let's get really fancy: lets put the section number with the word
3275 \begin_inset Quotes eld
3279 \begin_inset Quotes erd
3283 \begin_inset space \thinspace{}
3287 \begin_inset space \space{}
3290 Section 3) in the upper left, the page number (e.
3291 \begin_inset space \thinspace{}
3295 \begin_inset space \space{}
3298 Page 4) in the upper right, your name in the lower left, and the date in
3300 The following commands should now appear in the preamble:
3303 \begin_layout Standard
3313 \begin_layout Standard
3321 \begin_layout Standard
3331 \begin_layout Standard
3340 \begin_layout Standard
3348 \begin_layout Standard
3358 \begin_layout Standard
3360 \begin_inset Flex CharStyle:Code
3363 \begin_layout Plain Layout
3372 \begin_inset Flex CharStyle:Code
3375 \begin_layout Plain Layout
3383 access LaTeX's section and page counters, and so print out the current
3384 section and page numbers.
3386 \begin_inset Flex CharStyle:Code
3389 \begin_layout Plain Layout
3397 simply prints out today's date.
3400 \begin_layout Standard
3401 The thicknesses of the horizontal rules drawn beneath the header and above
3402 the footer can also be modified.
3403 If you don't want one of the rules, set its thickness to 0.
3404 The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3410 \begin_inset Flex CharStyle:Code
3413 \begin_layout Plain Layout
3418 headrulewidth}{0.4pt}
3424 \begin_inset Flex CharStyle:Code
3427 \begin_layout Plain Layout
3432 footrulewidth}{0.4pt}
3437 to set the thicknesses.
3440 \begin_layout Standard
3441 You can switch the header/footer settings on and off for individual pages
3443 \begin_inset Flex CharStyle:Code
3446 \begin_layout Plain Layout
3449 thispagestyle{empty}
3455 \begin_inset Flex CharStyle:Code
3458 \begin_layout Plain Layout
3461 thispagestyle{plain}
3467 \begin_inset Flex CharStyle:Code
3470 \begin_layout Plain Layout
3473 thispagestyle{fancy}
3479 Simply insert them in the text on the page you want changed and mark them
3481 In fact, title pages are marked as plain by default, while following pages
3482 are marked fancy when using the global fancy setting.
3485 \begin_layout Standard
3486 As a final example, it is possible to include an image in the header or
3488 Suppose you want to put a company logo in the upper lefthand corner.
3489 You might try something like
3492 \begin_layout Standard
3501 includegraphics{logo.eps}}}
3504 \begin_layout Standard
3506 (you may need to preface this with
3507 \begin_inset Flex CharStyle:Code
3510 \begin_layout Plain Layout
3514 usepackage{graphics}
3519 if you don't include graphics elsewhere in your document).
3522 \begin_layout Section
3523 Itemize Bullet Selection
3524 \begin_inset CommandInset label
3533 \begin_layout Standard
3539 \begin_layout Subsection
3543 \begin_layout Standard
3544 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3545 Using this dialog you can easily specify what bullet shape to use at each
3546 level of an itemized list.
3547 These settings are document-wide so you won't be able to specify different
3548 sets of bullets for different paragraphs.
3552 \begin_layout Plain Layout
3553 Well, actually you can but you'll have to do it by hand.
3561 \begin_layout Subsection
3565 \begin_layout Standard
3566 Open the dialog by selecting the
3567 \begin_inset Flex CharStyle:MenuItem
3570 \begin_layout Plain Layout
3571 Document\SpecialChar \menuseparator
3577 menu item and then select the
3578 \begin_inset Flex CharStyle:MenuItem
3581 \begin_layout Plain Layout
3590 \begin_layout Standard
3591 The dialog provides you with a table of bullet shapes.
3592 A column of buttons on the left of the table provides access to the six
3593 different panels of bullet shapes.
3594 The row of buttons across the top is used to select which bullet depth
3596 A text entry under the table shows the currently selected bullet shape's
3597 LaTeX equivalent and this can be edited if desired.
3598 If you do modify the text you will also need to specify any needed packages
3599 in the LaTeX preamble.
3602 \begin_layout Standard
3603 The six panels are divided up by the packages they require.
3604 The following table shows the mappings from button name to LaTeX packages.
3607 \begin_layout Standard
3609 \begin_inset Tabular
3610 <lyxtabular version="3" rows="7" columns="2">
3611 <features tabularvalignment="middle">
3612 <column alignment="center" valignment="top" width="0pt">
3613 <column alignment="center" valignment="top" width="0pt">
3615 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3618 \begin_layout Plain Layout
3633 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3636 \begin_layout Plain Layout
3653 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3656 \begin_layout Plain Layout
3671 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3674 \begin_layout Plain Layout
3690 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3693 \begin_layout Plain Layout
3708 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3711 \begin_layout Plain Layout
3728 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3731 \begin_layout Plain Layout
3746 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3749 \begin_layout Plain Layout
3766 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3769 \begin_layout Plain Layout
3784 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3787 \begin_layout Plain Layout
3804 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3807 \begin_layout Plain Layout
3822 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3825 \begin_layout Plain Layout
3842 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3845 \begin_layout Plain Layout
3860 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3863 \begin_layout Plain Layout
3886 \begin_layout Standard
3887 LyX doesn't stop you using bullets from packages you don't have.
3888 If you get errors from LaTeX when you try to view or print the file, then
3889 it is likely you are missing a package.
3893 \begin_layout Plain Layout
3894 LyX doesn't restrict your use since you may be editing locally and exporting
3903 \begin_layout Subsection
3907 \begin_layout Standard
3908 Select which bullet depth you want to change then select the bullet shape
3910 Any changes will not be visible in LyX, but are visible when viewing the
3914 \begin_layout Standard
3915 You can reset a bullet shape to the default simply by clicking your right
3916 mouse button on the appropriate bullet depth button.
3920 \begin_layout Plain Layout
3925 want to have multiple sets of paragraphs with different sets of bullets
3926 in each, then you're going to have to get your hands dirty with TeX code.
3927 The bullet selection dialog can help though because it provides you with
3928 the LaTeX code for a wide range of bullet shapes.
3929 To make your own custom paragraphs you have the following options:
3932 \begin_layout Plain Layout
3936 \begin_layout Plain Layout
3952 \begin_layout Plain Layout
3956 \begin_layout Plain Layout
3978 \begin_layout Itemize
3979 Use the LaTeX command
3980 \begin_inset Flex CharStyle:Code
3983 \begin_layout Plain Layout
3991 to specify a new bullet shape for a given depth.
3992 You'll also need to save the current bullet shape so you can restore it
3994 In this itemized list the following LaTeX code was used to change the bullet
3995 used for the first depth.
3999 \begin_layout LyX-Code
4009 \begin_layout LyX-Code
4026 \begin_layout Itemize
4027 Note that the itemize depth is specified in Roman numerals as part of the
4037 \begin_layout Itemize
4041 \begin_layout Plain Layout
4054 Specify each individual entry by starting each item with the bullet shape
4055 enclosed in square brackets and set as
4056 \begin_inset Flex CharStyle:MenuItem
4059 \begin_layout Plain Layout
4066 For example, this item was started with
4067 \begin_inset Flex CharStyle:Code
4070 \begin_layout Plain Layout
4085 \begin_layout Plain Layout
4089 \begin_layout Plain Layout
4105 \begin_layout Plain Layout
4106 You'll also need to revert the labelitem back to its previous setting for
4107 the global bullet shape settings to remain in effect.
4108 The way used here was:
4111 \begin_layout LyX-Code
4126 \begin_layout Chapter
4127 LyX and the World Wide Web
4130 \begin_layout Standard
4131 LyX has long supported the export of documents to various web-friendly formats,
4133 Before verson 1.7, however, HTML export was always accomplished by the use
4134 of external converters.
4138 \begin_layout Plain Layout
4139 For details on the use of external converters with LyX, see the
4144 section of the Customization manual.
4149 These fall into two large groups: there are converters that use LaTeX as
4150 an intermediate format, such as
4151 \begin_inset Flex CharStyle:Code
4154 \begin_layout Plain Layout
4161 \begin_inset Flex CharStyle:Code
4164 \begin_layout Plain Layout
4171 \begin_inset Flex CharStyle:Code
4174 \begin_layout Plain Layout
4180 , relying upon LyX to produce the LaTeX; and there is a converter that works
4181 directly on LyX files,
4182 \begin_inset Flex CharStyle:Code
4185 \begin_layout Plain Layout
4192 All of these have different advantages and disadvantages.
4196 \begin_layout Standard
4197 The LaTeX-based converters have the advantage that, in principle, they know
4198 everything about the exported document that LaTeX does.
4199 Such converters do not care, for example, if a certain block of code was
4200 produced by LyX or was Evil Red Text.
4202 \begin_inset Flex CharStyle:Code
4205 \begin_layout Plain Layout
4211 files, counters, and references, and can often make use of the
4212 \begin_inset Flex CharStyle:Code
4215 \begin_layout Plain Layout
4221 files generated by BibTeX.
4222 On the other hand, LaTeX is a very hard language to parse---it is sometimes
4223 said that only TeX itself understands TeX---and LaTeX-based converters
4224 will often choke on what seem to be quite simple constructs; complex ones
4225 can throw them completely, and as of this writing, for example, the
4229 manual will not export with
4230 \begin_inset Flex CharStyle:Code
4233 \begin_layout Plain Layout
4239 , though the others will.
4240 The other issue concerns how math is handled.
4241 These converters typically convert the formulae into little pictures that
4242 are then linked from the HTML document.
4243 Since these are actually generated by LaTeX, they are accurate.
4244 But they do not scale well, and just getting them to look as if they are
4245 actually meant to be in your document---so that the font sizes seem to
4246 be roughly the same---can be a challenge.
4249 \begin_layout Standard
4251 \begin_inset Flex CharStyle:Code
4254 \begin_layout Plain Layout
4260 solves some of these problems.
4261 In particular, its rendering of math tends to look better than
4262 \begin_inset Flex CharStyle:Code
4265 \begin_layout Plain Layout
4271 's, at least in simpler cases, since it renders math using a neat combination
4272 of HTML and CSS rather than converting the formulae to images.
4273 But more complex formula tend to be rendered less well than with
4274 \begin_inset Flex CharStyle:Code
4277 \begin_layout Plain Layout
4283 , since there is no reasonable way of scaling parentheses in HTML, for example.
4284 More importantly (as of version 0.39, at least),
4285 \begin_inset Flex CharStyle:Code
4288 \begin_layout Plain Layout
4294 has no support for math macros, for user-defined paragraph or character
4295 styles, or for tables of contents and figures.
4296 These limitations make
4297 \begin_inset Flex CharStyle:Code
4300 \begin_layout Plain Layout
4306 unsuitable for many of the documents more advanced LyX users would produce.
4307 In principle, of course, all of these problems could be solved, but the
4308 LyX developers have decided to follow a different path and made LyX itself
4309 capable of writing XHTML, just as it is capable of writing LaTeX, DocBook,
4313 \begin_layout Standard
4314 As of this writing, XHTML output remains under development and should probably
4316 \begin_inset Quotes eld
4320 \begin_inset Quotes erd
4327 \begin_layout Plain Layout
4329 \begin_inset Flex CharStyle:Code
4332 \begin_layout Plain Layout
4333 development/HTML.notes
4338 , which can be found in the LyX source tree or
4339 \begin_inset CommandInset href
4341 name "accessed online"
4342 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4346 , usually contains up-to-date information about the state of XHTML output.
4351 Still, the developers have chosen this approach because it has several
4352 potential advantages over the other two.
4355 \begin_layout Standard
4356 These advantages are primarily due to the fact that the XHTML output routines,
4357 since they are part of LyX, know everything LyX knows about the document
4362 \begin_layout Plain Layout
4363 Another advantege is that, since these routines are internal to LyX, they
4364 are immune to changes in LyX's file format, or to changes in the semantics
4370 So they know about the table of contents (as displayed in the Outline),
4371 about the counters associated with different paragraph styles, and about
4372 user-defined styles.
4373 The XHTML output routines know what LyX knows about internationalization,
4374 too, so they will output
4375 \begin_inset Quotes eld
4379 \begin_inset Quotes erd
4383 \begin_inset Quotes eld
4391 \begin_inset Quotes erd
4394 , depending upon the language in effect at the time.
4398 \begin_layout Standard
4399 Quite generally, the output routines know everything LyX knows about document
4400 layout, that is, about the document is to be rendered on screen.
4401 We can use this information when we output the document as XHTML.
4406 generates CSS style information corresponding to the layout information
4407 it uses to render the document on screen: if section headings are supposed
4408 to be sans-serif and bold as seen in LyX, then (by default) they will be
4409 sans-serif and bold when viewed in a web browser, too.
4410 And this is true not just for pre-defined styles, like Section, but for
4411 any style, including user-defined styles.
4412 Indeed, the XHTML output routines make no distinction between user-defined
4413 paragraph and character styles and LyX's own pre-defined styles: in each
4414 case, everything LyX knows about the styles is contained in the layout
4416 And much the same is true as regards pre-defined textual insets, such as
4417 footnotes, and custom versions.
4421 \begin_layout Standard
4422 The result is that XHTML output can be customized and extended in
4426 the same way LaTeX output can be customized and extended: through layout
4428 See chapter five of the
4432 manual for the details.
4435 \begin_layout Standard
4436 As for math, LyX renders math using MathML.
4437 This has advantages and disadvantages.
4438 The advantage is that MathML is a dialect of XML designed specifically
4439 for mathematics on the web, and it typically renders very well in browsers
4441 The first disadvantage is that not all browsers support MathML, and support
4442 is not complete even in the Gecko-based browsers, such as Firefox.
4443 A second disadvantage, as compared to rendering math by images, is that
4444 LyX can only output MathML for LaTeX constructs that it knows about, which
4445 means that the use of ERT in math---e.g., the command
4446 \begin_inset Flex CharStyle:Code
4449 \begin_layout Plain Layout
4458 \begin_inset Flex CharStyle:Code
4461 \begin_layout Plain Layout
4467 package---will produce nothing helpful.
4468 Eventually, therefore, LyX will offer the user the option to use MathML
4469 or images, and it will offer this choice on a case by case basis.
4472 \begin_layout Standard
4473 The remainder of this chapter contains more detailed information on XHTML
4474 output, its limitations, and ways around those limitations.
4477 \begin_layout Standard
4478 \begin_inset Note Note
4481 \begin_layout Plain Layout
4482 This is very incomplete at this point!
4490 \begin_layout Section
4491 Bibliography and Citations
4494 \begin_layout Standard
4495 XHTML output fully supports bibliographies and citations.
4499 \begin_layout Standard
4500 Citation labels are generated by exactly the same machinery that generates
4501 LyX's on-screen labels, so the labels will look in the output much as they
4502 do in LyX, though better.
4503 If you are using numerical citations, then LyX will output numerical labels,
4504 such as [1] or [17], rather than simply showing the citation key in square
4505 brackets, as it does on-screen.
4506 If you are using author-year citations, then LyX will add lowercase letters
4507 to the years, just as BibTeX does, if it finds more than one citation for
4508 a given author-year combination.
4509 The labels will be printed with the bibliography entries.
4510 Note that there is, at present, no way to customize the appearance of the
4511 labels, for example, to choose between square brackets and parentheses.
4514 \begin_layout Standard
4515 Bibliography output is handled by the same machinery that handles the presentati
4516 on of reference information in the citation dialog, so you will see in the
4517 XHTML output pretty much what you would see if you were to look at a given
4518 entry in the citation dialog.
4519 The formatting can be customized in your layout file or, preferably, in
4522 \begin_inset CommandInset ref
4524 reference "sub:Citation-format-description"
4532 manual for the details.
4535 \begin_layout Standard
4536 The other significant defect is that cross-referenced information is printed
4537 with every entry with which it is associated.
4538 So you can see things like this:
4543 \begin_inset Quotes eld
4546 Context and Logical Form
4547 \begin_inset Quotes erd
4552 Language in Context: Selected Essays
4554 (Oxford: Oxford University Press, 2007), pp.
4560 \begin_inset Quotes eld
4563 Semantics in Context
4564 \begin_inset Quotes erd
4569 Language in Context: Selected Essays
4571 (Oxford: Oxford University Press, 2007), pp.
4575 \begin_layout Standard
4576 This should be fixed before long.
4579 \begin_layout Standard
4580 There is no support at present for sectioned bibliographies.
4581 If you have multiple bibliographies, then LyX will print the same bibliography
4585 \begin_layout Section
4589 \begin_layout Standard
4590 LyX will happily export indexes as XHTML, but with certain limitations at
4594 \begin_layout Standard
4595 Index export will be most reliable when you do not attempt to use the fancy
4596 constructs that are described in the section on indexes in the
4604 \begin_layout Plain Layout
4605 The main issue here is that LyX itself does not really handle these.
4606 It just lets you enter what you would have to enter in raw LaTeX.
4611 We'll describe how they are handled using the subsection headings from
4615 \begin_layout Itemize
4616 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
4617 these, but the entries must be separated by
4618 \begin_inset Quotes eld
4622 \begin_inset Quotes erd
4625 , that is, there must be spaces around the exclamation point.
4626 This is because it is otherwise too difficult to check for escaped exclamation
4627 points, ones in math, and so forth.
4630 \begin_layout Itemize
4631 Page Ranges: There is no support at all for page ranges, since these make
4632 no sense with XHMTL.
4633 Instead, you will just get two index entries, one at either end.
4636 \begin_layout Itemize
4637 Cross-referencing: There is no support for cross-referencing.
4638 If LyX finds an entry containing the
4639 \begin_inset Quotes eld
4642 |see\SpecialChar \ldots{}
4644 \begin_inset Quotes erd
4647 construct, it is just dropped, and the rest is treated as an ordinary index
4651 \begin_layout Itemize
4652 Index Entry Order: LyX does support attempts to fix the sorting order.
4653 It will take what is before the first `@' it finds and use that for sorting,
4654 taking what follows the first `@' to be the actual entry.
4655 At present, LyX does not check for escaped `@', so do not try to index
4659 \begin_layout Itemize
4660 Index Entry Layout: You can format entries by using the text style dialog,
4661 or by using any other method available within LyX itself.
4662 There is no support for constructs like:
4663 \begin_inset Quotes eld
4667 \begin_inset Quotes erd
4671 Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
4672 and everything that follows it.
4675 \begin_layout Itemize
4676 Multiple Indexes: There is no support for multiple indexes.
4677 Rather, all index entries will be printed as one large index.
4678 To avoid our printing several versions of the index, we print only the
4679 main index, so make sure you have one.
4682 \begin_layout Section
4683 Nomenclature and Glossary
4686 \begin_layout Standard
4687 There is at present no support for glossaries.
4690 \begin_layout Chapter
4694 \begin_layout Section
4698 \begin_layout Standard
4699 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
4700 and retrieve information about the LyX internal state.
4701 This is only intended for advanced users, but they should find it useful.
4702 It is by writing to the LyX server, for example, that bibliography managers,
4703 such as JabRef, are able to
4704 \begin_inset Quotes eld
4708 \begin_inset Quotes erd
4714 \begin_layout Section
4715 Starting the LyX Server
4718 \begin_layout Standard
4719 The LyX server works through the use of a pair of named pipes.
4720 These are usually located in
4721 \begin_inset Flex CharStyle:Code
4724 \begin_layout Plain Layout
4730 , (except on Windows, where
4734 named pipes are special objects located in
4735 \begin_inset Flex CharStyle:Code
4738 \begin_layout Plain Layout
4750 ) and have the names
4751 \begin_inset Quotes eld
4755 \begin_inset Flex CharStyle:Code
4758 \begin_layout Plain Layout
4765 \begin_inset Quotes erd
4769 \begin_inset Quotes eld
4773 \begin_inset Flex CharStyle:Code
4776 \begin_layout Plain Layout
4783 \begin_inset Quotes erd
4787 External programs write into
4788 \begin_inset Flex CharStyle:Code
4791 \begin_layout Plain Layout
4797 and read back data from
4798 \begin_inset Flex CharStyle:Code
4801 \begin_layout Plain Layout
4808 The stem of the pipe names can be defined in the
4809 \begin_inset Flex CharStyle:MenuItem
4812 \begin_layout Plain Layout
4813 Tools\SpecialChar \menuseparator
4820 \begin_inset Flex CharStyle:Code
4823 \begin_layout Plain Layout
4824 "/home/myhome/lyxpipe"
4830 \begin_inset Flex CharStyle:Code
4833 \begin_layout Plain Layout
4852 configure this manually in order for the server to start.
4855 \begin_layout Standard
4857 \begin_inset Flex CharStyle:Code
4860 \begin_layout Plain Layout
4867 \begin_inset Flex CharStyle:Code
4870 \begin_layout Plain Layout
4876 ' to create the pipes.
4877 If one of the pipes already exists, LyX will assume that another LyX process
4878 is already running and will not start the server.
4879 On POSIX (Unix like) systems, if for some other reason, an unused
4880 \begin_inset Quotes eld
4884 \begin_inset Quotes erd
4887 pipe is left in existence when LyX closes, then LyX will try to delete
4889 If this fails for some reason, you will need to delete the pipes manually
4890 and then restart LyX.
4891 On Windows, pipes are deleted by the OS on program termination or crash,
4893 \begin_inset Quotes eld
4897 \begin_inset Quotes erd
4900 pipes should not be possible.
4903 \begin_layout Standard
4904 To have several LyX processes with servers at the same time, you have to
4905 use different configurations, perhaps by using separate user directories,
4907 \begin_inset Flex CharStyle:Code
4910 \begin_layout Plain Layout
4916 file, for each process.
4919 \begin_layout Standard
4920 If you are developing a client program, you might find it useful to enable
4921 debugging information from the LyX server.
4922 Do this by starting LyX as
4923 \begin_inset Flex CharStyle:Code
4926 \begin_layout Plain Layout
4935 \begin_layout Standard
4936 You can find a complete example client written in C in the source distribution
4938 \begin_inset Flex CharStyle:Code
4941 \begin_layout Plain Layout
4942 development/lyxserver/server_monitor.c
4950 \begin_layout Standard
4951 Another useful tool is command-line based client you will find in
4952 \begin_inset Flex CharStyle:Code
4955 \begin_layout Plain Layout
4956 src/client/lyxclient
4964 \begin_layout Section
4965 Normal communication
4968 \begin_layout Standard
4969 To issue a LyX call, the client writes a line of ASCII text into the input
4971 This line has the following format:
4988 \begin_layout Description
4989 clientname is a name that the client can choose arbitrarily.
4990 Its only use is that LyX will echo it if it sends an answer—so a client
4991 can dispatch results from different requesters.
4994 \begin_layout Description
4995 function is the function you want LyX to perform.
4996 It is the same as the commands you'd use in the minibuffer.
4999 \begin_layout Description
5000 argument is an optional argument which is meaningful only to some functions
5002 \begin_inset Quotes eld
5006 \begin_inset Quotes erd
5009 LFUN will insert the argument as text at the cursor position).
5012 \begin_layout Standard
5013 The answer from LyX will arrive in the output pipe and be of the form
5030 \begin_layout Standard
5039 are just echoed from the command request, while
5043 is more or less useful information filled according to how the command
5044 execution worked out.
5045 Some commands, such as
5046 \begin_inset Quotes eld
5050 \begin_inset Quotes erd
5053 , will return information about the internal state of LyX, while other will
5054 return an empty data-response.
5055 This means that the command execution went fine.
5058 \begin_layout Standard
5059 In case of errors, the response from LyX will have this form
5076 \begin_layout Standard
5081 should contain an explanation of why the command failed.
5084 \begin_layout Standard
5088 \begin_layout LyX-Code
5089 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5090 \begin_inset Newline newline
5093 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5094 \begin_inset Newline newline
5097 read a <~/.lyxpipe.out
5098 \begin_inset Newline newline
5104 \begin_layout Section
5108 \begin_layout Standard
5109 LyX can notify clients of events going on asynchronously.
5110 Currently it will only do this if the user binds a key sequence with the
5112 \begin_inset Quotes eld
5116 \begin_inset Quotes erd
5120 The format of the string LyX sends is as follows:
5124 \begin_inset Flex CharStyle:Code
5127 \begin_layout Plain Layout
5138 \begin_layout Standard
5143 is the printed representation of the key sequence that was actually typed
5147 \begin_layout Standard
5148 This mechanism can be used to extend LyX's command set and implement macros.
5149 Bind some key sequence to
5150 \begin_inset Quotes eld
5154 \begin_inset Quotes erd
5158 Then start a client that listens on the output pipe, dispatches the command
5159 according to the sequence, and starts a function that may use LyX calls
5160 and LyX requests to issue a command or a series of commands to LyX.
5163 \begin_layout Section
5164 The simple LyX Server Protocol
5167 \begin_layout Standard
5168 LyX implements a simple protocol that can be used for session management.
5169 All messages are of the form
5182 \begin_layout Standard
5188 \begin_inset Quotes eld
5192 \begin_inset Quotes erd
5196 \begin_inset Quotes eld
5200 \begin_inset Quotes erd
5205 \begin_inset Quotes eld
5209 \begin_inset Quotes erd
5212 is received from a client, LyX will report back to inform the client that
5213 it's listening to it's messages, while
5214 \begin_inset Quotes eld
5218 \begin_inset Quotes erd
5221 sent from LyX will inform clients that LyX is closing.
5224 \begin_layout Section
5225 Reverse DVI/PDF search
5228 \begin_layout Standard
5229 Some DVI/PDF viewers
5233 \begin_layout Plain Layout
5234 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5235 Skim on Mac OSX and SumatraPDF on Windows.
5244 facility (also called
5249 This means that you can tell LyX to put the cursor to a specific line in
5250 the document by clicking at the respective position in the DVI/PDF output.
5251 To achieve this, the viewer must be able to communicate with LyX.
5252 This is done via the LyX server either by using the named pipe (
5256 ), or the UNIX domain socket (
5260 ) that LyX creates in its temporary directory (this is the way the
5261 \begin_inset Flex CharStyle:Code
5264 \begin_layout Plain Layout
5270 program communicates with LyX).
5271 In some cases, you need a helper script that mediates between the viewer
5272 and LyX, in others, the viewer can communicate with LyX directly.
5273 This depends on the selected viewer and on your operating system.
5274 The same applies to the way viewers need to be configured and the way the
5275 reverse search is actually performed.
5276 In what follows, we will thus describe how to setup reverse search for
5278 Before we turn to this, though, we will explain what needs to be done generally
5279 to enable reverse search in the DVI/PDF output.
5282 \begin_layout Subsection
5284 \change_inserted 2 1274788899
5285 \begin_inset CommandInset label
5287 name "sub:rev-search"
5291 Automatical enabling
5294 \begin_layout Standard
5296 \change_inserted 2 1274789582
5297 In most cases LyX will do the work for you by enabling
5298 \begin_inset Flex CharStyle:MenuItem
5301 \begin_layout Plain Layout
5303 \change_inserted 2 1274789026
5304 Document\SpecialChar \menuseparator
5305 Output\SpecialChar \menuseparator
5312 In such a case LyX will automatically insert SyncTeX macro (for PDF) or
5313 srcltx package (for DVI) respectively.
5314 This option can be easily reached also on
5315 \begin_inset Flex CharStyle:Code
5318 \begin_layout Plain Layout
5320 \change_inserted 2 1274789582
5331 \begin_layout Standard
5333 \change_inserted 2 1274789534
5334 Plase note that including
5335 \begin_inset Flex CharStyle:Code
5338 \begin_layout Plain Layout
5340 \change_inserted 2 1274789498
5349 \begin_inset Flex CharStyle:Code
5352 \begin_layout Plain Layout
5354 \change_inserted 2 1274789484
5362 sometimes have an impact on the typeset and you should switch them off
5363 for the final typesets.
5368 \begin_layout Standard
5370 \change_inserted 2 1274789340
5371 You can also define custom macro in preferences and in case you need some
5372 special tweaks read the next section about manual enabling.
5378 \begin_layout Subsection
5380 \change_inserted 2 1274788680
5386 \begin_layout Standard
5387 LaTeX provides several different methods for reverse search.
5388 Some are built-in in the
5389 \begin_inset Flex CharStyle:Code
5392 \begin_layout Plain Layout
5398 program, some are provided by external packages.
5399 Your choice depends on whether your LaTeX distribution already provides
5400 a given method (the built-in methods are rather new) and whether your viewer
5402 The available methods are described in the following.
5403 \change_inserted 2 1274788557
5407 \begin_layout Subsubsection*
5408 Built-in DVI-search via src-specials (DVI only)
5411 \begin_layout Standard
5412 This method provides the DVI file with the necessary information for reverse
5414 It is available in LaTeX since quite some time (any somewhat recent LaTeX
5415 distribution should include it), and it works reliably.
5416 To enable it, change the
5417 \begin_inset Flex CharStyle:MenuItem
5420 \begin_layout Plain Layout
5425 \begin_layout Plain Layout
5438 \begin_inset Flex CharStyle:MenuItem
5441 \begin_layout Plain Layout
5446 \begin_layout Plain Layout
5453 eX (plain)->DraftDVI
5459 \begin_inset Flex CharStyle:MenuItem
5462 \begin_layout Plain Layout
5463 Preferences\SpecialChar \menuseparator
5464 File Handling\SpecialChar \menuseparator
5471 \begin_inset Flex CharStyle:Code
5474 \begin_layout Plain Layout
5475 latex -src-specials $$i
5481 If this doesn't work, check if your TeX engine needs different options
5482 (the syntax might differ in some distributions).
5485 \begin_layout Subsubsection*
5486 External Packages (PDFSync and scrltx)
5489 \begin_layout Standard
5498 provide reverse search facility for PDF output (via pdflatex) and DVI output,
5500 In order to enable it, load the packages in the LyX preamble:
5503 \begin_layout Itemize
5504 \begin_inset Flex CharStyle:Code
5507 \begin_layout Plain Layout
5515 for reverse PDF search,
5518 \begin_layout Itemize
5520 \begin_inset Flex CharStyle:Code
5523 \begin_layout Plain Layout
5526 usepackage[active]{srcltx}
5531 for reverse DVI search.
5534 \begin_layout Standard
5535 If you want to be able to perform both DVI and PDF reverse searches, you
5536 can also insert in the preamble the following lines
5539 \begin_layout LyX-Code
5543 \begin_inset Newline newline
5549 \begin_inset Newline newline
5555 \begin_inset Newline newline
5561 \begin_inset Newline newline
5566 usepackage[active]{srcltx}
5567 \begin_inset Newline newline
5575 \begin_layout Standard
5576 This way, you can preview the file as either DVI or PDF (pdflatex) and the
5577 right package will be used.
5580 \begin_layout Standard
5581 Note that PDFSync might affect the output layout of your document.
5582 It is therefore advised to disable PDFsync for final documents.
5585 \begin_layout Subsubsection*
5586 Built-in reverse search via SyncTeX (DVI and PDF)
5589 \begin_layout Standard
5591 \begin_inset Flex CharStyle:Code
5594 \begin_layout Plain Layout
5600 have built-in support for both PDF and DVI reverse search.
5605 facility is basically the result of the integration of the PDFSync package
5606 to the pdftex program and its merge with the
5611 You need at least TeXLive 2008 or a recent MikTeX distribution in order
5613 Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
5614 already provide SyncTeX support.
5617 \begin_layout Standard
5618 To enable SyncTeX for DVI output, change the
5619 \begin_inset Flex CharStyle:MenuItem
5622 \begin_layout Plain Layout
5627 \begin_layout Plain Layout
5640 \begin_inset Flex CharStyle:MenuItem
5643 \begin_layout Plain Layout
5648 \begin_layout Plain Layout
5655 eX (plain) -> DraftDVI
5661 \begin_inset Flex CharStyle:MenuItem
5664 \begin_layout Plain Layout
5665 Preferences\SpecialChar \menuseparator
5666 File Handling\SpecialChar \menuseparator
5673 \begin_inset Flex CharStyle:Code
5676 \begin_layout Plain Layout
5677 latex -synctex=1 $$i
5682 , and for PDF output, change the
5683 \begin_inset Flex CharStyle:MenuItem
5686 \begin_layout Plain Layout
5691 \begin_layout Plain Layout
5698 eX (pdflatex) -> PDF (pdflatex)
5704 \begin_inset Flex CharStyle:Code
5707 \begin_layout Plain Layout
5708 pdflatex -synctex=1 $$i
5714 Check the documentation of your viewer whether the viewer needs to be configure
5715 d for the use with SyncTeX.
5719 \begin_layout Plain Layout
5721 \begin_inset Flex CharStyle:Code
5724 \begin_layout Plain Layout
5730 option enables gzip compression.
5731 If your viewer does not support it, you should instead use
5732 \begin_inset Flex CharStyle:Code
5735 \begin_layout Plain Layout
5749 \begin_layout Subsection
5750 Configuring and using specific viewers
5753 \begin_layout Subsubsection*
5754 Xdvi (all platforms)
5757 \begin_layout Standard
5759 \begin_inset Flex CharStyle:Code
5762 \begin_layout Plain Layout
5768 , you don't need to do anything else for performing a reverse DVI search,
5769 as LyX already provides the necessary hooks for automatically using the
5771 \begin_inset Flex CharStyle:Code
5774 \begin_layout Plain Layout
5781 Just setup your document as described above (reverse search is triggered
5782 by Ctrl-click or Alt-click on Mac OSX, respectively).
5785 \begin_layout Standard
5786 However, if for whatever reason you want to use the named pipe instead of
5787 the socket for communicating with LyX, simply change the DVI viewer in
5789 \begin_inset Flex CharStyle:MenuItem
5792 \begin_layout Plain Layout
5793 Preferences\SpecialChar \menuseparator
5794 File Handling\SpecialChar \menuseparator
5804 \begin_layout Plain Layout
5805 On Mac OSX you have to use
5806 \begin_inset Flex CharStyle:Code
5809 \begin_layout Plain Layout
5810 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
5821 \begin_inset Flex CharStyle:Code
5824 \begin_layout Plain Layout
5825 xdvi -editor 'lyxeditor.sh %f %l'
5831 \begin_inset Flex CharStyle:Code
5834 \begin_layout Plain Layout
5840 is a suitable script.
5841 For example, a minimal shell script is the following one:
5844 \begin_layout LyX-Code
5846 \begin_inset Newline newline
5849 LYXPIPE="/path/to/lyxpipe"
5850 \begin_inset Newline newline
5853 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
5854 \begin_inset Newline newline
5857 echo "$COMMAND" > "${LYXPIPE}".in || exit
5858 \begin_inset Newline newline
5861 read < "${LYXPIPE}".out || exit
5864 \begin_layout Standard
5866 \begin_inset Flex CharStyle:Code
5869 \begin_layout Plain Layout
5879 \begin_layout Plain Layout
5886 XServer pipe path specified in
5887 \begin_inset Flex CharStyle:MenuItem
5890 \begin_layout Plain Layout
5891 Preferences\SpecialChar \menuseparator
5901 \begin_layout Plain Layout
5903 \begin_inset Flex CharStyle:Code
5906 \begin_layout Plain Layout
5912 folder of a source distribution you can find a
5913 \begin_inset Flex CharStyle:Code
5916 \begin_layout Plain Layout
5922 script which is able to locate the
5926 based on your preferences.
5934 \begin_layout Subsubsection*
5938 \begin_layout Standard
5940 \begin_inset Flex CharStyle:Code
5943 \begin_layout Plain Layout
5944 /Applications/MacDviX_Folder/calleditor.script
5949 , add the following lines:
5952 \begin_layout LyX-Code
5957 \begin_layout Plain Layout
5964 X.app/Contents/MacOS/lyxeditor "$2" $1
5965 \begin_inset Newline newline
5971 \begin_layout Standard
5972 Modify the lines accordingly if you install LyX somewhere else than in the
5973 Applications folder.
5976 \begin_layout Standard
5977 Reverse search is triggered by Alt-click (OPTION-click).
5980 \begin_layout Subsubsection*
5984 \begin_layout Standard
5986 \begin_inset Flex CharStyle:Code
5989 \begin_layout Plain Layout
5990 open -a Skim.app $$i
5995 to the viewer setting in
5996 \begin_inset Flex CharStyle:MenuItem
5999 \begin_layout Plain Layout
6000 Preferences\SpecialChar \menuseparator
6001 File Handling\SpecialChar \menuseparator
6002 File formats\SpecialChar \menuseparator
6009 \begin_inset Flex CharStyle:MenuItem
6012 \begin_layout Plain Layout
6013 Skim\SpecialChar \menuseparator
6014 Preferences\SpecialChar \menuseparator
6024 \begin_layout Plain Layout
6034 \begin_layout Standard
6035 Reverse search is triggered by COMMAND-SHIFT-click
6038 \begin_layout Subsubsection*
6042 \begin_layout Standard
6044 \begin_inset Flex CharStyle:MenuItem
6047 \begin_layout Plain Layout
6048 Settings\SpecialChar \menuseparator
6049 Configure Okular\SpecialChar \ldots{}
6050 \SpecialChar \menuseparator
6057 \begin_inset Quotes eld
6061 \begin_inset Quotes erd
6065 \begin_inset Flex CharStyle:Code
6068 \begin_layout Plain Layout
6077 \begin_layout Standard
6078 Reverse search is triggered by SHIFT-click.
6081 \begin_layout Subsubsection*
6085 \begin_layout Standard
6086 Launch yap, choose its
6087 \begin_inset Flex CharStyle:MenuItem
6090 \begin_layout Plain Layout
6091 View\SpecialChar \menuseparator
6098 \begin_inset Quotes eld
6102 \begin_inset Quotes erd
6107 \begin_inset Quotes eld
6110 New\SpecialChar \ldots{}
6112 \begin_inset Quotes erd
6115 button and, in the window that opens, enter
6116 \begin_inset Quotes eld
6120 \begin_inset Quotes erd
6123 (or any other name you like) in the
6124 \begin_inset Quotes eld
6128 \begin_inset Quotes erd
6132 Now click on the button labeled
6133 \begin_inset Quotes eld
6136 \SpecialChar \ldots{}
6138 \begin_inset Quotes erd
6141 to open a file dialog and navigate to the directory containing the batch
6143 \begin_inset Flex CharStyle:Code
6146 \begin_layout Plain Layout
6154 \begin_inset Flex CharStyle:Code
6157 \begin_layout Plain Layout
6163 and then specify the program arguments as
6164 \begin_inset Flex CharStyle:Code
6167 \begin_layout Plain Layout
6175 \begin_inset Flex CharStyle:Code
6178 \begin_layout Plain Layout
6184 wrapper is used for communicating with LyX through the
6191 \begin_layout LyX-Code
6193 \begin_inset Newline newline
6196 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
6205 \begin_inset Newline newline
6219 \begin_layout Standard
6220 Make sure that the LyXServer pipe path you specified in LyX is
6221 \begin_inset Flex CharStyle:Code
6224 \begin_layout Plain Layout
6238 , otherwise change the
6239 \begin_inset Flex CharStyle:Code
6242 \begin_layout Plain Layout
6248 wrapper accordingly.
6251 \begin_layout Standard
6252 In yap, reverse search is triggered by double-click.
6255 \begin_layout Subsubsection*
6256 SumatraPDF (Windows)
6259 \begin_layout Standard
6260 In order to use SumatraPDF for inverse search, enter
6261 \begin_inset Flex CharStyle:Code
6264 \begin_layout Plain Layout
6265 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6270 in the viewer setting in
6271 \begin_inset Flex CharStyle:MenuItem
6274 \begin_layout Plain Layout
6275 Preferences\SpecialChar \menuseparator
6276 File Handling\SpecialChar \menuseparator
6277 File formats\SpecialChar \menuseparator
6284 \begin_inset Flex CharStyle:Code
6287 \begin_layout Plain Layout
6293 is the previous wrapper.
6294 If SumatraPDF.exe is not in your command PATH, use its full file name.
6297 \begin_layout Standard
6298 Reverse search is triggered by double-click.
6301 \begin_layout Subsubsection*
6305 \begin_layout Standard
6306 First of all, make sure that yap is your default DVI viewer in the Windows
6307 environment, then launch it, choose its
6308 \begin_inset Flex CharStyle:MenuItem
6311 \begin_layout Plain Layout
6312 View\SpecialChar \menuseparator
6319 \begin_inset Quotes eld
6323 \begin_inset Quotes erd
6328 \begin_inset Quotes eld
6331 New\SpecialChar \ldots{}
6333 \begin_inset Quotes erd
6336 button and, in the window that opens, enter
6337 \begin_inset Quotes eld
6341 \begin_inset Quotes erd
6344 (or any other name you like) in the
6345 \begin_inset Quotes eld
6349 \begin_inset Quotes erd
6353 Now click on the button labeled
6354 \begin_inset Quotes eld
6357 \SpecialChar \ldots{}
6359 \begin_inset Quotes erd
6362 to open a file dialog and navigate to the directory containing the
6363 \begin_inset Flex CharStyle:Code
6366 \begin_layout Plain Layout
6372 program (which is installed by default on Cygwin along with the LyX executable).
6374 \begin_inset Flex CharStyle:Code
6377 \begin_layout Plain Layout
6383 and then specify the program arguments as
6384 \begin_inset Flex CharStyle:Code
6387 \begin_layout Plain Layout
6394 In this way, you will be using the
6398 for communicating with LyX.
6399 If, for whatever reason, you want to use the
6404 \begin_inset Flex CharStyle:Code
6407 \begin_layout Plain Layout
6413 option and be sure to specify the LyXServer pipe path in the LyX preferences.
6416 \begin_layout Standard
6417 In yap, reverse search is triggered by double-click.
6420 \begin_layout Subsubsection*
6424 \begin_layout Standard
6425 In order to use SumatraPDF for inverse search, enter
6426 \begin_inset Flex CharStyle:Code
6429 \begin_layout Plain Layout
6435 in the viewer setting in
6436 \begin_inset Flex CharStyle:MenuItem
6439 \begin_layout Plain Layout
6440 Preferences\SpecialChar \menuseparator
6441 File Handling\SpecialChar \menuseparator
6442 File formats\SpecialChar \menuseparator
6449 \begin_inset Flex CharStyle:Code
6452 \begin_layout Plain Layout
6458 is the following script (to be placed in your command PATH,
6459 \begin_inset Flex CharStyle:Code
6462 \begin_layout Plain Layout
6468 being the best choice):
6471 \begin_layout LyX-Code
6473 \begin_inset Newline newline
6477 \begin_inset Newline newline
6480 SumatraPDF -inverse-search "lyxeditor -g %f %l" $(basename $1)
6483 \begin_layout Standard
6484 This wrapper script is needed because SumatraPDF is a native Windows application
6485 and does not understand the posix paths used by the Cygwin version of LyX.
6486 If SumatraPDF.exe is not in your command PATH, use its full posix path in
6489 \begin_inset Flex CharStyle:Code
6492 \begin_layout Plain Layout
6498 enables communication via the
6504 \begin_inset Flex CharStyle:Code
6507 \begin_layout Plain Layout
6513 option if you want to use the
6517 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6520 \begin_layout Standard
6521 Reverse search is triggered by double-click.
6522 \change_inserted 1 1271453423
6526 \begin_layout Section
6528 \change_inserted 1 1271453442
6532 \begin_layout Standard
6534 \change_inserted 1 1271454338
6535 To make forward search possible you need to provide generated output PDF/DVI
6536 file with additional information about TeX sources.
6537 This can be done via the methods described in the section
6538 \begin_inset CommandInset ref
6540 reference "sub:rev-search"
6547 \begin_layout Standard
6549 \change_inserted 1 1271454479
6550 Secondly you need to configure LyX for using your viewers in
6551 \begin_inset Flex CharStyle:MenuItem
6554 \begin_layout Plain Layout
6556 \change_inserted 1 1271453866
6557 Preferences\SpecialChar \menuseparator
6558 Output\SpecialChar \menuseparator
6565 Only some of the viewers allows this operation --- yap, xdvi, okular, Sumatra
6570 \begin_layout Plain Layout
6572 \change_inserted 1 1271454273
6573 For Sumatra CMCDDE is needed --- downloadable from http://www.istri.fr/zip/CMCDDE.z
6582 Some other viewers allow at least reloading and positioning to particular
6583 page of the file --- Evince or xpdf --- for these cases you can use external
6585 Please study the prepared examples in the Preferences dialog.
6590 \begin_layout Chapter
6591 Special Document Classes
6594 \begin_layout Section
6598 \begin_layout Standard
6604 \begin_layout Subsection
6608 \begin_layout Standard
6609 This section describes how LyX can be used to write articles for submission
6610 to the scientific journal
6612 Astronomy and Astrophysics
6614 (www.edpsciences.fr/aa/
6615 \begin_inset Flex URL
6618 \begin_layout Plain Layout
6620 http://www.edpsciences.fr/aa/
6625 ) using Version 5.01 of the document class
6630 This package can be downloaded from the ftp site
6633 \begin_layout Standard
6634 \begin_inset VSpace medskip
6640 \begin_layout Standard
6642 \begin_inset Flex URL
6645 \begin_layout Plain Layout
6647 ftp://ftp.edpsciences.org/pub/aa/readme.html
6655 \begin_layout Standard
6656 \begin_inset VSpace medskip
6662 \begin_layout Standard
6663 A manual comes together with that package, and this text is not meant to
6664 replace the original manual but merely a short guide how to realize the
6665 correct form of your paper.
6669 \begin_layout Standard
6670 Please note that the publisher of the journal was changed from Springer
6671 to EDP Sciences starting January 1, 2001.
6672 That change implicated also some slight changes of the style files, namely
6673 the removal of the thesaurus command.
6674 The LyX class aa supports the newest version of these style files, V 5.01.
6675 If you have an older version installed, please upgrade.
6676 For compatibility, the old (version 4) layout has been kept as
6681 Please refer to the comments in
6683 LyXDir/layouts/aapaper.layout
6688 \begin_layout Subsection
6692 \begin_layout Standard
6693 It is recommended you start from the example template distributed with LyX.
6694 If you are not using a template, note the following settings:
6697 \begin_layout Itemize
6704 Document\SpecialChar \menuseparator
6707 dialog (OK, that one was obvious).
6710 \begin_layout Itemize
6711 Don't change the option
6714 \begin_inset space ~
6724 The whole layout is done by the macros, you shouldn't change anything.
6727 \begin_layout Subsection
6731 \begin_layout Standard
6732 First thing to enter is the header information.
6733 It consists of seven entries, of which some are optional.
6737 \begin_layout Itemize
6745 \begin_layout Itemize
6753 \begin_layout Itemize
6761 \begin_layout Itemize
6769 \begin_layout Itemize
6774 : [optional] if more than one author: whom to contact for offprint requests.
6777 \begin_layout Itemize
6782 : [optional] mail address for contacts.
6785 \begin_layout Itemize
6793 Received: <date>; Accepted <date>
6796 \begin_layout Standard
6797 There is no need to issue the
6803 command, this is done automatically by LyX when the header is finished.
6804 Although the order of the single header entries doesn't matter it is advised
6805 to keep the above sequence, just to get the best optics and meets the layout
6806 of the real document.
6809 \begin_layout Standard
6810 If you want to place footnotes in the header block, e.
6811 \begin_inset space \thinspace{}
6815 \begin_inset space \space{}
6818 to state your present address, just use the standard footnote via the menu
6821 Insert\SpecialChar \menuseparator
6825 LyX will automagically use the term
6834 \begin_layout Standard
6835 In addition to these topics, the macros use three additional LaTeX commands
6836 that have no counterpart in LyX:
6839 \begin_layout Itemize
6846 to separate different names for more than one author and institute, respectivel
6850 \begin_layout Itemize
6857 to mark corresponding author/institute pairs.
6858 The institutes are numbered sequentially as they appear in the
6862 field, so you have to put a marker to each author.
6865 \begin_layout Itemize
6872 to supply an email address for fast contact.
6875 \begin_layout Standard
6876 In all cases, the appropriate command has to be entered in LyX and marked
6882 \begin_layout Subsection
6886 \begin_layout Standard
6887 The abstract should immediately follow the header block.
6888 With version 5 the abstract environment was changed to a command, and there
6889 is now a resctriction to only one paragraph.
6890 In addition, it should contain an entry with the keywords.
6891 This is not yet implemented for LyX, therefore you have to enter the LaTeX
6898 by hand and mark it as LaTeX code.
6899 Refer to the example paper.
6902 \begin_layout Subsection
6903 Supported environments
6906 \begin_layout Standard
6907 The A&A paper layout supports the following environments for structuring
6911 \begin_layout Itemize
6917 \begin_layout Itemize
6923 \begin_layout Itemize
6929 \begin_layout Itemize
6935 \begin_layout Itemize
6941 \begin_layout Itemize
6947 \begin_layout Itemize
6953 \begin_layout Itemize
6959 \begin_layout Itemize
6965 \begin_layout Itemize
6971 \begin_layout Itemize
6977 \begin_layout Itemize
6983 \begin_layout Subsection
6984 Commands not supported by LyX
6987 \begin_layout Standard
6988 Some commands are not yet supported by the
6993 Some have already been mentioned.
6994 For the sake of completeness, they are listed all together here:
6997 \begin_layout Itemize
7005 \begin_layout Itemize
7013 \begin_layout Itemize
7021 \begin_layout Itemize
7029 \begin_layout Itemize
7037 \begin_layout Itemize
7045 \begin_layout Itemize
7053 \begin_layout Itemize
7061 \begin_layout Standard
7062 If you want to use any of these commands, you have to enter them yourself.
7065 Do not forget to mark them as LaTeX code!
7068 \begin_layout Subsection
7069 Figure and Table Floats
7072 \begin_layout Standard
7073 LyX provides support for the necessary float environments
7075 figure, figure*, table
7081 , therefore we won't tell much about it here.
7085 \begin_inset space ~
7091 Just remember that tables should be left-aligned.
7092 For that, select the table and change the alignment in
7094 Edit\SpecialChar \menuseparator
7096 \begin_inset space ~
7102 \begin_layout Standard
7103 There is only one special thing: the figures with caption besides the figure.
7104 To create such a figure, you have to do the following:
7107 \begin_layout Enumerate
7108 Create a wide figure float:
7110 Insert\SpecialChar \menuseparator
7111 Float\SpecialChar \menuseparator
7114 , then right click in the figure and select
7120 \begin_inset space ~
7128 \begin_layout Enumerate
7129 Enter your caption text.
7132 \begin_layout Enumerate
7137 to move the cursor above the caption.
7140 \begin_layout Enumerate
7144 \begin_layout Enumerate
7145 Position the cursor behind the figure and insert a horizontal fill:
7147 Insert\SpecialChar \menuseparator
7149 \begin_inset space ~
7152 Character\SpecialChar \menuseparator
7154 \begin_inset space ~
7162 \begin_layout Enumerate
7163 Switch to LaTeX mode:
7166 \begin_inset space ~
7174 \begin_layout Enumerate
7184 Do not close the brace!
7187 \begin_layout Enumerate
7188 Position the cursor behind the caption text, switch to LaTeX mode and insert
7192 \begin_inset space ~
7204 \begin_layout Standard
7205 Also, refer to the figures in the example paper.
7208 \begin_layout Subsection
7212 \begin_layout Standard
7213 For submission, the paper has to be formated in a special double-spacing
7215 For this purpose, you have to give the option
7219 to the documentclass.
7220 This must be done using the extra class options field in the
7222 Document\SpecialChar \menuseparator
7226 Just enter the string
7233 \begin_layout Subsection
7237 \begin_layout Standard
7242 directory contains an example paper written with LyX.
7243 It is the example paper from the original macro package, translated to
7245 Use it for inspiration, and compare the original LaTeX code with LyX way
7249 \begin_layout Section
7253 \begin_layout Standard
7259 \begin_layout Subsection
7263 \begin_layout Standard
7264 AASTeX is a set of macros produced by the American Astronomical Society
7265 to facilitate electronic manuscript submission to the three journals they
7266 publish: the Astrophysical Journal (including the Letters and Supplement),
7267 the Astronomical Journal, and the Publications of the Astronomical Society
7269 LyX has proven to be an excellent tool for generating these documents,
7270 especially given its equation, citation, and figure handling capabilities.
7271 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7272 is the version described here, or higher.
7273 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7274 incompatible with LyX.
7275 The AASTeX package may be downloaded from the AASTeX Web site
7278 \begin_layout Standard
7279 \begin_inset VSpace medskip
7285 \begin_layout Standard
7287 \begin_inset Flex URL
7290 \begin_layout Plain Layout
7292 http://www.journals.uchicago.edu/AAS/AASTeX
7300 \begin_layout Standard
7301 \begin_inset VSpace medskip
7307 \begin_layout Standard
7308 A complete user guide is contained in that package and you should familiarize
7309 yourself with it thoroughly before embarking on writing a paper in LyX.
7310 LyX will not reduce the need to figure out all the AASTeX commands, it
7311 will only reduce the drudgery of typing everything in.
7312 It is your responsibility to ensure that the final exported LaTeX document
7313 conforms completely to the requirements of the journal to which you are
7314 submitting your paper.
7317 \begin_layout Subsection
7318 Starting a New Paper
7321 \begin_layout Standard
7322 I strongly suggest that you start with the AASTeX template file.
7325 File\SpecialChar \menuseparator
7332 , enter the new file name, then choose the
7337 This will show the most common fields found in a manuscript.
7338 Simply overwrite the existing text (including the brackets,
7342 ) with the correct information.
7343 Many of the AASTeX commands and environments can be implemented directly
7344 in LyX, but some cannot: most noticeably
7356 , which should stick out like a sore thumb if you actually just opened the
7358 For commands such as these, the LaTeX code must be entered directly and
7360 Such commands are referred to as TeX code, or Evil Red Text.
7361 I tried to minimize the amount of TeX code needed in an AASTeX document,
7362 but there is still a bit more required than any of us would like.
7365 \begin_layout Subsection
7366 Finishing Your Paper
7369 \begin_layout Standard
7370 When the paper is finished to your satisfaction and previews/prints correctly,
7372 \begin_inset Quotes eld
7376 \begin_inset Quotes erd
7379 actions which need to be done before you submit it to the journals.
7383 \begin_layout Enumerate
7384 Export your paper as a LaTeX file (
7386 File\SpecialChar \menuseparator
7387 Export\SpecialChar \menuseparator
7394 \begin_layout Enumerate
7399 file with your favorite text editor
7403 \begin_layout Enumerate
7404 remove the comment lines before the
7413 \begin_layout Enumerate
7418 usepackage...{fontenc}
7420 line if it appears (usually just after
7435 \begin_layout Enumerate
7436 remove everything between (and including) the
7448 commands, except for any commands you specifically put into the LaTeX preamble
7449 (which should appear immediately after the
7450 \begin_inset Quotes eld
7453 User specified LaTeX commands
7454 \begin_inset Quotes erd
7465 \begin_layout Enumerate
7466 Run the resulting file through LaTeX to make sure it still processes correctly.
7469 \begin_layout Enumerate
7470 Reread the journal requirements to make sure your filenames and formats
7474 \begin_layout Enumerate
7478 \begin_layout Subsection
7479 Comments On Specific Commands
7482 \begin_layout Standard
7483 I will not describe the detailed usage of the individual AASTeX commands:
7484 the AASTeX User Guide (
7488 ) gives a good description of each.
7489 Thus it's probably easiest for me to go down the list as found in the guide
7490 and offer comments where necessary.
7491 So let's begin \SpecialChar \ldots{}
7495 \begin_layout Subsubsection
7496 Things that work as expected
7499 \begin_layout Standard
7503 \begin_layout Plain Layout
7515 \begin_layout Standard
7516 Because they work as you might expect, I simply list them and the section
7617 begin{thebibliography}
7625 (2.13.2), all the cite commands and their variations (2.13.2), the generic
7626 graphicx figure commands (2.14.1),
7650 (2.15.4, amongst other places),
7677 \begin_layout Standard
7678 The following style options also work correctly:
7699 Simply put them in the
7705 Layout\SpecialChar \menuseparator
7711 \begin_layout Standard
7715 \begin_layout Plain Layout
7727 \begin_layout Subsubsection
7728 Things that work, but require more comment
7731 \begin_layout Standard
7732 The following items work, but require a little more discussion:
7735 \begin_layout Itemize
7736 These items are reserved for use by the journal editors, but you can put
7737 them into the LaTeX preamble if you feel compelled to do so:
7770 \begin_layout Itemize
7771 These items may be placed in the LaTeX preamble, and are included as blanks
7772 in the template file:
7793 \begin_layout Itemize
7800 (2.3) – can only be used
7801 \begin_inset Quotes eld
7805 \begin_inset Quotes erd
7808 , not in the middle of a paragraph.
7809 Use TeX code if you need to embed it.
7812 \begin_layout Itemize
7819 (2.3) – will have extra {} after it.
7820 This should not cause an error.
7823 \begin_layout Itemize
7830 (2.6) – can only be used
7831 \begin_inset Quotes eld
7835 \begin_inset Quotes erd
7838 , not in the middle of a paragraph.
7839 Use TeX code if you need to embed it.
7842 \begin_layout Itemize
7849 (2.8) – can't insert a cross-reference tag, you must type the tag name by
7853 \begin_layout Itemize
7867 \begin_layout Itemize
7874 (2.9) – will have extra {} after it.
7875 This should not cause an error.
7878 \begin_layout Itemize
7885 (2.11) – will have extra {} after it.
7886 This should not cause an error.
7889 \begin_layout Itemize
7896 (2.14.2) – you can insert an optional filename argument by placing the cursor
7897 at the beginning of the text and selecting
7899 Insert\SpecialChar \menuseparator
7904 \begin_inset Quotes eld
7908 \begin_inset Quotes erd
7911 inserts an optional argument of the type needed by
7918 Hopefully it will be renamed someday.
7921 \begin_layout Itemize
7934 for the catalog ID optional parameter
7937 \begin_layout Itemize
7950 for the catalog ID optional parameter
7953 \begin_layout Subsubsection
7954 Things not implemented, use TeX code
7957 \begin_layout Standard
7961 \begin_layout Plain Layout
7973 \begin_layout Standard
7996 setcounter{equation}
7998 (2.12), Journal name abbreviations (2.13.4),
8034 (2.15.4, insert it as the first element in the lefthand cell after where
8036 Don't use any of LyX's rules in the table),
8048 (2.15.5), much of Misc (2.17, except
8099 \begin_layout Standard
8103 \begin_layout Plain Layout
8115 \begin_layout Subsubsection
8116 Things that cannot be implemented
8119 \begin_layout Standard
8120 \SpecialChar \ldots{}
8121 at least in any meaningful sort of way, so I suggest ignoring them.
8122 They are the references environment (2.13.3), and the deluxetable environment
8124 If you really, really need to use deluxetable, I suggest editing it in
8125 a separate file with a text editor, then using
8127 Insert\SpecialChar \menuseparator
8129 \begin_inset space ~
8134 to include it in your LyX document.
8139 file to see an example of this.
8142 \begin_layout Subsection
8143 FAQs, Tips, Tricks, and Other Ruminations
8146 \begin_layout Subsubsection
8147 Getting LyX and AASTeX to cooperate
8150 \begin_layout Standard
8151 It can be a bit tricky to get LyX to recognize a new layout and document
8153 When all else fails, do this:
8156 \begin_layout Enumerate
8157 Make certain that LaTeX can find AASTeX.
8158 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8159 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
8166 \begin_layout Enumerate
8178 \begin_layout Enumerate
8181 Tools\SpecialChar \menuseparator
8184 in LyX, then restart LyX.
8187 \begin_layout Enumerate
8188 Open a regular new file, not from a template.
8189 Does AASTeX appear in the class list in
8191 Document\SpecialChar \menuseparator
8197 \begin_layout Standard
8198 If you get a warning from an existing AASTeX document about not being able
8199 to find the AASTeX layout or a message about
8200 \begin_inset Quotes eld
8203 You should not mix title layouts with normal ones
8204 \begin_inset Quotes erd
8207 , things haven't been installed correctly.
8210 \begin_layout Subsubsection
8211 LaTeX error processing a table
8214 \begin_layout Standard
8215 LyX, by default, attempts to center the table caption/title.
8216 This seems to produce a bad interaction in AASTeX so you should click somewhere
8217 in the caption/title, then select
8219 Edit\SpecialChar \menuseparator
8221 \begin_inset space ~
8235 This took care of it for me.
8238 \begin_layout Subsubsection
8242 \begin_layout Standard
8243 A couple of things: 1) I have noticed some funny spacing in the reference
8244 entries in the text.
8245 When you enter the bibliography item data, make sure their is
8249 space between the last author and the parenthesis setting off the year;
8253 \begin_inset space \thinspace{}
8257 \begin_inset space \space{}
8271 2) Entering the references at all is not obvious.
8272 The easiest thing is to start typing your first reference at the end of
8273 the document, then mark it as type
8278 That will put a small gray box in front of what you just typed.
8279 Click on the box to fill in the rest of the information.
8280 For new references, go to the end of an existing reference and press return.
8281 That will create a new line with its own box, etc.
8284 \begin_layout Subsubsection
8288 \begin_layout Standard
8289 Even though AASTeX provides its own figure commands (
8295 , for example), I much prefer LaTeX's standard figure commands (with the
8304 \begin_inset space ~
8307 commands as TeX code into a Figure Float box if you desire, but I never
8308 have much luck getting the layout right.
8309 With the standard graphics, LyX will insert a
8313 usepackage{graphicx}
8315 command into the LaTeX preamble and handle the figures in the standard
8316 LaTeX2e way, interspersing the figures in the text.
8317 I believe ApJ accepts figures exactly this way now; AJ might still use
8319 \begin_inset Quotes eld
8322 stack everything at the end
8323 \begin_inset Quotes erd
8329 \begin_layout Subsubsection
8330 Things I could have done, but didn't
8333 \begin_layout Standard
8335 \begin_inset Quotes eld
8339 \begin_inset Quotes erd
8342 things I could have implemented, but chose not to.
8343 For instance, I saw no point in double-spacing the text in the LyX window,
8344 even though it is double-spaced in the paper manuscript.
8345 Also, I chose not to make separate layouts for the preprint and preprint2
8347 Since I assume you will spend most of your time in the plain manuscript
8348 mode anyway, I decided not to chew up more disk space with this.
8352 \begin_layout Subsection
8356 \begin_layout Standard
8357 Your mileage may vary.
8358 I've now had papers published by both ApJ and AJ that have had 98% of the
8359 effort done in LyX; the last 2% was the LaTeX post-processing and a few
8361 I have had no trouble with the submission process, and I'm sure the journals
8362 were never aware that there might be a difference.
8363 So, go forth and publish!
8366 \begin_layout Section
8370 \begin_layout Standard
8373 David Johnson; updated by Richard Heck
8376 \begin_layout Standard
8377 \begin_inset VSpace bigskip
8383 \begin_layout Standard
8385 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8386 papers to be submitted to American Mathematical Society publications.
8387 The layouts are not tailored to a specific journal, but easily can be.
8388 You should refer to the AMS documentation for specific instructions for
8389 each journal (usually it will entail only changing a single line in the
8391 That documentation is available on the Web at
8392 \begin_inset Flex URL
8395 \begin_layout Plain Layout
8403 \begin_inset Flex URL
8406 \begin_layout Plain Layout
8408 ftp://ftp.ams.org/pub/tex/amslatex/
8414 These layouts are appropriate, and useful, for any mathematical writing.
8418 \begin_layout Standard
8419 There are two basic AMS LaTeX layouts:
8422 \begin_layout Itemize
8423 amsart: The standard AMS article format.
8426 \begin_layout Itemize
8427 amsbook: the standard AMS book (really, monograph) format.
8431 \begin_layout Standard
8432 The layouts themselves contain only the minimum necessary to use the AMS
8434 They do not, in particular, contain any of the `theorem' environments used
8435 for setting theorems, lemmas, and the like.
8436 These are contained, instead, in the
8437 \begin_inset Flex CharStyle:Code
8440 \begin_layout Plain Layout
8446 module, which is loaded by default when when you select one of the AMS
8448 (It can also be used with other classes and can be removed, if you would
8449 rather use something else.) Less commonly used environments are in the
8450 \begin_inset Flex CharStyle:Code
8453 \begin_layout Plain Layout
8454 Theorems (AMS-Extended)
8459 module, which must be loaded manually.
8462 \begin_layout Standard
8463 By default, theorems and the like are numbered consecutively throughout
8464 the document, but this may be modified by loading the module
8465 \begin_inset Flex CharStyle:Code
8468 \begin_layout Plain Layout
8469 Theorems (Order by Section)
8474 or, if you are using
8475 \begin_inset Flex CharStyle:Code
8478 \begin_layout Plain Layout
8485 \begin_inset Flex CharStyle:Code
8488 \begin_layout Plain Layout
8489 Theorems (Order by Chapter)
8495 These will number the results as
8496 \begin_inset Formula $n.m$
8499 , where the first number refers to the section (or chapter) and the second
8500 refers to the total number of results so far in that section (or chapter).
8501 Many environments are also available unnumbered.
8502 These are indicated by an asterisk at the end.
8503 If you happen to want
8507 unnumbered results, the module
8508 \begin_inset Flex CharStyle:Code
8511 \begin_layout Plain Layout
8517 provides that option.
8520 \begin_layout Standard
8521 Note that these modules do not
8525 to be used with the AMS classes.
8526 It is perfectly possible to use the
8527 \begin_inset Flex CharStyle:Code
8530 \begin_layout Plain Layout
8536 module, and the others mentioned, with other classes, such as
8537 \begin_inset Flex CharStyle:Code
8540 \begin_layout Plain Layout
8547 \begin_inset Flex CharStyle:Code
8550 \begin_layout Plain Layout
8557 \begin_inset Flex CharStyle:Code
8560 \begin_layout Plain Layout
8569 \begin_layout Subsection
8570 What these layouts provide
8573 \begin_layout Standard
8574 There is a long list of included environments provided by these layouts.
8575 In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
8576 variety of `theorem' environments.
8577 However, the AMS recommends the environments that are available in LyX.
8581 \begin_layout Standard
8582 The following environments—as well as the standard environments, such as
8584 \begin_inset Flex CharStyle:Noun
8587 \begin_layout Plain Layout
8594 \begin_inset Flex CharStyle:Noun
8597 \begin_layout Plain Layout
8604 \begin_inset Flex CharStyle:Noun
8607 \begin_layout Plain Layout
8614 \begin_inset Flex CharStyle:Noun
8617 \begin_layout Plain Layout
8624 \begin_inset Flex CharStyle:Noun
8627 \begin_layout Plain Layout
8634 \begin_inset Flex CharStyle:Code
8637 \begin_layout Plain Layout
8644 \begin_inset Flex CharStyle:Code
8647 \begin_layout Plain Layout
8656 \begin_layout Description
8657 Address This should be the author's permanent address.
8660 \begin_layout Description
8662 \begin_inset space ~
8665 Address This should be the author's temporary address at the time of submission,
8666 if different from the Address.
8669 \begin_layout Description
8670 Email Author's e-mail address
8673 \begin_layout Description
8674 URL Author's Web address, if desired.
8677 \begin_layout Description
8678 Keywords Key words or phrases used to identify specific topics discussed
8682 \begin_layout Description
8683 Subjectclass These refer to the AMS Subject Classifications, published and
8686 Mathematical Reviews
8689 These are also available online at the AMS cites listed above.
8692 \begin_layout Description
8696 \begin_layout Description
8700 \begin_layout Description
8704 \begin_layout Standard
8705 The following environments are provided by both the
8706 \begin_inset Flex CharStyle:Code
8709 \begin_layout Plain Layout
8716 \begin_inset Flex CharStyle:Code
8719 \begin_layout Plain Layout
8725 modules, in the latter case in both starred (unnumbered) and unstarred
8726 (numbered) versions.
8727 These same environments are provided only in the starred versions by the
8729 \begin_inset Flex CharStyle:Code
8732 \begin_layout Plain Layout
8741 \begin_layout Theorem
8742 This is typically used for the statements of major results.
8746 \begin_layout Corollary*
8747 This is used for statements which follow fairly directly from previous statement
8749 Again, these can be major results.
8754 These are smaller results needed to prove other statements.
8757 \begin_layout Proposition
8758 These are less major results which (hopefully) add to the general theory
8762 \begin_layout Conjecture
8763 These are statements provided without justification, which the author does
8764 not know how to prove, but which seem to be true (to the author, at least).
8767 \begin_layout Definition*
8768 Guess what this is for.
8769 The font is different for this environment than for the previous ones.
8773 \begin_layout Example*
8774 Used for examples illustrating proven results.
8777 \begin_layout Problem
8778 It's not really known what this is for.
8779 You should figure it out.
8782 \begin_layout Exercise*
8783 Write a description for this one.
8786 \begin_layout Remark
8787 This environment is also a type of theorem, usually a lesser sort of observation.
8790 \begin_layout Claim*
8791 Often used in the course of giving a proof of a larger result.
8795 Generally, these are used to break up long arguments, using specific instances
8801 The numbering scheme for cases is on its own, not together with other numbered
8807 At the end of this environment, a QED symbol (usually a square, but it can
8808 vary with different styles) is placed.
8809 If you want to have other environments within this one—for example, Case
8810 environments—and have the QED symbol appear only after them, then the other
8811 environments need to be nested within the proof environment.
8814 Nesting Environments
8820 for information on nesting.
8823 \begin_layout Standard
8824 And these environments are provided by
8825 \begin_inset Flex CharStyle:Code
8828 \begin_layout Plain Layout
8829 Theorems (AMS-Extended)
8837 \begin_layout Criterion*
8838 A required condition.
8841 \begin_layout Algorithm*
8842 A general procedure to be used.
8845 \begin_layout Axiom*
8846 This is a property or statement taken as true within the system being discussed.
8849 \begin_layout Condition*
8850 Sometimes used to state a condition assumed within the present context of
8855 Similar to a Remark.
8858 \begin_layout Notation*
8859 Used for the explanation of, yes, notation.
8862 \begin_layout Summary
8863 Do we really need to tell you?
8866 \begin_layout Acknowledgement*
8870 \begin_layout Conclusion*
8871 Sometimes used at the end of a long train of argument.
8875 Used in a way similar to Proposition, though perhaps lower on the scale.
8878 \begin_layout Standard
8879 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
8881 They need to be available on your system in order to use these environments.
8884 \begin_layout Section
8892 \begin_layout Standard
8898 \begin_layout Subsection
8902 \begin_layout Standard
8903 These are the layout files for some of the journals of the American Geophysical
8905 It is assumed that you have both the AGU's own class files and AGUplus
8906 installed (everything to be found at
8907 \begin_inset Flex URL
8910 \begin_layout Plain Layout
8912 ftp://ftp.agu.org/journals/latex/journals
8920 \begin_layout Subsection
8924 \begin_layout Standard
8934 They are still called this in the LyX GUI, though their LaTeX equivalents
8935 in the AGU classes are
8946 \begin_layout Standard
8947 Newly defined styles are
8984 These are mostly manuscript attributes and defined in the AGU class documentati
8988 \begin_layout Standard
8989 I suspect this is still badly incomplete.
8992 \begin_layout Subsection
8996 \begin_layout Standard
9013 \begin_layout Subsection
9017 \begin_layout Itemize
9020 Journal of Geophysical Research
9029 \begin_layout Standard
9030 Add your own, it isn't so hard! Look at the
9041 \begin_layout Subsection
9042 Bugs and things to remember
9045 \begin_layout Standard
9046 In order to use the new layouts, you must remember to do the following for
9050 \begin_layout Enumerate
9056 This can be done in the
9058 Layout\SpecialChar \menuseparator
9063 Document\SpecialChar \menuseparator
9067 (AGU articles are always in English, right? So
9074 \begin_layout Enumerate
9084 (Yes, this is a bug.)
9087 \begin_layout Enumerate
9088 Make sure you use the
9092 bibliography style, by entering
9096 into the second field of the BibTeX inset.
9097 None of the standard styles will do.
9100 \begin_layout Section
9104 \begin_layout Standard
9110 \begin_layout Subsection
9114 \begin_layout Standard
9115 Broadway is for writing plays.
9116 The format is more decorative than Hollywood, and much less standardized.
9117 This format should be suitable for workshops.
9120 \begin_layout Subsection
9124 \begin_layout Standard
9125 The same as in Hollywood.
9128 \begin_layout Subsection
9132 \begin_layout Standard
9137 names as labels then cross-reference the label to insert the name.
9138 The cross-reference dialog will show the current cast of characters.
9141 \begin_layout Subsection
9142 Paper size and Margins
9145 \begin_layout Standard
9146 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9149 \begin_layout Subsection
9153 \begin_layout Standard
9154 The following environments are available.
9155 You can use broadway.bind to get the bind keys shown at the right.
9158 \begin_layout Itemize
9162 \begin_inset Newline newline
9167 You should not have to use this, but it is here for anything that does not
9171 \begin_layout Itemize
9175 \begin_inset space \hfill{}
9179 \begin_inset Newline newline
9184 Used to describe stage setting and the action.
9185 First use of speaker names in all CAPs.
9188 \begin_layout Itemize
9192 \begin_inset space \hfill{}
9196 \begin_inset Newline newline
9201 Automatically numbered.
9202 On screen it will be arabic, but will print as Roman.
9205 \begin_layout Itemize
9209 \begin_inset space \hfill{}
9213 \begin_inset Newline newline
9223 It is just centered text.
9226 \begin_layout Itemize
9230 \begin_inset space \hfill{}
9234 \begin_inset Newline newline
9239 Not automatically numbered.
9240 You supply the number.
9241 This is because I couldn't figure out how.
9244 \begin_layout Itemize
9248 \begin_inset space \hfill{}
9252 \begin_inset Newline newline
9257 A special case of Narrative to describe the setting and action as the curtain
9261 \begin_layout Itemize
9265 \begin_inset space \hfill{}
9269 \begin_inset Newline newline
9274 The speaker's (actor's) title, centered in all CAPS.
9277 \begin_layout Itemize
9281 \begin_inset space \hfill{}
9285 \begin_inset Newline newline
9290 Instructions to the speaker.
9291 The parentheses are automatically inserted.
9292 The ( will appear on screen, but both will be in the printed play.
9293 This environment is only used within
9300 \begin_layout Itemize
9304 \begin_inset space \hfill{}
9308 \begin_inset Newline newline
9313 What the Speaker says.
9316 \begin_layout Itemize
9320 \begin_inset space \hfill{}
9324 \begin_inset Newline newline
9329 The curtain comes down.
9332 \begin_layout Itemize
9336 \begin_inset space \hfill{}
9342 \begin_layout Itemize
9346 \begin_inset space \hfill{}
9352 \begin_layout Itemize
9356 \begin_inset space \hfill{}
9362 \begin_layout Standard
9366 \begin_layout Section
9370 \begin_layout Standard
9375 can be used to type letters according to German conventions.
9376 A template file is included in
9378 .../lyx/share/templates
9380 for you to use as a starting point.
9383 \begin_layout Section
9391 \begin_layout Standard
9397 \begin_layout Subsection
9401 \begin_layout Standard
9402 This is the layout file for the European Geophysical Society journals.
9407 can be downloaded from the web site of the EGS under
9408 \begin_inset Flex URL
9411 \begin_layout Plain Layout
9421 \begin_layout Subsection
9425 \begin_layout Standard
9428 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9436 The current layout file is unfortunately very unmodular and would benefit
9437 from using the various
9444 \begin_layout Section
9448 \begin_layout Standard
9454 \begin_layout Standard
9455 Elsevier Science Publishers B.V.
9456 provides a standard LaTeX document class (
9460 ) for submitting articles to their various journals.
9461 The style file can be downloaded directly from their web site:
9462 \begin_inset Flex URL
9465 \begin_layout Plain Layout
9467 http://authors.elsevier.com/
9473 Instructions are supplied along with the class file, which details the
9474 requirements of the publishers.
9475 LyX includes package that allows for the use of this class, by a layout
9476 and a template file.
9477 Installation of the class file is the same as for any other LaTeX package;
9478 instructions are provided in the Elsevier documentation.
9481 \begin_layout Standard
9491 As the Elsevier class file is based mainly on the standard article class,
9492 most of the normal functionality is provided.
9493 The Elsevier class defines a number of mathematical environments, which
9494 are similar to the AMS environments.
9495 These commands are all described in the Elsevier documentation, and are
9499 \begin_layout Standard
9500 The easiest way to use the Elsevier style is to base documents on the included
9502 It is best not to use options such as fancy headings or the geometry package,
9503 as elements such as these are defined by Elsevier in their style file.
9504 Ideally, no extra packages except those mentioned in the Elsevier documentation
9506 Essentially, Elsevier require as
9507 \begin_inset Quotes eld
9511 \begin_inset Quotes erd
9514 a LaTeX file as possible, as their intention is to take the supplied file
9515 and replace the class file with one for the particular journal to which
9516 the paper has been submitted.
9517 This also means that not too much time should be spent on the formating
9519 When it comes to be published, this will change anyway.
9520 The rest of the usage for this layout is substantially the same as for
9521 the normal article class.
9522 For details of what Elsevier do and don't allow, refer to their documentation.
9525 \begin_layout Section
9531 \begin_inset CommandInset label
9540 \begin_layout Standard
9546 \begin_layout Subsection
9550 \begin_layout Standard
9551 This section describes how to use LyX to make slides for overhead projectors.
9552 There are two document classes that can do this: the default slides class
9558 This section documents the latter.
9561 \begin_layout Standard
9562 I'm going to say this again, nice and clear, so that there's no misunderstanding
9566 \begin_layout Standard
9567 \begin_inset VSpace bigskip
9573 \begin_layout Standard
9577 This section documents the class
9578 \begin_inset Quotes eld
9586 \begin_inset Quotes erd
9594 \begin_layout Standard
9595 \begin_inset VSpace bigskip
9601 \begin_layout Standard
9602 If you're looking for the documentation for
9603 \begin_inset Quotes eld
9611 \begin_inset Quotes erd
9615 \begin_inset space ~
9619 \begin_inset CommandInset ref
9621 reference "sec:slitex"
9626 If your machine doesn't have the
9631 \begin_inset Quotes eld
9639 \begin_inset Quotes erd
9642 ] installed, you'll probably have to use the default
9646 class, which isn't quite as good as
9651 \begin_layout Standard
9656 class is designed for use with version 2.1 of the
9660 LaTeX class file which is now an integral part of LaTeX2e.
9663 \begin_layout Subsection
9667 \begin_layout Standard
9668 Obviously, to use this document class, you need to select
9669 \begin_inset Quotes eld
9677 \begin_inset Quotes erd
9687 \begin_inset space ~
9693 There are some settings in the
9696 \begin_inset space ~
9701 dialog that you should know about that are specific to this class:
9704 \begin_layout Itemize
9705 Don't change the options
9716 \begin_inset space ~
9722 They're ignored by the
9729 \begin_layout Itemize
9730 The default font size is 20
9731 \begin_inset space \thinspace{}
9734 pt with the other options being 17
9735 \begin_inset space \thinspace{}
9739 \begin_inset space \thinspace{}
9743 \begin_inset space \thinspace{}
9749 \begin_layout Itemize
9758 but all math equations are still typeset in the usual roman font.
9761 \begin_layout Itemize
9766 supports A4 and Letter paper sizes as well as a special size for working
9768 \begin_inset space \thinspace{}
9772 It doesn't support A5, B5, legal or executive paper sizes.
9775 \begin_layout Itemize
9776 Don't bother changing the
9780 settings because they are ignored anyway.
9781 All floats appear where they are defined in the text.
9784 \begin_layout Itemize
9789 setting behaves a bit differently for this class.
9794 provides extensive footer and header capabilities including a user-defined
9797 \begin_inset space ~
9801 \begin_inset CommandInset ref
9803 reference "sec:foilfoot"
9808 The title page is treated differently to all other pages in the document
9817 has the logo centered at the bottom of the page (if one is defined).
9818 The possible page style choices and what they do are as follows:
9822 \begin_layout Labeling
9823 \labelwidthstring MMMMMMM
9830 The final output contains no page numbers, or other headers or footers
9831 (except footnotes of course).
9835 \begin_layout Labeling
9836 \labelwidthstring MMMMMMM
9843 The final output contains page numbers centered at the bottom of the page.
9844 No other headings or footers (other than footnotes).
9847 \begin_layout Labeling
9848 \labelwidthstring MMMMMMM
9853 Page numbers in lower right corner.
9854 Additional headers and footers are also shown.
9855 This is also the default.
9858 \begin_layout Labeling
9859 \labelwidthstring MMMMMMM
9864 Gives you access to the
9868 package although its use with
9872 is discouraged by the writer of the
9876 package because of some potential page layout clashes.
9880 \begin_layout Subsubsection
9884 \begin_layout Standard
9885 The following options may be used in the extra class options in the
9887 Document\SpecialChar \menuseparator
9893 \begin_layout Labeling
9894 \labelwidthstring MMMMMMx
9899 This sets up the page layout for 7.33
9900 \begin_inset space \thinspace{}
9904 \begin_inset space \thinspace{}
9907 in paper, which is about the same aspect ratio as a 35
9908 \begin_inset space \thinspace{}
9911 mm slide, making it a bit easier to work with this medium.
9914 \begin_layout Labeling
9915 \labelwidthstring MMMMMMx
9920 Places a rule across the page below the header on every page except the
9924 \begin_layout Labeling
9925 \labelwidthstring MMMMMMx
9930 Places a rule across the page above the footer on every page except the
9934 \begin_layout Labeling
9935 \labelwidthstring MMMMMMx
9940 This is automatically set each time you create a new
9949 to use the dvips driver to rotate those pages that are set as landscape
9953 \begin_layout Labeling
9954 \labelwidthstring MMMMMMx
9959 Simply changes the page dimensions to those of a landscape page but doesn't
9961 Thus if you use this option you need to use an external program to rotate
9962 each page or feed your paper through your printer as landscape.
9963 Note that this option effectively reverses the roles of the
9971 environments (don't worry these are described in the next section).
9974 \begin_layout Labeling
9975 \labelwidthstring MMMMMMx
9980 Equation numbers on the left.
9983 \begin_layout Labeling
9984 \labelwidthstring MMMMMMx
9989 Flush-left equations.
9992 \begin_layout Subsection
9993 Supported Environments
9996 \begin_layout Standard
9997 Most of the environments commonly supported in other classes are also supported
10003 There are several additional environments provided by
10007 as well as a couple added by LyX.
10008 The following environments are shared with other classes:
10011 \begin_layout Standard
10015 \begin_layout Plain Layout
10019 begin{multicols}{2}
10027 \begin_layout Itemize
10033 \begin_layout Itemize
10039 \begin_layout Itemize
10045 \begin_layout Itemize
10051 \begin_layout Itemize
10057 \begin_layout Itemize
10063 \begin_layout Itemize
10069 \begin_layout Itemize
10075 \begin_layout Itemize
10081 \begin_layout Itemize
10087 \begin_layout Itemize
10093 \begin_layout Itemize
10099 \begin_layout Itemize
10105 \begin_layout Itemize
10111 \begin_layout Itemize
10117 \begin_layout Itemize
10123 \begin_layout Itemize
10129 \begin_layout Itemize
10135 \begin_layout Standard
10139 \begin_layout Plain Layout
10151 \begin_layout Standard
10152 That is, all the major environments apart from the sectioning environments.
10153 Since foils are essentially self-contained sections, with a title and body,
10158 provides specific commands for starting new foils and these are:
10161 \begin_layout Itemize
10167 \begin_layout Itemize
10173 \begin_layout Standard
10174 LyX also provides slightly modified versions of these two environments called:
10177 \begin_layout Itemize
10183 \begin_layout Itemize
10186 ShortRotatefoilhead
10189 \begin_layout Standard
10190 and the differences will be explained in the next section.
10193 \begin_layout Standard
10194 Since foils are often used in presenting ideas or new theorems and such
10199 also provides a comprehensive box of goodies for presenting them:
10202 \begin_layout Standard
10206 \begin_layout Plain Layout
10210 begin{multicols}{2}
10218 \begin_layout Itemize
10224 \begin_layout Itemize
10230 \begin_layout Itemize
10236 \begin_layout Itemize
10242 \begin_layout Itemize
10248 \begin_layout Itemize
10254 \begin_layout Itemize
10260 \begin_layout Itemize
10266 \begin_layout Itemize
10272 \begin_layout Itemize
10278 \begin_layout Itemize
10284 \begin_layout Standard
10288 \begin_layout Plain Layout
10300 \begin_layout Standard
10301 The starred versions are unnumbered while the unstarred versions are numbered.
10302 There are also two list environments added by LyX and these are:
10305 \begin_layout Itemize
10311 \begin_layout Itemize
10317 \begin_layout Standard
10322 provides some powerful header and footer capabilities that are best set
10323 in the preamble although they may be set at any point in a document.
10324 If you want to change these settings in your document the best place to
10325 do so is at the very top of a foil, i.
10326 \begin_inset space \thinspace{}
10332 \begin_inset space \space{}
10337 straight after the foilhead.
10340 \begin_layout Standard
10341 For this purpose, the following command styles are provided [
10348 \begin_layout Standard
10352 \begin_layout Plain Layout
10356 begin{multicols}{2}
10364 \begin_layout Itemize
10368 \begin_inset space ~
10374 \begin_layout Itemize
10380 \begin_layout Itemize
10384 \begin_inset space ~
10390 \begin_layout Itemize
10394 \begin_inset space ~
10400 \begin_layout Itemize
10404 \begin_inset space ~
10411 \begin_layout Standard
10412 \begin_inset space ~
10419 \begin_layout Standard
10423 \begin_layout Plain Layout
10435 \begin_layout Standard
10436 There are also a few commands provided by
10440 that aren't directly supported by LyX but I'll tell you what they do and
10441 how to use them in section
10442 \begin_inset space ~
10446 \begin_inset CommandInset ref
10448 reference "sec:unsuppfoils"
10455 \begin_layout Subsection
10456 Building a Set of Foils
10459 \begin_layout Standard
10460 This section will give a simple introduction to using the different environments
10461 to build a set of foils.
10462 If you want to see an example set of foils, take a look at the
10466 file you find in LyX's
10473 \begin_layout Subsubsection
10474 Give It a Title Page
10477 \begin_layout Standard
10478 Unlike other classes that provide
10498 creates the title on a page of its own.
10499 If you leave out the
10503 environment LaTeX will substitute the current date (every time you regenerate
10507 \begin_layout Subsubsection
10511 \begin_layout Standard
10512 As I mentioned earlier, there are four ways of starting a new foil.
10513 For portrait foils you should use
10522 The difference between these two environments is the amount of space between
10523 the title of the foil (the foilhead) and the body of the foil.
10526 \begin_layout Standard
10527 Landscape foils are generated using the
10533 ShortRotatefoilhead
10536 Again the only difference is the spacing between foilhead and body.
10537 Both of the short versions have 0.5 inches less separation between the foilhead
10542 \begin_layout Standard
10543 One problem with the support for landscape foils is the requirement that
10544 you have to use the
10548 driver to generate the PostScript output otherwise the foils won't be rotated.
10549 It is possible to get landscape foils even if you haven't got the
10553 driver provided you can feed your foils sideways through your printer ;-)
10556 \begin_layout Subsubsection
10557 Theorems, Lemmas, Proofs and more
10560 \begin_layout Standard
10561 Due to a small bug in LyX you can't have two of the same type of these environme
10562 nts directly following each other.
10563 They must be separated by something.
10564 If you try, you will just be extending the previous environment as if you
10565 had merged the two environments together.
10566 So, how do you get around this problem? The simplest option is to insert
10567 some text between the two environments or add a
10571 environment between the two with just a
10572 \begin_inset Quotes eld
10580 \begin_inset Quotes erd
10584 This will force LyX to produce two separate environments and hence the
10585 correct LaTeX output.
10586 An example is provided in the example file included with the LyX distribution.
10587 Remember, this problem only occurs if you are trying to place two of the
10588 same type of theorem-like environments one directly after the other.
10591 \begin_layout Subsubsection
10595 \begin_layout Standard
10596 You get all the commonly supported list styles found in other classes as
10597 well as two new ones.
10598 I'll only describe the new ones here.
10599 If you want to find out more about the other list environments check out
10605 If you intend to use itemized lists you might also want to read about the
10609 \begin_inset space ~
10613 \begin_inset space ~
10618 dialog described above in section
10619 \begin_inset space ~
10623 \begin_inset CommandInset ref
10625 reference "sec:bullet"
10632 \begin_layout Standard
10633 The two new list styles,
10641 , are designed to make it easier for you to create lists of do's and don'ts
10642 or right and wrong by providing dedicated environments that use a tick
10643 or a cross as the label of the list.
10644 These lists are in fact dedicated variants of the
10649 They do however require that you have the
10653 packages installed.
10656 \begin_layout Subsubsection
10660 \begin_layout Standard
10665 redefines the floating tables and figures so that they appear exactly where
10666 they are in the text rather than pushing them to the top of the page or
10667 to some user specified location.
10668 In fact if you change the float placement settings they are simply ignored.
10671 \begin_layout Subsubsection
10672 Page Headers and Footers
10673 \begin_inset CommandInset label
10675 name "sec:foilfoot"
10682 \begin_layout Standard
10686 \begin_inset space ~
10695 are two commands used to control the left-footer text string.
10696 The first is meant to allow you to include a graphic logo on your foils
10698 \begin_inset Quotes eld
10706 \begin_inset Quotes erd
10710 While the second is meant to provide a classification for the audience,
10714 \begin_inset space \thinspace{}
10720 \begin_inset space \space{}
10724 It is empty by default.
10727 \begin_layout Standard
10728 The remaining page corners can be filled by
10731 \begin_inset space ~
10736 (which defaults to page numbers),
10739 \begin_inset space ~
10747 \begin_inset space ~
10755 \begin_layout Subsection
10761 \begin_inset CommandInset label
10763 name "sec:unsuppfoils"
10770 \begin_layout Standard
10771 All the commands mentioned below need to be set in a
10779 within another environment.
10782 \begin_layout Subsubsection
10786 \begin_layout Standard
10787 All lengths are adjusted using the
10810 should be replaced by the name given to the length you want to change and
10815 is the length value.
10816 All lengths should be specified in units of length such as inches (
10828 ) or relative to some document or font-based length such as
10838 \begin_layout Standard
10839 It's possible to change the spacing between a foilhead and the body of the
10840 foil by adjusting the length specified by
10847 For example, to make
10852 \begin_inset space \space{}
10855 in closer to their bodies put the following in the preamble:
10861 foilheadskip}{-0.5in}
10864 \begin_layout Standard
10865 The spacings around floats can be adjusted by setting these lengths:
10868 \begin_layout Labeling
10869 \labelwidthstring MMMMMMMMMMM
10876 Separation between the text and the top of the float
10879 \begin_layout Labeling
10880 \labelwidthstring MMMMMMMMMMM
10887 Separation between the float and the caption
10890 \begin_layout Labeling
10891 \labelwidthstring MMMMMMMMMMM
10898 Separation between the caption and the following text
10901 \begin_layout Labeling
10902 \labelwidthstring MMMMMMMMMMM
10909 You can make the captions narrower than the surrounding text by adjusting
10911 Best done relative to
10920 \begin_layout Standard
10921 There are also several title page related lengths that you may find useful
10922 if you have a long title or several authors:
10925 \begin_layout Labeling
10926 \labelwidthstring MMMMMMMMMMM
10933 Separation from headers to
10938 \begin_layout Labeling
10939 \labelwidthstring MMMMMMMMMMM
10957 \begin_layout Labeling
10958 \labelwidthstring MMMMMMMMMMM
10972 \begin_layout Labeling
10973 \labelwidthstring MMMMMMMMMMM
10989 \begin_layout Labeling
10990 \labelwidthstring MMMMMMMMMMM
11006 \begin_layout Standard
11007 The last length related command affects all the list environments.
11018 a list environment then all the vertical spacing between the list items
11020 Note that this is a command not a length so it doesn't require
11026 like the stuff mentioned above.
11029 \begin_layout Subsubsection
11030 Headers and Footers
11033 \begin_layout Standard
11046 commands control whether the logo in the
11050 definition appear on a given page.
11057 in the preamble then none of the foils will have the logo on them.
11058 If you don't want the logo on a particular page place the
11064 directly after the foilhead of that page and the
11070 directly after the next foilhead.
11073 \begin_layout Standard
11074 If you decide to use the
11078 page style setting in the
11081 \begin_inset space ~
11086 dialog you should probably add
11096 to your preamble so headers and footers on landscape pages are correctly
11097 placed when rotated.
11098 This is due to some clashes between the page layouts provided by the
11109 \begin_layout Section
11110 Hollywood (Hollywood spec scripts)
11113 \begin_layout Standard
11119 \begin_layout Subsection
11123 \begin_layout Standard
11124 Getting the format of a Hollywood script right is a
11125 \begin_inset Quotes eld
11129 \begin_inset Quotes erd
11132 It is designed to make the readers focus on content and to be easy and
11133 familiar for the actors to read.
11134 Each page of a script should be one minute of film.
11135 Nothing goes in a script that you cannot see or hear on screen.
11136 The courier 12 pt font should be used throughout.
11140 \begin_layout Subsection
11144 \begin_layout Standard
11145 Speakers' lines should NEVER break in mid-sentence.
11146 If a speaker's lines continue over a page break, repeat the
11150 title followed by (Cont'd).
11153 \begin_layout Subsection
11157 \begin_layout Standard
11162 names as labels then cross-reference the label to insert the name.
11163 The cross-reference dialog will show the current cast of characters.
11164 You can use this to insert the speaker name in narratives also.
11167 \begin_layout Subsection
11168 Paper size and Margins
11171 \begin_layout Standard
11172 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11175 \begin_layout Subsection
11179 \begin_layout Standard
11180 The following environments are available.
11181 You can use hollywood.bind to get the bind keys shown at the right.
11184 \begin_layout Itemize
11188 \begin_inset Newline newline
11193 Used where nothing else works.
11197 \begin_layout Itemize
11203 \begin_inset space \hfill{}
11211 \begin_inset Newline newline
11214 Usually followed by something like
11215 \begin_inset Quotes eld
11218 on Sally waking up.
11219 \begin_inset Quotes erd
11225 \begin_layout Itemize
11229 \begin_inset space \hfill{}
11233 \begin_inset Newline newline
11238 Introduces a new INTERIOR camera set-up.
11239 Always followed by DAY or NIGHT, or something similar to define the lighting
11241 Everthing on this line in CAPS.
11244 \begin_layout Itemize
11248 \begin_inset space \hfill{}
11252 \begin_inset Newline newline
11257 Introduces a new EXTERIOR camera set-up.
11258 Everthing on this line in CAPS.
11261 \begin_layout Itemize
11265 \begin_inset space \hfill{}
11269 \begin_inset Newline newline
11274 The character speaking.
11277 \begin_layout Itemize
11281 \begin_inset space \hfill{}
11285 \begin_inset Newline newline
11290 Instructions to the speaker.
11291 The () are automatically inserted, but only the ( will show in LyX.
11292 Both will be printed.
11295 \begin_layout Itemize
11299 \begin_inset space \hfill{}
11303 \begin_inset Newline newline
11315 \begin_layout Itemize
11319 \begin_inset space \hfill{}
11323 \begin_inset Newline newline
11328 Camera movement instruction.
11330 \begin_inset space \thinspace{}
11334 \begin_inset space \space{}
11340 \begin_layout Itemize
11344 \begin_inset space \hfill{}
11350 \begin_layout Itemize
11354 \begin_inset space \hfill{}
11360 \begin_layout Itemize
11364 \begin_inset space \hfill{}
11370 \begin_layout Itemize
11374 \begin_inset space \hfill{}
11380 \begin_layout Subsection
11384 \begin_layout Itemize
11388 \begin_layout Itemize
11392 \begin_layout Itemize
11394 \begin_inset space \thinspace{}
11401 \begin_layout Itemize
11406 \begin_layout Itemize
11407 PAN — camera movement
11410 \begin_layout Itemize
11411 INSERT — cut to close-up of
11414 \begin_layout Section
11418 \begin_layout Standard
11421 Panayotis Papasotiriou
11424 \begin_layout Subsection
11428 \begin_layout Standard
11429 The ijmpc package is a set of macros that facilitates electronic manuscript
11432 International Journal of Modern Physics C
11435 Similarly, the ijmpd package is for creating manuscripts to be submitted
11438 International Journal of Modern Physics D
11441 Both journals are published by World Scientific.
11442 The corresponding document classes are named
11451 These files, together with instructions for the authors, can be downloaded
11453 \begin_inset Flex URL
11456 \begin_layout Plain Layout
11458 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11464 \begin_inset Flex URL
11467 \begin_layout Plain Layout
11469 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11475 Both packages are modified versions of the standard
11476 \begin_inset Quotes eld
11480 \begin_inset Quotes erd
11483 package, and they are almost (but not exactly) identical.
11484 Most of their features are supported by LyX.
11485 I have used LyX successfully to write articles submitted to both journals
11486 without any problem.
11489 \begin_layout Subsection
11493 \begin_layout Standard
11494 As usual, the easiest way to write a paper is to start with a template.
11497 File\SpecialChar \menuseparator
11516 This will give an (almost) empty document that includes the most common
11517 fields found in a manuscript.
11518 Simply overwrite the existing text (including the brackets,
11523 You should keep in mind the following remarks.
11526 \begin_layout Enumerate
11527 LyX won't let you change the font size and the page style of the document,
11528 because such modifications are not allowed by both packages.
11531 \begin_layout Enumerate
11532 The language of the document should not be changed.
11533 Before previewing your paper, be sure that the babel package is not used.
11534 To do this, click on
11536 Tools\SpecialChar \menuseparator
11547 checkbox in the language settings, and click on
11555 , if you wish to make this change permanent).
11558 \begin_layout Enumerate
11560 \begin_inset Quotes eld
11564 \begin_inset Quotes erd
11567 style must be used to define keywords.
11570 \begin_layout Enumerate
11571 The ijmpc package provides a style named
11572 \begin_inset Quotes eld
11575 Classification Codes
11576 \begin_inset Quotes erd
11579 , which can be used to define classification codes, such as PACS numbers.
11580 Note that this facility is not supported by the ijmpd package.
11583 \begin_layout Enumerate
11584 Several new environments are available:
11585 \begin_inset Quotes eld
11589 \begin_inset Quotes erd
11593 \begin_inset Quotes eld
11597 \begin_inset Quotes erd
11601 \begin_inset Quotes eld
11605 \begin_inset Quotes erd
11609 \begin_inset Quotes eld
11613 \begin_inset Quotes erd
11617 \begin_inset Quotes eld
11621 \begin_inset Quotes erd
11625 \begin_inset Quotes eld
11629 \begin_inset Quotes erd
11633 \begin_inset Quotes eld
11637 \begin_inset Quotes erd
11641 \begin_inset Quotes eld
11645 \begin_inset Quotes erd
11649 \begin_inset Quotes eld
11653 \begin_inset Quotes erd
11657 \begin_inset Quotes eld
11661 \begin_inset Quotes erd
11665 \begin_inset Quotes eld
11669 \begin_inset Quotes erd
11673 \begin_inset Quotes eld
11677 \begin_inset Quotes erd
11681 \begin_inset Quotes eld
11685 \begin_inset Quotes erd
11689 \begin_inset Quotes eld
11693 \begin_inset Quotes erd
11697 Their use is more or less obvious.
11698 LyX supports all these environments; it will use the proper label, text
11699 style, and numbering scheme for each of them.
11702 \begin_layout Enumerate
11703 Both packages use basic citations; the natbib package should not be used.
11704 In LyX, citation references are shown as usual; in the output, citations
11705 are shown as superscripts.
11706 If you want to use a citation as normal text, you should use the
11711 \begin_inset space \thinspace{}
11715 \begin_inset space \space{}
11719 \begin_inset Quotes eld
11723 \begin_inset space \space{}
11733 \begin_inset Quotes erd
11739 \begin_layout Enumerate
11741 \begin_inset Quotes eld
11745 \begin_inset Quotes erd
11748 section in both packages.
11749 To put acknowledgments, just use the
11750 \begin_inset Quotes eld
11754 \begin_inset Quotes erd
11760 \begin_layout Enumerate
11761 Appendices may be added to the paper,
11765 the Acknowledgments and
11770 LyX provides a special environment, called
11771 \begin_inset Quotes eld
11775 \begin_inset Quotes erd
11778 which marks the beginning of the appendices.
11779 This environment should be left blank; it just sends a LaTeX command, but
11780 nothing is really printed.
11782 \begin_inset Quotes eld
11786 \begin_inset Quotes erd
11789 is printed with blue letters, as a signal that all sections after that
11790 point are appendices.
11791 To write an appendix, use the
11792 \begin_inset Quotes eld
11796 \begin_inset Quotes erd
11800 LyX will number each appendix with capital letters, as required by both
11803 \begin_inset Quotes eld
11807 \begin_inset Quotes erd
11814 be present before the first appendix; if not, all appendices will be numbered
11815 as normal sections in the output.
11818 \begin_layout Enumerate
11819 The ijmpc and the ijmpd packages use the
11823 command to implement table captions.
11824 As a result, a table created by LyX is printed correctly, but its caption
11826 However, you can use some TeX code to overpass this problem, so that captions
11827 are printed as expected.
11828 To do so, create a float table as usual, remove the caption, and replace
11829 it with the TeX code
11839 (sic); you must also the TeX code
11843 immediately after the tabular material.
11844 Study the example table included in the template files to see how this
11845 trick is implemented.
11846 Alternatively, If you need table captions, you should implement the whole
11851 file, then include this file to the LyX document (
11853 Insert\SpecialChar \menuseparator
11854 File\SpecialChar \menuseparator
11856 \begin_inset space ~
11862 Details on how to create a table float can be found in the files
11870 , included in the corresponding packages.
11873 \begin_layout Subsection
11874 Preparing a paper for submission
11877 \begin_layout Standard
11878 Before you submit your paper you must export the LyX document as a LaTeX
11881 File\SpecialChar \menuseparator
11882 Export\SpecialChar \menuseparator
11889 \begin_layout Plain Layout
11890 Actually you have the choice between LaTeX (plain) and pdflatex.
11891 If you intend to use pdflatex to prepare the paper, you should use the
11892 pdflatex option so that included graphics are converted to PDF format,
11893 ready for use by pdflatex.
11898 , then make the following changes to the resulting
11905 \begin_layout Enumerate
11906 Remove the comment lines before the
11915 \begin_layout Enumerate
11916 Remove everything between (and including) the
11928 commands, except for any commands you specifically put into the LaTeX preamble.
11931 \begin_layout Standard
11936 file should be saved and processed through LaTeX as many times as necessary.
11937 You may also want to check the resulting
11944 \begin_layout Subsection
11948 \begin_layout Standard
11949 The use of TeX code is reduced to two commands, which must be placed at
11950 the top of the document.
11951 If you started writing your paper by using the
11959 template, the TeX code needed is already in its place; you usually don't
11961 You may only modify the first TeX code to specify the information printed
11962 to the top of odd and even pages (authors' names and short paper's title,
11964 This TeX code must have the form
11968 markboth{Authors' Names}{Short Paper's Title}
11973 \begin_layout Section
11977 \begin_layout Standard
11983 \begin_layout Subsection
11987 \begin_layout Standard
11988 The iopart package provides a document class to create electronic manuscript
11989 submission to the journals published by the Institute of Physics.
11990 Instructions for the authors how to create a paper using the iopart class
11991 can be downloaded together with the iopart package from the site
11992 \begin_inset Flex URL
11995 \begin_layout Plain Layout
11997 ftp://ftp.iop.org/pub/journals/latex2e
12005 \begin_layout Subsection
12009 \begin_layout Standard
12010 The easiest way to write a paper is to start with the file
12014 that is available in LyX's examples files folder.
12015 Open this file, save it under a new name, and start writing.
12016 The example file explains how to use the special text environments.
12017 Here are the most important advices:
12020 \begin_layout Itemize
12021 To be able to compile your document to a PDF, PS, or DVI, assure that the
12024 Use AMS math package
12026 in the document settings under
12033 \begin_layout Itemize
12036 The title environment defines the kind of your paper.
12037 So use one of the following environments for the title:
12041 \begin_layout Itemize
12050 \begin_layout Itemize
12059 \begin_layout Itemize
12065 for a Topical review
12068 \begin_layout Itemize
12077 \begin_layout Itemize
12086 \begin_layout Itemize
12092 for a Paper (same as Title)
12095 \begin_layout Itemize
12101 for a Preliminary communication
12104 \begin_layout Itemize
12110 for a Rapid communication
12113 \begin_layout Itemize
12119 for a Letter to the editor
12123 \begin_layout Itemize
12126 All title environments except of
12130 can have an optional short title.
12133 \begin_layout Itemize
12134 There is a general title environment
12138 which is not directly supported by the LyX.
12139 This can be used as TeX code when your document doesn't fit into one of
12140 the other title types.
12143 \begin_layout Standard
12144 For more informations like hints for special table and formula formatting,
12145 look at the IOP author guidelines.
12148 \begin_layout Section
12152 \begin_layout Standard
12155 Panayotis Papasotiriou
12158 \begin_layout Subsection
12162 \begin_layout Standard
12163 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12164 that facilitates electronic manuscript submission to the journals they
12166 Most known of them (at least in my domain of interest) are
12168 Astrophysics and Space Science
12174 , but there are many others (see a complete list at
12175 \begin_inset Flex URL
12178 \begin_layout Plain Layout
12180 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12186 The Kluwer package may be downloaded from the site
12187 \begin_inset Flex URL
12190 \begin_layout Plain Layout
12192 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12198 A complete user guide is contained in that package (but it can also be
12199 downloaded separately).
12202 \begin_layout Standard
12203 LyX supports many features of the package but not everything.
12204 However, the TeX code needed is reduced to some
12205 \begin_inset Quotes eld
12209 \begin_inset Quotes erd
12212 commands of the package (see
12213 \begin_inset space ~
12217 \begin_inset CommandInset ref
12219 reference "subsec:kluwer_peculiarities"
12224 I have recently used LyX to write an article submitted to the
12226 Astrophysics and Space Science
12228 without any problem.
12231 \begin_layout Subsection
12235 \begin_layout Standard
12236 The easiest way to write a paper is to start with the Kluwer template file.
12239 File\SpecialChar \menuseparator
12251 This will give an (almost) empty document that includes the most common
12252 fields found in a manuscript and a short description of their use.
12253 As in most templates, simply overwrite the existing text (including the
12258 ) with the correct information.
12261 \begin_layout Subsection
12262 Preparing a paper for submission
12265 \begin_layout Standard
12266 As in the AASTeX package, before you submit your paper to a journal you
12268 \begin_inset Quotes eld
12272 \begin_inset Quotes erd
12278 \begin_layout Enumerate
12279 Export your paper as a LaTeX file.
12280 To do this, click on
12282 File\SpecialChar \menuseparator
12283 Export\SpecialChar \menuseparator
12290 \begin_layout Enumerate
12295 file with a text editor and make the following changes
12299 \begin_layout Enumerate
12300 remove the comment lines before the
12309 \begin_layout Enumerate
12310 remove everything between (and including) the
12322 commands, except for any commands you specifically put into the LaTeX preamble.
12325 \begin_layout Standard
12334 \begin_layout Enumerate
12339 file through LaTeX as many times as necessary (usually up to three).
12342 \begin_layout Enumerate
12348 \begin_inset space \thinspace{}
12352 \begin_inset space \space{}
12359 , and check if everything is OK (it should, if you didn't make any mistake).
12362 \begin_layout Subsection
12363 \begin_inset Quotes eld
12367 \begin_inset Quotes erd
12370 of the Kluwer package
12371 \begin_inset CommandInset label
12373 name "subsec:kluwer_peculiarities"
12380 \begin_layout Standard
12381 The Kluwer package has the following
12382 \begin_inset Quotes eld
12386 \begin_inset Quotes erd
12392 \begin_layout Enumerate
12393 It is possible to write multiple articles in the same LaTeX file
12397 \begin_layout Plain Layout
12398 I can't imagine any good reason to do this.
12404 Each article must be included in the environment
12405 \begin_inset Quotes eld
12409 \begin_inset Quotes erd
12413 Unfortunately, this environment cannot be omitted, even if you write just
12415 Therefore, each article starts with the command
12421 and, obviously, ends with the command
12428 Although this can be implemented in LyX, I didn't included it, since it
12429 looks ugly and can confuse the novice user.
12430 Therefore, you need to enter them directly and mark them as LaTeX code
12432 \begin_inset Quotes eld
12436 \begin_inset Quotes erd
12442 \begin_layout Enumerate
12443 Information given at the beginning of the article (i.
12444 \begin_inset space \thinspace{}
12448 \begin_inset space \space{}
12451 title, subtitle, author, institution, running title, running author, abstract
12452 and keywords) must be included in an environment called
12453 \begin_inset Quotes eld
12457 \begin_inset Quotes erd
12461 This is not implemented in LyX, so you must enter title, subtitle etc.
12462 \begin_inset space ~
12465 between two TeX code lines (
12480 \begin_layout Enumerate
12481 According to the user manual, the label of each bibliography item must be
12505 \begin_layout Standard
12510 template takes care of all these
12511 \begin_inset Quotes eld
12515 \begin_inset Quotes erd
12519 If you start a new paper using this template you don't need to do anything
12524 \begin_layout Enumerate
12525 don't delete the TeX code included in the template, and
12528 \begin_layout Enumerate
12529 copy the example bibliography item included in the template and modify it
12530 as necessary to enter new bibliography items.
12533 \begin_layout Section
12537 \begin_layout Standard
12543 \begin_layout Subsection
12547 \begin_layout Standard
12548 The LyX document classes
12550 article (koma-script)
12554 report (koma-script)
12572 correspond to the LaTeX document classes
12589 \begin_inset space ~
12592 of the Koma-Script family.
12593 They are replacements for the standard document classes
12609 , resp., and fit better to European typography conventions in a number of
12613 \begin_layout Itemize
12614 Standard character size is 11pt in
12616 article (koma-script)
12620 report (koma-script)
12628 letter (koma-script)
12633 \begin_layout Itemize
12634 Headings, labels of the description environment, and a number of elements
12637 letter (koma-script)
12639 document class are set in a bold sans serif font.
12643 \begin_layout Plain Layout
12644 There is a big difference between the bold sans serif old cm fonts and new
12645 ec fonts, especially in the appearance of headings.
12646 In comparison, the ec bold sans serif fonts look a bit thin.
12647 Here the LaTeX package
12655 helps to produce the
12656 \begin_inset Quotes eld
12660 \begin_inset Quotes erd
12663 appearance when using the ec fonts.
12668 The numbering of chapter headings is made in the same way as the numbering
12669 of section headings, that is without the extra line
12670 \begin_inset Quotes eld
12673 Chapter\SpecialChar \ldots{}
12675 \begin_inset Quotes erd
12679 In addition, the appearance of the headings can be modified by using a
12680 number of options (in LyX to be entered in the field
12683 \begin_inset space ~
12690 Layout\SpecialChar \menuseparator
12694 A detailed German description of these options can be found in the Koma-Script
12702 \begin_layout Itemize
12703 The main means in the Koma-Script document classes to design the type area
12712 (in LyX to be entered in the extra class options field in the dialog
12714 Document\SpecialChar \menuseparator
12718 They make a clearer modification of page margins possible as do the options
12721 Document\SpecialChar \menuseparator
12725 A detailed German description of these and other type area options can
12726 be found in the Koma-Script documentation
12733 \begin_layout Itemize
12734 The LaTeX document classes of the Koma-Script family define a number of
12735 additional commands.
12736 Those part of it which makes sense in LyX is implemented in corresponding
12740 \begin_layout Standard
12741 A detailed German description of the LaTeX document classes of the Koma-Script
12742 family can be found in the Koma-Script documentation
12750 \begin_layout Plain Layout
12751 There is an English translation
12755 , but it is not a complete one.
12760 The following sections describe only those aspects, which are relevant
12764 \begin_layout Subsection
12765 article (koma-script), report (koma-script), and book (koma-script)
12768 \begin_layout Standard
12769 The document classes
12771 article (koma-script)
12775 report (koma-script)
12785 are implemented in the layout files
12798 They contain all the paragraph types of the corresponding standard document
12811 , resp., partly modified, with the exception of the LyX specific
12815 -type, which is replaced by the new
12819 -type having the same functionality.
12824 -Type there is a number of new paragraph types added.
12831 letter (koma-script)
12836 \begin_layout Itemize
12845 : are equivalents to
12853 , resp., additionally inserting an entry in the table of contents.
12862 are not contained in
12864 article (koma-script)
12869 \begin_layout Itemize
12878 : behave exactly as
12886 , resp., additionally clearing running heads.
12891 is not contained in
12893 article (koma-script)
12899 \begin_layout Plain Layout
12912 report (koma-script)
12914 , but since this is identical to
12918 , is has not been implemented in LyX.
12926 \begin_layout Itemize
12931 : generates a heading directly above the following paragraph in the standard
12932 character size without affecting the structure of the document.
12935 \begin_layout Itemize
12944 are special captions which respect the different space settings needed
12945 for captions placed above or below an element (if you follow strict typographic
12946 rules, you might want to place table captions always above the table).
12947 You can also use the class option
12951 , which will switch
12964 You need at least Koma-Script version 2.8q to use this.
12967 \begin_layout Itemize
12972 : can be used to set a bonmot, e.
12973 \begin_inset space \thinspace{}
12977 \begin_inset space \space{}
12980 at the beginning of a chapter.
12981 If you use the optional argument (
12983 Insert\SpecialChar \menuseparator
12985 \begin_inset space ~
12990 ), you can insert the dictum's author there.
12991 Dictum and author are separated by a line.
12992 You need at least Koma-Script version 2.8q to use this.
12997 is not contained in
12999 article (koma-script)
13004 \begin_layout Standard
13005 The following types, together with the standard types
13017 , form the title area of the document.
13018 They must be entered ahead of the first
13019 \begin_inset Quotes eld
13023 \begin_inset Quotes erd
13030 \begin_layout Plain Layout
13031 The corresponding LaTeX commands must appear before the
13042 When such a type is used more than once, the latter usage overwrites the
13043 former one, that means, for every type only the latest usage is valid.
13044 The order of the different types however has, like
13056 , no effect on the appearance of the produced document.
13059 \begin_layout Itemize
13064 : produces a centered paragraph above the ordinary title (
13076 ) for the subject of the document.
13079 \begin_layout Itemize
13084 : produces a centered paragraph below the ordinary title (
13096 ) for the publishers' name.
13099 \begin_layout Itemize
13106 report (koma-script)
13112 produces a centered paragraph on its own page behind the title page, or
13115 article (koma-script)
13117 produces a centered paragraph below the ordinary title (
13133 ) for a dedication.
13136 \begin_layout Itemize
13141 : produces a left aligned paragraph above the ordinary title (
13157 ) for a document`s head.
13160 \begin_layout Itemize
13165 : produces in a double-sided print in
13167 report (koma-script)
13173 a left-aligned paragraph at the top of the title page`s back or has no
13174 effect in a single-sided print or in
13176 article (koma-script)
13181 \begin_layout Itemize
13186 : produces in a double-sided print in
13188 report (koma-script)
13194 a left-aligned paragraph at the bottom of the title page`s back or has
13195 no effect in a single-sided print or in
13197 article (koma-script)
13202 \begin_layout Itemize
13207 : produces a special
13208 \begin_inset Quotes eld
13212 \begin_inset Quotes erd
13215 page ahead of the actual document containing a paragraph without special
13219 \begin_layout Standard
13220 The layout files for the document classes
13222 article (koma-script)
13226 report (koma-script)
13232 do include the file
13237 This is thought of as a place to define your own types.
13242 in your personal layout directory and edit the file!
13245 \begin_layout Subsection
13246 letter (koma-script)
13249 \begin_layout Standard
13253 \begin_layout Plain Layout
13265 \begin_layout Standard
13269 letter (koma-script)
13271 is implemented in the layout file
13276 It contains all the paragraph types of the corresponding standard document
13281 , partly modified, with the exception of the LyX specific types
13293 type, which is replaced by the new
13298 In addition, it contains, in contrast to the standard document class, the
13316 Furthermore, there are a number of new letter specific types.
13319 \begin_layout Standard
13323 \begin_layout Plain Layout
13335 \begin_layout Standard
13336 The appearance of the letter produced by this document class can be controlled
13337 by a number of LaTeX commands, which you can put in the LaTeX preamble.
13341 \begin_layout Plain Layout
13342 For example, the standard appearance of the letter`s heading, consisting
13343 of name and address, is quite self-willed.
13345 \begin_inset Quotes eld
13349 \begin_inset Quotes erd
13352 heading is produced by the following LaTeX commands in the preamble:
13355 \begin_layout LyX-Code
13365 \begin_layout LyX-Code
13381 \begin_layout LyX-Code
13391 \begin_layout LyX-Code
13411 A detailed German description of such LaTeX commands can be found in the
13412 Koma-Script documentation
13417 With it, the letter's author can produce his personal letter layout.
13420 \begin_layout Standard
13429 define the beginning of the letter and must be used in every letter.
13430 To emphasize them in the LyX document class, they are marked with the letter
13440 \begin_inset space ~
13443 in the left margin.
13444 It is possible to write any number of letters in one file.
13449 type produces a new letter using the same addressee and a
13453 type produces a new addressee.
13470 are ordinary paragraph types and can also be used several times in one
13471 and the same letter.
13474 \begin_layout Itemize
13479 : produces a paragraph for the addressee and implicitly defines the beginning
13483 \begin_layout Itemize
13488 : produces a paragraph for the form of address and implicitly produces a
13492 \begin_layout Itemize
13497 : produces a paragraph for a close.
13500 \begin_layout Itemize
13505 : produces a paragraph for a postscript.
13508 \begin_layout Itemize
13513 : produces a paragraph for a distribution list.
13516 \begin_layout Itemize
13521 : produces a paragraph for enclosures.
13524 \begin_layout Standard
13565 are input types provided with a label to enter information, which will
13566 be processed by the document class.
13570 \begin_layout Plain Layout
13571 It could be seen as a matter of inconsequence, that the types
13579 described above are not such input types as well.
13580 Because of the special meaning of those types, however, I have implemented
13581 them as ordinary paragraph types with a one letter mark in the left margin.
13582 Moreover, it would affect my feeling of symmetry, if the
13590 type had such a serious different appearance.
13595 The types must be used ahead of the corresponding
13602 \begin_layout Standard
13603 An implementation of these types in a WYSIWYG fashion does not seem to make
13604 sense, because the real appearance of the produced letter does not only
13605 depend on the usage of the particular type, but also on other factors.
13606 For example, a signature entered in the
13610 type will in the standard behavior appear in the produced letter only,
13611 when in the same letter also a
13616 The entered value of the
13620 type will in the standard behavior not appear in the produced letter at
13622 The possibility to design the letter`s heading freely is already indicated
13623 in a footnote above.
13626 \begin_layout Standard
13627 The input types can also be used as empty paragraphs.
13628 This makes sense e.
13629 \begin_inset space \thinspace{}
13633 \begin_inset space \space{}
13645 type is not used at all, in the standard behavior the value of the
13649 type is used as signature, whereas if an empty
13653 type is used, no signature value is defined.
13656 \begin_layout Standard
13657 By using the input types it is possible to write a letter template, containing
13658 filled input types with your personal dates (name, address, etc.) and empty
13659 input types for other dates you want to enter.
13662 \begin_layout Itemize
13667 : sender's name, in the standard behavior appears as a centered paragraph
13668 in small caps in the letter`s heading.
13671 \begin_layout Itemize
13676 : sender's signature, in the standard behavior appears below the
13685 type is used, the value of the
13689 type appears instead.
13692 \begin_layout Itemize
13697 : sender's address, in the standard behavior appears in a centered paragraph
13698 in the letter`s heading below the sender's name.
13701 \begin_layout Itemize
13706 : sender's telephone number, in the standard behavior only sets the LaTeX
13716 \begin_layout Itemize
13721 : place of the letter`s making.
13724 \begin_layout Itemize
13729 : date of the letter`s making.
13738 , in the standard behavior, produce the place and the date in a right-aligned
13739 line below the addressee's field.
13744 type is used, neither place nor date appear, independent of the value of
13754 type is used, the date of the letter `s production is used.
13757 \begin_layout Itemize
13762 : sender`s back address, in the standard behavior appears above the addressee's
13763 field in a small sans serif font.
13766 \begin_layout Itemize
13771 : special mail information, in the standard behavior appears underlined
13772 above the addressee's field below the back address.
13775 \begin_layout Itemize
13780 : additional information, in the standard behavior appears on right side
13781 below the addressee`s field.
13784 \begin_layout Itemize
13789 : the letter's title, in the standard behavior appears in a big, bold, sans
13790 serif font above the subject.
13793 \begin_layout Itemize
13798 : the letter's subject, in the standard behavior appears in a bold font
13806 \begin_layout Standard
13827 produce a business letter like line above the
13831 line containing the fields
13832 \begin_inset Quotes eld
13836 \begin_inset Quotes erd
13840 \begin_inset Quotes eld
13844 \begin_inset Quotes erd
13848 \begin_inset Quotes eld
13852 \begin_inset Quotes erd
13856 \begin_inset Quotes eld
13860 \begin_inset Quotes erd
13864 \begin_inset Quotes eld
13868 \begin_inset Quotes erd
13872 \begin_inset Quotes eld
13876 \begin_inset Quotes erd
13880 For the date field, the value of the
13886 \begin_inset Quotes eld
13889 business letter types
13890 \begin_inset Quotes erd
13893 is used, the value of the
13897 type however does not appear, but only the LaTeX variable
13904 The ordinary output of place and date in a right-aligned line below the
13905 addressee`s field is suppressed.
13906 The types are implemented as input types provided with a label and must
13907 be used ahead of the corresponding
13914 \begin_layout Itemize
13922 \begin_layout Itemize
13930 \begin_layout Itemize
13938 \begin_layout Itemize
13946 \begin_layout Itemize
13954 \begin_layout Subsection
13955 The new letter class: letter (koma-script v.2)
13958 \begin_layout Standard
13964 \begin_layout Standard
13965 \begin_inset VSpace medskip
13971 \begin_layout Standard
13973 Koma-Script version 2.8 has introduced a new letter class
13977 which supersedes the now unsupported
13982 It has — on the LaTeX side — a completely new interface and is not compatible
13983 with the old class.
13984 Therefore, LyX supports both, though it is recommended to use the new class.
13987 \begin_layout Standard
13988 This class covers the same functionality as
13990 letter (koma-script),
13993 The basic items are
13997 (receiver's address, same as
14001 in the old layout),
14014 will start a new letter (i.
14015 \begin_inset space \thinspace{}
14019 \begin_inset space \space{}
14022 you can write several letters per document).
14023 New elements are sender's
14039 and the possibility to use a
14045 Insert\SpecialChar \menuseparator
14051 \begin_layout Standard
14052 The biggest improvement is, though, that the letter's layout is configurable
14053 at almost any needs.
14054 This can be done via the preamble or with a special style file (Letter
14055 Class Option, extension
14059 ), that will be read in as a class option.
14063 \begin_layout Plain Layout
14064 The KOMA package comes with some default
14069 There is, for instance, a
14073 file that follows german typesetting rules, or a
14077 that provides the default layout of the old
14082 The latter can be loaded with the class option
14091 ayout\SpecialChar \menuseparator
14096 ocument\SpecialChar \menuseparator
14108 template that is included in LyX for examples.
14109 A detailed description is to be found in the Koma-Script documentation
14117 \begin_layout Subsection
14121 \begin_layout Standard
14122 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14126 \begin_layout Itemize
14127 The chapter number of a
14131 type appears on a line of its own above the chapter heading instead of
14132 appearing in the same line ahead of it.
14133 The cause for that is the LyX internal behavior for the labeltype
14137 in the layout file.
14140 \begin_layout Itemize
14141 The headings of the types
14149 are only put in the
14150 \begin_inset Quotes eld
14154 \begin_inset Quotes erd
14157 LaTeX table of contents, but not in the LyX table of contents (
14159 Document\SpecialChar \menuseparator
14161 \begin_inset space ~
14165 \begin_inset space ~
14173 \begin_layout Itemize
14174 The paragraphs in a
14178 document class appear in a skip separation mode, not indented.
14179 This is the standard behavior, no special LaTeX commands are needed for
14183 Document\SpecialChar \menuseparator
14186 dialog the corresponding radio button indicates
14195 value always has the effect that extra LaTeX commands are inserted in the
14196 document to produce the gap, which is not what is wanted in this case.
14199 \begin_layout Section
14200 Latex8 (IEEE Conference Papers)
14203 \begin_layout Standard
14209 \begin_layout Subsection
14213 \begin_layout Standard
14214 Since this class is specifically for writing submissions to IEEE sponsored
14215 conferences I strongly recommend that you get a copy of their Authors Kit.
14220 package and associated bibliography style file is included in the kit.
14221 The Authors Kit is usually sent out by email once your initial submission
14223 There is a lot of useful information in the Authors Kit explaining formatting
14224 restrictions and so on and I will assume you have read this since that
14225 means I don't have to repeat it all here.
14228 \begin_layout Subsection
14232 \begin_layout Standard
14233 [AR\SpecialChar \@.
14237 \begin_layout Subsection
14238 Supported Environments
14241 \begin_layout Itemize
14247 \begin_layout Itemize
14253 \begin_layout Itemize
14259 \begin_layout Itemize
14265 \begin_layout Itemize
14271 \begin_layout Itemize
14277 \begin_layout Itemize
14283 \begin_layout Itemize
14289 \begin_layout Itemize
14295 \begin_layout Subsection
14296 Differences Between Screen and Paper
14299 \begin_layout Standard
14300 There are slight differences in appearance mainly with the presentation
14301 of section counters.
14302 On screen the trailing period of the section counter is missing but it
14303 will appear in the output so don't let this worry you.
14306 \begin_layout Section
14310 \begin_layout Standard
14316 \begin_layout Subsection
14320 \begin_layout Standard
14321 Memoir is a very powerful and constantly evolving class.
14322 It has been designed with regard to fictional and non-fictional literature.
14323 Its aim is to let the user have maximum control over the typesetting of
14325 Memoir is based on the standard book class, but it can also emulate the
14326 article class (see below).
14329 \begin_layout Standard
14330 Peter Wilson, the developer of Memoir, is known as the author of lots of
14331 useful packages in the LaTeX world.
14332 Most of them have been merged with Memoir.
14333 Therefore, it is much easier to layout the table of contents, appendices,
14334 chapter designs and such.
14335 LyX, though, does not support all of these goodies natively.
14336 Some of them might be added to forthcoming releases
14340 \begin_layout Plain Layout
14341 You are invited to send suggestions to
14342 \begin_inset Flex URL
14345 \begin_layout Plain Layout
14347 lyx-devel@lists.lyx.org
14357 , lots will probably never, due to the limitations of LyX's framework.
14358 Of course you can still use all features with the help of some native LaTeX
14363 \begin_layout Plain Layout
14368 \begin_layout Plain Layout
14378 \begin_inset space ~
14382 \begin_inset CommandInset ref
14384 reference "sec:Inserting-TeX-Code"
14394 In this section, we can only list those features which are natively supported
14396 For detailed descriptions (and for the rest of features) we are recommending
14397 to have a look at the detailed manual of the Memoir class
14401 \begin_layout Plain Layout
14406 \begin_layout Plain Layout
14416 \begin_inset Flex URL
14419 \begin_layout Plain Layout
14421 CTAN:/macros/latex/memoir/memman.pdf
14431 , which is not only a user guide for the class, but also both a comprehensive
14432 description on good typesetting and a superb example for good typesetting
14436 \begin_layout Subsection
14437 Basic features and restrictions
14440 \begin_layout Standard
14441 Memoir supports basically all features of the standard book classes.
14442 There are, however, some differences, as follows:
14445 \begin_layout Description
14447 \begin_inset space ~
14450 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14453 \begin_layout Description
14455 \begin_inset space ~
14458 style: The fancy page style is not supported, due to a command clash between
14459 Memoir and the fancyhdr package (they are both defining a command with
14460 the same name, which confuses LaTeX).
14461 Instead, Memoir comes with a bunch of own page styles (see
14463 Layout\SpecialChar \menuseparator
14464 Document\SpecialChar \menuseparator
14466 \begin_inset space ~
14472 If you want to use these for the chapter pages, you have to use the command
14479 in the main text or in preamble (e.
14480 \begin_inset space \thinspace{}
14484 \begin_inset space \space{}
14491 chapterstyle{companion}
14496 \begin_layout Description
14497 Sectioning: Sectionings (chapter, section, subsection etc.) are coming with
14498 an optional argument in the standard classes.
14499 With this, you can specify an alternative version of the title for the
14500 table of contents and the headers (for instance, if the title is too long).
14501 In LyX, you can do this via
14503 Insert\SpecialChar \menuseparator
14505 \begin_inset space ~
14510 at the beginning of a chapter/section.
14511 Memoir features a second optional argument and thus separates the table
14512 of contents from the header.
14513 You can define three variants of a title with this: one for the main text,
14514 one for the table of contents, and one for the headers.
14515 Simply insert two optional arguments if you need this feature, the first
14516 one containing the short title for the Table of Contents, the second one
14517 containing an alternative short title for the headers.
14520 \begin_layout Description
14521 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14522 of contents, the list of figures and the list of table start a new page
14524 Memoir does not follow this route.
14525 You have to insert a page break yourself, if you want to have one.
14528 \begin_layout Description
14529 Titlepage: For some unknown reason, Memoir uses pagination on the title
14530 page (in the standard classes, title pages are
14531 \begin_inset Quotes eld
14535 \begin_inset Quotes erd
14539 \begin_inset space \thinspace{}
14543 \begin_inset space \space{}
14547 If you want an empty title page, type
14551 aliaspagestyle{title}{empty}
14556 \begin_layout Description
14557 Article: With the class option
14563 Layout\SpecialChar \menuseparator
14564 Document\SpecialChar \menuseparator
14566 \begin_inset space ~
14571 ), you can emulate article style.
14572 That is, counters (footnotes, figures, tables etc.) will not be reset on
14573 new chapters, chapters don't start a new page (but are—in contrary to
14574 \begin_inset Quotes eld
14578 \begin_inset Quotes erd
14581 article classes—still allowed), parts, though, use their own page, as in
14585 \begin_layout Description
14586 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14587 font commands, which have been used in the old LaTeX version 2.09 (e.
14588 \begin_inset space \thinspace{}
14592 \begin_inset space \space{}
14608 It produces an error and stops LaTeX whenever such a command appears.
14613 reallows the commands and spits out warnings instead (which does at least
14615 Since a lot of packages and particularly BibTeX style files are still using
14616 those commands, we have decided to use this option by default.
14619 \begin_layout Subsection
14623 \begin_layout Standard
14624 We will only describe the features supported by LyX (which is not much currently
14626 Please consult the Memoir manual
14630 \begin_layout Plain Layout
14635 \begin_layout Plain Layout
14645 \begin_inset Flex URL
14648 \begin_layout Plain Layout
14650 CTAN:/macros/latex/memoir/memman.pdf
14663 \begin_layout Description
14664 Abstract: You may wonder why an abstract is an extra feature.
14665 Well, it is in book class.
14666 Usually books don't have abstracts.
14667 Memoir, however, has.
14668 You can use it wherever and how often you like.
14671 \begin_layout Description
14672 Chapterprecis: You may know this from belletristic: The contents of a chapter
14673 is shortly described below the title and also in the table of contents
14675 \begin_inset space \thinspace{}
14679 \begin_inset space \space{}
14684 Our hero arrives in Troia; he loses some friends; he finds others
14687 Chapterprecis does exactly this.
14688 It is therefore only sensible below a chapter.
14691 \begin_layout Description
14692 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14693 The epigraph environment provides an elegant way of typesetting such a
14695 The motto itself (text) and its author (source) are divided by a short
14697 Unfortunately, we have to fool LyX a bit here again, since the environment
14698 needs two arguments (text and source).
14699 In this case, we have to use curly brackets (in TeX mode) between the two
14710 <author of the slogan>.
14713 \begin_layout Description
14714 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14715 complex figurative poems).
14716 LyX can only support a few of them.
14717 One is poemtitle, which is a centered title for poems, which will also
14718 be added to the table of contents (verse is the standard environment for
14720 Memoir has some enhanced versions of verse, but you need to use TeX code,
14721 because they have to be nested inside regular verse environments, which
14722 is not possible with LyX).
14725 \begin_layout Description
14726 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14729 \begin_layout Section
14730 Article (mwart), book (mwbk) and report (mwrep)
14731 \begin_inset OptArg
14734 \begin_layout Plain Layout
14747 \begin_layout Standard
14753 \begin_layout Standard
14754 The LyX document classes
14770 correspond to the LaTeX document classes
14783 They are replacements for the standard document classes
14795 , resp., and fit better to Polish typography conventions in a number of points.
14799 \begin_layout Standard
14803 \begin_layout Itemize
14804 Unnumbered titles (with star, e.
14805 \begin_inset space \thinspace{}
14809 \begin_inset space \space{}
14816 ) are added into table of contents,
14819 \begin_layout Itemize
14820 Additional page styles:
14824 \begin_layout Description
14825 uheadings header with separated lines,
14828 \begin_layout Description
14829 myheadings custom header, contents headers via commands:
14844 \begin_layout Description
14845 myuheadings custom header with separated lines,
14848 \begin_layout Description
14849 outer page number is placed on outer side of page
14853 \begin_layout Itemize
14858 \begin_layout Description
14859 rmheadings serif titles — default,
14862 \begin_layout Description
14863 sfheadings sansserif titles,
14866 \begin_layout Description
14867 authortitle on title page first placed is author next title — default,
14870 \begin_layout Description
14871 titleauthor on title page first placed is title next author,
14874 \begin_layout Description
14875 withmarginpar reserve place on page for margins.
14879 \begin_layout Section
14883 \begin_layout Standard
14888 provides an alternative to the standard
14893 It provides similar functionality, but you might prefer this layout with
14894 sans serif sections, headings, and more.
14897 \begin_layout Section
14901 \begin_layout Standard
14907 \begin_layout Standard
14908 \begin_inset VSpace bigskip
14914 \begin_layout Standard
14919 \begin_inset space ~
14924 textclass works with the American Physical Sociey's RevTeX 4.0 (the
14925 \begin_inset Formula $\beta$
14928 release of May, 1999) class.
14931 \begin_layout Standard
14936 textclass, which works with RevTeX 3.1.
14937 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
14938 That means that it doesn't interact very well with LyX, which requires
14939 LaTeX2e, although it has been kludged to work.
14940 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
14944 \begin_inset space ~
14949 textclass should also be pretty easy to use.
14952 \begin_layout Standard
14953 These documents are supposed to be used in
14957 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
14958 macros, and assume you'll know what to put in the preamble if necessary.
14961 \begin_layout Subsection
14965 \begin_layout Standard
14966 All you need to do is install RevTeX 4, as described in the package's README
14968 The package can be found at The RevTeX 4 Web Site
14969 \begin_inset Flex URL
14972 \begin_layout Plain Layout
14974 http://publish.aps.org/revtex4/
14980 Install it somewhere that LaTeX can see it.
14981 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
14983 \begin_inset space \thinspace{}
14987 \begin_inset space \space{}
14990 not the directory where you installed the class file.) Then, if you reconfigure
14991 LyX, it will find the class file and let you use the RevTeX4 textclass.
14994 \begin_layout Standard
14995 Probably the easiest way to get started is either to import a RevTeX 4 document
15003 \begin_inset space ~
15008 template, found in the templates directory.
15011 \begin_layout Subsection
15015 \begin_layout Standard
15016 Optional arguments to
15023 \begin_inset Quotes eld
15027 \begin_inset Quotes erd
15031 \begin_inset Quotes eld
15035 \begin_inset Quotes erd
15045 \begin_inset space ~
15053 \begin_inset space ~
15059 Remember that in RevTeX, at least one optional argument is required!
15062 \begin_layout Standard
15063 Other preamble matter, like
15070 \begin_inset space ~
15076 \begin_inset space ~
15081 dialog, also as usual.
15084 \begin_layout Subsection
15088 \begin_layout Standard
15089 The layouts basically correspond to the commands in RevTeX4.0.
15090 For example, the Email layout corresponds to
15097 Note that (at least as of RevTeX 4.0 Beta), the
15105 layouts are exactly equivalent, so you shouldn't need to use both.
15109 \begin_layout Plain Layout
15110 In case you're curious, both were included so that
15114 would be able to translate both
15134 \begin_layout Subsection
15138 \begin_layout Standard
15139 There are a couple of important unique aspects of RevTeX 4 which might cause
15140 bugs that will be even more confusing in LyX.
15143 \begin_layout Standard
15161 The LyX equivalent is that there is a separate Thanks layout.
15166 write footnotes in the
15170 layout, or weird things may happen.
15171 See the RevTeX 4 documentation for more details.
15174 \begin_layout Standard
15178 \begin_inset space ~
15186 \begin_inset space ~
15195 layouts must be placed
15203 layout and the corresponding
15220 , the LaTeX won't compile.
15223 \begin_layout Subsection
15227 \begin_layout Standard
15228 The main problem with this layout is that you can't use the optional arguments
15229 to layouts like Email and Title.
15230 (The problem is not unique to this layout; you can't use optional arguments
15231 to the Section layouts either.) This means that after you export that file
15232 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15233 need to edit the LaTeX file with a text editor to add the optional arguments
15235 \begin_inset space \thinspace{}
15239 \begin_inset space \space{}
15242 the running title for the page headers.
15243 Lacking these layouts makes the
15249 (and the equivalent
15255 ) useless, so the corresponding layouts don't exist, and will have to be
15260 \begin_layout Plain Layout
15265 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15266 has not been updated yet to take advantage of it.
15274 \begin_layout Section
15275 Springer Journals (
15282 \begin_layout Standard
15288 \begin_layout Subsection
15292 \begin_layout Standard
15293 These are the layout files for some of the journal formats used by Springer
15294 Verlag and listed on
15295 \begin_inset Flex URL
15298 \begin_layout Plain Layout
15300 http://www.springer.de/author/tex/help-journals.html
15305 , where you should also go to fetch the class files (yes, these are LaTeX2e
15307 It is a modular system: the things common to all journals are implemented
15312 , which journal-specific layout files (such as, e.
15313 \begin_inset space \thinspace{}
15317 \begin_inset space \space{}
15324 for Journal of Geodesy) can include.
15327 \begin_layout Standard
15328 This means that implementing support for any other Springer journal on this
15329 list is as simple as writing your own
15337 file following the outline given in
15345 \begin_layout Standard
15346 It is reasonably well tested only for the Journal of Geodesy.
15355 come with the standard LyX distribution.
15356 Install the relevant class file (downloaded from Springer) in a proper
15357 directory, reconfigure LaTeX (in the teTeX case by running
15361 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15362 and it should work.
15365 \begin_layout Subsection
15369 \begin_layout Standard
15370 A large number of theorem-like styles —
15376 \SpecialChar \ldots{}
15382 \begin_layout Standard
15385 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15386 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15389 See the Springer class file documentation for details.
15392 \begin_layout Subsection
15396 \begin_layout Itemize
15408 \begin_layout Itemize
15411 Probability Theory and Related Fields
15417 — Jean-Marc Lasgouttes
15420 \begin_layout Standard
15421 Add your own, it isn't so hard!
15424 \begin_layout Subsection
15428 \begin_layout Standard
15429 These files are partly based on the older
15433 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15434 file from Springer.
15439 layout, are now defunct.
15440 Jean-Marc Lasgouttes helped out big in making me find my way around the
15441 LyX layout file mechanism.
15444 \begin_layout Subsection
15448 \begin_layout Standard
15450 But probably less than in the old hacked-LaTeX
15457 \begin_layout Standard
15459 \begin_inset space \thinspace{}
15462 g.: does not display the number for theorem-like layouts, just #.
15465 \begin_layout Section
15471 \begin_inset CommandInset label
15480 \begin_layout Standard
15488 \begin_layout Subsection
15492 \begin_layout Standard
15493 This section describes how to use LyX to make slides for overhead projectors.
15494 There are two document classes that can do this: the default slides class
15500 This section documents the former.
15503 \begin_layout Standard
15504 I'm going to say this again, nice and clear, so that there's no misunderstanding
15508 \begin_layout Standard
15509 \begin_inset VSpace bigskip
15515 \begin_layout Standard
15519 This section documents the class
15520 \begin_inset Quotes eld
15528 \begin_inset Quotes erd
15536 \begin_layout Standard
15537 \begin_inset VSpace bigskip
15543 \begin_layout Standard
15544 If you're looking for the documentation for
15545 \begin_inset Quotes eld
15553 \begin_inset Quotes erd
15556 , check out section
15557 \begin_inset space ~
15561 \begin_inset CommandInset ref
15563 reference "sec:foiltex"
15573 \begin_inset Quotes eld
15581 \begin_inset Quotes erd
15584 ] is actually somewhat better than the default
15592 \begin_layout Plain Layout
15593 \SpecialChar \ldots{}
15594 or so I've been told repeatedly by its advocates.
15595 Having never used it, I have no idea if this claim is true or not.
15600 which this section documents.
15603 \begin_layout Standard
15604 This class is the LaTeX2e improvement of the old
15609 Every LaTeX2e distribution includes this class [which I'll just refer to
15611 \begin_inset Quotes eld
15619 \begin_inset Quotes erd
15622 from now on], so you're bound to have it.
15623 As I noted earlier, there are other classes, such as
15627 , which also produce slides for overhead projectors and do a better job
15629 However, there are some things which
15633 can do which the others can't, such as generate overlays.
15634 Read on to learn more!
15637 \begin_layout Subsection
15639 \begin_inset CommandInset label
15641 name "sec:slidesetup"
15648 \begin_layout Standard
15649 Obviously, to use this document class, you need to select
15650 \begin_inset Quotes eld
15658 \begin_inset Quotes erd
15661 from the class list in the
15663 Document\SpecialChar \menuseparator
15667 There are some other special things you should know about this class:
15670 \begin_layout Itemize
15671 Don't bother changing the options
15676 They're not supported by the
15683 \begin_layout Itemize
15687 \begin_inset space ~
15692 behaves a bit differently for this class.
15693 The possible choices and what they do are as follows:
15697 \begin_layout Description
15702 The final output contains page numbers in the lower right corner.
15705 \begin_layout Description
15714 , but also prints out any time markers you've put in.
15715 This is the default.
15718 \begin_layout Description
15723 The final output contains no page numbers, time markers, or alignment markers.
15727 \begin_layout Itemize
15732 class has an extra option:
15738 \begin_inset Quotes eld
15746 \begin_inset Quotes erd
15749 in the extra class options.
15753 \begin_layout Standard
15754 Using this options allows you to add time markers to
15760 \begin_inset space ~
15764 \begin_inset CommandInset ref
15766 reference "sec:slideNote"
15774 \begin_layout Standard
15775 You can also use the template file
15776 \begin_inset Quotes eld
15784 \begin_inset Quotes erd
15787 to automatically set up a document to use the
15793 File\SpecialChar \menuseparator
15795 \begin_inset space ~
15799 \begin_inset space ~
15804 to open your new document].
15805 The template file also contains some examples of the special paragraph
15806 environments used by this class.
15807 I'll describe those next.
15810 \begin_layout Subsection
15811 Paragraph Environments
15814 \begin_layout Subsubsection
15815 Supported Environments
15818 \begin_layout Standard
15819 The first thing you'll notice when you start up a new
15823 document is the font size and type: it's the equivalent of the size
15824 \begin_inset Quotes eld
15832 \begin_inset Quotes erd
15838 \begin_inset space ~
15844 This is also what's used in the output.
15846 \begin_inset Quotes eld
15850 \begin_inset Quotes erd
15853 to remind you that this is a slide.
15854 Your final slides will use a larger font; ergo, you'll have less space.
15855 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
15858 \begin_layout Standard
15859 The next thing that becomes obvious is the changes to the paragraph environment
15860 pull-down box [at the far-left end of the toolbar].
15861 Most of the paragraph environments you're used to seeing are missing.
15862 There are also five new ones.
15867 class itself only supports certain paragraph environments:
15870 \begin_layout Itemize
15876 \begin_layout Itemize
15882 \begin_layout Itemize
15888 \begin_layout Itemize
15894 \begin_layout Itemize
15900 \begin_layout Itemize
15906 \begin_layout Itemize
15912 \begin_layout Itemize
15918 \begin_layout Itemize
15924 \begin_layout Itemize
15930 \begin_layout Itemize
15936 \begin_layout Standard
15937 All of the other standard environments, including the section-heading environmen
15938 ts, aren't used in the
15945 \begin_layout Standard
15946 On the other hand, you'll notice the following new environments:
15949 \begin_layout Itemize
15955 \begin_layout Itemize
15961 \begin_layout Itemize
15967 \begin_layout Itemize
15973 \begin_layout Itemize
15979 \begin_layout Standard
15980 These five are kind of quirky, due to a
15981 \begin_inset Quotes eld
15985 \begin_inset Quotes erd
15989 You see, LyX doesn't permit you to nest any other paragraph environment
15990 into an empty environment.
15991 Now, that's fine and dandy, but it means that you wouldn't be able to start
15992 a slide with anything except plain text.
15993 To deal with this, I've performed a little
15994 \begin_inset Quotes eld
15998 \begin_inset Quotes erd
16004 \begin_layout Subsubsection
16005 Quirks of the New Environments
16006 \begin_inset CommandInset label
16008 name "sec:slideQuirk"
16015 \begin_layout Standard
16016 All five of the new paragraph environments are somewhat quirky due to inherent
16017 limitiations in the current version of LyX.
16018 As I just mentioned, LyX forbids environments that begin with another environme
16020 To get around this, the
16024 environment isn't a paragraph environment as described in the
16032 \begin_layout Standard
16033 You should consider
16046 \begin_inset Quotes eld
16049 pseudo-environments.
16050 \begin_inset Quotes erd
16053 They look like a section heading or a
16054 \begin_inset Quotes eld
16062 \begin_inset Quotes erd
16065 but really begin a [and, if necessary, end the previous] paragraph environment.
16075 \begin_inset Quotes eld
16079 \begin_inset Quotes erd
16082 These two perform some action.
16085 \begin_layout Standard
16086 A common feature of all five environments,
16106 , is a rather long-ish label.
16107 The text following this label — ordinarily the contents of the paragraph
16108 environment — is utterly irrelevant for
16129 LyX completely ignores it.
16130 In fact, you can leave these five environments completely empty.
16134 \begin_layout Standard
16139 to put any text after the rather long-ish label, you might want to.
16140 This could be a short description of the contents of the
16145 In that case, enter in your descriptive comment and hit
16149 as you normally would.
16152 \begin_layout Standard
16153 If, on the other hand, you don't want to enter in any descriptive text,
16154 you'll hit another LyX quirk.
16155 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16156 environment until you put something in the old one.
16160 \begin_layout Itemize
16161 Start entering the text that will
16189 \begin_layout Itemize
16190 Now move to the beginning of that paragraph.
16194 \begin_layout Itemize
16203 \begin_layout Itemize
16204 Finally, change this new, empty paragraph to a
16228 \begin_layout Standard
16229 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16233 \begin_layout Subsection
16234 Making a Presentation with
16247 \begin_layout Subsubsection
16255 \begin_layout Standard
16256 If you're expecting this section to teach you how to actually make a presentatio
16257 n, you'll be sorely disappointed.
16258 Naturally, I'll describe all of the ways the
16262 class can assist you in preparing the materials for a presentation.
16263 Filling in the contents, however, is up to you.
16268 the LyX philosophy.]
16271 \begin_layout Standard
16276 environment [in the manner described in section
16277 \begin_inset space ~
16281 \begin_inset CommandInset ref
16283 reference "sec:slideQuirk"
16287 ] tells LyX to begin a new slide [duh].
16288 The label for this environment/
16289 \begin_inset Quotes erd
16293 \begin_inset Quotes erd
16297 \begin_inset Quotes eld
16301 \begin_inset Quotes erd
16304 in cool blue, followed by the label,
16305 \begin_inset Quotes eld
16309 \begin_inset Quotes erd
16313 Any text or paragraph environments that follow this one go on the new slide.
16317 \begin_layout Standard
16318 Slides are probably the only time you'll need to forcibly end pages in LyX
16319 (this can be specified in the
16324 In fact, you'll want to, once you finish entering the contents of one slide.
16325 If you've entered more text than can physically fit on a slide, the extra
16326 overflows onto a new slide.
16327 I don't recommend doing this, however, since the overflow slide won't have
16328 any page number on it.
16329 Furthermore, it may interfere with any
16333 you've made to accompany the oversized
16340 \begin_layout Standard
16349 environments work the same way as the
16354 They both create an
16355 \begin_inset Quotes eld
16359 \begin_inset Quotes erd
16362 followed by a label [
16363 \begin_inset Quotes eld
16367 \begin_inset Quotes erd
16371 \begin_inset Quotes eld
16375 \begin_inset Quotes erd
16379 The color is a stunning magenta instead of blue, and the
16380 \begin_inset Quotes eld
16384 \begin_inset Quotes erd
16387 will look different, in style and in length.
16388 The label fonts of all three also differ from one another.
16391 \begin_layout Standard
16396 , if the contents of a
16404 exceed the physical size of a slide or sheet of paper, the extra will overflow
16406 Again, you should avoid this.
16407 It defeats the whole purpose of
16418 \begin_layout Subsubsection
16428 \begin_layout Standard
16433 is a slide that sits atop another slide.
16434 Perhaps you wish to discuss a figure on the main
16438 before displaying the text associated with it.
16439 One way to accomplish this is tape a flap of dark paper over the part of
16444 you want to display later.
16445 This method fails, however, if you wish to overlap one graph with another,
16447 You would then have to fumble while speaking to align the two separate,
16452 s to align the two graphs.
16457 environment in both cases makes life much easier.
16460 \begin_layout Standard
16465 receives the page number of its
16466 \begin_inset Quotes eld
16470 \begin_inset Quotes erd
16478 \begin_inset Quotes eld
16486 \begin_inset Quotes erd
16493 \begin_layout Plain Layout
16494 Presumably, mutliple
16499 \begin_inset Quotes eld
16507 \begin_inset Quotes erd
16511 \begin_inset Quotes eld
16519 \begin_inset Quotes erd
16523 \begin_inset Quotes eld
16531 \begin_inset Quotes erd
16535 \begin_inset space ~
16538 appended to the page number of the parent
16548 Clearly, you want the contents of both the
16556 to each fit on a single physical slide! You should probably consider an
16562 \begin_inset Quotes eld
16566 \begin_inset Quotes erd
16578 class provides a visual cue for this: the label at the start of an
16582 is shorter than that at the start of a
16587 Lastly, when you generate printable output, you'll find alignment markers
16588 in all four corners of both the
16592 page and its parent
16597 These will assist you in lining up the two physical slides.
16600 \begin_layout Standard
16601 The major problem in overlaying two slides is aligning the contents of the
16602 two transparencies.
16603 How much space should you leave for that graph on the second slide? Worse
16604 still, what if you want a graph and a sentence on second slide, but there
16605 is text on the main transparency that goes in between them? You could try
16606 and insert vertical space of the right size.
16607 The better way is to use
16618 \begin_layout Standard
16619 As their names imply,
16627 are two command-like paragraph environments that make all subsequent text
16628 invisible and visible, respectively.
16630 \begin_inset space ~
16634 \begin_inset CommandInset ref
16636 reference "sec:slideQuirk"
16640 that you don't place anything
16644 these two environments, however.
16649 , it inserts a centered, sky-blue label into the page reading
16650 \begin_inset Quotes eld
16653 <Invisible Text Follows>
16654 \begin_inset Quotes erd
16658 For paragraphs following this label, the parts of the
16666 ; it doesn't matter which] where they would be contain instead blank space.
16670 \begin_layout Standard
16675 , the corresponding centered label is
16676 \begin_inset Quotes eld
16679 <Visible Text Follows>
16680 \begin_inset Quotes erd
16684 Paragraphs following this label behave normally.
16685 Note that the beginning of a new
16697 automatically shuts off an
16702 It's therefore not necessary to use
16713 \begin_layout Standard
16714 By now, it should be obvious how to create overlay transparencies using
16715 the proper combination of
16734 \begin_layout Enumerate
16739 , including everything that will appear on it, whether on the main slide
16747 \begin_layout Enumerate
16748 Before each figure or paragraph that will appear only on the
16757 If necessary, insert a
16761 environment after the
16768 \begin_layout Enumerate
16773 immediately following the
16780 \begin_layout Enumerate
16781 Copy the contents of this
16792 \begin_layout Enumerate
16797 , change all of the
16808 \begin_layout Standard
16810 You've just made an
16817 \begin_layout Standard
16818 There's one problem with the way I've designed the LyX
16822 class: you can't make text in the middle of a paragraph invisible, nor
16823 make text in the middle of an invisible paragraph visible again.
16824 To accomplish this feat, you'll need to use some inlined LaTeX codes.
16828 \begin_layout Plain Layout
16829 The commands of interest are:
16832 \begin_layout Itemize
16837 invisible \SpecialChar \ldots{}
16841 \begin_layout Itemize
16846 visible \SpecialChar \ldots{}
16850 \begin_layout Plain Layout
16851 \SpecialChar \ldots{}
16852 and need to be marked as TeX.
16854 \begin_inset Quotes eld
16858 \begin_inset Quotes erd
16861 you wish to change goes in between the brackets [and after the
16874 If you don't know how to mark text as TeX, see the appropriate section
16887 \begin_layout Subsubsection
16897 \begin_inset CommandInset label
16899 name "sec:slideNote"
16906 \begin_layout Standard
16915 is associated with a
16916 \begin_inset Quotes eld
16920 \begin_inset Quotes erd
16932 class provides visual cues.
16937 is shorter than that of a
16941 [yet longer than that of an
16945 ] and, like the label of an
16949 is shockingly magenta.
16950 Additionally, the printed
16954 has the page number of its
16955 \begin_inset Quotes eld
16959 \begin_inset Quotes erd
16967 \begin_inset Quotes eld
16975 \begin_inset Quotes erd
16979 \begin_inset Quotes eld
16987 \begin_inset Quotes erd
16991 \begin_inset Quotes eld
16999 \begin_inset Quotes erd
17003 You can have multiple
17007 s associated with a single
17019 , you'll probably want to break up long
17023 s so that they fit on a single sheet of paper.
17026 \begin_layout Standard
17031 is obvious: it contains anything additional you might want to say about
17037 It could also be used as a sheet of reminders for a particular
17042 In the case of the latter, you might want to make use of time markers.
17048 \begin_inset Quotes eld
17052 \begin_inset Quotes erd
17055 support for time markers, a
17060 So, you'll have to resort to using the LaTeX codes.
17063 \begin_layout Standard
17064 To use time markers, you'll need to specify the extra class option
17065 \begin_inset Quotes eld
17073 \begin_inset Quotes erd
17077 \begin_inset space ~
17081 \begin_inset CommandInset ref
17083 reference "sec:slidesetup"
17088 This option turns on timing marks, which will appear in the lower-left-hand
17094 To set what appears in the time marker, you use the LaTeX commands
17095 \begin_inset Quotes eld
17105 \begin_inset Quotes erd
17109 \begin_inset Quotes eld
17119 \begin_inset Quotes erd
17123 The arguments of both commands are time measured in seconds.
17125 \begin_inset Quotes eld
17135 \begin_inset Quotes erd
17138 sets the time marker to a given time.
17140 \begin_inset Quotes eld
17150 \begin_inset Quotes erd
17153 increments the time marker by the specified amount.
17154 Using time markers and
17158 s in this fashion, you can remind yourself how much time to spend on a particula
17166 \begin_layout Standard
17167 There's one last feature to describe.
17168 Clearly, you'd like to print out all of your
17176 s on transparencies while printing all of your
17193 with which it is associated.
17194 What's a person to do?
17197 \begin_layout Standard
17198 Luckily, there are two LaTeX commands that allow you to select what to print
17200 Both must be placed into the preamble of your document.
17202 \begin_inset Quotes eld
17214 \begin_inset Quotes erd
17217 will cause the output to contain only the
17226 Correspondingly, the command
17227 \begin_inset Quotes eld
17239 \begin_inset Quotes erd
17242 prevents the output of anything but
17247 I'd advise placing both commands in the preamble and initially comment
17249 You can then preview your entire presentation as you write.
17250 When you're done writing, you can then uncomment one of the two to select
17251 what you want to print.
17252 I like to uncomment
17253 \begin_inset Quotes eld
17265 \begin_inset Quotes erd
17268 , print to a file with
17269 \begin_inset Quotes eld
17277 \begin_inset Quotes erd
17280 in its name, comment it back out, then uncomment
17281 \begin_inset Quotes eld
17293 \begin_inset Quotes erd
17297 \begin_inset Quotes eld
17305 \begin_inset Quotes erd
17309 I can then send either file to a printer, loading transparencies or plain
17310 paper as appropriate.
17313 \begin_layout Standard
17314 You can also provide other arguments to the
17315 \begin_inset Quotes eld
17325 \begin_inset Quotes erd
17329 \begin_inset Quotes eld
17339 \begin_inset Quotes erd
17343 See a good LaTeX book for details.
17346 \begin_layout Subsection
17351 Class Template File
17354 \begin_layout Standard
17355 I have also provided a template file,
17356 \begin_inset Quotes eld
17364 \begin_inset Quotes erd
17372 To use it, begin your new presentation with
17377 ile\SpecialChar \menuseparator
17379 \begin_inset space ~
17383 \begin_inset space ~
17393 Your new LyX presentation file will contain an example
17414 additionally contain an example of the use of
17423 Lastly, the preamble will contain:
17426 \begin_layout LyX-Code
17427 % Uncomment to print out only slides and overlays
17430 \begin_layout LyX-Code
17434 \begin_layout LyX-Code
17440 \begin_inset Newline newline
17446 \begin_layout LyX-Code
17447 % Uncomment to print out only notes
17450 \begin_layout LyX-Code
17454 \begin_layout LyX-Code
17462 \begin_layout Standard
17463 One final thing: I created this class to support the LaTeX2e
17464 \begin_inset Quotes eld
17472 \begin_inset Quotes erd
17475 class, one of the built-in LaTeX2e classes.
17476 Neither I nor the rest of the LyX Team endorse or oppose the use of this
17477 built-in slide class.
17478 It's here if you want it or need it.
17479 There exist other LaTeX2e classes for creating presentations, such as the
17485 \begin_inset space ~
17489 \begin_inset CommandInset ref
17491 reference "sec:foiltex"
17496 \begin_inset Quotes eld
17504 \begin_inset Quotes erd
17507 package [present on some TeX distributions].
17508 The latter is not yet supported under LyX.
17512 \begin_layout Plain Layout
17513 Perhaps you can take on the task\SpecialChar \ldots{}
17519 I know nothing about these other classes.
17520 Try them out to see what sort of alternative they provide.
17523 \begin_layout Chapter
17524 LyX Features needing Extra Software
17527 \begin_layout Section
17531 \begin_layout Standard
17537 \begin_layout Subsection
17541 \begin_layout Standard
17550 \begin_layout Plain Layout
17555 is not yet available when you are using the LaTeX distribution MiKTeX.
17560 , you'll find in the
17567 \begin_inset space ~
17578 \begin_inset CommandInset href
17580 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17587 \begin_layout Standard
17592 package is a program that was written by
17593 \begin_inset Flex CharStyle:Noun
17596 \begin_layout Plain Layout
17598 \begin_inset space ~
17606 in frustration because some constructs in LaTeX are sometimes non-intuitive,
17607 and easy to forget.
17608 The program runs over your LaTeX file, checks the integrity of the file,
17609 and flags some common errors.
17610 In other technical words, it is
17617 \begin_layout Standard
17618 Well, what is a syntax checker doing in LyX which is supposed to produce
17619 correct LaTeX anyways? The answer is simple: Just as
17623 not only checks the
17627 of C programs, but also does
17631 checks for type-errors,
17635 catches some common
17639 errors, in addition to the syntactical ones.
17644 is capable of detecting several common errors, such as
17647 \begin_layout Itemize
17648 Ellipsis detection:
17649 \begin_inset Newline newline
17652 Use \SpecialChar \ldots{}
17656 \begin_layout Itemize
17657 No space in front of/after parenthesis:
17658 \begin_inset Newline newline
17664 \begin_layout Itemize
17665 Enforcement of normal space after common abbreviations:
17666 \begin_inset Newline newline
17670 \begin_inset space \thinspace{}
17674 \begin_inset space \space{}
17677 is too wide spacing.
17680 \begin_layout Itemize
17681 Enforcement of end-of-sentence space when the last sentence ends with a
17683 \begin_inset Newline newline
17687 And this is wrong spacing.
17690 \begin_layout Itemize
17691 Space in front of labels and similar commands:
17692 \begin_inset Newline newline
17695 The label should stick right up to the text to avoid falling to a wrong
17698 \begin_inset CommandInset label
17708 \begin_layout Plain Layout
17709 This footnote is in danger of falling off to a wrong page
17714 The label is separated too much.
17717 \begin_layout Itemize
17718 Space in front of references, instead of hard spaces:
17719 \begin_inset Newline newline
17722 In you are in bad luck, the text will break right between the referenced
17723 text and reference number, and that's a pity.
17725 \begin_inset CommandInset ref
17727 reference "sec:chktex"
17734 \begin_layout Itemize
17736 \begin_inset Quotes eld
17740 \begin_inset Quotes erd
17744 \begin_inset Formula $\times$
17748 \begin_inset Newline newline
17751 2x2 looks cheap compared to
17752 \begin_inset Formula $2\times2$
17758 \begin_layout Standard
17759 and more \SpecialChar \ldots{}
17760 It is an invaluable tool when you are
17761 \begin_inset Quotes eld
17765 \begin_inset Quotes erd
17768 your document before printing, and you should run it right after the obligatory
17769 spelling check, and before you go fine tuning the typesetting.
17772 \begin_layout Subsection
17776 \begin_layout Standard
17777 If you have the program installed, usage is as simple as choosing
17779 Tools\SpecialChar \menuseparator
17781 \begin_inset space ~
17787 This will make LyX generate a LaTeX file of your document, start
17791 to check it, and then make LyX insert
17792 \begin_inset Quotes eld
17796 \begin_inset Quotes erd
17799 with the warnings from
17803 , if there were any.
17804 The warnings will be placed close to the point of the mistake, and you
17805 can quickly find them by using the
17807 Navigate\SpecialChar \menuseparator
17810 menu item, or the shortcut key
17819 Open the error boxes by clicking on them with the mouse, or use the shortcut
17828 bindings, or the corresponding
17837 Read the warning and correct the mistake, if it is a mistake.
17838 If you have trouble understanding what the warning is about, you can safely
17840 Remember that there is a hidden layer between the document on screen and
17841 the technical details in invoking
17845 , and this gap can make some warnings seem arcane or just right down plain
17849 \begin_layout Standard
17850 This document is an excellent testing bed for the feature, and it should
17851 provide quite a few warnings for you to fiddle with.
17852 Since computers are only so smart, expect most of the warnings to be false
17856 \begin_layout Subsection
17857 How to fine tune it
17860 \begin_layout Standard
17861 Sometimes, you'll find that
17865 makes more noise than suits your mood.
17866 Then you can choose not to use it, wait until your mood changes, or try
17871 to get better along with you.
17872 Another choice in the most desperate situations is to use
17874 View\SpecialChar \menuseparator
17876 \begin_inset space ~
17880 \begin_inset space ~
17884 \begin_inset space ~
17889 , which will get rid of all warnings instantly.
17892 \begin_layout Standard
17901 very configurable and extensible, you shouldn't expect to solve all problems
17907 Since LyX has to generate a somewhat special LaTeX file to be able to match
17908 the line numbers from the
17916 \begin_layout Plain Layout
17917 You can inspect the specific output from
17923 Edit\SpecialChar \menuseparator
17925 \begin_inset space ~
17929 \begin_inset space ~
17943 to the internal document structure, some of the warnings will not seen
17944 to appear correctly.
17945 There are two things you can do about this:
17948 \begin_layout Itemize
17953 invocation command line in
17969 installation configuration file (usually with the file
17974 See below to learn what warnings can be enabled and disabled on the command
17979 \begin_layout Itemize
17980 Export your document as a raw LaTeX file using
17982 File\SpecialChar \menuseparator
17983 Export\SpecialChar \menuseparator
17991 Invoked in this way, it can be a hassle to find the corresponding place
17992 in the document inside LyX, but with a little patience, you should be able
17996 \begin_layout Standard
17997 Here follows the warning messages that can be enabled and disabled in
18006 to disable a warning, and
18010 to enable a warning.
18011 The emphasized entries are disabled by default, because the default is
18014 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18019 \begin_layout Standard
18020 Notice that you should only use the options that enable and disable warnings,
18021 because LyX relies on some of the other command line parameters to be set
18022 in a specific way to have a chance to communicate with
18029 \begin_layout Enumerate
18033 Command terminated with space.
18036 \begin_layout Enumerate
18039 Non-breaking space (
18040 \begin_inset Quotes eld
18048 \begin_inset Quotes erd
18051 ) should have been used.
18054 \begin_layout Enumerate
18058 You should enclose the previous parenthesis with
18059 \begin_inset Quotes eld
18067 \begin_inset Quotes erd
18073 \begin_layout Enumerate
18076 Italic correction (
18077 \begin_inset Quotes eld
18087 \begin_inset Quotes erd
18090 ) found in non-italic buffer.
18093 \begin_layout Enumerate
18096 Italic correction (
18097 \begin_inset Quotes eld
18107 \begin_inset Quotes erd
18110 ) found more than once.
18113 \begin_layout Enumerate
18117 No italic correction (
18118 \begin_inset Quotes eld
18128 \begin_inset Quotes erd
18134 \begin_layout Enumerate
18138 \begin_inset Quotes eld
18146 \begin_inset Quotes erd
18150 \begin_inset Quotes eld
18158 \begin_inset Quotes erd
18164 \begin_layout Enumerate
18167 Wrong length of dash may have been used.
18170 \begin_layout Enumerate
18174 \begin_inset Quotes eld
18182 \begin_inset Quotes erd
18186 \begin_inset Quotes eld
18194 \begin_inset Quotes erd
18200 \begin_layout Enumerate
18204 \begin_inset Quotes eld
18212 \begin_inset Quotes erd
18218 \begin_layout Enumerate
18222 \begin_inset Quotes eld
18230 \begin_inset Quotes erd
18233 to achieve an ellipsis.
18236 \begin_layout Enumerate
18239 Inter-word spacing (
18240 \begin_inset Quotes eld
18250 \begin_inset Quotes eld
18253 ) should perhaps be used.
18256 \begin_layout Enumerate
18259 Inter-sentence spacing (
18260 \begin_inset Quotes eld
18270 \begin_inset Quotes erd
18273 ) should perhaps be used.
18276 \begin_layout Enumerate
18279 Could not find argument for command.
18282 \begin_layout Enumerate
18286 \begin_inset Quotes eld
18294 \begin_inset Quotes erd
18300 \begin_layout Enumerate
18303 Math mode still on at end of LaTeX file.
18306 \begin_layout Enumerate
18310 \begin_inset Quotes eld
18318 \begin_inset Quotes erd
18321 doesn't match the number of
18322 \begin_inset Quotes eld
18330 \begin_inset Quotes erd
18336 \begin_layout Enumerate
18339 You should use either
18342 \begin_inset Quotes eld
18350 \begin_inset Quotes erd
18355 as an alternative to
18356 \begin_inset Quotes eld
18364 \begin_inset Quotes erd
18370 \begin_layout Enumerate
18377 " (ASCII 39) instead of "
18384 \begin_layout Enumerate
18387 User-specified pattern found.
18390 \begin_layout Enumerate
18393 This command might not be intended.
18396 \begin_layout Enumerate
18403 \begin_layout Enumerate
18421 \begin_layout Enumerate
18424 Delete this space to maintain correct page references.
18427 \begin_layout Enumerate
18431 You might wish to put this between a pair of
18432 \begin_inset Quotes eld
18440 \begin_inset Quotes erd
18446 \begin_layout Enumerate
18449 You ought to remove spaces in front of punctuation.
18452 \begin_layout Enumerate
18455 Could not execute LaTeX command.
18458 \begin_layout Enumerate
18467 in front of small punctuation.
18470 \begin_layout Enumerate
18478 may look prettier here.
18481 \begin_layout Enumerate
18485 Multiple spaces detected in output.
18488 \begin_layout Enumerate
18491 This text may be ignored.
18494 \begin_layout Enumerate
18500 \begin_inset Quotes eld
18505 to begin quotation, not
18512 \begin_layout Enumerate
18519 to end quotation, not
18522 \begin_inset Quotes eld
18530 \begin_layout Enumerate
18536 \begin_layout Enumerate
18539 You should perhaps use
18540 \begin_inset Quotes eld
18548 \begin_inset Quotes erd
18554 \begin_layout Enumerate
18557 You should put a space in front of/after parenthesis.
18560 \begin_layout Enumerate
18563 You should avoid spaces in front of/after parenthesis.
18566 \begin_layout Enumerate
18570 You should not use punctuation in front of/after quotes.
18573 \begin_layout Enumerate
18576 Double space found.
18579 \begin_layout Enumerate
18582 You should put punctuation outside inner/inside display math mode.
18585 \begin_layout Enumerate
18588 You ought to not use primitive TeX in LaTeX code.
18591 \begin_layout Enumerate
18594 You should remove spaces in front of
18595 \begin_inset Quotes eld
18603 \begin_inset Quotes erd
18609 \begin_layout Enumerate
18612 \begin_inset Quotes eld
18620 \begin_inset Quotes erd
18623 is normally not followed by
18624 \begin_inset Quotes eld
18632 \begin_inset Quotes erd
18638 \begin_layout Standard
18639 In later versions of LyX, we hope to provide a more complete interface to
18640 this tool (and it's smaller cousin
18644 ) to exploit the full power of it.
18645 But it's not exactly useless as it is now: go try it on one of your existing
18646 documents of a certain length and be surprised.
18649 \begin_layout Section
18650 Version Control in LyX
18653 \begin_layout Standard
18656 Lars Gullik Bjønnes
18663 \begin_layout Subsection
18667 \begin_layout Standard
18668 A friend of mine wanted to try LyX for a group project.
18669 When he didn't find support for version control or file locking, he dropped
18671 This angered me a bit, so I thought that I should at least make support
18672 for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
18673 This has now been done.
18674 LyX now supports some of the most basic RCS commands.
18675 If you need to something a bit more sophisticated you will have to do that
18676 manually in a terminal.
18679 \begin_layout Standard
18680 Before you begin to use the version control features in LyX, you should
18682 \begin_inset Quotes eld
18686 \begin_inset Quotes erd
18689 (a man file, read it with
18694 This file describes all the basic features of RCS.
18695 You should especially notice the comment about a RCS directory, and the
18696 notion of a master RCS file (the file ending in
18703 \begin_layout Standard
18704 Later basic CVS/SVN support was added.
18705 You should be familiar with CVS/SVN usage before start using it under LyX.
18706 Most of the log messages are not currently displayed after operations -
18707 you can check them in Messages pane if unsure.
18710 \begin_layout Standard
18711 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18712 package—no guarantees are made for older versions.
18715 \begin_layout Standard
18716 For introducing your own external commands consult vc-command in the manual
18720 \begin_layout Subsection
18721 RCS commands in LyX
18724 \begin_layout Standard
18725 The following sections describe the RCS commands supported by LyX.
18726 You can find them in the
18728 File\SpecialChar \menuseparator
18730 \begin_inset space ~
18736 LyX was tested against RCS 5.7.
18739 \begin_layout Subsubsection
18745 \begin_layout Standard
18746 If your document is not under revision control, this is the only item shown
18748 And if it is under revision control, the
18752 item is not visible.
18756 \begin_layout Standard
18757 This command registers your document with RCS (unless you are under the
18758 directory managed by CVS)\SpecialChar \@.
18759 You are asked interactively to supply an initial
18760 description of the document.
18761 The document is now set in Read-Only mode and you have to
18764 \begin_inset space ~
18768 \begin_inset space ~
18772 \begin_inset space ~
18777 , before making any changes to it.
18778 A document under revision control has a
18779 \begin_inset Quotes eld
18782 [RCS:<version> <locker>]
18783 \begin_inset Quotes erd
18786 item tagged to the filename in the minibuffer.
18789 \begin_layout Standard
18790 RCS command that is run:
18792 ci -q -u -i -t-"<initial description>" <file-name>
18795 \begin_layout Standard
18800 to understand the switches.
18804 \begin_layout Subsubsection
18810 \begin_layout Standard
18811 When you are finished editing a file, you check in your changes.
18812 When you do this, you are asked for a description of the changes.
18813 This is stored in the history log.
18814 The version number is bumped, your changes are applied to the master RCS
18815 file, the document is unlocked and set to Read-Only mode.
18819 \begin_layout Standard
18822 ci -q -u -m"<description>" <file-name>
18825 \begin_layout Subsubsection
18831 \begin_layout Standard
18832 By doing this you lock the document so that only you can edit it.
18833 This will also make the document Read-Write only for you.
18834 You will usually continue editing for a while and when you are finished
18835 you check in your changes.
18836 The status line is changed to reflect that you have locked the file.
18840 \begin_layout Standard
18843 co -q -l <file-name>
18846 \begin_layout Subsubsection
18849 Revert To Repository Version
18852 \begin_layout Standard
18853 This will discard all changes made to the document since the last check
18855 You get a warning before changes are discarded.
18858 \begin_layout Standard
18861 co -f -u<version> <file-name>
18864 \begin_layout Subsubsection
18870 \begin_layout Standard
18871 This makes as if the last check in never happened.
18872 No changes are made to the document loaded into LyX, but the last version
18873 is removed from the master RCS file.
18877 \begin_layout Standard
18880 rcs -o<version> <file-name>
18883 \begin_layout Subsubsection
18889 \begin_layout Standard
18890 This show the complete history of the RCS document.
18895 is shown in a browser.
18903 \begin_layout Subsubsection
18907 \begin_layout Standard
18908 LyX supports RCS version number information (only), see
18909 \begin_inset CommandInset ref
18911 reference "sub:VCS-Revision-Information"
18918 \begin_layout Subsection
18919 CVS commands in LyX
18922 \begin_layout Standard
18923 CVS is now partially supported by LyX.
18924 You can find the commands in the
18926 File\SpecialChar \menuseparator
18928 \begin_inset space ~
18934 Focus of the development moved to SVN support, so please use it instead
18935 of CVS if possible.
18938 \begin_layout Subsubsection
18944 \begin_layout Standard
18945 If your document is not under revision control, this is the only item shown
18947 And if it is under revision control, the
18954 item is not visible.
18958 \begin_layout Standard
18959 This command registers in CVS your document ONLY in case you have already
18960 the documents directory under CVS control (in particular
18965 This means you have to checkout the archive by yourself.
18969 \begin_layout Standard
18970 Then you are asked interactively to supply an initial description of the
18972 Don't forget that registered file is not yet commited.
18975 \begin_layout Standard
18976 CVS command that is run:
18979 \begin_inset Quotes erd
18983 \begin_inset Quotes eld
18987 \begin_inset Quotes erd
18993 \begin_layout Standard
18998 to understand the switches.
19002 \begin_layout Subsubsection
19008 \begin_layout Standard
19009 When you are finished editing a file, you commit your changes.
19010 When you do this, you are asked for a description of the changes.
19011 After that changes are commited.
19014 \begin_layout Standard
19017 cvs -q commit -m"<description>" "<file-name>"
19020 \begin_layout Subsubsection
19023 Revert To Repository Version
19026 \begin_layout Standard
19027 This will discard all changes made to the document since the last check
19029 You get a warning before changes are discarded.
19030 Firstly the file is deleted, secondly CVS update command is run.
19033 \begin_layout Standard
19037 \begin_inset Quotes eld
19041 \begin_inset Quotes erd
19047 \begin_layout Subsubsection
19053 \begin_layout Standard
19054 This show the complete history of the CVS document.
19058 \begin_inset Quotes eld
19062 \begin_inset Quotes erd
19067 is shown in a browser.
19070 \begin_layout Subsection
19071 SVN commands in LyX
19074 \begin_layout Standard
19075 SVN is now partially supported by LyX.
19076 You can find the commands in the
19078 File\SpecialChar \menuseparator
19080 \begin_inset space ~
19086 Please note that if you use password protected access to repository via
19087 ssh, you will be asked in terminal window.
19088 LyX was tested against SVN 1.5 and 1.6
19092 \begin_layout Plain Layout
19093 Most of the commands will work with 1.4 too, see
19094 \begin_inset CommandInset ref
19096 reference "sub:SVN-Repo-Update"
19108 \begin_layout Subsubsection
19114 \begin_layout Standard
19115 If your document is not under revision control, this is the only item shown
19117 And if it is under revision control, the
19124 item is not visible.
19128 \begin_layout Standard
19129 This command registers in SVN your document ONLY in case you have already
19130 the documents directory under SVN control (in particular
19135 This means you have to checkout the archive by yourself.
19139 \begin_layout Standard
19140 Then you are asked interactively to supply an initial description of the
19142 Don't forget that registered file is not yet commited.
19145 \begin_layout Standard
19146 SVN command that is run:
19149 \begin_inset Quotes eld
19153 \begin_inset Quotes erd
19159 \begin_layout Standard
19164 to understand the switches.
19168 \begin_layout Subsubsection
19174 \begin_layout Standard
19175 When you are finished editing a file, you commit your changes.
19176 When you do this, you are asked for a description of the changes.
19177 After that changes are commited.
19180 \begin_layout Standard
19185 \begin_layout Plain Layout
19186 In case locking is not enabled.
19188 \begin_inset CommandInset ref
19190 reference "subsec:SVN-File-Locking"
19201 svn commit -q -m"<description>" <file-name>
19204 \begin_layout Subsubsection
19210 \begin_layout Standard
19211 Updates the changes of this file from the repository.
19212 Be sure you understand SVN merging and conflicts resolving before using
19213 this function, because all conflicts has to be resolved manually by you!
19216 \begin_layout Standard
19221 \begin_layout Plain Layout
19229 svn update --non-interactive
19230 \begin_inset Quotes eld
19234 \begin_inset Quotes erd
19240 \begin_layout Subsubsection
19243 Revert To Repository Version
19246 \begin_layout Standard
19247 This will discard all changes made to the document since the last check
19249 You get a warning before changes are discarded.
19253 \begin_layout Standard
19257 \begin_inset Quotes eld
19261 \begin_inset Quotes erd
19267 \begin_layout Subsubsection
19268 \begin_inset CommandInset label
19270 name "sub:SVN-Repo-Update"
19274 Update of the local directory checkout from repository
19278 \begin_layout Plain Layout
19279 Note that this command will work only with subversion
19280 \begin_inset Formula $\geqq1.5$
19291 \begin_layout Standard
19292 All the commands above have one shortcomming - they deal with the current
19294 Once your document contains pictures, includes external
19295 \begin_inset Flex CharStyle:Code
19298 \begin_layout Plain Layout
19304 files and so on administration becomes more complicated.
19305 LyX now supports updating the whole tree in which resides the document
19309 \begin_layout Plain Layout
19310 One need to organize the files structure so that all external files are
19311 in the same directory or subdirectories of the document.
19318 This become especially useful once you cooperate with people which neither
19319 know about subversion management nor they have ambition to commit additional
19320 material to the repository.
19324 \begin_layout Standard
19325 \begin_inset Flex CharStyle:Code
19328 \begin_layout Plain Layout
19329 Update local directory from repository
19334 command updates the whole directory and in case of merge conflicts local
19335 version of the files are left, so no unintended data loss occurs.
19336 If local changes are detected user is warned before update starts.
19339 \begin_layout Labeling
19340 \labelwidthstring 00.00.0000
19342 \begin_inset space ~
19346 \begin_inset space ~
19350 \begin_inset Newline newline
19354 \begin_inset Flex CharStyle:Code
19357 \begin_layout Plain Layout
19363 (Ask if changes are detected.)
19364 \begin_inset Newline newline
19368 \begin_inset Flex CharStyle:Code
19371 \begin_layout Plain Layout
19372 svn update --accept mine-full $path
19380 \begin_layout Standard
19382 \begin_inset Flex CharStyle:Code
19385 \begin_layout Plain Layout
19391 stands for the path to the document.
19394 \begin_layout Subsubsection
19400 \begin_layout Standard
19401 This show the complete history of the SVN document.
19405 \begin_inset Quotes eld
19409 \begin_inset Quotes erd
19414 is shown in a browser.
19417 \begin_layout Subsubsection
19419 \begin_inset CommandInset label
19421 name "subsec:SVN-File-Locking"
19428 \begin_layout Standard
19429 The file exchange through various revision control systems brings the problem
19430 of merge conflicts in case two different users try to edit the same (parts
19432 When such conflict happens it needs manual resolving and one reasonable
19433 alternative is to provide some kind of locking mechanism, which guarantees
19434 that only one user is allowed to edit file at the given time.
19437 \begin_layout Standard
19438 SVN has two mechanisms to provide such kind of mutual exclusivity for file
19439 access - locks and automatical setting of write permissions (see sec.
19441 \begin_inset CommandInset ref
19443 reference "subsec:Automatical-Locking-Property"
19448 \begin_inset Flex CharStyle:Code
19451 \begin_layout Plain Layout
19461 \begin_layout Plain Layout
19462 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
19468 In a case this property is detected for a given document LyX starts to
19469 use SVN locks for document editing automatically and the whole check-in/out
19470 mechanism switches to the same regimen as for RCS.
19471 This in particular means there are two different modes how file is used
19475 \begin_layout Itemize
19477 The loaded file is in the read-only mode.
19478 For editation on needs to check-out.
19483 consists of update from repository and gaining write lock.
19484 If the lock is not possible to obtain, we remain in unlocked state.
19487 \begin_layout Itemize
19489 The loaded file is in the 'normal' edit mode.
19490 No other user is allowed to edit the file.
19495 consists of commiting changes and releasing write-lock.
19496 If no changes have been made to the document, no commit will be produced
19500 \begin_layout Plain Layout
19501 Don't be puzzled by the fact that you will be asked for commit message anyway.
19506 and only the write-lock will be released.
19509 \begin_layout Standard
19513 \begin_layout Labeling
19514 \labelwidthstring 00.00.0000
19517 svn commit -q -m"<description>" "<file-name>"
19518 \begin_inset Newline newline
19521 svn unlock "<file-name>"
19524 \begin_layout Labeling
19525 \labelwidthstring 00.00.0000
19528 svn update "<file-name>"
19529 \begin_inset Newline newline
19532 svn lock "<file-name>"
19535 \begin_layout Subsubsection
19538 \begin_inset CommandInset label
19540 name "subsec:Automatical-Locking-Property"
19546 Automatical Locking Property
19549 \begin_layout Standard
19550 The above mentioned automatical setting of write permissions of the .lyx
19551 file can be set through
19556 ile\SpecialChar \menuseparator
19562 \begin_inset space ~
19565 Control\SpecialChar \menuseparator
19570 oggle locking property
19573 This command is active only when the file is not locked on the svn server
19575 you need to check-out before proceeding).
19578 \begin_layout Labeling
19579 \labelwidthstring 00.00.0000
19581 \begin_inset space ~
19587 \begin_layout Labeling
19588 \labelwidthstring 00.00.0000
19591 svn propset svn:needs-lock ON "<file-name>"
19594 \begin_layout Labeling
19595 \labelwidthstring 00.00.0000
19598 svn propdel svn:needs-lock "<file-name>"
19601 \begin_layout Subsubsection
19602 \begin_inset CommandInset label
19604 name "sub:VCS-Revision-Information"
19608 Revision Information in Documents
19611 \begin_layout Standard
19612 There are more possibilities how to activate revision information in our
19616 \begin_layout Itemize
19617 LyX supports directly:
19621 \begin_layout Itemize
19622 tree revision information (
19623 \begin_inset Flex CharStyle:Code
19626 \begin_layout Plain Layout
19633 The result is the output of the
19634 \begin_inset Flex CharStyle:Code
19637 \begin_layout Plain Layout
19643 command, the following table gives you an idea, how to read the results.
19646 \begin_layout Standard
19648 \begin_inset Tabular
19649 <lyxtabular version="3" rows="6" columns="2">
19650 <features tabularvalignment="middle">
19651 <column alignment="center" valignment="top" width="0">
19652 <column alignment="center" valignment="top" width="0">
19654 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
19657 \begin_layout Plain Layout
19663 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
19666 \begin_layout Plain Layout
19674 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19677 \begin_layout Plain Layout
19683 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19686 \begin_layout Plain Layout
19687 mixed revision working copy
19694 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19697 \begin_layout Plain Layout
19703 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19706 \begin_layout Plain Layout
19707 modified working copy
19714 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19717 \begin_layout Plain Layout
19723 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19726 \begin_layout Plain Layout
19727 switched working copy
19734 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19737 \begin_layout Plain Layout
19743 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19746 \begin_layout Plain Layout
19747 partial working copy, from a sparse checkout
19754 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
19757 \begin_layout Plain Layout
19763 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
19766 \begin_layout Plain Layout
19767 mixed revision, modified, switched working copy
19780 \begin_layout Itemize
19781 file revision information.
19782 The result comes from parsing the output of
19783 \begin_inset Flex CharStyle:Code
19786 \begin_layout Plain Layout
19788 \begin_inset space ~
19792 \begin_inset space ~
19796 \begin_inset space ~
19805 Supported flags are:
19809 \begin_layout Itemize
19810 version number of the last commit (
19811 \begin_inset Flex CharStyle:Code
19814 \begin_layout Plain Layout
19823 \begin_layout Itemize
19824 author of the last commit (
19825 \begin_inset Flex CharStyle:Code
19828 \begin_layout Plain Layout
19837 \begin_layout Itemize
19838 date of the last commit (
19839 \begin_inset Flex CharStyle:Code
19842 \begin_layout Plain Layout
19851 \begin_layout Itemize
19852 time of the last commit (
19853 \begin_inset Flex CharStyle:Code
19856 \begin_layout Plain Layout
19866 \begin_layout Standard
19867 You can obtain this info via InsetInfo (e.g.
19869 \begin_inset Flex CharStyle:Code
19872 \begin_layout Plain Layout
19873 info-insert buffer vcs-date
19879 The information will be available only when you have the file stored under
19880 svn managment (i.e.
19882 \begin_inset Flex CharStyle:Code
19885 \begin_layout Plain Layout
19891 directory is available with your document).
19895 \begin_layout Itemize
19896 Another---a hacking one---possibility is to use svn keywords
19900 \begin_layout Plain Layout
19901 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
19907 In short -- you set file keywords property (e.g.
19910 svn propset svn:keywords 'Rev' file.lyx
19912 ) and then paste keyword ERT
19916 \begin_layout Plain Layout
19917 This is an easy way how to ensure that LyX won't break the line in the middle
19923 tag in your document (e.g.
19928 \begin_layout Plain Layout
19936 This way svn client will automatically substitute revision number (e.g.
19941 \begin_layout Plain Layout
19948 ) after each update and commit.
19949 There are more problems with this approach.
19950 Firstly, the '$' character is used in TeX world for math equations, so
19951 any occurence of math formula
19952 \begin_inset Formula $Rev$
19956 \begin_inset Formula $Rev:59$
19959 in your LyX document.
19960 Similarly for other keywords like Id, Date, Author, etc.
19961 Secondly svn output is dependent on your locales, so its very easy that
19962 svn would produce some problematic strings once Date is used.
19963 Thirdly you get the whole 'Rev: 59' string in your document instead of
19965 Until subversion implements user's custom keywords it will be hard to use
19966 this approach reliably or let LyX to support it directly.
19969 \begin_layout Subsection
19970 SVN and Windows Environment
19973 \begin_layout Quote
19974 My inclination is to say that if the user cannot figure out the command
19975 line operations on their own fairly quickly, they would be well advised
19976 to use TortoiseSVN.
19982 \begin_layout Subsubsection
19986 \begin_layout Standard
19987 In addition to installing LyX, and having access to a Subversion repository,
19988 the user will need to install the Subversion client program.
19989 A Windows installer for the client program is available from
19990 \begin_inset CommandInset href
19993 target "http://www.collab.net/nonav/downloads/subversion/"
19998 The user may also want to install
19999 \begin_inset CommandInset href
20002 target "http://tortoisesvn.tigris.org/"
20006 , which integrates Subversion operations into the context (rightclick) menu
20007 of Windows Explorer.
20008 Operations done outside LyX will typically be more convenient using the
20009 Explorer context menu.
20010 Note that TortoiseSVN is not a replacement for the client program, which
20011 is what LyX itself will use.
20014 \begin_layout Subsubsection
20015 Bringing a document under Subversion control
20018 \begin_layout Standard
20019 Before a LyX document can be brought under version control in Subversion,
20020 its parent directory needs to be under version control.
20021 If the document is being added to a project already in the repository,
20022 this is accomplished by checking the project out to the directory where
20023 the new document will be placed.
20024 If the project itself is not yet under version control (for instance, if
20025 this document starts a new project), the directory must be imported into
20027 This is done outside LyX.
20028 Both import and checkout are easily accomplished from the Explorer context
20029 menu using TortoiseSVN, or alternatively can be done using the command
20030 line client at a DOS prompt.
20031 The procedure for importing the project using TortoiseSVN is described
20032 below, assuming an existing repository and a new project being started
20040 For information on using the Subversion client program, run
20047 \begin_layout Enumerate
20054 in Windows Explorer, right click it, and select
20056 TortoiseSVN > Repo-browser
20059 If necessary, adjust the URL for the repository, then click OK.
20062 \begin_layout Enumerate
20063 Right click the level of the repository under which you want to place the
20064 new project folder (typically the top level) and click
20066 Create folder\SpecialChar \ldots{}
20069 Supply a name for the project folder and click OK.
20070 Add a message for the log file if desired, then click OK again.
20071 The new project folder should appear in the repository.
20072 Finally, click OK again to exit the repository browser.
20075 \begin_layout Enumerate
20076 Once again right click
20082 , this time selecting SVN Checkout\SpecialChar \ldots{}
20083 Select the URL of the project folder
20084 you just created in the repository, and set the checkout directory to
20092 You will be warned about a non-empty folder; click OK to proceed.
20093 You should now have a
20104 \begin_layout Enumerate
20105 Create or open your document in LyX and click
20110 ile\SpecialChar \menuseparator
20116 \begin_inset space ~
20119 Control\SpecialChar \menuseparator
20127 Add a log message and click OK to commit the document to version control.
20130 \begin_layout Standard
20131 From this point onward, you should have full functionality in the
20136 ile\SpecialChar \menuseparator
20142 \begin_inset space ~
20148 You also have the option of checking the document in and out, viewing its
20150 using the TortoiseSVN context menu in Windows Explorer or the Subversion
20151 client program from a command prompt.
20154 \begin_layout Subsubsection
20155 SSH tunel used with SVN under Windows
20158 \begin_layout Standard
20159 Compared to linux setting svn client to communicate over ssh under Windows
20160 is rather troublesome task.
20161 We will at least make some hints how to setup client side but former knowledge
20162 about ssh and Windows command line is needed, also be prepared for a great
20163 deal of frustration...
20166 \begin_layout Enumerate
20167 Get svn client for windows, as described in previous sections.
20168 When it is fresh install run some svn command (e.g.
20170 \begin_inset Flex CharStyle:Code
20173 \begin_layout Plain Layout
20179 ) to have created config files, which you will need to change later on.
20182 \begin_layout Enumerate
20183 Choose ssh client for Windows.
20184 There are more possibilities, we will use the one from Putty tools
20188 \begin_layout Plain Layout
20189 \begin_inset Flex URL
20192 \begin_layout Plain Layout
20194 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20205 You will need to automatize connection, so client doesn't ask for any password
20207 To keep things easy we will use only keys without any additional password
20212 \begin_layout Enumerate
20214 \begin_inset Flex CharStyle:Code
20217 \begin_layout Plain Layout
20224 Save your private .ppk key file and put the public one on the server side.
20225 In case the SVN server runs on linux, note that the format of the public
20226 key is not compatible with linux openssh and you will need to direcly copy-past
20227 e the key from the “
20229 Public key for pasting into OpenSSH authorized_keys file
20231 :” edit field into the server's
20232 \begin_inset Flex CharStyle:Code
20235 \begin_layout Plain Layout
20236 ~/.ssh/authorized_keys
20242 \begin_inset Flex CharStyle:Code
20245 \begin_layout Plain Layout
20254 \begin_layout Enumerate
20256 \begin_inset Flex CharStyle:Code
20259 \begin_layout Plain Layout
20266 In the SVN config file
20270 \begin_layout Plain Layout
20271 Exact path depends on Windows version, usually somewhere around
20272 \begin_inset Flex CharStyle:Code
20275 \begin_layout Plain Layout
20278 Documents and Settings
20292 \begin_inset Flex CharStyle:Code
20295 \begin_layout Plain Layout
20310 , section [tunnels], setup ssh command, e.g.
20312 \begin_inset Flex CharStyle:Code
20315 \begin_layout Plain Layout
20316 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20325 \begin_layout Plain Layout
20326 It will usually take a lot of time to get exact command right and it depends
20328 For example do not have some remote server saved as a default session in
20330 If things fail, try to connect via plink without SVN first.
20339 \begin_layout Enumerate
20340 Checkout the SVN archive, e.g.
20342 \begin_inset Flex CharStyle:Code
20345 \begin_layout Plain Layout
20346 svn co svn+ssh://user@server/repository_path
20354 \begin_layout Subsubsection
20356 \change_inserted 1 1274738367
20357 End-of-Line Conversions
20360 \begin_layout Standard
20362 \change_inserted 1 1274738433
20363 When the collsraborators are mixing Linux and Windows environments, LyX
20364 will use different line endings inside the .lyx files.
20365 This is not problem as far as LyX functionality is concerned, but the commit
20366 diffs will be huge and merge-conflicts prone.
20367 Fortunately SVN itself knows
20371 \begin_layout Plain Layout
20373 \change_inserted 1 1274738731
20374 \begin_inset Flex URL
20377 \begin_layout Plain Layout
20379 \change_inserted 1 1274738731
20381 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
20395 how to deal with CR/LF problems when switching .lyx files to the
20396 \begin_inset Flex CharStyle:Code
20399 \begin_layout Plain Layout
20401 \change_inserted 1 1274738399
20413 \begin_layout Plain Layout
20415 \change_inserted 1 1274738457
20417 \begin_inset Flex CharStyle:Code
20420 \begin_layout Plain Layout
20422 \change_inserted 1 1274738457
20423 svn propset svn:eol-style native FILE_NAME
20440 \begin_layout Subsection
20444 \begin_layout Standard
20445 With the recent addition of the vc-command function LyX power users are
20446 allowed to create their own commands for revision control.
20449 \begin_layout Standard
20450 As an example you can see how two TortoiseSVN commands could be integrated
20454 \begin_layout Description
20456 \begin_inset Flex CharStyle:Code
20459 \begin_layout Plain Layout
20460 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
20468 \begin_layout Description
20470 \begin_inset Flex CharStyle:Code
20473 \begin_layout Plain Layout
20474 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
20482 \begin_layout Section
20483 Literate Programming
20486 \begin_layout Standard
20491 (kayvan@sylvan.com)
20495 original documentation written by
20497 Edmar Wienskoski Jr.
20500 (edmar-w-jr@technologist.com)
20503 \begin_layout Subsection
20507 \begin_layout Standard
20508 The main purpose of this documentation is to show you how to use LyX for
20509 literate programming.
20510 Where it is assumed that you are familiar with this programming technique,
20512 \begin_inset Quotes eld
20516 \begin_inset Quotes erd
20520 \begin_inset Quotes eld
20524 \begin_inset Quotes erd
20528 If that is not the case, please follow the web links provided in the following
20530 There is a lot of good documentation out there covering old development
20531 history to the latest tools tips.
20534 \begin_layout Standard
20535 It is also assumed that you are familiar with LyX itself to a point that
20536 you are comfortable changing your LyX preferences, and X resources file.
20537 If that is not the case please refer to other LyX documentation to cover
20538 your specific needs.
20541 \begin_layout Subsection
20542 Literate Programming
20545 \begin_layout Standard
20546 From the Literate Programming FAQ:
20549 \begin_layout Quotation
20550 Literate programming is the combination of documentation and source together
20551 in a fashion suited for reading by human beings.
20552 In fact, literate programs should be enjoyable reading, even inviting!
20553 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
20554 and documentation in a single file.
20555 Literate programming tools then parse the file to produce either readable
20556 documentation or compilable source.
20557 The WEB style of literate programming was created by D.
20558 \begin_inset space \thinspace{}
20562 Knuth during the development of his TeX typesetting software.
20566 \begin_layout Standard
20567 Another excerpt says:
20570 \begin_layout Quotation
20573 How is literate programming different from verbose commenting?
20576 \begin_layout Quotation
20577 There are three distinguishing characteristics.
20578 In order of importance, they are:
20582 \begin_layout Itemize
20583 flexible order of elaboration
20586 \begin_layout Itemize
20587 automatic support for browsing
20590 \begin_layout Itemize
20591 typeset documentation, especially diagrams and mathematics
20595 \begin_layout Standard
20596 Now that I sparked your curiosity, take a look in the references.
20599 \begin_layout Subsubsection
20603 \begin_layout Standard
20604 The complete Literate Programming FAQ can be found at:
20607 \begin_layout Quote
20608 Literate Programming FAQ
20609 \begin_inset Flex URL
20612 \begin_layout Plain Layout
20614 http://shelob.ce.ttu.edu/daves/lpfaq/faq.html
20622 \begin_layout Standard
20623 The FAQ lists 23 (twenty three!) different literate programming tools.
20624 Where some are specialized or
20625 \begin_inset Quotes eld
20629 \begin_inset Quotes erd
20632 for particular programming languages, while other have general scope.
20637 for my own use for several reasons:
20640 \begin_layout Itemize
20641 It can generate the documentation either in LaTeX or HTML.
20644 \begin_layout Itemize
20645 It has a open architecture, i.
20646 \begin_inset space \thinspace{}
20650 \begin_inset space \space{}
20653 it is easy to plug in new filters and to perform special processing that
20658 \begin_layout Itemize
20659 There is a good selection of filters available already (the HTML is one
20663 \begin_layout Itemize
20667 \begin_layout Standard
20668 The Noweb web page can be found at:
20671 \begin_layout Quote
20673 \begin_inset Flex URL
20676 \begin_layout Plain Layout
20678 http://www.cs.virginia.edu/~nr/noweb/
20686 \begin_layout Standard
20687 Starting from there you can reach many other interesting links and even
20688 some literate program examples.
20691 \begin_layout Subsection
20692 LyX and Literate Programming
20695 \begin_layout Standard
20696 The LyX support for Literate Programming is provided by using the generic
20697 LyX converters mechanism.
20698 This support is provided in a
20699 \begin_inset Quotes eld
20703 \begin_inset Quotes erd
20707 \begin_inset space \thinspace{}
20711 \begin_inset space \space{}
20714 you will be able to use this new LyX feature with some other literate programmin
20715 g tool of your choice by just changing your LyX preferences.
20718 \begin_layout Subsubsection
20719 Generating documents and code (weaving and tangling)
20722 \begin_layout Paragraph
20723 Selecting the document class
20726 \begin_layout Standard
20727 If you have installed Noweb and LyX successfully, whenever you open a new
20728 document or try to change the document class of an existing one, you will
20729 find that there are three new document classes available:
20732 \begin_layout Itemize
20736 \begin_layout Itemize
20740 \begin_layout Itemize
20744 \begin_layout Standard
20745 You must select one of them to create your literate documents from.
20749 \begin_layout Standard
20750 Note that literate documents are not limited to these three classes.
20751 New classes can be generated from other styles like letter or in combination
20752 with other class variations like Article (AMS).
20753 If you have special needs that cannot be covered by one of the existing
20754 classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
20755 will arrange to insert a new entry, or teach you how to do it.
20759 \begin_layout Plain Layout
20760 It is very simple, it involves the creation of a file with four lines, and
20761 re-running of the auto configuration.
20766 Moreover, if you use a literate tool other than Noweb you may need to create
20767 a new set of document classes for it.
20770 \begin_layout Paragraph
20774 \begin_layout Standard
20775 LyX enables you to write code with a layout named
20783 \begin_layout Plain Layout
20784 The equivalent Noweb term is
20785 \begin_inset Quotes eld
20789 \begin_inset Quotes erd
20793 For historical reasons, I got used to the term
20794 \begin_inset Quotes eld
20798 \begin_inset Quotes erd
20801 introduced by other literate tool named Nuweb, which I used for many years
20802 before rendering myself to Noweb.
20807 Noweb delimits scraps like this:
20810 \begin_layout LyX-Code
20814 \begin_layout LyX-Code
20818 \begin_layout LyX-Code
20822 \begin_layout LyX-Code
20826 \begin_layout LyX-Code
20830 \begin_layout Standard
20831 The problem is that whatever is written in between the << and the
20835 must be taken literally, i.
20836 \begin_inset space \thinspace{}
20840 \begin_inset space \space{}
20843 LyX should be prevented from making any special interpretation of what has
20845 This is handled by a special layout named Scrap, that works like a normal
20846 paragraph but has a free spacing capability.
20849 \begin_layout Standard
20850 The down side of the Scrap paragraph layout is that consecutive paragraphs
20851 of code will be spaced with one empty line in the source code and also
20852 in the printed documentation.
20853 The work around is to enter each line of code within a single Scrap, with
20854 a newline (ctrl-return).
20855 The example above will look like this:
20859 \begin_layout Plain Layout
20860 If you have a printed version of this document you will not see any difference
20861 between the previous example and this one.
20869 \begin_layout LyX-Code
20871 \begin_inset Newline newline
20875 \begin_inset Newline newline
20879 \begin_inset Newline newline
20883 \begin_inset Newline newline
20889 \begin_layout Standard
20890 This layout works fine.
20891 The only real inconvenience is that you have to type ctrl-return instead
20896 \begin_layout Plain Layout
20897 It is in my list of
20898 \begin_inset Quotes eld
20902 \begin_inset Quotes erd
20913 \begin_layout Standard
20914 As a special note, you can also use the
20915 \begin_inset Quotes eld
20919 \begin_inset Quotes erd
20922 construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
20926 \begin_layout LyX-Code
20928 \begin_inset Newline newline
20931 def some_function(args):
20932 \begin_inset Newline newline
20935 "This is the doc string for this function."
20936 \begin_inset Newline newline
20939 print "My args: ", args
20942 \begin_layout LyX-Code
20943 @ %def some_function
20946 \begin_layout Standard
20947 For an example of this usage and the resulting cross-reference output, look
20948 at the Literate python program in
20950 LIBDIR/examples/listerrors.lyx
20952 which should make this all clear.
20955 \begin_layout Paragraph
20956 Generating the documentation
20959 \begin_layout Standard
20960 At this point you already have a new document file with a proper document
20961 class, and with some code and text on it.
20962 How do I print it? The answer is simple, you select
20964 View\SpecialChar \menuseparator
20968 Just like you would do for a plain document.
20969 No special procedure is required.
20972 \begin_layout Standard
20973 To help orientate you, I will now explain what happens inside LyX:
20976 \begin_layout Enumerate
20979 Update\SpecialChar \menuseparator
20982 menu option is chosen, a LaTeX file is generated.
20987 \begin_layout Standard
20988 If the document is of any literate class the generated file will be named
20989 with an extension name defined by the
20990 \begin_inset Quotes eld
20994 \begin_inset Quotes erd
20997 format (defined in the Preferences panel), otherwise the file will have
21006 \begin_layout Enumerate
21007 Note that the only difference so far is in the name of the file, no special
21008 processing is required by LyX.
21009 Given that you formatted the code using the Scrap layout that, by itself,
21010 takes care of the business.
21013 \begin_layout Enumerate
21014 If the document is of any literate class LyX will then use the internal
21015 LyX to Noweb converter, followed by the Noweb to LaTeX converter
21019 \begin_layout Plain Layout
21020 The converters are defined in the
21022 Tools\SpecialChar \menuseparator
21026 \begin_inset Quotes eld
21030 \begin_inset Quotes erd
21042 manual for general information about converters.
21047 to generate the LaTeX file.
21051 \begin_layout Standard
21052 Otherwise it will just skip this step.
21056 \begin_layout Enumerate
21057 Finally, LaTeX is invoked and the regular post processing continues as in
21061 \begin_layout Standard
21062 Independence from a particular
21063 \begin_inset Quotes eld
21067 \begin_inset Quotes erd
21070 is easily achieved by changing the commands that are run by the various
21074 \begin_layout Paragraph
21075 Generating the code
21078 \begin_layout Standard
21079 When the build menu option is chosen or the corresponding button in the
21080 toolbar is pressed, a LaTeX file is generated just like step 1 above.
21081 Next, LyX invokes the
21086 This converter needs to be defined by the user and is not installed by
21087 default, though the Program format is.
21088 This converter (like any other converter) will have two parts:
21091 \begin_layout Enumerate
21092 The converter program itself.
21093 This program performs the conversion from the one format to the other (in
21094 this case, from the Noweb format to the Program pseudo-format).
21097 \begin_layout Enumerate
21098 The error log parser.
21099 This is a program whose sole purpose is to rewrite error messages in a
21100 format that LyX understands.
21101 This makes it possible for LyX to place error boxes in the right places
21102 in the file buffer.
21105 \begin_layout Standard
21106 The first part, the
21107 \begin_inset Quotes eld
21111 \begin_inset Quotes erd
21114 setting, should be set to
21115 \begin_inset Quotes eld
21123 \begin_inset Quotes erd
21127 This basically means that LyX will call
21128 \begin_inset Quotes eld
21132 \begin_inset Quotes erd
21135 (a program or script) with the name of the Noweb file (normally a file
21136 in the LyX temp directory).
21140 \begin_layout Standard
21141 This is an implementation of
21142 \begin_inset Quotes eld
21146 \begin_inset Quotes erd
21149 that you can place in a directory on your path:
21152 \begin_layout LyX-Code
21156 \begin_layout LyX-Code
21160 \begin_layout LyX-Code
21161 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
21164 \begin_layout Standard
21165 The next part of the converter setting is the
21166 \begin_inset Quotes eld
21170 \begin_inset Quotes erd
21173 which is to be set to
21174 \begin_inset Quotes eld
21179 parselog=listerrors
21182 \begin_inset Quotes erd
21186 This will run any errors that are generated by the
21187 \begin_inset Quotes eld
21191 \begin_inset Quotes erd
21194 process through the
21195 \begin_inset Quotes eld
21199 \begin_inset Quotes erd
21205 \begin_layout Standard
21206 The converter code looks in
21214 then on the path for the
21215 \begin_inset Quotes eld
21219 \begin_inset Quotes erd
21225 \begin_layout Standard
21226 The build will normally take place in LyX's temporary directory, so the
21227 files produced by the conversion will be in that directory.
21228 LyX will copy out what it regards as the `main' file, but the
21232 conversion may produce several files, and so most of these would then be
21233 deleted when LyX was closed.
21234 The present solution is to use a `copier',
21238 \begin_layout Plain Layout
21247 manual for information on these.
21256 script in its default mode, so that the entire contents of the temporary
21257 directory is copied.
21258 More will get copied than is needed, to be sure, but nothing will be lost.
21259 If, however, you know what extensions the generated files will have, this
21260 can be improved by using the
21269 This option takes a comma-separated list of extensions to copy.
21270 So, for example, if the conversion will generate only files with the extensions
21279 , then the correct definition would be:
21282 \begin_layout LyX-Code
21283 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
21286 \begin_layout Standard
21287 The result will be that only files with these two extensions will be copied
21291 \begin_layout Paragraph
21292 Build instructions in the document
21295 \begin_layout Standard
21296 The last piece of the integration between LyX and noweb is the
21297 \begin_inset Quotes eld
21301 \begin_inset Quotes erd
21305 Generally, the instructions for building your program should be embedded
21306 in a scrap of its own.
21308 \begin_inset Quotes eld
21312 \begin_inset Quotes erd
21315 above uses the notangle command to look for this scrap (called
21316 \begin_inset Quotes eld
21320 \begin_inset Quotes erd
21323 ) and runs its contents through
21324 \begin_inset Quotes eld
21328 \begin_inset Quotes erd
21334 \begin_layout Standard
21335 Typically, such a scrap would look something like this:
21338 \begin_layout LyX-Code
21340 \begin_inset Newline newline
21344 \begin_inset Newline newline
21348 \begin_inset Newline newline
21351 if [ -z "${NOWEB_SOURCE}" ]
21352 \begin_inset Newline newline
21356 \begin_inset Newline newline
21359 NOWEB_SOURCE=myfile.nw
21360 \begin_inset Newline newline
21364 \begin_inset Newline newline
21368 code to extract files ...]
21369 \begin_inset Newline newline
21373 code to compile files ...]
21374 \begin_inset Newline newline
21380 \begin_layout Standard
21383 LIBDIR/examples/listerrors.lyx
21387 LIBDIR/examples/Literate.lyx
21389 which implement two versions of the
21390 \begin_inset Quotes eld
21394 \begin_inset Quotes erd
21397 program for some illustrations of how all of these pieces go together or
21400 LIBDIR/examples/noweb2lyx.lyx.
21403 Interestingly, these three files show off the language-indepence of the
21404 LyX literate programming support since they are written in Python, C and
21408 \begin_layout Subsubsection
21412 \begin_layout Standard
21413 All the Literate Programming support is configured by the
21415 Tools\SpecialChar \menuseparator
21419 \begin_inset Quotes eld
21423 \begin_inset Quotes erd
21427 The important parts are:
21430 \begin_layout Description
21432 \begin_inset space ~
21436 \begin_inset Quotes eld
21440 \begin_inset Quotes erd
21444 \begin_inset space ~
21447 format Set up via the Formats tab, this is where the Noweb-specific pieces
21457 , the file extension is set to
21462 This tells LyX to create a file with a
21466 extension in the first step of the conversion process.
21469 \begin_layout Description
21471 \begin_inset space ~
21479 \begin_inset space ~
21482 format This is an empty format whose sole purpose is to be the endpoint
21483 of a conversion (which then allows us to set up a converter for it).
21486 \begin_layout Description
21495 This converter performs the
21496 \begin_inset Quotes eld
21500 \begin_inset Quotes erd
21503 of the literate document.
21504 For Noweb, it is set to
21505 \begin_inset Quotes eld
21510 noweave -delay -index $$i > $$o
21513 \begin_inset Quotes erd
21519 \begin_layout Description
21529 \begin_inset Quotes eld
21533 \begin_inset Quotes erd
21537 As stated above, the Converter is set to
21538 \begin_inset Quotes eld
21546 \begin_inset Quotes erd
21549 , with Flags set to
21550 \begin_inset Quotes eld
21555 originaldir,parselog=listerrors
21558 \begin_inset Quotes erd
21564 \begin_layout Subsubsection
21568 \begin_layout Standard
21569 There is also a new function implemented in the LyX server, the
21570 \begin_inset Quotes eld
21573 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
21577 \begin_layout Standard
21578 When debugging code with ddd/gdb, it is possible to invoke a text editor
21579 at the current execution position with a single key stroke.
21580 The default ddd configuration for that is shift-ctrl-V.
21581 It happens that you can define the editor command line invocation in ddd
21584 Edit\SpecialChar \menuseparator
21585 Preferences\SpecialChar \menuseparator
21588 dialog and changing the "Edit Sources" entry.
21591 \begin_layout Standard
21592 I take advantage of the new created LyX server function and this ddd feature,
21594 \begin_inset Quotes eld
21598 \begin_inset Quotes erd
21604 \begin_layout LyX-Code
21605 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
21608 \begin_layout Standard
21609 With this, whenever you are using ddd and find a point in the program that
21610 you want to edit, you just press shift-ctrl-V (in the ddd window), and
21611 ddd you forward this information to LyX through the LyX server and then
21612 the LyX window will show the same file with the cursor at the same position
21613 ddd was pointing to.
21614 No more guessing or long scrolling to locate a point in the program back
21618 \begin_layout Standard
21619 Note however that you must enable the LyX server to get this feature working
21620 (it is disabled by default).
21621 You can enable it in
21633 ) by entering in the
21638 \begin_inset Quotes eld
21643 /home/<your-home-directory>/.lyx/lyxpipe
21646 \begin_inset Quotes erd
21652 \begin_layout Standard
21653 Read the LyX server documentation in the
21655 Customization Manual
21657 for further information.
21660 \begin_layout Subsubsection
21664 \begin_layout Standard
21665 There are six new buttons that can be added to your LyX toolbar.
21666 Five of these buttons are short cuts to layout styles:
21687 The last one is a short cut to the
21688 \begin_inset Quotes eld
21692 \begin_inset Quotes erd
21699 \begin_layout Standard
21700 LyX has a range of buttons that are available for tool bar customization.
21701 In my toolbar I like to combine the six short cuts above with two more:
21706 \SpecialChar \menuseparator
21711 \SpecialChar \menuseparator
21718 View\SpecialChar \menuseparator
21722 Here is how it looks like:
21725 \begin_layout LyX-Code
21729 \begin_layout LyX-Code
21733 \begin_layout LyX-Code
21734 Icon "layout Standard"
21737 \begin_layout LyX-Code
21738 Icon "layout Section"
21741 \begin_layout LyX-Code
21742 Icon "layout LaTeX"
21745 \begin_layout LyX-Code
21746 Icon "layout LyX-Code"
21749 \begin_layout LyX-Code
21750 Icon "layout Scrap"
21753 \begin_layout LyX-Code
21757 \begin_layout LyX-Code
21761 \begin_layout LyX-Code
21762 Icon "buffer-typeset"
21765 \begin_layout LyX-Code
21766 Icon "build-program"
21769 \begin_layout LyX-Code
21773 \begin_layout LyX-Code
21777 \begin_layout LyX-Code
21781 \begin_layout LyX-Code
21785 \begin_layout LyX-Code
21789 \begin_layout Subsubsection
21790 Colors customization
21793 \begin_layout Standard
21794 There are a number of colors in LyX that can be customized in
21799 One of the things that bothers people is the LaTeX font color.
21800 The default color is red, since the scraps uses LaTeX font, and there is
21801 a lot of scraps in literate documents, you may get tired of seeing everything
21803 You can change it by going to the tabs
21812 \begin_layout Standard
21813 The next thing is the visible presence of the newline character in the screen.
21814 You can choose the color of this particular character and make it blend
21816 I recommend you choosing a color that is close to the background but not
21817 equal, that way you still can see it is there, but it is not bothering
21822 \begin_layout Chapter
21823 Secrets of the LaTeX Masters
21824 \begin_inset CommandInset label
21833 \begin_layout Standard
21834 Though LyX is a powerful tool, it cannot hope to support everything that
21835 can be done with pure TeX/LaTeX.
21836 However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
21837 as long as you are not afraid to use that
21838 \begin_inset Quotes eld
21842 \begin_inset Quotes erd
21845 button on the toolbar or add things to the LaTeX preamble.
21846 This section lists some tips, tricks, and otherwise cool ideas to give
21847 your document that extra little flair.
21850 Do try this at home
21852 , just start with something a little smaller and less important than your
21856 \begin_layout Standard
21857 Most ideas in this section require less common files in your LaTeX installation.
21858 If you have a system like teTeX, most will already be available.
21859 A few, however, will need to be downloaded from one of the CTAN archives.
21860 Often, there are several ways to do something, or several LaTeX style files
21861 which do the same thing.
21862 We do not endorse one choice over another, we simply claim that we have
21863 done a particular task with a particular file.
21864 Put on your wizard hat, keep an eye out for dragons, and let us begin.
21867 \begin_layout Section
21871 \begin_layout Standard
21874 Lars Gullik Bjønnes
21877 \begin_layout Subsection
21881 \begin_layout Standard
21882 The aim for this chapter
21886 \begin_layout Plain Layout
21887 Editor's note: Lars' original chapter was a masterful description of how
21893 However, it was too long to flow smoothly in this document.
21894 I have therefore chosen to excerpt the most important sections here (sorry,
21895 Lars); you can read the original chapter (and more of the story!) in the
21898 examples/multicol.lyx
21906 is to show how the LaTeX package
21910 can be used in a LyX document.
21911 As LyX doesn't support the
21915 package natively yet, we have to use some small hacks.
21916 By reading this section it should be obvious how to do this.
21919 \begin_layout Subsection
21923 \begin_layout Standard
21928 package allows switching between one and multicolumn format on the same
21930 Footnotes are handled correctly (for the most part), but will be placed
21931 at the bottom of the page and not under each column.
21932 LaTeX's float mechanism, however, is partly disabled in the current implementat
21934 At the moment only page-wide floats can be used within the scope of the
21938 \begin_layout Subsection
21942 \begin_layout Subsubsection
21946 \begin_layout Standard
21947 If you want to have two columns in your text, you have use LaTeX mode to
21952 begin{multicols}{2}
21954 at the point where you want the two column layout to start, and then
21960 where you want it to end.
21964 \begin_layout Standard
21968 \begin_layout Plain Layout
21972 begin{multicols}{2}
21980 \begin_layout Standard
21985 The Adventure of the Empty House
21988 \begin_inset Newline newline
21993 Sir Arthur Conan Doyle
21996 \begin_layout Standard
21999 It was in the spring of the year 1894 that all London was interested, and
22000 the fashionable world dismayed, by the murder of the Honourable Ronald
22001 Adair under most unusual and inexplicable circumstances.
22002 The public has already learned those particulars of the crime which came
22003 out in the police investigation, but a good deal was suppressed upon that
22004 occasion, since the case for the prosecution was so overwhelmingly strong
22005 that it was not necessary to bring forward all the facts.
22006 Only now, at the end of nearly ten years, am I allowed to supply those
22007 missing links which make up the whole of that remarkable chain.
22008 The crime was of interest in itself, but that interest was as nothing to
22009 me compared to the inconceivable sequel, which afforded me the greatest
22010 shock and surprise of any event in my adventurous life.
22011 Even now, after this long interval, I find myself thrilling as I think
22012 of it, and feeling once more that sudden flood of joy, amazement, and increduli
22013 ty which utterly submerged my mind.
22014 Let me say to that public, which has shown some interest in those glimpses
22015 which I have occasionally given them of the thoughts and actions of a very
22016 remarkable man, that they are not to blame me if I have not shared my knowledge
22017 with them, for I should have considered it my first duty to do so, had
22018 I not been barred by a positive prohibition from his own lips, which was
22019 only withdrawn upon the third of last month.
22022 \begin_layout Standard
22026 \begin_layout Plain Layout
22038 \begin_layout Subsubsection
22042 \begin_layout Standard
22043 The same pattern is used when you want more than two columns:
22046 \begin_layout Standard
22050 \begin_layout Plain Layout
22054 begin{multicols}{3}
22062 \begin_layout Standard
22065 It can be imagined that my close intimacy with Sherlock Holmes had interested
22066 me deeply in crime, and that after his disappearance I never failed to
22067 read with care the various problems which came before the public.
22068 And I even attempted, more than once, for my own private satisfaction,
22069 to employ his methods in their solution, though with indifferent success.
22070 There was none, however, which appealed to me like this tragedy of Ronald
22072 As I read the evidence at the inquest, which led up to a verdict of willful
22073 murder against some person or persons unknown, I realized more clearly
22074 than I had ever done the loss which the community had sustained by the
22075 death of Sherlock Holmes.
22076 There were points about this strange business which would, I was sure,
22077 have specially appealed to him, and the efforts of the police would have
22078 been supplemented, or more probably anticipated, by the trained observation
22079 and the alert mind of the first criminal agent in Europe.
22080 All day, as I drove upon my round, I turned over the case in my mind and
22081 found no explanation which appeared to me to be adequate.
22082 At the risk of telling a twice-told tale, I will recapitulate the facts
22083 as they were known to the public at the conclusion of the inquest.
22086 \begin_layout Standard
22090 \begin_layout Plain Layout
22102 \begin_layout Standard
22103 You can have more than 3 columns if you want to, but that might not be very
22104 pleasant for the eye.
22107 \begin_layout Subsubsection
22108 Columns inside columns
22111 \begin_layout Standard
22112 You can even have columns inside columns:
22115 \begin_layout Standard
22119 \begin_layout Plain Layout
22123 begin{multicols}{2}
22131 \begin_layout Standard
22134 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22135 at that time governor of one of the Australian colonies.
22136 Adair's mother had returned from Australia to undergo the operation for
22137 cataract, and she, her son Ronald, and her daughter Hilda were living together
22141 \begin_layout Standard
22145 \begin_layout Plain Layout
22149 begin{multicols}{2}
22157 \begin_layout Standard
22160 The youth moved in the best society–had, so far as was known, no enemies
22161 and no particular vices.
22162 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22163 had been broken off by mutual consent some months before, and there was
22164 no sign that it had left any very profound feeling behind it.
22165 For the rest {sic} the man's life moved in a narrow and conventional circle,
22166 for his habits were quiet and his nature unemotional.
22167 Yet it was upon this easy-going young aristocrat that death came, in most
22168 strange and unexpected form, between the hours of ten and eleven-twenty
22169 on the night of March 30, 1894.
22172 \begin_layout Standard
22176 \begin_layout Plain Layout
22188 \begin_layout Standard
22191 Ronald Adair was fond of cards–playing continually, but never for such stakes
22193 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22194 It was shown that, after dinner on the day of his death, he had played
22195 a rubber of whist at the latter club.
22196 He had also played there in the afternoon.
22201 The evidence of those who had played with him– Mr.
22202 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
22203 and that there was a fairly equal fall of the cards.
22204 Adair might have lost five pounds, but not more.
22205 His fortune was a considerable one, and such a loss could not in any way
22207 He had played nearly every day at one club or other, but he was a cautious
22208 player, and usually rose a winner.
22209 It came out in evidence that, in partnership with Colonel Moran, he had
22210 actually won as much as four hundred and twenty pounds in a sitting, some
22211 weeks before, from Godfrey Milner and Lord Balmoral.
22212 So much for his recent history as it came out at the inquest.
22215 \begin_layout Standard
22219 \begin_layout Plain Layout
22231 \begin_layout Standard
22232 Please do read the file
22234 examples/multicol.lyx
22236 for more advanced examples including column and header spacing, vertical
22237 separator lines, and more.
22240 \begin_layout Section
22245 Paragraph Environment
22246 \begin_inset OptArg
22249 \begin_layout Plain Layout
22250 Numbering in Enumerate
22258 \begin_layout Standard
22264 \begin_layout Standard
22265 \begin_inset VSpace bigskip
22271 \begin_layout Standard
22273 The default numbering for the
22277 paragraph environment begins with Arabic numbers and ends with uppercase
22279 Suppose, however, you wanted a different type of numbering scheme.
22280 Here's a quickie example of how to change the numbering scheme:
22283 \begin_layout LyX-Code
22293 \begin_layout LyX-Code
22303 \begin_layout LyX-Code
22313 \begin_layout LyX-Code
22323 \begin_layout Standard
22324 \SpecialChar \ldots{}
22325 which changes the numbering scheme to uppercase Roman numerals, uppercase
22326 letters, Arabic numbers, and lowercase letter.
22329 \begin_layout Standard
22330 Additionally, the previous example also adds a little bit extra to the numbering
22332 For example, the first level label actually looks like:
22333 \begin_inset Quotes eld
22337 \begin_inset Quotes erd
22341 For ease of reading, we'll describe what the numbering schemes look like
22342 using a notation something like this: <
22343 \begin_inset Quotes eld
22347 \begin_inset Quotes erd
22351 \begin_inset space ~
22355 \begin_inset Quotes erd
22359 \begin_inset Quotes erd
22363 \begin_inset space ~
22367 \begin_inset Quotes erd
22371 \begin_inset Quotes erd
22375 \begin_inset space ~
22379 \begin_inset Quotes eld
22383 \begin_inset Quotes erd
22390 \begin_layout Standard
22391 As you can see in the example, there is a label command for each nesting
22398 \SpecialChar \ldots{}
22405 , as well as a counter,
22409 \SpecialChar \ldots{}
22415 There are also five
22416 \begin_inset Quotes eld
22420 \begin_inset Quotes erd
22453 , each of which take one counter as an argument.
22454 You can add characters before or after these, but there's no need to add
22458 \begin_layout Standard
22459 You can get really fancy with these.
22463 \begin_layout LyX-Code
22477 \begin_layout LyX-Code
22489 \begin_layout LyX-Code
22499 \begin_layout LyX-Code
22509 \begin_layout Standard
22510 produces the somewhat out of hand numbering scheme: <
22511 \begin_inset Quotes eld
22515 \begin_inset Quotes erd
22519 \begin_inset space ~
22523 \begin_inset Quotes erd
22527 \begin_inset Quotes erd
22531 \begin_inset space ~
22535 \begin_inset Quotes erd
22539 \begin_inset Quotes erd
22543 \begin_inset space ~
22547 \begin_inset Quotes eld
22551 \begin_inset Quotes erd
22558 \begin_layout Standard
22562 \begin_layout Section
22566 \begin_layout Standard
22572 \begin_layout Standard
22573 \begin_inset VSpace bigskip
22579 \begin_layout Standard
22584 \begin_layout Plain Layout
22590 tmpfont}{cmr17 scaled 2500}{
22602 \begin_layout Standard
22607 \begin_layout Plain Layout
22618 hose of you who like the style of old books probably also like
22619 \begin_inset Quotes eld
22623 \begin_inset Quotes erd
22626 —those large capital letters which begin each new chapter or section.
22627 Implementing them with plain LyX/LaTeX is straightforward (assuming you
22628 know some plain TeX!) but does require a lot of work and many iterations,
22629 as you can see by all the ugly TeX-mode stuff at the beginning of this
22633 \begin_layout Standard
22637 \begin_layout Plain Layout
22643 bigdrop{-1em}{3}{ptmri}{T}+
22648 here is a much easier way of doing this, of course.
22657 ) package from CTAN allows a simple way to add such letters to your documents.
22658 Since this package is not a standard part of teTeX, I can't demonstrate
22659 it within this document, but if you copy this paragraph to a new document,
22661 \begin_inset Quotes eld
22671 \begin_inset Quotes erd
22674 and the pluses from the TeX code at the beginning of the paragraph, and
22679 usepackage{dropcaps}
22681 to your LaTeX preamble, you will get a nice Times Roman Italic
22682 \begin_inset Quotes eld
22686 \begin_inset Quotes erd
22689 , whose height is three lines of text and which protrudes 1 em into the
22691 (Make certain you have copied
22692 \begin_inset Quotes eld
22700 \begin_inset Quotes erd
22703 into a directory where TeX can see it.) The first argument is the amount
22704 of indentation; in this case the negative sign moves it into the margin.
22705 The second argument is the height of the letter in number of lines of text.
22706 The third argument is the font name: virtually anything which has a tfm
22707 file should work (wade through the
22709 .../texmf/fonts/tfm
22711 directory for possibilities).
22712 My personal favorite is
22713 \begin_inset Quotes eld
22721 \begin_inset Quotes erd
22724 , a fancy German font specifically designed for dropped capitals.
22725 The fourth argument is the letter (or letters) to be dropped.
22730 package also offers the
22736 command, as well as a slightly simplified
22745 \begin_layout Section
22746 Non-standard Paragraph Shapes
22749 \begin_layout Standard
22755 \begin_layout Standard
22756 \begin_inset VSpace bigskip
22762 \begin_layout Standard
22766 \begin_layout Plain Layout
22778 \begin_layout Standard
22782 \begin_layout Plain Layout
22791 \begin_layout Plain Layout
22805 \begin_layout Standard
22810 \begin_layout Plain Layout
22821 \begin_layout Plain Layout
22830 \begin_layout Plain Layout
22839 \begin_layout Plain Layout
22848 \begin_layout Plain Layout
22857 \begin_layout Plain Layout
22866 \begin_layout Plain Layout
22875 \begin_layout Plain Layout
22884 \begin_layout Plain Layout
22893 \begin_layout Plain Layout
22902 \begin_layout Plain Layout
22911 \begin_layout Plain Layout
22920 \begin_layout Plain Layout
22929 \begin_layout Plain Layout
22938 \begin_layout Plain Layout
22947 \begin_layout Plain Layout
22956 \begin_layout Plain Layout
22965 \begin_layout Plain Layout
22974 \begin_layout Plain Layout
22983 \begin_layout Plain Layout
22989 There are times when the tyranny of rectangular paragraphs must be overthrown.
22990 In such situations, a call to the delightful plain TeX command
22997 As you can see, completely arbitrary shapes can be laid out with a suitable
22998 set of linelength definitions.
22999 While this parshape may look a bit silly and useless, one could conceive
23000 of situations such as finely tuned dropped capitals, word wrapping around
23001 non-rectangular graphics, etc.
23002 which will benefit from such handcrafting.
23005 \begin_layout Standard
23006 \begin_inset VSpace bigskip
23012 \begin_layout Standard
23017 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23024 is the number of lines of text which define the paragraph.
23025 If there turn out to be fewer lines, the shape is truncated; if there are
23026 more, the excess lines have the same dimensions as the last line of the
23036 entries specify the indentation of the line from the left margin, and the
23037 length of the line as measured from that point.
23038 The shape applies only to the current paragraph; everything is reset to
23039 normal for the next paragraph.
23042 \begin_layout Standard
23046 \begin_layout Plain Layout
23058 \begin_layout Section
23062 \begin_layout Standard
23063 As you can see, the examples in this section range from the useful to the
23065 While I don't expect that anyone will ever need the paragraph shape demonstrate
23066 d in the last section, the important point is that you can do almost anything
23067 you want in LyX if you are willing to figure out how to do it in TeX and
23069 TeX is a fantastically powerful typesetting system and all that power is
23070 available to you since LyX uses it as its backend.