1 #LyX 1.4.2svn created this file. For more info see http://www.lyx.org/
8 \newcommand{\extratablespace}[1]{\noalign{\vskip#1}}
14 \paperfontsize default
21 \paperorientation portrait
24 \paragraph_separation indent
26 \quotes_language english
29 \paperpagestyle headings
30 \tracking_changes false
45 \begin_layout Standard
47 Principal maintainer of this file is
52 If you have comments or error corrections, please send them to the LyX
53 Documentation mailing list, <lyx-docs@lists.lyx.org>.
61 \begin_layout Standard
62 \begin_inset LatexCommand \tableofcontents{}
73 \begin_layout Standard
78 manual, which you are now reading, is essentially Part II of the
80 User's Guide\SpecialChar \@.
83 The reason for splitting this document is simple: the
87 is already huge, and it contains all of the basic features one needs to
88 know in order to prepare most documents.
89 However, the LyX Team has a long-term goal of making LyX extensible through
90 various configuration files and external packages.
91 That means that if you want to support the Fizzwizzle LaTeX package, you
92 can create a layout file for it without having to alter LyX itself.
93 We've already had contributions of several new features this way.
94 This is the place where all of that gets documented.
97 \begin_layout Standard
98 This manual also documents some special features, like fax support, version
99 control, and SGML support, which require additional software to work properly.
100 Lastly, there's a chapter of LaTeX tools and tips, things you can use to
101 spruce up your documents by directly using the powerful features of LaTeX.
106 only WYSIWYM, and will only ever interface to certain LaTeX features.
109 \begin_layout Standard
110 Of course, with all of this extra documentation,
112 Extended LyX Features
114 may itself grow too big for its britches.
115 In that case, you can just call it the
116 \begin_inset Quotes eld
120 \begin_inset Quotes erd
126 \begin_layout Standard
127 If you haven't read the
131 yet, you are definitely in the wrong manual.
136 is the first place to go, since it will direct you to the correct manual,
137 and it also describes the notation and format of all of the manuals.
138 You should also be thoroughly familiar with the
142 and all of the basic features of LyX.
146 \begin_layout Standard
147 In this document, many sections are independent articles contributed by
148 an individual and are noted as such.
149 This person is generally whoever wrote the layout file for the new document
150 class or LaTeX package, or implemented the feature.
151 If there is no mention of an author to a chapter [or chapter sections],
152 that means it was written by the LyX Documentation Team.
155 \begin_layout Standard
156 Since all the topics in this manual depend heavily on LyX's interaction
157 with LaTeX, this first chapter covers
161 the inner workings of LyX and how to direct LyX to generate exactly the
163 It is obviously for more seasoned LyX users.
166 \begin_layout Chapter
170 \begin_layout Section
174 \begin_layout Standard
175 \begin_inset LatexCommand \label{sec:lyxandlatex}
179 This chapter is for both TeX-nicians and the LaTeX-curious.
180 In it, we'll explain how LyX and LaTeX work together to produce printable
182 This is the only place in any of the manuals where we assume you know something
186 \begin_layout Standard
187 At one time, we called LyX a
188 \begin_inset Quotes eld
191 WYSIWYM frontend to LaTeX,
192 \begin_inset Quotes erd
195 but that's no longer true.
196 There are frontends to LaTeX out there.
197 They are basically editors with the ability to run LaTeX and mark any errors
198 in the file you're editing.
207 run LaTeX, and it also marks errors in the file, it also does much, much
209 Thanks to the WYSIWYM concept, you don't need LaTeX to use LyX effectively.
210 LyX has also added a few extensions to LaTeX.
211 Try the following sometime: select
213 Export\SpecialChar \menuseparator
223 menu, then look at the preamble of the resulting
228 You'll notice a variety of new macros defined specifically by LyX.
229 These macros are defined automatically, according to the features you use
233 \begin_layout Standard
234 There are several commands that automatically invoke LaTeX.
238 \begin_layout Itemize
244 iew\SpecialChar \menuseparator
251 \begin_layout Itemize
257 iew\SpecialChar \menuseparator
262 pdate\SpecialChar \menuseparator
268 \begin_layout Itemize
276 \SpecialChar \menuseparator
282 \begin_layout Itemize
290 \SpecialChar \menuseparator
296 \begin_layout Standard
297 They will only invoke LaTeX if the file has changed since the last time
302 \begin_layout Standard
303 When you run LaTeX on the file you're editing, LyX performs these steps:
306 \begin_layout Enumerate
307 Convert the document to LaTeX and save to a file with the extension
318 \begin_layout Enumerate
323 file (maybe several times).
326 \begin_layout Enumerate
327 If there are any errors, insert error boxes in the document to mark where
329 These boxes are transient and are not saved along with the document.
332 \begin_layout Standard
333 If you've run LaTeX using
355 , LyX performs two more steps:
358 \begin_layout Itemize
363 to convert the Dvi file to PostScript®:
367 \begin_layout Itemize
373 , the output file has the extension
378 \begin_layout Itemize
387 , the output file has the extension
395 \begin_layout Itemize
400 or send the PostScript® file to the printer.
403 \begin_layout Section
404 \begin_inset Quotes eld
407 Help! LyX generated an unreadable
412 \begin_inset Quotes erd
418 \begin_layout Standard
419 Die-hard LaTeX users will scream and howl this into the night, then declare
420 LyX useless, simply because they didn't RTFM.
423 \begin_layout Standard
424 We're going to set the record straight.
425 LyX produces two kinds of LaTeX files.
426 One is human readable.
427 The other is LyX readable.
428 Every time LyX executes LaTeX, it produces a LaTeX file that it can easily
434 file is not human readable.
435 Don't even try to read it.
440 file that you can send to a colleague, select
445 xport\SpecialChar \menuseparator
462 \begin_layout Section
463 Translating LaTeX files into LyX
466 \begin_layout Standard
467 You can import a LaTeX file into LyX by using the
472 ile\SpecialChar \menuseparator
477 mport\SpecialChar \menuseparator
485 This will call a Perl script named
489 ---which will create a file
497 ---and then open that file.
498 If the translation doesn't work, you can try calling
502 from the command line, possibly using fancier options.
505 \begin_layout Standard
510 will translate most legal LaTeX, but not everything.
511 It will leave things it doesn't understand in TeX mode, so after translating
516 , you can look for red text and hand-edit it to look right.
519 \begin_layout Standard
524 has its own section in the
528 manual (as well as a Unix manpage equivalent), which you should read to
529 find out about what LaTeX isn't supported, bugs (and how to get around
530 them), and how to use the various options.
533 \begin_layout Standard
538 to work, or you just want to put a piece of LaTeX code into a LyX file,
540 \begin_inset LatexCommand \ref{sec:latexcodes}
547 \begin_layout Section
548 Inserting LaTeX Code into LyX Documents
549 \begin_inset LatexCommand \label{sec:Inserting-LaTeX-Code}
556 \begin_layout Standard
557 \begin_inset LatexCommand \label{sec:latexcodes}
561 This is a rather important point: You can always insert LaTeX code into
563 LyX simply cannot, and will probably never be able to, display every possible
565 If ever you need to insert LaTeX commands into your LyX document, you can
566 use the ERT box, which you can insert into your document with
571 nsert\SpecialChar \menuseparator
579 The ERT box comes in three forms: collapsed, open, and inlined.
580 The first two are used just like any other collapsable (foldable) box (such
581 as footnotes), and are useful for significant amounts of LaTeX commands.
583 \begin_inset Quotes eld
587 \begin_inset Quotes erd
590 ERT box displays its content as part of the button, and is useful for very
591 short sections of LaTeX commands.
596 \begin_layout Standard
606 \begin_layout Standard
607 You can switch between all three by right-clicking on the ERT.
608 Note that if you want more than one line of LaTeX commands, you cannot
609 use the inlined mode.
612 \begin_layout Standard
613 Here's an example of inserting LaTeX commands in a LyX document.
614 The code looks like this:
617 \begin_layout LyX-Code
626 This is an example for a minipage environment.
629 can put nearly everything in it, even (non-floating)
672 \begin_layout LyX-Code
676 \begin_layout Standard
677 The ERT box containing this text is directly after this paragraph.
678 Those of you reading the manual online will only see a bunch of funky text
680 Those reading a printed version of the manuals will see the actual results:
683 \begin_layout Standard
687 \begin_layout Standard
694 \begin_layout Standard
701 \begin_layout Standard
703 This is an example for a minipage environment.
704 You can put nearly everything in it, even (non-floating) figures and tables.
708 \begin_layout Standard
715 \begin_layout Standard
720 \begin_layout Standard
727 \begin_layout Standard
734 \begin_layout Standard
741 \begin_layout Standard
747 \begin_layout Standard
754 \begin_layout Standard
761 \begin_layout Standard
768 \begin_layout Standard
780 \begin_layout Standard
781 In addition to these two methods, you can also create a separate file containing
782 some complex LaTeX structure.
788 nsert\SpecialChar \menuseparator
796 to include your file (you should select the type
801 We recommend that you only do this if you have a
810 Otherwise, you'll have a big job tracking down LaTeX errors\SpecialChar \ldots{}
814 \begin_layout Standard
815 There are a few last notes to emphasize:
818 \begin_layout Itemize
819 Inside of LyX, LaTeX code appears
824 \begin_layout Itemize
829 check if your LaTeX code is correct.
832 \begin_layout Itemize
833 Beware reinventing the wheel.
836 \begin_layout Standard
837 That last note refers to two things.
838 First, LyX does have quite a few features tucked into it, and more are
840 Be sure to check the manuals to make sure that LyX doesn't have such-and-such
841 feature before you go off merrily coding LaTeX.
842 Second, there are numerous LaTeX packages out there to do all sorts of
843 things, from labels to envelopes to fancy multipage tables.
844 Check out a CTAN site for details (see Section
845 \begin_inset Quotes eld
849 \begin_inset Quotes erd
860 \begin_layout Standard
865 : I seem to do this an awful lot.
866 Sat down and merrily began coding something to print out labels, only to
867 learn that there were already 2 different LaTeX packages to do this.
868 Worse yet --- I had them already!
876 \begin_layout Standard
877 If you do need to do some wild and fancy things within your document, be
878 sure to check out a good LaTeX book for assistance.
879 There are a number of them listed in the bibliography of the
886 \begin_layout Standard
887 There are a number of LaTeX commands which have to be placed before the
888 beginning of the actual text.
889 They go into the preamble, and this is explained in the next section.
892 \begin_layout Section
893 LyX and the LaTeX Preamble
896 \begin_layout Subsection
897 About the LaTeX Preamble
900 \begin_layout Standard
901 \begin_inset LatexCommand \label{sec:preamble}
905 If you already know LaTeX, there is no need to explain here what the preamble
907 If you don't, the following will give you some ideas --- we recommend again
908 that you consult a LaTeX book for further information.
909 In any case, you should read the points below, because they explain what
910 you can do and what you don't need to do in the LaTeX preamble of a LyX
914 \begin_layout Standard
915 The LaTeX preamble comes at the very beginning of a document,
923 \begin_layout Itemize
924 declare the document class.
925 LyX already does this for you.
929 \begin_layout Standard
930 If you're a seasoned LaTeX-nician, and you have some custom document class
931 you want to use, check out the
935 for information on how to make LyX interface to it.
936 Be sure to submit your efforts to the LyX Team for inclusion in future
941 \begin_layout Itemize
942 declare the usage of packages.
943 LaTeX packages provide special commands, which are only available within
944 a document when the package has been declared in the preamble.
953 forces all paragraphs to be indented.
954 There are other packages for labels, envelopes, margins, etc.
958 \begin_layout Itemize
959 set counters, variables, lengths and widths.
960 There are several LaTeX counters and variables which
964 be set globally from within the preamble in order to have the desired effect.
965 [There are other variables which you can set and reset inside the document,
966 too.] Margins are a good example of something which must be set in the preamble.
967 Another example is the label format for lists.
968 You can actually set these just about anywhere, but it's best to do it
969 just once, inside the preamble.
972 \begin_layout Itemize
973 declare user defined commands [with
985 ], mostly abbreviations for LaTeX commands which appear very often inside
987 Although the preamble is a good place to declare such commands, they
991 be declared anywhere else [but
995 they are used for the first time, of course\SpecialChar \ldots{}
997 This can be useful if there is a lot of raw LaTeX code in your document,
998 which normally should not be the case.
1001 \begin_layout Standard
1002 LyX adds its own set of definitions to the preamble of the
1007 This makes LaTeX files generated by LyX portable.
1010 \begin_layout Subsection
1011 Changing the Preamble
1014 \begin_layout Standard
1015 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1016 can't change them without patching LyX itself.
1017 You can, however, add your own stuff to the preamble.
1018 There are two ways to do this:
1021 \begin_layout Enumerate
1048 \SpecialChar \menuseparator
1056 dialog, depending on your frontend.
1057 Note that the LyX keybindings will not work in this dialog, alas.
1060 \begin_layout Enumerate
1061 Use the preamble contents you've added as your default template (see
1062 \begin_inset Quotes eld
1066 \begin_inset Quotes erd
1073 ), so that it will be the default preamble for any file you create.
1076 \begin_layout Standard
1077 LyX adds anything in the
1084 dialog to its own built-in preamble.
1085 Before adding your own declarations in the preamble, you should make sure
1086 that LyX doesn't already support what you want to do (remember what we
1087 said about reinventing the wheel?).
1090 make sure your preamble code is correct
1093 LyX doesn't check it.
1096 \begin_layout Subsection
1100 \begin_layout Standard
1101 Here are some examples of what you can add to a preamble, and what they
1105 \begin_layout Subsubsection
1109 \begin_layout Standard
1110 There are two variables under LaTeX that control page position:
1123 Their names should be self-explanatory.
1124 These variables are useful if you think for a moment about computer labels.
1125 Sometimes, the size of a print medium and the area of the medium that you
1126 can actually print on aren't the same.
1142 \begin_layout Standard
1143 The default values for
1155 are both 0 pt.,\InsetSpace ~
1158 the page isn't shifted.
1161 \begin_layout Standard
1162 Unfortunately, some DVI drivers always seem to shift the page.
1163 We have no idea why, or why the sysadmin hasn't fixed such behavior.
1164 If you're using LyX on a system that you don't personally maintain, and
1165 your sysadmin is a doofus,
1178 Suppose you're left and top margins are always 0.5 inches too big.
1179 You can add this to the preamble:
1182 \begin_layout LyX-Code
1190 \begin_layout LyX-Code
1198 \begin_layout Standard
1199 \SpecialChar \ldots{}
1200 and your margins should now be correct.
1203 \begin_layout Subsubsection
1207 \begin_layout Standard
1208 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1209 There's a rather nice package, available at your nearest CTAN archive,
1210 for printing sheets of labels, called
1215 Now, your system may not have this package installed by default.
1216 We leave that up to you to check.
1217 You'll also want to read the documentation for it; we're not going to do
1219 Since this is an example, however, we'll give you an example of how you
1223 \begin_layout Standard
1224 First, make sure you're using the
1229 Next, you need to put the following in your preamble:
1232 \begin_layout LyX-Code
1238 \begin_layout LyX-Code
1244 \begin_layout LyX-Code
1250 \begin_layout LyX-Code
1256 \begin_layout LyX-Code
1262 \begin_layout LyX-Code
1268 \begin_layout LyX-Code
1274 \begin_layout Standard
1275 This sets things up for Avery® label sheets, stock #5360.
1276 You're now ready to print labels, but you'll need to insert LaTeX code,
1277 placing the commands
1289 around each label text.
1290 This and other special features of
1294 are explained in its documentation.
1297 \begin_layout Standard
1298 Someday, someone may write a LyX layout file to support this package directly.
1299 Maybe that someone is you.
1302 \begin_layout Subsubsection
1303 Example #3: Paragraph Indentation
1306 \begin_layout Standard
1307 Americans are trained to indent the first line of
1312 As with all of their other weird quirks, most Americans will whine and
1313 moan until they can have their way and indent the first line of all paragraphs.
1317 \begin_layout Standard
1322 : This was written by an American ---
1326 ! It's my perception of my fellow countrymen.
1327 Tough if you don't like it.
1336 \begin_layout Standard
1337 Of course, this behavior isn't standard typography.
1338 In books, you typically only indent the first line of a paragraph
1342 it follows another one.
1343 The idea behind indenting the first line of a paragraph is to distinguish
1344 neighboring paragraphs from one another.
1345 If there is no previous paragraph, for example, it follows a figure, or
1346 is the first paragraph in a section, then there is no special indentation.
1350 \begin_layout Standard
1351 If you're a typical American, though, you don't care about such esoteric
1352 things; you want your indentation! Add this to the preamble:
1355 \begin_layout LyX-Code
1358 usepackage{indentfirst}
1361 \begin_layout Standard
1362 If your TeX distribution isn't a braindead one, you'll have this package,
1363 and all of your paragraphs will get the indentation you think they deserve.
1366 \begin_layout Subsubsection
1367 Example #4: This Document
1370 \begin_layout Standard
1371 You can also check out the preamble of this document to get an idea of some
1372 of the advanced things you can do.
1373 You'll probably need to make the
1378 reamble\SpecialChar \ldots{}
1381 dialog full-screen to see most of it.
1382 Also, there are more examples and an assortment of LaTeX
1383 \begin_inset Quotes eld
1387 \begin_inset Quotes erd
1390 given in Chapter\InsetSpace ~
1392 \begin_inset LatexCommand \ref{cha:secrets}
1400 \begin_layout Section
1401 LyX and LaTeX Errors
1404 \begin_layout Standard
1405 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1407 It then uses the log-file from the LaTeX run to do a post-mortem.
1408 As we stated earlier in the chapter, LyX generates two kinds of
1412 files, one of which it uses to locate errors in the document.
1413 If there was an error someplace, LyX will put a box with the word
1414 \begin_inset Quotes eld
1418 \begin_inset Quotes erd
1421 at the appropriate place in the document.
1425 \begin_layout Standard
1426 LyX will occasionally misguess where the error was.
1427 This will typically happen with tables, figures, math, and the preamble.
1432 It will also display a message alerting you to the fact that there were
1436 \begin_layout Standard
1437 You can navigate through the errors by using
1453 \begin_inset Quotes eld
1457 \begin_inset Quotes erd
1460 the error-boxes and view the error message LaTeX produced by clicking on
1464 \begin_layout Standard
1465 Some folks also like to look at the log file directly, accessible from
1471 ocument\SpecialChar \menuseparator
1481 There are some fairly common error messages and warnings.
1482 We'll cover those here.
1483 You should look at a good LaTeX book for a complete listing.
1486 \begin_layout Itemize
1487 \begin_inset Quotes eld
1495 \begin_inset Quotes eld
1502 \begin_layout Standard
1503 Anything beginning with these word is a warning message for the purpose
1505 \begin_inset Quotes eld
1509 \begin_inset Quotes erd
1512 the LaTeX code itself.
1513 You'll get messages like this if you added or changed cross-references
1514 or bibliography entries, in which case, LaTeX is trying to tell you that
1515 you need to make another run.
1518 \begin_layout Standard
1519 You can by-and-large ignore these.
1523 \begin_layout Itemize
1524 \begin_inset Quotes eld
1532 \begin_inset Quotes erd
1539 \begin_layout Standard
1540 Another warning message, this time about fonts which LaTeX couldn't find.
1541 The rest of the message will often say something about a replacement font
1545 \begin_layout Standard
1546 You can safely ignore these.
1550 \begin_layout Itemize
1551 \begin_inset Quotes eld
1561 \begin_inset Quotes erd
1568 \begin_layout Standard
1574 They are warning you about lines that were too long and run past the right
1576 Almost always, this is unnoticeable in the final output.
1577 Or, only one or two characters extend past the margin.
1578 LaTeX seems to generate at least one of these messages for just about any
1582 \begin_layout Standard
1583 You can ignore these stupid messages.
1584 Your eyes will tell you if there's a problem with something that's too
1585 wide; just look at the output.
1589 \begin_layout Itemize
1590 \begin_inset Quotes eld
1600 \begin_inset Quotes erd
1607 \begin_layout Standard
1608 Not quite as common as its cousin.
1609 LaTeX seems to like to print lines that are a bit too wide as opposed to
1610 ones that are a bit too narrow.
1611 We have no idea why.
1614 \begin_layout Standard
1615 You can ignore these, too.
1619 \begin_layout Itemize
1620 \begin_inset Quotes eld
1630 \begin_inset Quotes erd
1634 \begin_inset Quotes eld
1644 \begin_inset Quotes erd
1651 \begin_layout Standard
1652 Warnings about troubles breaking the page.
1653 Once again, just look at the output.
1654 Your eyes will tell you where something has gone wrong.
1658 \begin_layout Itemize
1659 \begin_inset Quotes eld
1665 \begin_inset Quotes els
1669 \begin_inset Quotes ers
1675 \begin_inset Quotes erd
1682 \begin_layout Standard
1684 \begin_inset Quotes eld
1688 \begin_inset Quotes erd
1691 isn't installed on this system.
1692 This usually appears because some package your document needs isn't installed.
1693 If you didn't touch the preamble or didn't use the
1699 command, then one of the packages LyX tried to load is missing.
1705 elp\SpecialChar \menuseparator
1712 , to get a list of packages that LyX knows about.
1713 This file is updated whenever you reconfigure LyX (using
1720 \SpecialChar \menuseparator
1725 ) and tells you which packages have been detected and what they do.
1728 \begin_layout Standard
1739 command, and the package in question isn't installed, you'll need to install
1744 \begin_layout Itemize
1745 \begin_inset Quotes eld
1750 LaTeX Error: Unknown option
1753 \begin_inset Quotes erd
1760 \begin_layout Standard
1761 Error messages beginning with this are trying to tell you that you specified
1762 a bad or undefined option to a package.
1763 Check the package's documentation.
1767 \begin_layout Itemize
1768 \begin_inset Quotes eld
1773 Undefined control sequence
1776 \begin_inset Quotes erd
1783 \begin_layout Standard
1784 If you've inserted LaTeX code into your document, but made a typo, you'll
1786 You may have forgotten to load a package.
1787 In any case, this error message usually means that you used an undefined
1792 \begin_layout Standard
1793 There are other error and warning messages.
1794 Some are self-explanatory.
1795 These are usually LaTeX messages.
1796 Others are downright cryptic.
1797 These are actually TeX error messages, and we really have
1801 what they mean or how to decipher them.
1804 \begin_layout Standard
1805 There's a general sequence you should follow if you get error messages:
1808 \begin_layout Enumerate
1809 Look at the LaTeX code you inserted for typos.
1812 \begin_layout Enumerate
1813 If there are no typos, check and see that you used the command(s) correctly.
1816 \begin_layout Enumerate
1817 If you get a bunch of error boxes piled up at the very top of the document,
1818 it means that there are errors in the preamble.
1819 Start debugging your preamble.
1822 \begin_layout Enumerate
1823 If you didn't add anything to the preamble and didn't add any LaTeX code
1824 to the document, the first suspect is your LaTeX distribution itself.
1825 Check for missing packages and install them.
1828 \begin_layout Enumerate
1829 Okay, so there are no missing packages.
1830 Did you use any of the fine-tuning options in LyX? Specifically, did you
1835 any of them, like trying to manually insert lots of
1837 Protected\InsetSpace ~
1848 s? Did you try to kludge something together with these instead of using
1849 the appropriate paragraph environment?
1852 \begin_layout Enumerate
1853 All right, you didn't use any of the fine-tuning options, you played by
1855 Did you try to pull a fancy maneuver? Did you do something funky inside
1856 a table or an equation, like inserting a graphic into a table cell?
1859 \begin_layout Enumerate
1860 Do you have long sections of text where LaTeX cannot find a place to break
1861 a line? By default, LaTeX is rather strict about how much extra inter-word
1862 spacing it will add in order to break a line.
1863 Preferrably, you should rework the paragraph to avoid the problem.
1864 If this isn't an option, you can wrap your text in
1870 to make LaTeX's line breaking more, well, sloppy.
1873 \begin_layout Enumerate
1874 Did you go overboard with the nesting? LyX (currently) doesn't check to
1875 make sure you're in the limits for nesting environments.
1876 If you nested a bunch of environments to the
1877 \begin_inset Formula $17^{\mathrm{th}}$
1880 level, that's the problem.
1883 \begin_layout Enumerate
1884 Okay, you didn't get any error messages, but your output looks whacked.
1885 If you have a table or figure that's too wide or long for the page, you
1890 \begin_layout Enumerate
1891 rescale the figure so it fits.
1894 \begin_layout Enumerate
1895 trim down the table so it fits.
1898 \begin_layout Standard
1899 If something else is wrong with the output, and you didn't try to pull anything
1900 fancy or kludge the fine-tuning options, we're not sure what's wrong.
1904 \begin_layout Standard
1905 If all this doesn't help --- well, then
1909 you might have found a bug in LyX\SpecialChar \ldots{}
1913 \begin_layout Chapter
1917 \begin_layout Section
1918 Preparing a Bibliography with BibTeX
1919 \begin_inset LatexCommand \label{sec:Preparing-a-Bibliography}
1926 \begin_layout Standard
1933 Jürgen Spitzmüller
1936 \begin_layout Standard
1937 \begin_inset VSpace bigskip
1943 \begin_layout Standard
1945 STOP! If you don't know what BibTeX is, or have a reasonably good idea of
1951 setting up your own bibliographic databases),
1955 , do not walk, to your nearest copy of the 2nd edition of Lamport's
1957 LaTeX: A Document Preparation System
1959 , particularly Appendix B.
1960 The rest of this discussion assumes you have created a correct bibliography
1961 file, that you have all relevant environment variables set correctly (esp.
1974 ), and that if sufficiently desperate, you could create and
1975 \begin_inset Quotes eld
1979 \begin_inset Quotes erd
1982 a LaTeX file with a BibTeX database.
1986 \begin_layout Standard
1987 For those who don't know what BibTeX is, it is a system for creating a large
1988 database of your most used journal references.
1989 For all future articles you write, you only need to include this standard
1990 database and reference the appropriate key to each reference.
1991 Even if you write only a few papers with handful of references each, it
1992 is well worth your time to examine BibTeX and decide whether it will be
1996 \begin_layout Standard
1997 To use BibTeX with LyX, first read the
2001 where it describes how to insert citations.
2002 The basic mechanism for inserting BibTeX references is the same.
2003 Then, at the very end of your document, select
2005 Insert\SpecialChar \menuseparator
2010 TOC\SpecialChar \menuseparator
2014 In the resulting dialog, fill out the dialog boxes as follows:
2017 \begin_layout Description
2018 Database: enter the name of your
2031 For searching multiple
2035 files, just enter them in the desired order, separated by commas.
2039 \begin_layout Description
2040 Style: enter the name of your BibTeX style file *without* the
2045 The default style is
2049 (which should be included in your LaTeX distribution, so you don't have
2050 to worry about creating it).
2053 \begin_layout Standard
2054 For each citation, assuming that the source is in the
2063 nsert\SpecialChar \menuseparator
2070 at the correct location in the text, and enter the appropriate reference
2072 Nothing else is required; when invoking
2077 iew\SpecialChar \menuseparator
2084 , for example, you should see that BibTex and LaTeX are invoked as needed,
2085 including multiple invocations of LaTeX.
2089 \begin_layout Subsection
2090 Alternative Citation Styles
2093 \begin_layout Standard
2094 Standard BibTeX uses numbers (e.\InsetSpace \thinspace{}
2095 g.\InsetSpace \space{}
2097 \begin_inset Quotes eld
2101 \begin_inset Quotes erd
2104 ) to refer to a cited work.
2105 However, in many scientific disciplines, other citation styles are in use.
2106 The most common one is the author-year style (e.\InsetSpace \thinspace{}
2107 g.\InsetSpace \space{}
2109 \begin_inset Quotes eld
2113 \begin_inset Quotes erd
2117 LyX supports two packages that provide this style,
2126 Both packages have their own pros and cons, which cannot be listed in detail.
2127 If you only want to have simple author-year (or author-numerical) style
2128 or if you want to use one of the countless style files for natbib, than
2133 package is probably your choice.
2134 If you need special features like short title references, ibidem etc., you
2135 might consider the fairly new
2142 \begin_layout Standard
2143 The handling of both packages in LyX is basically the same.
2149 ocument\SpecialChar \menuseparator
2160 pane (with the xforms frontend: the
2174 With both packages, you will get some extra features in the citation dialog
2175 and you can select the style of the reference (
2176 \begin_inset Quotes eld
2180 \begin_inset Quotes erd
2184 \begin_inset Quotes eld
2188 \begin_inset Quotes erd
2192 \begin_inset Quotes eld
2196 \begin_inset Quotes erd
2200 \begin_inset Quotes eld
2204 \begin_inset Quotes erd
2208 Note that both packages need specifically designed style files (they both
2209 ship their own, while there are lots of additional style files and even
2210 an interactive style file builder
2214 \begin_layout Standard
2216 \begin_inset LatexCommand \url{ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/}
2232 \begin_layout Subsection
2233 Sectionated Bibliographies
2234 \begin_inset LatexCommand \label{sub:Sectionated-Bibliographies}
2241 \begin_layout Standard
2242 Sometimes you might need to divide your bibliography into several sections.
2243 If you are, for instance, a historian, the possibility to separate sources
2244 and scientific works is most likely a
2245 \begin_inset Quotes eld
2249 \begin_inset Quotes erd
2253 Unfortunately, BibTeX itself does not allow you to do this.
2254 The good news is, though: With the help of some LaTeX packages, BibTeX
2255 can be extended to fit your historical needs.
2258 \begin_layout Standard
2259 As of version 1.4, LyX provides native support for one of these packages,
2268 \begin_layout Standard
2270 \begin_inset LatexCommand \url{ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/}
2279 The advantage of this package (compared to other packages like
2283 ) is that you don't need to define new citation commands.
2284 Instead, you need to prepare different bibliographic databases which include
2285 the entries for the different sections of the bibliography.
2286 For example: If you want to divide your bibliography into the sections
2288 \begin_inset Quotes eld
2292 \begin_inset Quotes erd
2296 \begin_inset Quotes eld
2300 \begin_inset Quotes erd
2303 , you first need to create two bibliographic databases, e.\InsetSpace \thinspace{}
2304 g.\InsetSpace \space{}
2317 \begin_layout Standard
2323 ocument\SpecialChar \menuseparator
2334 pane (with the xforms frontend: the
2341 Sectionated\InsetSpace ~
2345 Now you can insert multiple BibTeX references (as described in section\InsetSpace ~
2347 \begin_inset LatexCommand \ref{sec:Preparing-a-Bibliography}
2351 ), one for each section of your bibliography.
2352 Returning to our example: Insert a BibTeX reference for the database
2356 and a second one for the database
2361 You are free to use the same or different styles for each section.
2362 Additionally, you can chose if the bibliography section should contain
2364 \begin_inset Quotes eld
2367 all cited references
2368 \begin_inset Quotes erd
2371 of the specified database(s) (which is the default),
2372 \begin_inset Quotes eld
2375 all uncited references
2376 \begin_inset Quotes erd
2380 \begin_inset Quotes eld
2384 \begin_inset Quotes erd
2388 This might be useful if you would like to separate your bibliography into
2390 \begin_inset Quotes eld
2394 \begin_inset Quotes erd
2398 \begin_inset Quotes eld
2402 \begin_inset Quotes erd
2406 \begin_inset Quotes eld
2410 \begin_inset Quotes erd
2414 The titles for the sections can be added as ordinary sections or subsections.
2419 removes the bibliography title, you have manually re-add that, too (as
2420 a chapter* or section*, for instance).
2423 \begin_layout Subsection
2424 Multiple Bibliographies
2427 \begin_layout Standard
2428 Multiple bibliographies, e.\InsetSpace \thinspace{}
2429 g.\InsetSpace \space{}
2430 a bibliography for each section or chapter of
2431 the document, are not supported by BibTeX itself.
2436 package, which is used for the creation of sectionated bibliographies in
2437 LyX (cf.\InsetSpace ~
2438 section\InsetSpace ~
2440 \begin_inset LatexCommand \ref{sub:Sectionated-Bibliographies}
2444 ), provides an easy way to solve this task, if you are willing to use some
2445 LaTeX-Code (ERT, cf.\InsetSpace ~
2446 section\InsetSpace ~
2448 \begin_inset LatexCommand \ref{sec:Inserting-LaTeX-Code}
2456 \begin_layout Standard
2457 An alternative approach is to use the
2465 package, respectively.
2473 \begin_layout Standard
2479 ocument\SpecialChar \menuseparator
2490 pane (with the xforms frontend: the
2497 Sectionated\InsetSpace ~
2501 In the document, you have to enclose the sections, which shall contain
2502 their own bibliography (including the BibTeX reference itself), between
2515 (those commands have to be inserted as ERT).
2516 The bibliography will contain all references which have been cited in the
2518 N.\InsetSpace \thinspace{}
2519 B.: If you are using this approach, then
2523 citation reference has to be inside some btUnit.
2524 Also, the btUnits cannot be nested.
2527 \begin_layout Section
2531 \begin_layout Standard
2532 A good index is one of the hardest things to make in a lengthy document,
2533 but LyX helps make things a bit simpler by interfacing to the
2537 program which is found in most recent LaTeX distributions.
2541 \begin_layout Standard
2559 Outputs\SpecialChar \menuseparator
2560 LaT\SpecialChar \textcompwordmark{}
2569 section of the preferences dialog, however, you can customize the index
2570 command, if you prefer an alternative program like
2591 Inserting an index and marking words to include in it works much the same
2592 way as preparing a bibliography as mentioned in the last section.
2595 \begin_layout Standard
2596 First, go to the end of your file and select
2601 nsert\SpecialChar \menuseparator
2612 C\SpecialChar \menuseparator
2625 Then, for each word you would like to include in the index, go to the end
2626 of that word and click on
2631 nsert\SpecialChar \menuseparator
2644 This will insert a tag showing the word as it will appear in the index.
2645 That's all there is to it; LyX will automatically call
2649 for you and create the index itself.
2650 The text in the dialog available from right-clicking on the index button
2651 accepts LaTeX, so you'll need to be careful to avoid using any special
2653 On the positive side, you can use the advanced options - have a look at
2654 the documentation which comes with your LaTeX distribution to find out
2655 how to do things like
2656 \begin_inset Quotes eld
2660 \begin_inset Quotes erd
2666 \begin_layout Standard
2667 Be careful not to put spaces between the word in the text and the index
2668 marker; apparently the wrong page number can be produced if this happens.
2671 \begin_layout Section
2675 \begin_layout Subsection
2679 \begin_layout Standard
2680 When you are working on a large file with many sections, it is often convenient
2681 to break up the document into several files, or perhaps you have something
2682 where a table may change from time to time, but the preceding text does
2684 In these cases, you should seriously consider using multipart documents.
2685 For example, scientific papers often have five major sections: the introduction
2686 , observations, results, discussion, and conclusion.
2687 Each of these could be its own separate LyX file, with one
2688 \begin_inset Quotes eld
2692 \begin_inset Quotes erd
2695 file which contains the title, authors, abstract, references, etc., plus
2696 the five included files.
2697 It is important to note that each of these files is a full LyX file which
2698 can be formatted and printed on its own, as well as included in a master
2700 Each of these files must have the same document class, however--- don't
2701 attempt to mix book classes with article classes.
2702 You may also include LaTeX files; however, these files must not have their
2708 everything up to and including the
2720 line must be deleted) or else errors will be generated when you try to
2724 \begin_layout Standard
2725 LyX allows you to include files quite easily with
2730 nsert\SpecialChar \menuseparator
2739 When you click on this selection a small box is inserted into the file
2740 at the current cursor location.
2741 Clicking on the box raises a dialog which allows you to select the file
2742 to be included, and the method of its inclusion.
2746 \begin_layout Standard
2747 The file selection box should by now be obvious.
2748 The three inclusion methods are
2749 \begin_inset Quotes eld
2753 \begin_inset Quotes erd
2757 \begin_inset Quotes eld
2761 \begin_inset Quotes erd
2765 \begin_inset Quotes eld
2769 \begin_inset Quotes erd
2773 The difference between
2774 \begin_inset Quotes eld
2778 \begin_inset Quotes erd
2782 \begin_inset Quotes eld
2786 \begin_inset Quotes erd
2789 is really only meaningful to LaTeXperts, but the practical difference is
2790 that files which are
2791 \begin_inset Quotes eld
2795 \begin_inset Quotes erd
2798 are typeset beginning on a new page, while files which are
2799 \begin_inset Quotes eld
2803 \begin_inset Quotes erd
2806 are typeset starting on the current page.
2807 Perhaps the labeling in LyX will be changed someday to reflect this.
2810 \begin_layout Standard
2811 Generally, the master file is converted into a full LaTeX file before typesettin
2812 g, while the included files are converted to LaTeX files which do not have
2813 all the preamble information.
2823 button prevents this conversion.
2826 \begin_layout Standard
2828 \begin_inset Quotes eld
2832 \begin_inset Quotes erd
2835 included file allows you to include a file typeset exactly as it appears
2836 in the file, i.e.\InsetSpace ~
2837 verbatim mode, with the characters set in a fixed-width
2839 Normally, spaces in this file are invisible, though two consecutive spaces
2840 are conserved, unlike LyX's normal treatment of spaces.
2841 However, setting the
2851 checkbox typesets a mark to unambiguously define the presence of a space.
2857 \begin_layout Subsection
2858 Cross-References Between Files
2861 \begin_layout Standard
2862 It is possible to set up cross-references between the different files.
2863 First, open all the files in question: let's call them A and B in a two
2864 file example, where B is included in A.
2865 Let's say you insert a label in A, then want to reference it in B.
2866 Open the cross-reference dialog in whilst in document B, and you can select
2868 \begin_inset Quotes eld
2872 \begin_inset Quotes erd
2878 \begin_layout Section
2882 \begin_layout Standard
2887 is needed by LyX to be able to output algorithm floats.
2888 These are useful in placing short algorithms across page breaks and support
2889 an index of algorithms too.
2892 \begin_layout Section
2896 \begin_layout Standard
2901 is used by LyX when you select ``subfigure'' in the graphics dialog and
2902 enter the subfigure caption.
2903 Several figures marked in this way can be packed into a single float with
2904 individual sub-captions.
2907 \begin_layout Section
2908 Fancy Headers and Footers
2911 \begin_layout Standard
2912 The default page layout is rather plain; for an article document class,
2913 all you get is a centered page number at the bottom of the page.
2914 This document is the book class, so it appears to be a bit fancier, but
2915 to really put on a show, you need to set the document page style to
2916 \begin_inset Quotes eld
2920 \begin_inset Quotes erd
2923 , as mentioned in the
2929 This section describes the LaTeX codes you need to insert in your LaTeX
2930 preamble or the text in order to get the desired effects.
2933 \begin_layout Standard
2934 The page header is divided into three fields, not surprisingly labeled
2935 \begin_inset Quotes eld
2939 \begin_inset Quotes erd
2943 \begin_inset Quotes eld
2947 \begin_inset Quotes erd
2951 \begin_inset Quotes eld
2955 \begin_inset Quotes erd
2959 The footer is also divided into these three fields.
2960 The LaTeX commands to set these fields in the simplest manner are
2985 Suppose you wish to put your name in the upper left hand corner of each
2987 Simply insert the following command in the preamble:
2990 \begin_layout Standard
2999 \begin_layout Standard
3000 You will now see your name in the upper left.
3001 If a field has a default entry that you would like to get rid of (often
3002 the page number appears in the central footer, simply include a command
3003 with a blank argument, e.g.
3006 \begin_layout Standard
3014 \begin_layout Standard
3015 Let's get really fancy: lets put the section number with the word
3016 \begin_inset Quotes eld
3020 \begin_inset Quotes erd
3024 Section 3) in the upper left, the page number (e.g.
3025 Page 4) in the upper right, your name in the lower left, and the date in
3027 The following commands should now appear in the preamble:
3030 \begin_layout Standard
3040 \begin_layout Standard
3048 \begin_layout Standard
3058 \begin_layout Standard
3067 \begin_layout Standard
3075 \begin_layout Standard
3085 \begin_layout Standard
3098 access LaTeX's section and page counters, and so print out the current
3099 section and page numbers.
3106 simply prints out today's date.
3109 \begin_layout Standard
3110 The thicknesses of the horizontal rules drawn beneath the header and above
3111 the footer can also be modified.
3112 If you don't want one of the headers, set its thickness to 0.
3113 The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3114 Use the commands, e.g.
3121 headrulewidth}{0.4pt}
3129 footrulewidth}{0.4pt}
3131 to set the thicknesses.
3134 \begin_layout Standard
3135 You can switch the header/footer settings on and off for individual pages
3140 thispagestyle{empty}
3146 thispagestyle{plain}
3152 thispagestyle{fancy}
3155 Simply insert them in the text on the page you want changed and mark them
3157 In fact, title pages are marked as plain by default, while following pages
3158 are marked fancy when using the global fancy setting.
3161 \begin_layout Standard
3162 There are more complex commands which will let you insert things in the
3163 upper left on odd numbered pages, etc., but I will refer you to the
3167 package documentation for more descriptions.
3168 For example, if you have a teTeX installation, look for
3170 /usr/share/texmf/doc/latex/fancyhdr/\SpecialChar \-
3176 \begin_layout Standard
3177 As a final example, it is possible to include an Encapsulated PostScript®
3178 file in the header or footer.
3179 Suppose you want to put a company logo in the upper lefthand corner.
3180 You might try something like
3183 \begin_layout Standard
3192 includegraphics{logo.eps}}}
3195 \begin_layout Standard
3197 (you may need to preface this with
3201 usepackage{graphics}
3203 if you don't include EPS files elsewhere in your document).
3206 \begin_layout Section
3210 \begin_layout Standard
3211 LaTeX provides a mechanism to produce essentially a page within a page,
3213 Within a minipage, all the usual rules of indentation, line wrapping, etc.\InsetSpace ~
3215 LyX also provides some of the minipage capability.
3218 \begin_layout Standard
3219 Minipages in LyX have their own collapsable box; insert one via
3224 nsert\SpecialChar \menuseparator
3232 Right-clicking on the box allows you to alter the minipage's width and
3233 alignment within the page.
3234 Warning: if the minipage is too long to fit on a page, it is truncated,
3235 not wrapped onto the next page.
3238 \begin_layout Standard
3239 If you place two minipages side-by-side, you can use
3244 nsert\SpecialChar \menuseparator
3252 to insert a special instruction known in the LaTeX world as an
3256 to put a maximum amount of space between them; it forces one minipage to
3257 the left edge, the other to the right edge.
3258 The examples below show the difference.
3261 \begin_layout Standard
3262 \begin_inset Box Frameless
3271 height_special "totalheight"
3274 \begin_layout Standard
3275 This is a minipage which does not use hfill.
3276 This is the second sentence of a minipage which does not use hfill.
3284 \begin_layout Standard
3285 \begin_inset Box Frameless
3294 height_special "totalheight"
3297 \begin_layout Standard
3298 This is a second minipage which does not use hfill.
3299 This is the second sentence of a second minipage which does not use hfill.
3307 \begin_layout Standard
3308 \begin_inset VSpace medskip
3314 \begin_layout Standard
3315 Here is some normal text to separate the two examples.
3318 \begin_layout Standard
3319 \begin_inset VSpace medskip
3325 \begin_layout Standard
3326 \begin_inset Box Frameless
3335 height_special "totalheight"
3338 \begin_layout Standard
3339 This is a minipage which does use hfill.
3340 This is the second sentence of a minipage which does use hfill.
3348 \begin_inset Box Frameless
3357 height_special "totalheight"
3360 \begin_layout Standard
3361 This is a second minipage which does use hfill.
3362 This is the second sentence of a second minipage which does use hfill.
3370 \begin_layout Section
3371 Wrapping Text Around Figures
3372 \begin_inset LatexCommand \label{sec:floatflt}
3379 \begin_layout Standard
3380 \begin_inset Wrap figure
3385 \begin_layout Standard
3386 \begin_inset Graphics
3397 \begin_layout Caption
3398 This is a wrapped figure, and this is the brilliant caption that describes
3407 \begin_layout Standard
3408 A very frequently asked question is whether text can be made to
3409 \begin_inset Quotes eld
3413 \begin_inset Quotes erd
3416 around figures so that a figure occupies some fraction of the column width
3417 and text fills the rest.
3418 If you have the LaTeX package
3422 installed (you can find out about it in the
3426 manual) you can do this.
3429 \begin_layout Standard
3430 At the right is a figure of a mobius strip---you should have already seen
3436 To wrap the text like this insert a wrap box via
3441 nsert\SpecialChar \menuseparator
3446 ts\SpecialChar \menuseparator
3452 \begin_layout Standard
3453 Note: this package is very fragile! For example, having a figure too close
3454 to the bottom of the page will mess things up, as will having two figures
3456 Use this package sparingly and do read the documentation that came with
3457 it (which will also tell you how to wrap text around tables).
3460 \begin_layout Section
3464 \begin_layout Standard
3465 While the standard table layout will suffice in 99% of all tables you generate,
3466 occasionally you will run into one which requires a bit of extra tweaking.
3467 The table dialog which appears on a right-click of a table allows these
3469 It will give you access to some extra column alignment parameters.
3470 A little bit of LaTeX background is useful here: when you set up a table
3471 in LaTeX, each column is given an alignment type.
3472 For example, you would give it
3473 \begin_inset Quotes eld
3481 \begin_inset Quotes erd
3485 \begin_inset Quotes eld
3493 \begin_inset Quotes erd
3497 \begin_inset Quotes eld
3505 \begin_inset Quotes erd
3508 for left-aligned, centered, and right-aligned columns respectively (which
3509 appear as the left/center/right radio buttons in LyX).
3511 \begin_inset Quotes eld
3519 \begin_inset Quotes erd
3522 , which will make a column of a specified width (the width box in LyX),
3523 and will wrap text within that box.
3525 \begin_inset Quotes eld
3533 \begin_inset Quotes erd
3536 (vertical bar) which rather than making a column will make a vertical rule
3537 at that point; this manifests itself in LyX as the
3538 \begin_inset Quotes eld
3542 \begin_inset Quotes erd
3546 Finally, there is a type
3547 \begin_inset Quotes eld
3555 \begin_inset Quotes erd
3558 , which allows you to use whatever is enclosed in the accompanying braces
3559 as the column separator, including a null argument.
3560 The reasons for doing this may not be obvious, but they can be very powerful.
3561 They are best demonstrated by example.
3564 \begin_layout Subsection
3565 Removing Extra Column Space
3568 \begin_layout Standard
3569 Here is a standard table:
3572 \begin_layout Standard
3574 \begin_inset Tabular
3575 <lyxtabular version="3" rows="3" columns="2">
3577 <column alignment="left" valignment="top" width="0pt">
3578 <column alignment="left" valignment="top" leftline="true" width="0pt">
3579 <row bottomline="true">
3580 <cell alignment="left" valignment="top" topline="true" usebox="none">
3583 \begin_layout Standard
3598 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
3601 \begin_layout Standard
3618 <cell alignment="left" valignment="top" topline="true" usebox="none">
3621 \begin_layout Standard
3636 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3639 \begin_layout Standard
3656 <cell alignment="center" valignment="top" topline="true" usebox="none">
3659 \begin_layout Standard
3674 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3677 \begin_layout Standard
3700 \begin_layout Standard
3701 Notice that the horizontal rule extends a bit past the text on both sides.
3702 If you wanted the line to end even with the text, we can put a null separator
3703 on the ends to get rid of the bit of extra space LaTeX adds by default.
3704 Here is the example:
3707 \begin_layout Standard
3709 \begin_inset Tabular
3710 <lyxtabular version="3" rows="3" columns="2">
3712 <column alignment="left" valignment="top" width="0pt" special="@{} l">
3713 <column alignment="left" valignment="top" leftline="true" width="0pt" special="l @{}">
3714 <row bottomline="true">
3715 <cell alignment="left" valignment="top" topline="true" usebox="none">
3718 \begin_layout Standard
3733 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
3736 \begin_layout Standard
3753 <cell alignment="left" valignment="top" topline="true" usebox="none">
3756 \begin_layout Standard
3771 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3774 \begin_layout Standard
3791 <cell alignment="center" valignment="top" topline="true" usebox="none">
3794 \begin_layout Standard
3809 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3812 \begin_layout Standard
3835 \begin_layout Standard
3836 In this case, the column specifier for the left column was set to
3837 \begin_inset Quotes eld
3845 \begin_inset Quotes erd
3848 , while the right column was set to
3849 \begin_inset Quotes eld
3857 \begin_inset Quotes erd
3860 , in order to put the null characters on the edges.
3864 \begin_layout Subsection
3865 Changing the Column Separator Character
3868 \begin_layout Standard
3869 Now suppose you really wanted, for reasons that are completely opaque, to
3871 \begin_inset Formula $\sqrt{\pi}$
3874 with some space around it for the column separator.
3875 Simply turn off the vertical border, then set the right column specifier
3877 \begin_inset Quotes eld
3889 \begin_inset Quotes erd
3893 You could now make a table like this:
3896 \begin_layout Standard
3898 \begin_inset Tabular
3899 <lyxtabular version="3" rows="3" columns="2">
3901 <column alignment="left" valignment="top" width="0pt">
3902 <column alignment="left" valignment="top" width="0in" special="@{~$\sqrt{\pi}$~}l">
3903 <row bottomline="true">
3904 <cell alignment="left" valignment="top" topline="true" usebox="none">
3907 \begin_layout Standard
3922 <cell alignment="left" valignment="top" topline="true" usebox="none">
3925 \begin_layout Standard
3942 <cell alignment="left" valignment="top" topline="true" usebox="none">
3945 \begin_layout Standard
3960 <cell alignment="center" valignment="top" topline="true" usebox="none">
3963 \begin_layout Standard
3980 <cell alignment="center" valignment="top" topline="true" usebox="none">
3983 \begin_layout Standard
3998 <cell alignment="center" valignment="top" topline="true" usebox="none">
4001 \begin_layout Standard
4024 \begin_layout Subsection
4025 Making a Decimal Point Aligned Column
4028 \begin_layout Standard
4029 Okay, that last example was very silly, but here is one that is not.
4030 Suppose you want to make a table that has a column which is aligned on
4032 A standard LaTeX trick to do this is to set the whole number part in a
4033 right-aligned column, use a decimal point for the column separator, then
4034 set the fractional part as a left-aligned column.
4035 A variation on this is to include the decimal point explicitly with the
4036 whole part, then use just a null separator in between.
4037 The latter variation is demonstrated here:
4040 \begin_layout Standard
4042 \begin_inset Tabular
4043 <lyxtabular version="3" rows="5" columns="3">
4045 <column alignment="center" valignment="top" width="0pt">
4046 <column alignment="right" valignment="top" leftline="true" width="0pt">
4047 <column alignment="center" valignment="top" width="0pt" special="@{} l">
4048 <row bottomline="true">
4049 <cell alignment="center" valignment="top" topline="true" usebox="none">
4052 \begin_layout Standard
4067 <cell multicolumn="1" alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
4070 \begin_layout Standard
4085 <cell multicolumn="2" alignment="center" valignment="top" topline="true" usebox="none">
4088 \begin_layout Standard
4096 <cell alignment="center" valignment="top" topline="true" usebox="none">
4099 \begin_layout Standard
4109 \begin_inset Formula $\pi$
4117 <cell alignment="right" valignment="top" topline="true" leftline="true" usebox="none">
4120 \begin_layout Standard
4135 <cell alignment="center" valignment="top" topline="true" usebox="none">
4138 \begin_layout Standard
4155 <cell alignment="center" valignment="top" topline="true" usebox="none">
4158 \begin_layout Standard
4168 \begin_inset Formula $\pi^{\pi}$
4176 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4179 \begin_layout Standard
4194 <cell alignment="center" valignment="top" topline="true" usebox="none">
4197 \begin_layout Standard
4214 <cell alignment="center" valignment="top" topline="true" usebox="none">
4217 \begin_layout Standard
4227 \begin_inset Formula $(\pi^{\pi})^{\pi}$
4235 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4238 \begin_layout Standard
4253 <cell alignment="center" valignment="top" topline="true" usebox="none">
4256 \begin_layout Standard
4264 <cell alignment="center" valignment="top" topline="true" usebox="none">
4267 \begin_layout Standard
4277 \begin_inset Formula $\pi^{\pi^{\pi}}$
4285 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4288 \begin_layout Standard
4303 <cell alignment="center" valignment="top" topline="true" usebox="none">
4306 \begin_layout Standard
4317 \begin_inset Formula $\times10^{18}$
4333 \begin_layout Standard
4334 Though it appears a bit funny in LyX, on paper it will produce what appears
4335 to be a 2-column table in which the right column is aligned on the decimal
4336 point and the header appears to be centered over it.
4339 \begin_layout Standard
4340 Perhaps it is best if I described just what I did: first, create a 3
4341 \begin_inset Formula $\times$
4344 3 table and remove all the borders.
4345 Then re-add a bottom border to the top row, and a right border to the first
4347 Type in the values for the first column and set its alignment to
4369 and set that column's alignment to
4385 \begin_inset Formula $\times10^{18}$
4390 and set the extra column alignment to
4395 Finally type in the word
4399 in the middle column, highlight it and the blank entry to its right, and
4412 \begin_layout Subsection
4413 A Better Decimal-Alignment Solution
4416 \begin_layout Standard
4417 An alternative way to have decimal alignment in tables is through the
4422 Add the following to the LateX preamble:
4425 \begin_layout LyX-Code
4431 \begin_layout LyX-Code
4434 newcolumntype{d}[1]{D{.}{.}{#1}}
4437 \begin_layout Standard
4438 To have a column decimally aligned, enter in the
4440 Special Column Alignment
4446 dialog the following:
4449 \begin_layout LyX-Code
4450 d{number of decimals of the data}
4453 \begin_layout Standard
4454 To create extra column space just increase the number of decimals in
4459 Setting the multicolumn attribute for a single cell makes it insensitive
4460 to the decimal alignment which comes in handy as well.
4461 A drawback of this method is that math mode is not allowed in a column
4462 with decimal alignment except if the multicolumn attribute is set.
4465 \begin_layout Standard
4466 This method offers the same flexibility as the
4471 One could, for example, change the alignment separator, and have different
4472 alignment separators for different columns by defining multiple column
4473 types in the preamble.
4474 The syntax is as follows:
4477 \begin_layout LyX-Code
4478 D{inputsep}{outputsep}{decimal places}
4481 \begin_layout Standard
4482 The interested reader is directed towards the
4486 package documentation for more details.
4489 \begin_layout Section
4490 Itemize Bullet Selection
4491 \begin_inset LatexCommand \label{sec:bullet}
4498 \begin_layout Standard
4504 \begin_layout Subsection
4508 \begin_layout Standard
4509 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
4510 Using this dialog you can easily specify what bullet shape to use at each
4511 level of an itemized list.
4512 These settings are document-wide so you won't be able to specify different
4513 sets of bullets for different paragraphs
4517 \begin_layout Standard
4518 Well, actually you can but you'll have to do it by hand.
4526 \begin_layout Subsection
4530 \begin_layout Standard
4531 Open the dialog by selecting the
4536 ocument\SpecialChar \menuseparator
4543 menu item and then select the
4553 \begin_layout Standard
4554 The dialog provides you with a table of bullet shapes.
4555 A column of buttons on the left of the table provides access to the six
4556 different panels of bullet shapes.
4557 The row of buttons across the top is used to select which bullet depth
4559 A text entry under the table shows the currently selected bullet shape's
4560 LaTeX equivalent and this can be edited if desired.
4561 If you do modify the text you will also need to specify any needed packages
4562 in the LaTeX preamble.
4565 \begin_layout Standard
4566 The six panels are divided up by the packages they require.
4567 The following table shows the mappings from button name to LaTeX packages.
4570 \begin_layout Standard
4572 \begin_inset Tabular
4573 <lyxtabular version="3" rows="7" columns="2">
4575 <column alignment="center" valignment="top" leftline="true" width="0pt">
4576 <column alignment="center" valignment="top" leftline="true" rightline="true" width="0pt">
4577 <row topline="true" bottomline="true">
4578 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4581 \begin_layout Standard
4596 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4599 \begin_layout Standard
4615 <row topline="true">
4616 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4619 \begin_layout Standard
4634 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4637 \begin_layout Standard
4652 <row topline="true">
4653 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4656 \begin_layout Standard
4671 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4674 \begin_layout Standard
4690 <row topline="true">
4691 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4694 \begin_layout Standard
4709 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4712 \begin_layout Standard
4728 <row topline="true">
4729 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4732 \begin_layout Standard
4747 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4750 \begin_layout Standard
4766 <row topline="true">
4767 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4770 \begin_layout Standard
4785 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4788 \begin_layout Standard
4804 <row topline="true" bottomline="true">
4805 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4808 \begin_layout Standard
4823 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4826 \begin_layout Standard
4849 \begin_layout Standard
4850 LyX doesn't stop you using bullets from packages you don't have.
4851 If you get errors from LaTeX when you try to view or print the file then
4852 its likely you are missing a package.
4853 LyX doesn't restrict your use since you may be editing locally and exporting
4857 \begin_layout Subsection
4861 \begin_layout Standard
4862 Select which bullet depth you want to change then select the bullet shape
4868 Any changes will not be visible in LyX, but are visible when viewing the
4869 document using xdvi or ghostview.
4872 \begin_layout Standard
4873 You can reset a bullet shape to the default simply by clicking your right
4874 mouse button on the appropriate bullet depth button.
4877 \begin_layout Standard
4882 want to have multiple sets of paragraphs with different sets of bullets
4883 in each then you're going to have to get your hands dirty.
4884 The itemize bullet selection dialog can help though because it provides
4885 you with the LaTeX code for a wide range of bullet shapes.
4886 To make your own custom paragraphs you have the following options:
4889 \begin_layout Standard
4893 \begin_layout Standard
4909 \begin_layout Standard
4913 \begin_layout Standard
4935 \begin_layout Itemize
4936 Use the LaTeX command
4942 to specify a new bullet shape for a given depth.
4943 You'll also need to save the current bullet shape so you can restore it
4945 In this itemized list the following LaTeX code was used to change the bullet
4946 used for the first depth.
4978 Note that the itemize depth is specified in Roman numerals as part of the
4988 \begin_layout Itemize
4992 \begin_layout Standard
5005 Specify each individual entry by starting each item with the bullet shape
5006 enclosed in square brackets and set as TeX.
5007 For example, this item was started with
5020 \begin_layout Standard
5024 \begin_layout Standard
5040 \begin_layout Standard
5041 You'll also need to revert the labelitem back to its previous setting for
5042 the global bullet shape settings to remain in effect.
5043 The way used here was:
5056 \begin_layout Chapter
5057 Special Document Classes
5060 \begin_layout Section
5064 \begin_layout Standard
5070 \begin_layout Standard
5071 \begin_inset VSpace bigskip
5077 \begin_layout Standard
5079 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
5080 papers to be submitted to American Mathematical Society publications.
5081 The layouts are not tailored to a specific journal, but easily can be.
5082 You should refer to the AMS documentation for specific instructions for
5083 each journal (usually it will entail only changing a single line in the
5085 That documentation is available on the Web at
5086 \begin_inset LatexCommand \url{http://www.ams.org}
5091 \begin_inset LatexCommand \url{ftp://ftp.ams.org/pub/tex/amslatex/}
5095 .These layouts are appropriate, and useful, for any mathematical writing.
5096 There are currently 4 distinct AMS LaTeX layouts:
5099 \begin_layout Enumerate
5100 amsart: The standard AMS-article format.
5101 All results and similar statements are numbered as
5102 \begin_inset Formula $(n.m)$
5105 , where the first number refers to the section, and the second refers to
5106 the total number of results (Theorems, Corollaries, Propositions, Definitions
5107 and Remarks, etc.) in that section.
5108 There are also many (but not all) environments available unnumbered, which
5109 is occasionally needed.
5110 Unnumbered environments indicated by an asterisk at the end.
5113 \begin_layout Enumerate
5114 amsart-seq: Here, numbering for each type of statement is in its own sequence,
5115 with no reference to the section number.
5116 There are also many (but not all) environments available unnumbered, which
5117 is occasionally needed.
5118 Unnumbered environments indicated by an asterisk at the end.
5121 \begin_layout Enumerate
5122 amsart-plain: This one is even more terse, since all the environments are
5126 \begin_layout Enumerate
5127 amsbook: the standard AMS book (really, monograph) format.
5128 Numbering is similar to the amsart layout, except that all numbering is
5130 \begin_inset Formula $(n.m.p)$
5133 , where the first number refers to the chapter, the second to the section,
5134 and the third is the number of the results (Theorems, Corollaries, Propositions
5135 , Definitions and Remarks, etc.) in that section.
5136 There are also many (but not all) environments available unnumbered, which
5137 is occasionally needed.
5138 Unnumbered environments indicated by an asterisk at the end.
5141 \begin_layout Standard
5142 Any AMS LyX file can be converted to either of the numbering schemes by
5143 simply changing the document class in the
5148 ocument\SpecialChar \menuseparator
5159 \begin_layout Subsection
5160 What these layouts provide
5163 \begin_layout Standard
5164 There is a long list of included environments provided by these layouts.
5165 Most mathematical papers or books will set as special statements most of
5166 these environments, in AMS-LaTeX there is an opportunity to define an unlimited
5167 variety of such declarations.
5168 However, the AMS recommends the environments that are available in LyX.
5169 The list of environments (not counting the standard environments such as
5172 sections, bibliography, title, author, date
5177 \begin_layout Description
5178 Theorem This is typically used for the statements of major results.
5180 \begin_inset Quotes eld
5188 \begin_inset Quotes erd
5191 appears in bold type, along with an automatically-determined number (an
5196 , is also available).
5197 The text is italicized.
5200 \begin_layout Description
5201 Corollary This is used for statements which follow fairly directly from
5202 previous statements.
5203 Again, these can be major results.
5211 \begin_layout Description
5212 Lemma These are smaller results needed to prove other statements.
5215 \begin_layout Description
5216 Proposition These are less major results which (hopefully) add to the general
5217 theory being discussed.
5220 \begin_layout Description
5221 Conjecture These are statements provided without justification, which the
5222 author does not know how to prove, but which seem to be true (to the author,
5226 \begin_layout Description
5227 Criterion A required condition.
5230 \begin_layout Description
5231 Algorithm A general procedure to be used.
5234 \begin_layout Description
5235 Axiom This is a property or statement taken as true within the system being
5239 \begin_layout Description
5240 Definition Guess what this is for.
5241 The font, both on-screen and in the output, is different for this environment
5242 than for the previous ones.
5244 \begin_inset Quotes eld
5248 \begin_inset Quotes erd
5251 ) is still set in boldface, along with the number, if any, but the rest
5255 \begin_layout Description
5256 Example Typeset similarly to Definition.
5259 \begin_layout Description
5263 \begin_layout Description
5267 \begin_layout Description
5271 \begin_layout Description
5272 Remark This environment is also a new type of theorem.
5273 This is set with the word Remark in italics, and the rest upright.
5276 \begin_layout Description
5277 Note Set similarly to the Remark environment.
5280 \begin_layout Description
5284 \begin_layout Description
5288 \begin_layout Description
5292 \begin_layout Description
5296 \begin_layout Description
5297 Case Generally, these are used to break up long arguments, using specific
5298 instances of some condition.
5299 The numbering scheme for cases is on its own, not together with other numbered
5304 \begin_layout Description
5308 \begin_layout Description
5312 \begin_layout Description
5314 \begin_inset Quotes eld
5322 \begin_inset Quotes erd
5325 is set in italics, but the rest is set upright.
5326 At the end of this environment (other environments can be nested within
5327 this one, of course) a QED symbol (usually a square, but it can vary with
5328 different styles) is placed.
5331 \begin_layout Description
5332 Address This should be the author's permanent address.
5335 \begin_layout Description
5336 Current\InsetSpace ~
5337 Address This should be the author's temporary address at the time
5338 of submission, if different from the Address.
5341 \begin_layout Description
5342 Email Author's e-mail address
5345 \begin_layout Description
5346 URL Author's Web address, if desired.
5349 \begin_layout Description
5350 Keywords Key words or phrases used to identify specific topics discussed
5354 \begin_layout Description
5355 Subjectclass These refer to the AMS Subject Classifications, published and
5358 Mathematical Reviews
5361 These are also available online at the AMS cites listed above.
5364 \begin_layout Description
5368 \begin_layout Description
5372 \begin_layout Description
5376 \begin_layout Standard
5377 In addition, these environments automatically provide the AMS LaTeX and
5379 They need to be available on your system in order to use these environments.
5382 \begin_layout Section
5386 \begin_layout Standard
5391 can be used to type letters according to German conventions.
5392 A template file is included in
5394 .../lyx/share/templates
5396 for you to use as a starting point.
5399 \begin_layout Section
5403 \begin_layout Standard
5408 provides an alternative to the standard
5413 It provides similar functionality, but you might prefer this layout with
5414 sans serif sections, headings, and more.
5417 \begin_layout Section
5421 \begin_layout Standard
5427 \begin_layout Subsection
5431 \begin_layout Standard
5432 This section describes how LyX can be used to write articles for submission
5433 to the scientific journal
5435 Astronomy and Astrophysics
5438 \begin_inset LatexCommand \url[www.edpsciences.fr/aa/]{http://www.edpsciences.fr/aa/}
5450 Version 5.01 of the document class
5455 This package can be downloaded from the ftp site
5458 \begin_layout Standard
5459 \begin_inset VSpace medskip
5465 \begin_layout Standard
5467 \begin_inset LatexCommand \url{ftp://ftp.edpsciences.org/pub/aa/readme.html}
5474 \begin_layout Standard
5475 \begin_inset VSpace medskip
5481 \begin_layout Standard
5482 A manual comes together with that package, and this text is not meant to
5483 replace the original manual but merely a short guide how to realize the
5484 correct form of your paper.
5488 \begin_layout Standard
5489 Please note that the publisher of the journal was changed from Springer
5490 to EDP Sciences starting January 1, 2001.
5491 That change implicated also some slight changes of the style files, namely
5492 the removal of the thesaurus command.
5493 The LyX class aa supports the newest version of these style files, V 5.01.
5494 If you have an older version installed, please upgrade.
5495 For compatibility, the old (version 4) layout has been kept as
5500 Please refer to the comments in
5502 LyXDir/layouts/aapaper.layout
5507 \begin_layout Subsection
5511 \begin_layout Standard
5512 It is recommended you start from the example template distributed with LyX.
5513 If you are not using a template, note the following settings:
5516 \begin_layout Itemize
5526 ocument\SpecialChar \menuseparator
5533 dialog (OK, that one was obvious).
5536 \begin_layout Itemize
5537 Don't change the option
5547 The whole layout is done by the macros, you shouldn't change anything.
5550 \begin_layout Subsection
5554 \begin_layout Standard
5555 First thing to enter is the header information.
5556 It consists of seven entries, of which some are optional.
5560 \begin_layout Itemize
5568 \begin_layout Itemize
5576 \begin_layout Itemize
5584 \begin_layout Itemize
5592 \begin_layout Itemize
5597 : [optional] if more than one author: whom to contact for offprint requests.
5600 \begin_layout Itemize
5605 : [optional] mail address for contacts.
5608 \begin_layout Itemize
5616 Received: <date>; Accepted <date>
5619 \begin_layout Standard
5620 There is no need to issue the
5626 command, this is done automatically by LyX when the header is finished.
5627 Although the order of the single header entries doesn't matter it is advised
5628 to keep the above sequence, just to get the best optics and meets the layout
5629 of the real document.
5632 \begin_layout Standard
5633 If you want to place footnotes in the header block, e.g.
5637 \begin_layout Standard
5646 to state your present address, just use the standard footnote via
5651 nsert\SpecialChar \menuseparator
5659 LyX will automagically use the term
5668 \begin_layout Standard
5669 In addition to these topics, the macros use three additional LaTeX commands
5670 that have no counterpart in LyX:
5673 \begin_layout Itemize
5680 to separate different names for more than one author and institute, respectivel
5684 \begin_layout Itemize
5691 to mark corresponding author/institute pairs.
5692 The institutes are numbered sequentially as they appear in the
5696 field, so you have to put a marker to each author.
5699 \begin_layout Itemize
5706 to supply an email address for fast contact.
5709 \begin_layout Standard
5710 In all cases, the appropriate command has to be entered in LyX an marked
5716 \begin_layout Subsection
5720 \begin_layout Standard
5721 The abstract should immediately follow the header block.
5722 With version 5 the abstract environment was changed to a command, and there
5723 is now a resctriction to only one paragraph.
5724 In addition, it should contain an entry with the keywords.
5725 This is not yet implemented for LyX, therefore you have to enter the LaTeX
5732 by hand and mark it as LaTeX code.
5733 Refer to the example paper.
5736 \begin_layout Subsection
5737 Supported environments
5740 \begin_layout Standard
5741 The A&A paper layout supports the following environments for structuring
5745 \begin_layout Itemize
5751 \begin_layout Itemize
5757 \begin_layout Itemize
5763 \begin_layout Itemize
5769 \begin_layout Itemize
5775 \begin_layout Itemize
5781 \begin_layout Itemize
5787 \begin_layout Itemize
5793 \begin_layout Itemize
5799 \begin_layout Itemize
5805 \begin_layout Itemize
5811 \begin_layout Itemize
5817 \begin_layout Subsection
5818 Commands not supported by LyX
5821 \begin_layout Standard
5822 Some commands are not yet supported by the
5827 Some have already been mentioned.
5828 For the sake of completeness, they are listed all together here:
5831 \begin_layout Itemize
5839 \begin_layout Itemize
5847 \begin_layout Itemize
5855 \begin_layout Itemize
5863 \begin_layout Itemize
5871 \begin_layout Itemize
5879 \begin_layout Itemize
5887 \begin_layout Itemize
5895 \begin_layout Standard
5896 If you want to use any of these commands, you have to enter them yourself.
5899 Do not forget to mark them as LaTeX code!
5902 \begin_layout Subsection
5903 Figure and Table Floats
5906 \begin_layout Standard
5907 LyX provides support for the necessary float environments
5909 figure, figure*, table
5915 , therefore we won't tell much about it here.
5922 Just remember that tables should be left-aligned.
5923 For that, select the table and change the alignment in
5928 dit\SpecialChar \menuseparator
5933 aragraph\InsetSpace ~
5937 \begin_layout Standard
5942 only one special thing: the figures with caption besides the figure.
5943 To create such a figure, you have to do the following:
5946 \begin_layout Enumerate
5947 Create a wide figure float:
5952 nsert\SpecialChar \menuseparator
5957 t\SpecialChar \menuseparator
5960 , then right click in the figure and select
5972 \begin_layout Enumerate
5973 Enter your caption text.
5976 \begin_layout Enumerate
5981 to move the cursor above the caption.
5984 \begin_layout Enumerate
5988 \begin_layout Enumerate
5989 Position the cursor behind the figure and insert a horizontal fill:
5994 nsert\SpecialChar \menuseparator
6002 \SpecialChar \menuseparator
6005 orizontal\InsetSpace ~
6011 \begin_layout Enumerate
6012 Switch to LaTeX mode:
6020 \begin_layout Enumerate
6030 Do not close the brace!
6033 \begin_layout Enumerate
6034 Position the cursor behind the caption text, switch to LaTeX mode and insert
6045 \begin_layout Standard
6046 Also, refer to the figures in the example paper.
6049 \begin_layout Subsection
6053 \begin_layout Standard
6054 For submission, the paper has to be formated in a special double-spacing
6056 For this purpose, you have to give the option
6060 to the documentclass.
6061 This must be done using the extra class options field in the
6066 ocument\SpecialChar \menuseparator
6074 Just enter the string
6081 \begin_layout Subsection
6085 \begin_layout Standard
6090 directory contains an example paper written with LyX.
6091 It is the example paper from the original macro package, translated to
6093 Use it for inspiration, and compare the original LaTeX code with LyX way
6097 \begin_layout Section
6101 \begin_layout Standard
6107 \begin_layout Subsection
6111 \begin_layout Standard
6112 AASTeX is a set of macros produced by the American Astronomical Society
6113 to facilitate electronic manuscript submission to the three journals they
6114 publish: the Astrophysical Journal (including the Letters and Supplement),
6115 the Astronomical Journal, and the Publications of the Astronomical Society
6117 LyX has proven to be an excellent tool for generating these documents,
6118 especially given its equation, citation, and figure handling capabilities.
6119 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
6120 is the version described here, or higher.
6121 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
6122 incompatible with LyX.
6123 The AASTeX package may be downloaded from the AASTeX Web site
6126 \begin_layout Standard
6127 \begin_inset VSpace medskip
6133 \begin_layout Standard
6135 \begin_inset LatexCommand \url{http://www.journals.uchicago.edu/AAS/AASTeX}
6142 \begin_layout Standard
6143 \begin_inset VSpace medskip
6149 \begin_layout Standard
6150 A complete user guide is contained in that package and you should familiarize
6151 yourself with it thoroughly before embarking on writing a paper in LyX.
6152 LyX will not reduce the need to figure out all the AASTeX commands, it
6153 will only reduce the drudgery of typing everything in.
6154 It is your responsibility to ensure that the final exported LaTeX document
6155 conforms completely to the requirements of the journal to which you are
6156 submitting your paper.
6159 \begin_layout Subsection
6160 Starting a New Paper
6163 \begin_layout Standard
6164 I strongly suggest that you start with the AASTeX template file.
6170 ile\SpecialChar \menuseparator
6177 , enter the new file name, then choose the
6182 This will show the most common fields found in a manuscript.
6183 Simply overwrite the existing text (including the brackets,
6187 ) with the correct information.
6188 Many of the AASTeX commands and environments can be implemented directly
6189 in LyX, but some cannot: most noticeably
6201 , which should stick out like a sore thumb if you actually just opened the
6203 For commands such as these, the LaTeX code must be entered directly and
6205 Such commands are referred to as ERT, or Evil Red Text.
6206 I tried to minimize the amount of ERT needed in an AASTeX document, but
6207 there is still a bit more required than any of us would like.
6210 \begin_layout Subsection
6211 Finishing Your Paper
6214 \begin_layout Standard
6215 When the paper is finished to your satisfaction and previews/prints correctly,
6217 \begin_inset Quotes eld
6221 \begin_inset Quotes erd
6224 actions which need to be done before you submit it to the journals.
6228 \begin_layout Enumerate
6229 Export your paper as a LaTeX file (
6234 ile\SpecialChar \menuseparator
6239 xport\SpecialChar \menuseparator
6250 \begin_layout Enumerate
6255 file with your favorite text editor
6259 \begin_layout Enumerate
6260 remove the comment lines before the
6269 \begin_layout Enumerate
6274 usepackage...{fontenc}
6276 line if it appears (usually just after
6291 \begin_layout Enumerate
6292 remove everything between (and including) the
6304 commands, except for any commands you specifically put into the LaTeX preamble
6305 (which should appear immediately after the
6306 \begin_inset Quotes eld
6309 User specified LaTeX commands
6310 \begin_inset Quotes erd
6321 \begin_layout Enumerate
6322 Run the resulting file through LaTeX to make sure it still processes correctly.
6325 \begin_layout Enumerate
6326 Reread the journal requirements to make sure your filenames and formats
6330 \begin_layout Enumerate
6334 \begin_layout Subsection
6335 Comments On Specific Commands
6338 \begin_layout Standard
6339 I will not describe the detailed usage of the individual AASTeX commands:
6340 the AASTeX User Guide (
6344 ) gives a good description of each.
6345 Thus it's probably easiest for me to go down the list as found in the guide
6346 and offer comments where necessary.
6347 So let's begin \SpecialChar \ldots{}
6351 \begin_layout Subsubsection
6352 Things that work as expected
6355 \begin_layout Standard
6359 \begin_layout Standard
6371 \begin_layout Standard
6372 Because they work as you might expect, I simply list them and the section
6473 begin{thebibliography}
6481 (2.13.2), all the cite commands and their variations (2.13.2), the generic
6482 graphicx figure commands (2.14.1),
6506 (2.15.4, amongst other places),
6533 \begin_layout Standard
6534 The following style options also work correctly:
6555 Simply put them in the
6561 Layout\SpecialChar \menuseparator
6567 \begin_layout Standard
6571 \begin_layout Standard
6583 \begin_layout Subsubsection
6584 Things that work, but require more comment
6587 \begin_layout Standard
6588 The following items work, but require a little more discussion:
6591 \begin_layout Itemize
6592 These items are reserved for use by the journal editors, but you can put
6593 them into the LaTeX preamble if you feel compelled to do so:
6626 \begin_layout Itemize
6627 These items may be placed in the LaTeX preamble, and are included as blanks
6628 in the template file:
6649 \begin_layout Itemize
6656 (2.3) -- can only be used
6657 \begin_inset Quotes eld
6661 \begin_inset Quotes erd
6664 , not in the middle of a paragraph.
6665 Use ERT if you need to embed it.
6668 \begin_layout Itemize
6675 (2.3) -- will have extra {} after it.
6676 This should not cause an error.
6679 \begin_layout Itemize
6686 (2.6) -- can only be used
6687 \begin_inset Quotes eld
6691 \begin_inset Quotes erd
6694 , not in the middle of a paragraph.
6695 Use ERT if you need to embed it.
6698 \begin_layout Itemize
6705 (2.8) -- can't insert a cross-reference tag, you must type the tag name
6709 \begin_layout Itemize
6716 (2.8) -- same as for
6723 \begin_layout Itemize
6730 (2.9) -- will have extra {} after it.
6731 This should not cause an error.
6734 \begin_layout Itemize
6741 (2.11) -- will have extra {} after it.
6742 This should not cause an error.
6745 \begin_layout Itemize
6752 (2.14.2) -- you can insert an optional filename argument by placing the cursor
6753 at the beginning of the text and selecting
6755 Insert\SpecialChar \menuseparator
6760 \begin_inset Quotes eld
6764 \begin_inset Quotes erd
6767 inserts an optional argument of the type needed by
6774 Hopefully it will be renamed someday.
6777 \begin_layout Itemize
6790 for the catalog ID optional parameter
6793 \begin_layout Itemize
6806 for the catalog ID optional parameter
6809 \begin_layout Subsubsection
6810 Things not implemented, use ERT
6813 \begin_layout Standard
6817 \begin_layout Standard
6829 \begin_layout Standard
6852 setcounter{equation}
6854 (2.12), Journal name abbreviations (2.13.4),
6890 (2.15.4, insert it as the first element in the lefthand cell after where
6892 Don't use any of LyX's rules in the table),
6904 (2.15.5), much of Misc (2.17, except
6955 \begin_layout Standard
6959 \begin_layout Standard
6971 \begin_layout Subsubsection
6972 Things that cannot be implemented
6975 \begin_layout Standard
6976 \SpecialChar \ldots{}
6977 at least in any meaningful sort of way, so I suggest ignoring them.
6978 They are the references environment (2.13.3), and the deluxetable environment
6980 If you really, really need to use deluxetable, I suggest editing it in
6981 a separate file with a text editor, then using
6986 nsert\SpecialChar \menuseparator
6994 to include it in your LyX document.
6999 file to see an example of this.
7002 \begin_layout Subsection
7003 FAQs, Tips, Tricks, and Other Ruminations
7006 \begin_layout Subsubsection
7007 Getting LyX and AASTeX to cooperate
7010 \begin_layout Standard
7011 It can be a bit tricky to get LyX to recognize a new layout and document
7013 When all else fails, do this:
7016 \begin_layout Enumerate
7017 Make certain that LaTeX can find AASTeX.
7018 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
7019 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
7026 \begin_layout Enumerate
7033 /usr/.../share/lyx/layouts
7042 \begin_layout Enumerate
7048 ools\SpecialChar \menuseparator
7055 in LyX, then restart LyX.
7058 \begin_layout Enumerate
7059 Open a regular new file, not from a template.
7060 Does AASTeX appear in the class list in
7065 ocument\SpecialChar \menuseparator
7075 \begin_layout Standard
7076 If you get a warning from an existing AASTeX document about not being able
7077 to find the AASTeX layout or a message about
7078 \begin_inset Quotes eld
7081 You should not mix title layouts with normal ones
7082 \begin_inset Quotes erd
7085 , things haven't been installed correctly.
7088 \begin_layout Subsubsection
7089 LaTeX error processing a table
7092 \begin_layout Standard
7093 LyX, by default, attempts to center the table caption/title.
7094 This seems to produce a bad interaction in AASTeX so you should click somewhere
7095 in the caption/title, then select
7100 dit\SpecialChar \menuseparator
7105 aragraph\InsetSpace ~
7120 This took care of it for me.
7123 \begin_layout Subsubsection
7125 \begin_inset LatexCommand \label{cite}
7132 \begin_layout Standard
7133 A couple of things: 1) I have noticed some funny spacing in the reference
7134 entries in the text.
7135 When you enter the bibliography item data, make sure their is
7139 space between the last author and the parenthesis setting off the year;
7154 2) Entering the references at all is not obvious.
7155 The easiest thing is to start typing your first reference at the end of
7156 the document, then mark it as type
7161 That will put a small gray box in front of what you just typed.
7162 Click on the box to fill in the rest of the information.
7163 For new references, go to the end of an existing reference and press return.
7164 That will create a new line with its own box, etc.
7167 \begin_layout Subsubsection
7171 \begin_layout Standard
7172 Even though AASTeX provides its own figure commands (
7178 , for example), I much prefer LaTeX's standard figure commands (with the
7187 commands as ERT into a Figure Float box if you desire, but I never
7188 have much luck getting the layout right.
7189 With the standard graphics, LyX will insert a
7193 usepackage{graphicx}
7195 command into the LaTeX preamble and handle the figures in the standard
7196 LaTeX2e way, interspersing the figures in the text.
7197 I believe ApJ accepts figures exactly this way now; AJ might still use
7199 \begin_inset Quotes eld
7202 stack everything at the end
7203 \begin_inset Quotes erd
7209 \begin_layout Subsubsection
7210 Things I could have done, but didn't
7213 \begin_layout Standard
7215 \begin_inset Quotes eld
7219 \begin_inset Quotes erd
7222 things I could have implemented, but chose not to.
7223 For instance, I saw no point in double-spacing the text in the LyX window,
7224 even though it is double-spaced in the paper manuscript.
7225 Also, I chose not to make separate layouts for the preprint and preprint2
7227 Since I assume you will spend most of your time in the plain manuscript
7228 mode anyway, I decided not to chew up more disk space with this.
7232 \begin_layout Subsection
7236 \begin_layout Standard
7237 Your mileage may vary.
7238 I've now had papers published by both ApJ and AJ that have had 98% of the
7239 effort done in LyX; the last 2% was the LaTeX post-processing and a few
7241 I have had no trouble with the submission process, and I'm sure the journals
7242 were never aware that there might be a difference.
7243 So, go forth and publish!
7246 \begin_layout Section
7250 \begin_layout Standard
7253 Panayotis Papasotiriou
7256 \begin_layout Subsection
7260 \begin_layout Standard
7261 The ijmpc package is a set of macros that facilitates electronic manuscript
7264 International Journal of Modern Physics C
7267 Similarly, the ijmpd package is for creating manuscripts to be submitted
7270 International Journal of Modern Physics D
7273 Both journals are published by World Scientific.
7274 The corresponding document classes are named
7283 These files, together with instructions for the authors, can be downloaded
7285 \begin_inset LatexCommand \url{http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml}
7290 \begin_inset LatexCommand \url{http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml}
7295 Both packages are modified versions of the standard
7296 \begin_inset Quotes eld
7300 \begin_inset Quotes erd
7303 package, and they are almost (but not exactly) identical.
7304 Most of their features are supported by LyX.
7305 I have used LyX successfully to write articles submitted to both journals
7306 without any problem.
7309 \begin_layout Subsection
7313 \begin_layout Standard
7314 As usual, the easiest way to write a paper is to start with a template.
7320 ile\SpecialChar \menuseparator
7336 This will give an (almost) empty document that includes the most common
7337 fields found in a manuscript.
7338 Simply overwrite the existing text (including the brackets,
7343 You should keep in mind the following remarks.
7346 \begin_layout Enumerate
7347 LyX won't let you change the font size and the page style of the document,
7348 because such modifications are not allowed by both packages.
7351 \begin_layout Enumerate
7352 The language of the document should not be changed.
7353 Before previewing your paper, be sure that the babel package is not used.
7354 To do this, click on
7359 ools\SpecialChar \menuseparator
7377 checkbox in the language settings, and click on
7388 , if you wish to make this change permanent).
7391 \begin_layout Enumerate
7393 \begin_inset Quotes eld
7397 \begin_inset Quotes erd
7400 style must be used to define keywords.
7403 \begin_layout Enumerate
7404 The ijmpc package provides a style named
7405 \begin_inset Quotes eld
7408 Classification Codes
7409 \begin_inset Quotes erd
7412 , which can be used to define classification codes, such as PACS numbers.
7413 Note that this facility is not supported by the ijmpd package.
7416 \begin_layout Enumerate
7417 Several new environments are available:
7418 \begin_inset Quotes eld
7422 \begin_inset Quotes erd
7426 \begin_inset Quotes eld
7430 \begin_inset Quotes erd
7434 \begin_inset Quotes eld
7438 \begin_inset Quotes erd
7442 \begin_inset Quotes eld
7446 \begin_inset Quotes erd
7450 \begin_inset Quotes eld
7454 \begin_inset Quotes erd
7458 \begin_inset Quotes eld
7462 \begin_inset Quotes erd
7466 \begin_inset Quotes eld
7470 \begin_inset Quotes erd
7474 \begin_inset Quotes eld
7478 \begin_inset Quotes erd
7482 \begin_inset Quotes eld
7486 \begin_inset Quotes erd
7490 \begin_inset Quotes eld
7494 \begin_inset Quotes erd
7498 \begin_inset Quotes eld
7502 \begin_inset Quotes erd
7506 \begin_inset Quotes eld
7510 \begin_inset Quotes erd
7514 \begin_inset Quotes eld
7518 \begin_inset Quotes erd
7522 \begin_inset Quotes eld
7526 \begin_inset Quotes erd
7530 Their use is more or less obvious.
7531 LyX supports all these environments; it will use the proper label, text
7532 style, and numbering scheme for each of them.
7535 \begin_layout Enumerate
7536 Both packages use basic citations; the natbib package should not be used.
7537 In LyX, citation references are shown as usual; in the output, citations
7538 are shown as superscripts.
7539 If you want to use a citation as normal text, you should use the
7544 \begin_inset Quotes eld
7547 See Ref.\InsetSpace ~
7555 \begin_inset Quotes erd
7561 \begin_layout Enumerate
7563 \begin_inset Quotes eld
7567 \begin_inset Quotes erd
7570 section in both packages.
7571 To put acknowledgments, just use the
7572 \begin_inset Quotes eld
7576 \begin_inset Quotes erd
7582 \begin_layout Enumerate
7583 Appendices may be added to the paper,
7587 the Acknowledgments and
7592 LyX provides a special environment, called
7593 \begin_inset Quotes eld
7597 \begin_inset Quotes erd
7600 which marks the beginning of the appendices.
7601 This environment should be left blank; it just sends a LaTeX command, but
7602 nothing is really printed.
7604 \begin_inset Quotes eld
7608 \begin_inset Quotes erd
7611 is printed with blue letters, as a signal that all sections after that
7612 point are appendices.
7613 To write an appendix, use the
7614 \begin_inset Quotes eld
7618 \begin_inset Quotes erd
7622 LyX will number each appendix with capital letters, as required by both
7625 \begin_inset Quotes eld
7629 \begin_inset Quotes erd
7636 be present before the first appendix; if not, all appendices will be numbered
7637 as normal sections in the output.
7640 \begin_layout Enumerate
7641 The ijmpc and the ijmpd packages use the
7645 command to implement table captions.
7646 As a result, a table created by LyX is printed correctly, but its caption
7648 However, you can use some ERT to overpass this problem, so that captions
7649 are printed as expected.
7650 To do so, create a float table as usual, remove the caption, and replace
7661 (sic); you must also the ERT
7665 immediately after the tabular material.
7666 Study the example table included in the template files to see how this
7667 trick is implemented.
7668 Alternatively, If you need table captions, you should implement the whole
7673 file, then include this file to the LyX document (
7678 nsert\SpecialChar \menuseparator
7683 \SpecialChar \menuseparator
7692 Details on how to create a table float can be found in the files
7700 , included in the corresponding packages.
7703 \begin_layout Subsection
7704 Preparing a paper for submission
7707 \begin_layout Standard
7708 Before you submit your paper you must export the LyX document as a LaTeX
7714 ile\SpecialChar \menuseparator
7719 xport\SpecialChar \menuseparator
7726 ), then make the following changes to the resulting
7733 \begin_layout Enumerate
7734 Remove the comment lines before the
7743 \begin_layout Enumerate
7744 Remove everything between (and including) the
7756 commands, except for any commands you specifically put into the LaTeX preamble.
7759 \begin_layout Standard
7764 file should be saved and processed through LaTeX as many times as necessary.
7765 You may also want to check the resulting
7772 \begin_layout Subsection
7776 \begin_layout Standard
7777 The use of ERT is reduced to two commands, which must be placed at the top
7779 If you started writing your paper by using the
7787 template, the ERT needed is already in its place; you usually don't need
7789 You may only modify the first ERT to specify the information printed to
7790 the top of odd and even pages (authors' names and short paper's title,
7792 This ERT must have the form
7796 markboth{Authors' Names}{Short Paper's Title}
7801 \begin_layout Section
7805 \begin_layout Standard
7808 Panayotis Papasotiriou
7811 \begin_layout Subsection
7815 \begin_layout Standard
7816 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
7817 that facilitates electronic manuscript submission to the journals they
7819 Most known of them (at least in my domain of interest) are
7821 Astrophysics and Space Science
7827 , but there are many others (see a complete list at
7828 \begin_inset LatexCommand \url{http://www.wkap.nl/jrnllist.htm/JRNLHOME}
7833 The Kluwer package may be downloaded from the site
7834 \begin_inset LatexCommand \url{http://www.wkap.nl/kaphtml.htm/STYLEFILES}
7839 A complete user guide is contained in that package (but it can also be
7840 downloaded separately).
7843 \begin_layout Standard
7844 LyX supports many features of the package but not everything.
7845 However, the ERT needed is reduced to some
7846 \begin_inset Quotes eld
7850 \begin_inset Quotes erd
7853 commands of the package (see\InsetSpace ~
7855 \begin_inset LatexCommand \ref{subsec:kluwer_peculiarities}
7860 I have recently used LyX to write an article submitted to the
7862 Astrophysics and Space Science
7864 without any problem.
7867 \begin_layout Subsection
7871 \begin_layout Standard
7872 The easiest way to write a paper is to start with the Kluwer template file.
7875 File\SpecialChar \menuseparator
7887 This will give an (almost) empty document that includes the most common
7888 fields found in a manuscript and a short description of their use.
7889 As in most templates, simply overwrite the existing text (including the
7894 ) with the correct information.
7897 \begin_layout Subsection
7898 Preparing a paper for submission
7901 \begin_layout Standard
7902 As in the AASTeX package, before you submit your paper to a journal you
7904 \begin_inset Quotes eld
7908 \begin_inset Quotes erd
7914 \begin_layout Enumerate
7915 Export your paper as a LaTeX file.
7916 To do this, click on
7921 ile\SpecialChar \menuseparator
7926 xport\SpecialChar \menuseparator
7937 \begin_layout Enumerate
7942 file with a text editor and make the following changes
7946 \begin_layout Enumerate
7947 remove the comment lines before the
7956 \begin_layout Enumerate
7957 remove everything between (and including) the
7969 commands, except for any commands you specifically put into the LaTeX preamble.
7972 \begin_layout Standard
7981 \begin_layout Enumerate
7986 file through LaTeX as many times as necessary (usually up to three).
7989 \begin_layout Enumerate
7994 document using, e.g.,
7998 , and check if everything is ok (it should, if you didn't make any mistake).
8001 \begin_layout Subsection
8002 \begin_inset Quotes eld
8006 \begin_inset Quotes erd
8009 of the Kluwer package
8010 \begin_inset LatexCommand \label{subsec:kluwer_peculiarities}
8017 \begin_layout Standard
8018 The Kluwer package has the following
8019 \begin_inset Quotes eld
8023 \begin_inset Quotes erd
8029 \begin_layout Enumerate
8030 It is possible to write multiple articles in the same LaTeX file
8034 \begin_layout Standard
8035 I can't imagine any good reason to do this.
8041 Each article must be included in the environment
8042 \begin_inset Quotes eld
8046 \begin_inset Quotes erd
8050 Unfortunately, this environment cannot be omitted, even if you write just
8052 Therefore, each article starts with the command
8058 and, obviously, ends with the command
8065 Although this can be implemented in LyX, I didn't included it, since it
8066 looks ugly and can confuse the novice user.
8067 Therefore, you need to enter them directly and mark them as LaTeX code
8069 \begin_inset Quotes eld
8073 \begin_inset Quotes erd
8079 \begin_layout Enumerate
8080 Information given at the beginning of the article (i.e., title, subtitle,
8081 author, institution, running title, running author, abstract and keywords)
8082 must be included in an environment called
8083 \begin_inset Quotes eld
8087 \begin_inset Quotes erd
8091 This is not implemented in LyX, so you must enter title, subtitle etc.
8092 between two ERT lines (
8107 \begin_layout Enumerate
8108 According to the user manual, the label of each bibliography item must be
8132 \begin_layout Standard
8137 template takes care of all these
8138 \begin_inset Quotes eld
8142 \begin_inset Quotes erd
8146 If you start a new paper using this template you don't need to do anything
8151 \begin_layout Enumerate
8152 don't delete the ERT included in the template, and
8155 \begin_layout Enumerate
8156 copy the example bibliography item included in the template and modify it
8157 as necessary to enter new bibliography items.
8160 \begin_layout Section
8164 \begin_layout Standard
8170 \begin_layout Subsection
8174 \begin_layout Standard
8175 The LyX document classes
8177 article (koma-script)
8181 report (koma-script)
8199 correspond to the LaTeX document classes
8216 of the Koma-Script family.
8217 They are replacements for the standard document classes
8233 , resp., and fit better to European typography conventions in a number of
8237 \begin_layout Itemize
8238 Standard character size is 11pt in
8240 article (koma-script)
8244 report (koma-script)
8252 letter (koma-script)
8257 \begin_layout Itemize
8258 Headings, labels of the description environment, and a number of elements
8261 letter (koma-script)
8263 document class are set in a bold sans serif font.
8267 \begin_layout Standard
8268 There is a big difference between the bold sans serif old cm fonts and new
8269 ec fonts, especially in the appearance of headings.
8270 In comparison, the ec bold sans serif fonts look a bit thin.
8271 Here the LaTeX package
8278 helps to produce the
8279 \begin_inset Quotes eld
8283 \begin_inset Quotes erd
8286 appearance when using the ec fonts.
8291 The numbering of chapter headings is made in the same way as the numbering
8292 of section headings, that is without the extra line
8293 \begin_inset Quotes eld
8296 Chapter\SpecialChar \ldots{}
8298 \begin_inset Quotes erd
8302 In addition, the appearance of the headings can be modified by using a
8303 number of options (in LyX to be entered in the field
8317 ayout\SpecialChar \menuseparator
8325 A detailed German description of these options can be found in the Koma-Script
8333 \begin_layout Itemize
8334 The main means in the Koma-Script document classes to design the type area
8343 (in LyX to be entered in the extra class options field in the dialog
8348 ocument\SpecialChar \menuseparator
8356 They make a clearer modification of page margins possible as do the options
8362 ocument\SpecialChar \menuseparator
8370 A detailed German description of these and other type area options can
8371 be found in the Koma-Script documentation
8378 \begin_layout Itemize
8379 The LaTeX document classes of the Koma-Script family define a number of
8380 additional commands.
8381 Those part of it which makes sense in LyX is implemented in corresponding
8385 \begin_layout Standard
8386 A detailed German description of the LaTeX document classes of the Koma-Script
8387 family can be found in the Koma-Script documentation
8395 \begin_layout Standard
8396 There is an English translation
8400 , but it is not a complete one.
8405 The following sections describe only those aspects, which are relevant
8409 \begin_layout Subsection
8410 article (koma-script), report (koma-script), and book (koma-script)
8413 \begin_layout Standard
8414 The document classes
8416 article (koma-script)
8420 report (koma-script)
8430 are implemented in the layout files
8443 They contain all the paragraph types of the corresponding standard document
8456 , resp., partly modified, with the exception of the LyX specific
8460 -type, which is replaced by the new
8464 -type having the same functionality.
8469 -Type there is a number of new paragraph types added.
8476 letter (koma-script)
8481 \begin_layout Itemize
8490 : are equivalents to
8498 , resp., additionally inserting an entry in the table of contents.
8507 are not contained in
8509 article (koma-script)
8514 \begin_layout Itemize
8531 , resp., additionally clearing running heads.
8538 article (koma-script)
8544 \begin_layout Standard
8557 report (koma-script)
8559 , but since this is identical to
8563 , is has not been implemented in LyX.
8571 \begin_layout Itemize
8576 : generates a heading directly above the following paragraph in the standard
8577 character size without affecting the structure of the document.
8580 \begin_layout Itemize
8589 are special captions which respect the different space settings needed for
8590 captions placed above or below an element (if you follow strict typographic
8591 rules, you might want to place table captions always above the table).
8592 You can also use the class option
8609 You need at least Koma-Script version 2.8q to use this.
8612 \begin_layout Itemize
8617 : can be used to set a bonmot, e.
8621 \begin_layout Standard
8634 \begin_layout Standard
8643 at the beginning of a chapter.
8644 If you use the optional argument (
8649 nsert\SpecialChar \menuseparator
8653 ), you can insert the dictum's author there.
8654 Dictum and author are separated by a line.
8655 You need at least Koma-Script version 2.8q to use this.
8662 article (koma-script)
8667 \begin_layout Standard
8668 The following types, together with the standard types
8680 , form the title area of the document.
8681 They must be entered ahead of the first
8682 \begin_inset Quotes eld
8686 \begin_inset Quotes erd
8693 \begin_layout Standard
8694 The corresponding LaTeX commands must appear before the
8705 When such a type is used more than once, the latter usage overwrites the
8706 former one, that means, for every type only the latest usage is valid.
8707 The order of the different types however has, like
8719 , no effect on the appearance of the produced document.
8722 \begin_layout Itemize
8727 : produces a centered paragraph above the ordinary title (
8739 ) for the subject of the document.
8742 \begin_layout Itemize
8747 : produces a centered paragraph below the ordinary title (
8759 ) for the publishers' name.
8762 \begin_layout Itemize
8769 report (koma-script)
8775 produces a centered paragraph on its own page behind the title page, or
8778 article (koma-script)
8780 produces a centered paragraph below the ordinary title (
8799 \begin_layout Itemize
8804 : produces a left aligned paragraph above the ordinary title (
8820 ) for a document`s head.
8823 \begin_layout Itemize
8828 : produces in a double-sided print in
8830 report (koma-script)
8836 a left-aligned paragraph at the top of the title page`s back or has no
8837 effect in a single-sided print or in
8839 article (koma-script)
8844 \begin_layout Itemize
8849 : produces in a double-sided print in
8851 report (koma-script)
8857 a left-aligned paragraph at the bottom of the title page`s back or has
8858 no effect in a single-sided print or in
8860 article (koma-script)
8865 \begin_layout Itemize
8870 : produces a special
8871 \begin_inset Quotes eld
8875 \begin_inset Quotes erd
8878 page ahead of the actual document containing a paragraph without special
8882 \begin_layout Standard
8883 The layout files for the document classes
8885 article (koma-script)
8889 report (koma-script)
8900 This is thought of as a place to define your own types.
8905 in your personal layout directory and edit the file!
8908 \begin_layout Subsection
8909 letter (koma-script)
8912 \begin_layout Standard
8916 \begin_layout Standard
8928 \begin_layout Standard
8932 letter (koma-script)
8934 is implemented in the layout file
8939 It contains all the paragraph types of the corresponding standard document
8944 , partly modified, with the exception of the LyX specific types
8956 type, which is replaced by the new
8961 In addition, it contains, in contrast to the standard document class, the
8979 Furthermore, there are a number of new letter specific types.
8982 \begin_layout Standard
8986 \begin_layout Standard
8998 \begin_layout Standard
8999 The appearance of the letter produced by this document class can be controlled
9000 by a number of LaTeX commands, which you can put in the LaTeX preamble.
9004 \begin_layout Standard
9005 For example, the standard appearance of the letter`s heading, consisting
9006 of name and address, is quite self-willed.
9008 \begin_inset Quotes eld
9012 \begin_inset Quotes erd
9015 heading is produced by the following LaTeX commands in the preamble:
9018 \begin_layout LyX-Code
9028 \begin_layout LyX-Code
9044 \begin_layout LyX-Code
9054 \begin_layout LyX-Code
9074 A detailed German description of such LaTeX commands can be found in the
9075 Koma-Script documentation
9080 With it, the letter's author can produce his personal letter layout.
9083 \begin_layout Standard
9092 define the beginning of the letter and must be used in every letter.
9093 To emphasize them in the LyX document class, they are marked with the letter
9104 It is possible to write any number of letters in one file.
9109 type produces a new letter using the same addressee and a
9113 type produces a new addressee.
9130 are ordinary paragraph types and can also be used several times in one
9131 and the same letter.
9134 \begin_layout Itemize
9139 : produces a paragraph for the addressee and implicitly defines the beginning
9143 \begin_layout Itemize
9148 : produces a paragraph for the form of address and implicitly produces a
9152 \begin_layout Itemize
9157 : produces a paragraph for a close.
9160 \begin_layout Itemize
9165 : produces a paragraph for a postscript.
9168 \begin_layout Itemize
9173 : produces a paragraph for a distribution list.
9176 \begin_layout Itemize
9181 : produces a paragraph for enclosures.
9184 \begin_layout Standard
9225 are input types provided with a label to enter information, which will
9226 be processed by the document class.
9230 \begin_layout Standard
9231 It could be seen as a matter of inconsequence, that the types
9239 described above are not such input types as well.
9240 Because of the special meaning of those types, however, I have implemented
9241 them as ordinary paragraph types with a one letter mark in the left margin.
9242 Moreover, it would affect my feeling of symmetry, if the
9250 type had such a serious different appearance.
9255 The types must be used ahead of the corresponding
9262 \begin_layout Standard
9263 An implementation of these types in a WYSIWYG fashion does not seem to make
9264 sense, because the real appearance of the produced letter does not only
9265 depend on the usage of the particular type, but also on other factors.
9266 For example, a signature entered in the
9270 type will in the standard behavior appear in the produced letter only,
9271 when in the same letter also a
9276 The entered value of the
9280 type will in the standard behavior not appear in the produced letter at
9282 The possibility to design the letter`s heading freely is already indicated
9283 in a footnote above.
9286 \begin_layout Standard
9287 The input types can also be used as empty paragraphs.
9288 This makes sense e.\InsetSpace ~
9299 type is not used at all, in the standard behavior the value of the
9303 type is used as signature, whereas if an empty
9307 type is used, no signature value is defined.
9310 \begin_layout Standard
9311 By using the input types it is possible to write a letter template, containing
9312 filled input types with your personal dates (name, address, etc.) and empty
9313 input types for other dates you want to enter.
9316 \begin_layout Itemize
9321 : sender's name, in the standard behavior appears as a centered paragraph
9322 in small caps in the letter`s heading.
9325 \begin_layout Itemize
9330 : sender's signature, in the standard behavior appears below the
9339 type is used, the value of the
9343 type appears instead.
9346 \begin_layout Itemize
9351 : sender's address, in the standard behavior appears in a centered paragraph
9352 in the letter`s heading below the sender's name.
9355 \begin_layout Itemize
9360 : sender's telephone number, in the standard behavior only sets the LaTeX
9370 \begin_layout Itemize
9375 : place of the letter`s making.
9378 \begin_layout Itemize
9383 : date of the letter`s making.
9392 , in the standard behavior, produce the place and the date in a right-aligned
9393 line below the addressee's field.
9398 type is used, neither place nor date appear, independent of the value of
9408 type is used, the date of the letter `s production is used.
9411 \begin_layout Itemize
9416 : sender`s back address, in the standard behavior appears above the addressee's
9417 field in a small sans serif font.
9420 \begin_layout Itemize
9425 : special mail information, in the standard behavior appears underlined
9426 above the addressee's field below the back address.
9429 \begin_layout Itemize
9434 : additional information, in the standard behavior appears on right side
9435 below the addressee`s field.
9438 \begin_layout Itemize
9443 : the letter's title, in the standard behavior appears in a big, bold, sans
9444 serif font above the subject.
9447 \begin_layout Itemize
9452 : the letter's subject, in the standard behavior appears in a bold font
9460 \begin_layout Standard
9481 produce a business letter like line above the
9485 line containing the fields
9486 \begin_inset Quotes eld
9490 \begin_inset Quotes erd
9494 \begin_inset Quotes eld
9498 \begin_inset Quotes erd
9502 \begin_inset Quotes eld
9506 \begin_inset Quotes erd
9510 \begin_inset Quotes eld
9514 \begin_inset Quotes erd
9518 \begin_inset Quotes eld
9522 \begin_inset Quotes erd
9526 \begin_inset Quotes eld
9530 \begin_inset Quotes erd
9534 For the date field, the value of the
9540 \begin_inset Quotes eld
9543 business letter types
9544 \begin_inset Quotes erd
9547 is used, the value of the
9551 type however does not appear, but only the LaTeX variable
9558 The ordinary output of place and date in a right-aligned line below the
9559 addressee`s field is suppressed.
9560 The types are implemented as input types provided with a label and must
9561 be used ahead of the corresponding
9568 \begin_layout Itemize
9576 \begin_layout Itemize
9584 \begin_layout Itemize
9592 \begin_layout Itemize
9600 \begin_layout Itemize
9608 \begin_layout Subsection
9609 The new letter class: letter (koma-script v.2)
9612 \begin_layout Standard
9615 Jürgen Spitzmüller
9618 \begin_layout Standard
9619 \begin_inset VSpace medskip
9625 \begin_layout Standard
9627 Koma-Script version 2.8 has introduced a new letter class
9631 which superceeds the now unsupported
9636 It has --- on the LaTeX side --- a completely new interface and is not
9637 compatible with the old class.
9638 Therefore, LyX supports both, though it is recommended to use the new class.
9641 \begin_layout Standard
9642 This class covers the same functionality as
9644 letter (koma-script),
9651 (receiver's address, same as
9668 will start a new letter (i.
9672 \begin_layout Standard
9685 \begin_layout Standard
9694 you can write several letters per document).
9695 New elements are sender's
9711 and the possibility to use a
9720 nsert\SpecialChar \menuseparator
9730 \begin_layout Standard
9731 The biggest improvement is, though, that the letter's layout is configurable
9732 at almost any needs.
9733 This can be done via the preamble or with a special style file (Letter
9734 Class Option, extension
9738 ), that will be read in as a class option.
9742 \begin_layout Standard
9743 The KOMA package comes with some default
9748 There is, for instance, a
9752 file that follows german typesetting rules, or a
9756 that provides the default layout of the old
9761 The latter can be loaded with the class option
9770 ayout\SpecialChar \menuseparator
9775 ocument\SpecialChar \menuseparator
9787 template that is included in LyX for examples.
9788 A detailed description is to be found in the Koma-Script documentation
9796 \begin_layout Subsection
9800 \begin_layout Standard
9801 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
9805 \begin_layout Itemize
9806 The chapter number of a
9810 type appears on a line of its own above the chapter heading instead of
9811 appearing in the same line ahead of it.
9812 The cause for that is the LyX internal behavior for the labeltype
9819 \begin_layout Itemize
9820 The headings of the types
9829 \begin_inset Quotes eld
9833 \begin_inset Quotes erd
9836 LaTeX table of contents, but not in the LyX table of contents (
9841 ocument\SpecialChar \menuseparator
9853 \begin_layout Itemize
9858 document class appear in a skip separation mode, not indented.
9859 This is the standard behavior, no special LaTeX commands are needed for
9866 ocument\SpecialChar \menuseparator
9873 dialog the corresponding radio button indicates
9889 value always has the effect that extra LaTeX commands are inserted in the
9890 document to produce the gap, which is not what is wanted in this case.
9893 \begin_layout Section
9901 \begin_layout Standard
9907 \begin_layout Subsection
9911 \begin_layout Standard
9912 These are the layout files for some of the journal formats used by Springer
9913 Verlag and listed on
9914 \begin_inset LatexCommand \url{http://www.springer.de/author/tex/help-journals.html}
9918 , where you should also go to fetch the class files (yes, these are LaTeX2e
9920 It is a modular system: the things common to all journals are implemented
9925 , which journal-specific layout files (such as, e.g.,
9929 for Journal of Geodesy) can include.
9932 \begin_layout Standard
9933 This means that implementing support for any other Springer journal on this
9934 list is as simple as writing your own
9942 file following the outline given in
9950 \begin_layout Standard
9951 It is reasonably well tested only for the Journal of Geodesy.
9960 come with the standard LyX distribution.
9961 Install the relevant class file (downloaded from Springer) in a proper
9962 directory, reconfigure LaTeX (in the teTeX case by running
9966 , as root if necessary --- doesn't LyX take care of this?), reconfigure
9967 LyX and it should work.
9970 \begin_layout Subsection
9974 \begin_layout Standard
9975 A large number of theorem-like styles ---
9981 \SpecialChar \ldots{}
9987 \begin_layout Standard
9990 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
9991 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
9994 See the Springer class file documentation for details.
9997 \begin_layout Subsection
10001 \begin_layout Itemize
10013 \begin_layout Itemize
10016 Probability Theory and Related Fields
10022 --- Jean-Marc Lasgouttes
10025 \begin_layout Standard
10026 Add your own, it isn't so hard!
10029 \begin_layout Subsection
10033 \begin_layout Standard
10034 These files are partly based on the older
10038 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
10039 file from Springer.
10044 layout, are now defunct.
10045 Jean-Marc Lasgouttes helped out big in making me find my way around the
10046 LyX layout file mechanism.
10049 \begin_layout Subsection
10053 \begin_layout Standard
10055 But probably less than in the old hacked-LaTeX
10062 \begin_layout Standard
10063 Limitations e.g.: does not display the number for theorem-like layouts, just
10067 \begin_layout Section
10075 \begin_layout Standard
10081 \begin_layout Subsection
10085 \begin_layout Standard
10086 These are the layout files for some of the journals of the American Geophysical
10088 It is assumed that you have both the AGU's own class files and AGUplus
10089 installed (everything to be found at
10090 \begin_inset LatexCommand \url{ftp://ftp.agu.org/journals/latex/journals}
10097 \begin_layout Subsection
10101 \begin_layout Standard
10111 They are still called this in the LyX GUI, though their LaTeX equivalents
10112 in the AGU classes are
10123 \begin_layout Standard
10124 Newly defined styles are
10161 These are mostly manuscript attributes and defined in the AGU class documentati
10165 \begin_layout Standard
10166 I suspect this is still badly incomplete.
10169 \begin_layout Subsection
10173 \begin_layout Standard
10190 \begin_layout Subsection
10194 \begin_layout Itemize
10197 Journal of Geophysical Research
10206 \begin_layout Standard
10207 Add your own, it isn't so hard! Look at the
10218 \begin_layout Subsection
10219 Bugs and things to remember
10222 \begin_layout Standard
10223 In order to use the new layouts, you must remember to do the following for
10227 \begin_layout Enumerate
10233 This can be done in the
10235 layout\SpecialChar \menuseparator
10240 document\SpecialChar \menuseparator
10244 (AGU articles are always in English, right? So
10248 choose a language.)
10251 \begin_layout Enumerate
10256 into the document's
10261 (Yes, this is a bug.)
10264 \begin_layout Enumerate
10265 Make sure you use the
10269 bibliography style, by entering
10273 into the second field of the BibTeX inset.
10274 None of the standard styles will do.
10277 \begin_layout Section
10285 \begin_layout Standard
10291 \begin_layout Subsection
10295 \begin_layout Standard
10296 This is the layout file for the European Geophysical Society journals.
10301 can be downloaded from the web site of the EGS under
10302 \begin_inset LatexCommand \url{www.copernicus.org}
10309 \begin_layout Subsection
10313 \begin_layout Standard
10316 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
10324 The current layout file is unfortunately very unmodular and would benefit
10325 from using the various
10332 \begin_layout Section
10338 \begin_inset LatexCommand \label{sec:slitex}
10345 \begin_layout Standard
10353 \begin_layout Subsection
10357 \begin_layout Standard
10358 This section describes how to use LyX to make slides for overhead projectors.
10359 There are two document classes that can do this: the default slides class
10365 This section documents the former.
10368 \begin_layout Standard
10369 I'm going to say this again, nice and clear, so that there's no misunderstanding
10373 \begin_layout Standard
10374 \begin_inset VSpace bigskip
10380 \begin_layout Standard
10384 This section documents the class
10385 \begin_inset Quotes eld
10393 \begin_inset Quotes erd
10401 \begin_layout Standard
10402 \begin_inset VSpace bigskip
10408 \begin_layout Standard
10409 If you're looking for the documentation for
10410 \begin_inset Quotes eld
10418 \begin_inset Quotes erd
10421 , check out section\InsetSpace ~
10423 \begin_inset LatexCommand \ref{sec:foiltex}
10433 \begin_inset Quotes eld
10441 \begin_inset Quotes erd
10444 ] is actually somewhat better than the default
10452 \begin_layout Standard
10453 \SpecialChar \ldots{}
10454 or so I've been told repeatedly by its advocates.
10455 Having never used it, I have no idea if this claim is true or not.
10460 which this section documents.
10463 \begin_layout Standard
10464 This class is the LaTeX2e improvement of the old
10469 Every LaTeX2e distribution includes this class [which I'll just refer to
10471 \begin_inset Quotes eld
10479 \begin_inset Quotes erd
10482 from now on], so you're bound to have it.
10483 As I noted earlier, there are other classes, such as
10487 , which also produce slides for overhead projectors and do a better job
10489 However, there are some things which
10493 can do which the others can't, such as generate overlays.
10494 Read on to learn more!
10497 \begin_layout Subsection
10499 \begin_inset LatexCommand \label{sec:slidesetup}
10506 \begin_layout Standard
10507 Obviously, to use this document class, you need to select
10508 \begin_inset Quotes eld
10516 \begin_inset Quotes erd
10519 from the class list in the
10524 ocument\SpecialChar \menuseparator
10532 There are some other special things you should know about this class:
10535 \begin_layout Itemize
10536 Don't bother changing the options
10541 They're not supported by the
10548 \begin_layout Itemize
10557 behaves a bit differently for this class.
10558 The possible choices and what they do are as follows:
10562 \begin_layout Description
10567 The final output contains page numbers in the lower right corner.
10570 \begin_layout Description
10579 , but also prints out any time markers you've put in.
10580 This is the default.
10583 \begin_layout Description
10588 The final output contains no page numbers, time markers, or alignment markers.
10592 \begin_layout Itemize
10597 class has an extra option:
10603 \begin_inset Quotes eld
10611 \begin_inset Quotes erd
10614 in the extra class options.
10618 \begin_layout Standard
10619 Using this options allows you to add time markers to
10624 See section\InsetSpace ~
10626 \begin_inset LatexCommand \ref{sec:slideNote}
10634 \begin_layout Standard
10635 You can also use the template file
10636 \begin_inset Quotes eld
10644 \begin_inset Quotes erd
10647 to automatically set up a document to use the
10656 ile\SpecialChar \menuseparator
10665 to open your new document].
10666 The template file also contains some examples of the special paragraph
10667 environments used by this class.
10668 I'll describe those next.
10671 \begin_layout Subsection
10672 Paragraph Environments
10675 \begin_layout Subsubsection
10676 Supported Environments
10679 \begin_layout Standard
10680 The first thing you'll notice when you start up a new
10684 document is the font size and type: it's the equivalent of the size
10685 \begin_inset Quotes eld
10693 \begin_inset Quotes erd
10702 This is also what's used in the output.
10704 \begin_inset Quotes eld
10708 \begin_inset Quotes erd
10711 to remind you that this is a slide.
10712 Your final slides will use a larger font; ergo, you'll have less space.
10713 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
10716 \begin_layout Standard
10717 The next thing that becomes obvious is the changes to the paragraph environment
10718 pull-down box [at the far-left end of the toolbar].
10719 Most of the paragraph environments you're used to seeing are missing.
10720 There are also five new ones.
10725 class itself only supports certain paragraph environments:
10728 \begin_layout Itemize
10734 \begin_layout Itemize
10740 \begin_layout Itemize
10746 \begin_layout Itemize
10752 \begin_layout Itemize
10758 \begin_layout Itemize
10764 \begin_layout Itemize
10770 \begin_layout Itemize
10776 \begin_layout Itemize
10782 \begin_layout Itemize
10788 \begin_layout Itemize
10794 \begin_layout Standard
10795 All of the other standard environments, including the section-heading environmen
10796 ts, aren't used in the
10803 \begin_layout Standard
10804 On the other hand, you'll notice the following new environments:
10807 \begin_layout Itemize
10813 \begin_layout Itemize
10819 \begin_layout Itemize
10825 \begin_layout Itemize
10831 \begin_layout Itemize
10837 \begin_layout Standard
10838 These five are kind of quirky, due to a
10839 \begin_inset Quotes eld
10843 \begin_inset Quotes erd
10847 You see, LyX doesn't permit you to nest any other paragraph environment
10848 into an empty environment.
10849 Now, that's fine and dandy, but it means that you wouldn't be able to start
10850 a slide with anything except plain text.
10851 To deal with this, I've performed a little
10852 \begin_inset Quotes eld
10856 \begin_inset Quotes erd
10862 \begin_layout Subsubsection
10863 Quirks of the New Environments
10864 \begin_inset LatexCommand \label{sec:slideQuirk}
10871 \begin_layout Standard
10872 All five of the new paragraph environments are somewhat quirky due to inherent
10873 limitiations in the current version of LyX.
10874 As I just mentioned, LyX forbids environments that begin with another environme
10876 To get around this, the
10880 environment isn't a paragraph environment as described in the
10888 \begin_layout Standard
10889 You should consider
10902 \begin_inset Quotes eld
10905 pseudo-environments.
10906 \begin_inset Quotes erd
10909 They look like a section heading or a
10910 \begin_inset Quotes eld
10918 \begin_inset Quotes erd
10921 but really begin a [and, if necessary, end the previous] paragraph environment.
10931 \begin_inset Quotes eld
10935 \begin_inset Quotes erd
10938 These two perform some action.
10941 \begin_layout Standard
10942 A common feature of all five environments,
10962 , is a rather long-ish label.
10963 The text following this label --- ordinarily the contents of the paragraph
10964 environment --- is utterly irrelevant for
10985 LyX completely ignores it.
10986 In fact, you can leave these five environments completely empty.
10990 \begin_layout Standard
10995 to put any text after the rather long-ish label, you might want to.
10996 This could be a short description of the contents of the
11001 In that case, enter in your descriptive comment and hit
11005 as you normally would.
11008 \begin_layout Standard
11009 If, on the other hand, you don't want to enter in any descriptive text,
11010 you'll hit another LyX quirk.
11011 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
11012 environment until you put something in the old one.
11016 \begin_layout Itemize
11017 Start entering the text that will
11045 \begin_layout Itemize
11046 Now move to the beginning of that paragraph.
11050 \begin_layout Itemize
11059 \begin_layout Itemize
11060 Finally, change this new, empty paragraph to a
11084 \begin_layout Standard
11085 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
11089 \begin_layout Subsection
11090 Making a Presentation with
11103 \begin_layout Subsubsection
11111 \begin_layout Standard
11112 If you're expecting this section to teach you how to actually make a presentatio
11113 n, you'll be sorely disappointed.
11114 Naturally, I'll describe all of the ways the
11118 class can assist you in preparing the materials for a presentation.
11119 Filling in the contents, however, is up to you.
11124 the LyX philosophy.]
11127 \begin_layout Standard
11132 environment [in the manner described in section\InsetSpace ~
11134 \begin_inset LatexCommand \ref{sec:slideQuirk}
11138 ] tells LyX to begin a new slide [duh].
11139 The label for this environment/
11140 \begin_inset Quotes erd
11144 \begin_inset Quotes erd
11148 \begin_inset Quotes eld
11152 \begin_inset Quotes erd
11155 in cool blue, followed by the label,
11156 \begin_inset Quotes eld
11160 \begin_inset Quotes erd
11164 Any text or paragraph environments that follow this one go on the new slide.
11168 \begin_layout Standard
11169 Slides are probably the only time you'll need to forcibly end pages in LyX
11170 (this can be specified in the
11175 In fact, you'll want to, once you finish entering the contents of one slide.
11176 If you've entered more text than can physically fit on a slide, the extra
11177 overflows onto a new slide.
11178 I don't recommend doing this, however, since the overflow slide won't have
11179 any page number on it.
11180 Furthermore, it may interfere with any
11184 you've made to accompany the oversized
11191 \begin_layout Standard
11200 environments work the same way as the
11205 They both create an
11206 \begin_inset Quotes eld
11210 \begin_inset Quotes erd
11213 followed by a label [
11214 \begin_inset Quotes eld
11218 \begin_inset Quotes erd
11222 \begin_inset Quotes eld
11226 \begin_inset Quotes erd
11230 The color is a stunning magenta instead of blue, and the
11231 \begin_inset Quotes eld
11235 \begin_inset Quotes erd
11238 will look different, in style and in length.
11239 The label fonts of all three also differ from one another.
11242 \begin_layout Standard
11247 , if the contents of a
11255 exceed the physical size of a slide or sheet of paper, the extra will overflow
11257 Again, you should avoid this.
11258 It defeats the whole purpose of
11269 \begin_layout Subsubsection
11279 \begin_layout Standard
11284 is a slide that sits atop another slide.
11285 Perhaps you wish to discuss a figure on the main
11289 before displaying the text associated with it.
11290 One way to accomplish this is tape a flap of dark paper over the part of
11295 you want to display later.
11296 This method fails, however, if you wish to overlap one graph with another,
11298 You would then have to fumble while speaking to align the two separate,
11303 s to align the two graphs.
11308 environment in both cases makes life much easier.
11311 \begin_layout Standard
11316 receives the page number of its
11317 \begin_inset Quotes eld
11321 \begin_inset Quotes erd
11329 \begin_inset Quotes eld
11337 \begin_inset Quotes erd
11344 \begin_layout Standard
11345 Presumably, mutliple
11350 \begin_inset Quotes eld
11358 \begin_inset Quotes erd
11362 \begin_inset Quotes eld
11370 \begin_inset Quotes erd
11374 \begin_inset Quotes eld
11382 \begin_inset Quotes erd
11385 , etc.\InsetSpace ~
11386 appended to the page number of the parent
11396 Clearly, you want the contents of both the
11404 to each fit on a single physical slide! You should probably consider an
11410 \begin_inset Quotes eld
11414 \begin_inset Quotes erd
11426 class provides a visual cue for this: the label at the start of an
11430 is shorter than that at the start of a
11435 Lastly, when you generate printable output, you'll find alignment markers
11436 in all four corners of both the
11440 page and its parent
11445 These will assist you in lining up the two physical slides.
11448 \begin_layout Standard
11449 The major problem in overlaying two slides is aligning the contents of the
11450 two transparencies.
11451 How much space should you leave for that graph on the second slide? Worse
11452 still, what if you want a graph and a sentence on second slide, but there
11453 is text on the main transparency that goes in between them? You could try
11454 and insert vertical space of the right size.
11455 The better way is to use
11466 \begin_layout Standard
11467 As their names imply,
11475 are two command-like paragraph environments that make all subsequent text
11476 invisible and visible, respectively.
11477 Note from section\InsetSpace ~
11479 \begin_inset LatexCommand \ref{sec:slideQuirk}
11483 that you don't place anything
11487 these two environments, however.
11492 , it inserts a centered, sky-blue label into the page reading
11493 \begin_inset Quotes eld
11496 <Invisible Text Follows>
11497 \begin_inset Quotes erd
11501 For paragraphs following this label, the parts of the
11509 ; it doesn't matter which] where they would be contain instead blank space.
11513 \begin_layout Standard
11518 , the corresponding centered label is
11519 \begin_inset Quotes eld
11522 <Visible Text Follows>
11523 \begin_inset Quotes erd
11527 Paragraphs following this label behave normally.
11528 Note that the beginning of a new
11540 automatically shuts off an
11545 It's therefore not necessary to use
11556 \begin_layout Standard
11557 By now, it should be obvious how to create overlay transparencies using
11558 the proper combination of
11577 \begin_layout Enumerate
11582 , including everything that will appear on it, whether on the main slide
11590 \begin_layout Enumerate
11591 Before each figure or paragraph that will appear only on the
11600 If necessary, insert a
11604 environment after the
11611 \begin_layout Enumerate
11616 immediately following the
11623 \begin_layout Enumerate
11624 Copy the contents of this
11635 \begin_layout Enumerate
11640 , change all of the
11651 \begin_layout Standard
11653 You've just made an
11660 \begin_layout Standard
11661 There's one problem with the way I've designed the LyX
11665 class: you can't make text in the middle of a paragraph invisible, nor
11666 make text in the middle of an invisible paragraph visible again.
11667 To accomplish this feat, you'll need to use some inlined LaTeX codes.
11671 \begin_layout Standard
11672 The commands of interest are:
11675 \begin_layout Itemize
11680 invisible \SpecialChar \ldots{}
11684 \begin_layout Itemize
11689 visible \SpecialChar \ldots{}
11693 \begin_layout Standard
11694 \SpecialChar \ldots{}
11695 and need to be marked as TeX.
11697 \begin_inset Quotes eld
11701 \begin_inset Quotes erd
11704 you wish to change goes in between the brackets [and after the
11717 If you don't know how to mark text as TeX, see the apprpriate section of
11730 \begin_layout Subsubsection
11740 \begin_inset LatexCommand \label{sec:slideNote}
11747 \begin_layout Standard
11756 is associated with a
11757 \begin_inset Quotes eld
11761 \begin_inset Quotes erd
11773 class provides visual cues.
11778 is shorter than that of a
11782 [yet longer than that of an
11786 ] and, like the label of an
11790 is shockingly magenta.
11791 Additionally, the printed
11795 has the page number of its
11796 \begin_inset Quotes eld
11800 \begin_inset Quotes erd
11808 \begin_inset Quotes eld
11816 \begin_inset Quotes erd
11820 \begin_inset Quotes eld
11828 \begin_inset Quotes erd
11832 \begin_inset Quotes eld
11840 \begin_inset Quotes erd
11844 You can have multiple
11848 s associated with a single
11860 , you'll probably want to break up long
11864 s so that they fit on a single sheet of paper.
11867 \begin_layout Standard
11872 is obvious: it contains anything additional you might want to say about
11878 It could also be used as a sheet of reminders for a particular
11883 In the case of the latter, you might want to make use of time markers.
11889 \begin_inset Quotes eld
11893 \begin_inset Quotes erd
11896 support for time markers, a
11901 So, you'll have to resort to using the LaTeX codes.
11904 \begin_layout Standard
11905 To use time markers, you'll need to specify the extra class option
11906 \begin_inset Quotes eld
11914 \begin_inset Quotes erd
11917 [see section\InsetSpace ~
11919 \begin_inset LatexCommand \ref{sec:slidesetup}
11924 This option turns on timing marks, which will appear in the lower-left-hand
11930 To set what appears in the time marker, you use the LaTeX commands
11931 \begin_inset Quotes eld
11941 \begin_inset Quotes erd
11945 \begin_inset Quotes eld
11955 \begin_inset Quotes erd
11959 The arguments of both commands are time measured in seconds.
11961 \begin_inset Quotes eld
11971 \begin_inset Quotes erd
11974 sets the time marker to a given time.
11976 \begin_inset Quotes eld
11986 \begin_inset Quotes erd
11989 increments the time marker by the specified amount.
11990 Using time markers and
11994 s in this fashion, you can remind yourself how much time to spend on a particula
12002 \begin_layout Standard
12003 There's one last feature to describe.
12004 Clearly, you'd like to print out all of your
12012 s on transparencies while printing all of your
12029 with which it is associated.
12030 What's a person to do?
12033 \begin_layout Standard
12034 Luckily, there are two LaTeX commands that allow you to select what to print
12036 Both must be placed into the preamble of your document.
12038 \begin_inset Quotes eld
12050 \begin_inset Quotes erd
12053 will cause the output to contain only the
12062 Correspondingly, the command
12063 \begin_inset Quotes eld
12075 \begin_inset Quotes erd
12078 prevents the output of anything but
12083 I'd advise placing both commands in the preamble and initially comment
12085 You can then preview your entire presentation as you write.
12086 When you're done writing, you can then uncomment one of the two to select
12087 what you want to print.
12088 I like to uncomment
12089 \begin_inset Quotes eld
12101 \begin_inset Quotes erd
12104 , print to a file with
12105 \begin_inset Quotes eld
12113 \begin_inset Quotes erd
12116 in its name, comment it back out, then uncomment
12117 \begin_inset Quotes eld
12129 \begin_inset Quotes erd
12133 \begin_inset Quotes eld
12141 \begin_inset Quotes erd
12145 I can then send either file to a printer, loading transparencies or plain
12146 paper as appropriate.
12149 \begin_layout Standard
12150 You can also provide other arguments to the
12151 \begin_inset Quotes eld
12161 \begin_inset Quotes erd
12165 \begin_inset Quotes eld
12175 \begin_inset Quotes erd
12179 See a good LaTeX book for details.
12182 \begin_layout Subsection
12187 Class Template File
12190 \begin_layout Standard
12191 I have also provided a template file,
12192 \begin_inset Quotes eld
12200 \begin_inset Quotes erd
12208 To use it, begin your new presentation with
12213 ile\SpecialChar \menuseparator
12223 Your new LyX presentation file will contain an example
12244 additionally contain an example of the use of
12253 Lastly, the preamble will contain:
12256 \begin_layout LyX-Code
12257 % Uncomment to print out only slides and overlays
12260 \begin_layout LyX-Code
12264 \begin_layout LyX-Code
12274 \begin_layout LyX-Code
12275 % Uncomment to print out only notes
12278 \begin_layout LyX-Code
12282 \begin_layout LyX-Code
12290 \begin_layout Standard
12291 One final thing: I created this class to support the LaTeX2e
12292 \begin_inset Quotes eld
12300 \begin_inset Quotes erd
12303 class, one of the built-in LaTeX2e classes.
12304 Neither I nor the rest of the LyX Team endorse or oppose the use of this
12305 built-in slide class.
12306 It's here if you want it or need it.
12307 There exist other LaTeX2e classes for creating presentations, such as the
12312 class [see section\InsetSpace ~
12314 \begin_inset LatexCommand \ref{sec:foiltex}
12319 \begin_inset Quotes eld
12327 \begin_inset Quotes erd
12330 package [present on some TeX distributions].
12331 The latter is not yet supported under LyX.
12335 \begin_layout Standard
12336 Perhaps you can take on the task\SpecialChar \ldots{}
12342 I know nothing about these other classes.
12343 Try them out to see what sort of alternative they provide.
12346 \begin_layout Section
12355 \begin_inset LatexCommand \label{sec:foiltex}
12362 \begin_layout Standard
12368 \begin_layout Subsection
12372 \begin_layout Standard
12373 This section describes how to use LyX to make slides for overhead projectors.
12374 There are two document classes that can do this: the default slides class
12380 This section documents the latter.
12383 \begin_layout Standard
12384 I'm going to say this again, nice and clear, so that there's no misunderstanding
12388 \begin_layout Standard
12389 \begin_inset VSpace bigskip
12395 \begin_layout Standard
12399 This section documents the class
12400 \begin_inset Quotes eld
12408 \begin_inset Quotes erd
12416 \begin_layout Standard
12417 \begin_inset VSpace bigskip
12423 \begin_layout Standard
12424 If you're looking for the documentation for
12425 \begin_inset Quotes eld
12433 \begin_inset Quotes erd
12436 , check out section\InsetSpace ~
12438 \begin_inset LatexCommand \ref{sec:slitex}
12443 If your machine doesn't have the
12448 \begin_inset Quotes eld
12456 \begin_inset Quotes erd
12459 ] installed, you'll probably have to use the default
12463 class, which isn't quite as good as
12468 \begin_layout Standard
12473 class is designed for use with version 2.1 of the
12477 LaTeX class file which is now an integral part of LaTeX2e.
12480 \begin_layout Subsection
12484 \begin_layout Standard
12485 Obviously, to use this document class, you need to select
12486 \begin_inset Quotes eld
12494 \begin_inset Quotes erd
12506 Document\InsetSpace ~
12510 There are some settings in the
12512 Document\InsetSpace ~
12515 dialog that you should know about that are specific to this class:
12518 \begin_layout Itemize
12519 Don't change the options
12529 Document\InsetSpace ~
12533 They're ignored by the
12540 \begin_layout Itemize
12541 The default font size is 20pt with the other options being 17pt, 25pt and
12545 \begin_layout Itemize
12546 The default font is
12554 but all math equations are still typeset in the usual roman font.
12557 \begin_layout Itemize
12562 TeX supports A4 and Letter paper sizes as well as a special size for working
12564 It doesn't support A5, B5, legal or executive paper sizes.
12567 \begin_layout Itemize
12568 Don't bother changing the
12572 settings because they are ignored anyway.
12573 All floats appear where they are defined in the text.
12576 \begin_layout Itemize
12584 setting behaves a bit differently for this class.
12589 TeX provides extensive footer and header capabilities including a user-defined
12591 See section\InsetSpace ~
12593 \begin_inset LatexCommand \ref{sec:foilfoot}
12598 The title page is treated differently to all other pages in the document
12607 has the logo centered at the bottom of the page (if one is defined).
12608 The possible page style choices and what they do are as follows:
12613 \labelwidthstring MMMMMMM
12620 The final output contains no page numbers, or other headers or footers
12621 (except footnotes of course).
12626 \labelwidthstring MMMMMMM
12633 The final output contains page numbers centered at the bottom of the page.
12634 No other headings or footers (other than footnotes).
12638 \labelwidthstring MMMMMMM
12643 Page numbers in lower right corner.
12644 Additional headers and footers are also shown.
12645 This is also the default.
12649 \labelwidthstring MMMMMMM
12654 Gives you access to the
12658 package although its use with
12662 TeX is discouraged by the writer of the
12666 TeX package because of some potential page layout clashes.
12670 \begin_layout Subsubsection
12674 \begin_layout Standard
12675 The following options may be used in the extra class options in the
12680 ocument\SpecialChar \menuseparator
12691 \labelwidthstring MMMMMMx
12696 This sets up the page layout for 7.33in by 11in paper, which is about the
12697 same aspect ratio as a 35mm slide, making it a bit easier to work with
12702 \labelwidthstring MMMMMMx
12707 Places a rule across the page below the header on every page except the
12712 \labelwidthstring MMMMMMx
12717 Places a rule across the page above the footer on every page except the
12722 \labelwidthstring MMMMMMx
12727 This is automatically set each time you create a new
12736 TeX to use the dvips driver to rotate those pages that are set as landscape
12741 \labelwidthstring MMMMMMx
12746 Simply changes the page dimensions to those of a landscape page but doesn't
12748 Thus if you use this option you need to use an external program to rotate
12749 each page or feed your paper through your printer as landscape.
12750 Note that this option effectively reverses the roles of the
12758 environments (don't worry these are described in the next section).
12762 \labelwidthstring MMMMMMx
12767 Equation numbers on the left.
12771 \labelwidthstring MMMMMMx
12776 Flush-left equations.
12779 \begin_layout Subsection
12780 Supported Environments
12783 \begin_layout Standard
12784 Most of the environments commonly supported in other classes are also supported
12790 There are several additional environments provided by
12794 TeX as well as a couple added by LyX.
12795 The following environments are shared with other classes:
12798 \begin_layout Standard
12802 \begin_layout Standard
12806 begin{multicols}{2}
12814 \begin_layout Itemize
12820 \begin_layout Itemize
12826 \begin_layout Itemize
12832 \begin_layout Itemize
12838 \begin_layout Itemize
12844 \begin_layout Itemize
12850 \begin_layout Itemize
12856 \begin_layout Itemize
12862 \begin_layout Itemize
12868 \begin_layout Itemize
12874 \begin_layout Itemize
12880 \begin_layout Itemize
12886 \begin_layout Itemize
12892 \begin_layout Itemize
12898 \begin_layout Itemize
12904 \begin_layout Itemize
12910 \begin_layout Itemize
12916 \begin_layout Itemize
12922 \begin_layout Standard
12926 \begin_layout Standard
12938 \begin_layout Standard
12939 That is, all the major environments apart from the sectioning environments.
12940 Since foils are essentially self-contained sections, with a title and body,
12945 TeX provides specific commands for starting new foils and these are:
12948 \begin_layout Itemize
12954 \begin_layout Itemize
12960 \begin_layout Standard
12961 LyX also provides slightly modified versions of these two environments called:
12964 \begin_layout Itemize
12970 \begin_layout Itemize
12973 ShortRotatefoilhead
12976 \begin_layout Standard
12977 and the differences will be explained in the next section.
12980 \begin_layout Standard
12981 Since foils are often used in presenting ideas or new theorems and such
12986 TeX also provides a comprehensive box of goodies for presenting them:
12989 \begin_layout Standard
12993 \begin_layout Standard
12997 begin{multicols}{2}
13005 \begin_layout Itemize
13011 \begin_layout Itemize
13017 \begin_layout Itemize
13023 \begin_layout Itemize
13029 \begin_layout Itemize
13035 \begin_layout Itemize
13041 \begin_layout Itemize
13047 \begin_layout Itemize
13053 \begin_layout Itemize
13059 \begin_layout Itemize
13065 \begin_layout Itemize
13071 \begin_layout Standard
13075 \begin_layout Standard
13087 \begin_layout Standard
13088 The starred versions are unnumbered while the unstarred versions are numbered.
13089 There are also two list environments added by LyX and these are:
13092 \begin_layout Itemize
13098 \begin_layout Itemize
13104 \begin_layout Standard
13109 TeX provides some powerful header and footer capabilities that are best
13110 set in the preamble although they may be set at any point in a document.
13111 If you want to change these settings in your document the best place to
13112 do so is at the very top of a foil,
13117 straight after the foilhead.
13120 \begin_layout Standard
13121 For this purpose, the following command styles are provided [
13128 \begin_layout Standard
13132 \begin_layout Standard
13136 begin{multicols}{2}
13144 \begin_layout Itemize
13151 \begin_layout Itemize
13157 \begin_layout Itemize
13164 \begin_layout Itemize
13171 \begin_layout Itemize
13179 \begin_layout Standard
13185 \begin_layout Standard
13189 \begin_layout Standard
13201 \begin_layout Standard
13202 There are also a few commands provided by
13206 TeX that aren't directly supported by LyX but I'll tell you what they do
13207 and how to use them in section\InsetSpace ~
13209 \begin_inset LatexCommand \ref{sec:unsuppfoils}
13216 \begin_layout Subsection
13217 Building a Set of Foils
13220 \begin_layout Standard
13221 This section will give a simple introduction to using the different environments
13222 to build a set of foils.
13223 If you want to see an example set of foils take a look at the
13227 file accessible from the
13232 ile\SpecialChar \menuseparator
13237 pen\SpecialChar \ldots{}
13248 \begin_layout Subsubsection
13249 Give It a Title Page
13252 \begin_layout Standard
13253 Unlike other classes that provide
13273 creates the title on a page of its own.
13274 If you leave out the
13278 environment LaTeX will substitute the current date (every time you regenerate
13282 \begin_layout Subsubsection
13286 \begin_layout Standard
13287 As I mentioned earlier, there are four ways of starting a new foil.
13288 For portrait foils you should use
13297 The difference between these two environments is the amount of space between
13298 the title of the foil (the foilhead) and the body of the foil.
13301 \begin_layout Standard
13302 Landscape foils are generated using the
13308 ShortRotatefoilhead
13311 Again the only difference is the spacing between foilhead and body.
13312 Both of the short versions have 0.5 inches less separation between the foilhead
13317 \begin_layout Standard
13318 One problem with the support for landscape foils is the requirement that
13319 you have to use the
13323 driver to generate the PostScript® output otherwise the foils won't be
13325 It is possible to get landscape foils even if you haven't got the
13329 driver provided you can feed your foils sideways through your printer ;-)
13332 \begin_layout Subsubsection
13333 Theorems, Lemmas, Proofs and more
13336 \begin_layout Standard
13337 Due to a small bug in LyX you can't have two of the same type of these environme
13338 nts directly following each other.
13339 They must be separated by something.
13340 If you try, you will just be extending the previous environment as if you
13341 had merged the two environments together.
13342 So, how do you get around this problem? The simplest option is to insert
13343 some text between the two environments or add a
13347 environment between the two with just a
13348 \begin_inset Quotes eld
13356 \begin_inset Quotes erd
13360 This will force LyX to produce two separate environments and hence the
13361 correct LaTeX output.
13362 An example is provided in the example file included with the LyX distribution.
13363 Remember, this problem only occurs if you are trying to place two of the
13364 same type of theorem-like environments one directly after the other.
13367 \begin_layout Subsubsection
13371 \begin_layout Standard
13372 You get all the commonly supported list styles found in other classes as
13373 well as two new ones.
13374 I'll only describe the new ones here.
13375 If you want to find out more about the other list environments check out
13381 If you intend to use itemized lists you might also want to read about the
13384 Itemize\InsetSpace ~
13385 Bullet\InsetSpace ~
13388 dialog described above in section\InsetSpace ~
13390 \begin_inset LatexCommand \ref{sec:bullet}
13397 \begin_layout Standard
13398 The two new list styles,
13406 , are designed to make it easier for you to create lists of do's and don'ts
13407 or right and wrong by providing dedicated environments that use a tick
13408 or a cross as the label of the list.
13409 These lists are in fact dedicated variants of the
13414 They do however require that you have the
13418 packages installed.
13421 \begin_layout Subsubsection
13425 \begin_layout Standard
13430 TeX redefines the floating tables and figures so that they appear exactly
13431 where they are in the text rather than pushing them to the top of the page
13432 or to some user specified location.
13433 In fact if you change the float placement settings they are simply ignored.
13436 \begin_layout Subsubsection
13437 Page Headers and Footers
13438 \begin_inset LatexCommand \label{sec:foilfoot}
13445 \begin_layout Standard
13455 are two commands used to control the left-footer text string.
13456 The first is meant to allow you to include a graphic logo on your foils
13458 \begin_inset Quotes eld
13466 \begin_inset Quotes erd
13470 While the second is meant to provide a classification for the audience,
13477 It is empty by default.
13480 \begin_layout Standard
13481 The remaining page corners can be filled by
13486 (which defaults to page numbers),
13499 \begin_layout Subsection
13505 \begin_inset LatexCommand \label{sec:unsuppfoils}
13512 \begin_layout Standard
13513 All the commands mentioned below need to be set in a
13521 within another environment.
13524 \begin_layout Subsubsection
13528 \begin_layout Standard
13529 All lengths are adjusted using the
13552 should be replaced by the name given to the length you want to change and
13557 is the length value.
13558 All lengths should be specified in units of length such as inches (
13570 ) or relative to some document or font-based length such as
13580 \begin_layout Standard
13581 It's possible to change the spacing between a foilhead and the body of the
13582 foil by adjusting the length specified by
13589 For example, to make
13593 foilheads 0.5 inches closer to their bodies put the following in the preamble:
13600 foilheadskip}{-0.5in}
13603 \begin_layout Standard
13604 The spacings around floats can be adjusted by setting these lengths:
13608 \labelwidthstring MMMMMMMMMMM
13615 Separation between the text and the top of the float
13619 \labelwidthstring MMMMMMMMMMM
13626 Separation between the float and the caption
13630 \labelwidthstring MMMMMMMMMMM
13637 Separation between the caption and the following text
13641 \labelwidthstring MMMMMMMMMMM
13648 You can make the captions narrower than the surrounding text by adjusting
13650 Best done relative to
13659 \begin_layout Standard
13660 There are also several title page related lengths that you may find useful
13661 if you have a long title or several authors:
13665 \labelwidthstring MMMMMMMMMMM
13672 Separation from headers to
13678 \labelwidthstring MMMMMMMMMMM
13697 \labelwidthstring MMMMMMMMMMM
13712 \labelwidthstring MMMMMMMMMMM
13729 \labelwidthstring MMMMMMMMMMM
13745 \begin_layout Standard
13746 The last length related command affects all the list environments.
13757 a list environment then all the vertical spacing between the list items
13759 Note that this is a command not a length so it doesn't require
13765 like the stuff mentioned above.
13768 \begin_layout Subsubsection
13769 Headers and Footers
13772 \begin_layout Standard
13785 commands control whether the logo in the
13789 definition appear on a given page.
13796 in the preamble then none of the foils will have the logo on them.
13797 If you don't want the logo on a particular page place the
13803 directly after the foilhead of that page and the
13809 directly after the next foilhead.
13812 \begin_layout Standard
13813 If you decide to use the
13817 page style setting in the
13819 Document\InsetSpace ~
13822 dialog you should probably add
13832 to your preamble so headers and footers on landscape pages are correctly
13833 placed when rotated.
13834 This is due to some clashes between the page layouts provided by the
13845 \begin_layout Section
13846 Latex8 (IEEE Conference Papers)
13849 \begin_layout Standard
13855 \begin_layout Subsection
13859 \begin_layout Standard
13860 Since this class is specifically for writing submissions to IEEE sponsored
13861 conferences I strongly recommend that you get a copy of their Authors Kit.
13866 package and associated bibliography style file is included in the kit.
13867 The Authors Kit is usually sent out by email once your initial submission
13869 There is a lot of useful information in the Authors Kit explaining formatting
13870 restrictions and so on and I will assume you have read this since that
13871 means I don't have to repeat it all here.
13874 \begin_layout Subsection
13878 \begin_layout Standard
13879 [AR\SpecialChar \@.
13883 \begin_layout Subsection
13884 Supported Environments
13887 \begin_layout Itemize
13893 \begin_layout Itemize
13899 \begin_layout Itemize
13905 \begin_layout Itemize
13911 \begin_layout Itemize
13917 \begin_layout Itemize
13923 \begin_layout Itemize
13929 \begin_layout Itemize
13935 \begin_layout Itemize
13941 \begin_layout Subsection
13942 Differences Between Screen and Paper
13945 \begin_layout Standard
13946 There are slight differences in appearance mainly with the presentation
13947 of section counters.
13948 On screen the trailing period of the section counter is missing but it
13949 will appear in the output so don't let this worry you.
13952 \begin_layout Section
13953 Hollywood (Hollywood spec scripts)
13956 \begin_layout Standard
13962 \begin_layout Subsection
13966 \begin_layout Standard
13967 Getting the format of a Hollywood script right is a
13968 \begin_inset Quotes eld
13972 \begin_inset Quotes erd
13975 It is designed to make the readers focus on content and to be easy and
13976 familiar for the actors to read.
13977 Each page of a script should be one minute of film.
13978 Nothing goes in a script that you cannot see or hear on screen.
13979 The courier 12 pt font should be used throughout.
13983 \begin_layout Subsection
13987 \begin_layout Standard
13988 Speakers' lines should NEVER break in mid-sentence.
13989 If a speaker's lines continue over a page break, repeat the
13993 title followed by (Cont'd).
13996 \begin_layout Subsection
14000 \begin_layout Standard
14005 names as labels then cross-reference the label to insert the name.
14006 The cross-reference dialog will show the current cast of characters.
14007 You can use this to insert the speaker name in narratives also.
14010 \begin_layout Subsection
14011 Paper size and Margins
14014 \begin_layout Standard
14015 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
14018 \begin_layout Subsection
14022 \begin_layout Standard
14023 The following environments are available.
14024 You can use hollywood.bind to get the bind keys shown at the right.
14027 \begin_layout Itemize
14034 Used where nothing else works.
14038 \begin_layout Itemize
14051 Usually followed by something like
14052 \begin_inset Quotes eld
14055 on Sally waking up.
14056 \begin_inset Quotes erd
14062 \begin_layout Itemize
14071 Introduces a new INTERIOR camera set-up.
14072 Always followed by DAY or NIGHT, or something similar to define the lighting
14074 Everthing on this line in CAPS.
14077 \begin_layout Itemize
14086 Introduces a new EXTERIOR camera set-up.
14087 Everthing on this line in CAPS.
14090 \begin_layout Itemize
14099 The character speaking.
14102 \begin_layout Itemize
14111 Instructions to the speaker.
14112 The () are automatically inserted, but only the ( will show in LyX.
14113 Both will be printed.
14116 \begin_layout Itemize
14132 \begin_layout Itemize
14141 Camera movement instruction.
14146 \begin_layout Itemize
14154 \begin_layout Itemize
14162 \begin_layout Itemize
14170 \begin_layout Itemize
14178 \begin_layout Subsection
14182 \begin_layout Itemize
14183 (O.S) --- off screen
14186 \begin_layout Itemize
14187 (V.0) --- voice over
14190 \begin_layout Itemize
14195 \begin_layout Itemize
14200 \begin_layout Itemize
14201 PAN --- camera movement
14204 \begin_layout Itemize
14205 INSERT --- cut to close-up of
14208 \begin_layout Section
14212 \begin_layout Standard
14218 \begin_layout Subsection
14222 \begin_layout Standard
14223 Broadway is for writing plays.
14224 The format is more decorative than Hollywood, and much less standardized.
14225 This format should be suitable for workshops.
14228 \begin_layout Subsection
14232 \begin_layout Standard
14233 The same as in Hollywood.
14236 \begin_layout Subsection
14240 \begin_layout Standard
14245 names as labels then cross-reference the label to insert the name.
14246 The cross-reference dialog will show the current cast of characters.
14249 \begin_layout Subsection
14250 Paper size and Margins
14253 \begin_layout Standard
14254 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
14257 \begin_layout Subsection
14261 \begin_layout Standard
14262 The following environments are available.
14263 You can use broadway.bind to get the bind keys shown at the right.
14266 \begin_layout Itemize
14273 You should not have to use this, but it is here for anything that does not
14277 \begin_layout Itemize
14286 Used to describe stage setting and the action.
14287 First use of speaker names in all CAPs.
14290 \begin_layout Itemize
14299 Automatically numbered.
14300 On screen it will be arabic, but will print as Roman.
14303 \begin_layout Itemize
14317 It is just centered text.
14320 \begin_layout Itemize
14329 Not automatically numbered.
14330 You supply the number.
14331 This is because I couldn't figure out how.
14334 \begin_layout Itemize
14343 A special case of Narrative to describe the setting and action as the curtain
14347 \begin_layout Itemize
14356 The speaker's (actor's) title, centered in all CAPS.
14359 \begin_layout Itemize
14368 Instructions to the speaker.
14369 The parentheses are automatically inserted.
14370 The ( will appear on screen, but both will be in the printed play.
14371 This environment is only used within
14378 \begin_layout Itemize
14387 What the Speaker says.
14390 \begin_layout Itemize
14399 The curtain comes down.
14402 \begin_layout Itemize
14410 \begin_layout Itemize
14418 \begin_layout Itemize
14426 \begin_layout Standard
14430 \begin_layout Section
14434 \begin_layout Standard
14440 \begin_layout Standard
14441 \begin_inset VSpace bigskip
14447 \begin_layout Standard
14451 Revtex\InsetSpace ~
14454 textclass works with the American Physical Sociey's RevTeX 4.0 (the
14455 \begin_inset Formula $\beta$
14458 release of May, 1999) class.
14461 \begin_layout Standard
14466 textclass, which works with RevTeX 3.1.
14467 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
14468 That means that it doesn't interact very well with LyX, which requires
14469 LaTeX2e, although it has been kludged to work.
14470 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
14473 RevTeX\InsetSpace ~
14476 textclass should also be pretty easy to use.
14479 \begin_layout Standard
14480 These documents are supposed to be used in
14484 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
14485 macros, and assume you'll know what to put in the preamble if necessary.
14488 \begin_layout Subsection
14492 \begin_layout Standard
14493 All you need to do is install RevTeX 4, as described in the package's README
14495 the package can be found at
14496 \begin_inset LatexCommand \url[The RevTeX 4 Web Site]{http://publish.aps.org/revtex4/}
14501 Install it somewhere that LaTeX can see it.
14502 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
14503 (i.e., not the directory where you installed the class file.) Then, if you
14504 reconfigure LyX, it will find the class file and let you use the RevTeX4
14508 \begin_layout Standard
14509 Probably the easiest way to get started is either to import a RevTeX 4 document
14516 Revtex\InsetSpace ~
14519 template, found in the templates directory.
14522 \begin_layout Subsection
14526 \begin_layout Standard
14527 Optional arguments to
14534 \begin_inset Quotes eld
14538 \begin_inset Quotes erd
14542 \begin_inset Quotes eld
14546 \begin_inset Quotes erd
14560 Document\InsetSpace ~
14564 Remember that in RevTeX, at least one optional argument is required!
14567 \begin_layout Standard
14568 Other preamble matter, like
14580 dialog, also as usual.
14583 \begin_layout Subsection
14587 \begin_layout Standard
14588 The layouts basically correspond to the commands in RevTeX4.0.
14589 For example, the Email layout corresponds to
14596 Note that (at least as of RevTeX 4.0 Beta), the
14604 layouts are exactly equivalent, so you shouldn't need to use both.
14608 \begin_layout Standard
14609 In case you're curious, both were included so that
14613 would be able to translate both
14633 \begin_layout Subsection
14637 \begin_layout Standard
14638 There are a couple of important unique aspects of RevTeX 4 which might cause
14639 bugs that will be even more confusing in LyX.
14642 \begin_layout Standard
14660 The LyX equivalent is that there is a separate Thanks layout.
14665 write footnotes in the
14669 layout, or weird things may happen.
14670 See the RevTeX 4 documentation for more details.
14673 \begin_layout Standard
14676 Author\InsetSpace ~
14681 Author\InsetSpace ~
14688 layouts must be placed
14696 layout and the corresponding
14713 , the LaTeX won't compile.
14716 \begin_layout Subsection
14720 \begin_layout Standard
14721 The main problem with this layout is that you can't use the optional arguments
14722 to layouts like Email and Title.
14723 (The problem is not unique to this layout; you can't use optional arguments
14724 to the Section layouts either.) This means that after you export that file
14725 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
14726 need to edit the LaTeX file with a text editor to add the optional arguments
14727 to set, e.g., the running title for the page headers.
14728 Lacking these layouts makes the
14734 (and the equivalent
14740 ) useless, so the corresponding layouts don't exist, and will have to be
14745 \begin_layout Standard
14750 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
14751 has not been updated yet to take advantage of it.
14759 \begin_layout Section
14760 Article (mwart), book (mwbk) and report (mwrep)
14761 \begin_inset OptArg
14764 \begin_layout Standard
14777 \begin_layout Standard
14783 \begin_layout Standard
14784 The LyX document classes
14800 correspond to the LaTeX document classes
14813 They are replacements for the standard document classes
14825 , resp., and fit better to Polish typography conventions in a number of points.
14829 \begin_layout Standard
14833 \begin_layout Itemize
14834 Unnumbered titles (with star, eg.
14839 ) are added into table of contents,
14842 \begin_layout Itemize
14843 Additional page styles:
14847 \begin_layout Description
14848 uheadings header with separated lines,
14851 \begin_layout Description
14852 myheadings custom header, contents headers via commands:
14867 \begin_layout Description
14868 myuheadings custom header with separated lines,
14871 \begin_layout Description
14872 outer page number is placed on outer side of page
14876 \begin_layout Itemize
14881 \begin_layout Description
14882 rmheadings serif titles --- default,
14885 \begin_layout Description
14886 sfheadings sansserif titles,
14889 \begin_layout Description
14890 authortitle on title page first placed is author next title --- default,
14893 \begin_layout Description
14894 titleauthor on title page first placed is title next author,
14897 \begin_layout Description
14898 withmarginpar reserve place on page for margins.
14902 \begin_layout Section
14906 \begin_layout Standard
14912 \begin_layout Standard
14913 Elsevier Science Publishers B.V.
14914 provides a standard LaTeX document class (
14918 ) for submitting articles to their various journals.
14919 The style file can be downloaded directly from their web site:
14920 \begin_inset LatexCommand \url{http://authors.elsevier.com/}
14925 Instructions are supplied along with the class file, which details the
14926 requirements of the publishers.
14927 LyX includes package that allows for the use of this class, by a layout
14928 and a template file.
14929 Installation of the class file is the same as for any other LaTeX package;
14930 instructions are provided in the Elsevier documentation.
14933 \begin_layout Standard
14943 As the Elsevier class file is based mainly on the standard article class,
14944 most of the normal functionality is provided.
14945 The Elsevier class defines a number of mathematical environments, which
14946 are similar to the AMS environments.
14947 These commands are all described in the Elsevier documentation, and are
14951 \begin_layout Standard
14952 The easiest way to use the Elsevier style is to base documents on the included
14954 It is best not to use options such as fancy headings or the geometry package,
14955 as elements such as these are defined by Elsevier in their style file.
14956 Ideally, no extra packages except those mentioned in the Elsevier documentation
14958 Essentially, Elsevier require as
14959 \begin_inset Quotes eld
14963 \begin_inset Quotes erd
14970 \begin_layout Standard
14979 file as possible, as their intention is to take the supplied file and replace
14980 the class file with one for the particular journal to which the paper has
14982 This also means that not too much time should be spent on the formating
14984 When it comes to be published, this will change anyway.
14985 The rest of the usage for this layout is substantially the same as for
14986 the normal article class.
14987 For details of what Elsevier do and don't allow, refer to their documentation.
14990 \begin_layout Section
14994 \begin_layout Standard
14997 Jürgen Spitzmüller
15000 \begin_layout Subsection
15004 \begin_layout Standard
15005 Memoir is a very powerful and constantly evolving class.
15006 It has been designed with regard to fictional and non-fictional literature.
15007 Its aim is to let the user have maximum control over the typesetting of
15009 Memoir is based on the standard book class, but it can also emulate the
15010 article class (see below).
15013 \begin_layout Standard
15014 Peter Wilson, the developer of Memoir, is known as the author of lots of
15015 useful packages in the LaTeX world.
15016 Most of them have been merged with Memoir.
15017 Therefore, it is much easier to layout the table of contents, appendices,
15018 chapter designs and such.
15019 LyX, though, does not support all of these goodies natively.
15020 Some of them might be added to forthcoming releases
15024 \begin_layout Standard
15025 You are invited to send suggestions to
15026 \begin_inset LatexCommand \url{lyx-devel@lists.lyx.org}
15035 , lots will probably never, due to the limitations of LyX's framework.
15036 Of course you can still use all features with the help of some native LaTeX
15041 \begin_layout Standard
15046 \begin_layout Standard
15055 section\InsetSpace ~
15057 \begin_inset LatexCommand \ref{sec:Inserting-LaTeX-Code}
15067 In this section, we can only list those features which are natively supported
15069 For detailed descriptions (and for the rest of features) we are recommending
15070 to have a look at the detailed manual of the Memoir class
15074 \begin_layout Standard
15079 \begin_layout Standard
15089 \begin_inset LatexCommand \url{CTAN:/macros/latex/memoir/memman.pdf}
15098 , which is not only a user guide for the class, but also both a comprehensive
15099 description on good typesetting and a superb example for good typesetting
15103 \begin_layout Subsection
15104 Basic features and restrictions
15107 \begin_layout Standard
15108 Memoir supports basically all features of the standard book classes.
15109 There are, however, some differences, as follows:
15112 \begin_layout Description
15114 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14,
15118 \begin_layout Description
15120 style: The fancy page style is not supported, due to a command clash
15121 between Memoir and the fancyhdr package (they are both defining a command
15122 with the same name, which confuses LaTeX).
15123 Instead, Memoir comes with a bunch of own page styles (see
15125 Layout\SpecialChar \menuseparator
15126 Document\SpecialChar \menuseparator
15131 If you want to use these for the chapter pages, you have to use the command
15138 in the main text or in preamble (e.
15142 \begin_layout Standard
15155 \begin_layout Standard
15168 chapterstyle{companion}
15173 \begin_layout Description
15174 Sectioning: Sectionings (chapter, section, subsection etc.) are coming with
15175 an optional argument in the standard classes.
15176 With this, you can specify an alternative version of the title for the
15177 table of contents and the headers (for instance, if the title is too long).
15178 In LyX, you can do this via
15180 Insert\SpecialChar \menuseparator
15184 at the beginning of a chapter/section.
15185 Memoir features a second optional argument and thus separates the table
15186 of contents from the header.
15187 You can define three variants of a title with this: one for the main text,
15188 one for the table of contents, and one for the headers.
15189 Simply insert two optional arguments if you need this feature, the first
15190 one containing the short title for the Table of Contents, the second one
15191 containing an alternative short title for the headers.
15194 \begin_layout Description
15195 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
15196 of contents, the list of figures and the list of table start a new page
15198 Memoir does not follow this route.
15199 You have to insert a page break yourself, if you want to have one.
15202 \begin_layout Description
15203 Titlepage: For some unknown reason, Memoir uses pagination on the title
15204 page (in the standard classes, title pages are
15205 \begin_inset Quotes eld
15209 \begin_inset Quotes erd
15216 \begin_layout Standard
15229 \begin_layout Standard
15239 If you want an empty title page, type
15243 aliaspagestyle{title}{empty}
15248 \begin_layout Description
15249 Article: With the class option
15255 Layout\SpecialChar \menuseparator
15256 Document\SpecialChar \menuseparator
15260 ), you can emulate article style.
15261 That is, counters (footnotes, figures, tables etc.) will not be reset on
15262 new chapters, chapters don't start a new page (but are---in contrary to
15264 \begin_inset Quotes eld
15268 \begin_inset Quotes erd
15271 article classes---still allowed), parts, though, use their own page, as
15275 \begin_layout Description
15276 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
15277 font commands, which have been used in the old LaTeX version 2.09 (e.
15281 \begin_layout Standard
15294 \begin_layout Standard
15316 It produces an error and stops LaTeX whenever such a command appears.
15321 reallows the commands and spits out warnings instead (which does at least
15323 Since a lot of packages and particularly BibTeX style files are still using
15324 those commands, we have decided to use this option by default.
15327 \begin_layout Subsection
15331 \begin_layout Standard
15332 We will only describe the features supported by LyX (which is not much currently
15334 Please consult the Memoir manual
15338 \begin_layout Standard
15343 \begin_layout Standard
15353 \begin_inset LatexCommand \url{CTAN:/macros/latex/memoir/memman.pdf}
15365 \begin_layout Description
15366 Abstract: You may wonder why an abstract is an extra feature.
15367 Well, it is in book class.
15368 Usually books don't have abstracts.
15369 Memoir, however, has.
15370 You can use it whereever and how often you like.
15373 \begin_layout Description
15374 Chapterprecis: You may know this from belletristic: The contents of a chapter
15375 is shortly described below the title and also in the table of contents
15380 \begin_layout Standard
15393 \begin_layout Standard
15404 Our hero arrives in Troia; he loses some friends; he finds others
15407 Chapterprecis does exactly this.
15408 It is therefore only sensible below a chapter.
15411 \begin_layout Description
15412 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
15413 The epigraph environment provides an elegant way of typesetting such a
15415 The motto itself (text) and its author (source) are divided by a short
15417 Unfortunately, we have to fool LyX a bit here again, since the environment
15418 needs two arguments (text and source).
15419 In this case, we have to use curly brackets (in TeX mode) between the two
15430 <author of the slogan>.
15433 \begin_layout Description
15434 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
15435 complex figurative poems).
15436 Lyx can only support a few of them.
15437 One is poemtitle, which is a centered title for poems, which will also
15438 be added to the table of contents (verse is the standard environment for
15440 Memoir has some enhanced versions of verse, but you need to use ERT, because
15441 they have to be nested inside regular verse environments, which is not
15442 possible with LyX).
15445 \begin_layout Description
15446 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
15449 \begin_layout Chapter
15450 Importing and Exporting Alternate File Formats
15451 \begin_inset OptArg
15454 \begin_layout Standard
15455 Importing and Exporting
15463 \begin_layout Section
15467 \begin_layout Standard
15468 Importing and exporting LyX documents from/to other formats has been touched
15474 Here we describe more of the gory details needed to understand just what
15475 is going on when you click on the
15480 ile\SpecialChar \menuseparator
15492 ile\SpecialChar \menuseparator
15503 \begin_layout Section
15504 Importing Other Formats
15507 \begin_layout Subsection
15511 \begin_layout Standard
15512 Translating from LaTeX into LyX is performed by a Perl script called reLyX.
15513 Although it is a standalone program which can be called from the command
15514 line, LyX will call it automatically when a LaTeX document is imported.
15515 See section\InsetSpace ~
15517 \begin_inset LatexCommand \ref{sec:reLyX}
15521 for a complete description.
15522 There are no user tunable parameters for reLyX within LyX.
15525 \begin_layout Subsection
15529 \begin_layout Standard
15530 When importing plain ASCII text, there are two methods of reading the file.
15532 \begin_inset Quotes eld
15536 \begin_inset Quotes erd
15539 preserves all the linebreaks in the ASCII; to LyX, then, each line looks
15542 \begin_inset Quotes eld
15546 \begin_inset Quotes erd
15549 assumes that consecutive lines separated by only a single linebreak form
15550 a single paragraph.
15551 Successive linebreaks with no intervening text are thus assumed to be paragraph
15555 \begin_layout Subsection
15559 \begin_layout Standard
15562 [Editor's note: Needs to be written, obviously - any volunteers? --- mer]
15565 \begin_layout Section
15566 Exporting Other Formats
15569 \begin_layout Subsection
15573 \begin_layout Standard
15574 LyX generates two types of LaTeX files: stripped down versions for the normal
15579 , etc.) which one normally never sees
15583 \begin_layout Standard
15584 The resulting file is a perfectly valid LaTeX file, though the preamble
15585 might look a bit strange since it includes some definitions used by LyX
15586 which wouldn't show up in most human-written files.
15591 , and human readable forms which are suitable for exchanging with your colleague
15593 The only settable option for the translation is the line length of the
15595 The default is 65 characters, but it can be set in
15602 \SpecialChar \menuseparator
15623 \begin_layout Subsection
15624 Device Independent Files
15627 \begin_layout Standard
15628 Device Independent files (DVI files) are produced by running LaTeX on your
15630 There are no user settable options.
15633 \begin_layout Subsection
15637 \begin_layout Standard
15638 The next step in the conversion chain is converting a DVI file into Postscript®.
15646 \SpecialChar \menuseparator
15654 \SpecialChar \menuseparator
15663 or, if you need more control on the result,
15670 \SpecialChar \menuseparator
15679 If you use the later, note that it is possible to configure, in
15686 \SpecialChar \menuseparator
15694 , the options passed to the dvips program to achieve different effects.
15697 \begin_layout Subsection
15701 \begin_layout Standard
15702 Exporting as ASCII attempts to preserve the
15703 \begin_inset Quotes eld
15707 \begin_inset Quotes erd
15710 of the document as well as possible, but things like centering and indentation
15711 are thrown out; paragraphs are separated by blank lines.
15712 Section numbering and cross-references are done correctly, so the resulting
15713 text files is remarkably readable.
15714 The only changeable option is the length of lines, as for LaTeX output.
15717 \begin_layout Subsection
15721 \begin_layout Standard
15722 LyX documents can be converted to hypertext markup, usually by converting
15723 to LaTeX first, then converting that to HTML\SpecialChar \@.
15725 \begin_inset Formula $\rightarrow$
15728 HTML converters are currently known to LyX:
15745 Though they are autodetected, you can overide the selection in preferences.
15746 You can also include further command line options in this dialog.
15750 \begin_layout Subsection
15754 \begin_layout Standard
15762 \begin_layout Standard
15763 \begin_inset VSpace bigskip
15769 \begin_layout Standard
15770 The fastest way to generate a basic PDF file (no tags, links, etc.) with
15771 any version of LyX is to save the document as a Postscript® file, then
15777 Starting with version 1.1.6, the menu item
15781 will do all this for you.
15782 There are some issues with fonts that you need to pay attention to: see
15783 Section\InsetSpace ~
15785 \begin_inset LatexCommand \ref{sec:badfonts}
15790 Also, as of version 1.1.6, there is a better method that will generate much
15791 more sophisticated files.
15794 \begin_layout Subsubsection
15798 \begin_layout Standard
15799 With pdfLaTeX you need to convert your eps figures to PDF (see Section\InsetSpace ~
15801 \begin_inset LatexCommand \ref{sec:pdfeps}
15805 ), and you cannot use pstricks.
15806 On the other hand, with pdfLaTeX it is possible to insert directly images
15807 in JPEG or PNG format, use TrueType fonts, and more.
15810 \begin_layout Subsubsection
15811 Why does the text look so bad when viewed with Acrobat Reader?
15812 \begin_inset LatexCommand \label{sec:badfonts}
15817 \begin_inset OptArg
15820 \begin_layout Standard
15821 Bad Fonts in Acrobat Reader
15829 \begin_layout Standard
15830 The problem is that bitmap fonts are displayed poorly by Acrobat Reader.
15831 When creating a PDF from the LyX file, you need to use outline font instead
15832 of the default bitmap fonts (in fact, you should also use outline fonts
15833 for Postscript files).
15834 Recent LaTeX distributions come with Postscript® Type 1 version of the
15835 standard (Computer Modern) fonts.
15836 pdfLaTeX uses these font by default.
15837 Dvips doesn't use these fonts by default, so to make it use them, add the
15838 following to lines to your
15845 \begin_layout LyX-Code
15849 \begin_layout LyX-Code
15853 \begin_layout Standard
15854 If the default LaTeX font encoding (OT1) is used, nothing else need to be
15856 However, if the T1 font encoding is used, then LaTeX uses the newer EC
15857 fonts, for which there are no Type1 version.
15858 The solution is to use the ae package which emulates T1 coded fonts using
15859 the standard CM fonts.
15860 This is done by adding
15864 usepackage{ae,aecompl}
15866 to the preamble of the LyX file.
15867 However, some glyphs are missing from the CM fonts (e.g.
15868 eth, thorn), and they are taken from the EC fonts.
15869 Therefore you get these glyphs as bitmaps.
15872 \begin_layout Standard
15873 Note: LyX uses by default the T1 font encoding.
15874 If you wish to use the default font encoding (this is not recommended,
15875 unless you only write English documents), clear the field
15883 in preferences (tabs
15895 \begin_layout Standard
15896 An alternate option is to use the standard Postscript® fonts instead of
15897 the Computer Modern fonts.
15898 To do that, you need to select
15902 as the global font in the document layout dialog.
15903 When using the Postscript® fonts, the result PDF file is smaller as the
15904 fonts are not saved into the file.
15905 Furthermore, the Postscript® fonts include all T1 glyphs.
15906 On the other hand, the Postscript® fonts have no bold symbol font, so poor
15907 man's bold must be used (see Section\InsetSpace ~
15909 \begin_inset LatexCommand \ref{sec:pdfbold}
15914 The Postscript® fonts also look different from the Computer Modern fonts.
15917 \begin_layout Standard
15918 To sum up, both the Computer Modern and the Postscript® fonts gives good
15919 results (with few exceptions).
15920 The decision of which one to use is a matter of taste.
15923 \begin_layout Subsubsection
15926 boldsymbol{} command work when I use pslatex?
15927 \begin_inset LatexCommand \label{sec:pdfbold}
15932 \begin_inset OptArg
15935 \begin_layout Standard
15952 \begin_layout Standard
15953 The Postscript® fonts do not have a bold symbol font.
15954 The solution is to use the
15960 (poor man's bold) command.
15963 \begin_layout Standard
15964 It is possible to redefine the
15979 \begin_layout LyX-Code
15989 \begin_layout Standard
15993 \begin_layout Subsubsection
15994 Is it possible to do write latex code which is processed only when running
15996 \begin_inset OptArg
15999 \begin_layout Standard
16000 Conditionals with pdfLaTeX
16008 \begin_layout Standard
16010 Here is an example:
16013 \begin_layout LyX-Code
16021 \begin_layout LyX-Code
16031 \begin_layout LyX-Code
16037 \begin_layout LyX-Code
16043 \begin_layout LyX-Code
16049 \begin_layout LyX-Code
16055 \begin_layout LyX-Code
16059 \begin_layout LyX-Code
16065 \begin_layout LyX-Code
16068 pdfinfo { /Author (your name and e-mail address)
16071 \begin_layout LyX-Code
16072 /Title (official title -- i.e., title element)
16075 \begin_layout LyX-Code
16076 /Subject (one line description of the document)
16079 \begin_layout LyX-Code
16083 \begin_layout LyX-Code
16086 pdfcatalog { /PageMode (/UseNone)
16089 \begin_layout LyX-Code
16090 % /OpenAction (fitbh)
16093 \begin_layout LyX-Code
16097 \begin_layout LyX-Code
16100 usepackage[pdftex]{hyperref}
16103 \begin_layout LyX-Code
16109 \begin_layout LyX-Code
16112 usepackage[ps2pdf]{hyperref}
16115 \begin_layout LyX-Code
16121 \begin_layout Subsubsection
16122 How can I make URLs clickable ?
16125 \begin_layout Standard
16126 See the references here :
16129 \begin_layout Standard
16130 \begin_inset LatexCommand \url{http://wiki.lyx.org/pmwiki.php/FAQ/PDF}
16137 \begin_layout Subsection
16141 \begin_layout Standard
16142 Custom exports are possible if you have some particularly weird format you
16143 wish to convert to, assuming you have the relevant converter, of course.
16148 file can be chosen in the
16153 ile\SpecialChar \menuseparator
16158 xport\SpecialChar \menuseparator
16165 dialog; LyX will automatically convert the file to this point, then feed
16166 it to your custom converter.
16167 The possible values are all formats that LyX can produce from its own documents.
16171 \begin_layout Standard
16172 The converter command is also specified in the dialog.It should be a completely
16173 qualified command line which uses the variable
16177 to specify the name of the file.
16178 If this variable is not given, then the file will be sent to the standard
16179 input of your command.
16180 You may have to apply a bit of ingenuity to escape this sequence correctly
16181 so that it is compatible with your shell.
16185 \begin_layout Standard
16186 While it is not possible to save this command using the
16190 dialog, you can manually edit your
16197 \begin_layout LyX-Code
16200 custom_export_command "mycommand $$FName"
16203 \begin_layout Section
16204 The Complete reLyX Description
16205 \begin_inset LatexCommand \label{sec:reLyX}
16212 \begin_layout Subsection
16216 \begin_layout Standard
16217 The simplest way to use reLyX is via the
16222 ile\SpecialChar \menuseparator
16230 That runs reLyX on the given file and loads the resulting file into LyX.
16231 You should try that first, and call it from the command line only if you
16232 need to use more complicated options.
16235 \begin_layout Standard
16287 \begin_layout Standard
16343 \begin_layout Standard
16353 \begin_layout Subsection
16357 \begin_layout Description
16363 By default, when reLyX sees a
16369 command, it creates a file of textclass
16370 \begin_inset Quotes eld
16374 \begin_inset Quotes erd
16377 and reads the LyX layout file for that class.
16382 to declare a different textclass (and read a different layout file).
16385 \begin_layout Description
16391 By default, reLyX gives sparse output and deletes the temporary files which
16392 were created during translation.
16397 flag will create much more output (both to stdout and stderr) and leave
16398 the temporary files around.
16401 \begin_layout Description
16407 reLyX will not run if the
16411 file it would generate already exists Use the
16415 option (carefully) to clobber any existing files.
16418 \begin_layout Description
16424 Print out usage information and quit
16427 \begin_layout Description
16433 With this option, all temporary files and LyX output files (for the given
16434 input file, for any included files, or for any file fragments given with
16439 option) will be put into
16444 Otherwise, for each file
16448 , the temporary files and the LyX output file will be created in
16453 This can be useful if a file includes files from other directories which
16454 you want to consolidate in one directory, or if you don't have write permission
16455 on the directory the LaTeX files are in.
16458 \begin_layout Description
16464 The input files are LaTeX fragments, with no preamble matter or
16471 This option requires the
16475 option, since there are no
16481 commands in the files reLyX is translating.
16482 When using this option, you can translate more than one file, as long as
16483 all files are the same class.
16484 The LyX file created by reLyX can be included in an existing LyX file using
16490 nsert\SpecialChar \menuseparator
16495 \SpecialChar \menuseparator
16506 \begin_layout Description
16511 Regular environments (see the Section\InsetSpace ~
16513 \begin_inset LatexCommand \ref{sub:relyx-syntax}
16518 If you give more than one environment, separate them with commas (not
16520 You'll probably need to quote the environment list, especially if it has
16521 asterisk environments (foo*) in it.
16522 If you use this command often, considering creating a personal syntax file.
16525 \begin_layout Description
16531 Input (one or more quoted, comma-separated) syntax files to read in addition
16533 (see the section Section\InsetSpace ~
16535 \begin_inset LatexCommand \ref{sub:relyx-syntax}
16542 \begin_layout Subsection
16546 \begin_layout Subsubsection
16550 \begin_layout Standard
16551 reLyX will create a LyX file
16555 from the LaTeX file
16566 \begin_layout Standard
16584 does not exist and does not have one of these suffixes, reLyX will try
16590 (This is similar to the behavior of LaTeX.)
16593 \begin_layout Standard
16594 The purpose of reLyX is to translate
16599 If your LaTeX file doesn't compile---or if you do weird things, like redefining
16600 standard LaTeX commands---it may choke.
16601 LaTeX209 will often be translated correctly, but it's not guaranteed.
16604 \begin_layout Standard
16605 reLyX has some bugs and lacks a few features.
16606 However, its main goals are:
16609 \begin_layout Itemize
16610 Get through a well-behaved LaTeX2e file without crashing
16613 \begin_layout Itemize
16614 Translate a lot of that file.
16617 \begin_layout Itemize
16618 Localize the parts that can't be translated and copy them in TeX mode
16621 \begin_layout Standard
16622 It achieves these main goals pretty well on most files.
16625 \begin_layout Standard
16626 There are many improvements that can and will be made to reLyX in the future.
16627 However, we wanted to get reLyX out there early on, to make it easier for
16628 new LyX users to read in their existing LaTeX files.
16631 \begin_layout Subsubsection
16635 \begin_layout Standard
16636 Here's a more lengthy description of what you should do to translate a LaTeX
16640 \begin_layout Itemize
16645 \begin_layout Standard
16646 reLyX will inform you of its progress and give any warnings to stderr, so
16647 if you don't want any output at all, try (in csh)
16648 \begin_inset Quotes eld
16653 reLyX foo.tex >& /dev/null
16656 \begin_inset Quotes erd
16660 \begin_inset Quotes eld
16672 \begin_inset Quotes erd
16676 You should NOT redirect standard output to
16685 \begin_layout Itemize
16686 Run LyX on the resulting .lyx file.
16690 \begin_layout Standard
16691 In theory, most of the file will have been translated, and anything that's
16692 untranslatable will be highlighted in red (TeX mode).
16693 In theory, LyX will be able to read in the file, and to create printed
16694 documents from it, because all that untranslated red stuff will be passed
16695 directly back to LaTeX, which LyX uses as a backend.
16696 Unfortunately, reality doesn't always reflect theory.
16697 If reLyX crashes, or LyX cannot read the generated LyX file, see Section\InsetSpace ~
16699 \begin_inset LatexCommand \ref{sub:relyx-bugs}
16711 \begin_layout Itemize
16712 Change things that are in ERT boxes (TeX code) by hand in LyX.
16716 \begin_layout Standard
16717 As mentioned above, you should be able to print out the LyX file even without
16719 However, changing a command in TeX mode to the corresponding LyX object
16720 will allow you to take advantage of LyX's WYSIWYM editing.
16723 \begin_layout Standard
16724 reLyX is not guaranteed to create a LyX file which generates exactly the
16725 same output as the LaTeX file, but it should come close.
16726 reLyX will generally err on the side of translating less to ensure that
16727 dvi or ps files are accurate, even though this leads to more
16728 \begin_inset Quotes eld
16732 \begin_inset Quotes erd
16739 \begin_layout Itemize
16740 PROOFREAD THE DOCUMENT!!
16744 \begin_layout Standard
16745 I'm sure you were planning on doing this anyway, but it's particularly important
16746 after translating a LaTeX document.
16747 reLyX is, at least now, better at
16748 \begin_inset Quotes eld
16752 \begin_inset Quotes erd
16755 (translating the whole document) than
16756 \begin_inset Quotes eld
16760 \begin_inset Quotes erd
16763 (translating every little detail).
16764 For example, you may see extra spaces or deleted spaces.
16765 Space handling has improved, but it's not perfect.
16769 \begin_layout Subsubsection
16770 What reLyX Can Handle
16773 \begin_layout Standard
16774 reLyX understands many LaTeX commands.
16778 \begin_layout Itemize
16779 regular text, including mini-commands like ~, '',
16791 , as well as accented characters like
16797 , and the special cases ?` and !`
16800 \begin_layout Itemize
16801 title commands like
16825 and the abstract environment
16828 \begin_layout Itemize
16829 heading commands like
16835 including starred commands (
16844 \begin_layout Itemize
16870 \begin_layout Itemize
16883 environments, and their
16890 Also, well-behaved nested lists
16893 \begin_layout Itemize
16894 cross-referencing commands:
16919 \begin_layout Itemize
16933 \begin_layout Itemize
16934 font-changing commands including
16952 , and corresponding commands to change family, size, series, and shape
16955 \begin_layout Itemize
16982 \begin_inset Quotes erd
16992 \begin_inset Quotes erd
16998 \begin_layout Itemize
17003 environment, and commands that go inside it like
17024 \begin_layout Itemize
17039 commands within them
17042 \begin_layout Itemize
17053 command, as well as BibTeX's
17068 \begin_layout Itemize
17069 miscellaneous commands:
17098 \begin_layout Itemize
17099 documentclass-specific environments (and some commands) which can be translated
17103 \begin_layout Itemize
17104 arguments to certain untranslatable commands (e.g.
17114 \begin_layout Standard
17115 Some of this support may not be 100% yet.
17116 See below for details
17119 \begin_layout Standard
17120 reLyX copies math (almost) verbatim from your LaTeX file.
17121 Luckily, LyX reads in LaTeX math, so (almost) any math which is supported
17122 by LyX should work just fine.
17123 A few math commands which are not supported by LyX will be replaced with
17124 their equivalents, e.g.,
17144 \begin_layout Standard
17145 reLyX will also copy any preamble commands (i.e., anything before
17151 ) verbatim, so fancy stuff you've got in your preamble should be conserved
17152 in dvi and printed documents, although it will not of course show up in
17154 Check the preamble to make sure.
17157 \begin_layout Subsubsection
17158 What reLyX Can't Handle --- But it's OK
17161 \begin_layout Itemize
17169 \begin_layout Itemize
17173 \begin_layout Itemize
17195 \begin_layout Itemize
17215 \begin_layout Itemize
17227 reLyX is careful to copy
17231 in this case, including comments and whitespace.
17234 \begin_layout Itemize
17235 some unknown (e.g., user-defined) environments and commands
17238 \begin_layout Standard
17239 reLyX copies unknown commands, along with their arguments, verbatim into
17247 where it doesn't recognize the
17248 \begin_inset Quotes eld
17252 \begin_inset Quotes erd
17255 environment, it will copy verbatim until it sees
17261 (unless you use the
17266 Hopefully, then, most of these unknown commands won't cause reLyX to break;
17267 they'll merely require you to do some editing once you've loaded the file
17269 That should be less painful than editing either the
17277 file using a text editor.
17280 \begin_layout Subsubsection
17281 What reLyX Handles Badly --- a.\InsetSpace ~
17285 \begin_inset LatexCommand \label{sub:relyx-bugs}
17292 \begin_layout Standard
17293 Since reLyX is relatively new, it's got a number of problems.
17294 As it matures, these bugs will be squished.
17295 A number of bugs and missing features can be found listed on the LyX bug
17297 \begin_inset LatexCommand \url[LyX Bugzilla]{http://bugzilla.lyx.org/}
17304 \begin_layout Standard
17305 If reLyX is choking on something, or LyX can't read it after reLyX translates
17306 it, the best thing to do is to put
17312 before the offending text, and
17320 \begin_inset Quotes eld
17324 \begin_inset Quotes erd
17328 reLyX will copy this block exactly, in TeX mode.
17329 Then edit the resulting LyX file, and translate the unknown stuff by hand.
17334 environment is magical; the
17346 commands will not be put into the LyX file.
17349 \begin_layout Itemize
17350 \begin_inset Quotes eld
17354 \begin_inset Quotes erd
17357 copying of unknown environments and commands isn't quite exact.
17358 Specifically, newlines and comments may be lost.
17359 This will yield ugly LyX, but in almost all cases the output will be the
17361 However, certain parts of the file will be copied perfectly, including
17362 whitespace and comments.
17363 This includes: the LaTeX preamble,
17373 commands, and skip blocks.
17376 \begin_layout Itemize
17377 reLyX translates only a few options to the
17384 (Specifically 1[012]pt, [letter|legal|executive|a4|a5|b5]paper, [one|two]side,
17385 landscape, and [one|two]column.) Other options are placed in the extra class
17386 options field in the
17391 ocument\SpecialChar \menuseparator
17402 \begin_layout Standard
17403 More importantly, reLyX doesn't translate
17409 commands, margin commands,
17415 s, or, in fact, anything else from the preamble.
17416 It simply copies them into the LaTeX preamble.
17417 If you have margin commands in your preamble, then the LyX file will generate
17419 However, these margins will override any margins you set in the LyX
17426 \SpecialChar \menuseparator
17432 So you should remove the options from the preamble to be safe.
17433 The same goes for setting your language with babel,
17449 \begin_layout Itemize
17450 The foil class has a couple bugs.
17451 reLyX may do weird things with optional arguments to
17458 Also, it may handle
17464 incorrectly (although the stuff in the environment should translate normally).
17467 \begin_layout Standard
17468 reLyX is hopefully rather robust.
17469 As mentioned above, it may not translate your file perfectly, but it shouldn't
17471 If it does crash---and the problem is not one of those mentioned above
17476 file---see Section\InsetSpace ~
17478 \begin_inset LatexCommand \ref{sub:relyx-bug-reports}
17485 \begin_layout Subsubsection
17486 What LyX Can't Handle
17489 \begin_layout Standard
17490 LyX itself is missing a couple features, such that even if reLyX translates
17491 things perfectly, LyX may still have trouble reading it.
17492 If you really need these features, you can export your final document as
17493 LaTeX, and put them back in.
17498 for more details on these bugs.
17501 \begin_layout Itemize
17502 For a number of commands, LyX does not support the optional argument.
17515 (and other sectioning commands), and
17524 reLyX will automatically discard the optional arguments with a warning
17526 LyX also ignores the width argument for the
17533 \begin_layout Itemize
17534 Centering (or right or left justifying) works on full paragraphs.
17537 \begin_layout Itemize
17538 LyX support for tables isn't perfect.
17539 For complicated tables, use a
17540 \begin_inset Quotes eld
17544 \begin_inset Quotes erd
17547 block, so that they will be copied in TeX mode.
17550 \begin_layout Itemize
17551 The LyX math editor can't handle the AMS-LaTeX math environments align,
17553 So those environments will be copied in TeX mode.
17558 environments to the exactly equivalent displaymath, and then they will
17559 be translated correctly.
17562 \begin_layout Subsection
17566 \begin_layout Standard
17570 \begin_inset Quotes eld
17574 \begin_inset Quotes erd
17578 \begin_inset Quotes eld
17582 \begin_inset Quotes erd
17585 foo.tex > foo.debug
17588 \begin_layout Standard
17589 The above will create a file my/dir/foo.lyx from foo.tex, overwriting if necessary.
17599 block, it will translate the stuff within the block, but copy the
17611 commands in TeX mode.
17612 Finally, I'm going to keep the temporary files around (they will also
17613 be in my/dir/) and output lots of debugging information into the file foo.debug.
17616 \begin_layout Subsection
17620 \begin_layout Subsubsection
17622 \begin_inset LatexCommand \label{sub:relyx-bug-reports}
17629 \begin_layout Standard
17630 If reLyX is crashing or otherwise acting strangely---in ways other than
17631 those described in Section\InsetSpace ~
17633 \begin_inset LatexCommand \ref{sub:relyx-bugs}
17637 or the bug tracker---then please run reLyX
17642 That will allow you to figure out where in the reLyXing process it crashed.
17643 That, in turn, will allow you to write a better bug report, which will
17644 allow the developers to fix it more quickly and easily.
17647 \begin_layout Standard
17648 Bug reports should be sent to the LyX developers' mailing list.
17649 Its address is currently
17651 lyx-devel@lists.lyx.org
17654 If you are running reLyX on a huge file, please do not send all of the
17655 output in your bug report.
17656 Just include the last ten or twenty lines of output, along with the piece
17657 of the LaTeX file it crashed on.
17658 Or, even better, attach a small but complete file which causes the same
17659 problem as your original file.
17662 \begin_layout Subsubsection
17663 Implementation Details:
17666 \begin_layout Standard
17667 reLyX makes several
17668 \begin_inset Quotes eld
17672 \begin_inset Quotes erd
17675 in order to translate a TeX file.
17676 On each pass, it creates one or two files.
17679 \begin_layout Description
17684 Before doing anything, read the syntax file (or files).
17687 \begin_layout Description
17692 Split preamble (anything before a
17698 command) off the rest of the file.
17699 It saves the two pieces in separate files.
17700 This is necessary because there may be very strange stuff in a preamble.
17701 It also ignores anything after the
17707 , on the assumption that it isn't LaTeX.
17710 \begin_layout Description
17715 Translate the preamble.
17716 Currently, that just means translating the
17722 command and copying the rest exactly into the LyX preamble.
17726 \begin_layout Standard
17727 Once you know what class the document is, read the LyX layout file for that
17732 \begin_layout Description
17738 \begin_inset Quotes eld
17742 \begin_inset Quotes erd
17745 the TeX file, generating slightly stricter LaTeX.
17750 \begin_layout Itemize
17755 to the equivalent but clearer
17760 \begin_layout Itemize
17761 Removing optional arguments that LyX can't handle (e.g., from
17770 \begin_layout Itemize
17784 This is necessary because LyX always writes out the non-local forms anyway.
17785 This should very rarely make a difference.
17789 \begin_layout Description
17794 Translate LaTeX text, commands, and environments to LyX.
17797 \begin_layout Description
17802 Put the two pieces back together, and do some final tweaking, to generate
17806 \begin_layout Standard
17819 commands, reLyX will loop back to the beginning and translate those.
17820 It assumes that the included files are the same class as the main file,
17821 and that they have no preamble matter.
17828 command in the preamble of a file, the command will be copied exactly into
17829 the LaTeX preamble portion of the LyX file, so the included file won't
17830 be translated.) So when translating included files, it skips passes 0 and
17834 \begin_layout Standard
17835 If reLyX doesn't find a file you wanted to include, it will give a warning,
17836 but will continue to translate any files it does find.
17839 \begin_layout Subsubsection
17843 \begin_layout Standard
17844 reLyX reads a LyX layout file to know how to handle LaTeX environments and
17845 commands which get translated to LyX layouts.
17846 This file will include all
17847 \begin_inset Quotes eld
17851 \begin_inset Quotes erd
17854 non-math environments (i.e., including quote and itemize, but not tabular,
17855 minipage, and some other fancy environments), and commands like
17868 If you want to reLyX a class that doesn't have an existing layout file,
17869 then you'll have to create a layout file.
17870 But you have to do this anyway, in order to LyX the file, since LyX depends
17871 on layout files to know how to display and process its files.
17872 Check the LyX documentation for help with this task (which can be hard
17873 or easy, depending on the class you want to create a layout file for.) If
17874 your class is quite similar to a class that has a layout file, then consider
17882 \begin_layout Subsubsection
17884 \begin_inset LatexCommand \label{sub:relyx-syntax}
17891 \begin_layout Standard
17892 reLyX always reads at least one syntax file, called the default syntax file.
17893 reLyX will read your personal syntax file if it exists; otherwise it will
17894 read the system-wide file.
17895 reLyX will read additional syntax files if you specify them with the
17900 (These extra files should have the same format as the default file, but
17901 will tend to be shorter, since they only have to specify extra commands
17902 not found in the default file.) A syntax file tells reLyX a few things.
17905 \begin_layout Standard
17906 First, it describes the syntax of each command, that is, how many required
17907 arguments and how many optional arguments the command takes.
17908 Knowing this makes it easier for reLyX to copy (in TeX mode) commands that
17909 it doesn't know how to translate.
17910 The syntax file simply has a command, followed by braces or brackets describing
17911 its arguments in the correct order.
17912 For example, a syntax file entry
17924 command takes an optional argument followed by a required one, while the
17937 command takes no arguments at all.
17938 When reLyX encounters a token that it doesn't know how to translate into
17939 LyX, it will copy the token---along with the correct number of arguments---exac
17941 If the token is not in the syntax file, then reLyX just copies as many
17942 arguments as it finds.
17943 This means that it may copy too much.
17944 But since the user can specify additional syntax files, that shouldn't
17948 \begin_layout Standard
17949 Some commands that cannot be translated to LyX, like
17955 , have as one of their arguments regular LaTeX text.
17957 \begin_inset Quotes eld
17961 \begin_inset Quotes erd
17964 is put into an argument of an (untranslatable) command in the syntax file,
17965 then reLyX will translate that argument instead of copying it verbatim.
17966 So, for example, the default syntax file has
17970 raisebox{}[][]{translate}
17973 This means that the
17979 command and the first argument (and optional arguments if they exist) are
17980 copied in TeX mode, but the last argument (which may contain math, complicated
17981 LaTeX, other untranslatable commands, etc.) will be translated into LyX.
17983 \begin_inset Quotes eld
17987 \begin_inset Quotes erd
17990 on optional arguments.
17993 \begin_layout Standard
17994 User-defined syntax files are allowed to define new commands and their syntax,
17995 or override the number of arguments for a command given in the default
17997 (E.g., if you're using a style that gives an extra argument to some command...)
17998 However, this will only be useful for commands copied in TeX mode.
17999 Commands which are actually translated by reLyX (like
18005 ) have their argument syntax hard-coded.
18006 The hard-coded commands are identified in the default syntax file.
18009 \begin_layout Standard
18010 Second, the syntax file describes any
18011 \begin_inset Quotes eld
18014 regular environments
18015 \begin_inset Quotes erd
18019 Usually, an entire unknown environment will be copied in TeX mode.
18020 If you define a regular environment
18021 \begin_inset Quotes eld
18025 \begin_inset Quotes erd
18028 , though, then only the
18040 commands will be copied in TeX mode; the text within the environment will
18041 be treated (i.e., translated) by reLyX as regular LaTeX, rather than being
18042 copied into TeX mode.
18043 Don't try to declare
18051 as regular environments, as the text within those environments will confuse
18052 reLyX; use this capability for new environments you create that have plain
18053 text or math or simple commands in them.
18054 You also can't declare unknown math environments (like
18058 ) as regular environments, either, since the LyX math editor won't understand
18060 The names of regular environments appear, whitespace-separated, between
18073 statements in the syntax file.
18074 (If you have a regular environment which you won't use very often, you
18079 option rather than writing a syntax file.)
18082 \begin_layout Standard
18083 Third, the syntax file describes a math translation table.
18084 The LyX math editor doesn't support a few commands.
18089 is supported, but the equivalent
18096 Put any commands you'd like translate between
18110 \begin_inset Quotes eld
18122 \begin_inset Quotes erd
18131 in math mode will be converted to
18132 \begin_inset Quotes eld
18142 \begin_inset Quotes erd
18149 (in cases where a token made up of a backslash and a non-letter is translated
18150 to something with letters at the end, a space is added by reLyX.
18152 \begin_inset Quotes eld
18162 \begin_inset Quotes erd
18165 is correctly translated to
18166 \begin_inset Quotes eld
18176 \begin_inset Quotes erd
18182 \begin_layout Subsubsection
18186 \begin_layout Standard
18187 You need Perl version 5.002 or later to run reLyX.
18188 <plug> If you don't have Perl, you should get it anyway (at
18189 \begin_inset LatexCommand \url[Perl]{http://www.perl.com/}
18193 ), because it's a really useful tool for pretty much anything.
18197 \begin_layout Subsection
18201 \begin_layout Standard
18202 reLyX should always explain why it crashes, if it crashes.
18203 Some diagnostics may be very technical, though, if they come from the guts
18205 reLyX gives much more information while running if you use the
18209 option, but you shouldn't need that unless something goes wrong.
18212 \begin_layout Standard
18213 When it's finished, reLyX will tell you if it finished successfully or died
18217 \begin_layout Subsection
18221 \begin_layout Standard
18222 Always keep a copy of your original LaTeX files either under a different
18223 name or in a different directory.
18224 There are a couple ways in which using LyX could lead to overwriting the
18225 original LaTeX file.
18228 \begin_layout Standard
18241 and want to re-export it, note that it will overwrite the original
18250 ask you if you want to overwrite it.)
18253 \begin_layout Standard
18254 If you have chosen not to use a temporary directory in the preferences,
18255 then LyX will create its temporary files in your current directory, which
18256 means your LaTeX original may be overwritten (without a warning from LyX)
18258 \begin_inset Quotes eld
18262 \begin_inset Quotes erd
18265 or print the LyX document.
18268 \begin_layout Subsection
18272 \begin_layout Description
18276 MY_LYXDIR/layouts/*.layout
18282 User's personal layout files for document classes
18285 \begin_layout Description
18289 MY_LYXDIR/reLyX/syntax.default
18295 User's personal syntax file
18298 \begin_layout Description
18302 LIBDIR/layouts/*.layout
18308 System-wide layout files for document classes
18311 \begin_layout Description
18315 LIBDIR/reLyX/syntax.default
18321 System-wide LaTeX syntax file
18324 \begin_layout Standard
18329 is the system-wide LyX directory, usually something like
18331 /usr/local/share/lyx/
18338 is your personal LyX directory, something like
18342 in your home directory.
18343 You can see their actual values in the
18348 elp\SpecialChar \menuseparator
18358 \begin_layout Subsection
18362 \begin_layout Standard
18374 \begin_layout Subsection
18378 \begin_layout Standard
18379 Copyright (c) 1998--9
18385 karger@voth.chem.utah.edu
18390 \begin_layout Standard
18394 \begin_layout Itemize
18399 wrote the original CleanTeX pass.
18402 \begin_layout Itemize
18408 \begin_layout Itemize
18416 \begin_layout Itemize
18419 David Suarez de Lis
18422 \begin_layout Standard
18423 Other contributors:
18426 \begin_layout Itemize
18429 Jean-Marc Lasgouttes
18431 worked on the wrapper script and offered lots of bug reports, advice, and
18432 feature suggestions.
18435 \begin_layout Itemize
18448 \begin_layout Itemize
18449 Various members of the LyX developers' and users' lists provided bug reports
18450 and feature suggestions.
18453 \begin_layout Standard
18454 reLyX uses a modified version the Perl TeX parser
18464 ilya@math.ohio-state.edu
18466 ), available on CPAN.
18469 \begin_layout Chapter
18470 LyX Features needing Extra Software
18473 \begin_layout Section
18474 Using LyX with SGML-Tools (aka LinuxDoc)
18477 \begin_layout Standard
18483 \begin_layout Subsection
18487 \begin_layout Standard
18488 LinuxDoc is a document class available in LyX if you have the
18493 You can use it to produce documents in the so-called Standardized General
18494 Mark-up Language (SGML) in the particular format used by the Linux Documentatio
18496 That is obviously helpful if you are contributing to that project.
18497 You can use the SGML format with the
18501 package of scripts and programs (to produce other formats, including Latex,
18502 HTML, plain text, man pages and\SpecialChar \ldots{}
18504 You may therefore prefer to use this document class if you want to write
18505 something that can be easily translated into other formats.
18508 \begin_layout Standard
18509 You will find that LinuxDoc has fewer layout options than the other text
18511 This is mainly so that the translations into other formats have a chance
18512 of making some sense.
18513 In this section we describe:
18516 \begin_layout Itemize
18517 how to setup and use a document in LinuxDoc
18520 \begin_layout Itemize
18521 how to use the tags in LinuxDoc to layout your document
18524 \begin_layout Itemize
18525 how to use the SGML packages to produce the various formats
18528 \begin_layout Itemize
18529 how to sort out some problems.
18532 \begin_layout Subsection
18533 Preparing and using a LinuxDoc document
18536 \begin_layout Subsubsection
18540 \begin_layout Standard
18541 You start by selecting the LinuxDoc class using the
18546 ocument\SpecialChar \menuseparator
18558 Then you will find that there are fewer paragraph environments than for
18559 most other classes.
18560 You can see them on the pull down box on the left of the tool bar.
18561 How to use them is described in section\InsetSpace ~
18563 \begin_inset LatexCommand \ref{sec:sgmlparas}
18570 \begin_layout Standard
18575 enter a title for the document, followed by an author, marking each with
18576 the appropriate paragraph environment.
18577 If you don't do this, you will get errors when you try to print the file.
18578 You can then enter the date and an abstract.
18579 The document proper must start with a Section paragraph environment rather
18580 than any standard layout.
18583 \begin_layout Standard
18584 After that you can prepare a document as usual using the available range
18585 of paragraph environments.
18586 See section\InsetSpace ~
18588 \begin_inset LatexCommand \ref{sec:sgmlparas}
18592 for the full list and their uses.
18595 \begin_layout Subsubsection
18596 Output from LinuxDoc
18599 \begin_layout Standard
18600 You can print and save these documents in the normal way.
18601 To use the other features of the SGML package you need to save your document
18602 as LinuxDoc; this is a version in which the document is translated into
18603 the basic sgml tags.
18610 ile\SpecialChar \menuseparator
18615 xport\SpecialChar \menuseparator
18623 You will get a file with the same name and a
18627 extension rather than a
18634 \begin_inset LatexCommand \ref{sec:sgmloperate}
18638 on how you than make use of this file.
18641 \begin_layout Subsection
18642 Using the paragraph environments in LinuxDoc
18645 \begin_layout Subsubsection
18646 The Structure of a LinuxDoc Document
18649 \begin_layout Standard
18650 There is a formal structure for LinuxDoc which limits how you can place
18652 There are two parts to all documents:
18655 \begin_layout Description
18656 Header: this is everything up to the first time you insert a Section layout
18658 It can include title, author, date, abstract and ToC.
18659 You must include the first two.
18662 \begin_layout Description
18663 Body: from the beginning of the first section onwards.
18664 All other tags are allowed.
18668 \begin_layout Subsubsection
18669 The LinuxDoc Paragraph Environments
18672 \begin_layout Standard
18673 \begin_inset LatexCommand \label{sec:sgmlparas}
18677 Here is a list of all the tags you will find listed on the layout bar in
18678 the order they come there, with some comments where the purpose or use
18682 \begin_layout Itemize
18687 works as described in [cross reference]
18690 \begin_layout Itemize
18695 : This will appear at the top left of the document when printed, above a
18696 heavy horizontal rule, although you will not see this on the LyX screen.
18699 \begin_layout Itemize
18702 Section, Subsection, Subsubsection, Paragraph and Subparagraph:
18704 all do what you would expect and in the usual order.
18705 Whether they are numbered or not is controlled by the
18707 Section\InsetSpace ~
18708 number\InsetSpace ~
18712 You cannot get the equivalent number free versions in any other way; there
18720 \begin_layout Itemize
18725 As usual this produces a numbered and indented list as described in the
18733 \begin_layout Itemize
18738 Again much the same as in the other classes: see the
18745 \begin_layout Itemize
18750 : As explained in the
18755 Remember that if you want the bold element at the start of a description
18756 to be more than one word then you need to put protected spaces between
18761 \begin_layout Itemize
18769 \begin_layout Itemize
18772 Code: similar to the Lyx-Code
18777 \begin_layout Itemize
18782 : Anything you mark with this will appear on the left of the heading of
18783 the document, under the heavy rule.
18786 \begin_layout Itemize
18791 Anything you mark with this will appear on the right of the heading under
18793 You do not have to make this a date.
18794 Any text can be entered, e.\InsetSpace ~
18799 \begin_layout Itemize
18804 : You can use this to produce a free standing paragraph after the author
18805 and date, and before the first section.
18806 You are only allowed one such paragraph.
18810 \begin_layout Standard
18816 This needs checking ---
18826 \begin_layout Itemize
18835 \begin_layout Standard
18840 I have not yet checked this ---
18850 \begin_layout Subsubsection
18851 Other document features
18854 \begin_layout Standard
18855 You can also use the
18859 menu to set fonts or to emphasis words.
18860 You can also use the table of contents as usual; see the corresponding
18866 Although you will find some some other features on the menus e.\InsetSpace ~
18868 inserting footnotes.
18869 There is some doubt about whether these will work correctly.
18873 \begin_layout Standard
18878 Again still checking to see whether this is my system
18888 \begin_layout Subsubsection
18889 Cross references and HTML
18892 \begin_layout Standard
18897 menu you will find two new options relating to the inclusion of URL addresses.
18898 If you use either option you will find some highlighted TeX code inserted
18899 into your document in three separate blocks with spaces available between.
18900 The blocks will be:
18903 \begin_layout Quote
18935 \begin_layout Standard
18936 You insert a full HTML tag between the first and second blocks.
18938 \begin_inset LatexCommand \url{http://any.address}
18942 or other valid tags such as
18943 \begin_inset LatexCommand \url{mailto:me@my.address}
18955 insert some description between the second and third blocks.
18956 The differences are:
18959 \begin_layout Itemize
18964 both the HTML tag and the description will appear in the document
18967 \begin_layout Itemize
18973 only the description appears in the printed version
18976 \begin_layout Subsection
18977 Using the LinuxDoc Sgml scripts
18978 \begin_inset Note Note
18981 \begin_layout Standard
18982 This section is completely outdated.
18990 \begin_layout Standard
18991 \begin_inset LatexCommand \label{sec:sgmloperate}
18995 You can use LinuxDoc as a text class without any additional scripts or programs,
18996 but there is not much point in doing this.
18997 All you will get is a document that looks like a
18999 Linux Documentation Project Howto
19005 To do the document translation you need to get and install the
19007 sgml-tools-1.0.x.tar.gz
19010 \begin_inset Formula $x\geq3$
19015 the SGML-Tools WWW Page
19020 \begin_layout LyX-Code
19023 \begin_inset LatexCommand \url{http://pobox.com/~cg/sgmltools}
19032 \begin_layout Standard
19033 Alternatively, you can go to the
19041 \begin_layout Standard
19042 Note that, at the time of this writing (01/1998), version 1.0.3 of sgml-tools
19043 has not yet been made available at
19055 \begin_layout LyX-Code
19058 \begin_inset LatexCommand \url{ftp://sunsite.unc.edu/pub/Linux/utils/text/sgml-tools-1.0.x.tar.gz}
19065 \begin_layout Standard
19072 sgml-tools-1.0.x.tar.gz
19074 contains everything that you need to write SGML documents and convert them
19075 to groff, LaTeX, HTML, GNU info, LyX, and RTF\SpecialChar \@.
19079 \begin_layout Standard
19080 This package was renamed from
19082 linuxdoc-sgml-1.5.tar.gz
19087 \begin_layout Standard
19088 Follow the instructions in that package on how to install it and how to
19090 All this has to be done outside of LyX, before you can use the
19095 ile\SpecialChar \menuseparator
19100 xport\SpecialChar \menuseparator
19107 \begin_layout Subsection
19108 Troubleshooting LinuxDoc
19111 \begin_layout Standard
19112 When you print or preview a LinuxDoc document some checking is done of the
19113 tags before LaTeX is run.
19114 Some errors are trapped here, especially those concerning the structure
19116 LyX may produce an error message, but not leave an error box in the document
19118 You may have to look at the files directly to discover what is wrong.
19119 Most problems seem to come from the use of options that are not fully available
19123 \begin_layout Section
19127 \begin_layout Standard
19133 \begin_layout Subsection
19137 \begin_layout Standard
19145 menu, you'll find a
19154 This feature requires you to have the
19158 program installed, and is grayed out if you don't have it.
19159 You can get it from your nearest CTAN mirror, or over the Web from
19160 \begin_inset LatexCommand \url{http://www.ifi.uio.no/~jensthi/chktex/}
19167 \begin_layout Standard
19172 package is a program that was written by
19177 in frustration because some constructs in LaTeX are sometimes non-intuitive,
19178 and easy to forget.
19179 The program runs over your LaTeX file and checks the integrity of the file,
19180 and flags some common errors.
19181 In other technical words, it is
19188 \begin_layout Standard
19189 Well, what is a syntax checker doing in LyX which is supposed to produce
19190 correct LaTeX anyways? The answer is simple: Just as
19194 not only checks the
19198 of C programs, but also does
19202 checks for type-errors,
19206 catches some common
19210 errors, in addition to the syntactical ones.
19215 is capable of detecting several common errors, such as
19218 \begin_layout Itemize
19219 Ellipsis detection:
19221 Use \SpecialChar \ldots{}
19225 \begin_layout Itemize
19226 No space in front of/after parenthesis:
19231 \begin_layout Itemize
19232 Enforcement of normal space after common abbreviations:
19236 is too wide spacing.
19239 \begin_layout Itemize
19240 Enforcement of end-of-sentence space when the last sentence ends with a
19244 And this is wrong spacing.
19247 \begin_layout Itemize
19248 Space in front of labels and similar commands:
19250 The label should stick right
19251 up to the text to avoid falling to a wrong page.
19253 \begin_inset LatexCommand \label{sec:chktex}
19261 \begin_layout Standard
19262 This footnote is in danger of falling off to a wrong page
19267 The label is separated too much.
19270 \begin_layout Itemize
19271 Space in front of references, instead of hard spaces:
19273 In you are in bad luck,
19274 the text will break right between the referenced text and reference number,
19277 \begin_inset LatexCommand \ref{sec:chktex}
19284 \begin_layout Itemize
19286 \begin_inset Quotes eld
19290 \begin_inset Quotes erd
19294 \begin_inset Formula $\times$
19299 2x2 looks cheap compared to
19300 \begin_inset Formula $2\times2$
19306 \begin_layout Standard
19307 and more \SpecialChar \ldots{}
19308 It is an invaluable tool when you are
19309 \begin_inset Quotes eld
19313 \begin_inset Quotes erd
19316 your document before printing, and you should run it right after the obligatory
19317 spelling check, and before you go fine tuning the typesetting.
19320 \begin_layout Subsection
19324 \begin_layout Standard
19325 If you have the program installed, usage is as simple as choosing
19330 ools\SpecialChar \menuseparator
19339 This will make LyX generate a LaTeX file of your document, start
19343 to check it, and then make LyX insert
19344 \begin_inset Quotes eld
19348 \begin_inset Quotes erd
19351 with the warnings from
19355 , if there were any.
19356 The warnings will be placed close to the point of the mistake, and you
19357 can quickly find them by using the
19362 avigate\SpecialChar \menuseparator
19369 menu item, or the shortcut key
19378 Open the error boxes by clicking on them with the mouse, or use the shortcut
19387 bindings, or the corresponding
19396 Read the warning and correct the mistake, if it is a mistake.
19397 If you have trouble understanding what the warning is about, you can safely
19399 Remember that there is a hidden layer between the document on screen and
19400 the technical details in invoking
19404 , and this gap can make some warnings seem arcane or just right down plain
19408 \begin_layout Standard
19409 This document is an excellent testing bed for the feature, and it should
19410 provide quite a few warnings for you to fiddle with.
19411 Since computers are only so smart, expect most of the warnings to be false
19415 \begin_layout Subsection
19416 How to fine tune it
19419 \begin_layout Standard
19420 Sometimes, you'll find that
19424 makes more noise than suits your mood.
19425 Then you can choose not to use it, wait until your mood changes, or try
19430 to get better along with you.
19431 Another choice in the most desperate situations is to use
19436 iew\SpecialChar \menuseparator
19446 , which will get rid of all warnings instantly.
19449 \begin_layout Standard
19458 very configurable and extensible, you shouldn't expect to solve all problems
19464 Since LyX has to generate a somewhat special LaTeX file to be able to match
19465 the line numbers from the
19473 \begin_layout Standard
19474 You can inspect the specific output from
19480 Edit\SpecialChar \menuseparator
19494 to the internal document structure, some of the warnings will not seen
19495 to appear correctly.
19496 There are two things you can do about this:
19499 \begin_layout Itemize
19504 invocation command line in
19520 installation configuration file (usually with the file
19522 /usr/local/share/chktexrc
19525 See below to learn what warnings can be enabled and disabled on the command
19530 \begin_layout Itemize
19531 Export your document as a raw LaTeX file using
19536 ile\SpecialChar \menuseparator
19541 xport\SpecialChar \menuseparator
19553 Invoked in this way, it can be a hassle to find the corresponding place
19554 in the document inside LyX, but with a little patience, you should be able
19558 \begin_layout Standard
19559 Here follows the warning messages that can be enabled and disabled in
19568 to disable a warning, and
19572 to enable a warning.
19573 The emphasized entries are disabled by default, because the default is
19576 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
19581 \begin_layout Standard
19582 Notice that you should only use the options that enable and disable warnings,
19583 because LyX relies on some of the other command line parameters to be set
19584 in a specific way to have a chance to communicate with
19591 \begin_layout Enumerate
19595 Command terminated with space.
19598 \begin_layout Enumerate
19601 Non-breaking space (
19602 \begin_inset Quotes eld
19610 \begin_inset Quotes erd
19613 ) should have been used.
19616 \begin_layout Enumerate
19620 You should enclose the previous parenthesis with
19621 \begin_inset Quotes eld
19629 \begin_inset Quotes erd
19635 \begin_layout Enumerate
19638 Italic correction (
19639 \begin_inset Quotes eld
19649 \begin_inset Quotes erd
19652 ) found in non-italic buffer.
19655 \begin_layout Enumerate
19658 Italic correction (
19659 \begin_inset Quotes eld
19669 \begin_inset Quotes erd
19672 ) found more than once.
19675 \begin_layout Enumerate
19679 No italic correction (
19680 \begin_inset Quotes eld
19690 \begin_inset Quotes erd
19696 \begin_layout Enumerate
19700 \begin_inset Quotes eld
19708 \begin_inset Quotes erd
19712 \begin_inset Quotes eld
19720 \begin_inset Quotes erd
19726 \begin_layout Enumerate
19729 Wrong length of dash may have been used.
19732 \begin_layout Enumerate
19736 \begin_inset Quotes eld
19744 \begin_inset Quotes erd
19748 \begin_inset Quotes eld
19756 \begin_inset Quotes erd
19762 \begin_layout Enumerate
19766 \begin_inset Quotes eld
19774 \begin_inset Quotes erd
19780 \begin_layout Enumerate
19784 \begin_inset Quotes eld
19792 \begin_inset Quotes erd
19795 to achieve an ellipsis.
19798 \begin_layout Enumerate
19801 Inter-word spacing (
19802 \begin_inset Quotes eld
19812 \begin_inset Quotes eld
19815 ) should perhaps be used.
19818 \begin_layout Enumerate
19821 Inter-sentence spacing (
19822 \begin_inset Quotes eld
19832 \begin_inset Quotes erd
19835 ) should perhaps be used.
19838 \begin_layout Enumerate
19841 Could not find argument for command.
19844 \begin_layout Enumerate
19848 \begin_inset Quotes eld
19856 \begin_inset Quotes erd
19862 \begin_layout Enumerate
19865 Math mode still on at end of LaTeX file.
19868 \begin_layout Enumerate
19872 \begin_inset Quotes eld
19880 \begin_inset Quotes erd
19883 doesn't match the number of
19884 \begin_inset Quotes eld
19892 \begin_inset Quotes erd
19898 \begin_layout Enumerate
19901 You should use either
19904 \begin_inset Quotes eld
19912 \begin_inset Quotes erd
19917 as an alternative to
19918 \begin_inset Quotes eld
19926 \begin_inset Quotes erd
19932 \begin_layout Enumerate
19939 " (ASCII 39) instead of "
19946 \begin_layout Enumerate
19949 User-specified pattern found.
19952 \begin_layout Enumerate
19955 This command might not be intended.
19958 \begin_layout Enumerate
19965 \begin_layout Enumerate
19983 \begin_layout Enumerate
19986 Delete this space to maintain correct page references.
19989 \begin_layout Enumerate
19993 You might wish to put this between a pair of
19994 \begin_inset Quotes eld
20002 \begin_inset Quotes erd
20008 \begin_layout Enumerate
20011 You ought to remove spaces in front of punctuation.
20014 \begin_layout Enumerate
20017 Could not execute LaTeX command.
20020 \begin_layout Enumerate
20029 in front of small punctuation.
20032 \begin_layout Enumerate
20040 may look prettier here.
20043 \begin_layout Enumerate
20047 Multiple spaces detected in output.
20050 \begin_layout Enumerate
20053 This text may be ignored.
20056 \begin_layout Enumerate
20062 \begin_inset Quotes eld
20067 to begin quotation, not
20074 \begin_layout Enumerate
20081 to end quotation, not
20084 \begin_inset Quotes eld
20092 \begin_layout Enumerate
20098 \begin_layout Enumerate
20101 You should perhaps use
20102 \begin_inset Quotes eld
20110 \begin_inset Quotes erd
20116 \begin_layout Enumerate
20119 You should put a space in front of/after parenthesis.
20122 \begin_layout Enumerate
20125 You should avoid spaces in front of/after parenthesis.
20128 \begin_layout Enumerate
20132 You should not use punctuation in front of/after quotes.
20135 \begin_layout Enumerate
20138 Double space found.
20141 \begin_layout Enumerate
20144 You should put punctuation outside inner/inside display math mode.
20147 \begin_layout Enumerate
20150 You ought to not use primitive TeX in LaTeX code.
20153 \begin_layout Enumerate
20156 You should remove spaces in front of
20157 \begin_inset Quotes eld
20165 \begin_inset Quotes erd
20171 \begin_layout Enumerate
20174 \begin_inset Quotes eld
20182 \begin_inset Quotes erd
20185 is normally not followed by
20186 \begin_inset Quotes eld
20194 \begin_inset Quotes erd
20200 \begin_layout Standard
20201 In later versions of LyX, we hope to provide a more complete interface to
20202 this tool (and it's smaller cousin
20206 ) to exploit the full power of it.
20207 But it's not exactly useless as it is now: go try it on one of your existing
20208 documents of a certain length and be surprised.
20211 \begin_layout Section
20212 Version Control in LyX
20215 \begin_layout Standard
20218 Lars Gullik Bjønnes
20221 \begin_layout Subsection
20225 \begin_layout Standard
20226 A friend of mine wanted to try LyX for a group project.
20227 When he didn't find support for version control or file locking, he dropped
20229 This angered me a bit, so I thought that I should at least make support
20230 for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
20231 This has now been done.
20232 LyX now supports some of the most basic RCS commands.
20233 If you need to something a bit more sophisticated you will have to do that
20234 manually in an xterm.
20237 \begin_layout Standard
20238 Before you begin to use the version control features in LyX, you should
20240 \begin_inset Quotes eld
20244 \begin_inset Quotes erd
20247 (a man file, read it with
20252 This file describes all the basic features of RCS.
20253 You should especially notice the comment about a RCS directory, and the
20254 notion of a master RCS file (the file ending in
20261 \begin_layout Standard
20262 The implementation in LyX assumes a recent version of the GNU RCS package---no
20263 guarantees are made for older versions.
20266 \begin_layout Subsection
20267 RCS commands in LyX
20270 \begin_layout Standard
20271 The following sections describe the RCS commands supported by LyX.
20272 You can find them in the
20277 ile\SpecialChar \menuseparator
20282 ersion\InsetSpace ~
20288 \begin_layout Subsubsection
20294 \begin_layout Standard
20295 If your document is not under revision control, this is the only item shown
20297 And if it is under revision control, the
20304 item is grayed out.
20308 \begin_layout Standard
20309 This command registers your document with RCS\SpecialChar \@.
20310 You are asked interactively
20311 to supply an initial description of the document.
20312 The document is now set in Read-Only mode and you have to
20319 , before making any changes to it.
20320 A document under revision control has a
20321 \begin_inset Quotes eld
20324 [RCS:<version> <locker>]
20325 \begin_inset Quotes erd
20328 item tagged to the filename in the minibuffer.
20331 \begin_layout Standard
20332 RCS command that is run:
20334 ci -q -u -i -t-"<initial description>" <file-name>
20337 \begin_layout Standard
20342 to understand the switches.
20346 \begin_layout Subsubsection
20352 \begin_layout Standard
20353 When you are finished editing a file, you check in your changes.
20354 When you do this, you are asked for a description of the changes.
20355 This is stored in the history log.
20356 The version number is bumped, your changes are applied to the master RCS
20357 file, the document is unlocked and set to Read-Only mode.
20361 \begin_layout Standard
20364 ci -q -u -m"<description>" <file-name>
20367 \begin_layout Subsubsection
20373 \begin_layout Standard
20374 By doing this you lock the document so that only you can edit it.
20375 This will also make the document Read-Write only for you.
20376 You will usually continue editing for a while and when you are finished
20377 you check in your changes.
20378 The status line is changed to reflect that you have locked the file.
20382 \begin_layout Standard
20385 co -q -l <file-name>
20388 \begin_layout Subsubsection
20391 Revert To Last Version
20394 \begin_layout Standard
20395 This will discard all changes made to the document since the last check
20397 You get a warning before changes are discarded.
20400 \begin_layout Standard
20403 co -f -u<version> <file-name>
20406 \begin_layout Subsubsection
20412 \begin_layout Standard
20413 This makes as if the last check in never happened.
20414 No changes are made to the document loaded into LyX, but the last version
20415 is removed from the master RCS file.
20419 \begin_layout Standard
20422 rcs -o<version> <file-name>
20425 \begin_layout Subsubsection
20431 \begin_layout Standard
20432 This show the complete history of the RCS document.
20437 is shown in a browser.
20445 \begin_layout Section
20446 Literate Programming
20449 \begin_layout Standard
20454 (kayvan@sylvan.com)
20458 original documentation written by
20460 Edmar Wienskoski Jr.
20463 (edmar-w-jr@technologist.com)
20466 \begin_layout Subsection
20470 \begin_layout Standard
20471 The main purpose of this documentation is to show you how to use LyX for
20472 literate programming.
20473 Where it is assumed that you are familiar with this programming technique,
20475 \begin_inset Quotes eld
20479 \begin_inset Quotes erd
20483 \begin_inset Quotes eld
20487 \begin_inset Quotes erd
20491 If that is not the case, please follow the web links provided in the following
20493 There is a lot of good documentation out there covering old development
20494 history to the latest tools tips.
20497 \begin_layout Standard
20498 It is also assumed that you are familiar with LyX itself to a point that
20499 you are comfortable changing your LyX preferences, and X resources file.
20500 If that is not the case please refer to other LyX documentation to cover
20501 your specific needs.
20504 \begin_layout Subsection
20505 Literate Programming
20508 \begin_layout Standard
20509 From the Literate Programming FAQ:
20512 \begin_layout Quotation
20513 Literate programming is the combination of documentation and source together
20514 in a fashion suited for reading by human beings.
20515 In fact, literate programs should be enjoyable reading, even inviting!
20516 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
20517 and documentation in a single file.
20518 Literate programming tools then parse the file to produce either readable
20519 documentation or compilable source.
20520 The WEB style of literate programming was created by D.E.
20521 Knuth during the development of his TeX typesetting software.
20525 \begin_layout Standard
20526 Another excerpt says:
20529 \begin_layout Quotation
20532 How is literate programming different from verbose commenting?
20535 \begin_layout Quotation
20536 There are three distinguishing characteristics.
20537 In order of importance, they are:
20541 \begin_layout Itemize
20542 flexible order of elaboration
20545 \begin_layout Itemize
20546 automatic support for browsing
20549 \begin_layout Itemize
20550 typeset documentation, especially diagrams and mathematics
20554 \begin_layout Standard
20555 Now that I sparked your curiosity, take a look in the references.
20558 \begin_layout Subsubsection
20562 \begin_layout Standard
20563 The complete Literate Programming FAQ can be found at:
20566 \begin_layout Quote
20567 \begin_inset LatexCommand \url[Literate Programming FAQ]{http://shelob.ce.ttu.edu/daves/lpfaq/faq.html}
20574 \begin_layout Standard
20575 The FAQ lists 23 (twenty three!) different literate programming tools.
20576 Where some are specialized or
20577 \begin_inset Quotes eld
20581 \begin_inset Quotes erd
20584 for particular programming languages, while other have general scope.
20589 for my own use for several reasons:
20592 \begin_layout Itemize
20593 It can generate the documentation either in latex or html.
20596 \begin_layout Itemize
20597 It has a open architecture, i.e., it is easy to plug in new filters and to
20598 perform special processing that you may need.
20602 \begin_layout Itemize
20603 There is a good selection of filters available already (the html is one
20607 \begin_layout Itemize
20611 \begin_layout Standard
20612 The Noweb web page can be found at:
20615 \begin_layout Quote
20616 \begin_inset LatexCommand \url[Noweb home page]{http://www.cs.virginia.edu/~nr/noweb/}
20623 \begin_layout Standard
20624 Starting from there you can reach many other interesting links and even
20625 some literate program examples.
20628 \begin_layout Subsection
20629 LyX and Literate Programming
20632 \begin_layout Standard
20633 The LyX support for Literate Programming is provided by using the generic
20634 LyX convertors mechanism.
20635 This support is provided in a
20636 \begin_inset Quotes eld
20640 \begin_inset Quotes erd
20643 way, i.e., you will be able to use this new LyX feature with some other literate
20644 programming tool of your choice by just changing your LyX preferences.
20647 \begin_layout Subsubsection
20648 Generating documents and code (weaving and tangling)
20651 \begin_layout Paragraph
20652 Selecting the document class
20655 \begin_layout Standard
20656 If you have installed Noweb and LyX successfully, whenever you open a new
20657 document or try to change the document class of an existing one, you will
20658 find that there are three new document classes available:
20661 \begin_layout Itemize
20665 \begin_layout Itemize
20669 \begin_layout Itemize
20673 \begin_layout Standard
20674 You must select one of them to create your literate documents from.
20678 \begin_layout Standard
20679 Note that literate documents are not limited to these three classes.
20680 New classes can be generated from other styles like letter or in combination
20681 with other class variations like Article (AMS).
20682 If you have special needs that cannot be covered by one of the existing
20683 classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
20684 will arrange to insert a new entry, or teach you how to do it.
20688 \begin_layout Standard
20689 It is very simple, it involves the creation of a file with four lines, and
20690 re-running of the auto configuration.
20695 Moreover, if you use a literate tool other than Noweb you may need to create
20696 a new set of document classes for it.
20699 \begin_layout Paragraph
20703 \begin_layout Standard
20704 LyX enables you to write code with a layout named
20712 \begin_layout Standard
20713 The equivalent Noweb term is
20714 \begin_inset Quotes eld
20718 \begin_inset Quotes erd
20722 For historical reasons, I got used to the term
20723 \begin_inset Quotes eld
20727 \begin_inset Quotes erd
20730 introduced by other literate tool named Nuweb, which I used for many years
20731 before rendering myself to Noweb.
20736 Noweb delimits scraps like this:
20739 \begin_layout LyX-Code
20743 \begin_layout LyX-Code
20747 \begin_layout LyX-Code
20751 \begin_layout LyX-Code
20755 \begin_layout LyX-Code
20759 \begin_layout Standard
20760 The problem is that whatever is written in between the << and the
20764 must be taken literally, i.e., LyX should be prevented from making any special
20765 interpretation of what has been written.
20766 This is handled by a special layout named Scrap, that works like a normal
20767 paragraph but has a free spacing capability.
20770 \begin_layout Standard
20771 The down side of the Scrap paragraph layout is that consecutive paragraphs
20772 of code will be spaced with one empty line in the source code and also
20773 in the printed documentation.
20774 The work around is to enter each line of code within a single Scrap, with
20775 a newline (ctrl-return).
20776 The example above will look like this:
20780 \begin_layout Standard
20781 If you have a printed version of this document you will not see any difference
20782 between the previous example and this one.
20790 \begin_layout LyX-Code
20802 \begin_layout Standard
20803 This layout works fine.
20804 The only real inconvenience is that you have to type ctrl-return instead
20809 \begin_layout Standard
20810 It is in my list of
20811 \begin_inset Quotes eld
20815 \begin_inset Quotes erd
20826 \begin_layout Standard
20827 As a special note, you can also use the
20828 \begin_inset Quotes eld
20832 \begin_inset Quotes erd
20835 construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
20839 \begin_layout LyX-Code
20842 def some_function(args):
20844 "This is the doc string for this
20847 print "My args: ", args
20850 \begin_layout LyX-Code
20851 @ %def some_function
20854 \begin_layout Standard
20855 For an example of this usage and the resulting cross-reference output, look
20856 at the Literate python program in
20858 LIBDIR/examples/listerrors.lyx
20860 which should make this all clear.
20863 \begin_layout Paragraph
20864 Generating the documentation
20867 \begin_layout Standard
20868 At this point you already have a new document file with a proper document
20869 class, and with some code and text on it.
20870 How do I print it? The answer is simple, you select
20875 iew\SpecialChar \menuseparator
20883 Just like you would do for a plain document.
20884 No special procedure is required.
20887 \begin_layout Standard
20888 To help orientate you, I will now explain what happens inside LyX:
20891 \begin_layout Enumerate
20897 pdate\SpecialChar \menuseparator
20904 menu option is chosen, a latex file is generated.
20909 \begin_layout Standard
20910 If the document is of any literate class the generated file will be named
20911 with an extension name defined by the
20912 \begin_inset Quotes eld
20916 \begin_inset Quotes erd
20919 format (defined in the Preferences panel), otherwise the file will have
20928 \begin_layout Enumerate
20929 Note that the only difference so far is in the name of the file, no special
20930 processing is required by LyX.
20931 Given that you formatted the code using the Scrap layout that, by itself,
20932 takes care of the business.
20935 \begin_layout Enumerate
20936 If the document is of any literate class LyX will then use the internal
20937 LyX to Noweb converter, followed by the Noweb to LaTeX converter
20941 \begin_layout Standard
20942 The converters are defined in the
20947 ools\SpecialChar \menuseparator
20955 \begin_inset Quotes eld
20959 \begin_inset Quotes erd
20967 to generate the LaTeX file.
20971 \begin_layout Standard
20972 Otherwise it will just skip this step.
20976 \begin_layout Enumerate
20977 Finally, LaTeX is invoked and the regular post processing continues as in
20981 \begin_layout Standard
20982 Independence from a particular
20983 \begin_inset Quotes eld
20987 \begin_inset Quotes erd
20990 is easily achieved by changing the commands that are run by the various
20994 \begin_layout Paragraph
20995 Generating the code
20998 \begin_layout Standard
20999 When the build menu option is chosen or the corresponding button in the
21000 toolbar is pressed, a latex file is generated just like step 1 above.
21001 Next, LyX invokes the
21006 Typically, this converter (like any other converter), has two parts:
21009 \begin_layout Enumerate
21010 The converter program itself.
21011 This program performs the conversion from the one format to the other (in
21012 this case, from the Noweb format to the Program pseudo-format).
21015 \begin_layout Enumerate
21016 The error log parser.
21017 This is a program whose sole purpose is to rewrite error messages in a
21018 format that LyX understands.
21019 This makes it possible for LyX to place error boxes in the right places
21020 in the file buffer.
21023 \begin_layout Standard
21024 The first part, the
21025 \begin_inset Quotes eld
21029 \begin_inset Quotes erd
21032 setting, should be set to
21033 \begin_inset Quotes eld
21041 \begin_inset Quotes erd
21045 This basically means that LyX will call
21046 \begin_inset Quotes eld
21050 \begin_inset Quotes erd
21053 (a program or script) with the name of the Noweb file (generally a file
21054 in the LyX temp directory).
21058 \begin_layout Standard
21059 This is an implementation of
21060 \begin_inset Quotes eld
21064 \begin_inset Quotes erd
21067 that you can place in a directory on your path:
21070 \begin_layout LyX-Code
21074 \begin_layout LyX-Code
21078 \begin_layout LyX-Code
21079 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
21082 \begin_layout Standard
21083 The next part of the converter setting is the
21084 \begin_inset Quotes eld
21088 \begin_inset Quotes erd
21091 which is to be set to
21092 \begin_inset Quotes eld
21097 originaldir,parselog=listerrors
21100 \begin_inset Quotes erd
21104 This will run any errors that are generated by the
21105 \begin_inset Quotes eld
21109 \begin_inset Quotes erd
21112 process through the
21113 \begin_inset Quotes eld
21117 \begin_inset Quotes erd
21123 \begin_layout Standard
21124 The converter code looks in
21132 then on the path for the
21133 \begin_inset Quotes eld
21137 \begin_inset Quotes erd
21143 \begin_layout Paragraph
21144 Build instructions in the document
21147 \begin_layout Standard
21148 The last piece of the integration between LyX and noweb is the
21149 \begin_inset Quotes eld
21153 \begin_inset Quotes erd
21157 Generally, the instructions for building your program should be embedded
21158 in a scrap of its own.
21160 \begin_inset Quotes eld
21164 \begin_inset Quotes erd
21167 above uses the notangle command to look for this scrap (called
21168 \begin_inset Quotes eld
21172 \begin_inset Quotes erd
21175 ) and runs its contents through
21176 \begin_inset Quotes eld
21180 \begin_inset Quotes erd
21186 \begin_layout Standard
21187 Typically, such a scrap would look something like this:
21190 \begin_layout LyX-Code
21197 if [ -z "${NOWEB_SOURCE}" ]
21201 NOWEB_SOURCE=myfile.nw
21207 code to extract files ...]
21210 code to compile files ...]
21215 \begin_layout Standard
21218 LIBDIR/examples/listerrors.lyx
21222 LIBDIR/examples/Literate.lyx
21224 which implement two versions of the
21225 \begin_inset Quotes eld
21229 \begin_inset Quotes erd
21232 program for some illustrations of how all of these pieces go together or
21235 LIBDIR/examples/noweb2lyx.lyx.
21238 Interestingly, these three files show off the language-indepence of the
21239 LyX literate programming support since they are written in Python, C and
21243 \begin_layout Subsubsection
21247 \begin_layout Standard
21248 All the Literate Programming support is configured by the
21253 ools\SpecialChar \menuseparator
21261 \begin_inset Quotes eld
21265 \begin_inset Quotes erd
21269 The important parts are:
21272 \begin_layout Description
21275 \begin_inset Quotes eld
21279 \begin_inset Quotes erd
21283 format Set up via the Formats tab, this is where the Noweb-specific pieces
21293 , the file extension is set to
21298 This tells LyX to create a file with a
21302 extension in the first step of the conversion process.
21305 \begin_layout Description
21312 format This is an empty format whose sole purpose is to be the endpoint
21313 of a conversion (which then allows us to set up a converter for it).
21316 \begin_layout Description
21325 This converter performs the
21326 \begin_inset Quotes eld
21330 \begin_inset Quotes erd
21333 of the literate document.
21334 For Noweb, it is set to
21335 \begin_inset Quotes eld
21340 noweave -delay -index $$i > $$o
21343 \begin_inset Quotes erd
21349 \begin_layout Description
21359 \begin_inset Quotes eld
21363 \begin_inset Quotes erd
21367 As stated above, the Converter is set to
21368 \begin_inset Quotes eld
21376 \begin_inset Quotes erd
21379 , with Flags set to
21380 \begin_inset Quotes eld
21385 originaldir,parselog=listerrors
21388 \begin_inset Quotes erd
21394 \begin_layout Subsubsection
21398 \begin_layout Standard
21399 There is also a new function implemented in the LyX server, the
21400 \begin_inset Quotes eld
21403 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
21407 \begin_layout Standard
21408 When debugging code with ddd/gdb, it is possible to invoke a text editor
21409 at the current execution position with a single key stroke.
21410 The default ddd configuration for that is shift-ctrl-V.
21411 It happens that you can define the editor command line invocation in ddd
21418 dit\SpecialChar \menuseparator
21423 references\SpecialChar \menuseparator
21430 dialog and changing the "Edit Sources" entry.
21433 \begin_layout Standard
21434 I take advantage of the new created LyX server function and this ddd feature,
21436 \begin_inset Quotes eld
21440 \begin_inset Quotes erd
21446 \begin_layout LyX-Code
21447 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
21450 \begin_layout Standard
21451 With this, whenever you are using ddd and find a point in the program that
21452 you want to edit, you just press shift-ctrl-V (in the ddd window), and
21453 ddd you forward this information to LyX through the LyX server and then
21454 the LyX window will show the same file with the cursor at the same position
21455 ddd was pointing to.
21456 No more guessing or long scrolling to locate a point in the program back
21460 \begin_layout Standard
21461 Note however that you must enable the LyX server to get this feature working
21462 (it is disabled by default).
21463 You can enable it in
21475 ) by entering in the
21480 \begin_inset Quotes eld
21485 /home/<your-home-directory>/.lyx/lyxpipe
21488 \begin_inset Quotes erd
21494 \begin_layout Standard
21495 Read the LyX server documentation in the
21497 Customization Manual
21499 for further information.
21502 \begin_layout Subsubsection
21506 \begin_layout Standard
21507 There are six new buttons that can be added to your LyX toolbar.
21508 Five of these buttons are short cuts to layout styles:
21529 The last one is a short cut to the
21530 \begin_inset Quotes eld
21534 \begin_inset Quotes erd
21541 \begin_layout Standard
21542 LyX has a range of buttons that are available for tool bar customization.
21543 In my toolbar I like to combine the six short cuts above with two more:
21551 \SpecialChar \menuseparator
21559 \SpecialChar \menuseparator
21572 iew\SpecialChar \menuseparator
21580 Here is how it looks like:
21583 \begin_layout LyX-Code
21587 \begin_layout LyX-Code
21591 \begin_layout LyX-Code
21592 Icon "layout Standard"
21595 \begin_layout LyX-Code
21596 Icon "layout Section"
21599 \begin_layout LyX-Code
21600 Icon "layout LaTeX"
21603 \begin_layout LyX-Code
21604 Icon "layout LyX-Code"
21607 \begin_layout LyX-Code
21608 Icon "layout Scrap"
21611 \begin_layout LyX-Code
21615 \begin_layout LyX-Code
21619 \begin_layout LyX-Code
21620 Icon "buffer-typeset"
21623 \begin_layout LyX-Code
21624 Icon "build-program"
21627 \begin_layout LyX-Code
21631 \begin_layout LyX-Code
21635 \begin_layout LyX-Code
21639 \begin_layout LyX-Code
21643 \begin_layout LyX-Code
21647 \begin_layout Subsubsection
21648 Colors customization
21651 \begin_layout Standard
21652 There are a number of colors in LyX that can be customized in
21657 One of the things that bothers people is the LaTeX font color.
21658 The default color is red, since the scraps uses LaTeX font, and there is
21659 a lot of scraps in literate documents, you may get tired of seeing everything
21661 You can change it by going to the tabs
21670 \begin_layout Standard
21671 The next thing is the visible presence of the newline character in the screen.
21672 You can choose the color of this particular character and make it blend
21674 I recommend you choosing a color that is close to the background but not
21675 equal, that way you still can see it is there, but it is not bothering
21680 \begin_layout Chapter
21681 Secrets of the LaTeX Masters
21682 \begin_inset LatexCommand \label{cha:secrets}
21689 \begin_layout Standard
21690 Though LyX is a powerful tool, it cannot hope to support everything that
21691 can be done with pure TeX/LaTeX.
21692 However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
21693 as long as you are not afraid to use that
21694 \begin_inset Quotes eld
21698 \begin_inset Quotes erd
21701 button on the toolbar or add things to the LaTeX preamble.
21702 This section lists some tips, tricks, and otherwise cool ideas to give
21703 your document that extra little flair.
21706 Do try this at home
21708 , just start with something a little smaller and less important than your
21712 \begin_layout Standard
21713 Most ideas in this section require less common files in your LaTeX installation.
21714 If you have a system like teTeX, most will already be available.
21715 A few, however, will need to be downloaded from one of the CTAN archives.
21716 Often, there are several ways to do something, or several LaTeX style files
21717 which do the same thing.
21718 We do not endorse one choice over another, we simply claim that we have
21719 done a particular task with a particular file.
21720 Put on your wizard hat, keep an eye out for dragons, and let us begin.
21723 \begin_layout Section
21724 Tricks for Footnotes and Margin Notes
21727 \begin_layout Standard
21733 \begin_layout Subsection
21737 \begin_layout Standard
21738 LyX cannot yet take care of setting the footnote numbering back to 1 after
21739 each section in the
21740 \begin_inset Quotes eld
21748 \begin_inset Quotes erd
21753 document class or changing the counter style.
21754 You'll need to insert LaTeX commands like the following to achieve that:
21757 \begin_layout Standard
21761 \begin_layout Standard
21765 setcounter{footnote}{0}
21774 setcounter{footnote}{0}
21776 will set the counter back to 1
21780 \begin_layout Standard
21781 The counter has been set back to 1.
21789 \begin_layout Standard
21790 The following command will change the numbering to small letters.
21791 Take a look at the next footnote in your xdvi or ghostview
21795 \begin_layout Standard
21812 \begin_layout Standard
21813 This is an example for a footnote with alphabetic numbering.
21833 \begin_layout Standard
21834 The next command sets the counter style back to default, i.e.
21845 \begin_layout Standard
21856 to set the counter--style back to LyX's default, i.e.
21865 \begin_layout Standard
21886 \begin_layout Standard
21917 and others as counter styles.
21918 Just replace the LaTeX command in the above example and rerun TeX to see
21919 what those styles can do.
21923 \begin_layout Subsection
21927 \begin_layout Standard
21928 Here are two examples of neat things you can do to margin notes using LaTeX
21932 \begin_layout Standard
21933 The following command will make a vertical line appear alongside your text---gre
21935 \begin_inset Quotes eld
21939 \begin_inset Quotes erd
21948 rule[-10mm]{30mm}{5mm}}
21956 \begin_layout Standard
21962 rule[-10mm]{30mm}{5mm}}
21970 \begin_layout Standard
21971 Check your dvi- or ghostview-output to see what the
21977 command does to the following margin note.
21980 \begin_layout Standard
21984 \begin_layout Standard
21994 \begin_inset Marginal
21997 \begin_layout Standard
22008 \begin_layout Section
22012 \begin_layout Standard
22015 Lars Gullik Bjønnes
22018 \begin_layout Subsection
22022 \begin_layout Standard
22023 The aim for this chapter
22027 \begin_layout Standard
22028 Editor's note: Lars' original chapter was a masterful description of how
22034 However, it was too long to flow smoothly in this document.
22035 I have therefore chosen to excerpt the most important sections here (sorry,
22036 Lars); you can read the original chapter (and more of the story!) in the
22039 examples/multicol.lyx
22047 is to show how the LaTeX package
22051 can be used in a LyX document.
22052 As LyX doesn't support the
22056 package natively yet, we have to use some small hacks.
22057 By reading this section it should be obvious how to do this.
22060 \begin_layout Subsection
22064 \begin_layout Standard
22069 package allows switching between one and multicolumn format on the same
22071 Footnotes are handled correctly (for the most part), but will be placed
22072 at the bottom of the page and not under each column.
22073 LaTeX's float mechanism, however, is partly disabled in the current implementat
22075 At the moment only page-wide floats can be used within the scope of the
22079 \begin_layout Subsection
22083 \begin_layout Subsubsection
22087 \begin_layout Standard
22088 If you want to have two columns in your text, you have use LaTeX mode to
22093 begin{multicols}{2}
22095 at the point where you want the two column layout to start, and then
22101 where you want it to end.
22105 \begin_layout Standard
22109 \begin_layout Standard
22113 begin{multicols}{2}
22121 \begin_layout Standard
22126 The Adventure of the Empty House
22132 Sir Arthur Conan Doyle
22135 \begin_layout Standard
22138 It was in the spring of the year 1894 that all London was interested, and
22139 the fashionable world dismayed, by the murder of the Honourable Ronald
22140 Adair under most unusual and inexplicable circumstances.
22141 The public has already learned those particulars of the crime which came
22142 out in the police investigation, but a good deal was suppressed upon that
22143 occasion, since the case for the prosecution was so overwhelmingly strong
22144 that it was not necessary to bring forward all the facts.
22145 Only now, at the end of nearly ten years, am I allowed to supply those
22146 missing links which make up the whole of that remarkable chain.
22147 The crime was of interest in itself, but that interest was as nothing to
22148 me compared to the inconceivable sequel, which afforded me the greatest
22149 shock and surprise of any event in my adventurous life.
22150 Even now, after this long interval, I find myself thrilling as I think
22151 of it, and feeling once more that sudden flood of joy, amazement, and increduli
22152 ty which utterly submerged my mind.
22153 Let me say to that public, which has shown some interest in those glimpses
22154 which I have occasionally given them of the thoughts and actions of a very
22155 remarkable man, that they are not to blame me if I have not shared my knowledge
22156 with them, for I should have considered it my first duty to do so, had
22157 I not been barred by a positive prohibition from his own lips, which was
22158 only withdrawn upon the third of last month.
22161 \begin_layout Standard
22165 \begin_layout Standard
22177 \begin_layout Subsubsection
22181 \begin_layout Standard
22182 The same pattern is used when you want more than two columns:
22185 \begin_layout Standard
22189 \begin_layout Standard
22193 begin{multicols}{3}
22201 \begin_layout Standard
22204 It can be imagined that my close intimacy with Sherlock Holmes had interested
22205 me deeply in crime, and that after his disappearance I never failed to
22206 read with care the various problems which came before the public.
22207 And I even attempted, more than once, for my own private satisfaction,
22208 to employ his methods in their solution, though with indifferent success.
22209 There was none, however, which appealed to me like this tragedy of Ronald
22211 As I read the evidence at the inquest, which led up to a verdict of willful
22212 murder against some person or persons unknown, I realized more clearly
22213 than I had ever done the loss which the community had sustained by the
22214 death of Sherlock Holmes.
22215 There were points about this strange business which would, I was sure,
22216 have specially appealed to him, and the efforts of the police would have
22217 been supplemented, or more probably anticipated, by the trained observation
22218 and the alert mind of the first criminal agent in Europe.
22219 All day, as I drove upon my round, I turned over the case in my mind and
22220 found no explanation which appeared to me to be adequate.
22221 At the risk of telling a twice-told tale, I will recapitulate the facts
22222 as they were known to the public at the conclusion of the inquest.
22225 \begin_layout Standard
22229 \begin_layout Standard
22241 \begin_layout Standard
22242 You can have have more than 3 columns if you want to, but that might not
22243 be very pleasant for the eye.
22246 \begin_layout Subsubsection
22247 Columns inside columns
22250 \begin_layout Standard
22251 You can even have columns inside columns:
22254 \begin_layout Standard
22258 \begin_layout Standard
22262 begin{multicols}{2}
22270 \begin_layout Standard
22273 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22274 at that time governor of one of the Australian colonies.
22275 Adair's mother had returned from Australia to undergo the operation for
22276 cataract, and she, her son Ronald, and her daughter Hilda were living together
22280 \begin_layout Standard
22284 \begin_layout Standard
22288 begin{multicols}{2}
22296 \begin_layout Standard
22299 The youth moved in the best society--had, so far as was known, no enemies
22300 and no particular vices.
22301 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22302 had been broken off by mutual consent some months before, and there was
22303 no sign that it had left any very profound feeling behind it.
22304 For the rest {sic} the man's life moved in a narrow and conventional circle,
22305 for his habits were quiet and his nature unemotional.
22306 Yet it was upon this easy-going young aristocrat that death came, in most
22307 strange and unexpected form, between the hours of ten and eleven-twenty
22308 on the night of March 30, 1894.
22311 \begin_layout Standard
22315 \begin_layout Standard
22327 \begin_layout Standard
22330 Ronald Adair was fond of cards--playing continually, but never for such
22331 stakes as would hurt him.
22332 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22333 It was shown that, after dinner on the day of his death, he had played
22334 a rubber of whist at the latter club.
22335 He had also played there in the afternoon.
22340 The evidence of those who had played with him-- Mr.
22341 Murray, Sir John Hardy, and Colonel Moran--showed that the game was whist,
22342 and that there was a fairly equal fall of the cards.
22343 Adair might have lost five pounds, but not more.
22344 His fortune was a considerable one, and such a loss could not in any way
22346 He had played nearly every day at one club or other, but he was a cautious
22347 player, and usually rose a winner.
22348 It came out in evidence that, in partnership with Colonel Moran, he had
22349 actually won as much as four hundred and twenty pounds in a sitting, some
22350 weeks before, from Godfrey Milner and Lord Balmoral.
22351 So much for his recent history as it came out at the inquest.
22354 \begin_layout Standard
22358 \begin_layout Standard
22370 \begin_layout Standard
22371 Please do read the file
22373 examples/multicol.lyx
22375 for more advanced examples including column and header spacing, vertical
22376 separator lines, and more.
22379 \begin_layout Section
22384 Paragraph Environment
22385 \begin_inset OptArg
22388 \begin_layout Standard
22389 Numbering in Enumerate
22397 \begin_layout Standard
22403 \begin_layout Standard
22404 \begin_inset VSpace bigskip
22410 \begin_layout Standard
22412 The default numbering for the
22416 paragraph environment begins with Arabic numbers and ends with uppercase
22418 Suppose, however, you wanted a different type of numbering scheme.
22419 Here's a quickie example of how to change the numbering scheme:
22422 \begin_layout LyX-Code
22432 \begin_layout LyX-Code
22442 \begin_layout LyX-Code
22452 \begin_layout LyX-Code
22462 \begin_layout Standard
22463 \SpecialChar \ldots{}
22464 which changes the numbering scheme to uppercase Roman numerals, uppercase
22465 letters, Arabic numbers, and lowercase letter.
22468 \begin_layout Standard
22469 Additionally, the previous example also adds a little bit extra to the numbering
22471 For example, the first level label actually looks like:
22472 \begin_inset Quotes eld
22476 \begin_inset Quotes erd
22480 For ease of reading, we'll describe what the numbering schemes look like
22481 using a notation something like this: <
22482 \begin_inset Quotes eld
22486 \begin_inset Quotes erd
22491 \begin_inset Quotes erd
22495 \begin_inset Quotes erd
22500 \begin_inset Quotes erd
22504 \begin_inset Quotes erd
22509 \begin_inset Quotes eld
22513 \begin_inset Quotes erd
22520 \begin_layout Standard
22521 As you can see in the example, there is a label command for each nesting
22528 \SpecialChar \ldots{}
22535 , as well as a counter,
22539 \SpecialChar \ldots{}
22545 There are also five
22546 \begin_inset Quotes eld
22550 \begin_inset Quotes erd
22583 , each of which take one counter as an argument.
22584 You can add characters before or after these, but there's no need to add
22588 \begin_layout Standard
22589 You can get really fancy with these.
22593 \begin_layout LyX-Code
22607 \begin_layout LyX-Code
22619 \begin_layout LyX-Code
22629 \begin_layout LyX-Code
22639 \begin_layout Standard
22640 produces the somewhat out of hand numbering scheme: <
22641 \begin_inset Quotes eld
22645 \begin_inset Quotes erd
22650 \begin_inset Quotes erd
22654 \begin_inset Quotes erd
22659 \begin_inset Quotes erd
22663 \begin_inset Quotes erd
22668 \begin_inset Quotes eld
22672 \begin_inset Quotes erd
22679 \begin_layout Section
22680 Extra Space Between Table Rows
22683 \begin_layout Standard
22689 \begin_layout Standard
22690 \begin_inset VSpace bigskip
22696 \begin_layout Standard
22698 LaTeX allows you to put a bit of extra space between rows in a table by
22699 giving an optional argument to the end-of-row specifier (
22708 LyX has not yet implemented this in a formal way, so here are two dirty
22709 little tricks to do the same job.
22713 \begin_layout Standard
22714 The first is the more formal, but longwinded way to do it.
22715 In the LaTeX preamble, add the following command definition:
22718 \begin_layout Standard
22725 extratablespace}[1]{
22729 This command takes a single argument---the amount of space you would like
22731 Insert the command in the first column of the row
22735 where you would like the space to appear.
22736 Here is an example (I've removed all the borders using
22741 ayout\SpecialChar \menuseparator
22750 \begin_layout Standard
22752 \begin_inset Tabular
22753 <lyxtabular version="3" rows="4" columns="3">
22755 <column alignment="center" valignment="top" width="0pt">
22756 <column alignment="center" valignment="top" width="0pt">
22757 <column alignment="center" valignment="top" width="0pt">
22759 <cell alignment="center" valignment="top" topline="true" usebox="none">
22762 \begin_layout Standard
22777 <cell alignment="center" valignment="top" topline="true" usebox="none">
22780 \begin_layout Standard
22795 <cell alignment="center" valignment="top" topline="true" usebox="none">
22798 \begin_layout Standard
22815 <cell alignment="center" valignment="top" topline="true" usebox="none">
22818 \begin_layout Standard
22824 <cell alignment="center" valignment="top" topline="true" usebox="none">
22827 \begin_layout Standard
22842 <cell alignment="center" valignment="top" topline="true" usebox="none">
22845 \begin_layout Standard
22862 <cell alignment="center" valignment="top" topline="true" usebox="none">
22865 \begin_layout Standard
22878 \begin_layout Standard
22882 extratablespace{2ex}
22892 <cell alignment="center" valignment="top" topline="true" usebox="none">
22895 \begin_layout Standard
22910 <cell alignment="center" valignment="top" topline="true" usebox="none">
22913 \begin_layout Standard
22930 <cell alignment="center" valignment="top" topline="true" usebox="none">
22933 \begin_layout Standard
22939 <cell alignment="center" valignment="top" topline="true" usebox="none">
22942 \begin_layout Standard
22957 <cell alignment="center" valignment="top" topline="true" usebox="none">
22960 \begin_layout Standard
22983 \begin_layout Standard
22984 The second method is faster, but will make typographers and TeXperts all
22985 over the world groan.
22986 Simply put an end of row specifier with optional argument at the same spot.
22987 No fancy definitions are needed as in the above example, but there will
22988 be more space inserted than you specified because you essentially added
22989 a blank row plus the extra space.
22990 If the space added is too much, simply use a negative number, like so:
22993 \begin_layout Standard
22995 \begin_inset Tabular
22996 <lyxtabular version="3" rows="4" columns="3">
22998 <column alignment="center" valignment="top" width="0pt">
22999 <column alignment="center" valignment="top" width="0pt">
23000 <column alignment="center" valignment="top" width="0pt">
23002 <cell alignment="center" valignment="top" topline="true" usebox="none">
23005 \begin_layout Standard
23020 <cell alignment="center" valignment="top" topline="true" usebox="none">
23023 \begin_layout Standard
23038 <cell alignment="center" valignment="top" topline="true" usebox="none">
23041 \begin_layout Standard
23058 <cell alignment="center" valignment="top" topline="true" usebox="none">
23061 \begin_layout Standard
23067 <cell alignment="center" valignment="top" topline="true" usebox="none">
23070 \begin_layout Standard
23085 <cell alignment="center" valignment="top" topline="true" usebox="none">
23088 \begin_layout Standard
23105 <cell alignment="center" valignment="top" topline="true" usebox="none">
23108 \begin_layout Standard
23121 \begin_layout Standard
23137 <cell alignment="center" valignment="top" topline="true" usebox="none">
23140 \begin_layout Standard
23155 <cell alignment="center" valignment="top" topline="true" usebox="none">
23158 \begin_layout Standard
23175 <cell alignment="center" valignment="top" topline="true" usebox="none">
23178 \begin_layout Standard
23184 <cell alignment="center" valignment="top" topline="true" usebox="none">
23187 \begin_layout Standard
23202 <cell alignment="center" valignment="top" topline="true" usebox="none">
23205 \begin_layout Standard
23228 \begin_layout Standard
23229 It's short, sweet, and gets the job done quickly, even if it is really ugly.
23230 You may put away the rotten vegetables now! I promise I won't suggest anything
23234 \begin_layout Section
23238 \begin_layout Standard
23244 \begin_layout Standard
23245 \begin_inset VSpace bigskip
23251 \begin_layout Standard
23256 \begin_layout Standard
23262 tmpfont}{cmr17 scaled 2500}{
23274 \begin_layout Standard
23279 \begin_layout Standard
23290 hose of you who like the style of old books probably also like
23291 \begin_inset Quotes eld
23295 \begin_inset Quotes erd
23298 ---those large capital letters which begin each new chapter or section.
23299 Implementing them with plain LyX/LaTeX is straightforward (assuming you
23300 know some plain TeX!) but does require a lot of work and many iterations,
23301 as you can see by all the ugly TeX-mode stuff at the beginning of this
23305 \begin_layout Standard
23309 \begin_layout Standard
23315 bigdrop{-1em}{3}{ptmri}{T}+
23320 here is a much easier way of doing this, of course.
23329 ) package from CTAN allows a simple way to add such letters to your documents.
23330 Since this package is not a standard part of teTeX, I can't demonstrate
23331 it within this document, but if you copy this paragraph to a new document,
23333 \begin_inset Quotes eld
23343 \begin_inset Quotes erd
23346 and the pluses from the TeX code at the beginning of the paragraph, and
23351 usepackage{dropcaps}
23353 to your LaTeX preamble, you will get a nice Times Roman Italic
23354 \begin_inset Quotes eld
23358 \begin_inset Quotes erd
23361 , whose height is three lines of text and which protrudes 1 em into the
23363 (Make certain you have copied
23364 \begin_inset Quotes eld
23372 \begin_inset Quotes erd
23375 into a directory where TeX can see it.) The first argument is the amount
23376 of indentation; in this case the negative sign moves it into the margin.
23377 The second argument is the height of the letter in number of lines of text.
23378 The third argument is the font name: virtually anything which has a tfm
23379 file should work (wade through the
23381 .../texmf/fonts/tfm
23383 directory for possibilities).
23384 My personal favorite is
23385 \begin_inset Quotes eld
23393 \begin_inset Quotes erd
23396 , a fancy German font specifically designed for dropped capitals.
23397 The fourth argument is the letter (or letters) to be dropped.
23402 package also offers the
23408 command, as well as a slightly simplified
23417 \begin_layout Section
23418 Non-standard Paragraph Shapes
23421 \begin_layout Standard
23427 \begin_layout Standard
23428 \begin_inset VSpace bigskip
23434 \begin_layout Standard
23438 \begin_layout Standard
23450 \begin_layout Standard
23454 \begin_layout Standard
23463 \begin_layout Standard
23477 \begin_layout Standard
23482 \begin_layout Standard
23493 \begin_layout Standard
23502 \begin_layout Standard
23511 \begin_layout Standard
23520 \begin_layout Standard
23529 \begin_layout Standard
23538 \begin_layout Standard
23547 \begin_layout Standard
23556 \begin_layout Standard
23565 \begin_layout Standard
23574 \begin_layout Standard
23583 \begin_layout Standard
23592 \begin_layout Standard
23601 \begin_layout Standard
23610 \begin_layout Standard
23619 \begin_layout Standard
23628 \begin_layout Standard
23637 \begin_layout Standard
23646 \begin_layout Standard
23655 \begin_layout Standard
23661 There are times when the tyranny of rectangular paragraphs must be overthrown.
23662 In such situations, a call to the delightful plain TeX command
23669 As you can see, completely arbitrary shapes can be laid out with a suitable
23670 set of linelength definitions.
23671 While this parshape may look a bit silly and useless, one could conceive
23672 of situations such as finely tuned dropped capitals, word wrapping around
23673 non-rectangular graphics, etc.
23674 which will benefit from such handcrafting.
23677 \begin_layout Standard
23678 \begin_inset VSpace bigskip
23684 \begin_layout Standard
23689 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23696 is the number of lines of text which define the paragraph.
23697 If there turn out to be fewer lines, the shape is truncated; if there are
23698 more, the excess lines have the same dimensions as the last line of the
23708 entries specify the indentation of the line from the left margin, and the
23709 length of the line as measured from that point.
23710 The shape applies only to the current paragraph; everything is reset to
23711 normal for the next paragraph.
23714 \begin_layout Standard
23718 \begin_layout Standard
23730 \begin_layout Section
23734 \begin_layout Standard
23735 As you can see, the examples in this section range from the useful to the
23737 While I don't expect that anyone will ever need the paragraph shape demonstrate
23738 d in the last section, the important point is that you can do almost anything
23739 you want in LyX if you are willing to figure out how to do it in TeX and
23741 TeX is a fantastically powerful typesetting system and all that power is
23742 available to you since LyX uses it as its backend.