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 There are two solutions in this case: Either use the
15859 \begin_inset Quotes eld
15863 \begin_inset Quotes erd
15866 (which is in fact a
15867 \begin_inset Quotes eld
15871 \begin_inset Quotes erd
15874 font that emulates T1 coded fonts using the standard CM fonts).
15875 This is done by selecting
15876 \begin_inset Quotes eld
15879 AE (Almost European)
15880 \begin_inset Quotes erd
15885 Document\SpecialChar \menuseparator
15886 Settings\SpecialChar \menuseparator
15887 Fonts\SpecialChar \menuseparator
15891 However, some glyphs are missing from the CM fonts (e.g.
15892 eth, thorn), and they are taken from the EC fonts.
15893 Therefore you get these glyphs as bitmaps.
15895 \begin_inset Quotes eld
15899 \begin_inset Quotes erd
15904 Document\SpecialChar \menuseparator
15905 Settings\SpecialChar \menuseparator
15906 Fonts\SpecialChar \menuseparator
15910 It is a newer and probably the best Postscript® Type 1 version of cm.
15911 Basically, we recommend this over the
15912 \begin_inset Quotes eld
15916 \begin_inset Quotes erd
15920 However, the Latin Modern fonts differ from cm in some visual aspects,
15921 which does not please everybody.
15924 \begin_layout Standard
15925 Note: LyX uses by default the T1 font encoding.
15926 If you wish to use the default font encoding (this is not recommended,
15927 unless you only write English documents), clear the field
15935 in preferences (tabs
15947 \begin_layout Standard
15948 An alternate option is to use the standard Postscript® fonts instead of
15949 the Computer Modern fonts.
15950 To do that, you just need to select one of the fonts listed in the document
15951 layout dialog (except for
15952 \begin_inset Quotes eld
15956 \begin_inset Quotes erd
15960 \begin_inset Quotes eld
15964 \begin_inset Quotes erd
15967 , they're all Postscript® fonts).
15968 When using the Postscript® fonts, the result PDF file is smaller as the
15969 fonts are not saved into the file.
15970 Furthermore, the Postscript® fonts include all T1 glyphs.
15971 On the other hand, the Postscript® fonts have no bold symbol font, so poor
15972 man's bold must be used (see Section\InsetSpace ~
15974 \begin_inset LatexCommand \ref{sec:pdfbold}
15979 The Postscript® fonts also look different from the Computer Modern fonts.
15982 \begin_layout Standard
15983 To sum up, both the Computer Modern and the Postscript® fonts gives good
15984 results (with few exceptions).
15985 The decision of which one to use is a matter of taste.
15988 \begin_layout Subsubsection
15991 boldsymbol{} command work when I use pslatex?
15992 \begin_inset LatexCommand \label{sec:pdfbold}
15997 \begin_inset OptArg
16000 \begin_layout Standard
16017 \begin_layout Standard
16018 The Postscript® fonts do not have a bold symbol font.
16019 The solution is to use the
16025 (poor man's bold) command.
16028 \begin_layout Standard
16029 It is possible to redefine the
16044 \begin_layout LyX-Code
16054 \begin_layout Standard
16058 \begin_layout Subsubsection
16059 Is it possible to do write latex code which is processed only when running
16061 \begin_inset OptArg
16064 \begin_layout Standard
16065 Conditionals with pdfLaTeX
16073 \begin_layout Standard
16075 Here is an example:
16078 \begin_layout LyX-Code
16086 \begin_layout LyX-Code
16096 \begin_layout LyX-Code
16102 \begin_layout LyX-Code
16108 \begin_layout LyX-Code
16114 \begin_layout LyX-Code
16120 \begin_layout LyX-Code
16124 \begin_layout LyX-Code
16130 \begin_layout LyX-Code
16133 pdfinfo { /Author (your name and e-mail address)
16136 \begin_layout LyX-Code
16137 /Title (official title -- i.e., title element)
16140 \begin_layout LyX-Code
16141 /Subject (one line description of the document)
16144 \begin_layout LyX-Code
16148 \begin_layout LyX-Code
16151 pdfcatalog { /PageMode (/UseNone)
16154 \begin_layout LyX-Code
16155 % /OpenAction (fitbh)
16158 \begin_layout LyX-Code
16162 \begin_layout LyX-Code
16165 usepackage[pdftex]{hyperref}
16168 \begin_layout LyX-Code
16174 \begin_layout LyX-Code
16177 usepackage[ps2pdf]{hyperref}
16180 \begin_layout LyX-Code
16186 \begin_layout Subsubsection
16187 How can I make URLs clickable ?
16190 \begin_layout Standard
16191 See the references here :
16194 \begin_layout Standard
16195 \begin_inset LatexCommand \url{http://wiki.lyx.org/pmwiki.php/FAQ/PDF}
16202 \begin_layout Subsection
16206 \begin_layout Standard
16207 Custom exports are possible if you have some particularly weird format you
16208 wish to convert to, assuming you have the relevant converter, of course.
16213 file can be chosen in the
16218 ile\SpecialChar \menuseparator
16223 xport\SpecialChar \menuseparator
16230 dialog; LyX will automatically convert the file to this point, then feed
16231 it to your custom converter.
16232 The possible values are all formats that LyX can produce from its own documents.
16236 \begin_layout Standard
16237 The converter command is also specified in the dialog.It should be a completely
16238 qualified command line which uses the variable
16242 to specify the name of the file.
16243 If this variable is not given, then the file will be sent to the standard
16244 input of your command.
16245 You may have to apply a bit of ingenuity to escape this sequence correctly
16246 so that it is compatible with your shell.
16250 \begin_layout Standard
16251 While it is not possible to save this command using the
16255 dialog, you can manually edit your
16262 \begin_layout LyX-Code
16265 custom_export_command "mycommand $$FName"
16268 \begin_layout Section
16269 The Complete reLyX Description
16270 \begin_inset LatexCommand \label{sec:reLyX}
16277 \begin_layout Subsection
16281 \begin_layout Standard
16282 The simplest way to use reLyX is via the
16287 ile\SpecialChar \menuseparator
16295 That runs reLyX on the given file and loads the resulting file into LyX.
16296 You should try that first, and call it from the command line only if you
16297 need to use more complicated options.
16300 \begin_layout Standard
16352 \begin_layout Standard
16408 \begin_layout Standard
16418 \begin_layout Subsection
16422 \begin_layout Description
16428 By default, when reLyX sees a
16434 command, it creates a file of textclass
16435 \begin_inset Quotes eld
16439 \begin_inset Quotes erd
16442 and reads the LyX layout file for that class.
16447 to declare a different textclass (and read a different layout file).
16450 \begin_layout Description
16456 By default, reLyX gives sparse output and deletes the temporary files which
16457 were created during translation.
16462 flag will create much more output (both to stdout and stderr) and leave
16463 the temporary files around.
16466 \begin_layout Description
16472 reLyX will not run if the
16476 file it would generate already exists Use the
16480 option (carefully) to clobber any existing files.
16483 \begin_layout Description
16489 Print out usage information and quit
16492 \begin_layout Description
16498 With this option, all temporary files and LyX output files (for the given
16499 input file, for any included files, or for any file fragments given with
16504 option) will be put into
16509 Otherwise, for each file
16513 , the temporary files and the LyX output file will be created in
16518 This can be useful if a file includes files from other directories which
16519 you want to consolidate in one directory, or if you don't have write permission
16520 on the directory the LaTeX files are in.
16523 \begin_layout Description
16529 The input files are LaTeX fragments, with no preamble matter or
16536 This option requires the
16540 option, since there are no
16546 commands in the files reLyX is translating.
16547 When using this option, you can translate more than one file, as long as
16548 all files are the same class.
16549 The LyX file created by reLyX can be included in an existing LyX file using
16555 nsert\SpecialChar \menuseparator
16560 \SpecialChar \menuseparator
16571 \begin_layout Description
16576 Regular environments (see the Section\InsetSpace ~
16578 \begin_inset LatexCommand \ref{sub:relyx-syntax}
16583 If you give more than one environment, separate them with commas (not
16585 You'll probably need to quote the environment list, especially if it has
16586 asterisk environments (foo*) in it.
16587 If you use this command often, considering creating a personal syntax file.
16590 \begin_layout Description
16596 Input (one or more quoted, comma-separated) syntax files to read in addition
16598 (see the section Section\InsetSpace ~
16600 \begin_inset LatexCommand \ref{sub:relyx-syntax}
16607 \begin_layout Subsection
16611 \begin_layout Subsubsection
16615 \begin_layout Standard
16616 reLyX will create a LyX file
16620 from the LaTeX file
16631 \begin_layout Standard
16649 does not exist and does not have one of these suffixes, reLyX will try
16655 (This is similar to the behavior of LaTeX.)
16658 \begin_layout Standard
16659 The purpose of reLyX is to translate
16664 If your LaTeX file doesn't compile---or if you do weird things, like redefining
16665 standard LaTeX commands---it may choke.
16666 LaTeX209 will often be translated correctly, but it's not guaranteed.
16669 \begin_layout Standard
16670 reLyX has some bugs and lacks a few features.
16671 However, its main goals are:
16674 \begin_layout Itemize
16675 Get through a well-behaved LaTeX2e file without crashing
16678 \begin_layout Itemize
16679 Translate a lot of that file.
16682 \begin_layout Itemize
16683 Localize the parts that can't be translated and copy them in TeX mode
16686 \begin_layout Standard
16687 It achieves these main goals pretty well on most files.
16690 \begin_layout Standard
16691 There are many improvements that can and will be made to reLyX in the future.
16692 However, we wanted to get reLyX out there early on, to make it easier for
16693 new LyX users to read in their existing LaTeX files.
16696 \begin_layout Subsubsection
16700 \begin_layout Standard
16701 Here's a more lengthy description of what you should do to translate a LaTeX
16705 \begin_layout Itemize
16710 \begin_layout Standard
16711 reLyX will inform you of its progress and give any warnings to stderr, so
16712 if you don't want any output at all, try (in csh)
16713 \begin_inset Quotes eld
16718 reLyX foo.tex >& /dev/null
16721 \begin_inset Quotes erd
16725 \begin_inset Quotes eld
16737 \begin_inset Quotes erd
16741 You should NOT redirect standard output to
16750 \begin_layout Itemize
16751 Run LyX on the resulting .lyx file.
16755 \begin_layout Standard
16756 In theory, most of the file will have been translated, and anything that's
16757 untranslatable will be highlighted in red (TeX mode).
16758 In theory, LyX will be able to read in the file, and to create printed
16759 documents from it, because all that untranslated red stuff will be passed
16760 directly back to LaTeX, which LyX uses as a backend.
16761 Unfortunately, reality doesn't always reflect theory.
16762 If reLyX crashes, or LyX cannot read the generated LyX file, see Section\InsetSpace ~
16764 \begin_inset LatexCommand \ref{sub:relyx-bugs}
16776 \begin_layout Itemize
16777 Change things that are in ERT boxes (TeX code) by hand in LyX.
16781 \begin_layout Standard
16782 As mentioned above, you should be able to print out the LyX file even without
16784 However, changing a command in TeX mode to the corresponding LyX object
16785 will allow you to take advantage of LyX's WYSIWYM editing.
16788 \begin_layout Standard
16789 reLyX is not guaranteed to create a LyX file which generates exactly the
16790 same output as the LaTeX file, but it should come close.
16791 reLyX will generally err on the side of translating less to ensure that
16792 dvi or ps files are accurate, even though this leads to more
16793 \begin_inset Quotes eld
16797 \begin_inset Quotes erd
16804 \begin_layout Itemize
16805 PROOFREAD THE DOCUMENT!!
16809 \begin_layout Standard
16810 I'm sure you were planning on doing this anyway, but it's particularly important
16811 after translating a LaTeX document.
16812 reLyX is, at least now, better at
16813 \begin_inset Quotes eld
16817 \begin_inset Quotes erd
16820 (translating the whole document) than
16821 \begin_inset Quotes eld
16825 \begin_inset Quotes erd
16828 (translating every little detail).
16829 For example, you may see extra spaces or deleted spaces.
16830 Space handling has improved, but it's not perfect.
16834 \begin_layout Subsubsection
16835 What reLyX Can Handle
16838 \begin_layout Standard
16839 reLyX understands many LaTeX commands.
16843 \begin_layout Itemize
16844 regular text, including mini-commands like ~, '',
16856 , as well as accented characters like
16862 , and the special cases ?` and !`
16865 \begin_layout Itemize
16866 title commands like
16890 and the abstract environment
16893 \begin_layout Itemize
16894 heading commands like
16900 including starred commands (
16909 \begin_layout Itemize
16935 \begin_layout Itemize
16948 environments, and their
16955 Also, well-behaved nested lists
16958 \begin_layout Itemize
16959 cross-referencing commands:
16984 \begin_layout Itemize
16998 \begin_layout Itemize
16999 font-changing commands including
17017 , and corresponding commands to change family, size, series, and shape
17020 \begin_layout Itemize
17047 \begin_inset Quotes erd
17057 \begin_inset Quotes erd
17063 \begin_layout Itemize
17068 environment, and commands that go inside it like
17089 \begin_layout Itemize
17104 commands within them
17107 \begin_layout Itemize
17118 command, as well as BibTeX's
17133 \begin_layout Itemize
17134 miscellaneous commands:
17163 \begin_layout Itemize
17164 documentclass-specific environments (and some commands) which can be translated
17168 \begin_layout Itemize
17169 arguments to certain untranslatable commands (e.g.
17179 \begin_layout Standard
17180 Some of this support may not be 100% yet.
17181 See below for details
17184 \begin_layout Standard
17185 reLyX copies math (almost) verbatim from your LaTeX file.
17186 Luckily, LyX reads in LaTeX math, so (almost) any math which is supported
17187 by LyX should work just fine.
17188 A few math commands which are not supported by LyX will be replaced with
17189 their equivalents, e.g.,
17209 \begin_layout Standard
17210 reLyX will also copy any preamble commands (i.e., anything before
17216 ) verbatim, so fancy stuff you've got in your preamble should be conserved
17217 in dvi and printed documents, although it will not of course show up in
17219 Check the preamble to make sure.
17222 \begin_layout Subsubsection
17223 What reLyX Can't Handle --- But it's OK
17226 \begin_layout Itemize
17234 \begin_layout Itemize
17238 \begin_layout Itemize
17260 \begin_layout Itemize
17280 \begin_layout Itemize
17292 reLyX is careful to copy
17296 in this case, including comments and whitespace.
17299 \begin_layout Itemize
17300 some unknown (e.g., user-defined) environments and commands
17303 \begin_layout Standard
17304 reLyX copies unknown commands, along with their arguments, verbatim into
17312 where it doesn't recognize the
17313 \begin_inset Quotes eld
17317 \begin_inset Quotes erd
17320 environment, it will copy verbatim until it sees
17326 (unless you use the
17331 Hopefully, then, most of these unknown commands won't cause reLyX to break;
17332 they'll merely require you to do some editing once you've loaded the file
17334 That should be less painful than editing either the
17342 file using a text editor.
17345 \begin_layout Subsubsection
17346 What reLyX Handles Badly --- a.\InsetSpace ~
17350 \begin_inset LatexCommand \label{sub:relyx-bugs}
17357 \begin_layout Standard
17358 Since reLyX is relatively new, it's got a number of problems.
17359 As it matures, these bugs will be squished.
17360 A number of bugs and missing features can be found listed on the LyX bug
17362 \begin_inset LatexCommand \url[LyX Bugzilla]{http://bugzilla.lyx.org/}
17369 \begin_layout Standard
17370 If reLyX is choking on something, or LyX can't read it after reLyX translates
17371 it, the best thing to do is to put
17377 before the offending text, and
17385 \begin_inset Quotes eld
17389 \begin_inset Quotes erd
17393 reLyX will copy this block exactly, in TeX mode.
17394 Then edit the resulting LyX file, and translate the unknown stuff by hand.
17399 environment is magical; the
17411 commands will not be put into the LyX file.
17414 \begin_layout Itemize
17415 \begin_inset Quotes eld
17419 \begin_inset Quotes erd
17422 copying of unknown environments and commands isn't quite exact.
17423 Specifically, newlines and comments may be lost.
17424 This will yield ugly LyX, but in almost all cases the output will be the
17426 However, certain parts of the file will be copied perfectly, including
17427 whitespace and comments.
17428 This includes: the LaTeX preamble,
17438 commands, and skip blocks.
17441 \begin_layout Itemize
17442 reLyX translates only a few options to the
17449 (Specifically 1[012]pt, [letter|legal|executive|a4|a5|b5]paper, [one|two]side,
17450 landscape, and [one|two]column.) Other options are placed in the extra class
17451 options field in the
17456 ocument\SpecialChar \menuseparator
17467 \begin_layout Standard
17468 More importantly, reLyX doesn't translate
17474 commands, margin commands,
17480 s, or, in fact, anything else from the preamble.
17481 It simply copies them into the LaTeX preamble.
17482 If you have margin commands in your preamble, then the LyX file will generate
17484 However, these margins will override any margins you set in the LyX
17491 \SpecialChar \menuseparator
17497 So you should remove the options from the preamble to be safe.
17498 The same goes for setting your language with babel,
17514 \begin_layout Itemize
17515 The foil class has a couple bugs.
17516 reLyX may do weird things with optional arguments to
17523 Also, it may handle
17529 incorrectly (although the stuff in the environment should translate normally).
17532 \begin_layout Standard
17533 reLyX is hopefully rather robust.
17534 As mentioned above, it may not translate your file perfectly, but it shouldn't
17536 If it does crash---and the problem is not one of those mentioned above
17541 file---see Section\InsetSpace ~
17543 \begin_inset LatexCommand \ref{sub:relyx-bug-reports}
17550 \begin_layout Subsubsection
17551 What LyX Can't Handle
17554 \begin_layout Standard
17555 LyX itself is missing a couple features, such that even if reLyX translates
17556 things perfectly, LyX may still have trouble reading it.
17557 If you really need these features, you can export your final document as
17558 LaTeX, and put them back in.
17563 for more details on these bugs.
17566 \begin_layout Itemize
17567 For a number of commands, LyX does not support the optional argument.
17580 (and other sectioning commands), and
17589 reLyX will automatically discard the optional arguments with a warning
17591 LyX also ignores the width argument for the
17598 \begin_layout Itemize
17599 Centering (or right or left justifying) works on full paragraphs.
17602 \begin_layout Itemize
17603 LyX support for tables isn't perfect.
17604 For complicated tables, use a
17605 \begin_inset Quotes eld
17609 \begin_inset Quotes erd
17612 block, so that they will be copied in TeX mode.
17615 \begin_layout Itemize
17616 The LyX math editor can't handle the AMS-LaTeX math environments align,
17618 So those environments will be copied in TeX mode.
17623 environments to the exactly equivalent displaymath, and then they will
17624 be translated correctly.
17627 \begin_layout Subsection
17631 \begin_layout Standard
17635 \begin_inset Quotes eld
17639 \begin_inset Quotes erd
17643 \begin_inset Quotes eld
17647 \begin_inset Quotes erd
17650 foo.tex > foo.debug
17653 \begin_layout Standard
17654 The above will create a file my/dir/foo.lyx from foo.tex, overwriting if necessary.
17664 block, it will translate the stuff within the block, but copy the
17676 commands in TeX mode.
17677 Finally, I'm going to keep the temporary files around (they will also
17678 be in my/dir/) and output lots of debugging information into the file foo.debug.
17681 \begin_layout Subsection
17685 \begin_layout Subsubsection
17687 \begin_inset LatexCommand \label{sub:relyx-bug-reports}
17694 \begin_layout Standard
17695 If reLyX is crashing or otherwise acting strangely---in ways other than
17696 those described in Section\InsetSpace ~
17698 \begin_inset LatexCommand \ref{sub:relyx-bugs}
17702 or the bug tracker---then please run reLyX
17707 That will allow you to figure out where in the reLyXing process it crashed.
17708 That, in turn, will allow you to write a better bug report, which will
17709 allow the developers to fix it more quickly and easily.
17712 \begin_layout Standard
17713 Bug reports should be sent to the LyX developers' mailing list.
17714 Its address is currently
17716 lyx-devel@lists.lyx.org
17719 If you are running reLyX on a huge file, please do not send all of the
17720 output in your bug report.
17721 Just include the last ten or twenty lines of output, along with the piece
17722 of the LaTeX file it crashed on.
17723 Or, even better, attach a small but complete file which causes the same
17724 problem as your original file.
17727 \begin_layout Subsubsection
17728 Implementation Details:
17731 \begin_layout Standard
17732 reLyX makes several
17733 \begin_inset Quotes eld
17737 \begin_inset Quotes erd
17740 in order to translate a TeX file.
17741 On each pass, it creates one or two files.
17744 \begin_layout Description
17749 Before doing anything, read the syntax file (or files).
17752 \begin_layout Description
17757 Split preamble (anything before a
17763 command) off the rest of the file.
17764 It saves the two pieces in separate files.
17765 This is necessary because there may be very strange stuff in a preamble.
17766 It also ignores anything after the
17772 , on the assumption that it isn't LaTeX.
17775 \begin_layout Description
17780 Translate the preamble.
17781 Currently, that just means translating the
17787 command and copying the rest exactly into the LyX preamble.
17791 \begin_layout Standard
17792 Once you know what class the document is, read the LyX layout file for that
17797 \begin_layout Description
17803 \begin_inset Quotes eld
17807 \begin_inset Quotes erd
17810 the TeX file, generating slightly stricter LaTeX.
17815 \begin_layout Itemize
17820 to the equivalent but clearer
17825 \begin_layout Itemize
17826 Removing optional arguments that LyX can't handle (e.g., from
17835 \begin_layout Itemize
17849 This is necessary because LyX always writes out the non-local forms anyway.
17850 This should very rarely make a difference.
17854 \begin_layout Description
17859 Translate LaTeX text, commands, and environments to LyX.
17862 \begin_layout Description
17867 Put the two pieces back together, and do some final tweaking, to generate
17871 \begin_layout Standard
17884 commands, reLyX will loop back to the beginning and translate those.
17885 It assumes that the included files are the same class as the main file,
17886 and that they have no preamble matter.
17893 command in the preamble of a file, the command will be copied exactly into
17894 the LaTeX preamble portion of the LyX file, so the included file won't
17895 be translated.) So when translating included files, it skips passes 0 and
17899 \begin_layout Standard
17900 If reLyX doesn't find a file you wanted to include, it will give a warning,
17901 but will continue to translate any files it does find.
17904 \begin_layout Subsubsection
17908 \begin_layout Standard
17909 reLyX reads a LyX layout file to know how to handle LaTeX environments and
17910 commands which get translated to LyX layouts.
17911 This file will include all
17912 \begin_inset Quotes eld
17916 \begin_inset Quotes erd
17919 non-math environments (i.e., including quote and itemize, but not tabular,
17920 minipage, and some other fancy environments), and commands like
17933 If you want to reLyX a class that doesn't have an existing layout file,
17934 then you'll have to create a layout file.
17935 But you have to do this anyway, in order to LyX the file, since LyX depends
17936 on layout files to know how to display and process its files.
17937 Check the LyX documentation for help with this task (which can be hard
17938 or easy, depending on the class you want to create a layout file for.) If
17939 your class is quite similar to a class that has a layout file, then consider
17947 \begin_layout Subsubsection
17949 \begin_inset LatexCommand \label{sub:relyx-syntax}
17956 \begin_layout Standard
17957 reLyX always reads at least one syntax file, called the default syntax file.
17958 reLyX will read your personal syntax file if it exists; otherwise it will
17959 read the system-wide file.
17960 reLyX will read additional syntax files if you specify them with the
17965 (These extra files should have the same format as the default file, but
17966 will tend to be shorter, since they only have to specify extra commands
17967 not found in the default file.) A syntax file tells reLyX a few things.
17970 \begin_layout Standard
17971 First, it describes the syntax of each command, that is, how many required
17972 arguments and how many optional arguments the command takes.
17973 Knowing this makes it easier for reLyX to copy (in TeX mode) commands that
17974 it doesn't know how to translate.
17975 The syntax file simply has a command, followed by braces or brackets describing
17976 its arguments in the correct order.
17977 For example, a syntax file entry
17989 command takes an optional argument followed by a required one, while the
18002 command takes no arguments at all.
18003 When reLyX encounters a token that it doesn't know how to translate into
18004 LyX, it will copy the token---along with the correct number of arguments---exac
18006 If the token is not in the syntax file, then reLyX just copies as many
18007 arguments as it finds.
18008 This means that it may copy too much.
18009 But since the user can specify additional syntax files, that shouldn't
18013 \begin_layout Standard
18014 Some commands that cannot be translated to LyX, like
18020 , have as one of their arguments regular LaTeX text.
18022 \begin_inset Quotes eld
18026 \begin_inset Quotes erd
18029 is put into an argument of an (untranslatable) command in the syntax file,
18030 then reLyX will translate that argument instead of copying it verbatim.
18031 So, for example, the default syntax file has
18035 raisebox{}[][]{translate}
18038 This means that the
18044 command and the first argument (and optional arguments if they exist) are
18045 copied in TeX mode, but the last argument (which may contain math, complicated
18046 LaTeX, other untranslatable commands, etc.) will be translated into LyX.
18048 \begin_inset Quotes eld
18052 \begin_inset Quotes erd
18055 on optional arguments.
18058 \begin_layout Standard
18059 User-defined syntax files are allowed to define new commands and their syntax,
18060 or override the number of arguments for a command given in the default
18062 (E.g., if you're using a style that gives an extra argument to some command...)
18063 However, this will only be useful for commands copied in TeX mode.
18064 Commands which are actually translated by reLyX (like
18070 ) have their argument syntax hard-coded.
18071 The hard-coded commands are identified in the default syntax file.
18074 \begin_layout Standard
18075 Second, the syntax file describes any
18076 \begin_inset Quotes eld
18079 regular environments
18080 \begin_inset Quotes erd
18084 Usually, an entire unknown environment will be copied in TeX mode.
18085 If you define a regular environment
18086 \begin_inset Quotes eld
18090 \begin_inset Quotes erd
18093 , though, then only the
18105 commands will be copied in TeX mode; the text within the environment will
18106 be treated (i.e., translated) by reLyX as regular LaTeX, rather than being
18107 copied into TeX mode.
18108 Don't try to declare
18116 as regular environments, as the text within those environments will confuse
18117 reLyX; use this capability for new environments you create that have plain
18118 text or math or simple commands in them.
18119 You also can't declare unknown math environments (like
18123 ) as regular environments, either, since the LyX math editor won't understand
18125 The names of regular environments appear, whitespace-separated, between
18138 statements in the syntax file.
18139 (If you have a regular environment which you won't use very often, you
18144 option rather than writing a syntax file.)
18147 \begin_layout Standard
18148 Third, the syntax file describes a math translation table.
18149 The LyX math editor doesn't support a few commands.
18154 is supported, but the equivalent
18161 Put any commands you'd like translate between
18175 \begin_inset Quotes eld
18187 \begin_inset Quotes erd
18196 in math mode will be converted to
18197 \begin_inset Quotes eld
18207 \begin_inset Quotes erd
18214 (in cases where a token made up of a backslash and a non-letter is translated
18215 to something with letters at the end, a space is added by reLyX.
18217 \begin_inset Quotes eld
18227 \begin_inset Quotes erd
18230 is correctly translated to
18231 \begin_inset Quotes eld
18241 \begin_inset Quotes erd
18247 \begin_layout Subsubsection
18251 \begin_layout Standard
18252 You need Perl version 5.002 or later to run reLyX.
18253 <plug> If you don't have Perl, you should get it anyway (at
18254 \begin_inset LatexCommand \url[Perl]{http://www.perl.com/}
18258 ), because it's a really useful tool for pretty much anything.
18262 \begin_layout Subsection
18266 \begin_layout Standard
18267 reLyX should always explain why it crashes, if it crashes.
18268 Some diagnostics may be very technical, though, if they come from the guts
18270 reLyX gives much more information while running if you use the
18274 option, but you shouldn't need that unless something goes wrong.
18277 \begin_layout Standard
18278 When it's finished, reLyX will tell you if it finished successfully or died
18282 \begin_layout Subsection
18286 \begin_layout Standard
18287 Always keep a copy of your original LaTeX files either under a different
18288 name or in a different directory.
18289 There are a couple ways in which using LyX could lead to overwriting the
18290 original LaTeX file.
18293 \begin_layout Standard
18306 and want to re-export it, note that it will overwrite the original
18315 ask you if you want to overwrite it.)
18318 \begin_layout Standard
18319 If you have chosen not to use a temporary directory in the preferences,
18320 then LyX will create its temporary files in your current directory, which
18321 means your LaTeX original may be overwritten (without a warning from LyX)
18323 \begin_inset Quotes eld
18327 \begin_inset Quotes erd
18330 or print the LyX document.
18333 \begin_layout Subsection
18337 \begin_layout Description
18341 MY_LYXDIR/layouts/*.layout
18347 User's personal layout files for document classes
18350 \begin_layout Description
18354 MY_LYXDIR/reLyX/syntax.default
18360 User's personal syntax file
18363 \begin_layout Description
18367 LIBDIR/layouts/*.layout
18373 System-wide layout files for document classes
18376 \begin_layout Description
18380 LIBDIR/reLyX/syntax.default
18386 System-wide LaTeX syntax file
18389 \begin_layout Standard
18394 is the system-wide LyX directory, usually something like
18396 /usr/local/share/lyx/
18403 is your personal LyX directory, something like
18407 in your home directory.
18408 You can see their actual values in the
18413 elp\SpecialChar \menuseparator
18423 \begin_layout Subsection
18427 \begin_layout Standard
18439 \begin_layout Subsection
18443 \begin_layout Standard
18444 Copyright (c) 1998--9
18450 karger@voth.chem.utah.edu
18455 \begin_layout Standard
18459 \begin_layout Itemize
18464 wrote the original CleanTeX pass.
18467 \begin_layout Itemize
18473 \begin_layout Itemize
18481 \begin_layout Itemize
18484 David Suarez de Lis
18487 \begin_layout Standard
18488 Other contributors:
18491 \begin_layout Itemize
18494 Jean-Marc Lasgouttes
18496 worked on the wrapper script and offered lots of bug reports, advice, and
18497 feature suggestions.
18500 \begin_layout Itemize
18513 \begin_layout Itemize
18514 Various members of the LyX developers' and users' lists provided bug reports
18515 and feature suggestions.
18518 \begin_layout Standard
18519 reLyX uses a modified version the Perl TeX parser
18529 ilya@math.ohio-state.edu
18531 ), available on CPAN.
18534 \begin_layout Chapter
18535 LyX Features needing Extra Software
18538 \begin_layout Section
18539 Using LyX with SGML-Tools (aka LinuxDoc)
18542 \begin_layout Standard
18548 \begin_layout Subsection
18552 \begin_layout Standard
18553 LinuxDoc is a document class available in LyX if you have the
18558 You can use it to produce documents in the so-called Standardized General
18559 Mark-up Language (SGML) in the particular format used by the Linux Documentatio
18561 That is obviously helpful if you are contributing to that project.
18562 You can use the SGML format with the
18566 package of scripts and programs (to produce other formats, including Latex,
18567 HTML, plain text, man pages and\SpecialChar \ldots{}
18569 You may therefore prefer to use this document class if you want to write
18570 something that can be easily translated into other formats.
18573 \begin_layout Standard
18574 You will find that LinuxDoc has fewer layout options than the other text
18576 This is mainly so that the translations into other formats have a chance
18577 of making some sense.
18578 In this section we describe:
18581 \begin_layout Itemize
18582 how to setup and use a document in LinuxDoc
18585 \begin_layout Itemize
18586 how to use the tags in LinuxDoc to layout your document
18589 \begin_layout Itemize
18590 how to use the SGML packages to produce the various formats
18593 \begin_layout Itemize
18594 how to sort out some problems.
18597 \begin_layout Subsection
18598 Preparing and using a LinuxDoc document
18601 \begin_layout Subsubsection
18605 \begin_layout Standard
18606 You start by selecting the LinuxDoc class using the
18611 ocument\SpecialChar \menuseparator
18623 Then you will find that there are fewer paragraph environments than for
18624 most other classes.
18625 You can see them on the pull down box on the left of the tool bar.
18626 How to use them is described in section\InsetSpace ~
18628 \begin_inset LatexCommand \ref{sec:sgmlparas}
18635 \begin_layout Standard
18640 enter a title for the document, followed by an author, marking each with
18641 the appropriate paragraph environment.
18642 If you don't do this, you will get errors when you try to print the file.
18643 You can then enter the date and an abstract.
18644 The document proper must start with a Section paragraph environment rather
18645 than any standard layout.
18648 \begin_layout Standard
18649 After that you can prepare a document as usual using the available range
18650 of paragraph environments.
18651 See section\InsetSpace ~
18653 \begin_inset LatexCommand \ref{sec:sgmlparas}
18657 for the full list and their uses.
18660 \begin_layout Subsubsection
18661 Output from LinuxDoc
18664 \begin_layout Standard
18665 You can print and save these documents in the normal way.
18666 To use the other features of the SGML package you need to save your document
18667 as LinuxDoc; this is a version in which the document is translated into
18668 the basic sgml tags.
18675 ile\SpecialChar \menuseparator
18680 xport\SpecialChar \menuseparator
18688 You will get a file with the same name and a
18692 extension rather than a
18699 \begin_inset LatexCommand \ref{sec:sgmloperate}
18703 on how you than make use of this file.
18706 \begin_layout Subsection
18707 Using the paragraph environments in LinuxDoc
18710 \begin_layout Subsubsection
18711 The Structure of a LinuxDoc Document
18714 \begin_layout Standard
18715 There is a formal structure for LinuxDoc which limits how you can place
18717 There are two parts to all documents:
18720 \begin_layout Description
18721 Header: this is everything up to the first time you insert a Section layout
18723 It can include title, author, date, abstract and ToC.
18724 You must include the first two.
18727 \begin_layout Description
18728 Body: from the beginning of the first section onwards.
18729 All other tags are allowed.
18733 \begin_layout Subsubsection
18734 The LinuxDoc Paragraph Environments
18737 \begin_layout Standard
18738 \begin_inset LatexCommand \label{sec:sgmlparas}
18742 Here is a list of all the tags you will find listed on the layout bar in
18743 the order they come there, with some comments where the purpose or use
18747 \begin_layout Itemize
18752 works as described in [cross reference]
18755 \begin_layout Itemize
18760 : This will appear at the top left of the document when printed, above a
18761 heavy horizontal rule, although you will not see this on the LyX screen.
18764 \begin_layout Itemize
18767 Section, Subsection, Subsubsection, Paragraph and Subparagraph:
18769 all do what you would expect and in the usual order.
18770 Whether they are numbered or not is controlled by the
18772 Section\InsetSpace ~
18773 number\InsetSpace ~
18777 You cannot get the equivalent number free versions in any other way; there
18785 \begin_layout Itemize
18790 As usual this produces a numbered and indented list as described in the
18798 \begin_layout Itemize
18803 Again much the same as in the other classes: see the
18810 \begin_layout Itemize
18815 : As explained in the
18820 Remember that if you want the bold element at the start of a description
18821 to be more than one word then you need to put protected spaces between
18826 \begin_layout Itemize
18834 \begin_layout Itemize
18837 Code: similar to the Lyx-Code
18842 \begin_layout Itemize
18847 : Anything you mark with this will appear on the left of the heading of
18848 the document, under the heavy rule.
18851 \begin_layout Itemize
18856 Anything you mark with this will appear on the right of the heading under
18858 You do not have to make this a date.
18859 Any text can be entered, e.\InsetSpace ~
18864 \begin_layout Itemize
18869 : You can use this to produce a free standing paragraph after the author
18870 and date, and before the first section.
18871 You are only allowed one such paragraph.
18875 \begin_layout Standard
18881 This needs checking ---
18891 \begin_layout Itemize
18900 \begin_layout Standard
18905 I have not yet checked this ---
18915 \begin_layout Subsubsection
18916 Other document features
18919 \begin_layout Standard
18920 You can also use the
18924 menu to set fonts or to emphasis words.
18925 You can also use the table of contents as usual; see the corresponding
18931 Although you will find some some other features on the menus e.\InsetSpace ~
18933 inserting footnotes.
18934 There is some doubt about whether these will work correctly.
18938 \begin_layout Standard
18943 Again still checking to see whether this is my system
18953 \begin_layout Subsubsection
18954 Cross references and HTML
18957 \begin_layout Standard
18962 menu you will find two new options relating to the inclusion of URL addresses.
18963 If you use either option you will find some highlighted TeX code inserted
18964 into your document in three separate blocks with spaces available between.
18965 The blocks will be:
18968 \begin_layout Quote
19000 \begin_layout Standard
19001 You insert a full HTML tag between the first and second blocks.
19003 \begin_inset LatexCommand \url{http://any.address}
19007 or other valid tags such as
19008 \begin_inset LatexCommand \url{mailto:me@my.address}
19020 insert some description between the second and third blocks.
19021 The differences are:
19024 \begin_layout Itemize
19029 both the HTML tag and the description will appear in the document
19032 \begin_layout Itemize
19038 only the description appears in the printed version
19041 \begin_layout Subsection
19042 Using the LinuxDoc Sgml scripts
19043 \begin_inset Note Note
19046 \begin_layout Standard
19047 This section is completely outdated.
19055 \begin_layout Standard
19056 \begin_inset LatexCommand \label{sec:sgmloperate}
19060 You can use LinuxDoc as a text class without any additional scripts or programs,
19061 but there is not much point in doing this.
19062 All you will get is a document that looks like a
19064 Linux Documentation Project Howto
19070 To do the document translation you need to get and install the
19072 sgml-tools-1.0.x.tar.gz
19075 \begin_inset Formula $x\geq3$
19080 the SGML-Tools WWW Page
19085 \begin_layout LyX-Code
19088 \begin_inset LatexCommand \url{http://pobox.com/~cg/sgmltools}
19097 \begin_layout Standard
19098 Alternatively, you can go to the
19106 \begin_layout Standard
19107 Note that, at the time of this writing (01/1998), version 1.0.3 of sgml-tools
19108 has not yet been made available at
19120 \begin_layout LyX-Code
19123 \begin_inset LatexCommand \url{ftp://sunsite.unc.edu/pub/Linux/utils/text/sgml-tools-1.0.x.tar.gz}
19130 \begin_layout Standard
19137 sgml-tools-1.0.x.tar.gz
19139 contains everything that you need to write SGML documents and convert them
19140 to groff, LaTeX, HTML, GNU info, LyX, and RTF\SpecialChar \@.
19144 \begin_layout Standard
19145 This package was renamed from
19147 linuxdoc-sgml-1.5.tar.gz
19152 \begin_layout Standard
19153 Follow the instructions in that package on how to install it and how to
19155 All this has to be done outside of LyX, before you can use the
19160 ile\SpecialChar \menuseparator
19165 xport\SpecialChar \menuseparator
19172 \begin_layout Subsection
19173 Troubleshooting LinuxDoc
19176 \begin_layout Standard
19177 When you print or preview a LinuxDoc document some checking is done of the
19178 tags before LaTeX is run.
19179 Some errors are trapped here, especially those concerning the structure
19181 LyX may produce an error message, but not leave an error box in the document
19183 You may have to look at the files directly to discover what is wrong.
19184 Most problems seem to come from the use of options that are not fully available
19188 \begin_layout Section
19192 \begin_layout Standard
19198 \begin_layout Subsection
19202 \begin_layout Standard
19210 menu, you'll find a
19219 This feature requires you to have the
19223 program installed, and is grayed out if you don't have it.
19224 You can get it from your nearest CTAN mirror, or over the Web from
19225 \begin_inset LatexCommand \url{http://www.ifi.uio.no/~jensthi/chktex/}
19232 \begin_layout Standard
19237 package is a program that was written by
19242 in frustration because some constructs in LaTeX are sometimes non-intuitive,
19243 and easy to forget.
19244 The program runs over your LaTeX file and checks the integrity of the file,
19245 and flags some common errors.
19246 In other technical words, it is
19253 \begin_layout Standard
19254 Well, what is a syntax checker doing in LyX which is supposed to produce
19255 correct LaTeX anyways? The answer is simple: Just as
19259 not only checks the
19263 of C programs, but also does
19267 checks for type-errors,
19271 catches some common
19275 errors, in addition to the syntactical ones.
19280 is capable of detecting several common errors, such as
19283 \begin_layout Itemize
19284 Ellipsis detection:
19286 Use \SpecialChar \ldots{}
19290 \begin_layout Itemize
19291 No space in front of/after parenthesis:
19296 \begin_layout Itemize
19297 Enforcement of normal space after common abbreviations:
19301 is too wide spacing.
19304 \begin_layout Itemize
19305 Enforcement of end-of-sentence space when the last sentence ends with a
19309 And this is wrong spacing.
19312 \begin_layout Itemize
19313 Space in front of labels and similar commands:
19315 The label should stick right
19316 up to the text to avoid falling to a wrong page.
19318 \begin_inset LatexCommand \label{sec:chktex}
19326 \begin_layout Standard
19327 This footnote is in danger of falling off to a wrong page
19332 The label is separated too much.
19335 \begin_layout Itemize
19336 Space in front of references, instead of hard spaces:
19338 In you are in bad luck,
19339 the text will break right between the referenced text and reference number,
19342 \begin_inset LatexCommand \ref{sec:chktex}
19349 \begin_layout Itemize
19351 \begin_inset Quotes eld
19355 \begin_inset Quotes erd
19359 \begin_inset Formula $\times$
19364 2x2 looks cheap compared to
19365 \begin_inset Formula $2\times2$
19371 \begin_layout Standard
19372 and more \SpecialChar \ldots{}
19373 It is an invaluable tool when you are
19374 \begin_inset Quotes eld
19378 \begin_inset Quotes erd
19381 your document before printing, and you should run it right after the obligatory
19382 spelling check, and before you go fine tuning the typesetting.
19385 \begin_layout Subsection
19389 \begin_layout Standard
19390 If you have the program installed, usage is as simple as choosing
19395 ools\SpecialChar \menuseparator
19404 This will make LyX generate a LaTeX file of your document, start
19408 to check it, and then make LyX insert
19409 \begin_inset Quotes eld
19413 \begin_inset Quotes erd
19416 with the warnings from
19420 , if there were any.
19421 The warnings will be placed close to the point of the mistake, and you
19422 can quickly find them by using the
19427 avigate\SpecialChar \menuseparator
19434 menu item, or the shortcut key
19443 Open the error boxes by clicking on them with the mouse, or use the shortcut
19452 bindings, or the corresponding
19461 Read the warning and correct the mistake, if it is a mistake.
19462 If you have trouble understanding what the warning is about, you can safely
19464 Remember that there is a hidden layer between the document on screen and
19465 the technical details in invoking
19469 , and this gap can make some warnings seem arcane or just right down plain
19473 \begin_layout Standard
19474 This document is an excellent testing bed for the feature, and it should
19475 provide quite a few warnings for you to fiddle with.
19476 Since computers are only so smart, expect most of the warnings to be false
19480 \begin_layout Subsection
19481 How to fine tune it
19484 \begin_layout Standard
19485 Sometimes, you'll find that
19489 makes more noise than suits your mood.
19490 Then you can choose not to use it, wait until your mood changes, or try
19495 to get better along with you.
19496 Another choice in the most desperate situations is to use
19501 iew\SpecialChar \menuseparator
19511 , which will get rid of all warnings instantly.
19514 \begin_layout Standard
19523 very configurable and extensible, you shouldn't expect to solve all problems
19529 Since LyX has to generate a somewhat special LaTeX file to be able to match
19530 the line numbers from the
19538 \begin_layout Standard
19539 You can inspect the specific output from
19545 Edit\SpecialChar \menuseparator
19559 to the internal document structure, some of the warnings will not seen
19560 to appear correctly.
19561 There are two things you can do about this:
19564 \begin_layout Itemize
19569 invocation command line in
19585 installation configuration file (usually with the file
19587 /usr/local/share/chktexrc
19590 See below to learn what warnings can be enabled and disabled on the command
19595 \begin_layout Itemize
19596 Export your document as a raw LaTeX file using
19601 ile\SpecialChar \menuseparator
19606 xport\SpecialChar \menuseparator
19618 Invoked in this way, it can be a hassle to find the corresponding place
19619 in the document inside LyX, but with a little patience, you should be able
19623 \begin_layout Standard
19624 Here follows the warning messages that can be enabled and disabled in
19633 to disable a warning, and
19637 to enable a warning.
19638 The emphasized entries are disabled by default, because the default is
19641 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
19646 \begin_layout Standard
19647 Notice that you should only use the options that enable and disable warnings,
19648 because LyX relies on some of the other command line parameters to be set
19649 in a specific way to have a chance to communicate with
19656 \begin_layout Enumerate
19660 Command terminated with space.
19663 \begin_layout Enumerate
19666 Non-breaking space (
19667 \begin_inset Quotes eld
19675 \begin_inset Quotes erd
19678 ) should have been used.
19681 \begin_layout Enumerate
19685 You should enclose the previous parenthesis with
19686 \begin_inset Quotes eld
19694 \begin_inset Quotes erd
19700 \begin_layout Enumerate
19703 Italic correction (
19704 \begin_inset Quotes eld
19714 \begin_inset Quotes erd
19717 ) found in non-italic buffer.
19720 \begin_layout Enumerate
19723 Italic correction (
19724 \begin_inset Quotes eld
19734 \begin_inset Quotes erd
19737 ) found more than once.
19740 \begin_layout Enumerate
19744 No italic correction (
19745 \begin_inset Quotes eld
19755 \begin_inset Quotes erd
19761 \begin_layout Enumerate
19765 \begin_inset Quotes eld
19773 \begin_inset Quotes erd
19777 \begin_inset Quotes eld
19785 \begin_inset Quotes erd
19791 \begin_layout Enumerate
19794 Wrong length of dash may have been used.
19797 \begin_layout Enumerate
19801 \begin_inset Quotes eld
19809 \begin_inset Quotes erd
19813 \begin_inset Quotes eld
19821 \begin_inset Quotes erd
19827 \begin_layout Enumerate
19831 \begin_inset Quotes eld
19839 \begin_inset Quotes erd
19845 \begin_layout Enumerate
19849 \begin_inset Quotes eld
19857 \begin_inset Quotes erd
19860 to achieve an ellipsis.
19863 \begin_layout Enumerate
19866 Inter-word spacing (
19867 \begin_inset Quotes eld
19877 \begin_inset Quotes eld
19880 ) should perhaps be used.
19883 \begin_layout Enumerate
19886 Inter-sentence spacing (
19887 \begin_inset Quotes eld
19897 \begin_inset Quotes erd
19900 ) should perhaps be used.
19903 \begin_layout Enumerate
19906 Could not find argument for command.
19909 \begin_layout Enumerate
19913 \begin_inset Quotes eld
19921 \begin_inset Quotes erd
19927 \begin_layout Enumerate
19930 Math mode still on at end of LaTeX file.
19933 \begin_layout Enumerate
19937 \begin_inset Quotes eld
19945 \begin_inset Quotes erd
19948 doesn't match the number of
19949 \begin_inset Quotes eld
19957 \begin_inset Quotes erd
19963 \begin_layout Enumerate
19966 You should use either
19969 \begin_inset Quotes eld
19977 \begin_inset Quotes erd
19982 as an alternative to
19983 \begin_inset Quotes eld
19991 \begin_inset Quotes erd
19997 \begin_layout Enumerate
20004 " (ASCII 39) instead of "
20011 \begin_layout Enumerate
20014 User-specified pattern found.
20017 \begin_layout Enumerate
20020 This command might not be intended.
20023 \begin_layout Enumerate
20030 \begin_layout Enumerate
20048 \begin_layout Enumerate
20051 Delete this space to maintain correct page references.
20054 \begin_layout Enumerate
20058 You might wish to put this between a pair of
20059 \begin_inset Quotes eld
20067 \begin_inset Quotes erd
20073 \begin_layout Enumerate
20076 You ought to remove spaces in front of punctuation.
20079 \begin_layout Enumerate
20082 Could not execute LaTeX command.
20085 \begin_layout Enumerate
20094 in front of small punctuation.
20097 \begin_layout Enumerate
20105 may look prettier here.
20108 \begin_layout Enumerate
20112 Multiple spaces detected in output.
20115 \begin_layout Enumerate
20118 This text may be ignored.
20121 \begin_layout Enumerate
20127 \begin_inset Quotes eld
20132 to begin quotation, not
20139 \begin_layout Enumerate
20146 to end quotation, not
20149 \begin_inset Quotes eld
20157 \begin_layout Enumerate
20163 \begin_layout Enumerate
20166 You should perhaps use
20167 \begin_inset Quotes eld
20175 \begin_inset Quotes erd
20181 \begin_layout Enumerate
20184 You should put a space in front of/after parenthesis.
20187 \begin_layout Enumerate
20190 You should avoid spaces in front of/after parenthesis.
20193 \begin_layout Enumerate
20197 You should not use punctuation in front of/after quotes.
20200 \begin_layout Enumerate
20203 Double space found.
20206 \begin_layout Enumerate
20209 You should put punctuation outside inner/inside display math mode.
20212 \begin_layout Enumerate
20215 You ought to not use primitive TeX in LaTeX code.
20218 \begin_layout Enumerate
20221 You should remove spaces in front of
20222 \begin_inset Quotes eld
20230 \begin_inset Quotes erd
20236 \begin_layout Enumerate
20239 \begin_inset Quotes eld
20247 \begin_inset Quotes erd
20250 is normally not followed by
20251 \begin_inset Quotes eld
20259 \begin_inset Quotes erd
20265 \begin_layout Standard
20266 In later versions of LyX, we hope to provide a more complete interface to
20267 this tool (and it's smaller cousin
20271 ) to exploit the full power of it.
20272 But it's not exactly useless as it is now: go try it on one of your existing
20273 documents of a certain length and be surprised.
20276 \begin_layout Section
20277 Version Control in LyX
20280 \begin_layout Standard
20283 Lars Gullik Bjønnes
20286 \begin_layout Subsection
20290 \begin_layout Standard
20291 A friend of mine wanted to try LyX for a group project.
20292 When he didn't find support for version control or file locking, he dropped
20294 This angered me a bit, so I thought that I should at least make support
20295 for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
20296 This has now been done.
20297 LyX now supports some of the most basic RCS commands.
20298 If you need to something a bit more sophisticated you will have to do that
20299 manually in an xterm.
20302 \begin_layout Standard
20303 Before you begin to use the version control features in LyX, you should
20305 \begin_inset Quotes eld
20309 \begin_inset Quotes erd
20312 (a man file, read it with
20317 This file describes all the basic features of RCS.
20318 You should especially notice the comment about a RCS directory, and the
20319 notion of a master RCS file (the file ending in
20326 \begin_layout Standard
20327 The implementation in LyX assumes a recent version of the GNU RCS package---no
20328 guarantees are made for older versions.
20331 \begin_layout Subsection
20332 RCS commands in LyX
20335 \begin_layout Standard
20336 The following sections describe the RCS commands supported by LyX.
20337 You can find them in the
20342 ile\SpecialChar \menuseparator
20347 ersion\InsetSpace ~
20353 \begin_layout Subsubsection
20359 \begin_layout Standard
20360 If your document is not under revision control, this is the only item shown
20362 And if it is under revision control, the
20369 item is grayed out.
20373 \begin_layout Standard
20374 This command registers your document with RCS\SpecialChar \@.
20375 You are asked interactively
20376 to supply an initial description of the document.
20377 The document is now set in Read-Only mode and you have to
20384 , before making any changes to it.
20385 A document under revision control has a
20386 \begin_inset Quotes eld
20389 [RCS:<version> <locker>]
20390 \begin_inset Quotes erd
20393 item tagged to the filename in the minibuffer.
20396 \begin_layout Standard
20397 RCS command that is run:
20399 ci -q -u -i -t-"<initial description>" <file-name>
20402 \begin_layout Standard
20407 to understand the switches.
20411 \begin_layout Subsubsection
20417 \begin_layout Standard
20418 When you are finished editing a file, you check in your changes.
20419 When you do this, you are asked for a description of the changes.
20420 This is stored in the history log.
20421 The version number is bumped, your changes are applied to the master RCS
20422 file, the document is unlocked and set to Read-Only mode.
20426 \begin_layout Standard
20429 ci -q -u -m"<description>" <file-name>
20432 \begin_layout Subsubsection
20438 \begin_layout Standard
20439 By doing this you lock the document so that only you can edit it.
20440 This will also make the document Read-Write only for you.
20441 You will usually continue editing for a while and when you are finished
20442 you check in your changes.
20443 The status line is changed to reflect that you have locked the file.
20447 \begin_layout Standard
20450 co -q -l <file-name>
20453 \begin_layout Subsubsection
20456 Revert To Last Version
20459 \begin_layout Standard
20460 This will discard all changes made to the document since the last check
20462 You get a warning before changes are discarded.
20465 \begin_layout Standard
20468 co -f -u<version> <file-name>
20471 \begin_layout Subsubsection
20477 \begin_layout Standard
20478 This makes as if the last check in never happened.
20479 No changes are made to the document loaded into LyX, but the last version
20480 is removed from the master RCS file.
20484 \begin_layout Standard
20487 rcs -o<version> <file-name>
20490 \begin_layout Subsubsection
20496 \begin_layout Standard
20497 This show the complete history of the RCS document.
20502 is shown in a browser.
20510 \begin_layout Section
20511 Literate Programming
20514 \begin_layout Standard
20519 (kayvan@sylvan.com)
20523 original documentation written by
20525 Edmar Wienskoski Jr.
20528 (edmar-w-jr@technologist.com)
20531 \begin_layout Subsection
20535 \begin_layout Standard
20536 The main purpose of this documentation is to show you how to use LyX for
20537 literate programming.
20538 Where it is assumed that you are familiar with this programming technique,
20540 \begin_inset Quotes eld
20544 \begin_inset Quotes erd
20548 \begin_inset Quotes eld
20552 \begin_inset Quotes erd
20556 If that is not the case, please follow the web links provided in the following
20558 There is a lot of good documentation out there covering old development
20559 history to the latest tools tips.
20562 \begin_layout Standard
20563 It is also assumed that you are familiar with LyX itself to a point that
20564 you are comfortable changing your LyX preferences, and X resources file.
20565 If that is not the case please refer to other LyX documentation to cover
20566 your specific needs.
20569 \begin_layout Subsection
20570 Literate Programming
20573 \begin_layout Standard
20574 From the Literate Programming FAQ:
20577 \begin_layout Quotation
20578 Literate programming is the combination of documentation and source together
20579 in a fashion suited for reading by human beings.
20580 In fact, literate programs should be enjoyable reading, even inviting!
20581 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
20582 and documentation in a single file.
20583 Literate programming tools then parse the file to produce either readable
20584 documentation or compilable source.
20585 The WEB style of literate programming was created by D.E.
20586 Knuth during the development of his TeX typesetting software.
20590 \begin_layout Standard
20591 Another excerpt says:
20594 \begin_layout Quotation
20597 How is literate programming different from verbose commenting?
20600 \begin_layout Quotation
20601 There are three distinguishing characteristics.
20602 In order of importance, they are:
20606 \begin_layout Itemize
20607 flexible order of elaboration
20610 \begin_layout Itemize
20611 automatic support for browsing
20614 \begin_layout Itemize
20615 typeset documentation, especially diagrams and mathematics
20619 \begin_layout Standard
20620 Now that I sparked your curiosity, take a look in the references.
20623 \begin_layout Subsubsection
20627 \begin_layout Standard
20628 The complete Literate Programming FAQ can be found at:
20631 \begin_layout Quote
20632 \begin_inset LatexCommand \url[Literate Programming FAQ]{http://shelob.ce.ttu.edu/daves/lpfaq/faq.html}
20639 \begin_layout Standard
20640 The FAQ lists 23 (twenty three!) different literate programming tools.
20641 Where some are specialized or
20642 \begin_inset Quotes eld
20646 \begin_inset Quotes erd
20649 for particular programming languages, while other have general scope.
20654 for my own use for several reasons:
20657 \begin_layout Itemize
20658 It can generate the documentation either in latex or html.
20661 \begin_layout Itemize
20662 It has a open architecture, i.e., it is easy to plug in new filters and to
20663 perform special processing that you may need.
20667 \begin_layout Itemize
20668 There is a good selection of filters available already (the html is one
20672 \begin_layout Itemize
20676 \begin_layout Standard
20677 The Noweb web page can be found at:
20680 \begin_layout Quote
20681 \begin_inset LatexCommand \url[Noweb home page]{http://www.cs.virginia.edu/~nr/noweb/}
20688 \begin_layout Standard
20689 Starting from there you can reach many other interesting links and even
20690 some literate program examples.
20693 \begin_layout Subsection
20694 LyX and Literate Programming
20697 \begin_layout Standard
20698 The LyX support for Literate Programming is provided by using the generic
20699 LyX convertors mechanism.
20700 This support is provided in a
20701 \begin_inset Quotes eld
20705 \begin_inset Quotes erd
20708 way, i.e., you will be able to use this new LyX feature with some other literate
20709 programming tool of your choice by just changing your LyX preferences.
20712 \begin_layout Subsubsection
20713 Generating documents and code (weaving and tangling)
20716 \begin_layout Paragraph
20717 Selecting the document class
20720 \begin_layout Standard
20721 If you have installed Noweb and LyX successfully, whenever you open a new
20722 document or try to change the document class of an existing one, you will
20723 find that there are three new document classes available:
20726 \begin_layout Itemize
20730 \begin_layout Itemize
20734 \begin_layout Itemize
20738 \begin_layout Standard
20739 You must select one of them to create your literate documents from.
20743 \begin_layout Standard
20744 Note that literate documents are not limited to these three classes.
20745 New classes can be generated from other styles like letter or in combination
20746 with other class variations like Article (AMS).
20747 If you have special needs that cannot be covered by one of the existing
20748 classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
20749 will arrange to insert a new entry, or teach you how to do it.
20753 \begin_layout Standard
20754 It is very simple, it involves the creation of a file with four lines, and
20755 re-running of the auto configuration.
20760 Moreover, if you use a literate tool other than Noweb you may need to create
20761 a new set of document classes for it.
20764 \begin_layout Paragraph
20768 \begin_layout Standard
20769 LyX enables you to write code with a layout named
20777 \begin_layout Standard
20778 The equivalent Noweb term is
20779 \begin_inset Quotes eld
20783 \begin_inset Quotes erd
20787 For historical reasons, I got used to the term
20788 \begin_inset Quotes eld
20792 \begin_inset Quotes erd
20795 introduced by other literate tool named Nuweb, which I used for many years
20796 before rendering myself to Noweb.
20801 Noweb delimits scraps like this:
20804 \begin_layout LyX-Code
20808 \begin_layout LyX-Code
20812 \begin_layout LyX-Code
20816 \begin_layout LyX-Code
20820 \begin_layout LyX-Code
20824 \begin_layout Standard
20825 The problem is that whatever is written in between the << and the
20829 must be taken literally, i.e., LyX should be prevented from making any special
20830 interpretation of what has been written.
20831 This is handled by a special layout named Scrap, that works like a normal
20832 paragraph but has a free spacing capability.
20835 \begin_layout Standard
20836 The down side of the Scrap paragraph layout is that consecutive paragraphs
20837 of code will be spaced with one empty line in the source code and also
20838 in the printed documentation.
20839 The work around is to enter each line of code within a single Scrap, with
20840 a newline (ctrl-return).
20841 The example above will look like this:
20845 \begin_layout Standard
20846 If you have a printed version of this document you will not see any difference
20847 between the previous example and this one.
20855 \begin_layout LyX-Code
20867 \begin_layout Standard
20868 This layout works fine.
20869 The only real inconvenience is that you have to type ctrl-return instead
20874 \begin_layout Standard
20875 It is in my list of
20876 \begin_inset Quotes eld
20880 \begin_inset Quotes erd
20891 \begin_layout Standard
20892 As a special note, you can also use the
20893 \begin_inset Quotes eld
20897 \begin_inset Quotes erd
20900 construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
20904 \begin_layout LyX-Code
20907 def some_function(args):
20909 "This is the doc string for this
20912 print "My args: ", args
20915 \begin_layout LyX-Code
20916 @ %def some_function
20919 \begin_layout Standard
20920 For an example of this usage and the resulting cross-reference output, look
20921 at the Literate python program in
20923 LIBDIR/examples/listerrors.lyx
20925 which should make this all clear.
20928 \begin_layout Paragraph
20929 Generating the documentation
20932 \begin_layout Standard
20933 At this point you already have a new document file with a proper document
20934 class, and with some code and text on it.
20935 How do I print it? The answer is simple, you select
20940 iew\SpecialChar \menuseparator
20948 Just like you would do for a plain document.
20949 No special procedure is required.
20952 \begin_layout Standard
20953 To help orientate you, I will now explain what happens inside LyX:
20956 \begin_layout Enumerate
20962 pdate\SpecialChar \menuseparator
20969 menu option is chosen, a latex file is generated.
20974 \begin_layout Standard
20975 If the document is of any literate class the generated file will be named
20976 with an extension name defined by the
20977 \begin_inset Quotes eld
20981 \begin_inset Quotes erd
20984 format (defined in the Preferences panel), otherwise the file will have
20993 \begin_layout Enumerate
20994 Note that the only difference so far is in the name of the file, no special
20995 processing is required by LyX.
20996 Given that you formatted the code using the Scrap layout that, by itself,
20997 takes care of the business.
21000 \begin_layout Enumerate
21001 If the document is of any literate class LyX will then use the internal
21002 LyX to Noweb converter, followed by the Noweb to LaTeX converter
21006 \begin_layout Standard
21007 The converters are defined in the
21012 ools\SpecialChar \menuseparator
21020 \begin_inset Quotes eld
21024 \begin_inset Quotes erd
21032 to generate the LaTeX file.
21036 \begin_layout Standard
21037 Otherwise it will just skip this step.
21041 \begin_layout Enumerate
21042 Finally, LaTeX is invoked and the regular post processing continues as in
21046 \begin_layout Standard
21047 Independence from a particular
21048 \begin_inset Quotes eld
21052 \begin_inset Quotes erd
21055 is easily achieved by changing the commands that are run by the various
21059 \begin_layout Paragraph
21060 Generating the code
21063 \begin_layout Standard
21064 When the build menu option is chosen or the corresponding button in the
21065 toolbar is pressed, a latex file is generated just like step 1 above.
21066 Next, LyX invokes the
21071 Typically, this converter (like any other converter), has two parts:
21074 \begin_layout Enumerate
21075 The converter program itself.
21076 This program performs the conversion from the one format to the other (in
21077 this case, from the Noweb format to the Program pseudo-format).
21080 \begin_layout Enumerate
21081 The error log parser.
21082 This is a program whose sole purpose is to rewrite error messages in a
21083 format that LyX understands.
21084 This makes it possible for LyX to place error boxes in the right places
21085 in the file buffer.
21088 \begin_layout Standard
21089 The first part, the
21090 \begin_inset Quotes eld
21094 \begin_inset Quotes erd
21097 setting, should be set to
21098 \begin_inset Quotes eld
21106 \begin_inset Quotes erd
21110 This basically means that LyX will call
21111 \begin_inset Quotes eld
21115 \begin_inset Quotes erd
21118 (a program or script) with the name of the Noweb file (generally a file
21119 in the LyX temp directory).
21123 \begin_layout Standard
21124 This is an implementation of
21125 \begin_inset Quotes eld
21129 \begin_inset Quotes erd
21132 that you can place in a directory on your path:
21135 \begin_layout LyX-Code
21139 \begin_layout LyX-Code
21143 \begin_layout LyX-Code
21144 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
21147 \begin_layout Standard
21148 The next part of the converter setting is the
21149 \begin_inset Quotes eld
21153 \begin_inset Quotes erd
21156 which is to be set to
21157 \begin_inset Quotes eld
21162 originaldir,parselog=listerrors
21165 \begin_inset Quotes erd
21169 This will run any errors that are generated by the
21170 \begin_inset Quotes eld
21174 \begin_inset Quotes erd
21177 process through the
21178 \begin_inset Quotes eld
21182 \begin_inset Quotes erd
21188 \begin_layout Standard
21189 The converter code looks in
21197 then on the path for the
21198 \begin_inset Quotes eld
21202 \begin_inset Quotes erd
21208 \begin_layout Paragraph
21209 Build instructions in the document
21212 \begin_layout Standard
21213 The last piece of the integration between LyX and noweb is the
21214 \begin_inset Quotes eld
21218 \begin_inset Quotes erd
21222 Generally, the instructions for building your program should be embedded
21223 in a scrap of its own.
21225 \begin_inset Quotes eld
21229 \begin_inset Quotes erd
21232 above uses the notangle command to look for this scrap (called
21233 \begin_inset Quotes eld
21237 \begin_inset Quotes erd
21240 ) and runs its contents through
21241 \begin_inset Quotes eld
21245 \begin_inset Quotes erd
21251 \begin_layout Standard
21252 Typically, such a scrap would look something like this:
21255 \begin_layout LyX-Code
21262 if [ -z "${NOWEB_SOURCE}" ]
21266 NOWEB_SOURCE=myfile.nw
21272 code to extract files ...]
21275 code to compile files ...]
21280 \begin_layout Standard
21283 LIBDIR/examples/listerrors.lyx
21287 LIBDIR/examples/Literate.lyx
21289 which implement two versions of the
21290 \begin_inset Quotes eld
21294 \begin_inset Quotes erd
21297 program for some illustrations of how all of these pieces go together or
21300 LIBDIR/examples/noweb2lyx.lyx.
21303 Interestingly, these three files show off the language-indepence of the
21304 LyX literate programming support since they are written in Python, C and
21308 \begin_layout Subsubsection
21312 \begin_layout Standard
21313 All the Literate Programming support is configured by the
21318 ools\SpecialChar \menuseparator
21326 \begin_inset Quotes eld
21330 \begin_inset Quotes erd
21334 The important parts are:
21337 \begin_layout Description
21340 \begin_inset Quotes eld
21344 \begin_inset Quotes erd
21348 format Set up via the Formats tab, this is where the Noweb-specific pieces
21358 , the file extension is set to
21363 This tells LyX to create a file with a
21367 extension in the first step of the conversion process.
21370 \begin_layout Description
21377 format This is an empty format whose sole purpose is to be the endpoint
21378 of a conversion (which then allows us to set up a converter for it).
21381 \begin_layout Description
21390 This converter performs the
21391 \begin_inset Quotes eld
21395 \begin_inset Quotes erd
21398 of the literate document.
21399 For Noweb, it is set to
21400 \begin_inset Quotes eld
21405 noweave -delay -index $$i > $$o
21408 \begin_inset Quotes erd
21414 \begin_layout Description
21424 \begin_inset Quotes eld
21428 \begin_inset Quotes erd
21432 As stated above, the Converter is set to
21433 \begin_inset Quotes eld
21441 \begin_inset Quotes erd
21444 , with Flags set to
21445 \begin_inset Quotes eld
21450 originaldir,parselog=listerrors
21453 \begin_inset Quotes erd
21459 \begin_layout Subsubsection
21463 \begin_layout Standard
21464 There is also a new function implemented in the LyX server, the
21465 \begin_inset Quotes eld
21468 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
21472 \begin_layout Standard
21473 When debugging code with ddd/gdb, it is possible to invoke a text editor
21474 at the current execution position with a single key stroke.
21475 The default ddd configuration for that is shift-ctrl-V.
21476 It happens that you can define the editor command line invocation in ddd
21483 dit\SpecialChar \menuseparator
21488 references\SpecialChar \menuseparator
21495 dialog and changing the "Edit Sources" entry.
21498 \begin_layout Standard
21499 I take advantage of the new created LyX server function and this ddd feature,
21501 \begin_inset Quotes eld
21505 \begin_inset Quotes erd
21511 \begin_layout LyX-Code
21512 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
21515 \begin_layout Standard
21516 With this, whenever you are using ddd and find a point in the program that
21517 you want to edit, you just press shift-ctrl-V (in the ddd window), and
21518 ddd you forward this information to LyX through the LyX server and then
21519 the LyX window will show the same file with the cursor at the same position
21520 ddd was pointing to.
21521 No more guessing or long scrolling to locate a point in the program back
21525 \begin_layout Standard
21526 Note however that you must enable the LyX server to get this feature working
21527 (it is disabled by default).
21528 You can enable it in
21540 ) by entering in the
21545 \begin_inset Quotes eld
21550 /home/<your-home-directory>/.lyx/lyxpipe
21553 \begin_inset Quotes erd
21559 \begin_layout Standard
21560 Read the LyX server documentation in the
21562 Customization Manual
21564 for further information.
21567 \begin_layout Subsubsection
21571 \begin_layout Standard
21572 There are six new buttons that can be added to your LyX toolbar.
21573 Five of these buttons are short cuts to layout styles:
21594 The last one is a short cut to the
21595 \begin_inset Quotes eld
21599 \begin_inset Quotes erd
21606 \begin_layout Standard
21607 LyX has a range of buttons that are available for tool bar customization.
21608 In my toolbar I like to combine the six short cuts above with two more:
21616 \SpecialChar \menuseparator
21624 \SpecialChar \menuseparator
21637 iew\SpecialChar \menuseparator
21645 Here is how it looks like:
21648 \begin_layout LyX-Code
21652 \begin_layout LyX-Code
21656 \begin_layout LyX-Code
21657 Icon "layout Standard"
21660 \begin_layout LyX-Code
21661 Icon "layout Section"
21664 \begin_layout LyX-Code
21665 Icon "layout LaTeX"
21668 \begin_layout LyX-Code
21669 Icon "layout LyX-Code"
21672 \begin_layout LyX-Code
21673 Icon "layout Scrap"
21676 \begin_layout LyX-Code
21680 \begin_layout LyX-Code
21684 \begin_layout LyX-Code
21685 Icon "buffer-typeset"
21688 \begin_layout LyX-Code
21689 Icon "build-program"
21692 \begin_layout LyX-Code
21696 \begin_layout LyX-Code
21700 \begin_layout LyX-Code
21704 \begin_layout LyX-Code
21708 \begin_layout LyX-Code
21712 \begin_layout Subsubsection
21713 Colors customization
21716 \begin_layout Standard
21717 There are a number of colors in LyX that can be customized in
21722 One of the things that bothers people is the LaTeX font color.
21723 The default color is red, since the scraps uses LaTeX font, and there is
21724 a lot of scraps in literate documents, you may get tired of seeing everything
21726 You can change it by going to the tabs
21735 \begin_layout Standard
21736 The next thing is the visible presence of the newline character in the screen.
21737 You can choose the color of this particular character and make it blend
21739 I recommend you choosing a color that is close to the background but not
21740 equal, that way you still can see it is there, but it is not bothering
21745 \begin_layout Chapter
21746 Secrets of the LaTeX Masters
21747 \begin_inset LatexCommand \label{cha:secrets}
21754 \begin_layout Standard
21755 Though LyX is a powerful tool, it cannot hope to support everything that
21756 can be done with pure TeX/LaTeX.
21757 However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
21758 as long as you are not afraid to use that
21759 \begin_inset Quotes eld
21763 \begin_inset Quotes erd
21766 button on the toolbar or add things to the LaTeX preamble.
21767 This section lists some tips, tricks, and otherwise cool ideas to give
21768 your document that extra little flair.
21771 Do try this at home
21773 , just start with something a little smaller and less important than your
21777 \begin_layout Standard
21778 Most ideas in this section require less common files in your LaTeX installation.
21779 If you have a system like teTeX, most will already be available.
21780 A few, however, will need to be downloaded from one of the CTAN archives.
21781 Often, there are several ways to do something, or several LaTeX style files
21782 which do the same thing.
21783 We do not endorse one choice over another, we simply claim that we have
21784 done a particular task with a particular file.
21785 Put on your wizard hat, keep an eye out for dragons, and let us begin.
21788 \begin_layout Section
21789 Tricks for Footnotes and Margin Notes
21792 \begin_layout Standard
21798 \begin_layout Subsection
21802 \begin_layout Standard
21803 LyX cannot yet take care of setting the footnote numbering back to 1 after
21804 each section in the
21805 \begin_inset Quotes eld
21813 \begin_inset Quotes erd
21818 document class or changing the counter style.
21819 You'll need to insert LaTeX commands like the following to achieve that:
21822 \begin_layout Standard
21826 \begin_layout Standard
21830 setcounter{footnote}{0}
21839 setcounter{footnote}{0}
21841 will set the counter back to 1
21845 \begin_layout Standard
21846 The counter has been set back to 1.
21854 \begin_layout Standard
21855 The following command will change the numbering to small letters.
21856 Take a look at the next footnote in your xdvi or ghostview
21860 \begin_layout Standard
21877 \begin_layout Standard
21878 This is an example for a footnote with alphabetic numbering.
21898 \begin_layout Standard
21899 The next command sets the counter style back to default, i.e.
21910 \begin_layout Standard
21921 to set the counter--style back to LyX's default, i.e.
21930 \begin_layout Standard
21951 \begin_layout Standard
21982 and others as counter styles.
21983 Just replace the LaTeX command in the above example and rerun TeX to see
21984 what those styles can do.
21988 \begin_layout Subsection
21992 \begin_layout Standard
21993 Here are two examples of neat things you can do to margin notes using LaTeX
21997 \begin_layout Standard
21998 The following command will make a vertical line appear alongside your text---gre
22000 \begin_inset Quotes eld
22004 \begin_inset Quotes erd
22013 rule[-10mm]{30mm}{5mm}}
22021 \begin_layout Standard
22027 rule[-10mm]{30mm}{5mm}}
22035 \begin_layout Standard
22036 Check your dvi- or ghostview-output to see what the
22042 command does to the following margin note.
22045 \begin_layout Standard
22049 \begin_layout Standard
22059 \begin_inset Marginal
22062 \begin_layout Standard
22073 \begin_layout Section
22077 \begin_layout Standard
22080 Lars Gullik Bjønnes
22083 \begin_layout Subsection
22087 \begin_layout Standard
22088 The aim for this chapter
22092 \begin_layout Standard
22093 Editor's note: Lars' original chapter was a masterful description of how
22099 However, it was too long to flow smoothly in this document.
22100 I have therefore chosen to excerpt the most important sections here (sorry,
22101 Lars); you can read the original chapter (and more of the story!) in the
22104 examples/multicol.lyx
22112 is to show how the LaTeX package
22116 can be used in a LyX document.
22117 As LyX doesn't support the
22121 package natively yet, we have to use some small hacks.
22122 By reading this section it should be obvious how to do this.
22125 \begin_layout Subsection
22129 \begin_layout Standard
22134 package allows switching between one and multicolumn format on the same
22136 Footnotes are handled correctly (for the most part), but will be placed
22137 at the bottom of the page and not under each column.
22138 LaTeX's float mechanism, however, is partly disabled in the current implementat
22140 At the moment only page-wide floats can be used within the scope of the
22144 \begin_layout Subsection
22148 \begin_layout Subsubsection
22152 \begin_layout Standard
22153 If you want to have two columns in your text, you have use LaTeX mode to
22158 begin{multicols}{2}
22160 at the point where you want the two column layout to start, and then
22166 where you want it to end.
22170 \begin_layout Standard
22174 \begin_layout Standard
22178 begin{multicols}{2}
22186 \begin_layout Standard
22191 The Adventure of the Empty House
22197 Sir Arthur Conan Doyle
22200 \begin_layout Standard
22203 It was in the spring of the year 1894 that all London was interested, and
22204 the fashionable world dismayed, by the murder of the Honourable Ronald
22205 Adair under most unusual and inexplicable circumstances.
22206 The public has already learned those particulars of the crime which came
22207 out in the police investigation, but a good deal was suppressed upon that
22208 occasion, since the case for the prosecution was so overwhelmingly strong
22209 that it was not necessary to bring forward all the facts.
22210 Only now, at the end of nearly ten years, am I allowed to supply those
22211 missing links which make up the whole of that remarkable chain.
22212 The crime was of interest in itself, but that interest was as nothing to
22213 me compared to the inconceivable sequel, which afforded me the greatest
22214 shock and surprise of any event in my adventurous life.
22215 Even now, after this long interval, I find myself thrilling as I think
22216 of it, and feeling once more that sudden flood of joy, amazement, and increduli
22217 ty which utterly submerged my mind.
22218 Let me say to that public, which has shown some interest in those glimpses
22219 which I have occasionally given them of the thoughts and actions of a very
22220 remarkable man, that they are not to blame me if I have not shared my knowledge
22221 with them, for I should have considered it my first duty to do so, had
22222 I not been barred by a positive prohibition from his own lips, which was
22223 only withdrawn upon the third of last month.
22226 \begin_layout Standard
22230 \begin_layout Standard
22242 \begin_layout Subsubsection
22246 \begin_layout Standard
22247 The same pattern is used when you want more than two columns:
22250 \begin_layout Standard
22254 \begin_layout Standard
22258 begin{multicols}{3}
22266 \begin_layout Standard
22269 It can be imagined that my close intimacy with Sherlock Holmes had interested
22270 me deeply in crime, and that after his disappearance I never failed to
22271 read with care the various problems which came before the public.
22272 And I even attempted, more than once, for my own private satisfaction,
22273 to employ his methods in their solution, though with indifferent success.
22274 There was none, however, which appealed to me like this tragedy of Ronald
22276 As I read the evidence at the inquest, which led up to a verdict of willful
22277 murder against some person or persons unknown, I realized more clearly
22278 than I had ever done the loss which the community had sustained by the
22279 death of Sherlock Holmes.
22280 There were points about this strange business which would, I was sure,
22281 have specially appealed to him, and the efforts of the police would have
22282 been supplemented, or more probably anticipated, by the trained observation
22283 and the alert mind of the first criminal agent in Europe.
22284 All day, as I drove upon my round, I turned over the case in my mind and
22285 found no explanation which appeared to me to be adequate.
22286 At the risk of telling a twice-told tale, I will recapitulate the facts
22287 as they were known to the public at the conclusion of the inquest.
22290 \begin_layout Standard
22294 \begin_layout Standard
22306 \begin_layout Standard
22307 You can have have more than 3 columns if you want to, but that might not
22308 be very pleasant for the eye.
22311 \begin_layout Subsubsection
22312 Columns inside columns
22315 \begin_layout Standard
22316 You can even have columns inside columns:
22319 \begin_layout Standard
22323 \begin_layout Standard
22327 begin{multicols}{2}
22335 \begin_layout Standard
22338 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22339 at that time governor of one of the Australian colonies.
22340 Adair's mother had returned from Australia to undergo the operation for
22341 cataract, and she, her son Ronald, and her daughter Hilda were living together
22345 \begin_layout Standard
22349 \begin_layout Standard
22353 begin{multicols}{2}
22361 \begin_layout Standard
22364 The youth moved in the best society--had, so far as was known, no enemies
22365 and no particular vices.
22366 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22367 had been broken off by mutual consent some months before, and there was
22368 no sign that it had left any very profound feeling behind it.
22369 For the rest {sic} the man's life moved in a narrow and conventional circle,
22370 for his habits were quiet and his nature unemotional.
22371 Yet it was upon this easy-going young aristocrat that death came, in most
22372 strange and unexpected form, between the hours of ten and eleven-twenty
22373 on the night of March 30, 1894.
22376 \begin_layout Standard
22380 \begin_layout Standard
22392 \begin_layout Standard
22395 Ronald Adair was fond of cards--playing continually, but never for such
22396 stakes as would hurt him.
22397 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22398 It was shown that, after dinner on the day of his death, he had played
22399 a rubber of whist at the latter club.
22400 He had also played there in the afternoon.
22405 The evidence of those who had played with him-- Mr.
22406 Murray, Sir John Hardy, and Colonel Moran--showed that the game was whist,
22407 and that there was a fairly equal fall of the cards.
22408 Adair might have lost five pounds, but not more.
22409 His fortune was a considerable one, and such a loss could not in any way
22411 He had played nearly every day at one club or other, but he was a cautious
22412 player, and usually rose a winner.
22413 It came out in evidence that, in partnership with Colonel Moran, he had
22414 actually won as much as four hundred and twenty pounds in a sitting, some
22415 weeks before, from Godfrey Milner and Lord Balmoral.
22416 So much for his recent history as it came out at the inquest.
22419 \begin_layout Standard
22423 \begin_layout Standard
22435 \begin_layout Standard
22436 Please do read the file
22438 examples/multicol.lyx
22440 for more advanced examples including column and header spacing, vertical
22441 separator lines, and more.
22444 \begin_layout Section
22449 Paragraph Environment
22450 \begin_inset OptArg
22453 \begin_layout Standard
22454 Numbering in Enumerate
22462 \begin_layout Standard
22468 \begin_layout Standard
22469 \begin_inset VSpace bigskip
22475 \begin_layout Standard
22477 The default numbering for the
22481 paragraph environment begins with Arabic numbers and ends with uppercase
22483 Suppose, however, you wanted a different type of numbering scheme.
22484 Here's a quickie example of how to change the numbering scheme:
22487 \begin_layout LyX-Code
22497 \begin_layout LyX-Code
22507 \begin_layout LyX-Code
22517 \begin_layout LyX-Code
22527 \begin_layout Standard
22528 \SpecialChar \ldots{}
22529 which changes the numbering scheme to uppercase Roman numerals, uppercase
22530 letters, Arabic numbers, and lowercase letter.
22533 \begin_layout Standard
22534 Additionally, the previous example also adds a little bit extra to the numbering
22536 For example, the first level label actually looks like:
22537 \begin_inset Quotes eld
22541 \begin_inset Quotes erd
22545 For ease of reading, we'll describe what the numbering schemes look like
22546 using a notation something like this: <
22547 \begin_inset Quotes eld
22551 \begin_inset Quotes erd
22556 \begin_inset Quotes erd
22560 \begin_inset Quotes erd
22565 \begin_inset Quotes erd
22569 \begin_inset Quotes erd
22574 \begin_inset Quotes eld
22578 \begin_inset Quotes erd
22585 \begin_layout Standard
22586 As you can see in the example, there is a label command for each nesting
22593 \SpecialChar \ldots{}
22600 , as well as a counter,
22604 \SpecialChar \ldots{}
22610 There are also five
22611 \begin_inset Quotes eld
22615 \begin_inset Quotes erd
22648 , each of which take one counter as an argument.
22649 You can add characters before or after these, but there's no need to add
22653 \begin_layout Standard
22654 You can get really fancy with these.
22658 \begin_layout LyX-Code
22672 \begin_layout LyX-Code
22684 \begin_layout LyX-Code
22694 \begin_layout LyX-Code
22704 \begin_layout Standard
22705 produces the somewhat out of hand numbering scheme: <
22706 \begin_inset Quotes eld
22710 \begin_inset Quotes erd
22715 \begin_inset Quotes erd
22719 \begin_inset Quotes erd
22724 \begin_inset Quotes erd
22728 \begin_inset Quotes erd
22733 \begin_inset Quotes eld
22737 \begin_inset Quotes erd
22744 \begin_layout Section
22745 Extra Space Between Table Rows
22748 \begin_layout Standard
22754 \begin_layout Standard
22755 \begin_inset VSpace bigskip
22761 \begin_layout Standard
22763 LaTeX allows you to put a bit of extra space between rows in a table by
22764 giving an optional argument to the end-of-row specifier (
22773 LyX has not yet implemented this in a formal way, so here are two dirty
22774 little tricks to do the same job.
22778 \begin_layout Standard
22779 The first is the more formal, but longwinded way to do it.
22780 In the LaTeX preamble, add the following command definition:
22783 \begin_layout Standard
22790 extratablespace}[1]{
22794 This command takes a single argument---the amount of space you would like
22796 Insert the command in the first column of the row
22800 where you would like the space to appear.
22801 Here is an example (I've removed all the borders using
22806 ayout\SpecialChar \menuseparator
22815 \begin_layout Standard
22817 \begin_inset Tabular
22818 <lyxtabular version="3" rows="4" columns="3">
22820 <column alignment="center" valignment="top" width="0pt">
22821 <column alignment="center" valignment="top" width="0pt">
22822 <column alignment="center" valignment="top" width="0pt">
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
22860 <cell alignment="center" valignment="top" topline="true" usebox="none">
22863 \begin_layout Standard
22880 <cell alignment="center" valignment="top" topline="true" usebox="none">
22883 \begin_layout Standard
22889 <cell alignment="center" valignment="top" topline="true" usebox="none">
22892 \begin_layout Standard
22907 <cell alignment="center" valignment="top" topline="true" usebox="none">
22910 \begin_layout Standard
22927 <cell alignment="center" valignment="top" topline="true" usebox="none">
22930 \begin_layout Standard
22943 \begin_layout Standard
22947 extratablespace{2ex}
22957 <cell alignment="center" valignment="top" topline="true" usebox="none">
22960 \begin_layout Standard
22975 <cell alignment="center" valignment="top" topline="true" usebox="none">
22978 \begin_layout Standard
22995 <cell alignment="center" valignment="top" topline="true" usebox="none">
22998 \begin_layout Standard
23004 <cell alignment="center" valignment="top" topline="true" usebox="none">
23007 \begin_layout Standard
23022 <cell alignment="center" valignment="top" topline="true" usebox="none">
23025 \begin_layout Standard
23048 \begin_layout Standard
23049 The second method is faster, but will make typographers and TeXperts all
23050 over the world groan.
23051 Simply put an end of row specifier with optional argument at the same spot.
23052 No fancy definitions are needed as in the above example, but there will
23053 be more space inserted than you specified because you essentially added
23054 a blank row plus the extra space.
23055 If the space added is too much, simply use a negative number, like so:
23058 \begin_layout Standard
23060 \begin_inset Tabular
23061 <lyxtabular version="3" rows="4" columns="3">
23063 <column alignment="center" valignment="top" width="0pt">
23064 <column alignment="center" valignment="top" width="0pt">
23065 <column alignment="center" valignment="top" width="0pt">
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
23103 <cell alignment="center" valignment="top" topline="true" usebox="none">
23106 \begin_layout Standard
23123 <cell alignment="center" valignment="top" topline="true" usebox="none">
23126 \begin_layout Standard
23132 <cell alignment="center" valignment="top" topline="true" usebox="none">
23135 \begin_layout Standard
23150 <cell alignment="center" valignment="top" topline="true" usebox="none">
23153 \begin_layout Standard
23170 <cell alignment="center" valignment="top" topline="true" usebox="none">
23173 \begin_layout Standard
23186 \begin_layout Standard
23202 <cell alignment="center" valignment="top" topline="true" usebox="none">
23205 \begin_layout Standard
23220 <cell alignment="center" valignment="top" topline="true" usebox="none">
23223 \begin_layout Standard
23240 <cell alignment="center" valignment="top" topline="true" usebox="none">
23243 \begin_layout Standard
23249 <cell alignment="center" valignment="top" topline="true" usebox="none">
23252 \begin_layout Standard
23267 <cell alignment="center" valignment="top" topline="true" usebox="none">
23270 \begin_layout Standard
23293 \begin_layout Standard
23294 It's short, sweet, and gets the job done quickly, even if it is really ugly.
23295 You may put away the rotten vegetables now! I promise I won't suggest anything
23299 \begin_layout Section
23303 \begin_layout Standard
23309 \begin_layout Standard
23310 \begin_inset VSpace bigskip
23316 \begin_layout Standard
23321 \begin_layout Standard
23327 tmpfont}{cmr17 scaled 2500}{
23339 \begin_layout Standard
23344 \begin_layout Standard
23355 hose of you who like the style of old books probably also like
23356 \begin_inset Quotes eld
23360 \begin_inset Quotes erd
23363 ---those large capital letters which begin each new chapter or section.
23364 Implementing them with plain LyX/LaTeX is straightforward (assuming you
23365 know some plain TeX!) but does require a lot of work and many iterations,
23366 as you can see by all the ugly TeX-mode stuff at the beginning of this
23370 \begin_layout Standard
23374 \begin_layout Standard
23380 bigdrop{-1em}{3}{ptmri}{T}+
23385 here is a much easier way of doing this, of course.
23394 ) package from CTAN allows a simple way to add such letters to your documents.
23395 Since this package is not a standard part of teTeX, I can't demonstrate
23396 it within this document, but if you copy this paragraph to a new document,
23398 \begin_inset Quotes eld
23408 \begin_inset Quotes erd
23411 and the pluses from the TeX code at the beginning of the paragraph, and
23416 usepackage{dropcaps}
23418 to your LaTeX preamble, you will get a nice Times Roman Italic
23419 \begin_inset Quotes eld
23423 \begin_inset Quotes erd
23426 , whose height is three lines of text and which protrudes 1 em into the
23428 (Make certain you have copied
23429 \begin_inset Quotes eld
23437 \begin_inset Quotes erd
23440 into a directory where TeX can see it.) The first argument is the amount
23441 of indentation; in this case the negative sign moves it into the margin.
23442 The second argument is the height of the letter in number of lines of text.
23443 The third argument is the font name: virtually anything which has a tfm
23444 file should work (wade through the
23446 .../texmf/fonts/tfm
23448 directory for possibilities).
23449 My personal favorite is
23450 \begin_inset Quotes eld
23458 \begin_inset Quotes erd
23461 , a fancy German font specifically designed for dropped capitals.
23462 The fourth argument is the letter (or letters) to be dropped.
23467 package also offers the
23473 command, as well as a slightly simplified
23482 \begin_layout Section
23483 Non-standard Paragraph Shapes
23486 \begin_layout Standard
23492 \begin_layout Standard
23493 \begin_inset VSpace bigskip
23499 \begin_layout Standard
23503 \begin_layout Standard
23515 \begin_layout Standard
23519 \begin_layout Standard
23528 \begin_layout Standard
23542 \begin_layout Standard
23547 \begin_layout Standard
23558 \begin_layout Standard
23567 \begin_layout Standard
23576 \begin_layout Standard
23585 \begin_layout Standard
23594 \begin_layout Standard
23603 \begin_layout Standard
23612 \begin_layout Standard
23621 \begin_layout Standard
23630 \begin_layout Standard
23639 \begin_layout Standard
23648 \begin_layout Standard
23657 \begin_layout Standard
23666 \begin_layout Standard
23675 \begin_layout Standard
23684 \begin_layout Standard
23693 \begin_layout Standard
23702 \begin_layout Standard
23711 \begin_layout Standard
23720 \begin_layout Standard
23726 There are times when the tyranny of rectangular paragraphs must be overthrown.
23727 In such situations, a call to the delightful plain TeX command
23734 As you can see, completely arbitrary shapes can be laid out with a suitable
23735 set of linelength definitions.
23736 While this parshape may look a bit silly and useless, one could conceive
23737 of situations such as finely tuned dropped capitals, word wrapping around
23738 non-rectangular graphics, etc.
23739 which will benefit from such handcrafting.
23742 \begin_layout Standard
23743 \begin_inset VSpace bigskip
23749 \begin_layout Standard
23754 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23761 is the number of lines of text which define the paragraph.
23762 If there turn out to be fewer lines, the shape is truncated; if there are
23763 more, the excess lines have the same dimensions as the last line of the
23773 entries specify the indentation of the line from the left margin, and the
23774 length of the line as measured from that point.
23775 The shape applies only to the current paragraph; everything is reset to
23776 normal for the next paragraph.
23779 \begin_layout Standard
23783 \begin_layout Standard
23795 \begin_layout Section
23799 \begin_layout Standard
23800 As you can see, the examples in this section range from the useful to the
23802 While I don't expect that anyone will ever need the paragraph shape demonstrate
23803 d in the last section, the important point is that you can do almost anything
23804 you want in LyX if you are willing to figure out how to do it in TeX and
23806 TeX is a fantastically powerful typesetting system and all that power is
23807 available to you since LyX uses it as its backend.