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
56 InsetLayout CharStyle:MenuItem
65 \newcommand*{\menuitem}[1]{{\sffamily #1}}
73 \font_typewriter default
74 \font_default_family default
82 \default_output_format default
83 \bibtex_command default
84 \index_command default
88 \pdf_title "LyX's Additional Features manual"
89 \pdf_author "LyX Team"
90 \pdf_subject "LyX's additional features documentation"
91 \pdf_keywords "LyX, Documentation, Additional"
93 \pdf_bookmarksnumbered true
94 \pdf_bookmarksopen false
95 \pdf_bookmarksopenlevel 1
100 \pdf_pdfusetitle false
101 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false, pdfpagelabels"
109 \paperorientation portrait
117 \paragraph_separation indent
118 \paragraph_indentation default
119 \quotes_language english
122 \paperpagestyle headings
123 \tracking_changes false
124 \output_changes false
130 Additional LyX Features
138 \begin_layout Plain Layout
140 Principal maintainer of this file is
145 If you have comments or error corrections, please send them to the LyX
146 Documentation mailing list,
147 \begin_inset Flex CharStyle:Code
150 \begin_layout Plain Layout
152 <lyx-docs@lists.lyx.org>
165 \begin_layout Standard
166 \begin_inset CommandInset toc
167 LatexCommand tableofcontents
174 \begin_layout Chapter
178 \begin_layout Standard
179 This manual is essentially Part II of the
181 User's Guide\SpecialChar \@.
184 The reason for separating this document out is simple: the
188 is already quite lengthy, and it contains information on all of the basic
189 features one needs to know in order to prepare most documents.
190 However, the LyX Team has worked to LyX extensible through various configuratio
191 n files and external packages.
192 That means that if you want to support the Fizzwizzle LaTeX package, you
193 can create a layout file (or module) for it without having to alter LyX
195 We've already had contributions of several new features this way.
196 This is the place where all of those get documented.
199 \begin_layout Standard
200 This manual also documents some special features, like fax support, version
201 control, and SGML support, which require additional software to work properly.
202 Lastly, there's a chapter of LaTeX tools and tips, things you can use to
203 spruce up your documents by directly using the powerful features of LaTeX.
208 only WYSIWYM and will only ever interface to some, not all, LaTeX features.
211 \begin_layout Standard
212 If you haven't read the
216 yet, you are definitely in the wrong manual.
221 is the first place to go, since it describes the notation and format of
223 You should also be thoroughly familiar with the
227 and all of the basic features of LyX before attempting to read this one.
230 \begin_layout Standard
231 Since all the topics in this manual depend heavily on LyX's interaction
232 with LaTeX, this first chapter covers the inner workings of LyX and how
233 to direct LyX to generate exactly the LaTeX code you want.
234 It is obviously for more seasoned LyX users.
237 \begin_layout Chapter
241 \begin_layout Section
245 \begin_layout Standard
246 This chapter is for both TeX-nicians and the LaTeX-curious.
247 In it, we'll explain how LyX and LaTeX work together to produce printable
249 This is the only place in any of the manuals where we assume you know something
253 \begin_layout Standard
254 At one time, LyX was called a
255 \begin_inset Quotes eld
258 WYSIWYM frontend to LaTeX,
259 \begin_inset Quotes erd
262 but that's no longer true.
263 There are frontends to LaTeX out there.
267 \begin_layout Plain Layout
268 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
269 There are also the LaTeX modes for vi and emacs, of course.
274 These are basically text editors with the ability to run LaTeX and mark
275 any errors in the file you're editing.
284 run LaTeX, and it also indicates errors in the file, it also does much,
286 For one thing, you don't need to know LaTeX to use LyX effectively.
287 And LyX has added its own extensions to LaTeX.
288 Try the following sometime: select
289 \begin_inset Flex CharStyle:MenuItem
292 \begin_layout Plain Layout
293 Export\SpecialChar \menuseparator
300 \begin_inset Flex CharStyle:MenuItem
303 \begin_layout Plain Layout
310 \begin_inset Flex CharStyle:MenuItem
313 \begin_layout Plain Layout
314 View\SpecialChar \menuseparator
320 ), then look at the preamble of the resulting
321 \begin_inset Flex CharStyle:Code
324 \begin_layout Plain Layout
331 You'll notice a variety of new macros defined specifically by LyX.
332 These macros are defined automatically, according to the features you use
336 \begin_layout Standard
337 There are several commands that automatically invoke LaTeX.
341 \begin_layout Itemize
342 \begin_inset Flex CharStyle:MenuItem
345 \begin_layout Plain Layout
346 View\SpecialChar \menuseparator
355 \begin_layout Itemize
356 \begin_inset Flex CharStyle:MenuItem
359 \begin_layout Plain Layout
360 View\SpecialChar \menuseparator
361 Update\SpecialChar \menuseparator
370 \begin_layout Itemize
371 \begin_inset Flex CharStyle:MenuItem
374 \begin_layout Plain Layout
375 File\SpecialChar \menuseparator
384 \begin_layout Itemize
385 \begin_inset Flex CharStyle:MenuItem
388 \begin_layout Plain Layout
389 File\SpecialChar \menuseparator
398 \begin_layout Standard
399 They will only invoke LaTeX if the file has changed since the last time
404 \begin_layout Standard
405 When LyX runs LaTeX on the file you're editing, it performs these steps:
408 \begin_layout Enumerate
409 Convert the document to LaTeX and save to a file with the extension
410 \begin_inset Flex CharStyle:Code
413 \begin_layout Plain Layout
420 \begin_inset Flex CharStyle:Code
423 \begin_layout Plain Layout
432 \begin_layout Enumerate
434 \begin_inset Flex CharStyle:Code
437 \begin_layout Plain Layout
443 file (maybe several times), and run any other commands (such as
444 \begin_inset Flex CharStyle:Code
447 \begin_layout Plain Layout
454 \begin_inset Flex CharStyle:Code
457 \begin_layout Plain Layout
463 ) needed to compile the LaTeX file.
466 \begin_layout Enumerate
467 If there are any errors, show the error log.
470 \begin_layout Standard
471 If you've run LaTeX using
472 \begin_inset Flex CharStyle:MenuItem
475 \begin_layout Plain Layout
478 \SpecialChar \menuseparator
486 , LyX then runs a DVI viewer to display the DVI-file.
488 \begin_inset Flex CharStyle:MenuItem
491 \begin_layout Plain Layout
494 \SpecialChar \menuseparator
502 , LyX performs further steps:
505 \begin_layout Itemize
507 \begin_inset Flex CharStyle:Code
510 \begin_layout Plain Layout
516 to convert the DVI file to PostScript.
519 \begin_layout Itemize
520 Run a PostScript viewer, such as
521 \begin_inset Flex CharStyle:Code
524 \begin_layout Plain Layout
530 , to display the PostScript file.
533 \begin_layout Standard
534 LyX does similar things when viewing, or exporting, other formats.
537 \begin_layout Section
538 Translating LaTeX files into LyX
541 \begin_layout Standard
542 You can import a LaTeX file into LyX by using the
543 \begin_inset Flex CharStyle:MenuItem
546 \begin_layout Plain Layout
547 File\SpecialChar \menuseparator
548 Import\SpecialChar \menuseparator
555 This will call a program named
556 \begin_inset Flex CharStyle:Code
559 \begin_layout Plain Layout
565 which will create a file
566 \begin_inset Flex CharStyle:Code
569 \begin_layout Plain Layout
576 \begin_inset Flex CharStyle:Code
579 \begin_layout Plain Layout
586 LyX will then open that file.
590 \begin_layout Plain Layout
591 \begin_inset Flex CharStyle:Code
594 \begin_layout Plain Layout
600 can also be run from the command line, of course.
608 \begin_layout Standard
609 \begin_inset Flex CharStyle:Code
612 \begin_layout Plain Layout
618 will translate most legal LaTeX, but not everything.
619 It will put things it doesn't understand into TeX code, so after translating
621 \begin_inset Flex CharStyle:Code
624 \begin_layout Plain Layout
630 , you can look for TeX code and hand-edit it until it looks right.
633 \begin_layout Standard
634 If you don't know what TeX code is, read the next section.
637 \begin_layout Section
638 \begin_inset CommandInset label
640 name "sec:Inserting-TeX-Code"
644 Inserting TeX Code into LyX Documents
647 \begin_layout Standard
648 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
649 You can always insert TeX code into any LyX document.
650 LyX cannot, and will never be able to, display every possible LaTeX construct.
651 If ever you need to insert LaTeX commands into your LyX document, you can
653 \begin_inset Flex CharStyle:Code
656 \begin_layout Plain Layout
662 box, which you can insert into your document with
663 \begin_inset Flex CharStyle:MenuItem
666 \begin_layout Plain Layout
667 Insert\SpecialChar \menuseparator
676 \begin_layout Standard
677 Here's an example of inserting LaTeX commands in a LyX document.
678 The code looks like this:
681 \begin_layout LyX-Code
685 \begin_inset Newline newline
691 \begin_inset Newline newline
694 This is an example for a minipage environment.
696 \begin_inset Newline newline
699 can put nearly everything in it, even (non-floating)
700 \begin_inset Newline newline
705 \begin_inset Newline newline
711 \begin_inset Newline newline
715 \begin_inset Newline newline
721 \begin_inset Newline newline
727 \begin_inset Newline newline
733 \begin_inset Newline newline
738 \begin_inset Newline newline
744 \begin_inset Newline newline
750 \begin_inset Newline newline
756 \begin_inset Newline newline
764 \begin_layout LyX-Code
768 \begin_layout Standard
770 \begin_inset Flex CharStyle:Code
773 \begin_layout Plain Layout
779 box containing this text is directly after this paragraph.
780 Those of you reading the manual in LyX will only see the TeX code inset.
781 Those reading a printed version of the manuals will see the actual results:
784 \begin_layout Standard
788 \begin_layout Plain Layout
795 \begin_layout Plain Layout
802 \begin_layout Plain Layout
804 This is an example for a minipage environment.
805 You can put nearly everything in it, even (non-floating) figures and tables.
809 \begin_layout Plain Layout
816 \begin_layout Plain Layout
821 \begin_layout Plain Layout
828 \begin_layout Plain Layout
835 \begin_layout Plain Layout
842 \begin_layout Plain Layout
848 \begin_layout Plain Layout
855 \begin_layout Plain Layout
862 \begin_layout Plain Layout
869 \begin_layout Plain Layout
881 \begin_layout Standard
882 In addition to using TeX code, you can also create a separate file containing
883 some complex LaTeX structure and then use
884 \begin_inset Flex CharStyle:MenuItem
887 \begin_layout Plain Layout
888 Insert\SpecialChar \menuseparator
898 to include your file (you should select the type
899 \begin_inset Flex CharStyle:Code
902 \begin_layout Plain Layout
909 We recommend that you only do this if you have a
910 \begin_inset Flex CharStyle:Code
913 \begin_layout Plain Layout
924 Otherwise, you'll have a big job tracking down LaTeX errors.
927 \begin_layout Standard
928 There are a few last points to emphasize:
931 \begin_layout Itemize
936 check if your LaTeX code is correct.
939 \begin_layout Itemize
940 Beware reinventing the wheel.
943 \begin_layout Standard
944 On that last point, LyX does have quite a few features tucked into it, and
946 Be sure to check the manuals to make sure that LyX doesn't have such-and-such
947 feature before you decide you have to do it by hand.
948 Moreover, there are numerous LaTeX packages out there to do all sorts of
949 things, from labels to envelopes to fancy multipage tables.
951 \begin_inset CommandInset href
954 target "http://www.ctan.org/"
958 for details, and see chapter
959 \begin_inset CommandInset ref
961 reference "cha:secrets"
968 \begin_layout Standard
969 If you do need to do some wild and fancy things within your document, be
970 sure to check out a good LaTeX book for assistance.
971 There are a number of them listed in the bibliography of the
978 \begin_layout Section
979 LyX and the LaTeX Preamble
982 \begin_layout Subsection
983 About the LaTeX Preamble
986 \begin_layout Standard
987 If you already know LaTeX, there is no need to explain here what the preamble
989 If you don't, the following will give you some ideas—we recommend again
990 that you consult a LaTeX book for further information.
991 In any case, you should read the points below, because they explain what
992 you can do and what you don't need to do in the LaTeX preamble of a LyX
996 \begin_layout Standard
997 The LaTeX preamble comes at the very beginning of a document,
1005 \begin_layout Itemize
1006 Declare the document class.
1008 \begin_inset Newline newline
1011 LyX already does this for you.
1012 If you're a seasoned LaTeX-nician, and you have a custom document class
1013 you want to use, check out the
1015 Customization Manual
1017 for information on how to make LyX interface to it.
1020 \begin_layout Itemize
1021 Declare the usage of packages.
1023 \begin_inset Newline newline
1026 LaTeX packages provide special commands, which are only available within
1027 a document when the package has been declared in the preamble.
1028 For example, the package
1029 \begin_inset Flex CharStyle:Code
1032 \begin_layout Plain Layout
1038 forces all paragraphs to be indented.
1039 There are other packages for labels, envelopes, margins, etc.
1043 \begin_layout Itemize
1044 Set counters, variables, lengths and widths.
1046 \begin_inset Newline newline
1049 There are several LaTeX counters and variables which
1053 be set globally from within the preamble in order to have the desired effect.
1054 (There are variables which you can set and reset inside the document, too.)
1055 Margins are a good example of something which must be set in the preamble.
1056 Another example is the label format for lists.
1057 You can actually set these just about anywhere, but it's best to do it
1058 just once, inside the preamble.
1061 \begin_layout Itemize
1062 Declare user defined commands (with
1063 \begin_inset Flex CharStyle:Code
1066 \begin_layout Plain Layout
1075 \begin_inset Flex CharStyle:Code
1078 \begin_layout Plain Layout
1087 \begin_inset Newline newline
1090 These are abbreviations for LaTeX commands which appear very often inside
1092 Although the preamble is a good place to declare such commands, they
1096 be declared anywhere (before they are used for the first time, of course).
1097 This can be useful if there is a lot of raw LaTeX code in your document,
1098 which normally should not be the case.
1101 \begin_layout Standard
1102 LyX adds its own set of definitions to the preamble of the
1103 \begin_inset Flex CharStyle:Code
1106 \begin_layout Plain Layout
1113 This makes LaTeX files generated by LyX portable.
1116 \begin_layout Subsection
1117 Changing the Preamble
1120 \begin_layout Standard
1121 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1122 can't change them without patching LyX itself.
1123 You can, however, add your own stuff to the preamble by selecting
1124 \begin_inset Flex CharStyle:MenuItem
1127 \begin_layout Plain Layout
1129 \begin_inset space ~
1138 \begin_inset Flex CharStyle:MenuItem
1141 \begin_layout Plain Layout
1142 Document\SpecialChar \menuseparator
1149 LyX adds anything in the
1150 \begin_inset Flex CharStyle:MenuItem
1153 \begin_layout Plain Layout
1159 dialog to its own built-in preamble.
1160 Before adding your own declarations in the preamble, you should make sure
1161 that LyX doesn't already support what you want to do.
1162 (Remember what we said about reinventing the wheel?) Also,
1164 make sure your preamble code is correct
1167 LyX doesn't check it for you.
1168 If there is an error, you're likely to get an error like
1169 \begin_inset Quotes eld
1173 \begin_inset Flex CharStyle:Code
1176 \begin_layout Plain Layout
1185 \begin_inset Quotes erd
1189 If you see this error, check your preamble.
1192 \begin_layout Subsection
1196 \begin_layout Standard
1197 Here are some examples of what you can add to a preamble, and what they
1201 \begin_layout Subsubsection
1205 \begin_layout Standard
1206 There are two variables under LaTeX that control page position:
1207 \begin_inset Flex CharStyle:Code
1210 \begin_layout Plain Layout
1219 \begin_inset Flex CharStyle:Code
1222 \begin_layout Plain Layout
1231 Their names should be self-explanatory.
1232 These variables are useful if you think for a moment about computer labels.
1233 Sometimes, the size of a print medium and the area of the medium that you
1234 can actually print on aren't the same.
1236 \begin_inset Flex CharStyle:Code
1239 \begin_layout Plain Layout
1248 \begin_inset Flex CharStyle:Code
1251 \begin_layout Plain Layout
1262 \begin_layout Standard
1263 The default values for
1264 \begin_inset Flex CharStyle:Code
1267 \begin_layout Plain Layout
1276 \begin_inset Flex CharStyle:Code
1279 \begin_layout Plain Layout
1288 \begin_inset space \thinspace{}
1292 \begin_inset space \thinspace{}
1296 \begin_inset space \space{}
1299 the page isn't shifted.
1300 Unfortunately, some DVI drivers always seem to shift the page.
1301 We have no idea why, or why the sysadmin hasn't fixed such behavior.
1302 If you're using LyX on a system that you don't personally maintain, and
1303 your sysadmin is a doofus,
1304 \begin_inset Flex CharStyle:Code
1307 \begin_layout Plain Layout
1316 \begin_inset Flex CharStyle:Code
1319 \begin_layout Plain Layout
1328 Suppose you're left and top margins are always 0.5
1329 \begin_inset space \thinspace{}
1333 You can add this to the preamble:
1336 \begin_layout LyX-Code
1344 \begin_layout LyX-Code
1352 \begin_layout Standard
1353 and your margins should now be correct.
1356 \begin_layout Subsubsection
1360 \begin_layout Standard
1361 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1362 There's a rather nice package, available at your nearest CTAN archive,
1363 for printing sheets of labels:
1364 \begin_inset Flex CharStyle:Code
1367 \begin_layout Plain Layout
1374 Now, your system may not have this package installed by default.
1375 We leave that up to you to check.
1376 You'll also want to read the documentation for it; we're not going to do
1378 Since this is an example, however, we'll give you an example of how you
1382 \begin_layout Standard
1383 First, make sure you're using the
1384 \begin_inset Flex CharStyle:Code
1387 \begin_layout Plain Layout
1394 Next, you need to put the following in your preamble:
1397 \begin_layout LyX-Code
1403 \begin_layout LyX-Code
1409 \begin_layout LyX-Code
1415 \begin_layout LyX-Code
1421 \begin_layout LyX-Code
1427 \begin_layout LyX-Code
1433 \begin_layout LyX-Code
1439 \begin_layout Standard
1440 This sets things up for Avery label sheets, stock #5360.
1441 You're now ready to print labels, but you'll need to insert LaTeX code,
1442 placing the commands
1443 \begin_inset Flex CharStyle:Code
1446 \begin_layout Plain Layout
1455 \begin_inset Flex CharStyle:Code
1458 \begin_layout Plain Layout
1466 around each label text.
1467 This and other special features of
1468 \begin_inset Flex CharStyle:Code
1471 \begin_layout Plain Layout
1477 are explained in its documentation.
1480 \begin_layout Standard
1481 Someday, someone may write a LyX layout file to support this package directly.
1482 Maybe that someone is you.
1485 \begin_layout Subsubsection
1486 Example #3: Paragraph Indentation
1489 \begin_layout Standard
1490 Americans are trained to indent the first line of
1495 As with all of their other weird quirks, most Americans will whine and
1496 moan until they can have their way and indent the first line of all paragraphs.
1505 \begin_layout Standard
1506 Of course, this behavior isn't standard typography.
1507 In books, you typically only indent the first line of a paragraph
1511 it follows another one.
1512 The idea behind indenting the first line of a paragraph is to distinguish
1513 neighboring paragraphs from one another.
1514 If there is no previous paragraph—for example, if it follows a figure or
1515 is the first paragraph in a section—then there is no need for indentation.
1519 \begin_layout Standard
1520 If you're a typical American (we're still joking!), though, you don't care
1521 about such esoteric things; you want your indentation! Add this to the
1525 \begin_layout LyX-Code
1528 usepackage{indentfirst}
1531 \begin_layout Standard
1532 If your TeX distribution isn't braindead, you'll have this package, and
1533 all of your paragraphs will get the indentation the Founding Fathers intended
1537 \begin_layout Subsubsection
1538 Example #4: This Document
1541 \begin_layout Standard
1542 You can also check out the preamble of this document to get an idea of some
1543 of the advanced things you can do.
1544 Also, there are more examples and an assortment of LaTeX
1545 \begin_inset Quotes eld
1549 \begin_inset Quotes erd
1553 \begin_inset space ~
1557 \begin_inset CommandInset ref
1559 reference "cha:secrets"
1567 \begin_layout Section
1568 LyX and LaTeX Errors
1571 \begin_layout Standard
1572 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1574 It then uses the logfile from the LaTeX run to do a post-mortem.
1575 After analyzing the logfile,LyX displays a dialog listing the errors.
1576 Clicking on any one of them will take you to the position in your LyX file
1577 where the error occurred.
1581 \begin_layout Plain Layout
1583 Analyzing the logfile is a tough job, and LyX doesn't always go to the
1585 There are also cases where LaTeX reports the error on one line, but the
1586 actual error is earlier.
1587 This is not unlike forgetting a closing brace in a program: You'll get
1588 an error, but only later.
1596 \begin_layout Standard
1597 Some folks also like to look at the log file directly: It is available from
1599 \begin_inset Flex CharStyle:MenuItem
1602 \begin_layout Plain Layout
1605 \SpecialChar \menuseparator
1609 \begin_inset space ~
1618 There are some fairly common error messages and warnings.
1619 We'll cover those here.
1620 You should look at a good LaTeX book for a complete listing.
1623 \begin_layout Itemize
1624 \begin_inset Flex CharStyle:Code
1627 \begin_layout Plain Layout
1634 \begin_inset Newline newline
1637 Anything beginning with these words is a warning message for the purpose
1639 \begin_inset Quotes eld
1643 \begin_inset Quotes erd
1646 the LaTeX code itself.
1647 You'll get messages like this if you added or changed cross-references
1648 or bibliography entries, in which case, LaTeX is trying to tell you that
1649 you need to make another run.
1650 You can by-and-large ignore these.
1653 \begin_layout Itemize
1654 \begin_inset Flex CharStyle:Code
1657 \begin_layout Plain Layout
1664 \begin_inset Newline newline
1667 Another warning message, this time about fonts which LaTeX couldn't find.
1668 The rest of the message will often say something about a replacement font
1670 You can safely ignore these, too.
1673 \begin_layout Itemize
1674 \begin_inset Flex CharStyle:Code
1677 \begin_layout Plain Layout
1686 \begin_inset Newline newline
1694 They are warnings about lines that were too long and run past the right
1696 Almost always, this is unnoticeable in the final output.
1697 (It can be just a point or two.) Or, only one or two characters extend past
1699 LaTeX seems to generate at least one of these messages for just about any
1701 \begin_inset Newline newline
1704 You can ignore these messages.
1705 Your eyes will tell you if there's a problem with something that's too
1706 wide; just look at the output.
1710 \begin_layout Plain Layout
1711 You can also enable the `draft' option in
1712 \begin_inset Flex CharStyle:MenuItem
1715 \begin_layout Plain Layout
1718 \SpecialChar \menuseparator
1726 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1734 \begin_layout Itemize
1735 \begin_inset Flex CharStyle:Code
1738 \begin_layout Plain Layout
1747 \begin_inset Newline newline
1750 Not quite as common as its cousin.
1751 LaTeX seems to like to print lines that are a bit too wide as opposed to
1752 ones that are a bit too narrow.
1753 We have no idea why.
1756 \begin_layout Itemize
1757 \begin_inset Flex CharStyle:Code
1760 \begin_layout Plain Layout
1769 \begin_inset Flex CharStyle:Code
1772 \begin_layout Plain Layout
1781 \begin_inset Newline newline
1784 Warnings about troubles breaking the page.
1785 Once again, just look at the output.
1786 Your eyes will tell you where something has gone wrong.
1789 \begin_layout Itemize
1790 \begin_inset Flex CharStyle:Code
1793 \begin_layout Plain Layout
1795 \begin_inset Quotes els
1799 \begin_inset Quotes ers
1808 \begin_inset Newline newline
1812 \begin_inset Quotes eld
1816 \begin_inset Quotes erd
1819 isn't installed on this system.
1820 This usually appears because some package your document needs isn't installed.
1821 If you didn't touch the preamble or didn't use the
1822 \begin_inset Flex CharStyle:Code
1825 \begin_layout Plain Layout
1833 command, then one of the packages LyX tried to load is missing.
1835 \begin_inset Flex CharStyle:MenuItem
1838 \begin_layout Plain Layout
1839 Help\SpecialChar \menuseparator
1845 to get a list of packages that LyX knows about.
1846 This file is updated whenever you reconfigure LyX (using
1847 \begin_inset Flex CharStyle:MenuItem
1850 \begin_layout Plain Layout
1851 Tools\SpecialChar \menuseparator
1857 ) and tells you which packages have been detected and what they do.
1858 \begin_inset Newline newline
1862 \begin_inset Flex CharStyle:Code
1865 \begin_layout Plain Layout
1873 command and the package in question isn't installed, then you'll need to
1874 install it yourself.
1877 \begin_layout Itemize
1878 \begin_inset Flex CharStyle:Code
1881 \begin_layout Plain Layout
1882 LaTeX Error: Unknown option
1888 \begin_inset Newline newline
1891 Error messages beginning with this are trying to tell you that you specified
1892 a bad or undefined option to a package.
1893 Check the package's documentation.
1896 \begin_layout Itemize
1897 \begin_inset Flex CharStyle:Code
1900 \begin_layout Plain Layout
1901 Undefined control sequence
1907 \begin_inset Newline newline
1910 If you've inserted LaTeX code into your document, but made a typo, you'll
1912 You may have forgotten to load a package.
1913 In any case, this error message usually means that you used an undefined
1918 \begin_layout Standard
1919 There are other error and warning messages.
1920 Some are self-explanatory.
1921 These are usually LaTeX messages.
1922 Others are downright cryptic.
1923 These are usually TeX error messages, and we really have
1927 what they mean or how to decipher them.
1931 \begin_layout Standard
1932 There's a general sequence you should follow if you get error messages:
1935 \begin_layout Enumerate
1936 Look at the LaTeX code you inserted for typos.
1939 \begin_layout Enumerate
1940 If there are no typos, check that you used the command(s) correctly.
1943 \begin_layout Enumerate
1944 If you get a bunch of error boxes piled up at the very top of the document—and
1945 especially if you see a
1946 \begin_inset Quotes eld
1950 \begin_inset Flex CharStyle:Code
1953 \begin_layout Plain Layout
1962 \begin_inset Quotes erd
1965 error—it means that there are errors in the preamble.
1966 Start debugging your preamble.
1969 \begin_layout Enumerate
1970 If you didn't add anything to the preamble and didn't add any LaTeX code
1971 to the document, the first suspect is your LaTeX distribution itself.
1972 Check for missing packages and install them.
1975 \begin_layout Enumerate
1976 Okay, so there are no missing packages.
1977 Did you use any of the fine-tuning options in LyX? Specifically, did you
1982 any of them, like trying to manually insert lots of
1983 \begin_inset Flex CharStyle:Code
1986 \begin_layout Plain Layout
1988 \begin_inset space ~
1997 \begin_inset Flex CharStyle:Code
2000 \begin_layout Plain Layout
2007 \begin_inset Flex CharStyle:Code
2010 \begin_layout Plain Layout
2016 ? Did you try to kludge something together with these instead of using the
2017 appropriate paragraph environment?
2020 \begin_layout Enumerate
2021 All right, you didn't use any of the fine-tuning options, you played by
2023 Did you try to pull a fancy maneuver? Did you do something funky inside
2024 a table or an equation, like inserting a graphic into a table cell?
2027 \begin_layout Enumerate
2028 Do you have long sections of text where LaTeX cannot find a place to break
2029 a line? By default, LaTeX is rather strict about how much extra inter-word
2030 spacing it will add in order to break a line.
2031 Preferably, you should rework the paragraph to avoid the problem.
2032 If this isn't an option, you can wrap your text in
2033 \begin_inset Flex CharStyle:Code
2036 \begin_layout Plain Layout
2044 to make LaTeX's line breaking more, well, sloppy.
2047 \begin_layout Enumerate
2048 Did you go overboard with the nesting? LyX (currently) doesn't check to
2049 make sure you're in the limits for nesting environments.
2050 If you nested a bunch of environments to the
2051 \begin_inset Formula $17^{\mathrm{th}}$
2054 level, that's the problem.
2055 (The limit in LaTeX is five.)
2058 \begin_layout Enumerate
2059 Okay, you didn't get any error messages, but your output looks awful.
2060 If you have a table or figure that's too wide or long for the page, you
2065 \begin_layout Enumerate
2066 rescale the figure so it fits.
2069 \begin_layout Enumerate
2070 trim down the table so it fits.
2074 \begin_layout Enumerate
2075 If something else is wrong with the output, and you didn't try to pull anything
2076 fancy or kludge the fine-tuning options, we're not sure what's wrong.
2079 \begin_layout Standard
2080 If all this doesn't help—well, then
2084 you might have found a bug in LyX\SpecialChar \ldots{}
2088 \begin_layout Chapter
2092 \begin_layout Section
2093 Customizing Bibliographies with BibTeX
2096 \begin_layout Standard
2097 The basics how to use BibTeX are explained in section
2099 Bibliography databases (BibTeX)
2106 The following subsections explain special bibliography features supported
2110 \begin_layout Subsection
2111 Alternative Citation Styles
2114 \begin_layout Standard
2115 Standard BibTeX uses numbers (e.
2116 \begin_inset space \thinspace{}
2120 \begin_inset space \space{}
2124 \begin_inset Quotes eld
2128 \begin_inset Quotes erd
2131 ) to refer to a cited work.
2132 However, in many scientific disciplines, other citation styles are in use.
2133 The most common one is the author-year style (e.
2134 \begin_inset space \thinspace{}
2138 \begin_inset space \space{}
2142 \begin_inset Quotes eld
2146 \begin_inset Quotes erd
2150 LyX supports two packages that provide this style,
2151 \begin_inset Flex CharStyle:Code
2154 \begin_layout Plain Layout
2161 \begin_inset Flex CharStyle:Code
2164 \begin_layout Plain Layout
2171 Both packages have their pros and cons, which cannot be listed in detail.
2172 If you only want to have simple author-year (or author-numerical) style,
2173 or if you want to use one of the countless style files for
2174 \begin_inset Flex CharStyle:Code
2177 \begin_layout Plain Layout
2183 , than the established
2184 \begin_inset Flex CharStyle:Code
2187 \begin_layout Plain Layout
2193 package is probably your choice.
2194 If you need special features like short title references, ibidem etc., you
2196 \begin_inset Flex CharStyle:Code
2199 \begin_layout Plain Layout
2208 \begin_layout Standard
2209 The handling of both packages in LyX is basically the same.
2211 \begin_inset Flex CharStyle:MenuItem
2214 \begin_layout Plain Layout
2215 Document\SpecialChar \menuseparator
2222 \begin_inset Flex CharStyle:MenuItem
2225 \begin_layout Plain Layout
2232 \begin_inset Flex CharStyle:MenuItem
2235 \begin_layout Plain Layout
2242 \begin_inset Flex CharStyle:MenuItem
2245 \begin_layout Plain Layout
2252 With both packages, you will get some extra features in the citation dialog
2253 and you can select the style of the reference (
2254 \begin_inset Quotes eld
2258 \begin_inset Quotes erd
2262 \begin_inset Quotes eld
2266 \begin_inset Quotes erd
2270 \begin_inset Quotes eld
2274 \begin_inset Quotes erd
2278 \begin_inset Quotes eld
2282 \begin_inset Quotes erd
2286 Note that both packages need specifically designed style files.
2287 They both ship their own, but there are lots of additional style files,
2288 and there is even an interactive style file builder
2292 \begin_layout Plain Layout
2294 \begin_inset Flex URL
2297 \begin_layout Plain Layout
2299 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2310 \begin_inset Flex CharStyle:Code
2313 \begin_layout Plain Layout
2322 \begin_layout Subsection
2323 Sectioned Bibliographies
2326 \begin_layout Standard
2327 Sometimes you might need to divide your bibliography into several sections.
2328 If you are for instance a historian, the possibility to separate sources
2329 and scientific works is most likely a
2330 \begin_inset Quotes eld
2334 \begin_inset Quotes erd
2338 Unfortunately, BibTeX itself does not allow you to do this.
2339 But with the help of some LaTeX packages, BibTeX can be extended to fit
2343 \begin_layout Standard
2344 LyX provides native support for one of these packages,
2352 \begin_layout Plain Layout
2354 \begin_inset Flex URL
2357 \begin_layout Plain Layout
2359 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2369 The advantage of this package (compared to other packages like
2373 ) is that you don't need to define new citation commands.
2374 Instead, you need to prepare different bibliographic databases which include
2375 the entries for the different sections of the bibliography.
2376 For example: If you want to divide your bibliography into the sections
2378 \begin_inset Quotes eld
2382 \begin_inset Quotes erd
2386 \begin_inset Quotes eld
2390 \begin_inset Quotes erd
2393 , you first need to create two bibliographic databases, e.
2394 \begin_inset space \thinspace{}
2398 \begin_inset space \space{}
2402 \begin_inset Flex CharStyle:Code
2405 \begin_layout Plain Layout
2412 \begin_inset Flex CharStyle:Code
2415 \begin_layout Plain Layout
2425 \begin_layout Standard
2427 \begin_inset Flex CharStyle:MenuItem
2430 \begin_layout Plain Layout
2431 Document\SpecialChar \menuseparator
2438 \begin_inset Flex CharStyle:MenuItem
2441 \begin_layout Plain Layout
2448 \begin_inset Flex CharStyle:MenuItem
2451 \begin_layout Plain Layout
2452 Sectioned bibliography
2458 Now you can insert multiple BibTeX bibliographies, one for each section
2459 of your bibliography.
2460 Returning to our example: Insert the BibTeX bibliography
2461 \begin_inset Flex CharStyle:Code
2464 \begin_layout Plain Layout
2470 and a second one for the database
2471 \begin_inset Flex CharStyle:Code
2474 \begin_layout Plain Layout
2481 You are free to use the same or different styles for each section.
2482 Additionally, you can chose if the bibliography section should contain
2484 \begin_inset Quotes eld
2487 all cited references
2488 \begin_inset Quotes erd
2491 of the specified database(s) (which is the default),
2492 \begin_inset Quotes eld
2495 all uncited references
2496 \begin_inset Quotes erd
2500 \begin_inset Quotes eld
2504 \begin_inset Quotes erd
2508 This might be useful if you would like to separate your bibliography into
2510 \begin_inset Quotes eld
2514 \begin_inset Quotes erd
2518 \begin_inset Quotes eld
2522 \begin_inset Quotes erd
2526 \begin_inset Quotes eld
2530 \begin_inset Quotes erd
2534 The titles for the sections can be added as ordinary sections or subsections.
2536 \begin_inset Flex CharStyle:Code
2539 \begin_layout Plain Layout
2545 removes the bibliography title, you have manually re-add that, too (as
2546 a chapter* or section*, for instance).
2549 \begin_layout Subsection
2550 Multiple Bibliographies
2553 \begin_layout Standard
2554 Multiple bibliographies, e.
2555 \begin_inset space \thinspace{}
2559 \begin_inset space \space{}
2562 a bibliography for each section or chapter of the document, are not supported
2565 \begin_inset Flex CharStyle:Code
2568 \begin_layout Plain Layout
2574 package, which is used for the creation of sectioned bibliographies in
2575 LyX (see the previous section), provides an easy way to solve this task,
2576 if you are willing to use some
2577 \begin_inset Flex CharStyle:MenuItem
2580 \begin_layout Plain Layout
2587 \begin_inset space ~
2591 \begin_inset CommandInset ref
2593 reference "sec:Inserting-TeX-Code"
2601 \begin_layout Plain Layout
2602 An alternative approach is to use the
2603 \begin_inset Flex CharStyle:Code
2606 \begin_layout Plain Layout
2613 \begin_inset Flex CharStyle:Code
2616 \begin_layout Plain Layout
2622 package, respectively.
2630 \begin_layout Standard
2632 \begin_inset Flex CharStyle:MenuItem
2635 \begin_layout Plain Layout
2636 Document\SpecialChar \menuseparator
2643 \begin_inset Flex CharStyle:MenuItem
2646 \begin_layout Plain Layout
2653 \begin_inset Flex CharStyle:MenuItem
2656 \begin_layout Plain Layout
2657 Sectioned bibliography
2663 In the document, you have to enclose the sections, which shall contain
2664 their own bibliography (including the BibTeX bibliography itself), between
2666 \begin_inset Flex CharStyle:Code
2669 \begin_layout Plain Layout
2678 \begin_inset Flex CharStyle:Code
2681 \begin_layout Plain Layout
2689 (those commands have to be inserted as TeX code).
2690 The bibliography will contain all references which have been cited in the
2692 \begin_inset Flex CharStyle:Code
2695 \begin_layout Plain Layout
2706 If you are using this approach, then every citation reference has to be
2708 \begin_inset Flex CharStyle:Code
2711 \begin_layout Plain Layout
2719 \begin_inset Flex CharStyle:Code
2722 \begin_layout Plain Layout
2731 \begin_layout Section
2735 \begin_layout Subsection
2739 \begin_layout Standard
2740 When you are working on a large file with many sections, it is often convenient
2741 to break up the document into several files, or perhaps you have something
2742 where a table may change from time to time, but the preceding text does
2744 In these cases, you should seriously consider using multipart documents.
2745 For example, scientific papers often have five major sections: the introduction
2746 , observations, results, discussion, and conclusion.
2747 Each of these could be its own separate LyX file, with one
2748 \begin_inset Quotes eld
2752 \begin_inset Quotes erd
2755 file which contains the title, authors, abstract, references, etc., plus
2756 the five included files.
2757 It is important to note that each of these files is a full LyX file which
2758 can be formatted and printed on its own, as well as included in a master
2760 Each of these files must have the same document class, however—don't attempt
2761 to mix book classes with article classes.
2762 You may also include LaTeX files; however, these files must not have their
2764 \begin_inset space \thinspace{}
2768 \begin_inset space \space{}
2771 everything up to and including the
2772 \begin_inset Flex CharStyle:Code
2775 \begin_layout Plain Layout
2784 \begin_inset Flex CharStyle:Code
2787 \begin_layout Plain Layout
2795 line must be deleted) or else errors will be generated when you try to
2799 \begin_layout Standard
2800 LyX allows you to include files quite easily with
2801 \begin_inset Flex CharStyle:MenuItem
2804 \begin_layout Plain Layout
2805 Insert\SpecialChar \menuseparator
2807 \begin_inset space ~
2816 When you click on this selection a small box is inserted into the file
2817 at the current cursor location.
2818 Clicking on the box raises a dialog which allows you to select the file
2819 to be included, and the method of its inclusion.
2823 \begin_layout Standard
2824 The file selection box should by now be obvious.
2825 The three inclusion methods are
2826 \begin_inset Quotes eld
2830 \begin_inset Quotes erd
2834 \begin_inset Quotes eld
2838 \begin_inset Quotes erd
2842 \begin_inset Quotes eld
2846 \begin_inset Quotes erd
2850 The difference between
2851 \begin_inset Quotes eld
2855 \begin_inset Quotes erd
2859 \begin_inset Quotes eld
2863 \begin_inset Quotes erd
2866 is really only meaningful to LaTeXperts, but the practical difference is
2867 that files which are
2868 \begin_inset Quotes eld
2872 \begin_inset Quotes erd
2875 are typeset beginning on a new page, while files which are
2876 \begin_inset Quotes eld
2880 \begin_inset Quotes erd
2883 are typeset starting on the current page.
2886 \begin_layout Standard
2887 Generally, the master file is converted into a full LaTeX file before typesettin
2888 g, while the included files are converted to LaTeX files which do not have
2889 all the preamble information.
2892 \begin_layout Standard
2894 \begin_inset Quotes eld
2898 \begin_inset Quotes erd
2901 included file allows you to include a file typeset exactly as it appears
2903 \begin_inset space \thinspace{}
2907 \begin_inset space \space{}
2911 \begin_inset Flex CharStyle:Code
2914 \begin_layout Plain Layout
2920 mode, with the characters set in a fixed-width typewriter font.
2921 Normally, spaces in this file are invisible, though two consecutive spaces
2922 are conserved, unlike LyX's normal treatment of spaces.
2923 However, setting the
2924 \begin_inset Flex CharStyle:MenuItem
2927 \begin_layout Plain Layout
2929 \begin_inset space ~
2933 \begin_inset space ~
2937 \begin_inset space ~
2945 checkbox typesets a mark to unambiguously define the presence of a space.
2949 \begin_layout Subsection
2950 Cross-References Between Files
2953 \begin_layout Standard
2954 \begin_inset Box Shadowbox
2963 height_special "totalheight"
2966 \begin_layout Plain Layout
2967 This section is somewhat out of date.
2968 Need to describe default master documents and how children are opened when
2978 \begin_layout Standard
2979 It is possible to set up cross-references between the different files.
2980 First, open all the files in question: let's call them A and B in a two
2981 file example, where B is included in A.
2982 Let's say you insert a label in A, then want to reference it in B.
2983 Open the cross-reference dialog in whilst in document B, and you can select
2985 \begin_inset Quotes eld
2989 \begin_inset Quotes erd
2995 \begin_layout Subsection
2996 Bibliography Lists in all Subdocuments
2999 \begin_layout Standard
3000 \begin_inset Box Frameless
3009 height_special "totalheight"
3012 \begin_layout Plain Layout
3013 This section also needs updating.
3014 There is now material about this on the wiki, and it could be copied here.
3022 \begin_layout Standard
3023 Copy the bibliography list with all entries to all subdocuments and transform
3025 This way LyX will find the
3026 \begin_inset Flex CharStyle:Code
3029 \begin_layout Plain Layout
3035 -files and you can easily insert references without making the bibliography
3039 \begin_layout Standard
3040 As the bibliography list is in a comment, LaTeX won't use use it and the
3041 references will look like this: [?], instead of like this: [1].
3042 One solution is to use the LaTeX-package
3043 \begin_inset Flex CharStyle:Code
3046 \begin_layout Plain Layout
3052 that will only include comments by processing the files separately.
3053 To do this, add in the LaTeX preamble of every subdocument the following:
3056 \begin_layout LyX-Code
3062 \begin_layout LyX-Code
3065 includecomment{comment}
3068 \begin_layout Standard
3070 \begin_inset Flex URL
3073 \begin_layout Plain Layout
3075 http://wiki.lyx.org/FAQ/Unsorted#toc31
3083 \begin_layout Section
3084 Fancy Headers and Footers
3087 \begin_layout Standard
3088 The default page layout is rather plain; for an
3089 \begin_inset Flex CharStyle:Code
3092 \begin_layout Plain Layout
3098 document class, all you get is a centered page number at the bottom of
3100 This document uses KOMA-script's book class, so it appears to be a bit
3102 But to really put on a show, you need to set the document page style to
3104 \begin_inset Quotes eld
3108 \begin_inset Quotes erd
3111 , as mentioned in the
3116 This section describes the LaTeX code you need to insert in your LaTeX
3117 preamble in order to get the desired effects.
3120 \begin_layout Standard
3121 For more information on fancy headers, see the
3122 \begin_inset Flex CharStyle:Code
3125 \begin_layout Plain Layout
3131 package documentation.
3132 This can be found in the file
3133 \begin_inset Flex CharStyle:Code
3136 \begin_layout Plain Layout
3142 , which should have been installed with your LaTeX distribution, or
3143 \begin_inset CommandInset href
3146 target "http://www.ctan.org/tex-archive/macros/latex/contrib/fancyhdr/"
3153 \begin_layout Standard
3154 The page header is divided into three fields, not surprisingly labeled
3155 \begin_inset Quotes eld
3159 \begin_inset Quotes erd
3163 \begin_inset Quotes eld
3167 \begin_inset Quotes erd
3171 \begin_inset Quotes eld
3175 \begin_inset Quotes erd
3179 The footer is also divided into these three fields.
3180 The LaTeX commands to set these fields in the simplest manner are
3181 \begin_inset Flex CharStyle:Code
3184 \begin_layout Plain Layout
3193 \begin_inset Flex CharStyle:Code
3196 \begin_layout Plain Layout
3205 \begin_inset Flex CharStyle:Code
3208 \begin_layout Plain Layout
3217 \begin_inset Flex CharStyle:Code
3220 \begin_layout Plain Layout
3229 Suppose you wish to put your name in the upper left hand corner of each
3231 Simply insert the following command in the preamble:
3234 \begin_layout Standard
3243 \begin_layout Standard
3244 You will now see your name in the upper left.
3245 If a field has a default entry that you would like to get rid of (often
3246 the page number appears in the central footer, simply include a command
3247 with a blank argument, e.
3248 \begin_inset space \thinspace{}
3254 \begin_layout Standard
3262 \begin_layout Standard
3263 Let's get really fancy: lets put the section number with the word
3264 \begin_inset Quotes eld
3268 \begin_inset Quotes erd
3272 \begin_inset space \thinspace{}
3276 \begin_inset space \space{}
3279 Section 3) in the upper left, the page number (e.
3280 \begin_inset space \thinspace{}
3284 \begin_inset space \space{}
3287 Page 4) in the upper right, your name in the lower left, and the date in
3289 The following commands should now appear in the preamble:
3292 \begin_layout Standard
3302 \begin_layout Standard
3310 \begin_layout Standard
3320 \begin_layout Standard
3329 \begin_layout Standard
3337 \begin_layout Standard
3347 \begin_layout Standard
3349 \begin_inset Flex CharStyle:Code
3352 \begin_layout Plain Layout
3361 \begin_inset Flex CharStyle:Code
3364 \begin_layout Plain Layout
3372 access LaTeX's section and page counters, and so print out the current
3373 section and page numbers.
3375 \begin_inset Flex CharStyle:Code
3378 \begin_layout Plain Layout
3386 simply prints out today's date.
3389 \begin_layout Standard
3390 The thicknesses of the horizontal rules drawn beneath the header and above
3391 the footer can also be modified.
3392 If you don't want one of the rules, set its thickness to 0.
3393 The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3399 \begin_inset Flex CharStyle:Code
3402 \begin_layout Plain Layout
3407 headrulewidth}{0.4pt}
3413 \begin_inset Flex CharStyle:Code
3416 \begin_layout Plain Layout
3421 footrulewidth}{0.4pt}
3426 to set the thicknesses.
3429 \begin_layout Standard
3430 You can switch the header/footer settings on and off for individual pages
3432 \begin_inset Flex CharStyle:Code
3435 \begin_layout Plain Layout
3438 thispagestyle{empty}
3444 \begin_inset Flex CharStyle:Code
3447 \begin_layout Plain Layout
3450 thispagestyle{plain}
3456 \begin_inset Flex CharStyle:Code
3459 \begin_layout Plain Layout
3462 thispagestyle{fancy}
3468 Simply insert them in the text on the page you want changed and mark them
3470 In fact, title pages are marked as plain by default, while following pages
3471 are marked fancy when using the global fancy setting.
3474 \begin_layout Standard
3475 As a final example, it is possible to include an image in the header or
3477 Suppose you want to put a company logo in the upper lefthand corner.
3478 You might try something like
3481 \begin_layout Standard
3490 includegraphics{logo.eps}}}
3493 \begin_layout Standard
3495 (you may need to preface this with
3496 \begin_inset Flex CharStyle:Code
3499 \begin_layout Plain Layout
3503 usepackage{graphics}
3508 if you don't include graphics elsewhere in your document).
3511 \begin_layout Section
3512 Itemize Bullet Selection
3513 \begin_inset CommandInset label
3522 \begin_layout Standard
3528 \begin_layout Subsection
3532 \begin_layout Standard
3533 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3534 Using this dialog you can easily specify what bullet shape to use at each
3535 level of an itemized list.
3536 These settings are document-wide so you won't be able to specify different
3537 sets of bullets for different paragraphs.
3541 \begin_layout Plain Layout
3542 Well, actually you can but you'll have to do it by hand.
3550 \begin_layout Subsection
3554 \begin_layout Standard
3555 Open the dialog by selecting the
3556 \begin_inset Flex CharStyle:MenuItem
3559 \begin_layout Plain Layout
3560 Document\SpecialChar \menuseparator
3566 menu item and then select the
3567 \begin_inset Flex CharStyle:MenuItem
3570 \begin_layout Plain Layout
3579 \begin_layout Standard
3580 The dialog provides you with a table of bullet shapes.
3581 A column of buttons on the left of the table provides access to the six
3582 different panels of bullet shapes.
3583 The row of buttons across the top is used to select which bullet depth
3585 A text entry under the table shows the currently selected bullet shape's
3586 LaTeX equivalent and this can be edited if desired.
3587 If you do modify the text you will also need to specify any needed packages
3588 in the LaTeX preamble.
3591 \begin_layout Standard
3592 The six panels are divided up by the packages they require.
3593 The following table shows the mappings from button name to LaTeX packages.
3596 \begin_layout Standard
3598 \begin_inset Tabular
3599 <lyxtabular version="3" rows="7" columns="2">
3600 <features tabularvalignment="middle">
3601 <column alignment="center" valignment="top" width="0pt">
3602 <column alignment="center" valignment="top" width="0pt">
3604 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3607 \begin_layout Plain Layout
3622 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3625 \begin_layout Plain Layout
3642 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3645 \begin_layout Plain Layout
3660 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3663 \begin_layout Plain Layout
3679 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3682 \begin_layout Plain Layout
3697 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3700 \begin_layout Plain Layout
3717 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3720 \begin_layout Plain Layout
3735 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3738 \begin_layout Plain Layout
3755 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3758 \begin_layout Plain Layout
3773 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3776 \begin_layout Plain Layout
3793 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3796 \begin_layout Plain Layout
3811 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3814 \begin_layout Plain Layout
3831 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3834 \begin_layout Plain Layout
3849 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3852 \begin_layout Plain Layout
3875 \begin_layout Standard
3876 LyX doesn't stop you using bullets from packages you don't have.
3877 If you get errors from LaTeX when you try to view or print the file, then
3878 it is likely you are missing a package.
3882 \begin_layout Plain Layout
3883 LyX doesn't restrict your use since you may be editing locally and exporting
3892 \begin_layout Subsection
3896 \begin_layout Standard
3897 Select which bullet depth you want to change then select the bullet shape
3899 Any changes will not be visible in LyX, but are visible when viewing the
3903 \begin_layout Standard
3904 You can reset a bullet shape to the default simply by clicking your right
3905 mouse button on the appropriate bullet depth button.
3909 \begin_layout Plain Layout
3914 want to have multiple sets of paragraphs with different sets of bullets
3915 in each, then you're going to have to get your hands dirty with TeX code.
3916 The bullet selection dialog can help though because it provides you with
3917 the LaTeX code for a wide range of bullet shapes.
3918 To make your own custom paragraphs you have the following options:
3921 \begin_layout Plain Layout
3925 \begin_layout Plain Layout
3941 \begin_layout Plain Layout
3945 \begin_layout Plain Layout
3967 \begin_layout Itemize
3968 Use the LaTeX command
3969 \begin_inset Flex CharStyle:Code
3972 \begin_layout Plain Layout
3980 to specify a new bullet shape for a given depth.
3981 You'll also need to save the current bullet shape so you can restore it
3983 In this itemized list the following LaTeX code was used to change the bullet
3984 used for the first depth.
3988 \begin_layout LyX-Code
3998 \begin_layout LyX-Code
4015 \begin_layout Itemize
4016 Note that the itemize depth is specified in Roman numerals as part of the
4026 \begin_layout Itemize
4030 \begin_layout Plain Layout
4043 Specify each individual entry by starting each item with the bullet shape
4044 enclosed in square brackets and set as
4045 \begin_inset Flex CharStyle:MenuItem
4048 \begin_layout Plain Layout
4055 For example, this item was started with
4056 \begin_inset Flex CharStyle:Code
4059 \begin_layout Plain Layout
4074 \begin_layout Plain Layout
4078 \begin_layout Plain Layout
4094 \begin_layout Plain Layout
4095 You'll also need to revert the labelitem back to its previous setting for
4096 the global bullet shape settings to remain in effect.
4097 The way used here was:
4100 \begin_layout LyX-Code
4115 \begin_layout Chapter
4119 \begin_layout Section
4123 \begin_layout Standard
4124 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
4125 and retrieve information about the LyX internal state.
4126 This is only intended for advanced users, but they should find it useful.
4127 It is by writing to the LyX server, for example, that bibliography managers,
4128 such as JabRef, are able to
4129 \begin_inset Quotes eld
4133 \begin_inset Quotes erd
4139 \begin_layout Section
4140 Starting the LyX Server
4143 \begin_layout Standard
4144 The LyX server works through the use of a pair of named pipes.
4145 These are usually located in
4146 \begin_inset Flex CharStyle:Code
4149 \begin_layout Plain Layout
4159 \begin_layout Plain Layout
4164 named pipes are special objects located in
4165 \begin_inset Flex CharStyle:Code
4168 \begin_layout Plain Layout
4186 \begin_inset Quotes eld
4190 \begin_inset Flex CharStyle:Code
4193 \begin_layout Plain Layout
4200 \begin_inset Quotes erd
4204 \begin_inset Quotes eld
4208 \begin_inset Flex CharStyle:Code
4211 \begin_layout Plain Layout
4218 \begin_inset Quotes erd
4222 External programs write into
4223 \begin_inset Flex CharStyle:Code
4226 \begin_layout Plain Layout
4232 and read back data from
4233 \begin_inset Flex CharStyle:Code
4236 \begin_layout Plain Layout
4243 The stem of the pipe names can be defined in the
4244 \begin_inset Flex CharStyle:MenuItem
4247 \begin_layout Plain Layout
4248 Tools\SpecialChar \menuseparator
4255 \begin_inset Flex CharStyle:Code
4258 \begin_layout Plain Layout
4259 "/home/myhome/lyxpipe"
4265 \begin_inset Flex CharStyle:Code
4268 \begin_layout Plain Layout
4287 configure this manually in order for the server to start.
4290 \begin_layout Standard
4292 \begin_inset Flex CharStyle:Code
4295 \begin_layout Plain Layout
4302 \begin_inset Flex CharStyle:Code
4305 \begin_layout Plain Layout
4311 ' to create the pipes.
4312 If one of the pipes already exists, LyX will assume that another LyX process
4313 is already running and will not start the server.
4314 On POSIX (Unix like) systems, if for some other reason, an unused
4315 \begin_inset Quotes eld
4319 \begin_inset Quotes erd
4322 pipe is left in existence when LyX closes, then LyX will try to delete
4324 If this fails for some reason, you will need to delete the pipes manually
4325 and then restart LyX.
4326 On Windows, pipes are deleted by the OS on program termination or crash,
4328 \begin_inset Quotes eld
4332 \begin_inset Quotes erd
4335 pipes should not be possible.
4338 \begin_layout Standard
4339 To have several LyX processes with servers at the same time, you have to
4340 use different configurations, perhaps by using separate user directories,
4342 \begin_inset Flex CharStyle:Code
4345 \begin_layout Plain Layout
4351 file, for each process.
4354 \begin_layout Standard
4355 If you are developing a client program, you might find it useful to enable
4356 debugging information from the LyX server.
4357 Do this by starting LyX as
4358 \begin_inset Flex CharStyle:Code
4361 \begin_layout Plain Layout
4370 \begin_layout Standard
4371 You can find a complete example client written in C in the source distribution
4373 \begin_inset Flex CharStyle:Code
4376 \begin_layout Plain Layout
4377 development/lyxserver/server_monitor.c
4385 \begin_layout Standard
4386 Another useful tool is command-line based client you will find in
4387 \begin_inset Flex CharStyle:Code
4390 \begin_layout Plain Layout
4391 src/client/lyxclient
4399 \begin_layout Section
4400 Normal communication
4403 \begin_layout Standard
4404 To issue a LyX call, the client writes a line of ASCII text into the input
4406 This line has the following format:
4423 \begin_layout Description
4424 clientname is a name that the client can choose arbitrarily.
4425 Its only use is that LyX will echo it if it sends an answer—so a client
4426 can dispatch results from different requesters.
4429 \begin_layout Description
4430 function is the function you want LyX to perform.
4431 It is the same as the commands you'd use in the minibuffer.
4434 \begin_layout Description
4435 argument is an optional argument which is meaningful only to some functions
4437 \begin_inset Quotes eld
4441 \begin_inset Quotes erd
4444 LFUN will insert the argument as text at the cursor position).
4447 \begin_layout Standard
4448 The answer from LyX will arrive in the output pipe and be of the form
4465 \begin_layout Standard
4474 are just echoed from the command request, while
4478 is more or less useful information filled according to how the command
4479 execution worked out.
4480 Some commands, such as
4481 \begin_inset Quotes eld
4485 \begin_inset Quotes erd
4488 , will return information about the internal state of LyX, while other will
4489 return an empty data-response.
4490 This means that the command execution went fine.
4493 \begin_layout Standard
4494 In case of errors, the response from LyX will have this form
4511 \begin_layout Standard
4516 should contain an explanation of why the command failed.
4519 \begin_layout Standard
4523 \begin_layout LyX-Code
4524 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
4525 \begin_inset Newline newline
4528 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
4529 \begin_inset Newline newline
4532 read a <~/.lyxpipe.out
4533 \begin_inset Newline newline
4539 \begin_layout Section
4543 \begin_layout Standard
4544 LyX can notify clients of events going on asynchronously.
4545 Currently it will only do this if the user binds a key sequence with the
4547 \begin_inset Quotes eld
4551 \begin_inset Quotes erd
4555 The format of the string LyX sends is as follows:
4559 \begin_inset Flex CharStyle:Code
4562 \begin_layout Plain Layout
4573 \begin_layout Standard
4578 is the printed representation of the key sequence that was actually typed
4582 \begin_layout Standard
4583 This mechanism can be used to extend LyX's command set and implement macros.
4584 Bind some key sequence to
4585 \begin_inset Quotes eld
4589 \begin_inset Quotes erd
4593 Then start a client that listens on the output pipe, dispatches the command
4594 according to the sequence, and starts a function that may use LyX calls
4595 and LyX requests to issue a command or a series of commands to LyX.
4598 \begin_layout Section
4599 The simple LyX Server Protocol
4602 \begin_layout Standard
4603 LyX implements a simple protocol that can be used for session management.
4604 All messages are of the form
4617 \begin_layout Standard
4623 \begin_inset Quotes eld
4627 \begin_inset Quotes erd
4631 \begin_inset Quotes eld
4635 \begin_inset Quotes erd
4640 \begin_inset Quotes eld
4644 \begin_inset Quotes erd
4647 is received from a client, LyX will report back to inform the client that
4648 it's listening to it's messages, while
4649 \begin_inset Quotes eld
4653 \begin_inset Quotes erd
4656 sent from LyX will inform clients that LyX is closing.
4659 \begin_layout Section
4660 Reverse DVI/PDF search
4663 \begin_layout Standard
4664 Some DVI/PDF viewers
4668 \begin_layout Plain Layout
4669 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
4670 Skim on Mac OSX and SumatraPDF on Windows.
4679 facility (also called
4684 This means that you can tell LyX to put the cursor to a specific line in
4685 the document by clicking at the respective position in the DVI/PDF output.
4686 To achieve this, the viewer must be able to communicate with LyX.
4687 This is done via the LyX server either by using the named pipe (
4691 ), or the UNIX domain socket (
4695 ) that LyX creates in its temporary directory (this is the way the
4696 \begin_inset Flex CharStyle:Code
4699 \begin_layout Plain Layout
4705 program communicates with LyX).
4706 In some cases, you need a helper script that mediates between the viewer
4707 and LyX, in others, the viewer can communicate with LyX directly.
4708 This depends on the selected viewer and on your operating system.
4709 The same applies to the way viewers need to be configured and the way the
4710 reverse search is actually performed.
4711 In what follows, we will thus describe how to setup reverse search for
4713 Before we turn to this, though, we will explain what needs to be done generally
4714 to enable reverse search in the DVI/PDF output.
4717 \begin_layout Subsection
4718 Enabling reverse search
4721 \begin_layout Standard
4722 LaTeX provides several different methods for reverse search.
4723 Some are built-in in the
4724 \begin_inset Flex CharStyle:Code
4727 \begin_layout Plain Layout
4733 program, some are provided by external packages.
4734 Your choice depends on whether your LaTeX distribution already provides
4735 a given method (the built-in methods are rather new) and whether your viewer
4737 The available methods are described in the following.
4740 \begin_layout Subsubsection*
4741 Built-in DVI-search via src-specials (DVI only)
4744 \begin_layout Standard
4745 This method provides the DVI file with the necessary information for reverse
4747 It is available in LaTeX since quite some time (any somewhat recent LaTeX
4748 distribution should include it), and it works reliably.
4749 To enable it, change the
4750 \begin_inset Flex CharStyle:MenuItem
4753 \begin_layout Plain Layout
4758 \begin_layout Plain Layout
4771 \begin_inset Flex CharStyle:MenuItem
4774 \begin_layout Plain Layout
4779 \begin_layout Plain Layout
4786 eX (plain)->DraftDVI
4792 \begin_inset Flex CharStyle:MenuItem
4795 \begin_layout Plain Layout
4796 Preferences\SpecialChar \menuseparator
4797 File Handling\SpecialChar \menuseparator
4804 \begin_inset Flex CharStyle:Code
4807 \begin_layout Plain Layout
4808 latex -src-specials $$i
4814 If this doesn't work, check if your TeX engine needs different options
4815 (the syntax might differ in some distributions).
4818 \begin_layout Subsubsection*
4819 External Packages (PDFSync and scrltx)
4822 \begin_layout Standard
4831 provide reverse search facility for PDF output (via pdflatex) and DVI output,
4833 In order to enable it, load the packages in the LyX preamble:
4836 \begin_layout Itemize
4837 \begin_inset Flex CharStyle:Code
4840 \begin_layout Plain Layout
4848 for reverse PDF search,
4851 \begin_layout Itemize
4853 \begin_inset Flex CharStyle:Code
4856 \begin_layout Plain Layout
4859 usepackage[active]{srcltx}
4864 for reverse DVI search.
4867 \begin_layout Standard
4868 If you want to be able to perform both DVI and PDF reverse searches, you
4869 can also insert in the preamble the following lines
4872 \begin_layout LyX-Code
4876 \begin_inset Newline newline
4882 \begin_inset Newline newline
4888 \begin_inset Newline newline
4894 \begin_inset Newline newline
4899 usepackage[active]{srcltx}
4900 \begin_inset Newline newline
4908 \begin_layout Standard
4909 This way, you can preview the file as either DVI or PDF (pdflatex) and the
4910 right package will be used.
4913 \begin_layout Standard
4914 Note that PDFSync might affect the output layout of your document.
4915 It is therefore advised to disable PDFsync for final documents.
4918 \begin_layout Subsubsection*
4919 Built-in reverse search via SyncTeX (DVI and PDF)
4922 \begin_layout Standard
4924 \begin_inset Flex CharStyle:Code
4927 \begin_layout Plain Layout
4933 have built-in support for both PDF and DVI reverse search.
4938 facility is basically the result of the integration of the PDFSync package
4939 to the pdftex program and its merge with the
4944 You need at least TeXLive 2008 or a recent MikTeX distribution in order
4946 Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
4947 already provide SyncTeX support.
4950 \begin_layout Standard
4951 To enable SyncTeX for DVI output, change the
4952 \begin_inset Flex CharStyle:MenuItem
4955 \begin_layout Plain Layout
4960 \begin_layout Plain Layout
4973 \begin_inset Flex CharStyle:MenuItem
4976 \begin_layout Plain Layout
4981 \begin_layout Plain Layout
4988 eX (plain) -> DraftDVI
4994 \begin_inset Flex CharStyle:MenuItem
4997 \begin_layout Plain Layout
4998 Preferences\SpecialChar \menuseparator
4999 File Handling\SpecialChar \menuseparator
5006 \begin_inset Flex CharStyle:Code
5009 \begin_layout Plain Layout
5010 latex -synctex=1 $$i
5015 , and for PDF output, change the
5016 \begin_inset Flex CharStyle:MenuItem
5019 \begin_layout Plain Layout
5024 \begin_layout Plain Layout
5031 eX (pdflatex) -> PDF (pdflatex)
5037 \begin_inset Flex CharStyle:Code
5040 \begin_layout Plain Layout
5041 pdflatex -synctex=1 $$i
5047 Check the documentation of your viewer whether the viewer needs to be configure
5048 d for the use with SyncTeX.
5052 \begin_layout Plain Layout
5054 \begin_inset Flex CharStyle:Code
5057 \begin_layout Plain Layout
5063 option enables gzip compression.
5064 If your viewer does not support it, you should instead use
5065 \begin_inset Flex CharStyle:Code
5068 \begin_layout Plain Layout
5082 \begin_layout Subsection
5083 Configuring and using specific viewers
5086 \begin_layout Subsubsection*
5087 Xdvi (all platforms)
5090 \begin_layout Standard
5092 \begin_inset Flex CharStyle:Code
5095 \begin_layout Plain Layout
5101 , you don't need to do anything else for performing a reverse DVI search,
5102 as LyX already provides the necessary hooks for automatically using the
5104 \begin_inset Flex CharStyle:Code
5107 \begin_layout Plain Layout
5114 Just setup your document as described above (reverse search is triggered
5115 by Ctrl-click or Alt-click on Mac OSX, respectively).
5118 \begin_layout Standard
5119 However, if for whatever reason you want to use the named pipe instead of
5120 the socket for communicating with LyX, simply change the DVI viewer in
5122 \begin_inset Flex CharStyle:MenuItem
5125 \begin_layout Plain Layout
5126 Preferences\SpecialChar \menuseparator
5127 File Handling\SpecialChar \menuseparator
5137 \begin_layout Plain Layout
5138 On Mac OSX you have to use
5139 \begin_inset Flex CharStyle:Code
5142 \begin_layout Plain Layout
5143 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
5154 \begin_inset Flex CharStyle:Code
5157 \begin_layout Plain Layout
5158 xdvi -editor 'lyxeditor.sh %f %l'
5164 \begin_inset Flex CharStyle:Code
5167 \begin_layout Plain Layout
5173 is a suitable script.
5174 For example, a minimal shell script is the following one:
5177 \begin_layout LyX-Code
5179 \begin_inset Newline newline
5182 LYXPIPE="/path/to/lyxpipe"
5183 \begin_inset Newline newline
5186 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
5187 \begin_inset Newline newline
5190 echo "$COMMAND" > "${LYXPIPE}".in || exit
5191 \begin_inset Newline newline
5194 read < "${LYXPIPE}".out || exit
5197 \begin_layout Standard
5199 \begin_inset Flex CharStyle:Code
5202 \begin_layout Plain Layout
5212 \begin_layout Plain Layout
5219 XServer pipe path specified in
5220 \begin_inset Flex CharStyle:MenuItem
5223 \begin_layout Plain Layout
5224 Preferences\SpecialChar \menuseparator
5234 \begin_layout Plain Layout
5236 \begin_inset Flex CharStyle:Code
5239 \begin_layout Plain Layout
5245 folder of a source distribution you can find a
5246 \begin_inset Flex CharStyle:Code
5249 \begin_layout Plain Layout
5255 script which is able to locate the
5259 based on your preferences.
5267 \begin_layout Subsubsection*
5271 \begin_layout Standard
5273 \begin_inset Flex CharStyle:Code
5276 \begin_layout Plain Layout
5277 /Applications/MacDviX_Folder/calleditor.script
5282 , add the following lines:
5285 \begin_layout LyX-Code
5290 \begin_layout Plain Layout
5297 X.app/Contents/MacOS/lyxeditor "$2" $1
5298 \begin_inset Newline newline
5304 \begin_layout Standard
5305 Modify the lines accordingly if you install LyX somewhere else than in the
5306 Applications folder.
5309 \begin_layout Standard
5310 Reverse search is triggered by Alt-click (OPTION-click).
5313 \begin_layout Subsubsection*
5317 \begin_layout Standard
5319 \begin_inset Flex CharStyle:Code
5322 \begin_layout Plain Layout
5323 open -a Skim.app $$i
5328 to the viewer setting in
5329 \begin_inset Flex CharStyle:MenuItem
5332 \begin_layout Plain Layout
5333 Preferences\SpecialChar \menuseparator
5334 File Handling\SpecialChar \menuseparator
5335 File formats\SpecialChar \menuseparator
5342 \begin_inset Flex CharStyle:MenuItem
5345 \begin_layout Plain Layout
5346 Skim\SpecialChar \menuseparator
5347 Preferences\SpecialChar \menuseparator
5357 \begin_layout Plain Layout
5367 \begin_layout Standard
5368 Reverse search is triggered by COMMAND-SHIFT-click
5371 \begin_layout Subsubsection*
5375 \begin_layout Standard
5377 \begin_inset Flex CharStyle:MenuItem
5380 \begin_layout Plain Layout
5381 Settings\SpecialChar \menuseparator
5382 Configure Okular\SpecialChar \ldots{}
5383 \SpecialChar \menuseparator
5390 \begin_inset Quotes eld
5394 \begin_inset Quotes erd
5398 \begin_inset Flex CharStyle:Code
5401 \begin_layout Plain Layout
5410 \begin_layout Standard
5411 Reverse search is triggered by SHIFT-click.
5414 \begin_layout Subsubsection*
5418 \begin_layout Standard
5419 Launch yap, choose its
5420 \begin_inset Flex CharStyle:MenuItem
5423 \begin_layout Plain Layout
5424 View\SpecialChar \menuseparator
5431 \begin_inset Quotes eld
5435 \begin_inset Quotes erd
5440 \begin_inset Quotes eld
5443 New\SpecialChar \ldots{}
5445 \begin_inset Quotes erd
5448 button and, in the window that opens, enter
5449 \begin_inset Quotes eld
5453 \begin_inset Quotes erd
5456 (or any other name you like) in the
5457 \begin_inset Quotes eld
5461 \begin_inset Quotes erd
5465 Now click on the button labeled
5466 \begin_inset Quotes eld
5469 \SpecialChar \ldots{}
5471 \begin_inset Quotes erd
5474 to open a file dialog and navigate to the directory containing the batch
5476 \begin_inset Flex CharStyle:Code
5479 \begin_layout Plain Layout
5487 \begin_inset Flex CharStyle:Code
5490 \begin_layout Plain Layout
5496 and then specify the program arguments as
5497 \begin_inset Flex CharStyle:Code
5500 \begin_layout Plain Layout
5508 \begin_inset Flex CharStyle:Code
5511 \begin_layout Plain Layout
5517 wrapper is used for communicating with LyX through the
5524 \begin_layout LyX-Code
5526 \begin_inset Newline newline
5529 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
5538 \begin_inset Newline newline
5552 \begin_layout Standard
5553 Make sure that the LyXServer pipe path you specified in LyX is
5554 \begin_inset Flex CharStyle:Code
5557 \begin_layout Plain Layout
5571 , otherwise change the
5572 \begin_inset Flex CharStyle:Code
5575 \begin_layout Plain Layout
5581 wrapper accordingly.
5582 You are advised to select in
5583 \begin_inset Flex CharStyle:MenuItem
5586 \begin_layout Plain Layout
5587 Preferences\SpecialChar \menuseparator
5593 a temporary directory whose name does not contain spaces, otherwise inverse
5597 \begin_layout Standard
5598 In yap, reverse search is triggered by double-click.
5601 \begin_layout Subsubsection*
5602 SumatraPDF (Windows)
5605 \begin_layout Standard
5606 In order to use SumatraPDF for inverse search, enter
5607 \begin_inset Flex CharStyle:Code
5610 \begin_layout Plain Layout
5611 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
5616 in the viewer setting in
5617 \begin_inset Flex CharStyle:MenuItem
5620 \begin_layout Plain Layout
5621 Preferences\SpecialChar \menuseparator
5622 File Handling\SpecialChar \menuseparator
5623 File formats\SpecialChar \menuseparator
5630 \begin_inset Flex CharStyle:Code
5633 \begin_layout Plain Layout
5639 is the previous wrapper.
5640 If SumatraPDF.exe is not in your command PATH, use its full file name.
5641 Again, make sure that the LyX temporary directory name does not contain
5642 spaces, otherwise inverse search will fail.
5645 \begin_layout Standard
5646 Reverse search is triggered by double-click.
5649 \begin_layout Subsubsection*
5653 \begin_layout Standard
5654 First of all, make sure that yap is your default DVI viewer in the Windows
5655 environment, then launch it, choose its
5656 \begin_inset Flex CharStyle:MenuItem
5659 \begin_layout Plain Layout
5660 View\SpecialChar \menuseparator
5667 \begin_inset Quotes eld
5671 \begin_inset Quotes erd
5676 \begin_inset Quotes eld
5679 New\SpecialChar \ldots{}
5681 \begin_inset Quotes erd
5684 button and, in the window that opens, enter
5685 \begin_inset Quotes eld
5689 \begin_inset Quotes erd
5692 (or any other name you like) in the
5693 \begin_inset Quotes eld
5697 \begin_inset Quotes erd
5701 Now click on the button labeled
5702 \begin_inset Quotes eld
5705 \SpecialChar \ldots{}
5707 \begin_inset Quotes erd
5710 to open a file dialog and navigate to the directory containing the
5711 \begin_inset Flex CharStyle:Code
5714 \begin_layout Plain Layout
5720 program (which is installed by default on Cygwin along with the LyX executable).
5722 \begin_inset Flex CharStyle:Code
5725 \begin_layout Plain Layout
5731 and then specify the program arguments as
5732 \begin_inset Flex CharStyle:Code
5735 \begin_layout Plain Layout
5742 In this way, you will be using the
5746 for communicating with LyX.
5747 If, for whatever reason, you want to use the
5752 \begin_inset Flex CharStyle:Code
5755 \begin_layout Plain Layout
5761 option and be sure to specify the LyXServer pipe path in the LyX preferences.
5764 \begin_layout Standard
5765 In yap, reverse search is triggered by double-click.
5768 \begin_layout Subsubsection*
5772 \begin_layout Standard
5773 In order to use SumatraPDF for inverse search, enter
5774 \begin_inset Flex CharStyle:Code
5777 \begin_layout Plain Layout
5783 in the viewer setting in
5784 \begin_inset Flex CharStyle:MenuItem
5787 \begin_layout Plain Layout
5788 Preferences\SpecialChar \menuseparator
5789 File Handling\SpecialChar \menuseparator
5790 File formats\SpecialChar \menuseparator
5797 \begin_inset Flex CharStyle:Code
5800 \begin_layout Plain Layout
5806 is the following script (to be placed in your command PATH,
5807 \begin_inset Flex CharStyle:Code
5810 \begin_layout Plain Layout
5816 being the best choice):
5819 \begin_layout LyX-Code
5821 \begin_inset Newline newline
5825 \begin_inset Newline newline
5828 SumatraPDF -inverse-search "lyxeditor -g %f %l" $(basename $1)
5831 \begin_layout Standard
5832 This wrapper script is needed because SumatraPDF is a native Windows application
5833 and does not understand the posix paths used by the Cygwin version of LyX.
5834 If SumatraPDF.exe is not in your command PATH, use its full posix path in
5837 \begin_inset Flex CharStyle:Code
5840 \begin_layout Plain Layout
5846 enables communication via the
5852 \begin_inset Flex CharStyle:Code
5855 \begin_layout Plain Layout
5861 option if you want to use the
5865 , and be sure to specify the LyXServer pipe path in the LyX preferences.
5868 \begin_layout Standard
5869 Reverse search is triggered by double-click.
5872 \begin_layout Chapter
5873 Special Document Classes
5876 \begin_layout Section
5880 \begin_layout Standard
5886 \begin_layout Subsection
5890 \begin_layout Standard
5891 This section describes how LyX can be used to write articles for submission
5892 to the scientific journal
5894 Astronomy and Astrophysics
5896 (www.edpsciences.fr/aa/
5897 \begin_inset Flex URL
5900 \begin_layout Plain Layout
5902 http://www.edpsciences.fr/aa/
5907 ) using Version 5.01 of the document class
5912 This package can be downloaded from the ftp site
5915 \begin_layout Standard
5916 \begin_inset VSpace medskip
5922 \begin_layout Standard
5924 \begin_inset Flex URL
5927 \begin_layout Plain Layout
5929 ftp://ftp.edpsciences.org/pub/aa/readme.html
5937 \begin_layout Standard
5938 \begin_inset VSpace medskip
5944 \begin_layout Standard
5945 A manual comes together with that package, and this text is not meant to
5946 replace the original manual but merely a short guide how to realize the
5947 correct form of your paper.
5951 \begin_layout Standard
5952 Please note that the publisher of the journal was changed from Springer
5953 to EDP Sciences starting January 1, 2001.
5954 That change implicated also some slight changes of the style files, namely
5955 the removal of the thesaurus command.
5956 The LyX class aa supports the newest version of these style files, V 5.01.
5957 If you have an older version installed, please upgrade.
5958 For compatibility, the old (version 4) layout has been kept as
5963 Please refer to the comments in
5965 LyXDir/layouts/aapaper.layout
5970 \begin_layout Subsection
5974 \begin_layout Standard
5975 It is recommended you start from the example template distributed with LyX.
5976 If you are not using a template, note the following settings:
5979 \begin_layout Itemize
5986 Document\SpecialChar \menuseparator
5989 dialog (OK, that one was obvious).
5992 \begin_layout Itemize
5993 Don't change the option
5996 \begin_inset space ~
6006 The whole layout is done by the macros, you shouldn't change anything.
6009 \begin_layout Subsection
6013 \begin_layout Standard
6014 First thing to enter is the header information.
6015 It consists of seven entries, of which some are optional.
6019 \begin_layout Itemize
6027 \begin_layout Itemize
6035 \begin_layout Itemize
6043 \begin_layout Itemize
6051 \begin_layout Itemize
6056 : [optional] if more than one author: whom to contact for offprint requests.
6059 \begin_layout Itemize
6064 : [optional] mail address for contacts.
6067 \begin_layout Itemize
6075 Received: <date>; Accepted <date>
6078 \begin_layout Standard
6079 There is no need to issue the
6085 command, this is done automatically by LyX when the header is finished.
6086 Although the order of the single header entries doesn't matter it is advised
6087 to keep the above sequence, just to get the best optics and meets the layout
6088 of the real document.
6091 \begin_layout Standard
6092 If you want to place footnotes in the header block, e.
6093 \begin_inset space \thinspace{}
6097 \begin_inset space \space{}
6100 to state your present address, just use the standard footnote via the menu
6103 Insert\SpecialChar \menuseparator
6107 LyX will automagically use the term
6116 \begin_layout Standard
6117 In addition to these topics, the macros use three additional LaTeX commands
6118 that have no counterpart in LyX:
6121 \begin_layout Itemize
6128 to separate different names for more than one author and institute, respectivel
6132 \begin_layout Itemize
6139 to mark corresponding author/institute pairs.
6140 The institutes are numbered sequentially as they appear in the
6144 field, so you have to put a marker to each author.
6147 \begin_layout Itemize
6154 to supply an email address for fast contact.
6157 \begin_layout Standard
6158 In all cases, the appropriate command has to be entered in LyX and marked
6164 \begin_layout Subsection
6168 \begin_layout Standard
6169 The abstract should immediately follow the header block.
6170 With version 5 the abstract environment was changed to a command, and there
6171 is now a resctriction to only one paragraph.
6172 In addition, it should contain an entry with the keywords.
6173 This is not yet implemented for LyX, therefore you have to enter the LaTeX
6180 by hand and mark it as LaTeX code.
6181 Refer to the example paper.
6184 \begin_layout Subsection
6185 Supported environments
6188 \begin_layout Standard
6189 The A&A paper layout supports the following environments for structuring
6193 \begin_layout Itemize
6199 \begin_layout Itemize
6205 \begin_layout Itemize
6211 \begin_layout Itemize
6217 \begin_layout Itemize
6223 \begin_layout Itemize
6229 \begin_layout Itemize
6235 \begin_layout Itemize
6241 \begin_layout Itemize
6247 \begin_layout Itemize
6253 \begin_layout Itemize
6259 \begin_layout Itemize
6265 \begin_layout Subsection
6266 Commands not supported by LyX
6269 \begin_layout Standard
6270 Some commands are not yet supported by the
6275 Some have already been mentioned.
6276 For the sake of completeness, they are listed all together here:
6279 \begin_layout Itemize
6287 \begin_layout Itemize
6295 \begin_layout Itemize
6303 \begin_layout Itemize
6311 \begin_layout Itemize
6319 \begin_layout Itemize
6327 \begin_layout Itemize
6335 \begin_layout Itemize
6343 \begin_layout Standard
6344 If you want to use any of these commands, you have to enter them yourself.
6347 Do not forget to mark them as LaTeX code!
6350 \begin_layout Subsection
6351 Figure and Table Floats
6354 \begin_layout Standard
6355 LyX provides support for the necessary float environments
6357 figure, figure*, table
6363 , therefore we won't tell much about it here.
6367 \begin_inset space ~
6373 Just remember that tables should be left-aligned.
6374 For that, select the table and change the alignment in
6376 Edit\SpecialChar \menuseparator
6378 \begin_inset space ~
6384 \begin_layout Standard
6385 There is only one special thing: the figures with caption besides the figure.
6386 To create such a figure, you have to do the following:
6389 \begin_layout Enumerate
6390 Create a wide figure float:
6392 Insert\SpecialChar \menuseparator
6393 Float\SpecialChar \menuseparator
6396 , then right click in the figure and select
6402 \begin_inset space ~
6410 \begin_layout Enumerate
6411 Enter your caption text.
6414 \begin_layout Enumerate
6419 to move the cursor above the caption.
6422 \begin_layout Enumerate
6426 \begin_layout Enumerate
6427 Position the cursor behind the figure and insert a horizontal fill:
6429 Insert\SpecialChar \menuseparator
6431 \begin_inset space ~
6434 Character\SpecialChar \menuseparator
6436 \begin_inset space ~
6444 \begin_layout Enumerate
6445 Switch to LaTeX mode:
6448 \begin_inset space ~
6456 \begin_layout Enumerate
6466 Do not close the brace!
6469 \begin_layout Enumerate
6470 Position the cursor behind the caption text, switch to LaTeX mode and insert
6474 \begin_inset space ~
6486 \begin_layout Standard
6487 Also, refer to the figures in the example paper.
6490 \begin_layout Subsection
6494 \begin_layout Standard
6495 For submission, the paper has to be formated in a special double-spacing
6497 For this purpose, you have to give the option
6501 to the documentclass.
6502 This must be done using the extra class options field in the
6504 Document\SpecialChar \menuseparator
6508 Just enter the string
6515 \begin_layout Subsection
6519 \begin_layout Standard
6524 directory contains an example paper written with LyX.
6525 It is the example paper from the original macro package, translated to
6527 Use it for inspiration, and compare the original LaTeX code with LyX way
6531 \begin_layout Section
6535 \begin_layout Standard
6541 \begin_layout Subsection
6545 \begin_layout Standard
6546 AASTeX is a set of macros produced by the American Astronomical Society
6547 to facilitate electronic manuscript submission to the three journals they
6548 publish: the Astrophysical Journal (including the Letters and Supplement),
6549 the Astronomical Journal, and the Publications of the Astronomical Society
6551 LyX has proven to be an excellent tool for generating these documents,
6552 especially given its equation, citation, and figure handling capabilities.
6553 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
6554 is the version described here, or higher.
6555 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
6556 incompatible with LyX.
6557 The AASTeX package may be downloaded from the AASTeX Web site
6560 \begin_layout Standard
6561 \begin_inset VSpace medskip
6567 \begin_layout Standard
6569 \begin_inset Flex URL
6572 \begin_layout Plain Layout
6574 http://www.journals.uchicago.edu/AAS/AASTeX
6582 \begin_layout Standard
6583 \begin_inset VSpace medskip
6589 \begin_layout Standard
6590 A complete user guide is contained in that package and you should familiarize
6591 yourself with it thoroughly before embarking on writing a paper in LyX.
6592 LyX will not reduce the need to figure out all the AASTeX commands, it
6593 will only reduce the drudgery of typing everything in.
6594 It is your responsibility to ensure that the final exported LaTeX document
6595 conforms completely to the requirements of the journal to which you are
6596 submitting your paper.
6599 \begin_layout Subsection
6600 Starting a New Paper
6603 \begin_layout Standard
6604 I strongly suggest that you start with the AASTeX template file.
6607 File\SpecialChar \menuseparator
6614 , enter the new file name, then choose the
6619 This will show the most common fields found in a manuscript.
6620 Simply overwrite the existing text (including the brackets,
6624 ) with the correct information.
6625 Many of the AASTeX commands and environments can be implemented directly
6626 in LyX, but some cannot: most noticeably
6638 , which should stick out like a sore thumb if you actually just opened the
6640 For commands such as these, the LaTeX code must be entered directly and
6642 Such commands are referred to as TeX code, or Evil Red Text.
6643 I tried to minimize the amount of TeX code needed in an AASTeX document,
6644 but there is still a bit more required than any of us would like.
6647 \begin_layout Subsection
6648 Finishing Your Paper
6651 \begin_layout Standard
6652 When the paper is finished to your satisfaction and previews/prints correctly,
6654 \begin_inset Quotes eld
6658 \begin_inset Quotes erd
6661 actions which need to be done before you submit it to the journals.
6665 \begin_layout Enumerate
6666 Export your paper as a LaTeX file (
6668 File\SpecialChar \menuseparator
6669 Export\SpecialChar \menuseparator
6676 \begin_layout Enumerate
6681 file with your favorite text editor
6685 \begin_layout Enumerate
6686 remove the comment lines before the
6695 \begin_layout Enumerate
6700 usepackage...{fontenc}
6702 line if it appears (usually just after
6717 \begin_layout Enumerate
6718 remove everything between (and including) the
6730 commands, except for any commands you specifically put into the LaTeX preamble
6731 (which should appear immediately after the
6732 \begin_inset Quotes eld
6735 User specified LaTeX commands
6736 \begin_inset Quotes erd
6747 \begin_layout Enumerate
6748 Run the resulting file through LaTeX to make sure it still processes correctly.
6751 \begin_layout Enumerate
6752 Reread the journal requirements to make sure your filenames and formats
6756 \begin_layout Enumerate
6760 \begin_layout Subsection
6761 Comments On Specific Commands
6764 \begin_layout Standard
6765 I will not describe the detailed usage of the individual AASTeX commands:
6766 the AASTeX User Guide (
6770 ) gives a good description of each.
6771 Thus it's probably easiest for me to go down the list as found in the guide
6772 and offer comments where necessary.
6773 So let's begin \SpecialChar \ldots{}
6777 \begin_layout Subsubsection
6778 Things that work as expected
6781 \begin_layout Standard
6785 \begin_layout Plain Layout
6797 \begin_layout Standard
6798 Because they work as you might expect, I simply list them and the section
6899 begin{thebibliography}
6907 (2.13.2), all the cite commands and their variations (2.13.2), the generic
6908 graphicx figure commands (2.14.1),
6932 (2.15.4, amongst other places),
6959 \begin_layout Standard
6960 The following style options also work correctly:
6981 Simply put them in the
6987 Layout\SpecialChar \menuseparator
6993 \begin_layout Standard
6997 \begin_layout Plain Layout
7009 \begin_layout Subsubsection
7010 Things that work, but require more comment
7013 \begin_layout Standard
7014 The following items work, but require a little more discussion:
7017 \begin_layout Itemize
7018 These items are reserved for use by the journal editors, but you can put
7019 them into the LaTeX preamble if you feel compelled to do so:
7052 \begin_layout Itemize
7053 These items may be placed in the LaTeX preamble, and are included as blanks
7054 in the template file:
7075 \begin_layout Itemize
7082 (2.3) – can only be used
7083 \begin_inset Quotes eld
7087 \begin_inset Quotes erd
7090 , not in the middle of a paragraph.
7091 Use TeX code if you need to embed it.
7094 \begin_layout Itemize
7101 (2.3) – will have extra {} after it.
7102 This should not cause an error.
7105 \begin_layout Itemize
7112 (2.6) – can only be used
7113 \begin_inset Quotes eld
7117 \begin_inset Quotes erd
7120 , not in the middle of a paragraph.
7121 Use TeX code if you need to embed it.
7124 \begin_layout Itemize
7131 (2.8) – can't insert a cross-reference tag, you must type the tag name by
7135 \begin_layout Itemize
7142 (2.8) – same as for
7149 \begin_layout Itemize
7156 (2.9) – will have extra {} after it.
7157 This should not cause an error.
7160 \begin_layout Itemize
7167 (2.11) – will have extra {} after it.
7168 This should not cause an error.
7171 \begin_layout Itemize
7178 (2.14.2) – you can insert an optional filename argument by placing the cursor
7179 at the beginning of the text and selecting
7181 Insert\SpecialChar \menuseparator
7186 \begin_inset Quotes eld
7190 \begin_inset Quotes erd
7193 inserts an optional argument of the type needed by
7200 Hopefully it will be renamed someday.
7203 \begin_layout Itemize
7210 (2.17.1) – same as
7216 for the catalog ID optional parameter
7219 \begin_layout Itemize
7226 (2.17.1) – same as
7232 for the catalog ID optional parameter
7235 \begin_layout Subsubsection
7236 Things not implemented, use TeX code
7239 \begin_layout Standard
7243 \begin_layout Plain Layout
7255 \begin_layout Standard
7278 setcounter{equation}
7280 (2.12), Journal name abbreviations (2.13.4),
7316 (2.15.4, insert it as the first element in the lefthand cell after where
7318 Don't use any of LyX's rules in the table),
7330 (2.15.5), much of Misc (2.17, except
7381 \begin_layout Standard
7385 \begin_layout Plain Layout
7397 \begin_layout Subsubsection
7398 Things that cannot be implemented
7401 \begin_layout Standard
7402 \SpecialChar \ldots{}
7403 at least in any meaningful sort of way, so I suggest ignoring them.
7404 They are the references environment (2.13.3), and the deluxetable environment
7406 If you really, really need to use deluxetable, I suggest editing it in
7407 a separate file with a text editor, then using
7409 Insert\SpecialChar \menuseparator
7411 \begin_inset space ~
7416 to include it in your LyX document.
7421 file to see an example of this.
7424 \begin_layout Subsection
7425 FAQs, Tips, Tricks, and Other Ruminations
7428 \begin_layout Subsubsection
7429 Getting LyX and AASTeX to cooperate
7432 \begin_layout Standard
7433 It can be a bit tricky to get LyX to recognize a new layout and document
7435 When all else fails, do this:
7438 \begin_layout Enumerate
7439 Make certain that LaTeX can find AASTeX.
7440 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
7441 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
7448 \begin_layout Enumerate
7460 \begin_layout Enumerate
7463 Tools\SpecialChar \menuseparator
7466 in LyX, then restart LyX.
7469 \begin_layout Enumerate
7470 Open a regular new file, not from a template.
7471 Does AASTeX appear in the class list in
7473 Document\SpecialChar \menuseparator
7479 \begin_layout Standard
7480 If you get a warning from an existing AASTeX document about not being able
7481 to find the AASTeX layout or a message about
7482 \begin_inset Quotes eld
7485 You should not mix title layouts with normal ones
7486 \begin_inset Quotes erd
7489 , things haven't been installed correctly.
7492 \begin_layout Subsubsection
7493 LaTeX error processing a table
7496 \begin_layout Standard
7497 LyX, by default, attempts to center the table caption/title.
7498 This seems to produce a bad interaction in AASTeX so you should click somewhere
7499 in the caption/title, then select
7501 Edit\SpecialChar \menuseparator
7503 \begin_inset space ~
7517 This took care of it for me.
7520 \begin_layout Subsubsection
7524 \begin_layout Standard
7525 A couple of things: 1) I have noticed some funny spacing in the reference
7526 entries in the text.
7527 When you enter the bibliography item data, make sure their is
7531 space between the last author and the parenthesis setting off the year;
7535 \begin_inset space \thinspace{}
7539 \begin_inset space \space{}
7553 2) Entering the references at all is not obvious.
7554 The easiest thing is to start typing your first reference at the end of
7555 the document, then mark it as type
7560 That will put a small gray box in front of what you just typed.
7561 Click on the box to fill in the rest of the information.
7562 For new references, go to the end of an existing reference and press return.
7563 That will create a new line with its own box, etc.
7566 \begin_layout Subsubsection
7570 \begin_layout Standard
7571 Even though AASTeX provides its own figure commands (
7577 , for example), I much prefer LaTeX's standard figure commands (with the
7586 \begin_inset space ~
7589 commands as TeX code into a Figure Float box if you desire, but I never
7590 have much luck getting the layout right.
7591 With the standard graphics, LyX will insert a
7595 usepackage{graphicx}
7597 command into the LaTeX preamble and handle the figures in the standard
7598 LaTeX2e way, interspersing the figures in the text.
7599 I believe ApJ accepts figures exactly this way now; AJ might still use
7601 \begin_inset Quotes eld
7604 stack everything at the end
7605 \begin_inset Quotes erd
7611 \begin_layout Subsubsection
7612 Things I could have done, but didn't
7615 \begin_layout Standard
7617 \begin_inset Quotes eld
7621 \begin_inset Quotes erd
7624 things I could have implemented, but chose not to.
7625 For instance, I saw no point in double-spacing the text in the LyX window,
7626 even though it is double-spaced in the paper manuscript.
7627 Also, I chose not to make separate layouts for the preprint and preprint2
7629 Since I assume you will spend most of your time in the plain manuscript
7630 mode anyway, I decided not to chew up more disk space with this.
7634 \begin_layout Subsection
7638 \begin_layout Standard
7639 Your mileage may vary.
7640 I've now had papers published by both ApJ and AJ that have had 98% of the
7641 effort done in LyX; the last 2% was the LaTeX post-processing and a few
7643 I have had no trouble with the submission process, and I'm sure the journals
7644 were never aware that there might be a difference.
7645 So, go forth and publish!
7648 \begin_layout Section
7652 \begin_layout Standard
7655 David Johnson; updated by Richard Heck
7658 \begin_layout Standard
7659 \begin_inset VSpace bigskip
7665 \begin_layout Standard
7667 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
7668 papers to be submitted to American Mathematical Society publications.
7669 The layouts are not tailored to a specific journal, but easily can be.
7670 You should refer to the AMS documentation for specific instructions for
7671 each journal (usually it will entail only changing a single line in the
7673 That documentation is available on the Web at
7674 \begin_inset Flex URL
7677 \begin_layout Plain Layout
7685 \begin_inset Flex URL
7688 \begin_layout Plain Layout
7690 ftp://ftp.ams.org/pub/tex/amslatex/
7696 These layouts are appropriate, and useful, for any mathematical writing.
7700 \begin_layout Standard
7701 There are two basic AMS LaTeX layouts:
7704 \begin_layout Itemize
7705 amsart: The standard AMS article format.
7708 \begin_layout Itemize
7709 amsbook: the standard AMS book (really, monograph) format.
7713 \begin_layout Standard
7714 The layouts themselves contain only the minimum necessary to use the AMS
7716 They do not, in particular, contain any of the `theorem' environments used
7717 for setting theorems, lemmas, and the like.
7718 These are contained, instead, in the
7719 \begin_inset Flex CharStyle:Code
7722 \begin_layout Plain Layout
7728 module, which is loaded by default when when you select one of the AMS
7730 (It can also be used with other classes and can be removed, if you would
7731 rather use something else.) Less commonly used environments are in the
7732 \begin_inset Flex CharStyle:Code
7735 \begin_layout Plain Layout
7736 Theorems (AMS-Extended)
7741 module, which must be loaded manually.
7744 \begin_layout Standard
7745 By default, theorems and the like are numbered consecutively throughout
7746 the document, but this may be modified by loading the module
7747 \begin_inset Flex CharStyle:Code
7750 \begin_layout Plain Layout
7751 Theorems (Order by Section)
7756 or, if you are using
7757 \begin_inset Flex CharStyle:Code
7760 \begin_layout Plain Layout
7767 \begin_inset Flex CharStyle:Code
7770 \begin_layout Plain Layout
7771 Theorems (Order by Chapter)
7777 These will number the results as
7778 \begin_inset Formula $n.m$
7781 , where the first number refers to the section (or chapter) and the second
7782 refers to the total number of results so far in that section (or chapter).
7783 Many environments are also available unnumbered.
7784 These are indicated by an asterisk at the end.
7785 If you happen to want
7789 unnumbered results, the the module
7790 \begin_inset Flex CharStyle:Code
7793 \begin_layout Plain Layout
7799 provides that option.
7802 \begin_layout Standard
7803 Note that these modules do not
7807 to be used with the AMS classes.
7808 It is perfectly possible to use the
7809 \begin_inset Flex CharStyle:Code
7812 \begin_layout Plain Layout
7818 module, and the others mentioned, with other classes, such as
7819 \begin_inset Flex CharStyle:Code
7822 \begin_layout Plain Layout
7829 \begin_inset Flex CharStyle:Code
7832 \begin_layout Plain Layout
7839 \begin_inset Flex CharStyle:Code
7842 \begin_layout Plain Layout
7851 \begin_layout Subsection
7852 What these layouts provide
7855 \begin_layout Standard
7856 There is a long list of included environments provided by these layouts.
7857 In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
7858 variety of `theorem' environments.
7859 However, the AMS recommends the environments that are available in LyX.
7863 \begin_layout Standard
7864 The following environments—as well as the standard environments, such as
7866 \begin_inset Flex CharStyle:Noun
7869 \begin_layout Plain Layout
7876 \begin_inset Flex CharStyle:Noun
7879 \begin_layout Plain Layout
7886 \begin_inset Flex CharStyle:Noun
7889 \begin_layout Plain Layout
7896 \begin_inset Flex CharStyle:Noun
7899 \begin_layout Plain Layout
7906 \begin_inset Flex CharStyle:Noun
7909 \begin_layout Plain Layout
7916 \begin_inset Flex CharStyle:Code
7919 \begin_layout Plain Layout
7926 \begin_inset Flex CharStyle:Code
7929 \begin_layout Plain Layout
7938 \begin_layout Description
7939 Address This should be the author's permanent address.
7942 \begin_layout Description
7944 \begin_inset space ~
7947 Address This should be the author's temporary address at the time of submission,
7948 if different from the Address.
7951 \begin_layout Description
7952 Email Author's e-mail address
7955 \begin_layout Description
7956 URL Author's Web address, if desired.
7959 \begin_layout Description
7960 Keywords Key words or phrases used to identify specific topics discussed
7964 \begin_layout Description
7965 Subjectclass These refer to the AMS Subject Classifications, published and
7968 Mathematical Reviews
7971 These are also available online at the AMS cites listed above.
7974 \begin_layout Description
7978 \begin_layout Description
7982 \begin_layout Description
7986 \begin_layout Standard
7987 The following environments are provided by both the
7988 \begin_inset Flex CharStyle:Code
7991 \begin_layout Plain Layout
7998 \begin_inset Flex CharStyle:Code
8001 \begin_layout Plain Layout
8007 modules, in the latter case in both starred (unnumbered) and unstarred
8008 (numbered) versions.
8009 These same environments are provided only in the starred versions by the
8011 \begin_inset Flex CharStyle:Code
8014 \begin_layout Plain Layout
8023 \begin_layout Theorem
8024 This is typically used for the statements of major results.
8028 \begin_layout Corollary*
8029 This is used for statements which follow fairly directly from previous statement
8031 Again, these can be major results.
8036 These are smaller results needed to prove other statements.
8039 \begin_layout Proposition
8040 These are less major results which (hopefully) add to the general theory
8044 \begin_layout Conjecture
8045 These are statements provided without justification, which the author does
8046 not know how to prove, but which seem to be true (to the author, at least).
8049 \begin_layout Definition*
8050 Guess what this is for.
8051 The font is different for this environment than for the previous ones.
8055 \begin_layout Example*
8056 Used for examples illustrating proven results.
8059 \begin_layout Problem
8060 It's not really known what this is for.
8061 You should figure it out.
8064 \begin_layout Exercise*
8065 Write a description for this one.
8068 \begin_layout Remark
8069 This environment is also a type of theorem, usually a lesser sort of observation.
8072 \begin_layout Claim*
8073 Often used in the course of giving a proof of a larger result.
8077 Generally, these are used to break up long arguments, using specific instances
8083 The numbering scheme for cases is on its own, not together with other numbered
8089 At the end of this environment, a QED symbol (usually a square, but it can
8090 vary with different styles) is placed.
8091 If you want to have other environments within this one—for example, Case
8092 environments—and have the QED symbol appear only after them, then the other
8093 environments need to be nested within the proof environment.
8096 Nesting Environments
8102 for information on nesting.
8105 \begin_layout Standard
8106 And these environments are provided by
8107 \begin_inset Flex CharStyle:Code
8110 \begin_layout Plain Layout
8111 Theorems (AMS-Extended)
8119 \begin_layout Criterion*
8120 A required condition.
8123 \begin_layout Algorithm*
8124 A general procedure to be used.
8127 \begin_layout Axiom*
8128 This is a property or statement taken as true within the system being discussed.
8131 \begin_layout Condition*
8132 Sometimes used to state a condition assumed within the present context of
8137 Similar to a Remark.
8140 \begin_layout Notation*
8141 Used for the explanation of, yes, notation.
8144 \begin_layout Summary
8145 Do we really need to tell you?
8148 \begin_layout Acknowledgement*
8152 \begin_layout Conclusion*
8153 Sometimes used at the end of a long train of argument.
8157 Used in a way similar to Proposition, though perhaps lower on the scale.
8160 \begin_layout Standard
8161 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
8163 They need to be available on your system in order to use these environments.
8166 \begin_layout Section
8174 \begin_layout Standard
8180 \begin_layout Subsection
8184 \begin_layout Standard
8185 These are the layout files for some of the journals of the American Geophysical
8187 It is assumed that you have both the AGU's own class files and AGUplus
8188 installed (everything to be found at
8189 \begin_inset Flex URL
8192 \begin_layout Plain Layout
8194 ftp://ftp.agu.org/journals/latex/journals
8202 \begin_layout Subsection
8206 \begin_layout Standard
8216 They are still called this in the LyX GUI, though their LaTeX equivalents
8217 in the AGU classes are
8228 \begin_layout Standard
8229 Newly defined styles are
8266 These are mostly manuscript attributes and defined in the AGU class documentati
8270 \begin_layout Standard
8271 I suspect this is still badly incomplete.
8274 \begin_layout Subsection
8278 \begin_layout Standard
8295 \begin_layout Subsection
8299 \begin_layout Itemize
8302 Journal of Geophysical Research
8311 \begin_layout Standard
8312 Add your own, it isn't so hard! Look at the
8323 \begin_layout Subsection
8324 Bugs and things to remember
8327 \begin_layout Standard
8328 In order to use the new layouts, you must remember to do the following for
8332 \begin_layout Enumerate
8338 This can be done in the
8340 Layout\SpecialChar \menuseparator
8345 Document\SpecialChar \menuseparator
8349 (AGU articles are always in English, right? So
8356 \begin_layout Enumerate
8366 (Yes, this is a bug.)
8369 \begin_layout Enumerate
8370 Make sure you use the
8374 bibliography style, by entering
8378 into the second field of the BibTeX inset.
8379 None of the standard styles will do.
8382 \begin_layout Section
8386 \begin_layout Standard
8392 \begin_layout Subsection
8396 \begin_layout Standard
8397 Broadway is for writing plays.
8398 The format is more decorative than Hollywood, and much less standardized.
8399 This format should be suitable for workshops.
8402 \begin_layout Subsection
8406 \begin_layout Standard
8407 The same as in Hollywood.
8410 \begin_layout Subsection
8414 \begin_layout Standard
8419 names as labels then cross-reference the label to insert the name.
8420 The cross-reference dialog will show the current cast of characters.
8423 \begin_layout Subsection
8424 Paper size and Margins
8427 \begin_layout Standard
8428 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
8431 \begin_layout Subsection
8435 \begin_layout Standard
8436 The following environments are available.
8437 You can use broadway.bind to get the bind keys shown at the right.
8440 \begin_layout Itemize
8444 \begin_inset Newline newline
8449 You should not have to use this, but it is here for anything that does not
8453 \begin_layout Itemize
8457 \begin_inset space \hfill{}
8461 \begin_inset Newline newline
8466 Used to describe stage setting and the action.
8467 First use of speaker names in all CAPs.
8470 \begin_layout Itemize
8474 \begin_inset space \hfill{}
8478 \begin_inset Newline newline
8483 Automatically numbered.
8484 On screen it will be arabic, but will print as Roman.
8487 \begin_layout Itemize
8491 \begin_inset space \hfill{}
8495 \begin_inset Newline newline
8505 It is just centered text.
8508 \begin_layout Itemize
8512 \begin_inset space \hfill{}
8516 \begin_inset Newline newline
8521 Not automatically numbered.
8522 You supply the number.
8523 This is because I couldn't figure out how.
8526 \begin_layout Itemize
8530 \begin_inset space \hfill{}
8534 \begin_inset Newline newline
8539 A special case of Narrative to describe the setting and action as the curtain
8543 \begin_layout Itemize
8547 \begin_inset space \hfill{}
8551 \begin_inset Newline newline
8556 The speaker's (actor's) title, centered in all CAPS.
8559 \begin_layout Itemize
8563 \begin_inset space \hfill{}
8567 \begin_inset Newline newline
8572 Instructions to the speaker.
8573 The parentheses are automatically inserted.
8574 The ( will appear on screen, but both will be in the printed play.
8575 This environment is only used within
8582 \begin_layout Itemize
8586 \begin_inset space \hfill{}
8590 \begin_inset Newline newline
8595 What the Speaker says.
8598 \begin_layout Itemize
8602 \begin_inset space \hfill{}
8606 \begin_inset Newline newline
8611 The curtain comes down.
8614 \begin_layout Itemize
8618 \begin_inset space \hfill{}
8624 \begin_layout Itemize
8628 \begin_inset space \hfill{}
8634 \begin_layout Itemize
8638 \begin_inset space \hfill{}
8644 \begin_layout Standard
8648 \begin_layout Section
8652 \begin_layout Standard
8657 can be used to type letters according to German conventions.
8658 A template file is included in
8660 .../lyx/share/templates
8662 for you to use as a starting point.
8665 \begin_layout Section
8673 \begin_layout Standard
8679 \begin_layout Subsection
8683 \begin_layout Standard
8684 This is the layout file for the European Geophysical Society journals.
8689 can be downloaded from the web site of the EGS under
8690 \begin_inset Flex URL
8693 \begin_layout Plain Layout
8703 \begin_layout Subsection
8707 \begin_layout Standard
8710 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
8718 The current layout file is unfortunately very unmodular and would benefit
8719 from using the various
8726 \begin_layout Section
8730 \begin_layout Standard
8736 \begin_layout Standard
8737 Elsevier Science Publishers B.V.
8738 provides a standard LaTeX document class (
8742 ) for submitting articles to their various journals.
8743 The style file can be downloaded directly from their web site:
8744 \begin_inset Flex URL
8747 \begin_layout Plain Layout
8749 http://authors.elsevier.com/
8755 Instructions are supplied along with the class file, which details the
8756 requirements of the publishers.
8757 LyX includes package that allows for the use of this class, by a layout
8758 and a template file.
8759 Installation of the class file is the same as for any other LaTeX package;
8760 instructions are provided in the Elsevier documentation.
8763 \begin_layout Standard
8773 As the Elsevier class file is based mainly on the standard article class,
8774 most of the normal functionality is provided.
8775 The Elsevier class defines a number of mathematical environments, which
8776 are similar to the AMS environments.
8777 These commands are all described in the Elsevier documentation, and are
8781 \begin_layout Standard
8782 The easiest way to use the Elsevier style is to base documents on the included
8784 It is best not to use options such as fancy headings or the geometry package,
8785 as elements such as these are defined by Elsevier in their style file.
8786 Ideally, no extra packages except those mentioned in the Elsevier documentation
8788 Essentially, Elsevier require as
8789 \begin_inset Quotes eld
8793 \begin_inset Quotes erd
8796 a LaTeX file as possible, as their intention is to take the supplied file
8797 and replace the class file with one for the particular journal to which
8798 the paper has been submitted.
8799 This also means that not too much time should be spent on the formating
8801 When it comes to be published, this will change anyway.
8802 The rest of the usage for this layout is substantially the same as for
8803 the normal article class.
8804 For details of what Elsevier do and don't allow, refer to their documentation.
8807 \begin_layout Section
8813 \begin_inset CommandInset label
8822 \begin_layout Standard
8828 \begin_layout Subsection
8832 \begin_layout Standard
8833 This section describes how to use LyX to make slides for overhead projectors.
8834 There are two document classes that can do this: the default slides class
8840 This section documents the latter.
8843 \begin_layout Standard
8844 I'm going to say this again, nice and clear, so that there's no misunderstanding
8848 \begin_layout Standard
8849 \begin_inset VSpace bigskip
8855 \begin_layout Standard
8859 This section documents the class
8860 \begin_inset Quotes eld
8868 \begin_inset Quotes erd
8876 \begin_layout Standard
8877 \begin_inset VSpace bigskip
8883 \begin_layout Standard
8884 If you're looking for the documentation for
8885 \begin_inset Quotes eld
8893 \begin_inset Quotes erd
8897 \begin_inset space ~
8901 \begin_inset CommandInset ref
8903 reference "sec:slitex"
8908 If your machine doesn't have the
8913 \begin_inset Quotes eld
8921 \begin_inset Quotes erd
8924 ] installed, you'll probably have to use the default
8928 class, which isn't quite as good as
8933 \begin_layout Standard
8938 class is designed for use with version 2.1 of the
8942 LaTeX class file which is now an integral part of LaTeX2e.
8945 \begin_layout Subsection
8949 \begin_layout Standard
8950 Obviously, to use this document class, you need to select
8951 \begin_inset Quotes eld
8959 \begin_inset Quotes erd
8969 \begin_inset space ~
8975 There are some settings in the
8978 \begin_inset space ~
8983 dialog that you should know about that are specific to this class:
8986 \begin_layout Itemize
8987 Don't change the options
8998 \begin_inset space ~
9004 They're ignored by the
9011 \begin_layout Itemize
9012 The default font size is 20
9013 \begin_inset space \thinspace{}
9016 pt with the other options being 17
9017 \begin_inset space \thinspace{}
9021 \begin_inset space \thinspace{}
9025 \begin_inset space \thinspace{}
9031 \begin_layout Itemize
9040 but all math equations are still typeset in the usual roman font.
9043 \begin_layout Itemize
9048 supports A4 and Letter paper sizes as well as a special size for working
9050 \begin_inset space \thinspace{}
9054 It doesn't support A5, B5, legal or executive paper sizes.
9057 \begin_layout Itemize
9058 Don't bother changing the
9062 settings because they are ignored anyway.
9063 All floats appear where they are defined in the text.
9066 \begin_layout Itemize
9071 setting behaves a bit differently for this class.
9076 provides extensive footer and header capabilities including a user-defined
9079 \begin_inset space ~
9083 \begin_inset CommandInset ref
9085 reference "sec:foilfoot"
9090 The title page is treated differently to all other pages in the document
9099 has the logo centered at the bottom of the page (if one is defined).
9100 The possible page style choices and what they do are as follows:
9104 \begin_layout Labeling
9105 \labelwidthstring MMMMMMM
9112 The final output contains no page numbers, or other headers or footers
9113 (except footnotes of course).
9117 \begin_layout Labeling
9118 \labelwidthstring MMMMMMM
9125 The final output contains page numbers centered at the bottom of the page.
9126 No other headings or footers (other than footnotes).
9129 \begin_layout Labeling
9130 \labelwidthstring MMMMMMM
9135 Page numbers in lower right corner.
9136 Additional headers and footers are also shown.
9137 This is also the default.
9140 \begin_layout Labeling
9141 \labelwidthstring MMMMMMM
9146 Gives you access to the
9150 package although its use with
9154 is discouraged by the writer of the
9158 package because of some potential page layout clashes.
9162 \begin_layout Subsubsection
9166 \begin_layout Standard
9167 The following options may be used in the extra class options in the
9169 Document\SpecialChar \menuseparator
9175 \begin_layout Labeling
9176 \labelwidthstring MMMMMMx
9181 This sets up the page layout for 7.33
9182 \begin_inset space \thinspace{}
9186 \begin_inset space \thinspace{}
9189 in paper, which is about the same aspect ratio as a 35
9190 \begin_inset space \thinspace{}
9193 mm slide, making it a bit easier to work with this medium.
9196 \begin_layout Labeling
9197 \labelwidthstring MMMMMMx
9202 Places a rule across the page below the header on every page except the
9206 \begin_layout Labeling
9207 \labelwidthstring MMMMMMx
9212 Places a rule across the page above the footer on every page except the
9216 \begin_layout Labeling
9217 \labelwidthstring MMMMMMx
9222 This is automatically set each time you create a new
9231 to use the dvips driver to rotate those pages that are set as landscape
9235 \begin_layout Labeling
9236 \labelwidthstring MMMMMMx
9241 Simply changes the page dimensions to those of a landscape page but doesn't
9243 Thus if you use this option you need to use an external program to rotate
9244 each page or feed your paper through your printer as landscape.
9245 Note that this option effectively reverses the roles of the
9253 environments (don't worry these are described in the next section).
9256 \begin_layout Labeling
9257 \labelwidthstring MMMMMMx
9262 Equation numbers on the left.
9265 \begin_layout Labeling
9266 \labelwidthstring MMMMMMx
9271 Flush-left equations.
9274 \begin_layout Subsection
9275 Supported Environments
9278 \begin_layout Standard
9279 Most of the environments commonly supported in other classes are also supported
9285 There are several additional environments provided by
9289 as well as a couple added by LyX.
9290 The following environments are shared with other classes:
9293 \begin_layout Standard
9297 \begin_layout Plain Layout
9309 \begin_layout Itemize
9315 \begin_layout Itemize
9321 \begin_layout Itemize
9327 \begin_layout Itemize
9333 \begin_layout Itemize
9339 \begin_layout Itemize
9345 \begin_layout Itemize
9351 \begin_layout Itemize
9357 \begin_layout Itemize
9363 \begin_layout Itemize
9369 \begin_layout Itemize
9375 \begin_layout Itemize
9381 \begin_layout Itemize
9387 \begin_layout Itemize
9393 \begin_layout Itemize
9399 \begin_layout Itemize
9405 \begin_layout Itemize
9411 \begin_layout Itemize
9417 \begin_layout Standard
9421 \begin_layout Plain Layout
9433 \begin_layout Standard
9434 That is, all the major environments apart from the sectioning environments.
9435 Since foils are essentially self-contained sections, with a title and body,
9440 provides specific commands for starting new foils and these are:
9443 \begin_layout Itemize
9449 \begin_layout Itemize
9455 \begin_layout Standard
9456 LyX also provides slightly modified versions of these two environments called:
9459 \begin_layout Itemize
9465 \begin_layout Itemize
9471 \begin_layout Standard
9472 and the differences will be explained in the next section.
9475 \begin_layout Standard
9476 Since foils are often used in presenting ideas or new theorems and such
9481 also provides a comprehensive box of goodies for presenting them:
9484 \begin_layout Standard
9488 \begin_layout Plain Layout
9500 \begin_layout Itemize
9506 \begin_layout Itemize
9512 \begin_layout Itemize
9518 \begin_layout Itemize
9524 \begin_layout Itemize
9530 \begin_layout Itemize
9536 \begin_layout Itemize
9542 \begin_layout Itemize
9548 \begin_layout Itemize
9554 \begin_layout Itemize
9560 \begin_layout Itemize
9566 \begin_layout Standard
9570 \begin_layout Plain Layout
9582 \begin_layout Standard
9583 The starred versions are unnumbered while the unstarred versions are numbered.
9584 There are also two list environments added by LyX and these are:
9587 \begin_layout Itemize
9593 \begin_layout Itemize
9599 \begin_layout Standard
9604 provides some powerful header and footer capabilities that are best set
9605 in the preamble although they may be set at any point in a document.
9606 If you want to change these settings in your document the best place to
9607 do so is at the very top of a foil, i.
9608 \begin_inset space \thinspace{}
9614 \begin_inset space \space{}
9619 straight after the foilhead.
9622 \begin_layout Standard
9623 For this purpose, the following command styles are provided [
9630 \begin_layout Standard
9634 \begin_layout Plain Layout
9646 \begin_layout Itemize
9650 \begin_inset space ~
9656 \begin_layout Itemize
9662 \begin_layout Itemize
9666 \begin_inset space ~
9672 \begin_layout Itemize
9676 \begin_inset space ~
9682 \begin_layout Itemize
9686 \begin_inset space ~
9693 \begin_layout Standard
9694 \begin_inset space ~
9701 \begin_layout Standard
9705 \begin_layout Plain Layout
9717 \begin_layout Standard
9718 There are also a few commands provided by
9722 that aren't directly supported by LyX but I'll tell you what they do and
9723 how to use them in section
9724 \begin_inset space ~
9728 \begin_inset CommandInset ref
9730 reference "sec:unsuppfoils"
9737 \begin_layout Subsection
9738 Building a Set of Foils
9741 \begin_layout Standard
9742 This section will give a simple introduction to using the different environments
9743 to build a set of foils.
9744 If you want to see an example set of foils, take a look at the
9748 file you find in LyX's
9755 \begin_layout Subsubsection
9756 Give It a Title Page
9759 \begin_layout Standard
9760 Unlike other classes that provide
9780 creates the title on a page of its own.
9781 If you leave out the
9785 environment LaTeX will substitute the current date (every time you regenerate
9789 \begin_layout Subsubsection
9793 \begin_layout Standard
9794 As I mentioned earlier, there are four ways of starting a new foil.
9795 For portrait foils you should use
9804 The difference between these two environments is the amount of space between
9805 the title of the foil (the foilhead) and the body of the foil.
9808 \begin_layout Standard
9809 Landscape foils are generated using the
9818 Again the only difference is the spacing between foilhead and body.
9819 Both of the short versions have 0.5 inches less separation between the foilhead
9824 \begin_layout Standard
9825 One problem with the support for landscape foils is the requirement that
9830 driver to generate the PostScript output otherwise the foils won't be rotated.
9831 It is possible to get landscape foils even if you haven't got the
9835 driver provided you can feed your foils sideways through your printer ;-)
9838 \begin_layout Subsubsection
9839 Theorems, Lemmas, Proofs and more
9842 \begin_layout Standard
9843 Due to a small bug in LyX you can't have two of the same type of these environme
9844 nts directly following each other.
9845 They must be separated by something.
9846 If you try, you will just be extending the previous environment as if you
9847 had merged the two environments together.
9848 So, how do you get around this problem? The simplest option is to insert
9849 some text between the two environments or add a
9853 environment between the two with just a
9854 \begin_inset Quotes eld
9862 \begin_inset Quotes erd
9866 This will force LyX to produce two separate environments and hence the
9867 correct LaTeX output.
9868 An example is provided in the example file included with the LyX distribution.
9869 Remember, this problem only occurs if you are trying to place two of the
9870 same type of theorem-like environments one directly after the other.
9873 \begin_layout Subsubsection
9877 \begin_layout Standard
9878 You get all the commonly supported list styles found in other classes as
9879 well as two new ones.
9880 I'll only describe the new ones here.
9881 If you want to find out more about the other list environments check out
9887 If you intend to use itemized lists you might also want to read about the
9891 \begin_inset space ~
9895 \begin_inset space ~
9900 dialog described above in section
9901 \begin_inset space ~
9905 \begin_inset CommandInset ref
9907 reference "sec:bullet"
9914 \begin_layout Standard
9915 The two new list styles,
9923 , are designed to make it easier for you to create lists of do's and don'ts
9924 or right and wrong by providing dedicated environments that use a tick
9925 or a cross as the label of the list.
9926 These lists are in fact dedicated variants of the
9931 They do however require that you have the
9938 \begin_layout Subsubsection
9942 \begin_layout Standard
9947 redefines the floating tables and figures so that they appear exactly where
9948 they are in the text rather than pushing them to the top of the page or
9949 to some user specified location.
9950 In fact if you change the float placement settings they are simply ignored.
9953 \begin_layout Subsubsection
9954 Page Headers and Footers
9955 \begin_inset CommandInset label
9964 \begin_layout Standard
9968 \begin_inset space ~
9977 are two commands used to control the left-footer text string.
9978 The first is meant to allow you to include a graphic logo on your foils
9980 \begin_inset Quotes eld
9988 \begin_inset Quotes erd
9992 While the second is meant to provide a classification for the audience,
9996 \begin_inset space \thinspace{}
10002 \begin_inset space \space{}
10006 It is empty by default.
10009 \begin_layout Standard
10010 The remaining page corners can be filled by
10013 \begin_inset space ~
10018 (which defaults to page numbers),
10021 \begin_inset space ~
10029 \begin_inset space ~
10037 \begin_layout Subsection
10043 \begin_inset CommandInset label
10045 name "sec:unsuppfoils"
10052 \begin_layout Standard
10053 All the commands mentioned below need to be set in a
10061 within another environment.
10064 \begin_layout Subsubsection
10068 \begin_layout Standard
10069 All lengths are adjusted using the
10092 should be replaced by the name given to the length you want to change and
10097 is the length value.
10098 All lengths should be specified in units of length such as inches (
10110 ) or relative to some document or font-based length such as
10120 \begin_layout Standard
10121 It's possible to change the spacing between a foilhead and the body of the
10122 foil by adjusting the length specified by
10129 For example, to make
10134 \begin_inset space \space{}
10137 in closer to their bodies put the following in the preamble:
10143 foilheadskip}{-0.5in}
10146 \begin_layout Standard
10147 The spacings around floats can be adjusted by setting these lengths:
10150 \begin_layout Labeling
10151 \labelwidthstring MMMMMMMMMMM
10158 Separation between the text and the top of the float
10161 \begin_layout Labeling
10162 \labelwidthstring MMMMMMMMMMM
10169 Separation between the float and the caption
10172 \begin_layout Labeling
10173 \labelwidthstring MMMMMMMMMMM
10180 Separation between the caption and the following text
10183 \begin_layout Labeling
10184 \labelwidthstring MMMMMMMMMMM
10191 You can make the captions narrower than the surrounding text by adjusting
10193 Best done relative to
10202 \begin_layout Standard
10203 There are also several title page related lengths that you may find useful
10204 if you have a long title or several authors:
10207 \begin_layout Labeling
10208 \labelwidthstring MMMMMMMMMMM
10215 Separation from headers to
10220 \begin_layout Labeling
10221 \labelwidthstring MMMMMMMMMMM
10239 \begin_layout Labeling
10240 \labelwidthstring MMMMMMMMMMM
10254 \begin_layout Labeling
10255 \labelwidthstring MMMMMMMMMMM
10271 \begin_layout Labeling
10272 \labelwidthstring MMMMMMMMMMM
10288 \begin_layout Standard
10289 The last length related command affects all the list environments.
10300 a list environment then all the vertical spacing between the list items
10302 Note that this is a command not a length so it doesn't require
10308 like the stuff mentioned above.
10311 \begin_layout Subsubsection
10312 Headers and Footers
10315 \begin_layout Standard
10328 commands control whether the logo in the
10332 definition appear on a given page.
10339 in the preamble then none of the foils will have the logo on them.
10340 If you don't want the logo on a particular page place the
10346 directly after the foilhead of that page and the
10352 directly after the next foilhead.
10355 \begin_layout Standard
10356 If you decide to use the
10360 page style setting in the
10363 \begin_inset space ~
10368 dialog you should probably add
10378 to your preamble so headers and footers on landscape pages are correctly
10379 placed when rotated.
10380 This is due to some clashes between the page layouts provided by the
10391 \begin_layout Section
10392 Hollywood (Hollywood spec scripts)
10395 \begin_layout Standard
10401 \begin_layout Subsection
10405 \begin_layout Standard
10406 Getting the format of a Hollywood script right is a
10407 \begin_inset Quotes eld
10411 \begin_inset Quotes erd
10414 It is designed to make the readers focus on content and to be easy and
10415 familiar for the actors to read.
10416 Each page of a script should be one minute of film.
10417 Nothing goes in a script that you cannot see or hear on screen.
10418 The courier 12 pt font should be used throughout.
10422 \begin_layout Subsection
10426 \begin_layout Standard
10427 Speakers' lines should NEVER break in mid-sentence.
10428 If a speaker's lines continue over a page break, repeat the
10432 title followed by (Cont'd).
10435 \begin_layout Subsection
10439 \begin_layout Standard
10444 names as labels then cross-reference the label to insert the name.
10445 The cross-reference dialog will show the current cast of characters.
10446 You can use this to insert the speaker name in narratives also.
10449 \begin_layout Subsection
10450 Paper size and Margins
10453 \begin_layout Standard
10454 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
10457 \begin_layout Subsection
10461 \begin_layout Standard
10462 The following environments are available.
10463 You can use hollywood.bind to get the bind keys shown at the right.
10466 \begin_layout Itemize
10470 \begin_inset Newline newline
10475 Used where nothing else works.
10479 \begin_layout Itemize
10485 \begin_inset space \hfill{}
10493 \begin_inset Newline newline
10496 Usually followed by something like
10497 \begin_inset Quotes eld
10500 on Sally waking up.
10501 \begin_inset Quotes erd
10507 \begin_layout Itemize
10511 \begin_inset space \hfill{}
10515 \begin_inset Newline newline
10520 Introduces a new INTERIOR camera set-up.
10521 Always followed by DAY or NIGHT, or something similar to define the lighting
10523 Everthing on this line in CAPS.
10526 \begin_layout Itemize
10530 \begin_inset space \hfill{}
10534 \begin_inset Newline newline
10539 Introduces a new EXTERIOR camera set-up.
10540 Everthing on this line in CAPS.
10543 \begin_layout Itemize
10547 \begin_inset space \hfill{}
10551 \begin_inset Newline newline
10556 The character speaking.
10559 \begin_layout Itemize
10563 \begin_inset space \hfill{}
10567 \begin_inset Newline newline
10572 Instructions to the speaker.
10573 The () are automatically inserted, but only the ( will show in LyX.
10574 Both will be printed.
10577 \begin_layout Itemize
10581 \begin_inset space \hfill{}
10585 \begin_inset Newline newline
10597 \begin_layout Itemize
10601 \begin_inset space \hfill{}
10605 \begin_inset Newline newline
10610 Camera movement instruction.
10612 \begin_inset space \thinspace{}
10616 \begin_inset space \space{}
10622 \begin_layout Itemize
10626 \begin_inset space \hfill{}
10632 \begin_layout Itemize
10636 \begin_inset space \hfill{}
10642 \begin_layout Itemize
10646 \begin_inset space \hfill{}
10652 \begin_layout Itemize
10656 \begin_inset space \hfill{}
10662 \begin_layout Subsection
10666 \begin_layout Itemize
10667 (O.S) — off screen
10670 \begin_layout Itemize
10671 (V.0) — voice over
10674 \begin_layout Itemize
10676 \begin_inset space \thinspace{}
10683 \begin_layout Itemize
10688 \begin_layout Itemize
10689 PAN — camera movement
10692 \begin_layout Itemize
10693 INSERT — cut to close-up of
10696 \begin_layout Section
10700 \begin_layout Standard
10703 Panayotis Papasotiriou
10706 \begin_layout Subsection
10710 \begin_layout Standard
10711 The ijmpc package is a set of macros that facilitates electronic manuscript
10714 International Journal of Modern Physics C
10717 Similarly, the ijmpd package is for creating manuscripts to be submitted
10720 International Journal of Modern Physics D
10723 Both journals are published by World Scientific.
10724 The corresponding document classes are named
10733 These files, together with instructions for the authors, can be downloaded
10735 \begin_inset Flex URL
10738 \begin_layout Plain Layout
10740 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
10746 \begin_inset Flex URL
10749 \begin_layout Plain Layout
10751 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
10757 Both packages are modified versions of the standard
10758 \begin_inset Quotes eld
10762 \begin_inset Quotes erd
10765 package, and they are almost (but not exactly) identical.
10766 Most of their features are supported by LyX.
10767 I have used LyX successfully to write articles submitted to both journals
10768 without any problem.
10771 \begin_layout Subsection
10775 \begin_layout Standard
10776 As usual, the easiest way to write a paper is to start with a template.
10779 File\SpecialChar \menuseparator
10798 This will give an (almost) empty document that includes the most common
10799 fields found in a manuscript.
10800 Simply overwrite the existing text (including the brackets,
10805 You should keep in mind the following remarks.
10808 \begin_layout Enumerate
10809 LyX won't let you change the font size and the page style of the document,
10810 because such modifications are not allowed by both packages.
10813 \begin_layout Enumerate
10814 The language of the document should not be changed.
10815 Before previewing your paper, be sure that the babel package is not used.
10816 To do this, click on
10818 Tools\SpecialChar \menuseparator
10829 checkbox in the language settings, and click on
10837 , if you wish to make this change permanent).
10840 \begin_layout Enumerate
10842 \begin_inset Quotes eld
10846 \begin_inset Quotes erd
10849 style must be used to define keywords.
10852 \begin_layout Enumerate
10853 The ijmpc package provides a style named
10854 \begin_inset Quotes eld
10857 Classification Codes
10858 \begin_inset Quotes erd
10861 , which can be used to define classification codes, such as PACS numbers.
10862 Note that this facility is not supported by the ijmpd package.
10865 \begin_layout Enumerate
10866 Several new environments are available:
10867 \begin_inset Quotes eld
10871 \begin_inset Quotes erd
10875 \begin_inset Quotes eld
10879 \begin_inset Quotes erd
10883 \begin_inset Quotes eld
10887 \begin_inset Quotes erd
10891 \begin_inset Quotes eld
10895 \begin_inset Quotes erd
10899 \begin_inset Quotes eld
10903 \begin_inset Quotes erd
10907 \begin_inset Quotes eld
10911 \begin_inset Quotes erd
10915 \begin_inset Quotes eld
10919 \begin_inset Quotes erd
10923 \begin_inset Quotes eld
10927 \begin_inset Quotes erd
10931 \begin_inset Quotes eld
10935 \begin_inset Quotes erd
10939 \begin_inset Quotes eld
10943 \begin_inset Quotes erd
10947 \begin_inset Quotes eld
10951 \begin_inset Quotes erd
10955 \begin_inset Quotes eld
10959 \begin_inset Quotes erd
10963 \begin_inset Quotes eld
10967 \begin_inset Quotes erd
10971 \begin_inset Quotes eld
10975 \begin_inset Quotes erd
10979 Their use is more or less obvious.
10980 LyX supports all these environments; it will use the proper label, text
10981 style, and numbering scheme for each of them.
10984 \begin_layout Enumerate
10985 Both packages use basic citations; the natbib package should not be used.
10986 In LyX, citation references are shown as usual; in the output, citations
10987 are shown as superscripts.
10988 If you want to use a citation as normal text, you should use the
10993 \begin_inset space \thinspace{}
10997 \begin_inset space \space{}
11001 \begin_inset Quotes eld
11005 \begin_inset space \space{}
11015 \begin_inset Quotes erd
11021 \begin_layout Enumerate
11023 \begin_inset Quotes eld
11027 \begin_inset Quotes erd
11030 section in both packages.
11031 To put acknowledgments, just use the
11032 \begin_inset Quotes eld
11036 \begin_inset Quotes erd
11042 \begin_layout Enumerate
11043 Appendices may be added to the paper,
11047 the Acknowledgments and
11052 LyX provides a special environment, called
11053 \begin_inset Quotes eld
11057 \begin_inset Quotes erd
11060 which marks the beginning of the appendices.
11061 This environment should be left blank; it just sends a LaTeX command, but
11062 nothing is really printed.
11064 \begin_inset Quotes eld
11068 \begin_inset Quotes erd
11071 is printed with blue letters, as a signal that all sections after that
11072 point are appendices.
11073 To write an appendix, use the
11074 \begin_inset Quotes eld
11078 \begin_inset Quotes erd
11082 LyX will number each appendix with capital letters, as required by both
11085 \begin_inset Quotes eld
11089 \begin_inset Quotes erd
11096 be present before the first appendix; if not, all appendices will be numbered
11097 as normal sections in the output.
11100 \begin_layout Enumerate
11101 The ijmpc and the ijmpd packages use the
11105 command to implement table captions.
11106 As a result, a table created by LyX is printed correctly, but its caption
11108 However, you can use some TeX code to overpass this problem, so that captions
11109 are printed as expected.
11110 To do so, create a float table as usual, remove the caption, and replace
11111 it with the TeX code
11121 (sic); you must also the TeX code
11125 immediately after the tabular material.
11126 Study the example table included in the template files to see how this
11127 trick is implemented.
11128 Alternatively, If you need table captions, you should implement the whole
11133 file, then include this file to the LyX document (
11135 Insert\SpecialChar \menuseparator
11136 File\SpecialChar \menuseparator
11138 \begin_inset space ~
11144 Details on how to create a table float can be found in the files
11152 , included in the corresponding packages.
11155 \begin_layout Subsection
11156 Preparing a paper for submission
11159 \begin_layout Standard
11160 Before you submit your paper you must export the LyX document as a LaTeX
11163 File\SpecialChar \menuseparator
11164 Export\SpecialChar \menuseparator
11171 \begin_layout Plain Layout
11172 Actually you have the choice between LaTeX (plain) and pdflatex.
11173 If you intend to use pdflatex to prepare the paper, you should use the
11174 pdflatex option so that included graphics are converted to PDF format,
11175 ready for use by pdflatex.
11180 , then make the following changes to the resulting
11187 \begin_layout Enumerate
11188 Remove the comment lines before the
11197 \begin_layout Enumerate
11198 Remove everything between (and including) the
11210 commands, except for any commands you specifically put into the LaTeX preamble.
11213 \begin_layout Standard
11218 file should be saved and processed through LaTeX as many times as necessary.
11219 You may also want to check the resulting
11226 \begin_layout Subsection
11230 \begin_layout Standard
11231 The use of TeX code is reduced to two commands, which must be placed at
11232 the top of the document.
11233 If you started writing your paper by using the
11241 template, the TeX code needed is already in its place; you usually don't
11243 You may only modify the first TeX code to specify the information printed
11244 to the top of odd and even pages (authors' names and short paper's title,
11246 This TeX code must have the form
11250 markboth{Authors' Names}{Short Paper's Title}
11255 \begin_layout Section
11259 \begin_layout Standard
11265 \begin_layout Subsection
11269 \begin_layout Standard
11270 The iopart package provides a document class to create electronic manuscript
11271 submission to the journals published by the Institute of Physics.
11272 Instructions for the authors how to create a paper using the iopart class
11273 can be downloaded together with the iopart package from the site
11274 \begin_inset Flex URL
11277 \begin_layout Plain Layout
11279 ftp://ftp.iop.org/pub/journals/latex2e
11287 \begin_layout Subsection
11291 \begin_layout Standard
11292 The easiest way to write a paper is to start with the file
11296 that is available in LyX's examples files folder.
11297 Open this file, save it under a new name, and start writing.
11298 The example file explains how to use the special text environments.
11299 Here are the most important advices:
11302 \begin_layout Itemize
11303 To be able to compile your document to a PDF, PS, or DVI, assure that the
11306 Use AMS math package
11308 in the document settings under
11315 \begin_layout Itemize
11318 The title environment defines the kind of your paper.
11319 So use one of the following environments for the title:
11323 \begin_layout Itemize
11332 \begin_layout Itemize
11341 \begin_layout Itemize
11347 for a Topical review
11350 \begin_layout Itemize
11359 \begin_layout Itemize
11368 \begin_layout Itemize
11374 for a Paper (same as Title)
11377 \begin_layout Itemize
11383 for a Preliminary communication
11386 \begin_layout Itemize
11392 for a Rapid communication
11395 \begin_layout Itemize
11401 for a Letter to the editor
11405 \begin_layout Itemize
11408 All title environments except of
11412 can have an optional short title.
11415 \begin_layout Itemize
11416 There is a general title environment
11420 which is not directly supported by the LyX.
11421 This can be used as TeX code when your document doesn't fit into one of
11422 the other title types.
11425 \begin_layout Standard
11426 For more informations like hints for special table and formula formatting,
11427 look at the IOP author guidelines.
11430 \begin_layout Section
11434 \begin_layout Standard
11437 Panayotis Papasotiriou
11440 \begin_layout Subsection
11444 \begin_layout Standard
11445 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
11446 that facilitates electronic manuscript submission to the journals they
11448 Most known of them (at least in my domain of interest) are
11450 Astrophysics and Space Science
11456 , but there are many others (see a complete list at
11457 \begin_inset Flex URL
11460 \begin_layout Plain Layout
11462 http://www.wkap.nl/jrnllist.htm/JRNLHOME
11468 The Kluwer package may be downloaded from the site
11469 \begin_inset Flex URL
11472 \begin_layout Plain Layout
11474 http://www.wkap.nl/kaphtml.htm/STYLEFILES
11480 A complete user guide is contained in that package (but it can also be
11481 downloaded separately).
11484 \begin_layout Standard
11485 LyX supports many features of the package but not everything.
11486 However, the TeX code needed is reduced to some
11487 \begin_inset Quotes eld
11491 \begin_inset Quotes erd
11494 commands of the package (see
11495 \begin_inset space ~
11499 \begin_inset CommandInset ref
11501 reference "subsec:kluwer_peculiarities"
11506 I have recently used LyX to write an article submitted to the
11508 Astrophysics and Space Science
11510 without any problem.
11513 \begin_layout Subsection
11517 \begin_layout Standard
11518 The easiest way to write a paper is to start with the Kluwer template file.
11521 File\SpecialChar \menuseparator
11533 This will give an (almost) empty document that includes the most common
11534 fields found in a manuscript and a short description of their use.
11535 As in most templates, simply overwrite the existing text (including the
11540 ) with the correct information.
11543 \begin_layout Subsection
11544 Preparing a paper for submission
11547 \begin_layout Standard
11548 As in the AASTeX package, before you submit your paper to a journal you
11550 \begin_inset Quotes eld
11554 \begin_inset Quotes erd
11560 \begin_layout Enumerate
11561 Export your paper as a LaTeX file.
11562 To do this, click on
11564 File\SpecialChar \menuseparator
11565 Export\SpecialChar \menuseparator
11572 \begin_layout Enumerate
11577 file with a text editor and make the following changes
11581 \begin_layout Enumerate
11582 remove the comment lines before the
11591 \begin_layout Enumerate
11592 remove everything between (and including) the
11604 commands, except for any commands you specifically put into the LaTeX preamble.
11607 \begin_layout Standard
11616 \begin_layout Enumerate
11621 file through LaTeX as many times as necessary (usually up to three).
11624 \begin_layout Enumerate
11630 \begin_inset space \thinspace{}
11634 \begin_inset space \space{}
11641 , and check if everything is OK (it should, if you didn't make any mistake).
11644 \begin_layout Subsection
11645 \begin_inset Quotes eld
11649 \begin_inset Quotes erd
11652 of the Kluwer package
11653 \begin_inset CommandInset label
11655 name "subsec:kluwer_peculiarities"
11662 \begin_layout Standard
11663 The Kluwer package has the following
11664 \begin_inset Quotes eld
11668 \begin_inset Quotes erd
11674 \begin_layout Enumerate
11675 It is possible to write multiple articles in the same LaTeX file
11679 \begin_layout Plain Layout
11680 I can't imagine any good reason to do this.
11686 Each article must be included in the environment
11687 \begin_inset Quotes eld
11691 \begin_inset Quotes erd
11695 Unfortunately, this environment cannot be omitted, even if you write just
11697 Therefore, each article starts with the command
11703 and, obviously, ends with the command
11710 Although this can be implemented in LyX, I didn't included it, since it
11711 looks ugly and can confuse the novice user.
11712 Therefore, you need to enter them directly and mark them as LaTeX code
11714 \begin_inset Quotes eld
11718 \begin_inset Quotes erd
11724 \begin_layout Enumerate
11725 Information given at the beginning of the article (i.
11726 \begin_inset space \thinspace{}
11730 \begin_inset space \space{}
11733 title, subtitle, author, institution, running title, running author, abstract
11734 and keywords) must be included in an environment called
11735 \begin_inset Quotes eld
11739 \begin_inset Quotes erd
11743 This is not implemented in LyX, so you must enter title, subtitle etc.
11744 \begin_inset space ~
11747 between two TeX code lines (
11762 \begin_layout Enumerate
11763 According to the user manual, the label of each bibliography item must be
11787 \begin_layout Standard
11792 template takes care of all these
11793 \begin_inset Quotes eld
11797 \begin_inset Quotes erd
11801 If you start a new paper using this template you don't need to do anything
11806 \begin_layout Enumerate
11807 don't delete the TeX code included in the template, and
11810 \begin_layout Enumerate
11811 copy the example bibliography item included in the template and modify it
11812 as necessary to enter new bibliography items.
11815 \begin_layout Section
11819 \begin_layout Standard
11825 \begin_layout Subsection
11829 \begin_layout Standard
11830 The LyX document classes
11832 article (koma-script)
11836 report (koma-script)
11854 correspond to the LaTeX document classes
11871 \begin_inset space ~
11874 of the Koma-Script family.
11875 They are replacements for the standard document classes
11891 , resp., and fit better to European typography conventions in a number of
11895 \begin_layout Itemize
11896 Standard character size is 11pt in
11898 article (koma-script)
11902 report (koma-script)
11910 letter (koma-script)
11915 \begin_layout Itemize
11916 Headings, labels of the description environment, and a number of elements
11919 letter (koma-script)
11921 document class are set in a bold sans serif font.
11925 \begin_layout Plain Layout
11926 There is a big difference between the bold sans serif old cm fonts and new
11927 ec fonts, especially in the appearance of headings.
11928 In comparison, the ec bold sans serif fonts look a bit thin.
11929 Here the LaTeX package
11937 helps to produce the
11938 \begin_inset Quotes eld
11942 \begin_inset Quotes erd
11945 appearance when using the ec fonts.
11950 The numbering of chapter headings is made in the same way as the numbering
11951 of section headings, that is without the extra line
11952 \begin_inset Quotes eld
11955 Chapter\SpecialChar \ldots{}
11957 \begin_inset Quotes erd
11961 In addition, the appearance of the headings can be modified by using a
11962 number of options (in LyX to be entered in the field
11965 \begin_inset space ~
11972 Layout\SpecialChar \menuseparator
11976 A detailed German description of these options can be found in the Koma-Script
11984 \begin_layout Itemize
11985 The main means in the Koma-Script document classes to design the type area
11994 (in LyX to be entered in the extra class options field in the dialog
11996 Document\SpecialChar \menuseparator
12000 They make a clearer modification of page margins possible as do the options
12003 Document\SpecialChar \menuseparator
12007 A detailed German description of these and other type area options can
12008 be found in the Koma-Script documentation
12015 \begin_layout Itemize
12016 The LaTeX document classes of the Koma-Script family define a number of
12017 additional commands.
12018 Those part of it which makes sense in LyX is implemented in corresponding
12022 \begin_layout Standard
12023 A detailed German description of the LaTeX document classes of the Koma-Script
12024 family can be found in the Koma-Script documentation
12032 \begin_layout Plain Layout
12033 There is an English translation
12037 , but it is not a complete one.
12042 The following sections describe only those aspects, which are relevant
12046 \begin_layout Subsection
12047 article (koma-script), report (koma-script), and book (koma-script)
12050 \begin_layout Standard
12051 The document classes
12053 article (koma-script)
12057 report (koma-script)
12067 are implemented in the layout files
12080 They contain all the paragraph types of the corresponding standard document
12093 , resp., partly modified, with the exception of the LyX specific
12097 -type, which is replaced by the new
12101 -type having the same functionality.
12106 -Type there is a number of new paragraph types added.
12113 letter (koma-script)
12118 \begin_layout Itemize
12127 : are equivalents to
12135 , resp., additionally inserting an entry in the table of contents.
12144 are not contained in
12146 article (koma-script)
12151 \begin_layout Itemize
12160 : behave exactly as
12168 , resp., additionally clearing running heads.
12173 is not contained in
12175 article (koma-script)
12181 \begin_layout Plain Layout
12194 report (koma-script)
12196 , but since this is identical to
12200 , is has not been implemented in LyX.
12208 \begin_layout Itemize
12213 : generates a heading directly above the following paragraph in the standard
12214 character size without affecting the structure of the document.
12217 \begin_layout Itemize
12226 are special captions which respect the different space settings needed
12227 for captions placed above or below an element (if you follow strict typographic
12228 rules, you might want to place table captions always above the table).
12229 You can also use the class option
12233 , which will switch
12246 You need at least Koma-Script version 2.8q to use this.
12249 \begin_layout Itemize
12254 : can be used to set a bonmot, e.
12255 \begin_inset space \thinspace{}
12259 \begin_inset space \space{}
12262 at the beginning of a chapter.
12263 If you use the optional argument (
12265 Insert\SpecialChar \menuseparator
12267 \begin_inset space ~
12272 ), you can insert the dictum's author there.
12273 Dictum and author are separated by a line.
12274 You need at least Koma-Script version 2.8q to use this.
12279 is not contained in
12281 article (koma-script)
12286 \begin_layout Standard
12287 The following types, together with the standard types
12299 , form the title area of the document.
12300 They must be entered ahead of the first
12301 \begin_inset Quotes eld
12305 \begin_inset Quotes erd
12312 \begin_layout Plain Layout
12313 The corresponding LaTeX commands must appear before the
12324 When such a type is used more than once, the latter usage overwrites the
12325 former one, that means, for every type only the latest usage is valid.
12326 The order of the different types however has, like
12338 , no effect on the appearance of the produced document.
12341 \begin_layout Itemize
12346 : produces a centered paragraph above the ordinary title (
12358 ) for the subject of the document.
12361 \begin_layout Itemize
12366 : produces a centered paragraph below the ordinary title (
12378 ) for the publishers' name.
12381 \begin_layout Itemize
12388 report (koma-script)
12394 produces a centered paragraph on its own page behind the title page, or
12397 article (koma-script)
12399 produces a centered paragraph below the ordinary title (
12415 ) for a dedication.
12418 \begin_layout Itemize
12423 : produces a left aligned paragraph above the ordinary title (
12439 ) for a document`s head.
12442 \begin_layout Itemize
12447 : produces in a double-sided print in
12449 report (koma-script)
12455 a left-aligned paragraph at the top of the title page`s back or has no
12456 effect in a single-sided print or in
12458 article (koma-script)
12463 \begin_layout Itemize
12468 : produces in a double-sided print in
12470 report (koma-script)
12476 a left-aligned paragraph at the bottom of the title page`s back or has
12477 no effect in a single-sided print or in
12479 article (koma-script)
12484 \begin_layout Itemize
12489 : produces a special
12490 \begin_inset Quotes eld
12494 \begin_inset Quotes erd
12497 page ahead of the actual document containing a paragraph without special
12501 \begin_layout Standard
12502 The layout files for the document classes
12504 article (koma-script)
12508 report (koma-script)
12514 do include the file
12519 This is thought of as a place to define your own types.
12524 in your personal layout directory and edit the file!
12527 \begin_layout Subsection
12528 letter (koma-script)
12531 \begin_layout Standard
12535 \begin_layout Plain Layout
12547 \begin_layout Standard
12551 letter (koma-script)
12553 is implemented in the layout file
12558 It contains all the paragraph types of the corresponding standard document
12563 , partly modified, with the exception of the LyX specific types
12575 type, which is replaced by the new
12580 In addition, it contains, in contrast to the standard document class, the
12598 Furthermore, there are a number of new letter specific types.
12601 \begin_layout Standard
12605 \begin_layout Plain Layout
12617 \begin_layout Standard
12618 The appearance of the letter produced by this document class can be controlled
12619 by a number of LaTeX commands, which you can put in the LaTeX preamble.
12623 \begin_layout Plain Layout
12624 For example, the standard appearance of the letter`s heading, consisting
12625 of name and address, is quite self-willed.
12627 \begin_inset Quotes eld
12631 \begin_inset Quotes erd
12634 heading is produced by the following LaTeX commands in the preamble:
12637 \begin_layout LyX-Code
12647 \begin_layout LyX-Code
12663 \begin_layout LyX-Code
12673 \begin_layout LyX-Code
12693 A detailed German description of such LaTeX commands can be found in the
12694 Koma-Script documentation
12699 With it, the letter's author can produce his personal letter layout.
12702 \begin_layout Standard
12711 define the beginning of the letter and must be used in every letter.
12712 To emphasize them in the LyX document class, they are marked with the letter
12722 \begin_inset space ~
12725 in the left margin.
12726 It is possible to write any number of letters in one file.
12731 type produces a new letter using the same addressee and a
12735 type produces a new addressee.
12752 are ordinary paragraph types and can also be used several times in one
12753 and the same letter.
12756 \begin_layout Itemize
12761 : produces a paragraph for the addressee and implicitly defines the beginning
12765 \begin_layout Itemize
12770 : produces a paragraph for the form of address and implicitly produces a
12774 \begin_layout Itemize
12779 : produces a paragraph for a close.
12782 \begin_layout Itemize
12787 : produces a paragraph for a postscript.
12790 \begin_layout Itemize
12795 : produces a paragraph for a distribution list.
12798 \begin_layout Itemize
12803 : produces a paragraph for enclosures.
12806 \begin_layout Standard
12847 are input types provided with a label to enter information, which will
12848 be processed by the document class.
12852 \begin_layout Plain Layout
12853 It could be seen as a matter of inconsequence, that the types
12861 described above are not such input types as well.
12862 Because of the special meaning of those types, however, I have implemented
12863 them as ordinary paragraph types with a one letter mark in the left margin.
12864 Moreover, it would affect my feeling of symmetry, if the
12872 type had such a serious different appearance.
12877 The types must be used ahead of the corresponding
12884 \begin_layout Standard
12885 An implementation of these types in a WYSIWYG fashion does not seem to make
12886 sense, because the real appearance of the produced letter does not only
12887 depend on the usage of the particular type, but also on other factors.
12888 For example, a signature entered in the
12892 type will in the standard behavior appear in the produced letter only,
12893 when in the same letter also a
12898 The entered value of the
12902 type will in the standard behavior not appear in the produced letter at
12904 The possibility to design the letter`s heading freely is already indicated
12905 in a footnote above.
12908 \begin_layout Standard
12909 The input types can also be used as empty paragraphs.
12910 This makes sense e.
12911 \begin_inset space \thinspace{}
12915 \begin_inset space \space{}
12927 type is not used at all, in the standard behavior the value of the
12931 type is used as signature, whereas if an empty
12935 type is used, no signature value is defined.
12938 \begin_layout Standard
12939 By using the input types it is possible to write a letter template, containing
12940 filled input types with your personal dates (name, address, etc.) and empty
12941 input types for other dates you want to enter.
12944 \begin_layout Itemize
12949 : sender's name, in the standard behavior appears as a centered paragraph
12950 in small caps in the letter`s heading.
12953 \begin_layout Itemize
12958 : sender's signature, in the standard behavior appears below the
12967 type is used, the value of the
12971 type appears instead.
12974 \begin_layout Itemize
12979 : sender's address, in the standard behavior appears in a centered paragraph
12980 in the letter`s heading below the sender's name.
12983 \begin_layout Itemize
12988 : sender's telephone number, in the standard behavior only sets the LaTeX
12998 \begin_layout Itemize
13003 : place of the letter`s making.
13006 \begin_layout Itemize
13011 : date of the letter`s making.
13020 , in the standard behavior, produce the place and the date in a right-aligned
13021 line below the addressee's field.
13026 type is used, neither place nor date appear, independent of the value of
13036 type is used, the date of the letter `s production is used.
13039 \begin_layout Itemize
13044 : sender`s back address, in the standard behavior appears above the addressee's
13045 field in a small sans serif font.
13048 \begin_layout Itemize
13053 : special mail information, in the standard behavior appears underlined
13054 above the addressee's field below the back address.
13057 \begin_layout Itemize
13062 : additional information, in the standard behavior appears on right side
13063 below the addressee`s field.
13066 \begin_layout Itemize
13071 : the letter's title, in the standard behavior appears in a big, bold, sans
13072 serif font above the subject.
13075 \begin_layout Itemize
13080 : the letter's subject, in the standard behavior appears in a bold font
13088 \begin_layout Standard
13109 produce a business letter like line above the
13113 line containing the fields
13114 \begin_inset Quotes eld
13118 \begin_inset Quotes erd
13122 \begin_inset Quotes eld
13126 \begin_inset Quotes erd
13130 \begin_inset Quotes eld
13134 \begin_inset Quotes erd
13138 \begin_inset Quotes eld
13142 \begin_inset Quotes erd
13146 \begin_inset Quotes eld
13150 \begin_inset Quotes erd
13154 \begin_inset Quotes eld
13158 \begin_inset Quotes erd
13162 For the date field, the value of the
13168 \begin_inset Quotes eld
13171 business letter types
13172 \begin_inset Quotes erd
13175 is used, the value of the
13179 type however does not appear, but only the LaTeX variable
13186 The ordinary output of place and date in a right-aligned line below the
13187 addressee`s field is suppressed.
13188 The types are implemented as input types provided with a label and must
13189 be used ahead of the corresponding
13196 \begin_layout Itemize
13204 \begin_layout Itemize
13212 \begin_layout Itemize
13220 \begin_layout Itemize
13228 \begin_layout Itemize
13236 \begin_layout Subsection
13237 The new letter class: letter (koma-script v.2)
13240 \begin_layout Standard
13243 Jürgen Spitzmüller
13246 \begin_layout Standard
13247 \begin_inset VSpace medskip
13253 \begin_layout Standard
13255 Koma-Script version 2.8 has introduced a new letter class
13259 which supersedes the now unsupported
13264 It has — on the LaTeX side — a completely new interface and is not compatible
13265 with the old class.
13266 Therefore, LyX supports both, though it is recommended to use the new class.
13269 \begin_layout Standard
13270 This class covers the same functionality as
13272 letter (koma-script),
13275 The basic items are
13279 (receiver's address, same as
13283 in the old layout),
13296 will start a new letter (i.
13297 \begin_inset space \thinspace{}
13301 \begin_inset space \space{}
13304 you can write several letters per document).
13305 New elements are sender's
13321 and the possibility to use a
13327 Insert\SpecialChar \menuseparator
13333 \begin_layout Standard
13334 The biggest improvement is, though, that the letter's layout is configurable
13335 at almost any needs.
13336 This can be done via the preamble or with a special style file (Letter
13337 Class Option, extension
13341 ), that will be read in as a class option.
13345 \begin_layout Plain Layout
13346 The KOMA package comes with some default
13351 There is, for instance, a
13355 file that follows german typesetting rules, or a
13359 that provides the default layout of the old
13364 The latter can be loaded with the class option
13373 ayout\SpecialChar \menuseparator
13378 ocument\SpecialChar \menuseparator
13390 template that is included in LyX for examples.
13391 A detailed description is to be found in the Koma-Script documentation
13399 \begin_layout Subsection
13403 \begin_layout Standard
13404 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
13408 \begin_layout Itemize
13409 The chapter number of a
13413 type appears on a line of its own above the chapter heading instead of
13414 appearing in the same line ahead of it.
13415 The cause for that is the LyX internal behavior for the labeltype
13419 in the layout file.
13422 \begin_layout Itemize
13423 The headings of the types
13431 are only put in the
13432 \begin_inset Quotes eld
13436 \begin_inset Quotes erd
13439 LaTeX table of contents, but not in the LyX table of contents (
13441 Document\SpecialChar \menuseparator
13443 \begin_inset space ~
13447 \begin_inset space ~
13455 \begin_layout Itemize
13456 The paragraphs in a
13460 document class appear in a skip separation mode, not indented.
13461 This is the standard behavior, no special LaTeX commands are needed for
13465 Document\SpecialChar \menuseparator
13468 dialog the corresponding radio button indicates
13477 value always has the effect that extra LaTeX commands are inserted in the
13478 document to produce the gap, which is not what is wanted in this case.
13481 \begin_layout Section
13482 Latex8 (IEEE Conference Papers)
13485 \begin_layout Standard
13491 \begin_layout Subsection
13495 \begin_layout Standard
13496 Since this class is specifically for writing submissions to IEEE sponsored
13497 conferences I strongly recommend that you get a copy of their Authors Kit.
13502 package and associated bibliography style file is included in the kit.
13503 The Authors Kit is usually sent out by email once your initial submission
13505 There is a lot of useful information in the Authors Kit explaining formatting
13506 restrictions and so on and I will assume you have read this since that
13507 means I don't have to repeat it all here.
13510 \begin_layout Subsection
13514 \begin_layout Standard
13515 [AR\SpecialChar \@.
13519 \begin_layout Subsection
13520 Supported Environments
13523 \begin_layout Itemize
13529 \begin_layout Itemize
13535 \begin_layout Itemize
13541 \begin_layout Itemize
13547 \begin_layout Itemize
13553 \begin_layout Itemize
13559 \begin_layout Itemize
13565 \begin_layout Itemize
13571 \begin_layout Itemize
13577 \begin_layout Subsection
13578 Differences Between Screen and Paper
13581 \begin_layout Standard
13582 There are slight differences in appearance mainly with the presentation
13583 of section counters.
13584 On screen the trailing period of the section counter is missing but it
13585 will appear in the output so don't let this worry you.
13588 \begin_layout Section
13592 \begin_layout Standard
13595 Jürgen Spitzmüller
13598 \begin_layout Subsection
13602 \begin_layout Standard
13603 Memoir is a very powerful and constantly evolving class.
13604 It has been designed with regard to fictional and non-fictional literature.
13605 Its aim is to let the user have maximum control over the typesetting of
13607 Memoir is based on the standard book class, but it can also emulate the
13608 article class (see below).
13611 \begin_layout Standard
13612 Peter Wilson, the developer of Memoir, is known as the author of lots of
13613 useful packages in the LaTeX world.
13614 Most of them have been merged with Memoir.
13615 Therefore, it is much easier to layout the table of contents, appendices,
13616 chapter designs and such.
13617 LyX, though, does not support all of these goodies natively.
13618 Some of them might be added to forthcoming releases
13622 \begin_layout Plain Layout
13623 You are invited to send suggestions to
13624 \begin_inset Flex URL
13627 \begin_layout Plain Layout
13629 lyx-devel@lists.lyx.org
13639 , lots will probably never, due to the limitations of LyX's framework.
13640 Of course you can still use all features with the help of some native LaTeX
13645 \begin_layout Plain Layout
13650 \begin_layout Plain Layout
13660 \begin_inset space ~
13664 \begin_inset CommandInset ref
13666 reference "sec:Inserting-TeX-Code"
13676 In this section, we can only list those features which are natively supported
13678 For detailed descriptions (and for the rest of features) we are recommending
13679 to have a look at the detailed manual of the Memoir class
13683 \begin_layout Plain Layout
13688 \begin_layout Plain Layout
13698 \begin_inset Flex URL
13701 \begin_layout Plain Layout
13703 CTAN:/macros/latex/memoir/memman.pdf
13713 , which is not only a user guide for the class, but also both a comprehensive
13714 description on good typesetting and a superb example for good typesetting
13718 \begin_layout Subsection
13719 Basic features and restrictions
13722 \begin_layout Standard
13723 Memoir supports basically all features of the standard book classes.
13724 There are, however, some differences, as follows:
13727 \begin_layout Description
13729 \begin_inset space ~
13732 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
13735 \begin_layout Description
13737 \begin_inset space ~
13740 style: The fancy page style is not supported, due to a command clash between
13741 Memoir and the fancyhdr package (they are both defining a command with
13742 the same name, which confuses LaTeX).
13743 Instead, Memoir comes with a bunch of own page styles (see
13745 Layout\SpecialChar \menuseparator
13746 Document\SpecialChar \menuseparator
13748 \begin_inset space ~
13754 If you want to use these for the chapter pages, you have to use the command
13761 in the main text or in preamble (e.
13762 \begin_inset space \thinspace{}
13766 \begin_inset space \space{}
13773 chapterstyle{companion}
13778 \begin_layout Description
13779 Sectioning: Sectionings (chapter, section, subsection etc.) are coming with
13780 an optional argument in the standard classes.
13781 With this, you can specify an alternative version of the title for the
13782 table of contents and the headers (for instance, if the title is too long).
13783 In LyX, you can do this via
13785 Insert\SpecialChar \menuseparator
13787 \begin_inset space ~
13792 at the beginning of a chapter/section.
13793 Memoir features a second optional argument and thus separates the table
13794 of contents from the header.
13795 You can define three variants of a title with this: one for the main text,
13796 one for the table of contents, and one for the headers.
13797 Simply insert two optional arguments if you need this feature, the first
13798 one containing the short title for the Table of Contents, the second one
13799 containing an alternative short title for the headers.
13802 \begin_layout Description
13803 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
13804 of contents, the list of figures and the list of table start a new page
13806 Memoir does not follow this route.
13807 You have to insert a page break yourself, if you want to have one.
13810 \begin_layout Description
13811 Titlepage: For some unknown reason, Memoir uses pagination on the title
13812 page (in the standard classes, title pages are
13813 \begin_inset Quotes eld
13817 \begin_inset Quotes erd
13821 \begin_inset space \thinspace{}
13825 \begin_inset space \space{}
13829 If you want an empty title page, type
13833 aliaspagestyle{title}{empty}
13838 \begin_layout Description
13839 Article: With the class option
13845 Layout\SpecialChar \menuseparator
13846 Document\SpecialChar \menuseparator
13848 \begin_inset space ~
13853 ), you can emulate article style.
13854 That is, counters (footnotes, figures, tables etc.) will not be reset on
13855 new chapters, chapters don't start a new page (but are—in contrary to
13856 \begin_inset Quotes eld
13860 \begin_inset Quotes erd
13863 article classes—still allowed), parts, though, use their own page, as in
13867 \begin_layout Description
13868 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
13869 font commands, which have been used in the old LaTeX version 2.09 (e.
13870 \begin_inset space \thinspace{}
13874 \begin_inset space \space{}
13890 It produces an error and stops LaTeX whenever such a command appears.
13895 reallows the commands and spits out warnings instead (which does at least
13897 Since a lot of packages and particularly BibTeX style files are still using
13898 those commands, we have decided to use this option by default.
13901 \begin_layout Subsection
13905 \begin_layout Standard
13906 We will only describe the features supported by LyX (which is not much currently
13908 Please consult the Memoir manual
13912 \begin_layout Plain Layout
13917 \begin_layout Plain Layout
13927 \begin_inset Flex URL
13930 \begin_layout Plain Layout
13932 CTAN:/macros/latex/memoir/memman.pdf
13945 \begin_layout Description
13946 Abstract: You may wonder why an abstract is an extra feature.
13947 Well, it is in book class.
13948 Usually books don't have abstracts.
13949 Memoir, however, has.
13950 You can use it wherever and how often you like.
13953 \begin_layout Description
13954 Chapterprecis: You may know this from belletristic: The contents of a chapter
13955 is shortly described below the title and also in the table of contents
13957 \begin_inset space \thinspace{}
13961 \begin_inset space \space{}
13966 Our hero arrives in Troia; he loses some friends; he finds others
13969 Chapterprecis does exactly this.
13970 It is therefore only sensible below a chapter.
13973 \begin_layout Description
13974 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
13975 The epigraph environment provides an elegant way of typesetting such a
13977 The motto itself (text) and its author (source) are divided by a short
13979 Unfortunately, we have to fool LyX a bit here again, since the environment
13980 needs two arguments (text and source).
13981 In this case, we have to use curly brackets (in TeX mode) between the two
13992 <author of the slogan>.
13995 \begin_layout Description
13996 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
13997 complex figurative poems).
13998 LyX can only support a few of them.
13999 One is poemtitle, which is a centered title for poems, which will also
14000 be added to the table of contents (verse is the standard environment for
14002 Memoir has some enhanced versions of verse, but you need to use TeX code,
14003 because they have to be nested inside regular verse environments, which
14004 is not possible with LyX).
14007 \begin_layout Description
14008 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14011 \begin_layout Section
14012 Article (mwart), book (mwbk) and report (mwrep)
14013 \begin_inset OptArg
14016 \begin_layout Plain Layout
14029 \begin_layout Standard
14035 \begin_layout Standard
14036 The LyX document classes
14052 correspond to the LaTeX document classes
14065 They are replacements for the standard document classes
14077 , resp., and fit better to Polish typography conventions in a number of points.
14081 \begin_layout Standard
14085 \begin_layout Itemize
14086 Unnumbered titles (with star, e.
14087 \begin_inset space \thinspace{}
14091 \begin_inset space \space{}
14098 ) are added into table of contents,
14101 \begin_layout Itemize
14102 Additional page styles:
14106 \begin_layout Description
14107 uheadings header with separated lines,
14110 \begin_layout Description
14111 myheadings custom header, contents headers via commands:
14126 \begin_layout Description
14127 myuheadings custom header with separated lines,
14130 \begin_layout Description
14131 outer page number is placed on outer side of page
14135 \begin_layout Itemize
14140 \begin_layout Description
14141 rmheadings serif titles — default,
14144 \begin_layout Description
14145 sfheadings sansserif titles,
14148 \begin_layout Description
14149 authortitle on title page first placed is author next title — default,
14152 \begin_layout Description
14153 titleauthor on title page first placed is title next author,
14156 \begin_layout Description
14157 withmarginpar reserve place on page for margins.
14161 \begin_layout Section
14165 \begin_layout Standard
14170 provides an alternative to the standard
14175 It provides similar functionality, but you might prefer this layout with
14176 sans serif sections, headings, and more.
14179 \begin_layout Section
14183 \begin_layout Standard
14189 \begin_layout Standard
14190 \begin_inset VSpace bigskip
14196 \begin_layout Standard
14201 \begin_inset space ~
14206 textclass works with the American Physical Sociey's RevTeX 4.0 (the
14207 \begin_inset Formula $\beta$
14210 release of May, 1999) class.
14213 \begin_layout Standard
14218 textclass, which works with RevTeX 3.1.
14219 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
14220 That means that it doesn't interact very well with LyX, which requires
14221 LaTeX2e, although it has been kludged to work.
14222 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
14226 \begin_inset space ~
14231 textclass should also be pretty easy to use.
14234 \begin_layout Standard
14235 These documents are supposed to be used in
14239 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
14240 macros, and assume you'll know what to put in the preamble if necessary.
14243 \begin_layout Subsection
14247 \begin_layout Standard
14248 All you need to do is install RevTeX 4, as described in the package's README
14250 The package can be found at The RevTeX 4 Web Site
14251 \begin_inset Flex URL
14254 \begin_layout Plain Layout
14256 http://publish.aps.org/revtex4/
14262 Install it somewhere that LaTeX can see it.
14263 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
14265 \begin_inset space \thinspace{}
14269 \begin_inset space \space{}
14272 not the directory where you installed the class file.) Then, if you reconfigure
14273 LyX, it will find the class file and let you use the RevTeX4 textclass.
14276 \begin_layout Standard
14277 Probably the easiest way to get started is either to import a RevTeX 4 document
14285 \begin_inset space ~
14290 template, found in the templates directory.
14293 \begin_layout Subsection
14297 \begin_layout Standard
14298 Optional arguments to
14305 \begin_inset Quotes eld
14309 \begin_inset Quotes erd
14313 \begin_inset Quotes eld
14317 \begin_inset Quotes erd
14327 \begin_inset space ~
14335 \begin_inset space ~
14341 Remember that in RevTeX, at least one optional argument is required!
14344 \begin_layout Standard
14345 Other preamble matter, like
14352 \begin_inset space ~
14358 \begin_inset space ~
14363 dialog, also as usual.
14366 \begin_layout Subsection
14370 \begin_layout Standard
14371 The layouts basically correspond to the commands in RevTeX4.0.
14372 For example, the Email layout corresponds to
14379 Note that (at least as of RevTeX 4.0 Beta), the
14387 layouts are exactly equivalent, so you shouldn't need to use both.
14391 \begin_layout Plain Layout
14392 In case you're curious, both were included so that
14396 would be able to translate both
14416 \begin_layout Subsection
14420 \begin_layout Standard
14421 There are a couple of important unique aspects of RevTeX 4 which might cause
14422 bugs that will be even more confusing in LyX.
14425 \begin_layout Standard
14443 The LyX equivalent is that there is a separate Thanks layout.
14448 write footnotes in the
14452 layout, or weird things may happen.
14453 See the RevTeX 4 documentation for more details.
14456 \begin_layout Standard
14460 \begin_inset space ~
14468 \begin_inset space ~
14477 layouts must be placed
14485 layout and the corresponding
14502 , the LaTeX won't compile.
14505 \begin_layout Subsection
14509 \begin_layout Standard
14510 The main problem with this layout is that you can't use the optional arguments
14511 to layouts like Email and Title.
14512 (The problem is not unique to this layout; you can't use optional arguments
14513 to the Section layouts either.) This means that after you export that file
14514 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
14515 need to edit the LaTeX file with a text editor to add the optional arguments
14517 \begin_inset space \thinspace{}
14521 \begin_inset space \space{}
14524 the running title for the page headers.
14525 Lacking these layouts makes the
14531 (and the equivalent
14537 ) useless, so the corresponding layouts don't exist, and will have to be
14542 \begin_layout Plain Layout
14547 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
14548 has not been updated yet to take advantage of it.
14556 \begin_layout Section
14557 Springer Journals (
14564 \begin_layout Standard
14570 \begin_layout Subsection
14574 \begin_layout Standard
14575 These are the layout files for some of the journal formats used by Springer
14576 Verlag and listed on
14577 \begin_inset Flex URL
14580 \begin_layout Plain Layout
14582 http://www.springer.de/author/tex/help-journals.html
14587 , where you should also go to fetch the class files (yes, these are LaTeX2e
14589 It is a modular system: the things common to all journals are implemented
14594 , which journal-specific layout files (such as, e.
14595 \begin_inset space \thinspace{}
14599 \begin_inset space \space{}
14606 for Journal of Geodesy) can include.
14609 \begin_layout Standard
14610 This means that implementing support for any other Springer journal on this
14611 list is as simple as writing your own
14619 file following the outline given in
14627 \begin_layout Standard
14628 It is reasonably well tested only for the Journal of Geodesy.
14637 come with the standard LyX distribution.
14638 Install the relevant class file (downloaded from Springer) in a proper
14639 directory, reconfigure LaTeX (in the teTeX case by running
14643 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
14644 and it should work.
14647 \begin_layout Subsection
14651 \begin_layout Standard
14652 A large number of theorem-like styles —
14658 \SpecialChar \ldots{}
14664 \begin_layout Standard
14667 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
14668 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
14671 See the Springer class file documentation for details.
14674 \begin_layout Subsection
14678 \begin_layout Itemize
14690 \begin_layout Itemize
14693 Probability Theory and Related Fields
14699 — Jean-Marc Lasgouttes
14702 \begin_layout Standard
14703 Add your own, it isn't so hard!
14706 \begin_layout Subsection
14710 \begin_layout Standard
14711 These files are partly based on the older
14715 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
14716 file from Springer.
14721 layout, are now defunct.
14722 Jean-Marc Lasgouttes helped out big in making me find my way around the
14723 LyX layout file mechanism.
14726 \begin_layout Subsection
14730 \begin_layout Standard
14732 But probably less than in the old hacked-LaTeX
14739 \begin_layout Standard
14741 \begin_inset space \thinspace{}
14744 g.: does not display the number for theorem-like layouts, just #.
14747 \begin_layout Section
14753 \begin_inset CommandInset label
14762 \begin_layout Standard
14770 \begin_layout Subsection
14774 \begin_layout Standard
14775 This section describes how to use LyX to make slides for overhead projectors.
14776 There are two document classes that can do this: the default slides class
14782 This section documents the former.
14785 \begin_layout Standard
14786 I'm going to say this again, nice and clear, so that there's no misunderstanding
14790 \begin_layout Standard
14791 \begin_inset VSpace bigskip
14797 \begin_layout Standard
14801 This section documents the class
14802 \begin_inset Quotes eld
14810 \begin_inset Quotes erd
14818 \begin_layout Standard
14819 \begin_inset VSpace bigskip
14825 \begin_layout Standard
14826 If you're looking for the documentation for
14827 \begin_inset Quotes eld
14835 \begin_inset Quotes erd
14838 , check out section
14839 \begin_inset space ~
14843 \begin_inset CommandInset ref
14845 reference "sec:foiltex"
14855 \begin_inset Quotes eld
14863 \begin_inset Quotes erd
14866 ] is actually somewhat better than the default
14874 \begin_layout Plain Layout
14875 \SpecialChar \ldots{}
14876 or so I've been told repeatedly by its advocates.
14877 Having never used it, I have no idea if this claim is true or not.
14882 which this section documents.
14885 \begin_layout Standard
14886 This class is the LaTeX2e improvement of the old
14891 Every LaTeX2e distribution includes this class [which I'll just refer to
14893 \begin_inset Quotes eld
14901 \begin_inset Quotes erd
14904 from now on], so you're bound to have it.
14905 As I noted earlier, there are other classes, such as
14909 , which also produce slides for overhead projectors and do a better job
14911 However, there are some things which
14915 can do which the others can't, such as generate overlays.
14916 Read on to learn more!
14919 \begin_layout Subsection
14921 \begin_inset CommandInset label
14923 name "sec:slidesetup"
14930 \begin_layout Standard
14931 Obviously, to use this document class, you need to select
14932 \begin_inset Quotes eld
14940 \begin_inset Quotes erd
14943 from the class list in the
14945 Document\SpecialChar \menuseparator
14949 There are some other special things you should know about this class:
14952 \begin_layout Itemize
14953 Don't bother changing the options
14958 They're not supported by the
14965 \begin_layout Itemize
14969 \begin_inset space ~
14974 behaves a bit differently for this class.
14975 The possible choices and what they do are as follows:
14979 \begin_layout Description
14984 The final output contains page numbers in the lower right corner.
14987 \begin_layout Description
14996 , but also prints out any time markers you've put in.
14997 This is the default.
15000 \begin_layout Description
15005 The final output contains no page numbers, time markers, or alignment markers.
15009 \begin_layout Itemize
15014 class has an extra option:
15020 \begin_inset Quotes eld
15028 \begin_inset Quotes erd
15031 in the extra class options.
15035 \begin_layout Standard
15036 Using this options allows you to add time markers to
15042 \begin_inset space ~
15046 \begin_inset CommandInset ref
15048 reference "sec:slideNote"
15056 \begin_layout Standard
15057 You can also use the template file
15058 \begin_inset Quotes eld
15066 \begin_inset Quotes erd
15069 to automatically set up a document to use the
15075 File\SpecialChar \menuseparator
15077 \begin_inset space ~
15081 \begin_inset space ~
15086 to open your new document].
15087 The template file also contains some examples of the special paragraph
15088 environments used by this class.
15089 I'll describe those next.
15092 \begin_layout Subsection
15093 Paragraph Environments
15096 \begin_layout Subsubsection
15097 Supported Environments
15100 \begin_layout Standard
15101 The first thing you'll notice when you start up a new
15105 document is the font size and type: it's the equivalent of the size
15106 \begin_inset Quotes eld
15114 \begin_inset Quotes erd
15120 \begin_inset space ~
15126 This is also what's used in the output.
15128 \begin_inset Quotes eld
15132 \begin_inset Quotes erd
15135 to remind you that this is a slide.
15136 Your final slides will use a larger font; ergo, you'll have less space.
15137 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
15140 \begin_layout Standard
15141 The next thing that becomes obvious is the changes to the paragraph environment
15142 pull-down box [at the far-left end of the toolbar].
15143 Most of the paragraph environments you're used to seeing are missing.
15144 There are also five new ones.
15149 class itself only supports certain paragraph environments:
15152 \begin_layout Itemize
15158 \begin_layout Itemize
15164 \begin_layout Itemize
15170 \begin_layout Itemize
15176 \begin_layout Itemize
15182 \begin_layout Itemize
15188 \begin_layout Itemize
15194 \begin_layout Itemize
15200 \begin_layout Itemize
15206 \begin_layout Itemize
15212 \begin_layout Itemize
15218 \begin_layout Standard
15219 All of the other standard environments, including the section-heading environmen
15220 ts, aren't used in the
15227 \begin_layout Standard
15228 On the other hand, you'll notice the following new environments:
15231 \begin_layout Itemize
15237 \begin_layout Itemize
15243 \begin_layout Itemize
15249 \begin_layout Itemize
15255 \begin_layout Itemize
15261 \begin_layout Standard
15262 These five are kind of quirky, due to a
15263 \begin_inset Quotes eld
15267 \begin_inset Quotes erd
15271 You see, LyX doesn't permit you to nest any other paragraph environment
15272 into an empty environment.
15273 Now, that's fine and dandy, but it means that you wouldn't be able to start
15274 a slide with anything except plain text.
15275 To deal with this, I've performed a little
15276 \begin_inset Quotes eld
15280 \begin_inset Quotes erd
15286 \begin_layout Subsubsection
15287 Quirks of the New Environments
15288 \begin_inset CommandInset label
15290 name "sec:slideQuirk"
15297 \begin_layout Standard
15298 All five of the new paragraph environments are somewhat quirky due to inherent
15299 limitiations in the current version of LyX.
15300 As I just mentioned, LyX forbids environments that begin with another environme
15302 To get around this, the
15306 environment isn't a paragraph environment as described in the
15314 \begin_layout Standard
15315 You should consider
15328 \begin_inset Quotes eld
15331 pseudo-environments.
15332 \begin_inset Quotes erd
15335 They look like a section heading or a
15336 \begin_inset Quotes eld
15344 \begin_inset Quotes erd
15347 but really begin a [and, if necessary, end the previous] paragraph environment.
15357 \begin_inset Quotes eld
15361 \begin_inset Quotes erd
15364 These two perform some action.
15367 \begin_layout Standard
15368 A common feature of all five environments,
15388 , is a rather long-ish label.
15389 The text following this label — ordinarily the contents of the paragraph
15390 environment — is utterly irrelevant for
15411 LyX completely ignores it.
15412 In fact, you can leave these five environments completely empty.
15416 \begin_layout Standard
15421 to put any text after the rather long-ish label, you might want to.
15422 This could be a short description of the contents of the
15427 In that case, enter in your descriptive comment and hit
15431 as you normally would.
15434 \begin_layout Standard
15435 If, on the other hand, you don't want to enter in any descriptive text,
15436 you'll hit another LyX quirk.
15437 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
15438 environment until you put something in the old one.
15442 \begin_layout Itemize
15443 Start entering the text that will
15471 \begin_layout Itemize
15472 Now move to the beginning of that paragraph.
15476 \begin_layout Itemize
15485 \begin_layout Itemize
15486 Finally, change this new, empty paragraph to a
15510 \begin_layout Standard
15511 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
15515 \begin_layout Subsection
15516 Making a Presentation with
15529 \begin_layout Subsubsection
15537 \begin_layout Standard
15538 If you're expecting this section to teach you how to actually make a presentatio
15539 n, you'll be sorely disappointed.
15540 Naturally, I'll describe all of the ways the
15544 class can assist you in preparing the materials for a presentation.
15545 Filling in the contents, however, is up to you.
15550 the LyX philosophy.]
15553 \begin_layout Standard
15558 environment [in the manner described in section
15559 \begin_inset space ~
15563 \begin_inset CommandInset ref
15565 reference "sec:slideQuirk"
15569 ] tells LyX to begin a new slide [duh].
15570 The label for this environment/
15571 \begin_inset Quotes erd
15575 \begin_inset Quotes erd
15579 \begin_inset Quotes eld
15583 \begin_inset Quotes erd
15586 in cool blue, followed by the label,
15587 \begin_inset Quotes eld
15591 \begin_inset Quotes erd
15595 Any text or paragraph environments that follow this one go on the new slide.
15599 \begin_layout Standard
15600 Slides are probably the only time you'll need to forcibly end pages in LyX
15601 (this can be specified in the
15606 In fact, you'll want to, once you finish entering the contents of one slide.
15607 If you've entered more text than can physically fit on a slide, the extra
15608 overflows onto a new slide.
15609 I don't recommend doing this, however, since the overflow slide won't have
15610 any page number on it.
15611 Furthermore, it may interfere with any
15615 you've made to accompany the oversized
15622 \begin_layout Standard
15631 environments work the same way as the
15636 They both create an
15637 \begin_inset Quotes eld
15641 \begin_inset Quotes erd
15644 followed by a label [
15645 \begin_inset Quotes eld
15649 \begin_inset Quotes erd
15653 \begin_inset Quotes eld
15657 \begin_inset Quotes erd
15661 The color is a stunning magenta instead of blue, and the
15662 \begin_inset Quotes eld
15666 \begin_inset Quotes erd
15669 will look different, in style and in length.
15670 The label fonts of all three also differ from one another.
15673 \begin_layout Standard
15678 , if the contents of a
15686 exceed the physical size of a slide or sheet of paper, the extra will overflow
15688 Again, you should avoid this.
15689 It defeats the whole purpose of
15700 \begin_layout Subsubsection
15710 \begin_layout Standard
15715 is a slide that sits atop another slide.
15716 Perhaps you wish to discuss a figure on the main
15720 before displaying the text associated with it.
15721 One way to accomplish this is tape a flap of dark paper over the part of
15726 you want to display later.
15727 This method fails, however, if you wish to overlap one graph with another,
15729 You would then have to fumble while speaking to align the two separate,
15734 s to align the two graphs.
15739 environment in both cases makes life much easier.
15742 \begin_layout Standard
15747 receives the page number of its
15748 \begin_inset Quotes eld
15752 \begin_inset Quotes erd
15760 \begin_inset Quotes eld
15768 \begin_inset Quotes erd
15775 \begin_layout Plain Layout
15776 Presumably, mutliple
15781 \begin_inset Quotes eld
15789 \begin_inset Quotes erd
15793 \begin_inset Quotes eld
15801 \begin_inset Quotes erd
15805 \begin_inset Quotes eld
15813 \begin_inset Quotes erd
15817 \begin_inset space ~
15820 appended to the page number of the parent
15830 Clearly, you want the contents of both the
15838 to each fit on a single physical slide! You should probably consider an
15844 \begin_inset Quotes eld
15848 \begin_inset Quotes erd
15860 class provides a visual cue for this: the label at the start of an
15864 is shorter than that at the start of a
15869 Lastly, when you generate printable output, you'll find alignment markers
15870 in all four corners of both the
15874 page and its parent
15879 These will assist you in lining up the two physical slides.
15882 \begin_layout Standard
15883 The major problem in overlaying two slides is aligning the contents of the
15884 two transparencies.
15885 How much space should you leave for that graph on the second slide? Worse
15886 still, what if you want a graph and a sentence on second slide, but there
15887 is text on the main transparency that goes in between them? You could try
15888 and insert vertical space of the right size.
15889 The better way is to use
15900 \begin_layout Standard
15901 As their names imply,
15909 are two command-like paragraph environments that make all subsequent text
15910 invisible and visible, respectively.
15912 \begin_inset space ~
15916 \begin_inset CommandInset ref
15918 reference "sec:slideQuirk"
15922 that you don't place anything
15926 these two environments, however.
15931 , it inserts a centered, sky-blue label into the page reading
15932 \begin_inset Quotes eld
15935 <Invisible Text Follows>
15936 \begin_inset Quotes erd
15940 For paragraphs following this label, the parts of the
15948 ; it doesn't matter which] where they would be contain instead blank space.
15952 \begin_layout Standard
15957 , the corresponding centered label is
15958 \begin_inset Quotes eld
15961 <Visible Text Follows>
15962 \begin_inset Quotes erd
15966 Paragraphs following this label behave normally.
15967 Note that the beginning of a new
15979 automatically shuts off an
15984 It's therefore not necessary to use
15995 \begin_layout Standard
15996 By now, it should be obvious how to create overlay transparencies using
15997 the proper combination of
16016 \begin_layout Enumerate
16021 , including everything that will appear on it, whether on the main slide
16029 \begin_layout Enumerate
16030 Before each figure or paragraph that will appear only on the
16039 If necessary, insert a
16043 environment after the
16050 \begin_layout Enumerate
16055 immediately following the
16062 \begin_layout Enumerate
16063 Copy the contents of this
16074 \begin_layout Enumerate
16079 , change all of the
16090 \begin_layout Standard
16092 You've just made an
16099 \begin_layout Standard
16100 There's one problem with the way I've designed the LyX
16104 class: you can't make text in the middle of a paragraph invisible, nor
16105 make text in the middle of an invisible paragraph visible again.
16106 To accomplish this feat, you'll need to use some inlined LaTeX codes.
16110 \begin_layout Plain Layout
16111 The commands of interest are:
16114 \begin_layout Itemize
16119 invisible \SpecialChar \ldots{}
16123 \begin_layout Itemize
16128 visible \SpecialChar \ldots{}
16132 \begin_layout Plain Layout
16133 \SpecialChar \ldots{}
16134 and need to be marked as TeX.
16136 \begin_inset Quotes eld
16140 \begin_inset Quotes erd
16143 you wish to change goes in between the brackets [and after the
16156 If you don't know how to mark text as TeX, see the appropriate section
16169 \begin_layout Subsubsection
16179 \begin_inset CommandInset label
16181 name "sec:slideNote"
16188 \begin_layout Standard
16197 is associated with a
16198 \begin_inset Quotes eld
16202 \begin_inset Quotes erd
16214 class provides visual cues.
16219 is shorter than that of a
16223 [yet longer than that of an
16227 ] and, like the label of an
16231 is shockingly magenta.
16232 Additionally, the printed
16236 has the page number of its
16237 \begin_inset Quotes eld
16241 \begin_inset Quotes erd
16249 \begin_inset Quotes eld
16257 \begin_inset Quotes erd
16261 \begin_inset Quotes eld
16269 \begin_inset Quotes erd
16273 \begin_inset Quotes eld
16281 \begin_inset Quotes erd
16285 You can have multiple
16289 s associated with a single
16301 , you'll probably want to break up long
16305 s so that they fit on a single sheet of paper.
16308 \begin_layout Standard
16313 is obvious: it contains anything additional you might want to say about
16319 It could also be used as a sheet of reminders for a particular
16324 In the case of the latter, you might want to make use of time markers.
16330 \begin_inset Quotes eld
16334 \begin_inset Quotes erd
16337 support for time markers, a
16342 So, you'll have to resort to using the LaTeX codes.
16345 \begin_layout Standard
16346 To use time markers, you'll need to specify the extra class option
16347 \begin_inset Quotes eld
16355 \begin_inset Quotes erd
16359 \begin_inset space ~
16363 \begin_inset CommandInset ref
16365 reference "sec:slidesetup"
16370 This option turns on timing marks, which will appear in the lower-left-hand
16376 To set what appears in the time marker, you use the LaTeX commands
16377 \begin_inset Quotes eld
16387 \begin_inset Quotes erd
16391 \begin_inset Quotes eld
16401 \begin_inset Quotes erd
16405 The arguments of both commands are time measured in seconds.
16407 \begin_inset Quotes eld
16417 \begin_inset Quotes erd
16420 sets the time marker to a given time.
16422 \begin_inset Quotes eld
16432 \begin_inset Quotes erd
16435 increments the time marker by the specified amount.
16436 Using time markers and
16440 s in this fashion, you can remind yourself how much time to spend on a particula
16448 \begin_layout Standard
16449 There's one last feature to describe.
16450 Clearly, you'd like to print out all of your
16458 s on transparencies while printing all of your
16475 with which it is associated.
16476 What's a person to do?
16479 \begin_layout Standard
16480 Luckily, there are two LaTeX commands that allow you to select what to print
16482 Both must be placed into the preamble of your document.
16484 \begin_inset Quotes eld
16496 \begin_inset Quotes erd
16499 will cause the output to contain only the
16508 Correspondingly, the command
16509 \begin_inset Quotes eld
16521 \begin_inset Quotes erd
16524 prevents the output of anything but
16529 I'd advise placing both commands in the preamble and initially comment
16531 You can then preview your entire presentation as you write.
16532 When you're done writing, you can then uncomment one of the two to select
16533 what you want to print.
16534 I like to uncomment
16535 \begin_inset Quotes eld
16547 \begin_inset Quotes erd
16550 , print to a file with
16551 \begin_inset Quotes eld
16559 \begin_inset Quotes erd
16562 in its name, comment it back out, then uncomment
16563 \begin_inset Quotes eld
16575 \begin_inset Quotes erd
16579 \begin_inset Quotes eld
16587 \begin_inset Quotes erd
16591 I can then send either file to a printer, loading transparencies or plain
16592 paper as appropriate.
16595 \begin_layout Standard
16596 You can also provide other arguments to the
16597 \begin_inset Quotes eld
16607 \begin_inset Quotes erd
16611 \begin_inset Quotes eld
16621 \begin_inset Quotes erd
16625 See a good LaTeX book for details.
16628 \begin_layout Subsection
16633 Class Template File
16636 \begin_layout Standard
16637 I have also provided a template file,
16638 \begin_inset Quotes eld
16646 \begin_inset Quotes erd
16654 To use it, begin your new presentation with
16659 ile\SpecialChar \menuseparator
16661 \begin_inset space ~
16665 \begin_inset space ~
16675 Your new LyX presentation file will contain an example
16696 additionally contain an example of the use of
16705 Lastly, the preamble will contain:
16708 \begin_layout LyX-Code
16709 % Uncomment to print out only slides and overlays
16712 \begin_layout LyX-Code
16716 \begin_layout LyX-Code
16722 \begin_inset Newline newline
16728 \begin_layout LyX-Code
16729 % Uncomment to print out only notes
16732 \begin_layout LyX-Code
16736 \begin_layout LyX-Code
16744 \begin_layout Standard
16745 One final thing: I created this class to support the LaTeX2e
16746 \begin_inset Quotes eld
16754 \begin_inset Quotes erd
16757 class, one of the built-in LaTeX2e classes.
16758 Neither I nor the rest of the LyX Team endorse or oppose the use of this
16759 built-in slide class.
16760 It's here if you want it or need it.
16761 There exist other LaTeX2e classes for creating presentations, such as the
16767 \begin_inset space ~
16771 \begin_inset CommandInset ref
16773 reference "sec:foiltex"
16778 \begin_inset Quotes eld
16786 \begin_inset Quotes erd
16789 package [present on some TeX distributions].
16790 The latter is not yet supported under LyX.
16794 \begin_layout Plain Layout
16795 Perhaps you can take on the task\SpecialChar \ldots{}
16801 I know nothing about these other classes.
16802 Try them out to see what sort of alternative they provide.
16805 \begin_layout Chapter
16806 LyX Features needing Extra Software
16809 \begin_layout Section
16813 \begin_layout Standard
16819 \begin_layout Subsection
16823 \begin_layout Standard
16832 \begin_layout Plain Layout
16837 is not yet available when you are using the LaTeX distribution MiKTeX.
16842 , you'll find in the
16849 \begin_inset space ~
16860 \begin_inset CommandInset href
16862 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
16869 \begin_layout Standard
16874 package is a program that was written by
16875 \begin_inset Flex CharStyle:Noun
16878 \begin_layout Plain Layout
16880 \begin_inset space ~
16888 in frustration because some constructs in LaTeX are sometimes non-intuitive,
16889 and easy to forget.
16890 The program runs over your LaTeX file, checks the integrity of the file,
16891 and flags some common errors.
16892 In other technical words, it is
16899 \begin_layout Standard
16900 Well, what is a syntax checker doing in LyX which is supposed to produce
16901 correct LaTeX anyways? The answer is simple: Just as
16905 not only checks the
16909 of C programs, but also does
16913 checks for type-errors,
16917 catches some common
16921 errors, in addition to the syntactical ones.
16926 is capable of detecting several common errors, such as
16929 \begin_layout Itemize
16930 Ellipsis detection:
16931 \begin_inset Newline newline
16934 Use \SpecialChar \ldots{}
16938 \begin_layout Itemize
16939 No space in front of/after parenthesis:
16940 \begin_inset Newline newline
16946 \begin_layout Itemize
16947 Enforcement of normal space after common abbreviations:
16948 \begin_inset Newline newline
16952 \begin_inset space \thinspace{}
16956 \begin_inset space \space{}
16959 is too wide spacing.
16962 \begin_layout Itemize
16963 Enforcement of end-of-sentence space when the last sentence ends with a
16965 \begin_inset Newline newline
16969 And this is wrong spacing.
16972 \begin_layout Itemize
16973 Space in front of labels and similar commands:
16974 \begin_inset Newline newline
16977 The label should stick right up to the text to avoid falling to a wrong
16980 \begin_inset CommandInset label
16990 \begin_layout Plain Layout
16991 This footnote is in danger of falling off to a wrong page
16996 The label is separated too much.
16999 \begin_layout Itemize
17000 Space in front of references, instead of hard spaces:
17001 \begin_inset Newline newline
17004 In you are in bad luck, the text will break right between the referenced
17005 text and reference number, and that's a pity.
17007 \begin_inset CommandInset ref
17009 reference "sec:chktex"
17016 \begin_layout Itemize
17018 \begin_inset Quotes eld
17022 \begin_inset Quotes erd
17026 \begin_inset Formula $\times$
17030 \begin_inset Newline newline
17033 2x2 looks cheap compared to
17034 \begin_inset Formula $2\times2$
17040 \begin_layout Standard
17041 and more \SpecialChar \ldots{}
17042 It is an invaluable tool when you are
17043 \begin_inset Quotes eld
17047 \begin_inset Quotes erd
17050 your document before printing, and you should run it right after the obligatory
17051 spelling check, and before you go fine tuning the typesetting.
17054 \begin_layout Subsection
17058 \begin_layout Standard
17059 If you have the program installed, usage is as simple as choosing
17061 Tools\SpecialChar \menuseparator
17063 \begin_inset space ~
17069 This will make LyX generate a LaTeX file of your document, start
17073 to check it, and then make LyX insert
17074 \begin_inset Quotes eld
17078 \begin_inset Quotes erd
17081 with the warnings from
17085 , if there were any.
17086 The warnings will be placed close to the point of the mistake, and you
17087 can quickly find them by using the
17089 Navigate\SpecialChar \menuseparator
17092 menu item, or the shortcut key
17101 Open the error boxes by clicking on them with the mouse, or use the shortcut
17110 bindings, or the corresponding
17119 Read the warning and correct the mistake, if it is a mistake.
17120 If you have trouble understanding what the warning is about, you can safely
17122 Remember that there is a hidden layer between the document on screen and
17123 the technical details in invoking
17127 , and this gap can make some warnings seem arcane or just right down plain
17131 \begin_layout Standard
17132 This document is an excellent testing bed for the feature, and it should
17133 provide quite a few warnings for you to fiddle with.
17134 Since computers are only so smart, expect most of the warnings to be false
17138 \begin_layout Subsection
17139 How to fine tune it
17142 \begin_layout Standard
17143 Sometimes, you'll find that
17147 makes more noise than suits your mood.
17148 Then you can choose not to use it, wait until your mood changes, or try
17153 to get better along with you.
17154 Another choice in the most desperate situations is to use
17156 View\SpecialChar \menuseparator
17158 \begin_inset space ~
17162 \begin_inset space ~
17166 \begin_inset space ~
17171 , which will get rid of all warnings instantly.
17174 \begin_layout Standard
17183 very configurable and extensible, you shouldn't expect to solve all problems
17189 Since LyX has to generate a somewhat special LaTeX file to be able to match
17190 the line numbers from the
17198 \begin_layout Plain Layout
17199 You can inspect the specific output from
17205 Edit\SpecialChar \menuseparator
17207 \begin_inset space ~
17211 \begin_inset space ~
17225 to the internal document structure, some of the warnings will not seen
17226 to appear correctly.
17227 There are two things you can do about this:
17230 \begin_layout Itemize
17235 invocation command line in
17251 installation configuration file (usually with the file
17256 See below to learn what warnings can be enabled and disabled on the command
17261 \begin_layout Itemize
17262 Export your document as a raw LaTeX file using
17264 File\SpecialChar \menuseparator
17265 Export\SpecialChar \menuseparator
17273 Invoked in this way, it can be a hassle to find the corresponding place
17274 in the document inside LyX, but with a little patience, you should be able
17278 \begin_layout Standard
17279 Here follows the warning messages that can be enabled and disabled in
17288 to disable a warning, and
17292 to enable a warning.
17293 The emphasized entries are disabled by default, because the default is
17296 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
17301 \begin_layout Standard
17302 Notice that you should only use the options that enable and disable warnings,
17303 because LyX relies on some of the other command line parameters to be set
17304 in a specific way to have a chance to communicate with
17311 \begin_layout Enumerate
17315 Command terminated with space.
17318 \begin_layout Enumerate
17321 Non-breaking space (
17322 \begin_inset Quotes eld
17330 \begin_inset Quotes erd
17333 ) should have been used.
17336 \begin_layout Enumerate
17340 You should enclose the previous parenthesis with
17341 \begin_inset Quotes eld
17349 \begin_inset Quotes erd
17355 \begin_layout Enumerate
17358 Italic correction (
17359 \begin_inset Quotes eld
17369 \begin_inset Quotes erd
17372 ) found in non-italic buffer.
17375 \begin_layout Enumerate
17378 Italic correction (
17379 \begin_inset Quotes eld
17389 \begin_inset Quotes erd
17392 ) found more than once.
17395 \begin_layout Enumerate
17399 No italic correction (
17400 \begin_inset Quotes eld
17410 \begin_inset Quotes erd
17416 \begin_layout Enumerate
17420 \begin_inset Quotes eld
17428 \begin_inset Quotes erd
17432 \begin_inset Quotes eld
17440 \begin_inset Quotes erd
17446 \begin_layout Enumerate
17449 Wrong length of dash may have been used.
17452 \begin_layout Enumerate
17456 \begin_inset Quotes eld
17464 \begin_inset Quotes erd
17468 \begin_inset Quotes eld
17476 \begin_inset Quotes erd
17482 \begin_layout Enumerate
17486 \begin_inset Quotes eld
17494 \begin_inset Quotes erd
17500 \begin_layout Enumerate
17504 \begin_inset Quotes eld
17512 \begin_inset Quotes erd
17515 to achieve an ellipsis.
17518 \begin_layout Enumerate
17521 Inter-word spacing (
17522 \begin_inset Quotes eld
17532 \begin_inset Quotes eld
17535 ) should perhaps be used.
17538 \begin_layout Enumerate
17541 Inter-sentence spacing (
17542 \begin_inset Quotes eld
17552 \begin_inset Quotes erd
17555 ) should perhaps be used.
17558 \begin_layout Enumerate
17561 Could not find argument for command.
17564 \begin_layout Enumerate
17568 \begin_inset Quotes eld
17576 \begin_inset Quotes erd
17582 \begin_layout Enumerate
17585 Math mode still on at end of LaTeX file.
17588 \begin_layout Enumerate
17592 \begin_inset Quotes eld
17600 \begin_inset Quotes erd
17603 doesn't match the number of
17604 \begin_inset Quotes eld
17612 \begin_inset Quotes erd
17618 \begin_layout Enumerate
17621 You should use either
17624 \begin_inset Quotes eld
17632 \begin_inset Quotes erd
17637 as an alternative to
17638 \begin_inset Quotes eld
17646 \begin_inset Quotes erd
17652 \begin_layout Enumerate
17659 " (ASCII 39) instead of "
17666 \begin_layout Enumerate
17669 User-specified pattern found.
17672 \begin_layout Enumerate
17675 This command might not be intended.
17678 \begin_layout Enumerate
17685 \begin_layout Enumerate
17703 \begin_layout Enumerate
17706 Delete this space to maintain correct page references.
17709 \begin_layout Enumerate
17713 You might wish to put this between a pair of
17714 \begin_inset Quotes eld
17722 \begin_inset Quotes erd
17728 \begin_layout Enumerate
17731 You ought to remove spaces in front of punctuation.
17734 \begin_layout Enumerate
17737 Could not execute LaTeX command.
17740 \begin_layout Enumerate
17749 in front of small punctuation.
17752 \begin_layout Enumerate
17760 may look prettier here.
17763 \begin_layout Enumerate
17767 Multiple spaces detected in output.
17770 \begin_layout Enumerate
17773 This text may be ignored.
17776 \begin_layout Enumerate
17782 \begin_inset Quotes eld
17787 to begin quotation, not
17794 \begin_layout Enumerate
17801 to end quotation, not
17804 \begin_inset Quotes eld
17812 \begin_layout Enumerate
17818 \begin_layout Enumerate
17821 You should perhaps use
17822 \begin_inset Quotes eld
17830 \begin_inset Quotes erd
17836 \begin_layout Enumerate
17839 You should put a space in front of/after parenthesis.
17842 \begin_layout Enumerate
17845 You should avoid spaces in front of/after parenthesis.
17848 \begin_layout Enumerate
17852 You should not use punctuation in front of/after quotes.
17855 \begin_layout Enumerate
17858 Double space found.
17861 \begin_layout Enumerate
17864 You should put punctuation outside inner/inside display math mode.
17867 \begin_layout Enumerate
17870 You ought to not use primitive TeX in LaTeX code.
17873 \begin_layout Enumerate
17876 You should remove spaces in front of
17877 \begin_inset Quotes eld
17885 \begin_inset Quotes erd
17891 \begin_layout Enumerate
17894 \begin_inset Quotes eld
17902 \begin_inset Quotes erd
17905 is normally not followed by
17906 \begin_inset Quotes eld
17914 \begin_inset Quotes erd
17920 \begin_layout Standard
17921 In later versions of LyX, we hope to provide a more complete interface to
17922 this tool (and it's smaller cousin
17926 ) to exploit the full power of it.
17927 But it's not exactly useless as it is now: go try it on one of your existing
17928 documents of a certain length and be surprised.
17931 \begin_layout Section
17932 Version Control in LyX
17935 \begin_layout Standard
17938 Lars Gullik Bjønnes,
17945 \begin_layout Subsection
17949 \begin_layout Standard
17950 A friend of mine wanted to try LyX for a group project.
17951 When he didn't find support for version control or file locking, he dropped
17953 This angered me a bit, so I thought that I should at least make support
17954 for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
17955 This has now been done.
17956 LyX now supports some of the most basic RCS commands.
17957 If you need to something a bit more sophisticated you will have to do that
17958 manually in an xterm.
17961 \begin_layout Standard
17962 Before you begin to use the version control features in LyX, you should
17964 \begin_inset Quotes eld
17968 \begin_inset Quotes erd
17971 (a man file, read it with
17976 This file describes all the basic features of RCS.
17977 You should especially notice the comment about a RCS directory, and the
17978 notion of a master RCS file (the file ending in
17985 \begin_layout Standard
17986 Later basic CVS/SVN support was added.
17987 You should be familiar with CVS/SVN usage before start using it under LyX.
17988 Most of the log messages are not currently displayed after operations -
17989 you can check them in terminal window if unsure.
17992 \begin_layout Standard
17993 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
17994 package—no guarantees are made for older versions.
17997 \begin_layout Standard
17998 For introducing your own external commands consult vc-command in the manual
18002 \begin_layout Subsection
18003 RCS commands in LyX
18006 \begin_layout Standard
18007 The following sections describe the RCS commands supported by LyX.
18008 You can find them in the
18010 File\SpecialChar \menuseparator
18012 \begin_inset space ~
18018 LyX was tested against RCS 5.7.
18021 \begin_layout Subsubsection
18027 \begin_layout Standard
18028 If your document is not under revision control, this is the only item shown
18030 And if it is under revision control, the
18034 item is not visible.
18038 \begin_layout Standard
18039 This command registers your document with RCS (unless you are under the
18040 directory managed by CVS)\SpecialChar \@.
18041 You are asked interactively to supply an initial
18042 description of the document.
18043 The document is now set in Read-Only mode and you have to
18046 \begin_inset space ~
18050 \begin_inset space ~
18054 \begin_inset space ~
18059 , before making any changes to it.
18060 A document under revision control has a
18061 \begin_inset Quotes eld
18064 [RCS:<version> <locker>]
18065 \begin_inset Quotes erd
18068 item tagged to the filename in the minibuffer.
18071 \begin_layout Standard
18072 RCS command that is run:
18074 ci -q -u -i -t-"<initial description>" <file-name>
18077 \begin_layout Standard
18082 to understand the switches.
18086 \begin_layout Subsubsection
18092 \begin_layout Standard
18093 When you are finished editing a file, you check in your changes.
18094 When you do this, you are asked for a description of the changes.
18095 This is stored in the history log.
18096 The version number is bumped, your changes are applied to the master RCS
18097 file, the document is unlocked and set to Read-Only mode.
18101 \begin_layout Standard
18104 ci -q -u -m"<description>" <file-name>
18107 \begin_layout Subsubsection
18113 \begin_layout Standard
18114 By doing this you lock the document so that only you can edit it.
18115 This will also make the document Read-Write only for you.
18116 You will usually continue editing for a while and when you are finished
18117 you check in your changes.
18118 The status line is changed to reflect that you have locked the file.
18122 \begin_layout Standard
18125 co -q -l <file-name>
18128 \begin_layout Subsubsection
18131 Revert To Repository Version
18134 \begin_layout Standard
18135 This will discard all changes made to the document since the last check
18137 You get a warning before changes are discarded.
18140 \begin_layout Standard
18143 co -f -u<version> <file-name>
18146 \begin_layout Subsubsection
18152 \begin_layout Standard
18153 This makes as if the last check in never happened.
18154 No changes are made to the document loaded into LyX, but the last version
18155 is removed from the master RCS file.
18159 \begin_layout Standard
18162 rcs -o<version> <file-name>
18165 \begin_layout Subsubsection
18171 \begin_layout Standard
18172 This show the complete history of the RCS document.
18177 is shown in a browser.
18185 \begin_layout Subsection
18186 CVS commands in LyX
18189 \begin_layout Standard
18190 CVS is now partially supported by LyX.
18191 You can find the commands in the
18193 File\SpecialChar \menuseparator
18195 \begin_inset space ~
18203 \begin_layout Subsubsection
18209 \begin_layout Standard
18210 If your document is not under revision control, this is the only item shown
18212 And if it is under revision control, the
18219 item is not visible.
18223 \begin_layout Standard
18224 This command registers in CVS your document ONLY in case you have already
18225 the documents directory under CVS control (in particular
18230 This means you have to checkout the archive by yourself.
18234 \begin_layout Standard
18235 Then you are asked interactively to supply an initial description of the
18237 Don't forget that registered file is not yet commited.
18240 \begin_layout Standard
18241 CVS command that is run:
18244 \begin_inset Quotes erd
18248 \begin_inset Quotes eld
18252 \begin_inset Quotes erd
18258 \begin_layout Standard
18263 to understand the switches.
18267 \begin_layout Subsubsection
18273 \begin_layout Standard
18274 When you are finished editing a file, you commit your changes.
18275 When you do this, you are asked for a description of the changes.
18276 After that changes are commited.
18279 \begin_layout Standard
18282 cvs -q commit -m"<description>" "<file-name>"
18285 \begin_layout Subsubsection
18288 Revert To Repository Version
18291 \begin_layout Standard
18292 This will discard all changes made to the document since the last check
18294 You get a warning before changes are discarded.
18295 Firstly the file is deleted, secondly CVS update command is run.
18298 \begin_layout Standard
18302 \begin_inset Quotes eld
18306 \begin_inset Quotes erd
18312 \begin_layout Subsubsection
18318 \begin_layout Standard
18319 This show the complete history of the CVS document.
18323 \begin_inset Quotes eld
18327 \begin_inset Quotes erd
18332 is shown in a browser.
18335 \begin_layout Subsection
18336 SVN commands in LyX
18339 \begin_layout Standard
18340 SVN is now partially supported by LyX.
18341 You can find the commands in the
18343 File\SpecialChar \menuseparator
18345 \begin_inset space ~
18351 Please note that if you use password protected access to repository via
18352 ssh, you will be asked in terminal window.
18353 LyX was tested against SVN 1.5 and 1.6
18357 \begin_layout Plain Layout
18358 Most of the commands will work with 1.4 too, see
18359 \begin_inset CommandInset ref
18361 reference "sub:SVN-Repo-Update"
18373 \begin_layout Subsubsection
18379 \begin_layout Standard
18380 If your document is not under revision control, this is the only item shown
18382 And if it is under revision control, the
18389 item is not visible.
18393 \begin_layout Standard
18394 This command registers in SVN your document ONLY in case you have already
18395 the documents directory under SVN control (in particular
18400 This means you have to checkout the archive by yourself.
18404 \begin_layout Standard
18405 Then you are asked interactively to supply an initial description of the
18407 Don't forget that registered file is not yet commited.
18410 \begin_layout Standard
18411 SVN command that is run:
18414 \begin_inset Quotes eld
18418 \begin_inset Quotes erd
18424 \begin_layout Standard
18429 to understand the switches.
18433 \begin_layout Subsubsection
18439 \begin_layout Standard
18440 When you are finished editing a file, you commit your changes.
18441 When you do this, you are asked for a description of the changes.
18442 After that changes are commited.
18445 \begin_layout Standard
18450 \begin_layout Plain Layout
18451 In case locking is not enabled.
18453 \begin_inset CommandInset ref
18455 reference "subsec:SVN-File-Locking"
18466 svn commit -q -m"<description>" <file-name>
18469 \begin_layout Subsubsection
18475 \begin_layout Standard
18476 Updates the changes of this file from the repository.
18477 Be sure you understand SVN merging and conflicts resolving before using
18478 this function, because all conflicts has to be resolved manually by you!
18481 \begin_layout Standard
18486 \begin_layout Plain Layout
18495 \begin_inset Quotes eld
18499 \begin_inset Quotes erd
18505 \begin_layout Subsubsection
18508 Revert To Repository Version
18511 \begin_layout Standard
18512 This will discard all changes made to the document since the last check
18514 You get a warning before changes are discarded.
18518 \begin_layout Standard
18522 \begin_inset Quotes eld
18526 \begin_inset Quotes erd
18532 \begin_layout Subsubsection
18533 \begin_inset CommandInset label
18535 name "sub:SVN-Repo-Update"
18539 Update of the local directory checkout from repository
18543 \begin_layout Plain Layout
18544 Note that this command will work only with subversion
18545 \begin_inset Formula $\geqq1.5$
18556 \begin_layout Standard
18557 All the commands above have one shortcomming - they deal with the current
18559 Once your document contains pictures, includes external
18560 \begin_inset Flex CharStyle:Code
18563 \begin_layout Plain Layout
18569 files and so on administration becomes more complicate.
18570 LyX now supports updating the whole tree in which resides the document
18574 \begin_layout Plain Layout
18575 One need to organize the files structure so that all external files are
18576 in the same directory or subdirectories of the document.
18583 This become especially useful once you cooperate with people which neither
18584 know about subversion management nor they have ambition to commit additional
18585 material to the repository.
18589 \begin_layout Standard
18590 \begin_inset Flex CharStyle:Code
18593 \begin_layout Plain Layout
18594 Update local directory from repository
18599 command updates the whole directory and in case of merge conflicts local
18600 version of the files are left, so no unintended data loss occurs.
18601 If local changes are detected user is warned before update starts.
18604 \begin_layout Labeling
18605 \labelwidthstring 00.00.0000
18607 \begin_inset space ~
18611 \begin_inset space ~
18615 \begin_inset Newline newline
18619 \begin_inset Flex CharStyle:Code
18622 \begin_layout Plain Layout
18628 (Ask if changes are detected.)
18629 \begin_inset Newline newline
18633 \begin_inset Flex CharStyle:Code
18636 \begin_layout Plain Layout
18637 svn update --accept mine-full $path
18645 \begin_layout Standard
18647 \begin_inset Flex CharStyle:Code
18650 \begin_layout Plain Layout
18656 stands for the path to the document.
18659 \begin_layout Subsubsection
18665 \begin_layout Standard
18666 This show the complete history of the SVN document.
18670 \begin_inset Quotes eld
18674 \begin_inset Quotes erd
18679 is shown in a browser.
18682 \begin_layout Subsubsection
18684 \begin_inset CommandInset label
18686 name "subsec:SVN-File-Locking"
18693 \begin_layout Standard
18694 The file exchange through various revision control systems brings the problem
18695 of merge conflicts in case two different users try to edit the same (parts
18697 When such conflict happens it needs manual resolving and one reasonable
18698 alternative is to provide some kind of locking mechanism, which guarantees
18699 that only one user is allowed to edit file at the given time.
18702 \begin_layout Standard
18703 SVN has two mechanisms to provide such kind of mutual exclusivity for file
18704 access - locks and automatical setting of write permissions (see sec.
18706 \begin_inset CommandInset ref
18708 reference "subsec:Automatical-Locking-Property"
18713 \begin_inset Flex CharStyle:Code
18716 \begin_layout Plain Layout
18726 \begin_layout Plain Layout
18727 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
18733 In a case this property is detected for a given document LyX starts to
18734 use SVN locks for document editing automatically and the whole check-in/out
18735 mechanism switches to the same regimen as for RCS.
18736 This in particular means there are two different modes how file is used
18740 \begin_layout Itemize
18742 The loaded file is in the read-only mode.
18743 For editation on needs to check-out.
18748 consists of update from repository and gaining write lock.
18749 If the lock is not possible to obtain, we remain in unlocked state.
18752 \begin_layout Itemize
18754 The loaded file is in the 'normal' edit mode.
18755 No other user is allowed to edit the file.
18760 consists of commiting changes and releasing write-lock.
18761 If no changes have been made to the document, no commit will be produced
18765 \begin_layout Plain Layout
18766 Don't be puzzled by the fact that you will be asked for commit message anyway.
18771 and only the write-lock will be released.
18774 \begin_layout Standard
18778 \begin_layout Labeling
18779 \labelwidthstring 00.00.0000
18782 svn commit -q -m"<description>" "<file-name>"
18783 \begin_inset Newline newline
18786 svn unlock "<file-name>"
18789 \begin_layout Labeling
18790 \labelwidthstring 00.00.0000
18793 svn update "<file-name>"
18794 \begin_inset Newline newline
18797 svn lock "<file-name>"
18800 \begin_layout Subsubsection
18803 \begin_inset CommandInset label
18805 name "subsec:Automatical-Locking-Property"
18811 Automatical Locking Property
18814 \begin_layout Standard
18815 The above mentioned automatical setting of write permissions of the .lyx
18816 file can be set through
18821 ile\SpecialChar \menuseparator
18827 \begin_inset space ~
18830 Control\SpecialChar \menuseparator
18835 oggle locking property
18838 This command is active only when the file is not locked on the svn server
18840 you need to check-out before proceeding).
18843 \begin_layout Labeling
18844 \labelwidthstring 00.00.0000
18846 \begin_inset space ~
18852 \begin_layout Labeling
18853 \labelwidthstring 00.00.0000
18856 svn propset svn:needs-lock ON "<file-name>"
18859 \begin_layout Labeling
18860 \labelwidthstring 00.00.0000
18863 svn propdel svn:needs-lock "<file-name>"
18866 \begin_layout Subsubsection
18867 Revision Information in Documents
18870 \begin_layout Standard
18871 Currently there is no way how to provide such kind of information directly
18873 There are possibilities how to activate it with the help of svn features,
18874 but each has its own drawbacks.
18877 \begin_layout Standard
18878 One possibility is to use svn keywords
18882 \begin_layout Plain Layout
18883 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
18889 In short -- you set file keywords property (e.g.
18892 svn propset svn:keywords 'Rev' file.lyx
18894 ) and then paste keyword ERT
18898 \begin_layout Plain Layout
18899 This is an easy way how to ensure that LyX won't break the line in the middle
18905 tag in your document (e.g.
18910 \begin_layout Plain Layout
18918 This way svn client will automatically substitute revision number (e.g.
18923 \begin_layout Plain Layout
18930 ) after each update and commit.
18931 There are more problems with this approach.
18932 Firstly, the '$' character is used in TeX world for math equations, so
18933 any occurence of math formula
18934 \begin_inset Formula $Rev$
18938 \begin_inset Formula $Rev:59$
18941 in your LyX document.
18942 Similarly for other keywords like Id, Date, Author, etc.
18943 Secondly svn output is dependent on your locales, so its very easy that
18944 svn would produce some problematic strings once Date is used.
18945 Thirdly you get the whole 'Rev: 59' string in your document instead of
18947 Until subversion implements user's custom keywords it will be hard to use
18948 this approach reliably or let LyX to support it directly .
18951 \begin_layout Standard
18952 The second possibility would be to write your own external-material template
18954 \begin_inset Flex CharStyle:Code
18957 \begin_layout Plain Layout
18963 utility or parses the output of
18964 \begin_inset Flex CharStyle:Code
18967 \begin_layout Plain Layout
18973 command and returns the result back, when typeseting the document.
18976 \begin_layout Subsection
18977 SVN and Windows Environment
18980 \begin_layout Quote
18981 My inclination is to say that if the user cannot figure out the command
18982 line operations on their own fairly quickly, they would be well advised
18983 to use TortoiseSVN.
18989 \begin_layout Subsubsection
18993 \begin_layout Standard
18994 In addition to installing LyX, and having access to a Subversion repository,
18995 the user will need to install the Subversion client program.
18996 A Windows installer for the client program is available from
18997 \begin_inset CommandInset href
19000 target "http://www.collab.net/nonav/downloads/subversion/"
19005 The user may also want to install
19006 \begin_inset CommandInset href
19009 target "http://tortoisesvn.tigris.org/"
19013 , which integrates Subversion operations into the context (rightclick) menu
19014 of Windows Explorer.
19015 Operations done outside LyX will typically be more convenient using the
19016 Explorer context menu.
19017 Note that TortoiseSVN is not a replacement for the client program, which
19018 is what LyX itself will use.
19021 \begin_layout Subsubsection
19022 Bringing a document under Subversion control
19025 \begin_layout Standard
19026 Before a LyX document can be brought under version control in Subversion,
19027 its parent directory needs to be under version control.
19028 If the document is being added to a project already in the repository,
19029 this is accomplished by checking the project out to the directory where
19030 the new document will be placed.
19031 If the project itself is not yet under version control (for instance, if
19032 this document starts a new project), the directory must be imported into
19034 This is done outside LyX.
19035 Both import and checkout are easily accomplished from the Explorer context
19036 menu using TortoiseSVN, or alternatively can be done using the command
19037 line client at a DOS prompt.
19038 The procedure for importing the project using TortoiseSVN is described
19039 below, assuming an existing repository and a new project being started
19047 For information on using the Subversion client program, run
19054 \begin_layout Enumerate
19061 in Windows Explorer, right click it, and select
19063 TortoiseSVN > Repo-browser
19066 If necessary, adjust the URL for the repository, then click OK.
19069 \begin_layout Enumerate
19070 Right click the level of the repository under which you want to place the
19071 new project folder (typically the top level) and click
19073 Create folder\SpecialChar \ldots{}
19076 Supply a name for the project folder and click OK.
19077 Add a message for the log file if desired, then click OK again.
19078 The new project folder should appear in the repository.
19079 Finally, click OK again to exit the repository browser.
19082 \begin_layout Enumerate
19083 Once again right click
19089 , this time selecting SVN Checkout\SpecialChar \ldots{}
19090 Select the URL of the project folder
19091 you just created in the repository, and set the checkout directory to
19099 You will be warned about a non-empty folder; click OK to proceed.
19100 You should now have a
19111 \begin_layout Enumerate
19112 Create or open your document in LyX and click
19117 ile\SpecialChar \menuseparator
19123 \begin_inset space ~
19126 Control\SpecialChar \menuseparator
19134 Add a log message and click OK to commit the document to version control.
19137 \begin_layout Standard
19138 From this point onward, you should have full functionality in the
19143 ile\SpecialChar \menuseparator
19149 \begin_inset space ~
19155 You also have the option of checking the document in and out, viewing its
19157 using the TortoiseSVN context menu in Windows Explorer or the Subversion
19158 client program from a command prompt.
19161 \begin_layout Subsection
19165 \begin_layout Standard
19166 With the recent addition of the vc-command function LyX power users are
19167 allowed to create their own commands for revision control.
19170 \begin_layout Standard
19171 As an example you can see how two TortoiseSVN commands could be integrated
19175 \begin_layout Description
19177 \begin_inset Flex CharStyle:Code
19180 \begin_layout Plain Layout
19181 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
19189 \begin_layout Description
19191 \begin_inset Flex CharStyle:Code
19194 \begin_layout Plain Layout
19195 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
19203 \begin_layout Section
19204 Literate Programming
19207 \begin_layout Standard
19212 (kayvan@sylvan.com)
19216 original documentation written by
19218 Edmar Wienskoski Jr.
19221 (edmar-w-jr@technologist.com)
19224 \begin_layout Subsection
19228 \begin_layout Standard
19229 The main purpose of this documentation is to show you how to use LyX for
19230 literate programming.
19231 Where it is assumed that you are familiar with this programming technique,
19233 \begin_inset Quotes eld
19237 \begin_inset Quotes erd
19241 \begin_inset Quotes eld
19245 \begin_inset Quotes erd
19249 If that is not the case, please follow the web links provided in the following
19251 There is a lot of good documentation out there covering old development
19252 history to the latest tools tips.
19255 \begin_layout Standard
19256 It is also assumed that you are familiar with LyX itself to a point that
19257 you are comfortable changing your LyX preferences, and X resources file.
19258 If that is not the case please refer to other LyX documentation to cover
19259 your specific needs.
19262 \begin_layout Subsection
19263 Literate Programming
19266 \begin_layout Standard
19267 From the Literate Programming FAQ:
19270 \begin_layout Quotation
19271 Literate programming is the combination of documentation and source together
19272 in a fashion suited for reading by human beings.
19273 In fact, literate programs should be enjoyable reading, even inviting!
19274 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
19275 and documentation in a single file.
19276 Literate programming tools then parse the file to produce either readable
19277 documentation or compilable source.
19278 The WEB style of literate programming was created by D.
19279 \begin_inset space \thinspace{}
19283 Knuth during the development of his TeX typesetting software.
19287 \begin_layout Standard
19288 Another excerpt says:
19291 \begin_layout Quotation
19294 How is literate programming different from verbose commenting?
19297 \begin_layout Quotation
19298 There are three distinguishing characteristics.
19299 In order of importance, they are:
19303 \begin_layout Itemize
19304 flexible order of elaboration
19307 \begin_layout Itemize
19308 automatic support for browsing
19311 \begin_layout Itemize
19312 typeset documentation, especially diagrams and mathematics
19316 \begin_layout Standard
19317 Now that I sparked your curiosity, take a look in the references.
19320 \begin_layout Subsubsection
19324 \begin_layout Standard
19325 The complete Literate Programming FAQ can be found at:
19328 \begin_layout Quote
19329 Literate Programming FAQ
19330 \begin_inset Flex URL
19333 \begin_layout Plain Layout
19335 http://shelob.ce.ttu.edu/daves/lpfaq/faq.html
19343 \begin_layout Standard
19344 The FAQ lists 23 (twenty three!) different literate programming tools.
19345 Where some are specialized or
19346 \begin_inset Quotes eld
19350 \begin_inset Quotes erd
19353 for particular programming languages, while other have general scope.
19358 for my own use for several reasons:
19361 \begin_layout Itemize
19362 It can generate the documentation either in LaTeX or HTML.
19365 \begin_layout Itemize
19366 It has a open architecture, i.
19367 \begin_inset space \thinspace{}
19371 \begin_inset space \space{}
19374 it is easy to plug in new filters and to perform special processing that
19379 \begin_layout Itemize
19380 There is a good selection of filters available already (the HTML is one
19384 \begin_layout Itemize
19388 \begin_layout Standard
19389 The Noweb web page can be found at:
19392 \begin_layout Quote
19394 \begin_inset Flex URL
19397 \begin_layout Plain Layout
19399 http://www.cs.virginia.edu/~nr/noweb/
19407 \begin_layout Standard
19408 Starting from there you can reach many other interesting links and even
19409 some literate program examples.
19412 \begin_layout Subsection
19413 LyX and Literate Programming
19416 \begin_layout Standard
19417 The LyX support for Literate Programming is provided by using the generic
19418 LyX converters mechanism.
19419 This support is provided in a
19420 \begin_inset Quotes eld
19424 \begin_inset Quotes erd
19428 \begin_inset space \thinspace{}
19432 \begin_inset space \space{}
19435 you will be able to use this new LyX feature with some other literate programmin
19436 g tool of your choice by just changing your LyX preferences.
19439 \begin_layout Subsubsection
19440 Generating documents and code (weaving and tangling)
19443 \begin_layout Paragraph
19444 Selecting the document class
19447 \begin_layout Standard
19448 If you have installed Noweb and LyX successfully, whenever you open a new
19449 document or try to change the document class of an existing one, you will
19450 find that there are three new document classes available:
19453 \begin_layout Itemize
19457 \begin_layout Itemize
19461 \begin_layout Itemize
19465 \begin_layout Standard
19466 You must select one of them to create your literate documents from.
19470 \begin_layout Standard
19471 Note that literate documents are not limited to these three classes.
19472 New classes can be generated from other styles like letter or in combination
19473 with other class variations like Article (AMS).
19474 If you have special needs that cannot be covered by one of the existing
19475 classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
19476 will arrange to insert a new entry, or teach you how to do it.
19480 \begin_layout Plain Layout
19481 It is very simple, it involves the creation of a file with four lines, and
19482 re-running of the auto configuration.
19487 Moreover, if you use a literate tool other than Noweb you may need to create
19488 a new set of document classes for it.
19491 \begin_layout Paragraph
19495 \begin_layout Standard
19496 LyX enables you to write code with a layout named
19504 \begin_layout Plain Layout
19505 The equivalent Noweb term is
19506 \begin_inset Quotes eld
19510 \begin_inset Quotes erd
19514 For historical reasons, I got used to the term
19515 \begin_inset Quotes eld
19519 \begin_inset Quotes erd
19522 introduced by other literate tool named Nuweb, which I used for many years
19523 before rendering myself to Noweb.
19528 Noweb delimits scraps like this:
19531 \begin_layout LyX-Code
19535 \begin_layout LyX-Code
19539 \begin_layout LyX-Code
19543 \begin_layout LyX-Code
19547 \begin_layout LyX-Code
19551 \begin_layout Standard
19552 The problem is that whatever is written in between the << and the
19556 must be taken literally, i.
19557 \begin_inset space \thinspace{}
19561 \begin_inset space \space{}
19564 LyX should be prevented from making any special interpretation of what has
19566 This is handled by a special layout named Scrap, that works like a normal
19567 paragraph but has a free spacing capability.
19570 \begin_layout Standard
19571 The down side of the Scrap paragraph layout is that consecutive paragraphs
19572 of code will be spaced with one empty line in the source code and also
19573 in the printed documentation.
19574 The work around is to enter each line of code within a single Scrap, with
19575 a newline (ctrl-return).
19576 The example above will look like this:
19580 \begin_layout Plain Layout
19581 If you have a printed version of this document you will not see any difference
19582 between the previous example and this one.
19590 \begin_layout LyX-Code
19592 \begin_inset Newline newline
19596 \begin_inset Newline newline
19600 \begin_inset Newline newline
19604 \begin_inset Newline newline
19610 \begin_layout Standard
19611 This layout works fine.
19612 The only real inconvenience is that you have to type ctrl-return instead
19617 \begin_layout Plain Layout
19618 It is in my list of
19619 \begin_inset Quotes eld
19623 \begin_inset Quotes erd
19634 \begin_layout Standard
19635 As a special note, you can also use the
19636 \begin_inset Quotes eld
19640 \begin_inset Quotes erd
19643 construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
19647 \begin_layout LyX-Code
19649 \begin_inset Newline newline
19652 def some_function(args):
19653 \begin_inset Newline newline
19656 "This is the doc string for this function."
19657 \begin_inset Newline newline
19660 print "My args: ", args
19663 \begin_layout LyX-Code
19664 @ %def some_function
19667 \begin_layout Standard
19668 For an example of this usage and the resulting cross-reference output, look
19669 at the Literate python program in
19671 LIBDIR/examples/listerrors.lyx
19673 which should make this all clear.
19676 \begin_layout Paragraph
19677 Generating the documentation
19680 \begin_layout Standard
19681 At this point you already have a new document file with a proper document
19682 class, and with some code and text on it.
19683 How do I print it? The answer is simple, you select
19685 View\SpecialChar \menuseparator
19689 Just like you would do for a plain document.
19690 No special procedure is required.
19693 \begin_layout Standard
19694 To help orientate you, I will now explain what happens inside LyX:
19697 \begin_layout Enumerate
19700 Update\SpecialChar \menuseparator
19703 menu option is chosen, a LaTeX file is generated.
19708 \begin_layout Standard
19709 If the document is of any literate class the generated file will be named
19710 with an extension name defined by the
19711 \begin_inset Quotes eld
19715 \begin_inset Quotes erd
19718 format (defined in the Preferences panel), otherwise the file will have
19727 \begin_layout Enumerate
19728 Note that the only difference so far is in the name of the file, no special
19729 processing is required by LyX.
19730 Given that you formatted the code using the Scrap layout that, by itself,
19731 takes care of the business.
19734 \begin_layout Enumerate
19735 If the document is of any literate class LyX will then use the internal
19736 LyX to Noweb converter, followed by the Noweb to LaTeX converter
19740 \begin_layout Plain Layout
19741 The converters are defined in the
19743 Tools\SpecialChar \menuseparator
19747 \begin_inset Quotes eld
19751 \begin_inset Quotes erd
19763 manual for general information about converters.
19768 to generate the LaTeX file.
19772 \begin_layout Standard
19773 Otherwise it will just skip this step.
19777 \begin_layout Enumerate
19778 Finally, LaTeX is invoked and the regular post processing continues as in
19782 \begin_layout Standard
19783 Independence from a particular
19784 \begin_inset Quotes eld
19788 \begin_inset Quotes erd
19791 is easily achieved by changing the commands that are run by the various
19795 \begin_layout Paragraph
19796 Generating the code
19799 \begin_layout Standard
19800 When the build menu option is chosen or the corresponding button in the
19801 toolbar is pressed, a LaTeX file is generated just like step 1 above.
19802 Next, LyX invokes the
19807 This converter needs to be defined by the user and is not installed by
19808 default, though the Program format is.
19809 This converter (like any other converter) will have two parts:
19812 \begin_layout Enumerate
19813 The converter program itself.
19814 This program performs the conversion from the one format to the other (in
19815 this case, from the Noweb format to the Program pseudo-format).
19818 \begin_layout Enumerate
19819 The error log parser.
19820 This is a program whose sole purpose is to rewrite error messages in a
19821 format that LyX understands.
19822 This makes it possible for LyX to place error boxes in the right places
19823 in the file buffer.
19826 \begin_layout Standard
19827 The first part, the
19828 \begin_inset Quotes eld
19832 \begin_inset Quotes erd
19835 setting, should be set to
19836 \begin_inset Quotes eld
19844 \begin_inset Quotes erd
19848 This basically means that LyX will call
19849 \begin_inset Quotes eld
19853 \begin_inset Quotes erd
19856 (a program or script) with the name of the Noweb file (normally a file
19857 in the LyX temp directory).
19861 \begin_layout Standard
19862 This is an implementation of
19863 \begin_inset Quotes eld
19867 \begin_inset Quotes erd
19870 that you can place in a directory on your path:
19873 \begin_layout LyX-Code
19877 \begin_layout LyX-Code
19881 \begin_layout LyX-Code
19882 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
19885 \begin_layout Standard
19886 The next part of the converter setting is the
19887 \begin_inset Quotes eld
19891 \begin_inset Quotes erd
19894 which is to be set to
19895 \begin_inset Quotes eld
19900 parselog=listerrors
19903 \begin_inset Quotes erd
19907 This will run any errors that are generated by the
19908 \begin_inset Quotes eld
19912 \begin_inset Quotes erd
19915 process through the
19916 \begin_inset Quotes eld
19920 \begin_inset Quotes erd
19926 \begin_layout Standard
19927 The converter code looks in
19935 then on the path for the
19936 \begin_inset Quotes eld
19940 \begin_inset Quotes erd
19946 \begin_layout Standard
19947 The build will normally take place in LyX's temporary directory, so the
19948 files produced by the conversion will be in that directory.
19949 LyX will copy out what it regards as the `main' file, but the
19953 conversion may produce several files, and so most of these would then be
19954 deleted when LyX was closed.
19955 The present solution is to use a `copier',
19959 \begin_layout Plain Layout
19968 manual for information on these.
19977 script in its default mode, so that the entire contents of the temporary
19978 directory is copied.
19979 More will get copied than is needed, to be sure, but nothing will be lost.
19980 If, however, you know what extensions the generated files will have, this
19981 can be improved by using the
19990 This option takes a comma-separated list of extensions to copy.
19991 So, for example, if the conversion will generate only files with the extensions
20000 , then the correct definition would be:
20003 \begin_layout LyX-Code
20004 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
20007 \begin_layout Standard
20008 The result will be that only files with these two extensions will be copied
20012 \begin_layout Paragraph
20013 Build instructions in the document
20016 \begin_layout Standard
20017 The last piece of the integration between LyX and noweb is the
20018 \begin_inset Quotes eld
20022 \begin_inset Quotes erd
20026 Generally, the instructions for building your program should be embedded
20027 in a scrap of its own.
20029 \begin_inset Quotes eld
20033 \begin_inset Quotes erd
20036 above uses the notangle command to look for this scrap (called
20037 \begin_inset Quotes eld
20041 \begin_inset Quotes erd
20044 ) and runs its contents through
20045 \begin_inset Quotes eld
20049 \begin_inset Quotes erd
20055 \begin_layout Standard
20056 Typically, such a scrap would look something like this:
20059 \begin_layout LyX-Code
20061 \begin_inset Newline newline
20065 \begin_inset Newline newline
20069 \begin_inset Newline newline
20072 if [ -z "${NOWEB_SOURCE}" ]
20073 \begin_inset Newline newline
20077 \begin_inset Newline newline
20080 NOWEB_SOURCE=myfile.nw
20081 \begin_inset Newline newline
20085 \begin_inset Newline newline
20089 code to extract files ...]
20090 \begin_inset Newline newline
20094 code to compile files ...]
20095 \begin_inset Newline newline
20101 \begin_layout Standard
20104 LIBDIR/examples/listerrors.lyx
20108 LIBDIR/examples/Literate.lyx
20110 which implement two versions of the
20111 \begin_inset Quotes eld
20115 \begin_inset Quotes erd
20118 program for some illustrations of how all of these pieces go together or
20121 LIBDIR/examples/noweb2lyx.lyx.
20124 Interestingly, these three files show off the language-indepence of the
20125 LyX literate programming support since they are written in Python, C and
20129 \begin_layout Subsubsection
20133 \begin_layout Standard
20134 All the Literate Programming support is configured by the
20136 Tools\SpecialChar \menuseparator
20140 \begin_inset Quotes eld
20144 \begin_inset Quotes erd
20148 The important parts are:
20151 \begin_layout Description
20153 \begin_inset space ~
20157 \begin_inset Quotes eld
20161 \begin_inset Quotes erd
20165 \begin_inset space ~
20168 format Set up via the Formats tab, this is where the Noweb-specific pieces
20178 , the file extension is set to
20183 This tells LyX to create a file with a
20187 extension in the first step of the conversion process.
20190 \begin_layout Description
20192 \begin_inset space ~
20200 \begin_inset space ~
20203 format This is an empty format whose sole purpose is to be the endpoint
20204 of a conversion (which then allows us to set up a converter for it).
20207 \begin_layout Description
20216 This converter performs the
20217 \begin_inset Quotes eld
20221 \begin_inset Quotes erd
20224 of the literate document.
20225 For Noweb, it is set to
20226 \begin_inset Quotes eld
20231 noweave -delay -index $$i > $$o
20234 \begin_inset Quotes erd
20240 \begin_layout Description
20250 \begin_inset Quotes eld
20254 \begin_inset Quotes erd
20258 As stated above, the Converter is set to
20259 \begin_inset Quotes eld
20267 \begin_inset Quotes erd
20270 , with Flags set to
20271 \begin_inset Quotes eld
20276 originaldir,parselog=listerrors
20279 \begin_inset Quotes erd
20285 \begin_layout Subsubsection
20289 \begin_layout Standard
20290 There is also a new function implemented in the LyX server, the
20291 \begin_inset Quotes eld
20294 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
20298 \begin_layout Standard
20299 When debugging code with ddd/gdb, it is possible to invoke a text editor
20300 at the current execution position with a single key stroke.
20301 The default ddd configuration for that is shift-ctrl-V.
20302 It happens that you can define the editor command line invocation in ddd
20305 Edit\SpecialChar \menuseparator
20306 Preferences\SpecialChar \menuseparator
20309 dialog and changing the "Edit Sources" entry.
20312 \begin_layout Standard
20313 I take advantage of the new created LyX server function and this ddd feature,
20315 \begin_inset Quotes eld
20319 \begin_inset Quotes erd
20325 \begin_layout LyX-Code
20326 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
20329 \begin_layout Standard
20330 With this, whenever you are using ddd and find a point in the program that
20331 you want to edit, you just press shift-ctrl-V (in the ddd window), and
20332 ddd you forward this information to LyX through the LyX server and then
20333 the LyX window will show the same file with the cursor at the same position
20334 ddd was pointing to.
20335 No more guessing or long scrolling to locate a point in the program back
20339 \begin_layout Standard
20340 Note however that you must enable the LyX server to get this feature working
20341 (it is disabled by default).
20342 You can enable it in
20354 ) by entering in the
20359 \begin_inset Quotes eld
20364 /home/<your-home-directory>/.lyx/lyxpipe
20367 \begin_inset Quotes erd
20373 \begin_layout Standard
20374 Read the LyX server documentation in the
20376 Customization Manual
20378 for further information.
20381 \begin_layout Subsubsection
20385 \begin_layout Standard
20386 There are six new buttons that can be added to your LyX toolbar.
20387 Five of these buttons are short cuts to layout styles:
20408 The last one is a short cut to the
20409 \begin_inset Quotes eld
20413 \begin_inset Quotes erd
20420 \begin_layout Standard
20421 LyX has a range of buttons that are available for tool bar customization.
20422 In my toolbar I like to combine the six short cuts above with two more:
20427 \SpecialChar \menuseparator
20432 \SpecialChar \menuseparator
20439 View\SpecialChar \menuseparator
20443 Here is how it looks like:
20446 \begin_layout LyX-Code
20450 \begin_layout LyX-Code
20454 \begin_layout LyX-Code
20455 Icon "layout Standard"
20458 \begin_layout LyX-Code
20459 Icon "layout Section"
20462 \begin_layout LyX-Code
20463 Icon "layout LaTeX"
20466 \begin_layout LyX-Code
20467 Icon "layout LyX-Code"
20470 \begin_layout LyX-Code
20471 Icon "layout Scrap"
20474 \begin_layout LyX-Code
20478 \begin_layout LyX-Code
20482 \begin_layout LyX-Code
20483 Icon "buffer-typeset"
20486 \begin_layout LyX-Code
20487 Icon "build-program"
20490 \begin_layout LyX-Code
20494 \begin_layout LyX-Code
20498 \begin_layout LyX-Code
20502 \begin_layout LyX-Code
20506 \begin_layout LyX-Code
20510 \begin_layout Subsubsection
20511 Colors customization
20514 \begin_layout Standard
20515 There are a number of colors in LyX that can be customized in
20520 One of the things that bothers people is the LaTeX font color.
20521 The default color is red, since the scraps uses LaTeX font, and there is
20522 a lot of scraps in literate documents, you may get tired of seeing everything
20524 You can change it by going to the tabs
20533 \begin_layout Standard
20534 The next thing is the visible presence of the newline character in the screen.
20535 You can choose the color of this particular character and make it blend
20537 I recommend you choosing a color that is close to the background but not
20538 equal, that way you still can see it is there, but it is not bothering
20543 \begin_layout Chapter
20544 Secrets of the LaTeX Masters
20545 \begin_inset CommandInset label
20554 \begin_layout Standard
20555 Though LyX is a powerful tool, it cannot hope to support everything that
20556 can be done with pure TeX/LaTeX.
20557 However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
20558 as long as you are not afraid to use that
20559 \begin_inset Quotes eld
20563 \begin_inset Quotes erd
20566 button on the toolbar or add things to the LaTeX preamble.
20567 This section lists some tips, tricks, and otherwise cool ideas to give
20568 your document that extra little flair.
20571 Do try this at home
20573 , just start with something a little smaller and less important than your
20577 \begin_layout Standard
20578 Most ideas in this section require less common files in your LaTeX installation.
20579 If you have a system like teTeX, most will already be available.
20580 A few, however, will need to be downloaded from one of the CTAN archives.
20581 Often, there are several ways to do something, or several LaTeX style files
20582 which do the same thing.
20583 We do not endorse one choice over another, we simply claim that we have
20584 done a particular task with a particular file.
20585 Put on your wizard hat, keep an eye out for dragons, and let us begin.
20588 \begin_layout Section
20592 \begin_layout Standard
20595 Lars Gullik Bjønnes
20598 \begin_layout Subsection
20602 \begin_layout Standard
20603 The aim for this chapter
20607 \begin_layout Plain Layout
20608 Editor's note: Lars' original chapter was a masterful description of how
20614 However, it was too long to flow smoothly in this document.
20615 I have therefore chosen to excerpt the most important sections here (sorry,
20616 Lars); you can read the original chapter (and more of the story!) in the
20619 examples/multicol.lyx
20627 is to show how the LaTeX package
20631 can be used in a LyX document.
20632 As LyX doesn't support the
20636 package natively yet, we have to use some small hacks.
20637 By reading this section it should be obvious how to do this.
20640 \begin_layout Subsection
20644 \begin_layout Standard
20649 package allows switching between one and multicolumn format on the same
20651 Footnotes are handled correctly (for the most part), but will be placed
20652 at the bottom of the page and not under each column.
20653 LaTeX's float mechanism, however, is partly disabled in the current implementat
20655 At the moment only page-wide floats can be used within the scope of the
20659 \begin_layout Subsection
20663 \begin_layout Subsubsection
20667 \begin_layout Standard
20668 If you want to have two columns in your text, you have use LaTeX mode to
20673 begin{multicols}{2}
20675 at the point where you want the two column layout to start, and then
20681 where you want it to end.
20685 \begin_layout Standard
20689 \begin_layout Plain Layout
20693 begin{multicols}{2}
20701 \begin_layout Standard
20706 The Adventure of the Empty House
20709 \begin_inset Newline newline
20714 Sir Arthur Conan Doyle
20717 \begin_layout Standard
20720 It was in the spring of the year 1894 that all London was interested, and
20721 the fashionable world dismayed, by the murder of the Honourable Ronald
20722 Adair under most unusual and inexplicable circumstances.
20723 The public has already learned those particulars of the crime which came
20724 out in the police investigation, but a good deal was suppressed upon that
20725 occasion, since the case for the prosecution was so overwhelmingly strong
20726 that it was not necessary to bring forward all the facts.
20727 Only now, at the end of nearly ten years, am I allowed to supply those
20728 missing links which make up the whole of that remarkable chain.
20729 The crime was of interest in itself, but that interest was as nothing to
20730 me compared to the inconceivable sequel, which afforded me the greatest
20731 shock and surprise of any event in my adventurous life.
20732 Even now, after this long interval, I find myself thrilling as I think
20733 of it, and feeling once more that sudden flood of joy, amazement, and increduli
20734 ty which utterly submerged my mind.
20735 Let me say to that public, which has shown some interest in those glimpses
20736 which I have occasionally given them of the thoughts and actions of a very
20737 remarkable man, that they are not to blame me if I have not shared my knowledge
20738 with them, for I should have considered it my first duty to do so, had
20739 I not been barred by a positive prohibition from his own lips, which was
20740 only withdrawn upon the third of last month.
20743 \begin_layout Standard
20747 \begin_layout Plain Layout
20759 \begin_layout Subsubsection
20763 \begin_layout Standard
20764 The same pattern is used when you want more than two columns:
20767 \begin_layout Standard
20771 \begin_layout Plain Layout
20775 begin{multicols}{3}
20783 \begin_layout Standard
20786 It can be imagined that my close intimacy with Sherlock Holmes had interested
20787 me deeply in crime, and that after his disappearance I never failed to
20788 read with care the various problems which came before the public.
20789 And I even attempted, more than once, for my own private satisfaction,
20790 to employ his methods in their solution, though with indifferent success.
20791 There was none, however, which appealed to me like this tragedy of Ronald
20793 As I read the evidence at the inquest, which led up to a verdict of willful
20794 murder against some person or persons unknown, I realized more clearly
20795 than I had ever done the loss which the community had sustained by the
20796 death of Sherlock Holmes.
20797 There were points about this strange business which would, I was sure,
20798 have specially appealed to him, and the efforts of the police would have
20799 been supplemented, or more probably anticipated, by the trained observation
20800 and the alert mind of the first criminal agent in Europe.
20801 All day, as I drove upon my round, I turned over the case in my mind and
20802 found no explanation which appeared to me to be adequate.
20803 At the risk of telling a twice-told tale, I will recapitulate the facts
20804 as they were known to the public at the conclusion of the inquest.
20807 \begin_layout Standard
20811 \begin_layout Plain Layout
20823 \begin_layout Standard
20824 You can have more than 3 columns if you want to, but that might not be very
20825 pleasant for the eye.
20828 \begin_layout Subsubsection
20829 Columns inside columns
20832 \begin_layout Standard
20833 You can even have columns inside columns:
20836 \begin_layout Standard
20840 \begin_layout Plain Layout
20844 begin{multicols}{2}
20852 \begin_layout Standard
20855 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
20856 at that time governor of one of the Australian colonies.
20857 Adair's mother had returned from Australia to undergo the operation for
20858 cataract, and she, her son Ronald, and her daughter Hilda were living together
20862 \begin_layout Standard
20866 \begin_layout Plain Layout
20870 begin{multicols}{2}
20878 \begin_layout Standard
20881 The youth moved in the best society–had, so far as was known, no enemies
20882 and no particular vices.
20883 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
20884 had been broken off by mutual consent some months before, and there was
20885 no sign that it had left any very profound feeling behind it.
20886 For the rest {sic} the man's life moved in a narrow and conventional circle,
20887 for his habits were quiet and his nature unemotional.
20888 Yet it was upon this easy-going young aristocrat that death came, in most
20889 strange and unexpected form, between the hours of ten and eleven-twenty
20890 on the night of March 30, 1894.
20893 \begin_layout Standard
20897 \begin_layout Plain Layout
20909 \begin_layout Standard
20912 Ronald Adair was fond of cards–playing continually, but never for such stakes
20914 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
20915 It was shown that, after dinner on the day of his death, he had played
20916 a rubber of whist at the latter club.
20917 He had also played there in the afternoon.
20922 The evidence of those who had played with him– Mr.
20923 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
20924 and that there was a fairly equal fall of the cards.
20925 Adair might have lost five pounds, but not more.
20926 His fortune was a considerable one, and such a loss could not in any way
20928 He had played nearly every day at one club or other, but he was a cautious
20929 player, and usually rose a winner.
20930 It came out in evidence that, in partnership with Colonel Moran, he had
20931 actually won as much as four hundred and twenty pounds in a sitting, some
20932 weeks before, from Godfrey Milner and Lord Balmoral.
20933 So much for his recent history as it came out at the inquest.
20936 \begin_layout Standard
20940 \begin_layout Plain Layout
20952 \begin_layout Standard
20953 Please do read the file
20955 examples/multicol.lyx
20957 for more advanced examples including column and header spacing, vertical
20958 separator lines, and more.
20961 \begin_layout Section
20966 Paragraph Environment
20967 \begin_inset OptArg
20970 \begin_layout Plain Layout
20971 Numbering in Enumerate
20979 \begin_layout Standard
20985 \begin_layout Standard
20986 \begin_inset VSpace bigskip
20992 \begin_layout Standard
20994 The default numbering for the
20998 paragraph environment begins with Arabic numbers and ends with uppercase
21000 Suppose, however, you wanted a different type of numbering scheme.
21001 Here's a quickie example of how to change the numbering scheme:
21004 \begin_layout LyX-Code
21014 \begin_layout LyX-Code
21024 \begin_layout LyX-Code
21034 \begin_layout LyX-Code
21044 \begin_layout Standard
21045 \SpecialChar \ldots{}
21046 which changes the numbering scheme to uppercase Roman numerals, uppercase
21047 letters, Arabic numbers, and lowercase letter.
21050 \begin_layout Standard
21051 Additionally, the previous example also adds a little bit extra to the numbering
21053 For example, the first level label actually looks like:
21054 \begin_inset Quotes eld
21058 \begin_inset Quotes erd
21062 For ease of reading, we'll describe what the numbering schemes look like
21063 using a notation something like this: <
21064 \begin_inset Quotes eld
21068 \begin_inset Quotes erd
21072 \begin_inset space ~
21076 \begin_inset Quotes erd
21080 \begin_inset Quotes erd
21084 \begin_inset space ~
21088 \begin_inset Quotes erd
21092 \begin_inset Quotes erd
21096 \begin_inset space ~
21100 \begin_inset Quotes eld
21104 \begin_inset Quotes erd
21111 \begin_layout Standard
21112 As you can see in the example, there is a label command for each nesting
21119 \SpecialChar \ldots{}
21126 , as well as a counter,
21130 \SpecialChar \ldots{}
21136 There are also five
21137 \begin_inset Quotes eld
21141 \begin_inset Quotes erd
21174 , each of which take one counter as an argument.
21175 You can add characters before or after these, but there's no need to add
21179 \begin_layout Standard
21180 You can get really fancy with these.
21184 \begin_layout LyX-Code
21198 \begin_layout LyX-Code
21210 \begin_layout LyX-Code
21220 \begin_layout LyX-Code
21230 \begin_layout Standard
21231 produces the somewhat out of hand numbering scheme: <
21232 \begin_inset Quotes eld
21236 \begin_inset Quotes erd
21240 \begin_inset space ~
21244 \begin_inset Quotes erd
21248 \begin_inset Quotes erd
21252 \begin_inset space ~
21256 \begin_inset Quotes erd
21260 \begin_inset Quotes erd
21264 \begin_inset space ~
21268 \begin_inset Quotes eld
21272 \begin_inset Quotes erd
21279 \begin_layout Standard
21283 \begin_layout Section
21287 \begin_layout Standard
21293 \begin_layout Standard
21294 \begin_inset VSpace bigskip
21300 \begin_layout Standard
21305 \begin_layout Plain Layout
21311 tmpfont}{cmr17 scaled 2500}{
21323 \begin_layout Standard
21328 \begin_layout Plain Layout
21339 hose of you who like the style of old books probably also like
21340 \begin_inset Quotes eld
21344 \begin_inset Quotes erd
21347 —those large capital letters which begin each new chapter or section.
21348 Implementing them with plain LyX/LaTeX is straightforward (assuming you
21349 know some plain TeX!) but does require a lot of work and many iterations,
21350 as you can see by all the ugly TeX-mode stuff at the beginning of this
21354 \begin_layout Standard
21358 \begin_layout Plain Layout
21364 bigdrop{-1em}{3}{ptmri}{T}+
21369 here is a much easier way of doing this, of course.
21378 ) package from CTAN allows a simple way to add such letters to your documents.
21379 Since this package is not a standard part of teTeX, I can't demonstrate
21380 it within this document, but if you copy this paragraph to a new document,
21382 \begin_inset Quotes eld
21392 \begin_inset Quotes erd
21395 and the pluses from the TeX code at the beginning of the paragraph, and
21400 usepackage{dropcaps}
21402 to your LaTeX preamble, you will get a nice Times Roman Italic
21403 \begin_inset Quotes eld
21407 \begin_inset Quotes erd
21410 , whose height is three lines of text and which protrudes 1 em into the
21412 (Make certain you have copied
21413 \begin_inset Quotes eld
21421 \begin_inset Quotes erd
21424 into a directory where TeX can see it.) The first argument is the amount
21425 of indentation; in this case the negative sign moves it into the margin.
21426 The second argument is the height of the letter in number of lines of text.
21427 The third argument is the font name: virtually anything which has a tfm
21428 file should work (wade through the
21430 .../texmf/fonts/tfm
21432 directory for possibilities).
21433 My personal favorite is
21434 \begin_inset Quotes eld
21442 \begin_inset Quotes erd
21445 , a fancy German font specifically designed for dropped capitals.
21446 The fourth argument is the letter (or letters) to be dropped.
21451 package also offers the
21457 command, as well as a slightly simplified
21466 \begin_layout Section
21467 Non-standard Paragraph Shapes
21470 \begin_layout Standard
21476 \begin_layout Standard
21477 \begin_inset VSpace bigskip
21483 \begin_layout Standard
21487 \begin_layout Plain Layout
21499 \begin_layout Standard
21503 \begin_layout Plain Layout
21512 \begin_layout Plain Layout
21526 \begin_layout Standard
21531 \begin_layout Plain Layout
21542 \begin_layout Plain Layout
21551 \begin_layout Plain Layout
21560 \begin_layout Plain Layout
21569 \begin_layout Plain Layout
21578 \begin_layout Plain Layout
21587 \begin_layout Plain Layout
21596 \begin_layout Plain Layout
21605 \begin_layout Plain Layout
21614 \begin_layout Plain Layout
21623 \begin_layout Plain Layout
21632 \begin_layout Plain Layout
21641 \begin_layout Plain Layout
21650 \begin_layout Plain Layout
21659 \begin_layout Plain Layout
21668 \begin_layout Plain Layout
21677 \begin_layout Plain Layout
21686 \begin_layout Plain Layout
21695 \begin_layout Plain Layout
21704 \begin_layout Plain Layout
21710 There are times when the tyranny of rectangular paragraphs must be overthrown.
21711 In such situations, a call to the delightful plain TeX command
21718 As you can see, completely arbitrary shapes can be laid out with a suitable
21719 set of linelength definitions.
21720 While this parshape may look a bit silly and useless, one could conceive
21721 of situations such as finely tuned dropped capitals, word wrapping around
21722 non-rectangular graphics, etc.
21723 which will benefit from such handcrafting.
21726 \begin_layout Standard
21727 \begin_inset VSpace bigskip
21733 \begin_layout Standard
21738 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
21745 is the number of lines of text which define the paragraph.
21746 If there turn out to be fewer lines, the shape is truncated; if there are
21747 more, the excess lines have the same dimensions as the last line of the
21757 entries specify the indentation of the line from the left margin, and the
21758 length of the line as measured from that point.
21759 The shape applies only to the current paragraph; everything is reset to
21760 normal for the next paragraph.
21763 \begin_layout Standard
21767 \begin_layout Plain Layout
21779 \begin_layout Section
21783 \begin_layout Standard
21784 As you can see, the examples in this section range from the useful to the
21786 While I don't expect that anyone will ever need the paragraph shape demonstrate
21787 d in the last section, the important point is that you can do almost anything
21788 you want in LyX if you are willing to figure out how to do it in TeX and
21790 TeX is a fantastically powerful typesetting system and all that power is
21791 available to you since LyX uses it as its backend.