1 #LyX 1.4.3 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 Standard
2683 \begin_layout Standard
2684 Sometimes you need to compile a list of symbols that are mentioned in your
2685 document with a brief explanation of them.
2686 A LaTeX package named
2690 provides an easy way of compiling such lists.
2695 is included in most standard Linux distributions.
2696 If your distribution doesn't contain it, you should download it from a
2697 CTAN mirror and install the package in order to use this feature of LyX.
2700 \begin_layout Standard
2701 A glossary entry is created if you place the cursor after a symbol entry
2702 and then use the menu
2704 Insert\SpecialChar \menuseparator
2705 Glossary\InsetSpace ~
2710 \begin_inset Quotes eld
2718 \begin_inset Quotes erd
2721 is inserted and a window pops up asking for the glossary entry.
2722 A glossary entry consists of two main entries.
2723 The first is the symbol that you want to refer to.
2724 You should enter a valid LaTeX code for the corresponding field in the
2726 The second is the description of the symbol.
2727 You should fill the corresponding field to complete the glossary entry.
2730 \begin_layout Subsection
2731 Sort Order of Glossary Entries
2734 \begin_layout Standard
2735 Suppose you have two glossary entries for the symbols
2736 \begin_inset Formula $a$
2740 \begin_inset Formula $\sigma$
2748 package automatically sorts these two entries considering the symbol entry,
2749 while printing the Glossary.
2750 However, this can lead to an undesired sort order.
2751 For the example given, the first entry appears as
2755 , while the second is
2762 Note that, in this case
2763 \begin_inset Formula $\sigma$
2766 is located in front of the
2767 \begin_inset Formula $a$
2770 , since the character
2771 \begin_inset Quotes eld
2777 \begin_inset Quotes erd
2780 is considered in sorting.
2781 In order to control the sort order, you can edit the
2786 field of the glossary dialog.
2787 For the given example, you can edit this field as
2796 Then, these entries will be effective in the sort ordering and
2797 \begin_inset Formula $a$
2800 will be located before
2801 \begin_inset Formula $\sigma$
2807 \begin_layout Standard
2808 This feature provides exciting ways of ordering the entries.
2809 For subgrouping and tips for using sort entries see the official nomencl
2813 \begin_layout Subsection
2817 \begin_layout Standard
2818 You can turn on referencing to the equations and pages in the glossary entries.
2819 For this purpose, you should add referencing options commands at the end
2820 of description field.
2821 There are six referencing options in nomencl package:
2824 \begin_layout Paragraph*
2830 \begin_layout Standard
2831 Adds reference to the equation by adding the phrase
2832 \begin_inset Quotes eld
2836 \begin_inset Quotes erd
2842 \begin_layout Paragraph*
2848 \begin_layout Standard
2849 Adds reference to the page by adding the phrase
2850 \begin_inset Quotes eld
2854 \begin_inset Quotes erd
2860 \begin_layout Paragraph*
2866 \begin_layout Standard
2867 Is the short notation of
2874 \begin_layout Paragraph*
2884 \begin_layout Standard
2885 Turns off corresponding referencing options if they are turned on globally
2886 (see reference documentation of nomencl).
2889 \begin_layout Subsection
2893 \begin_layout Standard
2894 You can insert the glossary with the menu
2896 Insert\SpecialChar \menuseparator
2898 &TOC\SpecialChar \menuseparator
2902 A light blue box labeled
2903 \begin_inset Quotes eld
2911 \begin_inset Quotes erd
2914 will show the place where the index is printed in the output.
2915 The index list box is not clickable like other LyX-boxes.
2916 In the printed output the title of the glossary appears as
2924 \begin_layout Standard
2925 This is translated to the document language for a small number of languages,
2926 amongst others French and German
2932 If you are not happy with the title, you can change it by re-defining the
2940 For example, in order to change the title
2948 add the following line to the preamble.
2951 \begin_layout LyX-Code
2956 nomname}{List of Symbols}
2959 \begin_layout LyX-Code
2963 \begin_layout Section
2967 \begin_layout Subsection
2971 \begin_layout Standard
2972 When you are working on a large file with many sections, it is often convenient
2973 to break up the document into several files, or perhaps you have something
2974 where a table may change from time to time, but the preceding text does
2976 In these cases, you should seriously consider using multipart documents.
2977 For example, scientific papers often have five major sections: the introduction
2978 , observations, results, discussion, and conclusion.
2979 Each of these could be its own separate LyX file, with one
2980 \begin_inset Quotes eld
2984 \begin_inset Quotes erd
2987 file which contains the title, authors, abstract, references, etc., plus
2988 the five included files.
2989 It is important to note that each of these files is a full LyX file which
2990 can be formatted and printed on its own, as well as included in a master
2992 Each of these files must have the same document class, however--- don't
2993 attempt to mix book classes with article classes.
2994 You may also include LaTeX files; however, these files must not have their
3000 everything up to and including the
3012 line must be deleted) or else errors will be generated when you try to
3016 \begin_layout Standard
3017 LyX allows you to include files quite easily with
3022 nsert\SpecialChar \menuseparator
3031 When you click on this selection a small box is inserted into the file
3032 at the current cursor location.
3033 Clicking on the box raises a dialog which allows you to select the file
3034 to be included, and the method of its inclusion.
3038 \begin_layout Standard
3039 The file selection box should by now be obvious.
3040 The three inclusion methods are
3041 \begin_inset Quotes eld
3045 \begin_inset Quotes erd
3049 \begin_inset Quotes eld
3053 \begin_inset Quotes erd
3057 \begin_inset Quotes eld
3061 \begin_inset Quotes erd
3065 The difference between
3066 \begin_inset Quotes eld
3070 \begin_inset Quotes erd
3074 \begin_inset Quotes eld
3078 \begin_inset Quotes erd
3081 is really only meaningful to LaTeXperts, but the practical difference is
3082 that files which are
3083 \begin_inset Quotes eld
3087 \begin_inset Quotes erd
3090 are typeset beginning on a new page, while files which are
3091 \begin_inset Quotes eld
3095 \begin_inset Quotes erd
3098 are typeset starting on the current page.
3099 Perhaps the labeling in LyX will be changed someday to reflect this.
3102 \begin_layout Standard
3103 Generally, the master file is converted into a full LaTeX file before typesettin
3104 g, while the included files are converted to LaTeX files which do not have
3105 all the preamble information.
3115 button prevents this conversion.
3118 \begin_layout Standard
3120 \begin_inset Quotes eld
3124 \begin_inset Quotes erd
3127 included file allows you to include a file typeset exactly as it appears
3128 in the file, i.e.\InsetSpace ~
3129 verbatim mode, with the characters set in a fixed-width
3131 Normally, spaces in this file are invisible, though two consecutive spaces
3132 are conserved, unlike LyX's normal treatment of spaces.
3133 However, setting the
3143 checkbox typesets a mark to unambiguously define the presence of a space.
3149 \begin_layout Subsection
3150 Cross-References Between Files
3153 \begin_layout Standard
3154 It is possible to set up cross-references between the different files.
3155 First, open all the files in question: let's call them A and B in a two
3156 file example, where B is included in A.
3157 Let's say you insert a label in A, then want to reference it in B.
3158 Open the cross-reference dialog in whilst in document B, and you can select
3160 \begin_inset Quotes eld
3164 \begin_inset Quotes erd
3170 \begin_layout Section
3174 \begin_layout Standard
3179 is needed by LyX to be able to output algorithm floats.
3180 These are useful in placing short algorithms across page breaks and support
3181 an index of algorithms too.
3184 \begin_layout Section
3188 \begin_layout Standard
3193 is used by LyX when you select ``subfigure'' in the graphics dialog and
3194 enter the subfigure caption.
3195 Several figures marked in this way can be packed into a single float with
3196 individual sub-captions.
3199 \begin_layout Section
3200 Fancy Headers and Footers
3203 \begin_layout Standard
3204 The default page layout is rather plain; for an article document class,
3205 all you get is a centered page number at the bottom of the page.
3206 This document is the book class, so it appears to be a bit fancier, but
3207 to really put on a show, you need to set the document page style to
3208 \begin_inset Quotes eld
3212 \begin_inset Quotes erd
3215 , as mentioned in the
3221 This section describes the LaTeX codes you need to insert in your LaTeX
3222 preamble or the text in order to get the desired effects.
3225 \begin_layout Standard
3226 The page header is divided into three fields, not surprisingly labeled
3227 \begin_inset Quotes eld
3231 \begin_inset Quotes erd
3235 \begin_inset Quotes eld
3239 \begin_inset Quotes erd
3243 \begin_inset Quotes eld
3247 \begin_inset Quotes erd
3251 The footer is also divided into these three fields.
3252 The LaTeX commands to set these fields in the simplest manner are
3277 Suppose you wish to put your name in the upper left hand corner of each
3279 Simply insert the following command in the preamble:
3282 \begin_layout Standard
3291 \begin_layout Standard
3292 You will now see your name in the upper left.
3293 If a field has a default entry that you would like to get rid of (often
3294 the page number appears in the central footer, simply include a command
3295 with a blank argument, e.g.
3298 \begin_layout Standard
3306 \begin_layout Standard
3307 Let's get really fancy: lets put the section number with the word
3308 \begin_inset Quotes eld
3312 \begin_inset Quotes erd
3316 Section 3) in the upper left, the page number (e.g.
3317 Page 4) in the upper right, your name in the lower left, and the date in
3319 The following commands should now appear in the preamble:
3322 \begin_layout Standard
3332 \begin_layout Standard
3340 \begin_layout Standard
3350 \begin_layout Standard
3359 \begin_layout Standard
3367 \begin_layout Standard
3377 \begin_layout Standard
3390 access LaTeX's section and page counters, and so print out the current
3391 section and page numbers.
3398 simply prints out today's date.
3401 \begin_layout Standard
3402 The thicknesses of the horizontal rules drawn beneath the header and above
3403 the footer can also be modified.
3404 If you don't want one of the headers, set its thickness to 0.
3405 The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3406 Use the commands, e.g.
3413 headrulewidth}{0.4pt}
3421 footrulewidth}{0.4pt}
3423 to set the thicknesses.
3426 \begin_layout Standard
3427 You can switch the header/footer settings on and off for individual pages
3432 thispagestyle{empty}
3438 thispagestyle{plain}
3444 thispagestyle{fancy}
3447 Simply insert them in the text on the page you want changed and mark them
3449 In fact, title pages are marked as plain by default, while following pages
3450 are marked fancy when using the global fancy setting.
3453 \begin_layout Standard
3454 There are more complex commands which will let you insert things in the
3455 upper left on odd numbered pages, etc., but I will refer you to the
3459 package documentation for more descriptions.
3460 For example, if you have a teTeX installation, look for
3462 /usr/share/texmf/doc/latex/fancyhdr/\SpecialChar \-
3468 \begin_layout Standard
3469 As a final example, it is possible to include an Encapsulated PostScript®
3470 file in the header or footer.
3471 Suppose you want to put a company logo in the upper lefthand corner.
3472 You might try something like
3475 \begin_layout Standard
3484 includegraphics{logo.eps}}}
3487 \begin_layout Standard
3489 (you may need to preface this with
3493 usepackage{graphics}
3495 if you don't include EPS files elsewhere in your document).
3498 \begin_layout Section
3502 \begin_layout Standard
3503 LaTeX provides a mechanism to produce essentially a page within a page,
3505 Within a minipage, all the usual rules of indentation, line wrapping, etc.\InsetSpace ~
3507 LyX also provides some of the minipage capability.
3510 \begin_layout Standard
3511 Minipages in LyX have their own collapsable box; insert one via
3516 nsert\SpecialChar \menuseparator
3524 Right-clicking on the box allows you to alter the minipage's width and
3525 alignment within the page.
3526 Warning: if the minipage is too long to fit on a page, it is truncated,
3527 not wrapped onto the next page.
3530 \begin_layout Standard
3531 If you place two minipages side-by-side, you can use
3536 nsert\SpecialChar \menuseparator
3544 to insert a special instruction known in the LaTeX world as an
3548 to put a maximum amount of space between them; it forces one minipage to
3549 the left edge, the other to the right edge.
3550 The examples below show the difference.
3553 \begin_layout Standard
3554 \begin_inset Box Frameless
3563 height_special "totalheight"
3566 \begin_layout Standard
3567 This is a minipage which does not use hfill.
3568 This is the second sentence of a minipage which does not use hfill.
3576 \begin_layout Standard
3577 \begin_inset Box Frameless
3586 height_special "totalheight"
3589 \begin_layout Standard
3590 This is a second minipage which does not use hfill.
3591 This is the second sentence of a second minipage which does not use hfill.
3599 \begin_layout Standard
3600 \begin_inset VSpace medskip
3606 \begin_layout Standard
3607 Here is some normal text to separate the two examples.
3610 \begin_layout Standard
3611 \begin_inset VSpace medskip
3617 \begin_layout Standard
3618 \begin_inset Box Frameless
3627 height_special "totalheight"
3630 \begin_layout Standard
3631 This is a minipage which does use hfill.
3632 This is the second sentence of a minipage which does use hfill.
3640 \begin_inset Box Frameless
3649 height_special "totalheight"
3652 \begin_layout Standard
3653 This is a second minipage which does use hfill.
3654 This is the second sentence of a second minipage which does use hfill.
3662 \begin_layout Section
3663 Wrapping Text Around Figures
3664 \begin_inset LatexCommand \label{sec:floatflt}
3671 \begin_layout Standard
3672 \begin_inset Wrap figure
3677 \begin_layout Standard
3678 \begin_inset Graphics
3689 \begin_layout Caption
3690 This is a wrapped figure, and this is the brilliant caption that describes
3699 \begin_layout Standard
3700 A very frequently asked question is whether text can be made to
3701 \begin_inset Quotes eld
3705 \begin_inset Quotes erd
3708 around figures so that a figure occupies some fraction of the column width
3709 and text fills the rest.
3710 If you have the LaTeX package
3714 installed (you can find out about it in the
3718 manual) you can do this.
3721 \begin_layout Standard
3722 At the right is a figure of a mobius strip---you should have already seen
3728 To wrap the text like this insert a wrap box via
3733 nsert\SpecialChar \menuseparator
3738 ts\SpecialChar \menuseparator
3744 \begin_layout Standard
3745 Note: this package is very fragile! For example, having a figure too close
3746 to the bottom of the page will mess things up, as will having two figures
3748 Use this package sparingly and do read the documentation that came with
3749 it (which will also tell you how to wrap text around tables).
3752 \begin_layout Section
3756 \begin_layout Standard
3757 While the standard table layout will suffice in 99% of all tables you generate,
3758 occasionally you will run into one which requires a bit of extra tweaking.
3759 The table dialog which appears on a right-click of a table allows these
3761 It will give you access to some extra column alignment parameters.
3762 A little bit of LaTeX background is useful here: when you set up a table
3763 in LaTeX, each column is given an alignment type.
3764 For example, you would give it
3765 \begin_inset Quotes eld
3773 \begin_inset Quotes erd
3777 \begin_inset Quotes eld
3785 \begin_inset Quotes erd
3789 \begin_inset Quotes eld
3797 \begin_inset Quotes erd
3800 for left-aligned, centered, and right-aligned columns respectively (which
3801 appear as the left/center/right radio buttons in LyX).
3803 \begin_inset Quotes eld
3811 \begin_inset Quotes erd
3814 , which will make a column of a specified width (the width box in LyX),
3815 and will wrap text within that box.
3817 \begin_inset Quotes eld
3825 \begin_inset Quotes erd
3828 (vertical bar) which rather than making a column will make a vertical rule
3829 at that point; this manifests itself in LyX as the
3830 \begin_inset Quotes eld
3834 \begin_inset Quotes erd
3838 Finally, there is a type
3839 \begin_inset Quotes eld
3847 \begin_inset Quotes erd
3850 , which allows you to use whatever is enclosed in the accompanying braces
3851 as the column separator, including a null argument.
3852 The reasons for doing this may not be obvious, but they can be very powerful.
3853 They are best demonstrated by example.
3856 \begin_layout Subsection
3857 Removing Extra Column Space
3860 \begin_layout Standard
3861 Here is a standard table:
3864 \begin_layout Standard
3866 \begin_inset Tabular
3867 <lyxtabular version="3" rows="3" columns="2">
3869 <column alignment="left" valignment="top" width="0pt">
3870 <column alignment="left" valignment="top" leftline="true" width="0pt">
3871 <row bottomline="true">
3872 <cell alignment="left" valignment="top" topline="true" usebox="none">
3875 \begin_layout Standard
3890 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
3893 \begin_layout Standard
3910 <cell alignment="left" valignment="top" topline="true" usebox="none">
3913 \begin_layout Standard
3928 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3931 \begin_layout Standard
3948 <cell alignment="center" valignment="top" topline="true" usebox="none">
3951 \begin_layout Standard
3966 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3969 \begin_layout Standard
3992 \begin_layout Standard
3993 Notice that the horizontal rule extends a bit past the text on both sides.
3994 If you wanted the line to end even with the text, we can put a null separator
3995 on the ends to get rid of the bit of extra space LaTeX adds by default.
3996 Here is the example:
3999 \begin_layout Standard
4001 \begin_inset Tabular
4002 <lyxtabular version="3" rows="3" columns="2">
4004 <column alignment="left" valignment="top" width="0pt" special="@{} l">
4005 <column alignment="left" valignment="top" leftline="true" width="0pt" special="l @{}">
4006 <row bottomline="true">
4007 <cell alignment="left" valignment="top" topline="true" usebox="none">
4010 \begin_layout Standard
4025 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
4028 \begin_layout Standard
4045 <cell alignment="left" valignment="top" topline="true" usebox="none">
4048 \begin_layout Standard
4063 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4066 \begin_layout Standard
4083 <cell alignment="center" valignment="top" topline="true" usebox="none">
4086 \begin_layout Standard
4101 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4104 \begin_layout Standard
4127 \begin_layout Standard
4128 In this case, the column specifier for the left column was set to
4129 \begin_inset Quotes eld
4137 \begin_inset Quotes erd
4140 , while the right column was set to
4141 \begin_inset Quotes eld
4149 \begin_inset Quotes erd
4152 , in order to put the null characters on the edges.
4156 \begin_layout Subsection
4157 Changing the Column Separator Character
4160 \begin_layout Standard
4161 Now suppose you really wanted, for reasons that are completely opaque, to
4163 \begin_inset Formula $\sqrt{\pi}$
4166 with some space around it for the column separator.
4167 Simply turn off the vertical border, then set the right column specifier
4169 \begin_inset Quotes eld
4181 \begin_inset Quotes erd
4185 You could now make a table like this:
4188 \begin_layout Standard
4190 \begin_inset Tabular
4191 <lyxtabular version="3" rows="3" columns="2">
4193 <column alignment="left" valignment="top" width="0pt">
4194 <column alignment="left" valignment="top" width="0in" special="@{~$\sqrt{\pi}$~}l">
4195 <row bottomline="true">
4196 <cell alignment="left" valignment="top" topline="true" usebox="none">
4199 \begin_layout Standard
4214 <cell alignment="left" valignment="top" topline="true" usebox="none">
4217 \begin_layout Standard
4234 <cell alignment="left" valignment="top" topline="true" usebox="none">
4237 \begin_layout Standard
4252 <cell alignment="center" valignment="top" topline="true" usebox="none">
4255 \begin_layout Standard
4272 <cell alignment="center" valignment="top" topline="true" usebox="none">
4275 \begin_layout Standard
4290 <cell alignment="center" valignment="top" topline="true" usebox="none">
4293 \begin_layout Standard
4316 \begin_layout Subsection
4317 Making a Decimal Point Aligned Column
4320 \begin_layout Standard
4321 Okay, that last example was very silly, but here is one that is not.
4322 Suppose you want to make a table that has a column which is aligned on
4324 A standard LaTeX trick to do this is to set the whole number part in a
4325 right-aligned column, use a decimal point for the column separator, then
4326 set the fractional part as a left-aligned column.
4327 A variation on this is to include the decimal point explicitly with the
4328 whole part, then use just a null separator in between.
4329 The latter variation is demonstrated here:
4332 \begin_layout Standard
4334 \begin_inset Tabular
4335 <lyxtabular version="3" rows="5" columns="3">
4337 <column alignment="center" valignment="top" width="0pt">
4338 <column alignment="right" valignment="top" leftline="true" width="0pt">
4339 <column alignment="center" valignment="top" width="0pt" special="@{} l">
4340 <row bottomline="true">
4341 <cell alignment="center" valignment="top" topline="true" usebox="none">
4344 \begin_layout Standard
4359 <cell multicolumn="1" alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
4362 \begin_layout Standard
4377 <cell multicolumn="2" alignment="center" valignment="top" topline="true" usebox="none">
4380 \begin_layout Standard
4388 <cell alignment="center" valignment="top" topline="true" usebox="none">
4391 \begin_layout Standard
4401 \begin_inset Formula $\pi$
4409 <cell alignment="right" valignment="top" topline="true" leftline="true" usebox="none">
4412 \begin_layout Standard
4427 <cell alignment="center" valignment="top" topline="true" usebox="none">
4430 \begin_layout Standard
4447 <cell alignment="center" valignment="top" topline="true" usebox="none">
4450 \begin_layout Standard
4460 \begin_inset Formula $\pi^{\pi}$
4468 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4471 \begin_layout Standard
4486 <cell alignment="center" valignment="top" topline="true" usebox="none">
4489 \begin_layout Standard
4506 <cell alignment="center" valignment="top" topline="true" usebox="none">
4509 \begin_layout Standard
4519 \begin_inset Formula $(\pi^{\pi})^{\pi}$
4527 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4530 \begin_layout Standard
4545 <cell alignment="center" valignment="top" topline="true" usebox="none">
4548 \begin_layout Standard
4556 <cell alignment="center" valignment="top" topline="true" usebox="none">
4559 \begin_layout Standard
4569 \begin_inset Formula $\pi^{\pi^{\pi}}$
4577 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4580 \begin_layout Standard
4595 <cell alignment="center" valignment="top" topline="true" usebox="none">
4598 \begin_layout Standard
4609 \begin_inset Formula $\times10^{18}$
4625 \begin_layout Standard
4626 Though it appears a bit funny in LyX, on paper it will produce what appears
4627 to be a 2-column table in which the right column is aligned on the decimal
4628 point and the header appears to be centered over it.
4631 \begin_layout Standard
4632 Perhaps it is best if I described just what I did: first, create a 3
4633 \begin_inset Formula $\times$
4636 3 table and remove all the borders.
4637 Then re-add a bottom border to the top row, and a right border to the first
4639 Type in the values for the first column and set its alignment to
4661 and set that column's alignment to
4677 \begin_inset Formula $\times10^{18}$
4682 and set the extra column alignment to
4687 Finally type in the word
4691 in the middle column, highlight it and the blank entry to its right, and
4704 \begin_layout Subsection
4705 A Better Decimal-Alignment Solution
4708 \begin_layout Standard
4709 An alternative way to have decimal alignment in tables is through the
4714 Add the following to the LateX preamble:
4717 \begin_layout LyX-Code
4723 \begin_layout LyX-Code
4726 newcolumntype{d}[1]{D{.}{.}{#1}}
4729 \begin_layout Standard
4730 To have a column decimally aligned, enter in the
4732 Special Column Alignment
4738 dialog the following:
4741 \begin_layout LyX-Code
4742 d{number of decimals of the data}
4745 \begin_layout Standard
4746 To create extra column space just increase the number of decimals in
4751 Setting the multicolumn attribute for a single cell makes it insensitive
4752 to the decimal alignment which comes in handy as well.
4753 A drawback of this method is that math mode is not allowed in a column
4754 with decimal alignment except if the multicolumn attribute is set.
4757 \begin_layout Standard
4758 This method offers the same flexibility as the
4763 One could, for example, change the alignment separator, and have different
4764 alignment separators for different columns by defining multiple column
4765 types in the preamble.
4766 The syntax is as follows:
4769 \begin_layout LyX-Code
4770 D{inputsep}{outputsep}{decimal places}
4773 \begin_layout Standard
4774 The interested reader is directed towards the
4778 package documentation for more details.
4781 \begin_layout Section
4782 Itemize Bullet Selection
4783 \begin_inset LatexCommand \label{sec:bullet}
4790 \begin_layout Standard
4796 \begin_layout Subsection
4800 \begin_layout Standard
4801 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
4802 Using this dialog you can easily specify what bullet shape to use at each
4803 level of an itemized list.
4804 These settings are document-wide so you won't be able to specify different
4805 sets of bullets for different paragraphs
4809 \begin_layout Standard
4810 Well, actually you can but you'll have to do it by hand.
4818 \begin_layout Subsection
4822 \begin_layout Standard
4823 Open the dialog by selecting the
4828 ocument\SpecialChar \menuseparator
4835 menu item and then select the
4845 \begin_layout Standard
4846 The dialog provides you with a table of bullet shapes.
4847 A column of buttons on the left of the table provides access to the six
4848 different panels of bullet shapes.
4849 The row of buttons across the top is used to select which bullet depth
4851 A text entry under the table shows the currently selected bullet shape's
4852 LaTeX equivalent and this can be edited if desired.
4853 If you do modify the text you will also need to specify any needed packages
4854 in the LaTeX preamble.
4857 \begin_layout Standard
4858 The six panels are divided up by the packages they require.
4859 The following table shows the mappings from button name to LaTeX packages.
4862 \begin_layout Standard
4864 \begin_inset Tabular
4865 <lyxtabular version="3" rows="7" columns="2">
4867 <column alignment="center" valignment="top" leftline="true" width="0pt">
4868 <column alignment="center" valignment="top" leftline="true" rightline="true" width="0pt">
4869 <row topline="true" bottomline="true">
4870 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4873 \begin_layout Standard
4888 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4891 \begin_layout Standard
4907 <row topline="true">
4908 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4911 \begin_layout Standard
4926 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4929 \begin_layout Standard
4944 <row topline="true">
4945 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4948 \begin_layout Standard
4963 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4966 \begin_layout Standard
4982 <row topline="true">
4983 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4986 \begin_layout Standard
5001 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
5004 \begin_layout Standard
5020 <row topline="true">
5021 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
5024 \begin_layout Standard
5039 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
5042 \begin_layout Standard
5058 <row topline="true">
5059 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
5062 \begin_layout Standard
5077 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
5080 \begin_layout Standard
5096 <row topline="true" bottomline="true">
5097 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
5100 \begin_layout Standard
5115 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
5118 \begin_layout Standard
5141 \begin_layout Standard
5142 LyX doesn't stop you using bullets from packages you don't have.
5143 If you get errors from LaTeX when you try to view or print the file then
5144 its likely you are missing a package.
5145 LyX doesn't restrict your use since you may be editing locally and exporting
5149 \begin_layout Subsection
5153 \begin_layout Standard
5154 Select which bullet depth you want to change then select the bullet shape
5160 Any changes will not be visible in LyX, but are visible when viewing the
5161 document using xdvi or ghostview.
5164 \begin_layout Standard
5165 You can reset a bullet shape to the default simply by clicking your right
5166 mouse button on the appropriate bullet depth button.
5169 \begin_layout Standard
5174 want to have multiple sets of paragraphs with different sets of bullets
5175 in each then you're going to have to get your hands dirty.
5176 The itemize bullet selection dialog can help though because it provides
5177 you with the LaTeX code for a wide range of bullet shapes.
5178 To make your own custom paragraphs you have the following options:
5181 \begin_layout Standard
5185 \begin_layout Standard
5201 \begin_layout Standard
5205 \begin_layout Standard
5227 \begin_layout Itemize
5228 Use the LaTeX command
5234 to specify a new bullet shape for a given depth.
5235 You'll also need to save the current bullet shape so you can restore it
5237 In this itemized list the following LaTeX code was used to change the bullet
5238 used for the first depth.
5270 Note that the itemize depth is specified in Roman numerals as part of the
5280 \begin_layout Itemize
5284 \begin_layout Standard
5297 Specify each individual entry by starting each item with the bullet shape
5298 enclosed in square brackets and set as TeX.
5299 For example, this item was started with
5312 \begin_layout Standard
5316 \begin_layout Standard
5332 \begin_layout Standard
5333 You'll also need to revert the labelitem back to its previous setting for
5334 the global bullet shape settings to remain in effect.
5335 The way used here was:
5348 \begin_layout Chapter
5349 Special Document Classes
5352 \begin_layout Section
5356 \begin_layout Standard
5362 \begin_layout Standard
5363 \begin_inset VSpace bigskip
5369 \begin_layout Standard
5371 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
5372 papers to be submitted to American Mathematical Society publications.
5373 The layouts are not tailored to a specific journal, but easily can be.
5374 You should refer to the AMS documentation for specific instructions for
5375 each journal (usually it will entail only changing a single line in the
5377 That documentation is available on the Web at
5378 \begin_inset LatexCommand \url{http://www.ams.org}
5383 \begin_inset LatexCommand \url{ftp://ftp.ams.org/pub/tex/amslatex/}
5387 .These layouts are appropriate, and useful, for any mathematical writing.
5388 There are currently 4 distinct AMS LaTeX layouts:
5391 \begin_layout Enumerate
5392 amsart: The standard AMS-article format.
5393 All results and similar statements are numbered as
5394 \begin_inset Formula $(n.m)$
5397 , where the first number refers to the section, and the second refers to
5398 the total number of results (Theorems, Corollaries, Propositions, Definitions
5399 and Remarks, etc.) in that section.
5400 There are also many (but not all) environments available unnumbered, which
5401 is occasionally needed.
5402 Unnumbered environments indicated by an asterisk at the end.
5405 \begin_layout Enumerate
5406 amsart-seq: Here, numbering for each type of statement is in its own sequence,
5407 with no reference to the section number.
5408 There are also many (but not all) environments available unnumbered, which
5409 is occasionally needed.
5410 Unnumbered environments indicated by an asterisk at the end.
5413 \begin_layout Enumerate
5414 amsart-plain: This one is even more terse, since all the environments are
5418 \begin_layout Enumerate
5419 amsbook: the standard AMS book (really, monograph) format.
5420 Numbering is similar to the amsart layout, except that all numbering is
5422 \begin_inset Formula $(n.m.p)$
5425 , where the first number refers to the chapter, the second to the section,
5426 and the third is the number of the results (Theorems, Corollaries, Propositions
5427 , Definitions and Remarks, etc.) in that section.
5428 There are also many (but not all) environments available unnumbered, which
5429 is occasionally needed.
5430 Unnumbered environments indicated by an asterisk at the end.
5433 \begin_layout Standard
5434 Any AMS LyX file can be converted to either of the numbering schemes by
5435 simply changing the document class in the
5440 ocument\SpecialChar \menuseparator
5451 \begin_layout Subsection
5452 What these layouts provide
5455 \begin_layout Standard
5456 There is a long list of included environments provided by these layouts.
5457 Most mathematical papers or books will set as special statements most of
5458 these environments, in AMS-LaTeX there is an opportunity to define an unlimited
5459 variety of such declarations.
5460 However, the AMS recommends the environments that are available in LyX.
5461 The list of environments (not counting the standard environments such as
5464 sections, bibliography, title, author, date
5469 \begin_layout Description
5470 Theorem This is typically used for the statements of major results.
5472 \begin_inset Quotes eld
5480 \begin_inset Quotes erd
5483 appears in bold type, along with an automatically-determined number (an
5488 , is also available).
5489 The text is italicized.
5492 \begin_layout Description
5493 Corollary This is used for statements which follow fairly directly from
5494 previous statements.
5495 Again, these can be major results.
5503 \begin_layout Description
5504 Lemma These are smaller results needed to prove other statements.
5507 \begin_layout Description
5508 Proposition These are less major results which (hopefully) add to the general
5509 theory being discussed.
5512 \begin_layout Description
5513 Conjecture These are statements provided without justification, which the
5514 author does not know how to prove, but which seem to be true (to the author,
5518 \begin_layout Description
5519 Criterion A required condition.
5522 \begin_layout Description
5523 Algorithm A general procedure to be used.
5526 \begin_layout Description
5527 Axiom This is a property or statement taken as true within the system being
5531 \begin_layout Description
5532 Definition Guess what this is for.
5533 The font, both on-screen and in the output, is different for this environment
5534 than for the previous ones.
5536 \begin_inset Quotes eld
5540 \begin_inset Quotes erd
5543 ) is still set in boldface, along with the number, if any, but the rest
5547 \begin_layout Description
5548 Example Typeset similarly to Definition.
5551 \begin_layout Description
5555 \begin_layout Description
5559 \begin_layout Description
5563 \begin_layout Description
5564 Remark This environment is also a new type of theorem.
5565 This is set with the word Remark in italics, and the rest upright.
5568 \begin_layout Description
5569 Note Set similarly to the Remark environment.
5572 \begin_layout Description
5576 \begin_layout Description
5580 \begin_layout Description
5584 \begin_layout Description
5588 \begin_layout Description
5589 Case Generally, these are used to break up long arguments, using specific
5590 instances of some condition.
5591 The numbering scheme for cases is on its own, not together with other numbered
5596 \begin_layout Description
5600 \begin_layout Description
5604 \begin_layout Description
5606 \begin_inset Quotes eld
5614 \begin_inset Quotes erd
5617 is set in italics, but the rest is set upright.
5618 At the end of this environment (other environments can be nested within
5619 this one, of course) a QED symbol (usually a square, but it can vary with
5620 different styles) is placed.
5623 \begin_layout Description
5624 Address This should be the author's permanent address.
5627 \begin_layout Description
5628 Current\InsetSpace ~
5629 Address This should be the author's temporary address at the time
5630 of submission, if different from the Address.
5633 \begin_layout Description
5634 Email Author's e-mail address
5637 \begin_layout Description
5638 URL Author's Web address, if desired.
5641 \begin_layout Description
5642 Keywords Key words or phrases used to identify specific topics discussed
5646 \begin_layout Description
5647 Subjectclass These refer to the AMS Subject Classifications, published and
5650 Mathematical Reviews
5653 These are also available online at the AMS cites listed above.
5656 \begin_layout Description
5660 \begin_layout Description
5664 \begin_layout Description
5668 \begin_layout Standard
5669 In addition, these environments automatically provide the AMS LaTeX and
5671 They need to be available on your system in order to use these environments.
5674 \begin_layout Section
5678 \begin_layout Standard
5683 can be used to type letters according to German conventions.
5684 A template file is included in
5686 .../lyx/share/templates
5688 for you to use as a starting point.
5691 \begin_layout Section
5695 \begin_layout Standard
5700 provides an alternative to the standard
5705 It provides similar functionality, but you might prefer this layout with
5706 sans serif sections, headings, and more.
5709 \begin_layout Section
5713 \begin_layout Standard
5719 \begin_layout Subsection
5723 \begin_layout Standard
5724 This section describes how LyX can be used to write articles for submission
5725 to the scientific journal
5727 Astronomy and Astrophysics
5730 \begin_inset LatexCommand \url[www.edpsciences.fr/aa/]{http://www.edpsciences.fr/aa/}
5742 Version 5.01 of the document class
5747 This package can be downloaded from the ftp site
5750 \begin_layout Standard
5751 \begin_inset VSpace medskip
5757 \begin_layout Standard
5759 \begin_inset LatexCommand \url{ftp://ftp.edpsciences.org/pub/aa/readme.html}
5766 \begin_layout Standard
5767 \begin_inset VSpace medskip
5773 \begin_layout Standard
5774 A manual comes together with that package, and this text is not meant to
5775 replace the original manual but merely a short guide how to realize the
5776 correct form of your paper.
5780 \begin_layout Standard
5781 Please note that the publisher of the journal was changed from Springer
5782 to EDP Sciences starting January 1, 2001.
5783 That change implicated also some slight changes of the style files, namely
5784 the removal of the thesaurus command.
5785 The LyX class aa supports the newest version of these style files, V 5.01.
5786 If you have an older version installed, please upgrade.
5787 For compatibility, the old (version 4) layout has been kept as
5792 Please refer to the comments in
5794 LyXDir/layouts/aapaper.layout
5799 \begin_layout Subsection
5803 \begin_layout Standard
5804 It is recommended you start from the example template distributed with LyX.
5805 If you are not using a template, note the following settings:
5808 \begin_layout Itemize
5818 ocument\SpecialChar \menuseparator
5825 dialog (OK, that one was obvious).
5828 \begin_layout Itemize
5829 Don't change the option
5839 The whole layout is done by the macros, you shouldn't change anything.
5842 \begin_layout Subsection
5846 \begin_layout Standard
5847 First thing to enter is the header information.
5848 It consists of seven entries, of which some are optional.
5852 \begin_layout Itemize
5860 \begin_layout Itemize
5868 \begin_layout Itemize
5876 \begin_layout Itemize
5884 \begin_layout Itemize
5889 : [optional] if more than one author: whom to contact for offprint requests.
5892 \begin_layout Itemize
5897 : [optional] mail address for contacts.
5900 \begin_layout Itemize
5908 Received: <date>; Accepted <date>
5911 \begin_layout Standard
5912 There is no need to issue the
5918 command, this is done automatically by LyX when the header is finished.
5919 Although the order of the single header entries doesn't matter it is advised
5920 to keep the above sequence, just to get the best optics and meets the layout
5921 of the real document.
5924 \begin_layout Standard
5925 If you want to place footnotes in the header block, e.g.
5929 \begin_layout Standard
5938 to state your present address, just use the standard footnote via
5943 nsert\SpecialChar \menuseparator
5951 LyX will automagically use the term
5960 \begin_layout Standard
5961 In addition to these topics, the macros use three additional LaTeX commands
5962 that have no counterpart in LyX:
5965 \begin_layout Itemize
5972 to separate different names for more than one author and institute, respectivel
5976 \begin_layout Itemize
5983 to mark corresponding author/institute pairs.
5984 The institutes are numbered sequentially as they appear in the
5988 field, so you have to put a marker to each author.
5991 \begin_layout Itemize
5998 to supply an email address for fast contact.
6001 \begin_layout Standard
6002 In all cases, the appropriate command has to be entered in LyX an marked
6008 \begin_layout Subsection
6012 \begin_layout Standard
6013 The abstract should immediately follow the header block.
6014 With version 5 the abstract environment was changed to a command, and there
6015 is now a resctriction to only one paragraph.
6016 In addition, it should contain an entry with the keywords.
6017 This is not yet implemented for LyX, therefore you have to enter the LaTeX
6024 by hand and mark it as LaTeX code.
6025 Refer to the example paper.
6028 \begin_layout Subsection
6029 Supported environments
6032 \begin_layout Standard
6033 The A&A paper layout supports the following environments for structuring
6037 \begin_layout Itemize
6043 \begin_layout Itemize
6049 \begin_layout Itemize
6055 \begin_layout Itemize
6061 \begin_layout Itemize
6067 \begin_layout Itemize
6073 \begin_layout Itemize
6079 \begin_layout Itemize
6085 \begin_layout Itemize
6091 \begin_layout Itemize
6097 \begin_layout Itemize
6103 \begin_layout Itemize
6109 \begin_layout Subsection
6110 Commands not supported by LyX
6113 \begin_layout Standard
6114 Some commands are not yet supported by the
6119 Some have already been mentioned.
6120 For the sake of completeness, they are listed all together here:
6123 \begin_layout Itemize
6131 \begin_layout Itemize
6139 \begin_layout Itemize
6147 \begin_layout Itemize
6155 \begin_layout Itemize
6163 \begin_layout Itemize
6171 \begin_layout Itemize
6179 \begin_layout Itemize
6187 \begin_layout Standard
6188 If you want to use any of these commands, you have to enter them yourself.
6191 Do not forget to mark them as LaTeX code!
6194 \begin_layout Subsection
6195 Figure and Table Floats
6198 \begin_layout Standard
6199 LyX provides support for the necessary float environments
6201 figure, figure*, table
6207 , therefore we won't tell much about it here.
6214 Just remember that tables should be left-aligned.
6215 For that, select the table and change the alignment in
6220 dit\SpecialChar \menuseparator
6225 aragraph\InsetSpace ~
6229 \begin_layout Standard
6234 only one special thing: the figures with caption besides the figure.
6235 To create such a figure, you have to do the following:
6238 \begin_layout Enumerate
6239 Create a wide figure float:
6244 nsert\SpecialChar \menuseparator
6249 t\SpecialChar \menuseparator
6252 , then right click in the figure and select
6264 \begin_layout Enumerate
6265 Enter your caption text.
6268 \begin_layout Enumerate
6273 to move the cursor above the caption.
6276 \begin_layout Enumerate
6280 \begin_layout Enumerate
6281 Position the cursor behind the figure and insert a horizontal fill:
6286 nsert\SpecialChar \menuseparator
6294 \SpecialChar \menuseparator
6297 orizontal\InsetSpace ~
6303 \begin_layout Enumerate
6304 Switch to LaTeX mode:
6312 \begin_layout Enumerate
6322 Do not close the brace!
6325 \begin_layout Enumerate
6326 Position the cursor behind the caption text, switch to LaTeX mode and insert
6337 \begin_layout Standard
6338 Also, refer to the figures in the example paper.
6341 \begin_layout Subsection
6345 \begin_layout Standard
6346 For submission, the paper has to be formated in a special double-spacing
6348 For this purpose, you have to give the option
6352 to the documentclass.
6353 This must be done using the extra class options field in the
6358 ocument\SpecialChar \menuseparator
6366 Just enter the string
6373 \begin_layout Subsection
6377 \begin_layout Standard
6382 directory contains an example paper written with LyX.
6383 It is the example paper from the original macro package, translated to
6385 Use it for inspiration, and compare the original LaTeX code with LyX way
6389 \begin_layout Section
6393 \begin_layout Standard
6399 \begin_layout Subsection
6403 \begin_layout Standard
6404 AASTeX is a set of macros produced by the American Astronomical Society
6405 to facilitate electronic manuscript submission to the three journals they
6406 publish: the Astrophysical Journal (including the Letters and Supplement),
6407 the Astronomical Journal, and the Publications of the Astronomical Society
6409 LyX has proven to be an excellent tool for generating these documents,
6410 especially given its equation, citation, and figure handling capabilities.
6411 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
6412 is the version described here, or higher.
6413 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
6414 incompatible with LyX.
6415 The AASTeX package may be downloaded from the AASTeX Web site
6418 \begin_layout Standard
6419 \begin_inset VSpace medskip
6425 \begin_layout Standard
6427 \begin_inset LatexCommand \url{http://www.journals.uchicago.edu/AAS/AASTeX}
6434 \begin_layout Standard
6435 \begin_inset VSpace medskip
6441 \begin_layout Standard
6442 A complete user guide is contained in that package and you should familiarize
6443 yourself with it thoroughly before embarking on writing a paper in LyX.
6444 LyX will not reduce the need to figure out all the AASTeX commands, it
6445 will only reduce the drudgery of typing everything in.
6446 It is your responsibility to ensure that the final exported LaTeX document
6447 conforms completely to the requirements of the journal to which you are
6448 submitting your paper.
6451 \begin_layout Subsection
6452 Starting a New Paper
6455 \begin_layout Standard
6456 I strongly suggest that you start with the AASTeX template file.
6462 ile\SpecialChar \menuseparator
6469 , enter the new file name, then choose the
6474 This will show the most common fields found in a manuscript.
6475 Simply overwrite the existing text (including the brackets,
6479 ) with the correct information.
6480 Many of the AASTeX commands and environments can be implemented directly
6481 in LyX, but some cannot: most noticeably
6493 , which should stick out like a sore thumb if you actually just opened the
6495 For commands such as these, the LaTeX code must be entered directly and
6497 Such commands are referred to as ERT, or Evil Red Text.
6498 I tried to minimize the amount of ERT needed in an AASTeX document, but
6499 there is still a bit more required than any of us would like.
6502 \begin_layout Subsection
6503 Finishing Your Paper
6506 \begin_layout Standard
6507 When the paper is finished to your satisfaction and previews/prints correctly,
6509 \begin_inset Quotes eld
6513 \begin_inset Quotes erd
6516 actions which need to be done before you submit it to the journals.
6520 \begin_layout Enumerate
6521 Export your paper as a LaTeX file (
6526 ile\SpecialChar \menuseparator
6531 xport\SpecialChar \menuseparator
6542 \begin_layout Enumerate
6547 file with your favorite text editor
6551 \begin_layout Enumerate
6552 remove the comment lines before the
6561 \begin_layout Enumerate
6566 usepackage...{fontenc}
6568 line if it appears (usually just after
6583 \begin_layout Enumerate
6584 remove everything between (and including) the
6596 commands, except for any commands you specifically put into the LaTeX preamble
6597 (which should appear immediately after the
6598 \begin_inset Quotes eld
6601 User specified LaTeX commands
6602 \begin_inset Quotes erd
6613 \begin_layout Enumerate
6614 Run the resulting file through LaTeX to make sure it still processes correctly.
6617 \begin_layout Enumerate
6618 Reread the journal requirements to make sure your filenames and formats
6622 \begin_layout Enumerate
6626 \begin_layout Subsection
6627 Comments On Specific Commands
6630 \begin_layout Standard
6631 I will not describe the detailed usage of the individual AASTeX commands:
6632 the AASTeX User Guide (
6636 ) gives a good description of each.
6637 Thus it's probably easiest for me to go down the list as found in the guide
6638 and offer comments where necessary.
6639 So let's begin \SpecialChar \ldots{}
6643 \begin_layout Subsubsection
6644 Things that work as expected
6647 \begin_layout Standard
6651 \begin_layout Standard
6663 \begin_layout Standard
6664 Because they work as you might expect, I simply list them and the section
6765 begin{thebibliography}
6773 (2.13.2), all the cite commands and their variations (2.13.2), the generic
6774 graphicx figure commands (2.14.1),
6798 (2.15.4, amongst other places),
6825 \begin_layout Standard
6826 The following style options also work correctly:
6847 Simply put them in the
6853 Layout\SpecialChar \menuseparator
6859 \begin_layout Standard
6863 \begin_layout Standard
6875 \begin_layout Subsubsection
6876 Things that work, but require more comment
6879 \begin_layout Standard
6880 The following items work, but require a little more discussion:
6883 \begin_layout Itemize
6884 These items are reserved for use by the journal editors, but you can put
6885 them into the LaTeX preamble if you feel compelled to do so:
6918 \begin_layout Itemize
6919 These items may be placed in the LaTeX preamble, and are included as blanks
6920 in the template file:
6941 \begin_layout Itemize
6948 (2.3) -- can only be used
6949 \begin_inset Quotes eld
6953 \begin_inset Quotes erd
6956 , not in the middle of a paragraph.
6957 Use ERT if you need to embed it.
6960 \begin_layout Itemize
6967 (2.3) -- will have extra {} after it.
6968 This should not cause an error.
6971 \begin_layout Itemize
6978 (2.6) -- can only be used
6979 \begin_inset Quotes eld
6983 \begin_inset Quotes erd
6986 , not in the middle of a paragraph.
6987 Use ERT if you need to embed it.
6990 \begin_layout Itemize
6997 (2.8) -- can't insert a cross-reference tag, you must type the tag name
7001 \begin_layout Itemize
7008 (2.8) -- same as for
7015 \begin_layout Itemize
7022 (2.9) -- will have extra {} after it.
7023 This should not cause an error.
7026 \begin_layout Itemize
7033 (2.11) -- will have extra {} after it.
7034 This should not cause an error.
7037 \begin_layout Itemize
7044 (2.14.2) -- you can insert an optional filename argument by placing the cursor
7045 at the beginning of the text and selecting
7047 Insert\SpecialChar \menuseparator
7052 \begin_inset Quotes eld
7056 \begin_inset Quotes erd
7059 inserts an optional argument of the type needed by
7066 Hopefully it will be renamed someday.
7069 \begin_layout Itemize
7082 for the catalog ID optional parameter
7085 \begin_layout Itemize
7098 for the catalog ID optional parameter
7101 \begin_layout Subsubsection
7102 Things not implemented, use ERT
7105 \begin_layout Standard
7109 \begin_layout Standard
7121 \begin_layout Standard
7144 setcounter{equation}
7146 (2.12), Journal name abbreviations (2.13.4),
7182 (2.15.4, insert it as the first element in the lefthand cell after where
7184 Don't use any of LyX's rules in the table),
7196 (2.15.5), much of Misc (2.17, except
7247 \begin_layout Standard
7251 \begin_layout Standard
7263 \begin_layout Subsubsection
7264 Things that cannot be implemented
7267 \begin_layout Standard
7268 \SpecialChar \ldots{}
7269 at least in any meaningful sort of way, so I suggest ignoring them.
7270 They are the references environment (2.13.3), and the deluxetable environment
7272 If you really, really need to use deluxetable, I suggest editing it in
7273 a separate file with a text editor, then using
7278 nsert\SpecialChar \menuseparator
7286 to include it in your LyX document.
7291 file to see an example of this.
7294 \begin_layout Subsection
7295 FAQs, Tips, Tricks, and Other Ruminations
7298 \begin_layout Subsubsection
7299 Getting LyX and AASTeX to cooperate
7302 \begin_layout Standard
7303 It can be a bit tricky to get LyX to recognize a new layout and document
7305 When all else fails, do this:
7308 \begin_layout Enumerate
7309 Make certain that LaTeX can find AASTeX.
7310 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
7311 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
7318 \begin_layout Enumerate
7325 /usr/.../share/lyx/layouts
7334 \begin_layout Enumerate
7340 ools\SpecialChar \menuseparator
7347 in LyX, then restart LyX.
7350 \begin_layout Enumerate
7351 Open a regular new file, not from a template.
7352 Does AASTeX appear in the class list in
7357 ocument\SpecialChar \menuseparator
7367 \begin_layout Standard
7368 If you get a warning from an existing AASTeX document about not being able
7369 to find the AASTeX layout or a message about
7370 \begin_inset Quotes eld
7373 You should not mix title layouts with normal ones
7374 \begin_inset Quotes erd
7377 , things haven't been installed correctly.
7380 \begin_layout Subsubsection
7381 LaTeX error processing a table
7384 \begin_layout Standard
7385 LyX, by default, attempts to center the table caption/title.
7386 This seems to produce a bad interaction in AASTeX so you should click somewhere
7387 in the caption/title, then select
7392 dit\SpecialChar \menuseparator
7397 aragraph\InsetSpace ~
7412 This took care of it for me.
7415 \begin_layout Subsubsection
7417 \begin_inset LatexCommand \label{cite}
7424 \begin_layout Standard
7425 A couple of things: 1) I have noticed some funny spacing in the reference
7426 entries in the text.
7427 When you enter the bibliography item data, make sure their is
7431 space between the last author and the parenthesis setting off the year;
7446 2) Entering the references at all is not obvious.
7447 The easiest thing is to start typing your first reference at the end of
7448 the document, then mark it as type
7453 That will put a small gray box in front of what you just typed.
7454 Click on the box to fill in the rest of the information.
7455 For new references, go to the end of an existing reference and press return.
7456 That will create a new line with its own box, etc.
7459 \begin_layout Subsubsection
7463 \begin_layout Standard
7464 Even though AASTeX provides its own figure commands (
7470 , for example), I much prefer LaTeX's standard figure commands (with the
7479 commands as ERT into a Figure Float box if you desire, but I never
7480 have much luck getting the layout right.
7481 With the standard graphics, LyX will insert a
7485 usepackage{graphicx}
7487 command into the LaTeX preamble and handle the figures in the standard
7488 LaTeX2e way, interspersing the figures in the text.
7489 I believe ApJ accepts figures exactly this way now; AJ might still use
7491 \begin_inset Quotes eld
7494 stack everything at the end
7495 \begin_inset Quotes erd
7501 \begin_layout Subsubsection
7502 Things I could have done, but didn't
7505 \begin_layout Standard
7507 \begin_inset Quotes eld
7511 \begin_inset Quotes erd
7514 things I could have implemented, but chose not to.
7515 For instance, I saw no point in double-spacing the text in the LyX window,
7516 even though it is double-spaced in the paper manuscript.
7517 Also, I chose not to make separate layouts for the preprint and preprint2
7519 Since I assume you will spend most of your time in the plain manuscript
7520 mode anyway, I decided not to chew up more disk space with this.
7524 \begin_layout Subsection
7528 \begin_layout Standard
7529 Your mileage may vary.
7530 I've now had papers published by both ApJ and AJ that have had 98% of the
7531 effort done in LyX; the last 2% was the LaTeX post-processing and a few
7533 I have had no trouble with the submission process, and I'm sure the journals
7534 were never aware that there might be a difference.
7535 So, go forth and publish!
7538 \begin_layout Section
7542 \begin_layout Standard
7545 Panayotis Papasotiriou
7548 \begin_layout Subsection
7552 \begin_layout Standard
7553 The ijmpc package is a set of macros that facilitates electronic manuscript
7556 International Journal of Modern Physics C
7559 Similarly, the ijmpd package is for creating manuscripts to be submitted
7562 International Journal of Modern Physics D
7565 Both journals are published by World Scientific.
7566 The corresponding document classes are named
7575 These files, together with instructions for the authors, can be downloaded
7577 \begin_inset LatexCommand \url{http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml}
7582 \begin_inset LatexCommand \url{http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml}
7587 Both packages are modified versions of the standard
7588 \begin_inset Quotes eld
7592 \begin_inset Quotes erd
7595 package, and they are almost (but not exactly) identical.
7596 Most of their features are supported by LyX.
7597 I have used LyX successfully to write articles submitted to both journals
7598 without any problem.
7601 \begin_layout Subsection
7605 \begin_layout Standard
7606 As usual, the easiest way to write a paper is to start with a template.
7612 ile\SpecialChar \menuseparator
7628 This will give an (almost) empty document that includes the most common
7629 fields found in a manuscript.
7630 Simply overwrite the existing text (including the brackets,
7635 You should keep in mind the following remarks.
7638 \begin_layout Enumerate
7639 LyX won't let you change the font size and the page style of the document,
7640 because such modifications are not allowed by both packages.
7643 \begin_layout Enumerate
7644 The language of the document should not be changed.
7645 Before previewing your paper, be sure that the babel package is not used.
7646 To do this, click on
7651 ools\SpecialChar \menuseparator
7669 checkbox in the language settings, and click on
7680 , if you wish to make this change permanent).
7683 \begin_layout Enumerate
7685 \begin_inset Quotes eld
7689 \begin_inset Quotes erd
7692 style must be used to define keywords.
7695 \begin_layout Enumerate
7696 The ijmpc package provides a style named
7697 \begin_inset Quotes eld
7700 Classification Codes
7701 \begin_inset Quotes erd
7704 , which can be used to define classification codes, such as PACS numbers.
7705 Note that this facility is not supported by the ijmpd package.
7708 \begin_layout Enumerate
7709 Several new environments are available:
7710 \begin_inset Quotes eld
7714 \begin_inset Quotes erd
7718 \begin_inset Quotes eld
7722 \begin_inset Quotes erd
7726 \begin_inset Quotes eld
7730 \begin_inset Quotes erd
7734 \begin_inset Quotes eld
7738 \begin_inset Quotes erd
7742 \begin_inset Quotes eld
7746 \begin_inset Quotes erd
7750 \begin_inset Quotes eld
7754 \begin_inset Quotes erd
7758 \begin_inset Quotes eld
7762 \begin_inset Quotes erd
7766 \begin_inset Quotes eld
7770 \begin_inset Quotes erd
7774 \begin_inset Quotes eld
7778 \begin_inset Quotes erd
7782 \begin_inset Quotes eld
7786 \begin_inset Quotes erd
7790 \begin_inset Quotes eld
7794 \begin_inset Quotes erd
7798 \begin_inset Quotes eld
7802 \begin_inset Quotes erd
7806 \begin_inset Quotes eld
7810 \begin_inset Quotes erd
7814 \begin_inset Quotes eld
7818 \begin_inset Quotes erd
7822 Their use is more or less obvious.
7823 LyX supports all these environments; it will use the proper label, text
7824 style, and numbering scheme for each of them.
7827 \begin_layout Enumerate
7828 Both packages use basic citations; the natbib package should not be used.
7829 In LyX, citation references are shown as usual; in the output, citations
7830 are shown as superscripts.
7831 If you want to use a citation as normal text, you should use the
7836 \begin_inset Quotes eld
7839 See Ref.\InsetSpace ~
7847 \begin_inset Quotes erd
7853 \begin_layout Enumerate
7855 \begin_inset Quotes eld
7859 \begin_inset Quotes erd
7862 section in both packages.
7863 To put acknowledgments, just use the
7864 \begin_inset Quotes eld
7868 \begin_inset Quotes erd
7874 \begin_layout Enumerate
7875 Appendices may be added to the paper,
7879 the Acknowledgments and
7884 LyX provides a special environment, called
7885 \begin_inset Quotes eld
7889 \begin_inset Quotes erd
7892 which marks the beginning of the appendices.
7893 This environment should be left blank; it just sends a LaTeX command, but
7894 nothing is really printed.
7896 \begin_inset Quotes eld
7900 \begin_inset Quotes erd
7903 is printed with blue letters, as a signal that all sections after that
7904 point are appendices.
7905 To write an appendix, use the
7906 \begin_inset Quotes eld
7910 \begin_inset Quotes erd
7914 LyX will number each appendix with capital letters, as required by both
7917 \begin_inset Quotes eld
7921 \begin_inset Quotes erd
7928 be present before the first appendix; if not, all appendices will be numbered
7929 as normal sections in the output.
7932 \begin_layout Enumerate
7933 The ijmpc and the ijmpd packages use the
7937 command to implement table captions.
7938 As a result, a table created by LyX is printed correctly, but its caption
7940 However, you can use some ERT to overpass this problem, so that captions
7941 are printed as expected.
7942 To do so, create a float table as usual, remove the caption, and replace
7953 (sic); you must also the ERT
7957 immediately after the tabular material.
7958 Study the example table included in the template files to see how this
7959 trick is implemented.
7960 Alternatively, If you need table captions, you should implement the whole
7965 file, then include this file to the LyX document (
7970 nsert\SpecialChar \menuseparator
7975 \SpecialChar \menuseparator
7984 Details on how to create a table float can be found in the files
7992 , included in the corresponding packages.
7995 \begin_layout Subsection
7996 Preparing a paper for submission
7999 \begin_layout Standard
8000 Before you submit your paper you must export the LyX document as a LaTeX
8006 ile\SpecialChar \menuseparator
8011 xport\SpecialChar \menuseparator
8018 ), then make the following changes to the resulting
8025 \begin_layout Enumerate
8026 Remove the comment lines before the
8035 \begin_layout Enumerate
8036 Remove everything between (and including) the
8048 commands, except for any commands you specifically put into the LaTeX preamble.
8051 \begin_layout Standard
8056 file should be saved and processed through LaTeX as many times as necessary.
8057 You may also want to check the resulting
8064 \begin_layout Subsection
8068 \begin_layout Standard
8069 The use of ERT is reduced to two commands, which must be placed at the top
8071 If you started writing your paper by using the
8079 template, the ERT needed is already in its place; you usually don't need
8081 You may only modify the first ERT to specify the information printed to
8082 the top of odd and even pages (authors' names and short paper's title,
8084 This ERT must have the form
8088 markboth{Authors' Names}{Short Paper's Title}
8093 \begin_layout Section
8097 \begin_layout Standard
8100 Panayotis Papasotiriou
8103 \begin_layout Subsection
8107 \begin_layout Standard
8108 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
8109 that facilitates electronic manuscript submission to the journals they
8111 Most known of them (at least in my domain of interest) are
8113 Astrophysics and Space Science
8119 , but there are many others (see a complete list at
8120 \begin_inset LatexCommand \url{http://www.wkap.nl/jrnllist.htm/JRNLHOME}
8125 The Kluwer package may be downloaded from the site
8126 \begin_inset LatexCommand \url{http://www.wkap.nl/kaphtml.htm/STYLEFILES}
8131 A complete user guide is contained in that package (but it can also be
8132 downloaded separately).
8135 \begin_layout Standard
8136 LyX supports many features of the package but not everything.
8137 However, the ERT needed is reduced to some
8138 \begin_inset Quotes eld
8142 \begin_inset Quotes erd
8145 commands of the package (see\InsetSpace ~
8147 \begin_inset LatexCommand \ref{subsec:kluwer_peculiarities}
8152 I have recently used LyX to write an article submitted to the
8154 Astrophysics and Space Science
8156 without any problem.
8159 \begin_layout Subsection
8163 \begin_layout Standard
8164 The easiest way to write a paper is to start with the Kluwer template file.
8167 File\SpecialChar \menuseparator
8179 This will give an (almost) empty document that includes the most common
8180 fields found in a manuscript and a short description of their use.
8181 As in most templates, simply overwrite the existing text (including the
8186 ) with the correct information.
8189 \begin_layout Subsection
8190 Preparing a paper for submission
8193 \begin_layout Standard
8194 As in the AASTeX package, before you submit your paper to a journal you
8196 \begin_inset Quotes eld
8200 \begin_inset Quotes erd
8206 \begin_layout Enumerate
8207 Export your paper as a LaTeX file.
8208 To do this, click on
8213 ile\SpecialChar \menuseparator
8218 xport\SpecialChar \menuseparator
8229 \begin_layout Enumerate
8234 file with a text editor and make the following changes
8238 \begin_layout Enumerate
8239 remove the comment lines before the
8248 \begin_layout Enumerate
8249 remove everything between (and including) the
8261 commands, except for any commands you specifically put into the LaTeX preamble.
8264 \begin_layout Standard
8273 \begin_layout Enumerate
8278 file through LaTeX as many times as necessary (usually up to three).
8281 \begin_layout Enumerate
8286 document using, e.g.,
8290 , and check if everything is ok (it should, if you didn't make any mistake).
8293 \begin_layout Subsection
8294 \begin_inset Quotes eld
8298 \begin_inset Quotes erd
8301 of the Kluwer package
8302 \begin_inset LatexCommand \label{subsec:kluwer_peculiarities}
8309 \begin_layout Standard
8310 The Kluwer package has the following
8311 \begin_inset Quotes eld
8315 \begin_inset Quotes erd
8321 \begin_layout Enumerate
8322 It is possible to write multiple articles in the same LaTeX file
8326 \begin_layout Standard
8327 I can't imagine any good reason to do this.
8333 Each article must be included in the environment
8334 \begin_inset Quotes eld
8338 \begin_inset Quotes erd
8342 Unfortunately, this environment cannot be omitted, even if you write just
8344 Therefore, each article starts with the command
8350 and, obviously, ends with the command
8357 Although this can be implemented in LyX, I didn't included it, since it
8358 looks ugly and can confuse the novice user.
8359 Therefore, you need to enter them directly and mark them as LaTeX code
8361 \begin_inset Quotes eld
8365 \begin_inset Quotes erd
8371 \begin_layout Enumerate
8372 Information given at the beginning of the article (i.e., title, subtitle,
8373 author, institution, running title, running author, abstract and keywords)
8374 must be included in an environment called
8375 \begin_inset Quotes eld
8379 \begin_inset Quotes erd
8383 This is not implemented in LyX, so you must enter title, subtitle etc.
8384 between two ERT lines (
8399 \begin_layout Enumerate
8400 According to the user manual, the label of each bibliography item must be
8424 \begin_layout Standard
8429 template takes care of all these
8430 \begin_inset Quotes eld
8434 \begin_inset Quotes erd
8438 If you start a new paper using this template you don't need to do anything
8443 \begin_layout Enumerate
8444 don't delete the ERT included in the template, and
8447 \begin_layout Enumerate
8448 copy the example bibliography item included in the template and modify it
8449 as necessary to enter new bibliography items.
8452 \begin_layout Section
8456 \begin_layout Standard
8462 \begin_layout Subsection
8466 \begin_layout Standard
8467 The LyX document classes
8469 article (koma-script)
8473 report (koma-script)
8491 correspond to the LaTeX document classes
8508 of the Koma-Script family.
8509 They are replacements for the standard document classes
8525 , resp., and fit better to European typography conventions in a number of
8529 \begin_layout Itemize
8530 Standard character size is 11pt in
8532 article (koma-script)
8536 report (koma-script)
8544 letter (koma-script)
8549 \begin_layout Itemize
8550 Headings, labels of the description environment, and a number of elements
8553 letter (koma-script)
8555 document class are set in a bold sans serif font.
8559 \begin_layout Standard
8560 There is a big difference between the bold sans serif old cm fonts and new
8561 ec fonts, especially in the appearance of headings.
8562 In comparison, the ec bold sans serif fonts look a bit thin.
8563 Here the LaTeX package
8570 helps to produce the
8571 \begin_inset Quotes eld
8575 \begin_inset Quotes erd
8578 appearance when using the ec fonts.
8583 The numbering of chapter headings is made in the same way as the numbering
8584 of section headings, that is without the extra line
8585 \begin_inset Quotes eld
8588 Chapter\SpecialChar \ldots{}
8590 \begin_inset Quotes erd
8594 In addition, the appearance of the headings can be modified by using a
8595 number of options (in LyX to be entered in the field
8609 ayout\SpecialChar \menuseparator
8617 A detailed German description of these options can be found in the Koma-Script
8625 \begin_layout Itemize
8626 The main means in the Koma-Script document classes to design the type area
8635 (in LyX to be entered in the extra class options field in the dialog
8640 ocument\SpecialChar \menuseparator
8648 They make a clearer modification of page margins possible as do the options
8654 ocument\SpecialChar \menuseparator
8662 A detailed German description of these and other type area options can
8663 be found in the Koma-Script documentation
8670 \begin_layout Itemize
8671 The LaTeX document classes of the Koma-Script family define a number of
8672 additional commands.
8673 Those part of it which makes sense in LyX is implemented in corresponding
8677 \begin_layout Standard
8678 A detailed German description of the LaTeX document classes of the Koma-Script
8679 family can be found in the Koma-Script documentation
8687 \begin_layout Standard
8688 There is an English translation
8692 , but it is not a complete one.
8697 The following sections describe only those aspects, which are relevant
8701 \begin_layout Subsection
8702 article (koma-script), report (koma-script), and book (koma-script)
8705 \begin_layout Standard
8706 The document classes
8708 article (koma-script)
8712 report (koma-script)
8722 are implemented in the layout files
8735 They contain all the paragraph types of the corresponding standard document
8748 , resp., partly modified, with the exception of the LyX specific
8752 -type, which is replaced by the new
8756 -type having the same functionality.
8761 -Type there is a number of new paragraph types added.
8768 letter (koma-script)
8773 \begin_layout Itemize
8782 : are equivalents to
8790 , resp., additionally inserting an entry in the table of contents.
8799 are not contained in
8801 article (koma-script)
8806 \begin_layout Itemize
8823 , resp., additionally clearing running heads.
8830 article (koma-script)
8836 \begin_layout Standard
8849 report (koma-script)
8851 , but since this is identical to
8855 , is has not been implemented in LyX.
8863 \begin_layout Itemize
8868 : generates a heading directly above the following paragraph in the standard
8869 character size without affecting the structure of the document.
8872 \begin_layout Itemize
8881 are special captions which respect the different space settings needed for
8882 captions placed above or below an element (if you follow strict typographic
8883 rules, you might want to place table captions always above the table).
8884 You can also use the class option
8901 You need at least Koma-Script version 2.8q to use this.
8904 \begin_layout Itemize
8909 : can be used to set a bonmot, e.
8913 \begin_layout Standard
8926 \begin_layout Standard
8935 at the beginning of a chapter.
8936 If you use the optional argument (
8941 nsert\SpecialChar \menuseparator
8945 ), you can insert the dictum's author there.
8946 Dictum and author are separated by a line.
8947 You need at least Koma-Script version 2.8q to use this.
8954 article (koma-script)
8959 \begin_layout Standard
8960 The following types, together with the standard types
8972 , form the title area of the document.
8973 They must be entered ahead of the first
8974 \begin_inset Quotes eld
8978 \begin_inset Quotes erd
8985 \begin_layout Standard
8986 The corresponding LaTeX commands must appear before the
8997 When such a type is used more than once, the latter usage overwrites the
8998 former one, that means, for every type only the latest usage is valid.
8999 The order of the different types however has, like
9011 , no effect on the appearance of the produced document.
9014 \begin_layout Itemize
9019 : produces a centered paragraph above the ordinary title (
9031 ) for the subject of the document.
9034 \begin_layout Itemize
9039 : produces a centered paragraph below the ordinary title (
9051 ) for the publishers' name.
9054 \begin_layout Itemize
9061 report (koma-script)
9067 produces a centered paragraph on its own page behind the title page, or
9070 article (koma-script)
9072 produces a centered paragraph below the ordinary title (
9091 \begin_layout Itemize
9096 : produces a left aligned paragraph above the ordinary title (
9112 ) for a document`s head.
9115 \begin_layout Itemize
9120 : produces in a double-sided print in
9122 report (koma-script)
9128 a left-aligned paragraph at the top of the title page`s back or has no
9129 effect in a single-sided print or in
9131 article (koma-script)
9136 \begin_layout Itemize
9141 : produces in a double-sided print in
9143 report (koma-script)
9149 a left-aligned paragraph at the bottom of the title page`s back or has
9150 no effect in a single-sided print or in
9152 article (koma-script)
9157 \begin_layout Itemize
9162 : produces a special
9163 \begin_inset Quotes eld
9167 \begin_inset Quotes erd
9170 page ahead of the actual document containing a paragraph without special
9174 \begin_layout Standard
9175 The layout files for the document classes
9177 article (koma-script)
9181 report (koma-script)
9192 This is thought of as a place to define your own types.
9197 in your personal layout directory and edit the file!
9200 \begin_layout Subsection
9201 letter (koma-script)
9204 \begin_layout Standard
9208 \begin_layout Standard
9220 \begin_layout Standard
9224 letter (koma-script)
9226 is implemented in the layout file
9231 It contains all the paragraph types of the corresponding standard document
9236 , partly modified, with the exception of the LyX specific types
9248 type, which is replaced by the new
9253 In addition, it contains, in contrast to the standard document class, the
9271 Furthermore, there are a number of new letter specific types.
9274 \begin_layout Standard
9278 \begin_layout Standard
9290 \begin_layout Standard
9291 The appearance of the letter produced by this document class can be controlled
9292 by a number of LaTeX commands, which you can put in the LaTeX preamble.
9296 \begin_layout Standard
9297 For example, the standard appearance of the letter`s heading, consisting
9298 of name and address, is quite self-willed.
9300 \begin_inset Quotes eld
9304 \begin_inset Quotes erd
9307 heading is produced by the following LaTeX commands in the preamble:
9310 \begin_layout LyX-Code
9320 \begin_layout LyX-Code
9336 \begin_layout LyX-Code
9346 \begin_layout LyX-Code
9366 A detailed German description of such LaTeX commands can be found in the
9367 Koma-Script documentation
9372 With it, the letter's author can produce his personal letter layout.
9375 \begin_layout Standard
9384 define the beginning of the letter and must be used in every letter.
9385 To emphasize them in the LyX document class, they are marked with the letter
9396 It is possible to write any number of letters in one file.
9401 type produces a new letter using the same addressee and a
9405 type produces a new addressee.
9422 are ordinary paragraph types and can also be used several times in one
9423 and the same letter.
9426 \begin_layout Itemize
9431 : produces a paragraph for the addressee and implicitly defines the beginning
9435 \begin_layout Itemize
9440 : produces a paragraph for the form of address and implicitly produces a
9444 \begin_layout Itemize
9449 : produces a paragraph for a close.
9452 \begin_layout Itemize
9457 : produces a paragraph for a postscript.
9460 \begin_layout Itemize
9465 : produces a paragraph for a distribution list.
9468 \begin_layout Itemize
9473 : produces a paragraph for enclosures.
9476 \begin_layout Standard
9517 are input types provided with a label to enter information, which will
9518 be processed by the document class.
9522 \begin_layout Standard
9523 It could be seen as a matter of inconsequence, that the types
9531 described above are not such input types as well.
9532 Because of the special meaning of those types, however, I have implemented
9533 them as ordinary paragraph types with a one letter mark in the left margin.
9534 Moreover, it would affect my feeling of symmetry, if the
9542 type had such a serious different appearance.
9547 The types must be used ahead of the corresponding
9554 \begin_layout Standard
9555 An implementation of these types in a WYSIWYG fashion does not seem to make
9556 sense, because the real appearance of the produced letter does not only
9557 depend on the usage of the particular type, but also on other factors.
9558 For example, a signature entered in the
9562 type will in the standard behavior appear in the produced letter only,
9563 when in the same letter also a
9568 The entered value of the
9572 type will in the standard behavior not appear in the produced letter at
9574 The possibility to design the letter`s heading freely is already indicated
9575 in a footnote above.
9578 \begin_layout Standard
9579 The input types can also be used as empty paragraphs.
9580 This makes sense e.\InsetSpace ~
9591 type is not used at all, in the standard behavior the value of the
9595 type is used as signature, whereas if an empty
9599 type is used, no signature value is defined.
9602 \begin_layout Standard
9603 By using the input types it is possible to write a letter template, containing
9604 filled input types with your personal dates (name, address, etc.) and empty
9605 input types for other dates you want to enter.
9608 \begin_layout Itemize
9613 : sender's name, in the standard behavior appears as a centered paragraph
9614 in small caps in the letter`s heading.
9617 \begin_layout Itemize
9622 : sender's signature, in the standard behavior appears below the
9631 type is used, the value of the
9635 type appears instead.
9638 \begin_layout Itemize
9643 : sender's address, in the standard behavior appears in a centered paragraph
9644 in the letter`s heading below the sender's name.
9647 \begin_layout Itemize
9652 : sender's telephone number, in the standard behavior only sets the LaTeX
9662 \begin_layout Itemize
9667 : place of the letter`s making.
9670 \begin_layout Itemize
9675 : date of the letter`s making.
9684 , in the standard behavior, produce the place and the date in a right-aligned
9685 line below the addressee's field.
9690 type is used, neither place nor date appear, independent of the value of
9700 type is used, the date of the letter `s production is used.
9703 \begin_layout Itemize
9708 : sender`s back address, in the standard behavior appears above the addressee's
9709 field in a small sans serif font.
9712 \begin_layout Itemize
9717 : special mail information, in the standard behavior appears underlined
9718 above the addressee's field below the back address.
9721 \begin_layout Itemize
9726 : additional information, in the standard behavior appears on right side
9727 below the addressee`s field.
9730 \begin_layout Itemize
9735 : the letter's title, in the standard behavior appears in a big, bold, sans
9736 serif font above the subject.
9739 \begin_layout Itemize
9744 : the letter's subject, in the standard behavior appears in a bold font
9752 \begin_layout Standard
9773 produce a business letter like line above the
9777 line containing the fields
9778 \begin_inset Quotes eld
9782 \begin_inset Quotes erd
9786 \begin_inset Quotes eld
9790 \begin_inset Quotes erd
9794 \begin_inset Quotes eld
9798 \begin_inset Quotes erd
9802 \begin_inset Quotes eld
9806 \begin_inset Quotes erd
9810 \begin_inset Quotes eld
9814 \begin_inset Quotes erd
9818 \begin_inset Quotes eld
9822 \begin_inset Quotes erd
9826 For the date field, the value of the
9832 \begin_inset Quotes eld
9835 business letter types
9836 \begin_inset Quotes erd
9839 is used, the value of the
9843 type however does not appear, but only the LaTeX variable
9850 The ordinary output of place and date in a right-aligned line below the
9851 addressee`s field is suppressed.
9852 The types are implemented as input types provided with a label and must
9853 be used ahead of the corresponding
9860 \begin_layout Itemize
9868 \begin_layout Itemize
9876 \begin_layout Itemize
9884 \begin_layout Itemize
9892 \begin_layout Itemize
9900 \begin_layout Subsection
9901 The new letter class: letter (koma-script v.2)
9904 \begin_layout Standard
9907 Jürgen Spitzmüller
9910 \begin_layout Standard
9911 \begin_inset VSpace medskip
9917 \begin_layout Standard
9919 Koma-Script version 2.8 has introduced a new letter class
9923 which superceeds the now unsupported
9928 It has --- on the LaTeX side --- a completely new interface and is not
9929 compatible with the old class.
9930 Therefore, LyX supports both, though it is recommended to use the new class.
9933 \begin_layout Standard
9934 This class covers the same functionality as
9936 letter (koma-script),
9943 (receiver's address, same as
9960 will start a new letter (i.
9964 \begin_layout Standard
9977 \begin_layout Standard
9986 you can write several letters per document).
9987 New elements are sender's
10003 and the possibility to use a
10012 nsert\SpecialChar \menuseparator
10022 \begin_layout Standard
10023 The biggest improvement is, though, that the letter's layout is configurable
10024 at almost any needs.
10025 This can be done via the preamble or with a special style file (Letter
10026 Class Option, extension
10030 ), that will be read in as a class option.
10034 \begin_layout Standard
10035 The KOMA package comes with some default
10040 There is, for instance, a
10044 file that follows german typesetting rules, or a
10048 that provides the default layout of the old
10053 The latter can be loaded with the class option
10062 ayout\SpecialChar \menuseparator
10067 ocument\SpecialChar \menuseparator
10079 template that is included in LyX for examples.
10080 A detailed description is to be found in the Koma-Script documentation
10088 \begin_layout Subsection
10092 \begin_layout Standard
10093 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
10097 \begin_layout Itemize
10098 The chapter number of a
10102 type appears on a line of its own above the chapter heading instead of
10103 appearing in the same line ahead of it.
10104 The cause for that is the LyX internal behavior for the labeltype
10108 in the layout file.
10111 \begin_layout Itemize
10112 The headings of the types
10120 are only put in the
10121 \begin_inset Quotes eld
10125 \begin_inset Quotes erd
10128 LaTeX table of contents, but not in the LyX table of contents (
10133 ocument\SpecialChar \menuseparator
10145 \begin_layout Itemize
10146 The paragraphs in a
10150 document class appear in a skip separation mode, not indented.
10151 This is the standard behavior, no special LaTeX commands are needed for
10158 ocument\SpecialChar \menuseparator
10165 dialog the corresponding radio button indicates
10181 value always has the effect that extra LaTeX commands are inserted in the
10182 document to produce the gap, which is not what is wanted in this case.
10185 \begin_layout Section
10186 Springer Journals (
10193 \begin_layout Standard
10199 \begin_layout Subsection
10203 \begin_layout Standard
10204 These are the layout files for some of the journal formats used by Springer
10205 Verlag and listed on
10206 \begin_inset LatexCommand \url{http://www.springer.de/author/tex/help-journals.html}
10210 , where you should also go to fetch the class files (yes, these are LaTeX2e
10212 It is a modular system: the things common to all journals are implemented
10217 , which journal-specific layout files (such as, e.g.,
10221 for Journal of Geodesy) can include.
10224 \begin_layout Standard
10225 This means that implementing support for any other Springer journal on this
10226 list is as simple as writing your own
10234 file following the outline given in
10242 \begin_layout Standard
10243 It is reasonably well tested only for the Journal of Geodesy.
10252 come with the standard LyX distribution.
10253 Install the relevant class file (downloaded from Springer) in a proper
10254 directory, reconfigure LaTeX (in the teTeX case by running
10258 , as root if necessary --- doesn't LyX take care of this?), reconfigure
10259 LyX and it should work.
10262 \begin_layout Subsection
10266 \begin_layout Standard
10267 A large number of theorem-like styles ---
10273 \SpecialChar \ldots{}
10279 \begin_layout Standard
10282 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
10283 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
10286 See the Springer class file documentation for details.
10289 \begin_layout Subsection
10293 \begin_layout Itemize
10305 \begin_layout Itemize
10308 Probability Theory and Related Fields
10314 --- Jean-Marc Lasgouttes
10317 \begin_layout Standard
10318 Add your own, it isn't so hard!
10321 \begin_layout Subsection
10325 \begin_layout Standard
10326 These files are partly based on the older
10330 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
10331 file from Springer.
10336 layout, are now defunct.
10337 Jean-Marc Lasgouttes helped out big in making me find my way around the
10338 LyX layout file mechanism.
10341 \begin_layout Subsection
10345 \begin_layout Standard
10347 But probably less than in the old hacked-LaTeX
10354 \begin_layout Standard
10355 Limitations e.g.: does not display the number for theorem-like layouts, just
10359 \begin_layout Section
10367 \begin_layout Standard
10373 \begin_layout Subsection
10377 \begin_layout Standard
10378 These are the layout files for some of the journals of the American Geophysical
10380 It is assumed that you have both the AGU's own class files and AGUplus
10381 installed (everything to be found at
10382 \begin_inset LatexCommand \url{ftp://ftp.agu.org/journals/latex/journals}
10389 \begin_layout Subsection
10393 \begin_layout Standard
10403 They are still called this in the LyX GUI, though their LaTeX equivalents
10404 in the AGU classes are
10415 \begin_layout Standard
10416 Newly defined styles are
10453 These are mostly manuscript attributes and defined in the AGU class documentati
10457 \begin_layout Standard
10458 I suspect this is still badly incomplete.
10461 \begin_layout Subsection
10465 \begin_layout Standard
10482 \begin_layout Subsection
10486 \begin_layout Itemize
10489 Journal of Geophysical Research
10498 \begin_layout Standard
10499 Add your own, it isn't so hard! Look at the
10510 \begin_layout Subsection
10511 Bugs and things to remember
10514 \begin_layout Standard
10515 In order to use the new layouts, you must remember to do the following for
10519 \begin_layout Enumerate
10525 This can be done in the
10527 layout\SpecialChar \menuseparator
10532 document\SpecialChar \menuseparator
10536 (AGU articles are always in English, right? So
10540 choose a language.)
10543 \begin_layout Enumerate
10548 into the document's
10553 (Yes, this is a bug.)
10556 \begin_layout Enumerate
10557 Make sure you use the
10561 bibliography style, by entering
10565 into the second field of the BibTeX inset.
10566 None of the standard styles will do.
10569 \begin_layout Section
10577 \begin_layout Standard
10583 \begin_layout Subsection
10587 \begin_layout Standard
10588 This is the layout file for the European Geophysical Society journals.
10593 can be downloaded from the web site of the EGS under
10594 \begin_inset LatexCommand \url{www.copernicus.org}
10601 \begin_layout Subsection
10605 \begin_layout Standard
10608 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
10616 The current layout file is unfortunately very unmodular and would benefit
10617 from using the various
10624 \begin_layout Section
10630 \begin_inset LatexCommand \label{sec:slitex}
10637 \begin_layout Standard
10645 \begin_layout Subsection
10649 \begin_layout Standard
10650 This section describes how to use LyX to make slides for overhead projectors.
10651 There are two document classes that can do this: the default slides class
10657 This section documents the former.
10660 \begin_layout Standard
10661 I'm going to say this again, nice and clear, so that there's no misunderstanding
10665 \begin_layout Standard
10666 \begin_inset VSpace bigskip
10672 \begin_layout Standard
10676 This section documents the class
10677 \begin_inset Quotes eld
10685 \begin_inset Quotes erd
10693 \begin_layout Standard
10694 \begin_inset VSpace bigskip
10700 \begin_layout Standard
10701 If you're looking for the documentation for
10702 \begin_inset Quotes eld
10710 \begin_inset Quotes erd
10713 , check out section\InsetSpace ~
10715 \begin_inset LatexCommand \ref{sec:foiltex}
10725 \begin_inset Quotes eld
10733 \begin_inset Quotes erd
10736 ] is actually somewhat better than the default
10744 \begin_layout Standard
10745 \SpecialChar \ldots{}
10746 or so I've been told repeatedly by its advocates.
10747 Having never used it, I have no idea if this claim is true or not.
10752 which this section documents.
10755 \begin_layout Standard
10756 This class is the LaTeX2e improvement of the old
10761 Every LaTeX2e distribution includes this class [which I'll just refer to
10763 \begin_inset Quotes eld
10771 \begin_inset Quotes erd
10774 from now on], so you're bound to have it.
10775 As I noted earlier, there are other classes, such as
10779 , which also produce slides for overhead projectors and do a better job
10781 However, there are some things which
10785 can do which the others can't, such as generate overlays.
10786 Read on to learn more!
10789 \begin_layout Subsection
10791 \begin_inset LatexCommand \label{sec:slidesetup}
10798 \begin_layout Standard
10799 Obviously, to use this document class, you need to select
10800 \begin_inset Quotes eld
10808 \begin_inset Quotes erd
10811 from the class list in the
10816 ocument\SpecialChar \menuseparator
10824 There are some other special things you should know about this class:
10827 \begin_layout Itemize
10828 Don't bother changing the options
10833 They're not supported by the
10840 \begin_layout Itemize
10849 behaves a bit differently for this class.
10850 The possible choices and what they do are as follows:
10854 \begin_layout Description
10859 The final output contains page numbers in the lower right corner.
10862 \begin_layout Description
10871 , but also prints out any time markers you've put in.
10872 This is the default.
10875 \begin_layout Description
10880 The final output contains no page numbers, time markers, or alignment markers.
10884 \begin_layout Itemize
10889 class has an extra option:
10895 \begin_inset Quotes eld
10903 \begin_inset Quotes erd
10906 in the extra class options.
10910 \begin_layout Standard
10911 Using this options allows you to add time markers to
10916 See section\InsetSpace ~
10918 \begin_inset LatexCommand \ref{sec:slideNote}
10926 \begin_layout Standard
10927 You can also use the template file
10928 \begin_inset Quotes eld
10936 \begin_inset Quotes erd
10939 to automatically set up a document to use the
10948 ile\SpecialChar \menuseparator
10957 to open your new document].
10958 The template file also contains some examples of the special paragraph
10959 environments used by this class.
10960 I'll describe those next.
10963 \begin_layout Subsection
10964 Paragraph Environments
10967 \begin_layout Subsubsection
10968 Supported Environments
10971 \begin_layout Standard
10972 The first thing you'll notice when you start up a new
10976 document is the font size and type: it's the equivalent of the size
10977 \begin_inset Quotes eld
10985 \begin_inset Quotes erd
10994 This is also what's used in the output.
10996 \begin_inset Quotes eld
11000 \begin_inset Quotes erd
11003 to remind you that this is a slide.
11004 Your final slides will use a larger font; ergo, you'll have less space.
11005 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
11008 \begin_layout Standard
11009 The next thing that becomes obvious is the changes to the paragraph environment
11010 pull-down box [at the far-left end of the toolbar].
11011 Most of the paragraph environments you're used to seeing are missing.
11012 There are also five new ones.
11017 class itself only supports certain paragraph environments:
11020 \begin_layout Itemize
11026 \begin_layout Itemize
11032 \begin_layout Itemize
11038 \begin_layout Itemize
11044 \begin_layout Itemize
11050 \begin_layout Itemize
11056 \begin_layout Itemize
11062 \begin_layout Itemize
11068 \begin_layout Itemize
11074 \begin_layout Itemize
11080 \begin_layout Itemize
11086 \begin_layout Standard
11087 All of the other standard environments, including the section-heading environmen
11088 ts, aren't used in the
11095 \begin_layout Standard
11096 On the other hand, you'll notice the following new environments:
11099 \begin_layout Itemize
11105 \begin_layout Itemize
11111 \begin_layout Itemize
11117 \begin_layout Itemize
11123 \begin_layout Itemize
11129 \begin_layout Standard
11130 These five are kind of quirky, due to a
11131 \begin_inset Quotes eld
11135 \begin_inset Quotes erd
11139 You see, LyX doesn't permit you to nest any other paragraph environment
11140 into an empty environment.
11141 Now, that's fine and dandy, but it means that you wouldn't be able to start
11142 a slide with anything except plain text.
11143 To deal with this, I've performed a little
11144 \begin_inset Quotes eld
11148 \begin_inset Quotes erd
11154 \begin_layout Subsubsection
11155 Quirks of the New Environments
11156 \begin_inset LatexCommand \label{sec:slideQuirk}
11163 \begin_layout Standard
11164 All five of the new paragraph environments are somewhat quirky due to inherent
11165 limitiations in the current version of LyX.
11166 As I just mentioned, LyX forbids environments that begin with another environme
11168 To get around this, the
11172 environment isn't a paragraph environment as described in the
11180 \begin_layout Standard
11181 You should consider
11194 \begin_inset Quotes eld
11197 pseudo-environments.
11198 \begin_inset Quotes erd
11201 They look like a section heading or a
11202 \begin_inset Quotes eld
11210 \begin_inset Quotes erd
11213 but really begin a [and, if necessary, end the previous] paragraph environment.
11223 \begin_inset Quotes eld
11227 \begin_inset Quotes erd
11230 These two perform some action.
11233 \begin_layout Standard
11234 A common feature of all five environments,
11254 , is a rather long-ish label.
11255 The text following this label --- ordinarily the contents of the paragraph
11256 environment --- is utterly irrelevant for
11277 LyX completely ignores it.
11278 In fact, you can leave these five environments completely empty.
11282 \begin_layout Standard
11287 to put any text after the rather long-ish label, you might want to.
11288 This could be a short description of the contents of the
11293 In that case, enter in your descriptive comment and hit
11297 as you normally would.
11300 \begin_layout Standard
11301 If, on the other hand, you don't want to enter in any descriptive text,
11302 you'll hit another LyX quirk.
11303 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
11304 environment until you put something in the old one.
11308 \begin_layout Itemize
11309 Start entering the text that will
11337 \begin_layout Itemize
11338 Now move to the beginning of that paragraph.
11342 \begin_layout Itemize
11351 \begin_layout Itemize
11352 Finally, change this new, empty paragraph to a
11376 \begin_layout Standard
11377 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
11381 \begin_layout Subsection
11382 Making a Presentation with
11395 \begin_layout Subsubsection
11403 \begin_layout Standard
11404 If you're expecting this section to teach you how to actually make a presentatio
11405 n, you'll be sorely disappointed.
11406 Naturally, I'll describe all of the ways the
11410 class can assist you in preparing the materials for a presentation.
11411 Filling in the contents, however, is up to you.
11416 the LyX philosophy.]
11419 \begin_layout Standard
11424 environment [in the manner described in section\InsetSpace ~
11426 \begin_inset LatexCommand \ref{sec:slideQuirk}
11430 ] tells LyX to begin a new slide [duh].
11431 The label for this environment/
11432 \begin_inset Quotes erd
11436 \begin_inset Quotes erd
11440 \begin_inset Quotes eld
11444 \begin_inset Quotes erd
11447 in cool blue, followed by the label,
11448 \begin_inset Quotes eld
11452 \begin_inset Quotes erd
11456 Any text or paragraph environments that follow this one go on the new slide.
11460 \begin_layout Standard
11461 Slides are probably the only time you'll need to forcibly end pages in LyX
11462 (this can be specified in the
11467 In fact, you'll want to, once you finish entering the contents of one slide.
11468 If you've entered more text than can physically fit on a slide, the extra
11469 overflows onto a new slide.
11470 I don't recommend doing this, however, since the overflow slide won't have
11471 any page number on it.
11472 Furthermore, it may interfere with any
11476 you've made to accompany the oversized
11483 \begin_layout Standard
11492 environments work the same way as the
11497 They both create an
11498 \begin_inset Quotes eld
11502 \begin_inset Quotes erd
11505 followed by a label [
11506 \begin_inset Quotes eld
11510 \begin_inset Quotes erd
11514 \begin_inset Quotes eld
11518 \begin_inset Quotes erd
11522 The color is a stunning magenta instead of blue, and the
11523 \begin_inset Quotes eld
11527 \begin_inset Quotes erd
11530 will look different, in style and in length.
11531 The label fonts of all three also differ from one another.
11534 \begin_layout Standard
11539 , if the contents of a
11547 exceed the physical size of a slide or sheet of paper, the extra will overflow
11549 Again, you should avoid this.
11550 It defeats the whole purpose of
11561 \begin_layout Subsubsection
11571 \begin_layout Standard
11576 is a slide that sits atop another slide.
11577 Perhaps you wish to discuss a figure on the main
11581 before displaying the text associated with it.
11582 One way to accomplish this is tape a flap of dark paper over the part of
11587 you want to display later.
11588 This method fails, however, if you wish to overlap one graph with another,
11590 You would then have to fumble while speaking to align the two separate,
11595 s to align the two graphs.
11600 environment in both cases makes life much easier.
11603 \begin_layout Standard
11608 receives the page number of its
11609 \begin_inset Quotes eld
11613 \begin_inset Quotes erd
11621 \begin_inset Quotes eld
11629 \begin_inset Quotes erd
11636 \begin_layout Standard
11637 Presumably, mutliple
11642 \begin_inset Quotes eld
11650 \begin_inset Quotes erd
11654 \begin_inset Quotes eld
11662 \begin_inset Quotes erd
11666 \begin_inset Quotes eld
11674 \begin_inset Quotes erd
11677 , etc.\InsetSpace ~
11678 appended to the page number of the parent
11688 Clearly, you want the contents of both the
11696 to each fit on a single physical slide! You should probably consider an
11702 \begin_inset Quotes eld
11706 \begin_inset Quotes erd
11718 class provides a visual cue for this: the label at the start of an
11722 is shorter than that at the start of a
11727 Lastly, when you generate printable output, you'll find alignment markers
11728 in all four corners of both the
11732 page and its parent
11737 These will assist you in lining up the two physical slides.
11740 \begin_layout Standard
11741 The major problem in overlaying two slides is aligning the contents of the
11742 two transparencies.
11743 How much space should you leave for that graph on the second slide? Worse
11744 still, what if you want a graph and a sentence on second slide, but there
11745 is text on the main transparency that goes in between them? You could try
11746 and insert vertical space of the right size.
11747 The better way is to use
11758 \begin_layout Standard
11759 As their names imply,
11767 are two command-like paragraph environments that make all subsequent text
11768 invisible and visible, respectively.
11769 Note from section\InsetSpace ~
11771 \begin_inset LatexCommand \ref{sec:slideQuirk}
11775 that you don't place anything
11779 these two environments, however.
11784 , it inserts a centered, sky-blue label into the page reading
11785 \begin_inset Quotes eld
11788 <Invisible Text Follows>
11789 \begin_inset Quotes erd
11793 For paragraphs following this label, the parts of the
11801 ; it doesn't matter which] where they would be contain instead blank space.
11805 \begin_layout Standard
11810 , the corresponding centered label is
11811 \begin_inset Quotes eld
11814 <Visible Text Follows>
11815 \begin_inset Quotes erd
11819 Paragraphs following this label behave normally.
11820 Note that the beginning of a new
11832 automatically shuts off an
11837 It's therefore not necessary to use
11848 \begin_layout Standard
11849 By now, it should be obvious how to create overlay transparencies using
11850 the proper combination of
11869 \begin_layout Enumerate
11874 , including everything that will appear on it, whether on the main slide
11882 \begin_layout Enumerate
11883 Before each figure or paragraph that will appear only on the
11892 If necessary, insert a
11896 environment after the
11903 \begin_layout Enumerate
11908 immediately following the
11915 \begin_layout Enumerate
11916 Copy the contents of this
11927 \begin_layout Enumerate
11932 , change all of the
11943 \begin_layout Standard
11945 You've just made an
11952 \begin_layout Standard
11953 There's one problem with the way I've designed the LyX
11957 class: you can't make text in the middle of a paragraph invisible, nor
11958 make text in the middle of an invisible paragraph visible again.
11959 To accomplish this feat, you'll need to use some inlined LaTeX codes.
11963 \begin_layout Standard
11964 The commands of interest are:
11967 \begin_layout Itemize
11972 invisible \SpecialChar \ldots{}
11976 \begin_layout Itemize
11981 visible \SpecialChar \ldots{}
11985 \begin_layout Standard
11986 \SpecialChar \ldots{}
11987 and need to be marked as TeX.
11989 \begin_inset Quotes eld
11993 \begin_inset Quotes erd
11996 you wish to change goes in between the brackets [and after the
12009 If you don't know how to mark text as TeX, see the apprpriate section of
12022 \begin_layout Subsubsection
12032 \begin_inset LatexCommand \label{sec:slideNote}
12039 \begin_layout Standard
12048 is associated with a
12049 \begin_inset Quotes eld
12053 \begin_inset Quotes erd
12065 class provides visual cues.
12070 is shorter than that of a
12074 [yet longer than that of an
12078 ] and, like the label of an
12082 is shockingly magenta.
12083 Additionally, the printed
12087 has the page number of its
12088 \begin_inset Quotes eld
12092 \begin_inset Quotes erd
12100 \begin_inset Quotes eld
12108 \begin_inset Quotes erd
12112 \begin_inset Quotes eld
12120 \begin_inset Quotes erd
12124 \begin_inset Quotes eld
12132 \begin_inset Quotes erd
12136 You can have multiple
12140 s associated with a single
12152 , you'll probably want to break up long
12156 s so that they fit on a single sheet of paper.
12159 \begin_layout Standard
12164 is obvious: it contains anything additional you might want to say about
12170 It could also be used as a sheet of reminders for a particular
12175 In the case of the latter, you might want to make use of time markers.
12181 \begin_inset Quotes eld
12185 \begin_inset Quotes erd
12188 support for time markers, a
12193 So, you'll have to resort to using the LaTeX codes.
12196 \begin_layout Standard
12197 To use time markers, you'll need to specify the extra class option
12198 \begin_inset Quotes eld
12206 \begin_inset Quotes erd
12209 [see section\InsetSpace ~
12211 \begin_inset LatexCommand \ref{sec:slidesetup}
12216 This option turns on timing marks, which will appear in the lower-left-hand
12222 To set what appears in the time marker, you use the LaTeX commands
12223 \begin_inset Quotes eld
12233 \begin_inset Quotes erd
12237 \begin_inset Quotes eld
12247 \begin_inset Quotes erd
12251 The arguments of both commands are time measured in seconds.
12253 \begin_inset Quotes eld
12263 \begin_inset Quotes erd
12266 sets the time marker to a given time.
12268 \begin_inset Quotes eld
12278 \begin_inset Quotes erd
12281 increments the time marker by the specified amount.
12282 Using time markers and
12286 s in this fashion, you can remind yourself how much time to spend on a particula
12294 \begin_layout Standard
12295 There's one last feature to describe.
12296 Clearly, you'd like to print out all of your
12304 s on transparencies while printing all of your
12321 with which it is associated.
12322 What's a person to do?
12325 \begin_layout Standard
12326 Luckily, there are two LaTeX commands that allow you to select what to print
12328 Both must be placed into the preamble of your document.
12330 \begin_inset Quotes eld
12342 \begin_inset Quotes erd
12345 will cause the output to contain only the
12354 Correspondingly, the command
12355 \begin_inset Quotes eld
12367 \begin_inset Quotes erd
12370 prevents the output of anything but
12375 I'd advise placing both commands in the preamble and initially comment
12377 You can then preview your entire presentation as you write.
12378 When you're done writing, you can then uncomment one of the two to select
12379 what you want to print.
12380 I like to uncomment
12381 \begin_inset Quotes eld
12393 \begin_inset Quotes erd
12396 , print to a file with
12397 \begin_inset Quotes eld
12405 \begin_inset Quotes erd
12408 in its name, comment it back out, then uncomment
12409 \begin_inset Quotes eld
12421 \begin_inset Quotes erd
12425 \begin_inset Quotes eld
12433 \begin_inset Quotes erd
12437 I can then send either file to a printer, loading transparencies or plain
12438 paper as appropriate.
12441 \begin_layout Standard
12442 You can also provide other arguments to the
12443 \begin_inset Quotes eld
12453 \begin_inset Quotes erd
12457 \begin_inset Quotes eld
12467 \begin_inset Quotes erd
12471 See a good LaTeX book for details.
12474 \begin_layout Subsection
12479 Class Template File
12482 \begin_layout Standard
12483 I have also provided a template file,
12484 \begin_inset Quotes eld
12492 \begin_inset Quotes erd
12500 To use it, begin your new presentation with
12505 ile\SpecialChar \menuseparator
12515 Your new LyX presentation file will contain an example
12536 additionally contain an example of the use of
12545 Lastly, the preamble will contain:
12548 \begin_layout LyX-Code
12549 % Uncomment to print out only slides and overlays
12552 \begin_layout LyX-Code
12556 \begin_layout LyX-Code
12566 \begin_layout LyX-Code
12567 % Uncomment to print out only notes
12570 \begin_layout LyX-Code
12574 \begin_layout LyX-Code
12582 \begin_layout Standard
12583 One final thing: I created this class to support the LaTeX2e
12584 \begin_inset Quotes eld
12592 \begin_inset Quotes erd
12595 class, one of the built-in LaTeX2e classes.
12596 Neither I nor the rest of the LyX Team endorse or oppose the use of this
12597 built-in slide class.
12598 It's here if you want it or need it.
12599 There exist other LaTeX2e classes for creating presentations, such as the
12604 class [see section\InsetSpace ~
12606 \begin_inset LatexCommand \ref{sec:foiltex}
12611 \begin_inset Quotes eld
12619 \begin_inset Quotes erd
12622 package [present on some TeX distributions].
12623 The latter is not yet supported under LyX.
12627 \begin_layout Standard
12628 Perhaps you can take on the task\SpecialChar \ldots{}
12634 I know nothing about these other classes.
12635 Try them out to see what sort of alternative they provide.
12638 \begin_layout Section
12647 \begin_inset LatexCommand \label{sec:foiltex}
12654 \begin_layout Standard
12660 \begin_layout Subsection
12664 \begin_layout Standard
12665 This section describes how to use LyX to make slides for overhead projectors.
12666 There are two document classes that can do this: the default slides class
12672 This section documents the latter.
12675 \begin_layout Standard
12676 I'm going to say this again, nice and clear, so that there's no misunderstanding
12680 \begin_layout Standard
12681 \begin_inset VSpace bigskip
12687 \begin_layout Standard
12691 This section documents the class
12692 \begin_inset Quotes eld
12700 \begin_inset Quotes erd
12708 \begin_layout Standard
12709 \begin_inset VSpace bigskip
12715 \begin_layout Standard
12716 If you're looking for the documentation for
12717 \begin_inset Quotes eld
12725 \begin_inset Quotes erd
12728 , check out section\InsetSpace ~
12730 \begin_inset LatexCommand \ref{sec:slitex}
12735 If your machine doesn't have the
12740 \begin_inset Quotes eld
12748 \begin_inset Quotes erd
12751 ] installed, you'll probably have to use the default
12755 class, which isn't quite as good as
12760 \begin_layout Standard
12765 class is designed for use with version 2.1 of the
12769 LaTeX class file which is now an integral part of LaTeX2e.
12772 \begin_layout Subsection
12776 \begin_layout Standard
12777 Obviously, to use this document class, you need to select
12778 \begin_inset Quotes eld
12786 \begin_inset Quotes erd
12798 Document\InsetSpace ~
12802 There are some settings in the
12804 Document\InsetSpace ~
12807 dialog that you should know about that are specific to this class:
12810 \begin_layout Itemize
12811 Don't change the options
12821 Document\InsetSpace ~
12825 They're ignored by the
12832 \begin_layout Itemize
12833 The default font size is 20pt with the other options being 17pt, 25pt and
12837 \begin_layout Itemize
12838 The default font is
12846 but all math equations are still typeset in the usual roman font.
12849 \begin_layout Itemize
12854 TeX supports A4 and Letter paper sizes as well as a special size for working
12856 It doesn't support A5, B5, legal or executive paper sizes.
12859 \begin_layout Itemize
12860 Don't bother changing the
12864 settings because they are ignored anyway.
12865 All floats appear where they are defined in the text.
12868 \begin_layout Itemize
12876 setting behaves a bit differently for this class.
12881 TeX provides extensive footer and header capabilities including a user-defined
12883 See section\InsetSpace ~
12885 \begin_inset LatexCommand \ref{sec:foilfoot}
12890 The title page is treated differently to all other pages in the document
12899 has the logo centered at the bottom of the page (if one is defined).
12900 The possible page style choices and what they do are as follows:
12905 \labelwidthstring MMMMMMM
12912 The final output contains no page numbers, or other headers or footers
12913 (except footnotes of course).
12918 \labelwidthstring MMMMMMM
12925 The final output contains page numbers centered at the bottom of the page.
12926 No other headings or footers (other than footnotes).
12930 \labelwidthstring MMMMMMM
12935 Page numbers in lower right corner.
12936 Additional headers and footers are also shown.
12937 This is also the default.
12941 \labelwidthstring MMMMMMM
12946 Gives you access to the
12950 package although its use with
12954 TeX is discouraged by the writer of the
12958 TeX package because of some potential page layout clashes.
12962 \begin_layout Subsubsection
12966 \begin_layout Standard
12967 The following options may be used in the extra class options in the
12972 ocument\SpecialChar \menuseparator
12983 \labelwidthstring MMMMMMx
12988 This sets up the page layout for 7.33in by 11in paper, which is about the
12989 same aspect ratio as a 35mm slide, making it a bit easier to work with
12994 \labelwidthstring MMMMMMx
12999 Places a rule across the page below the header on every page except the
13004 \labelwidthstring MMMMMMx
13009 Places a rule across the page above the footer on every page except the
13014 \labelwidthstring MMMMMMx
13019 This is automatically set each time you create a new
13028 TeX to use the dvips driver to rotate those pages that are set as landscape
13033 \labelwidthstring MMMMMMx
13038 Simply changes the page dimensions to those of a landscape page but doesn't
13040 Thus if you use this option you need to use an external program to rotate
13041 each page or feed your paper through your printer as landscape.
13042 Note that this option effectively reverses the roles of the
13050 environments (don't worry these are described in the next section).
13054 \labelwidthstring MMMMMMx
13059 Equation numbers on the left.
13063 \labelwidthstring MMMMMMx
13068 Flush-left equations.
13071 \begin_layout Subsection
13072 Supported Environments
13075 \begin_layout Standard
13076 Most of the environments commonly supported in other classes are also supported
13082 There are several additional environments provided by
13086 TeX as well as a couple added by LyX.
13087 The following environments are shared with other classes:
13090 \begin_layout Standard
13094 \begin_layout Standard
13098 begin{multicols}{2}
13106 \begin_layout Itemize
13112 \begin_layout Itemize
13118 \begin_layout Itemize
13124 \begin_layout Itemize
13130 \begin_layout Itemize
13136 \begin_layout Itemize
13142 \begin_layout Itemize
13148 \begin_layout Itemize
13154 \begin_layout Itemize
13160 \begin_layout Itemize
13166 \begin_layout Itemize
13172 \begin_layout Itemize
13178 \begin_layout Itemize
13184 \begin_layout Itemize
13190 \begin_layout Itemize
13196 \begin_layout Itemize
13202 \begin_layout Itemize
13208 \begin_layout Itemize
13214 \begin_layout Standard
13218 \begin_layout Standard
13230 \begin_layout Standard
13231 That is, all the major environments apart from the sectioning environments.
13232 Since foils are essentially self-contained sections, with a title and body,
13237 TeX provides specific commands for starting new foils and these are:
13240 \begin_layout Itemize
13246 \begin_layout Itemize
13252 \begin_layout Standard
13253 LyX also provides slightly modified versions of these two environments called:
13256 \begin_layout Itemize
13262 \begin_layout Itemize
13265 ShortRotatefoilhead
13268 \begin_layout Standard
13269 and the differences will be explained in the next section.
13272 \begin_layout Standard
13273 Since foils are often used in presenting ideas or new theorems and such
13278 TeX also provides a comprehensive box of goodies for presenting them:
13281 \begin_layout Standard
13285 \begin_layout Standard
13289 begin{multicols}{2}
13297 \begin_layout Itemize
13303 \begin_layout Itemize
13309 \begin_layout Itemize
13315 \begin_layout Itemize
13321 \begin_layout Itemize
13327 \begin_layout Itemize
13333 \begin_layout Itemize
13339 \begin_layout Itemize
13345 \begin_layout Itemize
13351 \begin_layout Itemize
13357 \begin_layout Itemize
13363 \begin_layout Standard
13367 \begin_layout Standard
13379 \begin_layout Standard
13380 The starred versions are unnumbered while the unstarred versions are numbered.
13381 There are also two list environments added by LyX and these are:
13384 \begin_layout Itemize
13390 \begin_layout Itemize
13396 \begin_layout Standard
13401 TeX provides some powerful header and footer capabilities that are best
13402 set in the preamble although they may be set at any point in a document.
13403 If you want to change these settings in your document the best place to
13404 do so is at the very top of a foil,
13409 straight after the foilhead.
13412 \begin_layout Standard
13413 For this purpose, the following command styles are provided [
13420 \begin_layout Standard
13424 \begin_layout Standard
13428 begin{multicols}{2}
13436 \begin_layout Itemize
13443 \begin_layout Itemize
13449 \begin_layout Itemize
13456 \begin_layout Itemize
13463 \begin_layout Itemize
13471 \begin_layout Standard
13477 \begin_layout Standard
13481 \begin_layout Standard
13493 \begin_layout Standard
13494 There are also a few commands provided by
13498 TeX that aren't directly supported by LyX but I'll tell you what they do
13499 and how to use them in section\InsetSpace ~
13501 \begin_inset LatexCommand \ref{sec:unsuppfoils}
13508 \begin_layout Subsection
13509 Building a Set of Foils
13512 \begin_layout Standard
13513 This section will give a simple introduction to using the different environments
13514 to build a set of foils.
13515 If you want to see an example set of foils take a look at the
13519 file accessible from the
13524 ile\SpecialChar \menuseparator
13529 pen\SpecialChar \ldots{}
13540 \begin_layout Subsubsection
13541 Give It a Title Page
13544 \begin_layout Standard
13545 Unlike other classes that provide
13565 creates the title on a page of its own.
13566 If you leave out the
13570 environment LaTeX will substitute the current date (every time you regenerate
13574 \begin_layout Subsubsection
13578 \begin_layout Standard
13579 As I mentioned earlier, there are four ways of starting a new foil.
13580 For portrait foils you should use
13589 The difference between these two environments is the amount of space between
13590 the title of the foil (the foilhead) and the body of the foil.
13593 \begin_layout Standard
13594 Landscape foils are generated using the
13600 ShortRotatefoilhead
13603 Again the only difference is the spacing between foilhead and body.
13604 Both of the short versions have 0.5 inches less separation between the foilhead
13609 \begin_layout Standard
13610 One problem with the support for landscape foils is the requirement that
13611 you have to use the
13615 driver to generate the PostScript® output otherwise the foils won't be
13617 It is possible to get landscape foils even if you haven't got the
13621 driver provided you can feed your foils sideways through your printer ;-)
13624 \begin_layout Subsubsection
13625 Theorems, Lemmas, Proofs and more
13628 \begin_layout Standard
13629 Due to a small bug in LyX you can't have two of the same type of these environme
13630 nts directly following each other.
13631 They must be separated by something.
13632 If you try, you will just be extending the previous environment as if you
13633 had merged the two environments together.
13634 So, how do you get around this problem? The simplest option is to insert
13635 some text between the two environments or add a
13639 environment between the two with just a
13640 \begin_inset Quotes eld
13648 \begin_inset Quotes erd
13652 This will force LyX to produce two separate environments and hence the
13653 correct LaTeX output.
13654 An example is provided in the example file included with the LyX distribution.
13655 Remember, this problem only occurs if you are trying to place two of the
13656 same type of theorem-like environments one directly after the other.
13659 \begin_layout Subsubsection
13663 \begin_layout Standard
13664 You get all the commonly supported list styles found in other classes as
13665 well as two new ones.
13666 I'll only describe the new ones here.
13667 If you want to find out more about the other list environments check out
13673 If you intend to use itemized lists you might also want to read about the
13676 Itemize\InsetSpace ~
13677 Bullet\InsetSpace ~
13680 dialog described above in section\InsetSpace ~
13682 \begin_inset LatexCommand \ref{sec:bullet}
13689 \begin_layout Standard
13690 The two new list styles,
13698 , are designed to make it easier for you to create lists of do's and don'ts
13699 or right and wrong by providing dedicated environments that use a tick
13700 or a cross as the label of the list.
13701 These lists are in fact dedicated variants of the
13706 They do however require that you have the
13710 packages installed.
13713 \begin_layout Subsubsection
13717 \begin_layout Standard
13722 TeX redefines the floating tables and figures so that they appear exactly
13723 where they are in the text rather than pushing them to the top of the page
13724 or to some user specified location.
13725 In fact if you change the float placement settings they are simply ignored.
13728 \begin_layout Subsubsection
13729 Page Headers and Footers
13730 \begin_inset LatexCommand \label{sec:foilfoot}
13737 \begin_layout Standard
13747 are two commands used to control the left-footer text string.
13748 The first is meant to allow you to include a graphic logo on your foils
13750 \begin_inset Quotes eld
13758 \begin_inset Quotes erd
13762 While the second is meant to provide a classification for the audience,
13769 It is empty by default.
13772 \begin_layout Standard
13773 The remaining page corners can be filled by
13778 (which defaults to page numbers),
13791 \begin_layout Subsection
13797 \begin_inset LatexCommand \label{sec:unsuppfoils}
13804 \begin_layout Standard
13805 All the commands mentioned below need to be set in a
13813 within another environment.
13816 \begin_layout Subsubsection
13820 \begin_layout Standard
13821 All lengths are adjusted using the
13844 should be replaced by the name given to the length you want to change and
13849 is the length value.
13850 All lengths should be specified in units of length such as inches (
13862 ) or relative to some document or font-based length such as
13872 \begin_layout Standard
13873 It's possible to change the spacing between a foilhead and the body of the
13874 foil by adjusting the length specified by
13881 For example, to make
13885 foilheads 0.5 inches closer to their bodies put the following in the preamble:
13892 foilheadskip}{-0.5in}
13895 \begin_layout Standard
13896 The spacings around floats can be adjusted by setting these lengths:
13900 \labelwidthstring MMMMMMMMMMM
13907 Separation between the text and the top of the float
13911 \labelwidthstring MMMMMMMMMMM
13918 Separation between the float and the caption
13922 \labelwidthstring MMMMMMMMMMM
13929 Separation between the caption and the following text
13933 \labelwidthstring MMMMMMMMMMM
13940 You can make the captions narrower than the surrounding text by adjusting
13942 Best done relative to
13951 \begin_layout Standard
13952 There are also several title page related lengths that you may find useful
13953 if you have a long title or several authors:
13957 \labelwidthstring MMMMMMMMMMM
13964 Separation from headers to
13970 \labelwidthstring MMMMMMMMMMM
13989 \labelwidthstring MMMMMMMMMMM
14004 \labelwidthstring MMMMMMMMMMM
14021 \labelwidthstring MMMMMMMMMMM
14037 \begin_layout Standard
14038 The last length related command affects all the list environments.
14049 a list environment then all the vertical spacing between the list items
14051 Note that this is a command not a length so it doesn't require
14057 like the stuff mentioned above.
14060 \begin_layout Subsubsection
14061 Headers and Footers
14064 \begin_layout Standard
14077 commands control whether the logo in the
14081 definition appear on a given page.
14088 in the preamble then none of the foils will have the logo on them.
14089 If you don't want the logo on a particular page place the
14095 directly after the foilhead of that page and the
14101 directly after the next foilhead.
14104 \begin_layout Standard
14105 If you decide to use the
14109 page style setting in the
14111 Document\InsetSpace ~
14114 dialog you should probably add
14124 to your preamble so headers and footers on landscape pages are correctly
14125 placed when rotated.
14126 This is due to some clashes between the page layouts provided by the
14137 \begin_layout Section
14138 Latex8 (IEEE Conference Papers)
14141 \begin_layout Standard
14147 \begin_layout Subsection
14151 \begin_layout Standard
14152 Since this class is specifically for writing submissions to IEEE sponsored
14153 conferences I strongly recommend that you get a copy of their Authors Kit.
14158 package and associated bibliography style file is included in the kit.
14159 The Authors Kit is usually sent out by email once your initial submission
14161 There is a lot of useful information in the Authors Kit explaining formatting
14162 restrictions and so on and I will assume you have read this since that
14163 means I don't have to repeat it all here.
14166 \begin_layout Subsection
14170 \begin_layout Standard
14171 [AR\SpecialChar \@.
14175 \begin_layout Subsection
14176 Supported Environments
14179 \begin_layout Itemize
14185 \begin_layout Itemize
14191 \begin_layout Itemize
14197 \begin_layout Itemize
14203 \begin_layout Itemize
14209 \begin_layout Itemize
14215 \begin_layout Itemize
14221 \begin_layout Itemize
14227 \begin_layout Itemize
14233 \begin_layout Subsection
14234 Differences Between Screen and Paper
14237 \begin_layout Standard
14238 There are slight differences in appearance mainly with the presentation
14239 of section counters.
14240 On screen the trailing period of the section counter is missing but it
14241 will appear in the output so don't let this worry you.
14244 \begin_layout Section
14245 Hollywood (Hollywood spec scripts)
14248 \begin_layout Standard
14254 \begin_layout Subsection
14258 \begin_layout Standard
14259 Getting the format of a Hollywood script right is a
14260 \begin_inset Quotes eld
14264 \begin_inset Quotes erd
14267 It is designed to make the readers focus on content and to be easy and
14268 familiar for the actors to read.
14269 Each page of a script should be one minute of film.
14270 Nothing goes in a script that you cannot see or hear on screen.
14271 The courier 12 pt font should be used throughout.
14275 \begin_layout Subsection
14279 \begin_layout Standard
14280 Speakers' lines should NEVER break in mid-sentence.
14281 If a speaker's lines continue over a page break, repeat the
14285 title followed by (Cont'd).
14288 \begin_layout Subsection
14292 \begin_layout Standard
14297 names as labels then cross-reference the label to insert the name.
14298 The cross-reference dialog will show the current cast of characters.
14299 You can use this to insert the speaker name in narratives also.
14302 \begin_layout Subsection
14303 Paper size and Margins
14306 \begin_layout Standard
14307 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
14310 \begin_layout Subsection
14314 \begin_layout Standard
14315 The following environments are available.
14316 You can use hollywood.bind to get the bind keys shown at the right.
14319 \begin_layout Itemize
14326 Used where nothing else works.
14330 \begin_layout Itemize
14343 Usually followed by something like
14344 \begin_inset Quotes eld
14347 on Sally waking up.
14348 \begin_inset Quotes erd
14354 \begin_layout Itemize
14363 Introduces a new INTERIOR camera set-up.
14364 Always followed by DAY or NIGHT, or something similar to define the lighting
14366 Everthing on this line in CAPS.
14369 \begin_layout Itemize
14378 Introduces a new EXTERIOR camera set-up.
14379 Everthing on this line in CAPS.
14382 \begin_layout Itemize
14391 The character speaking.
14394 \begin_layout Itemize
14403 Instructions to the speaker.
14404 The () are automatically inserted, but only the ( will show in LyX.
14405 Both will be printed.
14408 \begin_layout Itemize
14424 \begin_layout Itemize
14433 Camera movement instruction.
14438 \begin_layout Itemize
14446 \begin_layout Itemize
14454 \begin_layout Itemize
14462 \begin_layout Itemize
14470 \begin_layout Subsection
14474 \begin_layout Itemize
14475 (O.S) --- off screen
14478 \begin_layout Itemize
14479 (V.0) --- voice over
14482 \begin_layout Itemize
14487 \begin_layout Itemize
14492 \begin_layout Itemize
14493 PAN --- camera movement
14496 \begin_layout Itemize
14497 INSERT --- cut to close-up of
14500 \begin_layout Section
14504 \begin_layout Standard
14510 \begin_layout Subsection
14514 \begin_layout Standard
14515 Broadway is for writing plays.
14516 The format is more decorative than Hollywood, and much less standardized.
14517 This format should be suitable for workshops.
14520 \begin_layout Subsection
14524 \begin_layout Standard
14525 The same as in Hollywood.
14528 \begin_layout Subsection
14532 \begin_layout Standard
14537 names as labels then cross-reference the label to insert the name.
14538 The cross-reference dialog will show the current cast of characters.
14541 \begin_layout Subsection
14542 Paper size and Margins
14545 \begin_layout Standard
14546 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
14549 \begin_layout Subsection
14553 \begin_layout Standard
14554 The following environments are available.
14555 You can use broadway.bind to get the bind keys shown at the right.
14558 \begin_layout Itemize
14565 You should not have to use this, but it is here for anything that does not
14569 \begin_layout Itemize
14578 Used to describe stage setting and the action.
14579 First use of speaker names in all CAPs.
14582 \begin_layout Itemize
14591 Automatically numbered.
14592 On screen it will be arabic, but will print as Roman.
14595 \begin_layout Itemize
14609 It is just centered text.
14612 \begin_layout Itemize
14621 Not automatically numbered.
14622 You supply the number.
14623 This is because I couldn't figure out how.
14626 \begin_layout Itemize
14635 A special case of Narrative to describe the setting and action as the curtain
14639 \begin_layout Itemize
14648 The speaker's (actor's) title, centered in all CAPS.
14651 \begin_layout Itemize
14660 Instructions to the speaker.
14661 The parentheses are automatically inserted.
14662 The ( will appear on screen, but both will be in the printed play.
14663 This environment is only used within
14670 \begin_layout Itemize
14679 What the Speaker says.
14682 \begin_layout Itemize
14691 The curtain comes down.
14694 \begin_layout Itemize
14702 \begin_layout Itemize
14710 \begin_layout Itemize
14718 \begin_layout Standard
14722 \begin_layout Section
14726 \begin_layout Standard
14732 \begin_layout Standard
14733 \begin_inset VSpace bigskip
14739 \begin_layout Standard
14743 Revtex\InsetSpace ~
14746 textclass works with the American Physical Sociey's RevTeX 4.0 (the
14747 \begin_inset Formula $\beta$
14750 release of May, 1999) class.
14753 \begin_layout Standard
14758 textclass, which works with RevTeX 3.1.
14759 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
14760 That means that it doesn't interact very well with LyX, which requires
14761 LaTeX2e, although it has been kludged to work.
14762 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
14765 RevTeX\InsetSpace ~
14768 textclass should also be pretty easy to use.
14771 \begin_layout Standard
14772 These documents are supposed to be used in
14776 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
14777 macros, and assume you'll know what to put in the preamble if necessary.
14780 \begin_layout Subsection
14784 \begin_layout Standard
14785 All you need to do is install RevTeX 4, as described in the package's README
14787 the package can be found at
14788 \begin_inset LatexCommand \url[The RevTeX 4 Web Site]{http://publish.aps.org/revtex4/}
14793 Install it somewhere that LaTeX can see it.
14794 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
14795 (i.e., not the directory where you installed the class file.) Then, if you
14796 reconfigure LyX, it will find the class file and let you use the RevTeX4
14800 \begin_layout Standard
14801 Probably the easiest way to get started is either to import a RevTeX 4 document
14808 Revtex\InsetSpace ~
14811 template, found in the templates directory.
14814 \begin_layout Subsection
14818 \begin_layout Standard
14819 Optional arguments to
14826 \begin_inset Quotes eld
14830 \begin_inset Quotes erd
14834 \begin_inset Quotes eld
14838 \begin_inset Quotes erd
14852 Document\InsetSpace ~
14856 Remember that in RevTeX, at least one optional argument is required!
14859 \begin_layout Standard
14860 Other preamble matter, like
14872 dialog, also as usual.
14875 \begin_layout Subsection
14879 \begin_layout Standard
14880 The layouts basically correspond to the commands in RevTeX4.0.
14881 For example, the Email layout corresponds to
14888 Note that (at least as of RevTeX 4.0 Beta), the
14896 layouts are exactly equivalent, so you shouldn't need to use both.
14900 \begin_layout Standard
14901 In case you're curious, both were included so that
14905 would be able to translate both
14925 \begin_layout Subsection
14929 \begin_layout Standard
14930 There are a couple of important unique aspects of RevTeX 4 which might cause
14931 bugs that will be even more confusing in LyX.
14934 \begin_layout Standard
14952 The LyX equivalent is that there is a separate Thanks layout.
14957 write footnotes in the
14961 layout, or weird things may happen.
14962 See the RevTeX 4 documentation for more details.
14965 \begin_layout Standard
14968 Author\InsetSpace ~
14973 Author\InsetSpace ~
14980 layouts must be placed
14988 layout and the corresponding
15005 , the LaTeX won't compile.
15008 \begin_layout Subsection
15012 \begin_layout Standard
15013 The main problem with this layout is that you can't use the optional arguments
15014 to layouts like Email and Title.
15015 (The problem is not unique to this layout; you can't use optional arguments
15016 to the Section layouts either.) This means that after you export that file
15017 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15018 need to edit the LaTeX file with a text editor to add the optional arguments
15019 to set, e.g., the running title for the page headers.
15020 Lacking these layouts makes the
15026 (and the equivalent
15032 ) useless, so the corresponding layouts don't exist, and will have to be
15037 \begin_layout Standard
15042 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15043 has not been updated yet to take advantage of it.
15051 \begin_layout Section
15052 Article (mwart), book (mwbk) and report (mwrep)
15053 \begin_inset OptArg
15056 \begin_layout Standard
15069 \begin_layout Standard
15075 \begin_layout Standard
15076 The LyX document classes
15092 correspond to the LaTeX document classes
15105 They are replacements for the standard document classes
15117 , resp., and fit better to Polish typography conventions in a number of points.
15121 \begin_layout Standard
15125 \begin_layout Itemize
15126 Unnumbered titles (with star, eg.
15131 ) are added into table of contents,
15134 \begin_layout Itemize
15135 Additional page styles:
15139 \begin_layout Description
15140 uheadings header with separated lines,
15143 \begin_layout Description
15144 myheadings custom header, contents headers via commands:
15159 \begin_layout Description
15160 myuheadings custom header with separated lines,
15163 \begin_layout Description
15164 outer page number is placed on outer side of page
15168 \begin_layout Itemize
15173 \begin_layout Description
15174 rmheadings serif titles --- default,
15177 \begin_layout Description
15178 sfheadings sansserif titles,
15181 \begin_layout Description
15182 authortitle on title page first placed is author next title --- default,
15185 \begin_layout Description
15186 titleauthor on title page first placed is title next author,
15189 \begin_layout Description
15190 withmarginpar reserve place on page for margins.
15194 \begin_layout Section
15198 \begin_layout Standard
15204 \begin_layout Standard
15205 Elsevier Science Publishers B.V.
15206 provides a standard LaTeX document class (
15210 ) for submitting articles to their various journals.
15211 The style file can be downloaded directly from their web site:
15212 \begin_inset LatexCommand \url{http://authors.elsevier.com/}
15217 Instructions are supplied along with the class file, which details the
15218 requirements of the publishers.
15219 LyX includes package that allows for the use of this class, by a layout
15220 and a template file.
15221 Installation of the class file is the same as for any other LaTeX package;
15222 instructions are provided in the Elsevier documentation.
15225 \begin_layout Standard
15235 As the Elsevier class file is based mainly on the standard article class,
15236 most of the normal functionality is provided.
15237 The Elsevier class defines a number of mathematical environments, which
15238 are similar to the AMS environments.
15239 These commands are all described in the Elsevier documentation, and are
15243 \begin_layout Standard
15244 The easiest way to use the Elsevier style is to base documents on the included
15246 It is best not to use options such as fancy headings or the geometry package,
15247 as elements such as these are defined by Elsevier in their style file.
15248 Ideally, no extra packages except those mentioned in the Elsevier documentation
15250 Essentially, Elsevier require as
15251 \begin_inset Quotes eld
15255 \begin_inset Quotes erd
15262 \begin_layout Standard
15271 file as possible, as their intention is to take the supplied file and replace
15272 the class file with one for the particular journal to which the paper has
15274 This also means that not too much time should be spent on the formating
15276 When it comes to be published, this will change anyway.
15277 The rest of the usage for this layout is substantially the same as for
15278 the normal article class.
15279 For details of what Elsevier do and don't allow, refer to their documentation.
15282 \begin_layout Section
15286 \begin_layout Standard
15289 Jürgen Spitzmüller
15292 \begin_layout Subsection
15296 \begin_layout Standard
15297 Memoir is a very powerful and constantly evolving class.
15298 It has been designed with regard to fictional and non-fictional literature.
15299 Its aim is to let the user have maximum control over the typesetting of
15301 Memoir is based on the standard book class, but it can also emulate the
15302 article class (see below).
15305 \begin_layout Standard
15306 Peter Wilson, the developer of Memoir, is known as the author of lots of
15307 useful packages in the LaTeX world.
15308 Most of them have been merged with Memoir.
15309 Therefore, it is much easier to layout the table of contents, appendices,
15310 chapter designs and such.
15311 LyX, though, does not support all of these goodies natively.
15312 Some of them might be added to forthcoming releases
15316 \begin_layout Standard
15317 You are invited to send suggestions to
15318 \begin_inset LatexCommand \url{lyx-devel@lists.lyx.org}
15327 , lots will probably never, due to the limitations of LyX's framework.
15328 Of course you can still use all features with the help of some native LaTeX
15333 \begin_layout Standard
15338 \begin_layout Standard
15347 section\InsetSpace ~
15349 \begin_inset LatexCommand \ref{sec:Inserting-LaTeX-Code}
15359 In this section, we can only list those features which are natively supported
15361 For detailed descriptions (and for the rest of features) we are recommending
15362 to have a look at the detailed manual of the Memoir class
15366 \begin_layout Standard
15371 \begin_layout Standard
15381 \begin_inset LatexCommand \url{CTAN:/macros/latex/memoir/memman.pdf}
15390 , which is not only a user guide for the class, but also both a comprehensive
15391 description on good typesetting and a superb example for good typesetting
15395 \begin_layout Subsection
15396 Basic features and restrictions
15399 \begin_layout Standard
15400 Memoir supports basically all features of the standard book classes.
15401 There are, however, some differences, as follows:
15404 \begin_layout Description
15406 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14,
15410 \begin_layout Description
15412 style: The fancy page style is not supported, due to a command clash
15413 between Memoir and the fancyhdr package (they are both defining a command
15414 with the same name, which confuses LaTeX).
15415 Instead, Memoir comes with a bunch of own page styles (see
15417 Layout\SpecialChar \menuseparator
15418 Document\SpecialChar \menuseparator
15423 If you want to use these for the chapter pages, you have to use the command
15430 in the main text or in preamble (e.
15434 \begin_layout Standard
15447 \begin_layout Standard
15460 chapterstyle{companion}
15465 \begin_layout Description
15466 Sectioning: Sectionings (chapter, section, subsection etc.) are coming with
15467 an optional argument in the standard classes.
15468 With this, you can specify an alternative version of the title for the
15469 table of contents and the headers (for instance, if the title is too long).
15470 In LyX, you can do this via
15472 Insert\SpecialChar \menuseparator
15476 at the beginning of a chapter/section.
15477 Memoir features a second optional argument and thus separates the table
15478 of contents from the header.
15479 You can define three variants of a title with this: one for the main text,
15480 one for the table of contents, and one for the headers.
15481 Simply insert two optional arguments if you need this feature, the first
15482 one containing the short title for the Table of Contents, the second one
15483 containing an alternative short title for the headers.
15486 \begin_layout Description
15487 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
15488 of contents, the list of figures and the list of table start a new page
15490 Memoir does not follow this route.
15491 You have to insert a page break yourself, if you want to have one.
15494 \begin_layout Description
15495 Titlepage: For some unknown reason, Memoir uses pagination on the title
15496 page (in the standard classes, title pages are
15497 \begin_inset Quotes eld
15501 \begin_inset Quotes erd
15508 \begin_layout Standard
15521 \begin_layout Standard
15531 If you want an empty title page, type
15535 aliaspagestyle{title}{empty}
15540 \begin_layout Description
15541 Article: With the class option
15547 Layout\SpecialChar \menuseparator
15548 Document\SpecialChar \menuseparator
15552 ), you can emulate article style.
15553 That is, counters (footnotes, figures, tables etc.) will not be reset on
15554 new chapters, chapters don't start a new page (but are---in contrary to
15556 \begin_inset Quotes eld
15560 \begin_inset Quotes erd
15563 article classes---still allowed), parts, though, use their own page, as
15567 \begin_layout Description
15568 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
15569 font commands, which have been used in the old LaTeX version 2.09 (e.
15573 \begin_layout Standard
15586 \begin_layout Standard
15608 It produces an error and stops LaTeX whenever such a command appears.
15613 reallows the commands and spits out warnings instead (which does at least
15615 Since a lot of packages and particularly BibTeX style files are still using
15616 those commands, we have decided to use this option by default.
15619 \begin_layout Subsection
15623 \begin_layout Standard
15624 We will only describe the features supported by LyX (which is not much currently
15626 Please consult the Memoir manual
15630 \begin_layout Standard
15635 \begin_layout Standard
15645 \begin_inset LatexCommand \url{CTAN:/macros/latex/memoir/memman.pdf}
15657 \begin_layout Description
15658 Abstract: You may wonder why an abstract is an extra feature.
15659 Well, it is in book class.
15660 Usually books don't have abstracts.
15661 Memoir, however, has.
15662 You can use it whereever and how often you like.
15665 \begin_layout Description
15666 Chapterprecis: You may know this from belletristic: The contents of a chapter
15667 is shortly described below the title and also in the table of contents
15672 \begin_layout Standard
15685 \begin_layout Standard
15696 Our hero arrives in Troia; he loses some friends; he finds others
15699 Chapterprecis does exactly this.
15700 It is therefore only sensible below a chapter.
15703 \begin_layout Description
15704 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
15705 The epigraph environment provides an elegant way of typesetting such a
15707 The motto itself (text) and its author (source) are divided by a short
15709 Unfortunately, we have to fool LyX a bit here again, since the environment
15710 needs two arguments (text and source).
15711 In this case, we have to use curly brackets (in TeX mode) between the two
15722 <author of the slogan>.
15725 \begin_layout Description
15726 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
15727 complex figurative poems).
15728 Lyx can only support a few of them.
15729 One is poemtitle, which is a centered title for poems, which will also
15730 be added to the table of contents (verse is the standard environment for
15732 Memoir has some enhanced versions of verse, but you need to use ERT, because
15733 they have to be nested inside regular verse environments, which is not
15734 possible with LyX).
15737 \begin_layout Description
15738 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
15741 \begin_layout Chapter
15742 Importing and Exporting Alternate File Formats
15743 \begin_inset OptArg
15746 \begin_layout Standard
15747 Importing and Exporting
15755 \begin_layout Section
15759 \begin_layout Standard
15760 Importing and exporting LyX documents from/to other formats has been touched
15766 Here we describe more of the gory details needed to understand just what
15767 is going on when you click on the
15772 ile\SpecialChar \menuseparator
15784 ile\SpecialChar \menuseparator
15795 \begin_layout Section
15796 Importing Other Formats
15799 \begin_layout Subsection
15803 \begin_layout Standard
15804 Translating from LaTeX into LyX is performed by a Perl script called reLyX.
15805 Although it is a standalone program which can be called from the command
15806 line, LyX will call it automatically when a LaTeX document is imported.
15807 See section\InsetSpace ~
15809 \begin_inset LatexCommand \ref{sec:reLyX}
15813 for a complete description.
15814 There are no user tunable parameters for reLyX within LyX.
15817 \begin_layout Subsection
15821 \begin_layout Standard
15822 When importing plain ASCII text, there are two methods of reading the file.
15824 \begin_inset Quotes eld
15828 \begin_inset Quotes erd
15831 preserves all the linebreaks in the ASCII; to LyX, then, each line looks
15834 \begin_inset Quotes eld
15838 \begin_inset Quotes erd
15841 assumes that consecutive lines separated by only a single linebreak form
15842 a single paragraph.
15843 Successive linebreaks with no intervening text are thus assumed to be paragraph
15847 \begin_layout Subsection
15851 \begin_layout Standard
15854 [Editor's note: Needs to be written, obviously - any volunteers? --- mer]
15857 \begin_layout Section
15858 Exporting Other Formats
15861 \begin_layout Subsection
15865 \begin_layout Standard
15866 LyX generates two types of LaTeX files: stripped down versions for the normal
15871 , etc.) which one normally never sees
15875 \begin_layout Standard
15876 The resulting file is a perfectly valid LaTeX file, though the preamble
15877 might look a bit strange since it includes some definitions used by LyX
15878 which wouldn't show up in most human-written files.
15883 , and human readable forms which are suitable for exchanging with your colleague
15885 The only settable option for the translation is the line length of the
15887 The default is 65 characters, but it can be set in
15894 \SpecialChar \menuseparator
15915 \begin_layout Subsection
15916 Device Independent Files
15919 \begin_layout Standard
15920 Device Independent files (DVI files) are produced by running LaTeX on your
15922 There are no user settable options.
15925 \begin_layout Subsection
15929 \begin_layout Standard
15930 The next step in the conversion chain is converting a DVI file into Postscript®.
15938 \SpecialChar \menuseparator
15946 \SpecialChar \menuseparator
15955 or, if you need more control on the result,
15962 \SpecialChar \menuseparator
15971 If you use the later, note that it is possible to configure, in
15978 \SpecialChar \menuseparator
15986 , the options passed to the dvips program to achieve different effects.
15989 \begin_layout Subsection
15993 \begin_layout Standard
15994 Exporting as ASCII attempts to preserve the
15995 \begin_inset Quotes eld
15999 \begin_inset Quotes erd
16002 of the document as well as possible, but things like centering and indentation
16003 are thrown out; paragraphs are separated by blank lines.
16004 Section numbering and cross-references are done correctly, so the resulting
16005 text files is remarkably readable.
16006 The only changeable option is the length of lines, as for LaTeX output.
16009 \begin_layout Subsection
16013 \begin_layout Standard
16014 LyX documents can be converted to hypertext markup, usually by converting
16015 to LaTeX first, then converting that to HTML\SpecialChar \@.
16017 \begin_inset Formula $\rightarrow$
16020 HTML converters are currently known to LyX:
16037 Though they are autodetected, you can overide the selection in preferences.
16038 You can also include further command line options in this dialog.
16042 \begin_layout Subsection
16046 \begin_layout Standard
16054 \begin_layout Standard
16055 \begin_inset VSpace bigskip
16061 \begin_layout Standard
16062 The fastest way to generate a basic PDF file (no tags, links, etc.) with
16063 any version of LyX is to save the document as a Postscript® file, then
16069 Starting with version 1.1.6, the menu item
16073 will do all this for you.
16074 There are some issues with fonts that you need to pay attention to: see
16075 Section\InsetSpace ~
16077 \begin_inset LatexCommand \ref{sec:badfonts}
16082 Also, as of version 1.1.6, there is a better method that will generate much
16083 more sophisticated files.
16086 \begin_layout Subsubsection
16090 \begin_layout Standard
16091 With pdfLaTeX you need to convert your eps figures to PDF (see Section\InsetSpace ~
16093 \begin_inset LatexCommand \ref{sec:pdfeps}
16097 ), and you cannot use pstricks.
16098 On the other hand, with pdfLaTeX it is possible to insert directly images
16099 in JPEG or PNG format, use TrueType fonts, and more.
16102 \begin_layout Subsubsection
16103 Why does the text look so bad when viewed with Acrobat Reader?
16104 \begin_inset LatexCommand \label{sec:badfonts}
16109 \begin_inset OptArg
16112 \begin_layout Standard
16113 Bad Fonts in Acrobat Reader
16121 \begin_layout Standard
16122 The problem is that bitmap fonts are displayed poorly by Acrobat Reader.
16123 When creating a PDF from the LyX file, you need to use outline font instead
16124 of the default bitmap fonts (in fact, you should also use outline fonts
16125 for Postscript files).
16126 Recent LaTeX distributions come with Postscript® Type 1 version of the
16127 standard (Computer Modern) fonts.
16128 pdfLaTeX uses these font by default.
16129 Dvips doesn't use these fonts by default, so to make it use them, add the
16130 following to lines to your
16137 \begin_layout LyX-Code
16141 \begin_layout LyX-Code
16145 \begin_layout Standard
16146 If the default LaTeX font encoding (OT1) is used, nothing else need to be
16148 However, if the T1 font encoding is used, then LaTeX uses the newer EC
16149 fonts, for which there are no Type1 version.
16150 There are two solutions in this case: Either use the
16151 \begin_inset Quotes eld
16155 \begin_inset Quotes erd
16158 (which is in fact a
16159 \begin_inset Quotes eld
16163 \begin_inset Quotes erd
16166 font that emulates T1 coded fonts using the standard CM fonts).
16167 This is done by selecting
16168 \begin_inset Quotes eld
16171 AE (Almost European)
16172 \begin_inset Quotes erd
16177 Document\SpecialChar \menuseparator
16178 Settings\SpecialChar \menuseparator
16179 Fonts\SpecialChar \menuseparator
16183 However, some glyphs are missing from the CM fonts (e.g.
16184 eth, thorn), and they are taken from the EC fonts.
16185 Therefore you get these glyphs as bitmaps.
16187 \begin_inset Quotes eld
16191 \begin_inset Quotes erd
16196 Document\SpecialChar \menuseparator
16197 Settings\SpecialChar \menuseparator
16198 Fonts\SpecialChar \menuseparator
16202 It is a newer and probably the best Postscript® Type 1 version of cm.
16203 Basically, we recommend this over the
16204 \begin_inset Quotes eld
16208 \begin_inset Quotes erd
16212 However, the Latin Modern fonts differ from cm in some visual aspects,
16213 which does not please everybody.
16216 \begin_layout Standard
16217 Note: LyX uses by default the T1 font encoding.
16218 If you wish to use the default font encoding (this is not recommended,
16219 unless you only write English documents), clear the field
16227 in preferences (tabs
16239 \begin_layout Standard
16240 An alternate option is to use the standard Postscript® fonts instead of
16241 the Computer Modern fonts.
16242 To do that, you just need to select one of the fonts listed in the document
16243 layout dialog (except for
16244 \begin_inset Quotes eld
16248 \begin_inset Quotes erd
16252 \begin_inset Quotes eld
16256 \begin_inset Quotes erd
16259 , they're all Postscript® fonts).
16260 When using the Postscript® fonts, the result PDF file is smaller as the
16261 fonts are not saved into the file.
16262 Furthermore, the Postscript® fonts include all T1 glyphs.
16263 On the other hand, the Postscript® fonts have no bold symbol font, so poor
16264 man's bold must be used (see Section\InsetSpace ~
16266 \begin_inset LatexCommand \ref{sec:pdfbold}
16271 The Postscript® fonts also look different from the Computer Modern fonts.
16274 \begin_layout Standard
16275 To sum up, both the Computer Modern and the Postscript® fonts gives good
16276 results (with few exceptions).
16277 The decision of which one to use is a matter of taste.
16280 \begin_layout Subsubsection
16283 boldsymbol{} command work when I use pslatex?
16284 \begin_inset LatexCommand \label{sec:pdfbold}
16289 \begin_inset OptArg
16292 \begin_layout Standard
16309 \begin_layout Standard
16310 The Postscript® fonts do not have a bold symbol font.
16311 The solution is to use the
16317 (poor man's bold) command.
16320 \begin_layout Standard
16321 It is possible to redefine the
16336 \begin_layout LyX-Code
16346 \begin_layout Standard
16350 \begin_layout Subsubsection
16351 Is it possible to do write latex code which is processed only when running
16353 \begin_inset OptArg
16356 \begin_layout Standard
16357 Conditionals with pdfLaTeX
16365 \begin_layout Standard
16367 Here is an example:
16370 \begin_layout LyX-Code
16378 \begin_layout LyX-Code
16388 \begin_layout LyX-Code
16394 \begin_layout LyX-Code
16400 \begin_layout LyX-Code
16406 \begin_layout LyX-Code
16412 \begin_layout LyX-Code
16416 \begin_layout LyX-Code
16422 \begin_layout LyX-Code
16425 pdfinfo { /Author (your name and e-mail address)
16428 \begin_layout LyX-Code
16429 /Title (official title -- i.e., title element)
16432 \begin_layout LyX-Code
16433 /Subject (one line description of the document)
16436 \begin_layout LyX-Code
16440 \begin_layout LyX-Code
16443 pdfcatalog { /PageMode (/UseNone)
16446 \begin_layout LyX-Code
16447 % /OpenAction (fitbh)
16450 \begin_layout LyX-Code
16454 \begin_layout LyX-Code
16457 usepackage[pdftex]{hyperref}
16460 \begin_layout LyX-Code
16466 \begin_layout LyX-Code
16469 usepackage[ps2pdf]{hyperref}
16472 \begin_layout LyX-Code
16478 \begin_layout Subsubsection
16479 How can I make URLs clickable ?
16482 \begin_layout Standard
16483 See the references here :
16486 \begin_layout Standard
16487 \begin_inset LatexCommand \url{http://wiki.lyx.org/pmwiki.php/FAQ/PDF}
16494 \begin_layout Subsection
16498 \begin_layout Standard
16499 Custom exports are possible if you have some particularly weird format you
16500 wish to convert to, assuming you have the relevant converter, of course.
16505 file can be chosen in the
16510 ile\SpecialChar \menuseparator
16515 xport\SpecialChar \menuseparator
16522 dialog; LyX will automatically convert the file to this point, then feed
16523 it to your custom converter.
16524 The possible values are all formats that LyX can produce from its own documents.
16528 \begin_layout Standard
16529 The converter command is also specified in the dialog.It should be a completely
16530 qualified command line which uses the variable
16534 to specify the name of the file.
16535 If this variable is not given, then the file will be sent to the standard
16536 input of your command.
16537 You may have to apply a bit of ingenuity to escape this sequence correctly
16538 so that it is compatible with your shell.
16542 \begin_layout Standard
16543 While it is not possible to save this command using the
16547 dialog, you can manually edit your
16554 \begin_layout LyX-Code
16557 custom_export_command "mycommand $$FName"
16560 \begin_layout Section
16561 The Complete reLyX Description
16562 \begin_inset LatexCommand \label{sec:reLyX}
16569 \begin_layout Subsection
16573 \begin_layout Standard
16574 The simplest way to use reLyX is via the
16579 ile\SpecialChar \menuseparator
16587 That runs reLyX on the given file and loads the resulting file into LyX.
16588 You should try that first, and call it from the command line only if you
16589 need to use more complicated options.
16592 \begin_layout Standard
16644 \begin_layout Standard
16700 \begin_layout Standard
16710 \begin_layout Subsection
16714 \begin_layout Description
16720 By default, when reLyX sees a
16726 command, it creates a file of textclass
16727 \begin_inset Quotes eld
16731 \begin_inset Quotes erd
16734 and reads the LyX layout file for that class.
16739 to declare a different textclass (and read a different layout file).
16742 \begin_layout Description
16748 By default, reLyX gives sparse output and deletes the temporary files which
16749 were created during translation.
16754 flag will create much more output (both to stdout and stderr) and leave
16755 the temporary files around.
16758 \begin_layout Description
16764 reLyX will not run if the
16768 file it would generate already exists Use the
16772 option (carefully) to clobber any existing files.
16775 \begin_layout Description
16781 Print out usage information and quit
16784 \begin_layout Description
16790 With this option, all temporary files and LyX output files (for the given
16791 input file, for any included files, or for any file fragments given with
16796 option) will be put into
16801 Otherwise, for each file
16805 , the temporary files and the LyX output file will be created in
16810 This can be useful if a file includes files from other directories which
16811 you want to consolidate in one directory, or if you don't have write permission
16812 on the directory the LaTeX files are in.
16815 \begin_layout Description
16821 The input files are LaTeX fragments, with no preamble matter or
16828 This option requires the
16832 option, since there are no
16838 commands in the files reLyX is translating.
16839 When using this option, you can translate more than one file, as long as
16840 all files are the same class.
16841 The LyX file created by reLyX can be included in an existing LyX file using
16847 nsert\SpecialChar \menuseparator
16852 \SpecialChar \menuseparator
16863 \begin_layout Description
16868 Regular environments (see the Section\InsetSpace ~
16870 \begin_inset LatexCommand \ref{sub:relyx-syntax}
16875 If you give more than one environment, separate them with commas (not
16877 You'll probably need to quote the environment list, especially if it has
16878 asterisk environments (foo*) in it.
16879 If you use this command often, considering creating a personal syntax file.
16882 \begin_layout Description
16888 Input (one or more quoted, comma-separated) syntax files to read in addition
16890 (see the section Section\InsetSpace ~
16892 \begin_inset LatexCommand \ref{sub:relyx-syntax}
16899 \begin_layout Subsection
16903 \begin_layout Subsubsection
16907 \begin_layout Standard
16908 reLyX will create a LyX file
16912 from the LaTeX file
16923 \begin_layout Standard
16941 does not exist and does not have one of these suffixes, reLyX will try
16947 (This is similar to the behavior of LaTeX.)
16950 \begin_layout Standard
16951 The purpose of reLyX is to translate
16956 If your LaTeX file doesn't compile---or if you do weird things, like redefining
16957 standard LaTeX commands---it may choke.
16958 LaTeX209 will often be translated correctly, but it's not guaranteed.
16961 \begin_layout Standard
16962 reLyX has some bugs and lacks a few features.
16963 However, its main goals are:
16966 \begin_layout Itemize
16967 Get through a well-behaved LaTeX2e file without crashing
16970 \begin_layout Itemize
16971 Translate a lot of that file.
16974 \begin_layout Itemize
16975 Localize the parts that can't be translated and copy them in TeX mode
16978 \begin_layout Standard
16979 It achieves these main goals pretty well on most files.
16982 \begin_layout Standard
16983 There are many improvements that can and will be made to reLyX in the future.
16984 However, we wanted to get reLyX out there early on, to make it easier for
16985 new LyX users to read in their existing LaTeX files.
16988 \begin_layout Subsubsection
16992 \begin_layout Standard
16993 Here's a more lengthy description of what you should do to translate a LaTeX
16997 \begin_layout Itemize
17002 \begin_layout Standard
17003 reLyX will inform you of its progress and give any warnings to stderr, so
17004 if you don't want any output at all, try (in csh)
17005 \begin_inset Quotes eld
17010 reLyX foo.tex >& /dev/null
17013 \begin_inset Quotes erd
17017 \begin_inset Quotes eld
17029 \begin_inset Quotes erd
17033 You should NOT redirect standard output to
17042 \begin_layout Itemize
17043 Run LyX on the resulting .lyx file.
17047 \begin_layout Standard
17048 In theory, most of the file will have been translated, and anything that's
17049 untranslatable will be highlighted in red (TeX mode).
17050 In theory, LyX will be able to read in the file, and to create printed
17051 documents from it, because all that untranslated red stuff will be passed
17052 directly back to LaTeX, which LyX uses as a backend.
17053 Unfortunately, reality doesn't always reflect theory.
17054 If reLyX crashes, or LyX cannot read the generated LyX file, see Section\InsetSpace ~
17056 \begin_inset LatexCommand \ref{sub:relyx-bugs}
17068 \begin_layout Itemize
17069 Change things that are in ERT boxes (TeX code) by hand in LyX.
17073 \begin_layout Standard
17074 As mentioned above, you should be able to print out the LyX file even without
17076 However, changing a command in TeX mode to the corresponding LyX object
17077 will allow you to take advantage of LyX's WYSIWYM editing.
17080 \begin_layout Standard
17081 reLyX is not guaranteed to create a LyX file which generates exactly the
17082 same output as the LaTeX file, but it should come close.
17083 reLyX will generally err on the side of translating less to ensure that
17084 dvi or ps files are accurate, even though this leads to more
17085 \begin_inset Quotes eld
17089 \begin_inset Quotes erd
17096 \begin_layout Itemize
17097 PROOFREAD THE DOCUMENT!!
17101 \begin_layout Standard
17102 I'm sure you were planning on doing this anyway, but it's particularly important
17103 after translating a LaTeX document.
17104 reLyX is, at least now, better at
17105 \begin_inset Quotes eld
17109 \begin_inset Quotes erd
17112 (translating the whole document) than
17113 \begin_inset Quotes eld
17117 \begin_inset Quotes erd
17120 (translating every little detail).
17121 For example, you may see extra spaces or deleted spaces.
17122 Space handling has improved, but it's not perfect.
17126 \begin_layout Subsubsection
17127 What reLyX Can Handle
17130 \begin_layout Standard
17131 reLyX understands many LaTeX commands.
17135 \begin_layout Itemize
17136 regular text, including mini-commands like ~, '',
17148 , as well as accented characters like
17154 , and the special cases ?` and !`
17157 \begin_layout Itemize
17158 title commands like
17182 and the abstract environment
17185 \begin_layout Itemize
17186 heading commands like
17192 including starred commands (
17201 \begin_layout Itemize
17227 \begin_layout Itemize
17240 environments, and their
17247 Also, well-behaved nested lists
17250 \begin_layout Itemize
17251 cross-referencing commands:
17276 \begin_layout Itemize
17290 \begin_layout Itemize
17291 font-changing commands including
17309 , and corresponding commands to change family, size, series, and shape
17312 \begin_layout Itemize
17339 \begin_inset Quotes erd
17349 \begin_inset Quotes erd
17355 \begin_layout Itemize
17360 environment, and commands that go inside it like
17381 \begin_layout Itemize
17396 commands within them
17399 \begin_layout Itemize
17410 command, as well as BibTeX's
17425 \begin_layout Itemize
17426 miscellaneous commands:
17455 \begin_layout Itemize
17456 documentclass-specific environments (and some commands) which can be translated
17460 \begin_layout Itemize
17461 arguments to certain untranslatable commands (e.g.
17471 \begin_layout Standard
17472 Some of this support may not be 100% yet.
17473 See below for details
17476 \begin_layout Standard
17477 reLyX copies math (almost) verbatim from your LaTeX file.
17478 Luckily, LyX reads in LaTeX math, so (almost) any math which is supported
17479 by LyX should work just fine.
17480 A few math commands which are not supported by LyX will be replaced with
17481 their equivalents, e.g.,
17501 \begin_layout Standard
17502 reLyX will also copy any preamble commands (i.e., anything before
17508 ) verbatim, so fancy stuff you've got in your preamble should be conserved
17509 in dvi and printed documents, although it will not of course show up in
17511 Check the preamble to make sure.
17514 \begin_layout Subsubsection
17515 What reLyX Can't Handle --- But it's OK
17518 \begin_layout Itemize
17526 \begin_layout Itemize
17530 \begin_layout Itemize
17552 \begin_layout Itemize
17572 \begin_layout Itemize
17584 reLyX is careful to copy
17588 in this case, including comments and whitespace.
17591 \begin_layout Itemize
17592 some unknown (e.g., user-defined) environments and commands
17595 \begin_layout Standard
17596 reLyX copies unknown commands, along with their arguments, verbatim into
17604 where it doesn't recognize the
17605 \begin_inset Quotes eld
17609 \begin_inset Quotes erd
17612 environment, it will copy verbatim until it sees
17618 (unless you use the
17623 Hopefully, then, most of these unknown commands won't cause reLyX to break;
17624 they'll merely require you to do some editing once you've loaded the file
17626 That should be less painful than editing either the
17634 file using a text editor.
17637 \begin_layout Subsubsection
17638 What reLyX Handles Badly --- a.\InsetSpace ~
17642 \begin_inset LatexCommand \label{sub:relyx-bugs}
17649 \begin_layout Standard
17650 Since reLyX is relatively new, it's got a number of problems.
17651 As it matures, these bugs will be squished.
17652 A number of bugs and missing features can be found listed on the LyX bug
17654 \begin_inset LatexCommand \url[LyX Bugzilla]{http://bugzilla.lyx.org/}
17661 \begin_layout Standard
17662 If reLyX is choking on something, or LyX can't read it after reLyX translates
17663 it, the best thing to do is to put
17669 before the offending text, and
17677 \begin_inset Quotes eld
17681 \begin_inset Quotes erd
17685 reLyX will copy this block exactly, in TeX mode.
17686 Then edit the resulting LyX file, and translate the unknown stuff by hand.
17691 environment is magical; the
17703 commands will not be put into the LyX file.
17706 \begin_layout Itemize
17707 \begin_inset Quotes eld
17711 \begin_inset Quotes erd
17714 copying of unknown environments and commands isn't quite exact.
17715 Specifically, newlines and comments may be lost.
17716 This will yield ugly LyX, but in almost all cases the output will be the
17718 However, certain parts of the file will be copied perfectly, including
17719 whitespace and comments.
17720 This includes: the LaTeX preamble,
17730 commands, and skip blocks.
17733 \begin_layout Itemize
17734 reLyX translates only a few options to the
17741 (Specifically 1[012]pt, [letter|legal|executive|a4|a5|b5]paper, [one|two]side,
17742 landscape, and [one|two]column.) Other options are placed in the extra class
17743 options field in the
17748 ocument\SpecialChar \menuseparator
17759 \begin_layout Standard
17760 More importantly, reLyX doesn't translate
17766 commands, margin commands,
17772 s, or, in fact, anything else from the preamble.
17773 It simply copies them into the LaTeX preamble.
17774 If you have margin commands in your preamble, then the LyX file will generate
17776 However, these margins will override any margins you set in the LyX
17783 \SpecialChar \menuseparator
17789 So you should remove the options from the preamble to be safe.
17790 The same goes for setting your language with babel,
17806 \begin_layout Itemize
17807 The foil class has a couple bugs.
17808 reLyX may do weird things with optional arguments to
17815 Also, it may handle
17821 incorrectly (although the stuff in the environment should translate normally).
17824 \begin_layout Standard
17825 reLyX is hopefully rather robust.
17826 As mentioned above, it may not translate your file perfectly, but it shouldn't
17828 If it does crash---and the problem is not one of those mentioned above
17833 file---see Section\InsetSpace ~
17835 \begin_inset LatexCommand \ref{sub:relyx-bug-reports}
17842 \begin_layout Subsubsection
17843 What LyX Can't Handle
17846 \begin_layout Standard
17847 LyX itself is missing a couple features, such that even if reLyX translates
17848 things perfectly, LyX may still have trouble reading it.
17849 If you really need these features, you can export your final document as
17850 LaTeX, and put them back in.
17855 for more details on these bugs.
17858 \begin_layout Itemize
17859 For a number of commands, LyX does not support the optional argument.
17872 (and other sectioning commands), and
17881 reLyX will automatically discard the optional arguments with a warning
17883 LyX also ignores the width argument for the
17890 \begin_layout Itemize
17891 Centering (or right or left justifying) works on full paragraphs.
17894 \begin_layout Itemize
17895 LyX support for tables isn't perfect.
17896 For complicated tables, use a
17897 \begin_inset Quotes eld
17901 \begin_inset Quotes erd
17904 block, so that they will be copied in TeX mode.
17907 \begin_layout Itemize
17908 The LyX math editor can't handle the AMS-LaTeX math environments align,
17910 So those environments will be copied in TeX mode.
17915 environments to the exactly equivalent displaymath, and then they will
17916 be translated correctly.
17919 \begin_layout Subsection
17923 \begin_layout Standard
17927 \begin_inset Quotes eld
17931 \begin_inset Quotes erd
17935 \begin_inset Quotes eld
17939 \begin_inset Quotes erd
17942 foo.tex > foo.debug
17945 \begin_layout Standard
17946 The above will create a file my/dir/foo.lyx from foo.tex, overwriting if necessary.
17956 block, it will translate the stuff within the block, but copy the
17968 commands in TeX mode.
17969 Finally, I'm going to keep the temporary files around (they will also
17970 be in my/dir/) and output lots of debugging information into the file foo.debug.
17973 \begin_layout Subsection
17977 \begin_layout Subsubsection
17979 \begin_inset LatexCommand \label{sub:relyx-bug-reports}
17986 \begin_layout Standard
17987 If reLyX is crashing or otherwise acting strangely---in ways other than
17988 those described in Section\InsetSpace ~
17990 \begin_inset LatexCommand \ref{sub:relyx-bugs}
17994 or the bug tracker---then please run reLyX
17999 That will allow you to figure out where in the reLyXing process it crashed.
18000 That, in turn, will allow you to write a better bug report, which will
18001 allow the developers to fix it more quickly and easily.
18004 \begin_layout Standard
18005 Bug reports should be sent to the LyX developers' mailing list.
18006 Its address is currently
18008 lyx-devel@lists.lyx.org
18011 If you are running reLyX on a huge file, please do not send all of the
18012 output in your bug report.
18013 Just include the last ten or twenty lines of output, along with the piece
18014 of the LaTeX file it crashed on.
18015 Or, even better, attach a small but complete file which causes the same
18016 problem as your original file.
18019 \begin_layout Subsubsection
18020 Implementation Details:
18023 \begin_layout Standard
18024 reLyX makes several
18025 \begin_inset Quotes eld
18029 \begin_inset Quotes erd
18032 in order to translate a TeX file.
18033 On each pass, it creates one or two files.
18036 \begin_layout Description
18041 Before doing anything, read the syntax file (or files).
18044 \begin_layout Description
18049 Split preamble (anything before a
18055 command) off the rest of the file.
18056 It saves the two pieces in separate files.
18057 This is necessary because there may be very strange stuff in a preamble.
18058 It also ignores anything after the
18064 , on the assumption that it isn't LaTeX.
18067 \begin_layout Description
18072 Translate the preamble.
18073 Currently, that just means translating the
18079 command and copying the rest exactly into the LyX preamble.
18083 \begin_layout Standard
18084 Once you know what class the document is, read the LyX layout file for that
18089 \begin_layout Description
18095 \begin_inset Quotes eld
18099 \begin_inset Quotes erd
18102 the TeX file, generating slightly stricter LaTeX.
18107 \begin_layout Itemize
18112 to the equivalent but clearer
18117 \begin_layout Itemize
18118 Removing optional arguments that LyX can't handle (e.g., from
18127 \begin_layout Itemize
18141 This is necessary because LyX always writes out the non-local forms anyway.
18142 This should very rarely make a difference.
18146 \begin_layout Description
18151 Translate LaTeX text, commands, and environments to LyX.
18154 \begin_layout Description
18159 Put the two pieces back together, and do some final tweaking, to generate
18163 \begin_layout Standard
18176 commands, reLyX will loop back to the beginning and translate those.
18177 It assumes that the included files are the same class as the main file,
18178 and that they have no preamble matter.
18185 command in the preamble of a file, the command will be copied exactly into
18186 the LaTeX preamble portion of the LyX file, so the included file won't
18187 be translated.) So when translating included files, it skips passes 0 and
18191 \begin_layout Standard
18192 If reLyX doesn't find a file you wanted to include, it will give a warning,
18193 but will continue to translate any files it does find.
18196 \begin_layout Subsubsection
18200 \begin_layout Standard
18201 reLyX reads a LyX layout file to know how to handle LaTeX environments and
18202 commands which get translated to LyX layouts.
18203 This file will include all
18204 \begin_inset Quotes eld
18208 \begin_inset Quotes erd
18211 non-math environments (i.e., including quote and itemize, but not tabular,
18212 minipage, and some other fancy environments), and commands like
18225 If you want to reLyX a class that doesn't have an existing layout file,
18226 then you'll have to create a layout file.
18227 But you have to do this anyway, in order to LyX the file, since LyX depends
18228 on layout files to know how to display and process its files.
18229 Check the LyX documentation for help with this task (which can be hard
18230 or easy, depending on the class you want to create a layout file for.) If
18231 your class is quite similar to a class that has a layout file, then consider
18239 \begin_layout Subsubsection
18241 \begin_inset LatexCommand \label{sub:relyx-syntax}
18248 \begin_layout Standard
18249 reLyX always reads at least one syntax file, called the default syntax file.
18250 reLyX will read your personal syntax file if it exists; otherwise it will
18251 read the system-wide file.
18252 reLyX will read additional syntax files if you specify them with the
18257 (These extra files should have the same format as the default file, but
18258 will tend to be shorter, since they only have to specify extra commands
18259 not found in the default file.) A syntax file tells reLyX a few things.
18262 \begin_layout Standard
18263 First, it describes the syntax of each command, that is, how many required
18264 arguments and how many optional arguments the command takes.
18265 Knowing this makes it easier for reLyX to copy (in TeX mode) commands that
18266 it doesn't know how to translate.
18267 The syntax file simply has a command, followed by braces or brackets describing
18268 its arguments in the correct order.
18269 For example, a syntax file entry
18281 command takes an optional argument followed by a required one, while the
18294 command takes no arguments at all.
18295 When reLyX encounters a token that it doesn't know how to translate into
18296 LyX, it will copy the token---along with the correct number of arguments---exac
18298 If the token is not in the syntax file, then reLyX just copies as many
18299 arguments as it finds.
18300 This means that it may copy too much.
18301 But since the user can specify additional syntax files, that shouldn't
18305 \begin_layout Standard
18306 Some commands that cannot be translated to LyX, like
18312 , have as one of their arguments regular LaTeX text.
18314 \begin_inset Quotes eld
18318 \begin_inset Quotes erd
18321 is put into an argument of an (untranslatable) command in the syntax file,
18322 then reLyX will translate that argument instead of copying it verbatim.
18323 So, for example, the default syntax file has
18327 raisebox{}[][]{translate}
18330 This means that the
18336 command and the first argument (and optional arguments if they exist) are
18337 copied in TeX mode, but the last argument (which may contain math, complicated
18338 LaTeX, other untranslatable commands, etc.) will be translated into LyX.
18340 \begin_inset Quotes eld
18344 \begin_inset Quotes erd
18347 on optional arguments.
18350 \begin_layout Standard
18351 User-defined syntax files are allowed to define new commands and their syntax,
18352 or override the number of arguments for a command given in the default
18354 (E.g., if you're using a style that gives an extra argument to some command...)
18355 However, this will only be useful for commands copied in TeX mode.
18356 Commands which are actually translated by reLyX (like
18362 ) have their argument syntax hard-coded.
18363 The hard-coded commands are identified in the default syntax file.
18366 \begin_layout Standard
18367 Second, the syntax file describes any
18368 \begin_inset Quotes eld
18371 regular environments
18372 \begin_inset Quotes erd
18376 Usually, an entire unknown environment will be copied in TeX mode.
18377 If you define a regular environment
18378 \begin_inset Quotes eld
18382 \begin_inset Quotes erd
18385 , though, then only the
18397 commands will be copied in TeX mode; the text within the environment will
18398 be treated (i.e., translated) by reLyX as regular LaTeX, rather than being
18399 copied into TeX mode.
18400 Don't try to declare
18408 as regular environments, as the text within those environments will confuse
18409 reLyX; use this capability for new environments you create that have plain
18410 text or math or simple commands in them.
18411 You also can't declare unknown math environments (like
18415 ) as regular environments, either, since the LyX math editor won't understand
18417 The names of regular environments appear, whitespace-separated, between
18430 statements in the syntax file.
18431 (If you have a regular environment which you won't use very often, you
18436 option rather than writing a syntax file.)
18439 \begin_layout Standard
18440 Third, the syntax file describes a math translation table.
18441 The LyX math editor doesn't support a few commands.
18446 is supported, but the equivalent
18453 Put any commands you'd like translate between
18467 \begin_inset Quotes eld
18479 \begin_inset Quotes erd
18488 in math mode will be converted to
18489 \begin_inset Quotes eld
18499 \begin_inset Quotes erd
18506 (in cases where a token made up of a backslash and a non-letter is translated
18507 to something with letters at the end, a space is added by reLyX.
18509 \begin_inset Quotes eld
18519 \begin_inset Quotes erd
18522 is correctly translated to
18523 \begin_inset Quotes eld
18533 \begin_inset Quotes erd
18539 \begin_layout Subsubsection
18543 \begin_layout Standard
18544 You need Perl version 5.002 or later to run reLyX.
18545 <plug> If you don't have Perl, you should get it anyway (at
18546 \begin_inset LatexCommand \url[Perl]{http://www.perl.com/}
18550 ), because it's a really useful tool for pretty much anything.
18554 \begin_layout Subsection
18558 \begin_layout Standard
18559 reLyX should always explain why it crashes, if it crashes.
18560 Some diagnostics may be very technical, though, if they come from the guts
18562 reLyX gives much more information while running if you use the
18566 option, but you shouldn't need that unless something goes wrong.
18569 \begin_layout Standard
18570 When it's finished, reLyX will tell you if it finished successfully or died
18574 \begin_layout Subsection
18578 \begin_layout Standard
18579 Always keep a copy of your original LaTeX files either under a different
18580 name or in a different directory.
18581 There are a couple ways in which using LyX could lead to overwriting the
18582 original LaTeX file.
18585 \begin_layout Standard
18598 and want to re-export it, note that it will overwrite the original
18607 ask you if you want to overwrite it.)
18610 \begin_layout Standard
18611 If you have chosen not to use a temporary directory in the preferences,
18612 then LyX will create its temporary files in your current directory, which
18613 means your LaTeX original may be overwritten (without a warning from LyX)
18615 \begin_inset Quotes eld
18619 \begin_inset Quotes erd
18622 or print the LyX document.
18625 \begin_layout Subsection
18629 \begin_layout Description
18633 MY_LYXDIR/layouts/*.layout
18639 User's personal layout files for document classes
18642 \begin_layout Description
18646 MY_LYXDIR/reLyX/syntax.default
18652 User's personal syntax file
18655 \begin_layout Description
18659 LIBDIR/layouts/*.layout
18665 System-wide layout files for document classes
18668 \begin_layout Description
18672 LIBDIR/reLyX/syntax.default
18678 System-wide LaTeX syntax file
18681 \begin_layout Standard
18686 is the system-wide LyX directory, usually something like
18688 /usr/local/share/lyx/
18695 is your personal LyX directory, something like
18699 in your home directory.
18700 You can see their actual values in the
18705 elp\SpecialChar \menuseparator
18715 \begin_layout Subsection
18719 \begin_layout Standard
18731 \begin_layout Subsection
18735 \begin_layout Standard
18736 Copyright (c) 1998--9
18742 karger@voth.chem.utah.edu
18747 \begin_layout Standard
18751 \begin_layout Itemize
18756 wrote the original CleanTeX pass.
18759 \begin_layout Itemize
18765 \begin_layout Itemize
18773 \begin_layout Itemize
18776 David Suarez de Lis
18779 \begin_layout Standard
18780 Other contributors:
18783 \begin_layout Itemize
18786 Jean-Marc Lasgouttes
18788 worked on the wrapper script and offered lots of bug reports, advice, and
18789 feature suggestions.
18792 \begin_layout Itemize
18805 \begin_layout Itemize
18806 Various members of the LyX developers' and users' lists provided bug reports
18807 and feature suggestions.
18810 \begin_layout Standard
18811 reLyX uses a modified version the Perl TeX parser
18821 ilya@math.ohio-state.edu
18823 ), available on CPAN.
18826 \begin_layout Chapter
18827 LyX Features needing Extra Software
18830 \begin_layout Section
18831 Using LyX with SGML-Tools (aka LinuxDoc)
18834 \begin_layout Standard
18840 \begin_layout Subsection
18844 \begin_layout Standard
18845 LinuxDoc is a document class available in LyX if you have the
18850 You can use it to produce documents in the so-called Standardized General
18851 Mark-up Language (SGML) in the particular format used by the Linux Documentatio
18853 That is obviously helpful if you are contributing to that project.
18854 You can use the SGML format with the
18858 package of scripts and programs (to produce other formats, including Latex,
18859 HTML, plain text, man pages and\SpecialChar \ldots{}
18861 You may therefore prefer to use this document class if you want to write
18862 something that can be easily translated into other formats.
18865 \begin_layout Standard
18866 You will find that LinuxDoc has fewer layout options than the other text
18868 This is mainly so that the translations into other formats have a chance
18869 of making some sense.
18870 In this section we describe:
18873 \begin_layout Itemize
18874 how to setup and use a document in LinuxDoc
18877 \begin_layout Itemize
18878 how to use the tags in LinuxDoc to layout your document
18881 \begin_layout Itemize
18882 how to use the SGML packages to produce the various formats
18885 \begin_layout Itemize
18886 how to sort out some problems.
18889 \begin_layout Subsection
18890 Preparing and using a LinuxDoc document
18893 \begin_layout Subsubsection
18897 \begin_layout Standard
18898 You start by selecting the LinuxDoc class using the
18903 ocument\SpecialChar \menuseparator
18915 Then you will find that there are fewer paragraph environments than for
18916 most other classes.
18917 You can see them on the pull down box on the left of the tool bar.
18918 How to use them is described in section\InsetSpace ~
18920 \begin_inset LatexCommand \ref{sec:sgmlparas}
18927 \begin_layout Standard
18932 enter a title for the document, followed by an author, marking each with
18933 the appropriate paragraph environment.
18934 If you don't do this, you will get errors when you try to print the file.
18935 You can then enter the date and an abstract.
18936 The document proper must start with a Section paragraph environment rather
18937 than any standard layout.
18940 \begin_layout Standard
18941 After that you can prepare a document as usual using the available range
18942 of paragraph environments.
18943 See section\InsetSpace ~
18945 \begin_inset LatexCommand \ref{sec:sgmlparas}
18949 for the full list and their uses.
18952 \begin_layout Subsubsection
18953 Output from LinuxDoc
18956 \begin_layout Standard
18957 You can print and save these documents in the normal way.
18958 To use the other features of the SGML package you need to save your document
18959 as LinuxDoc; this is a version in which the document is translated into
18960 the basic sgml tags.
18967 ile\SpecialChar \menuseparator
18972 xport\SpecialChar \menuseparator
18980 You will get a file with the same name and a
18984 extension rather than a
18991 \begin_inset LatexCommand \ref{sec:sgmloperate}
18995 on how you than make use of this file.
18998 \begin_layout Subsection
18999 Using the paragraph environments in LinuxDoc
19002 \begin_layout Subsubsection
19003 The Structure of a LinuxDoc Document
19006 \begin_layout Standard
19007 There is a formal structure for LinuxDoc which limits how you can place
19009 There are two parts to all documents:
19012 \begin_layout Description
19013 Header: this is everything up to the first time you insert a Section layout
19015 It can include title, author, date, abstract and ToC.
19016 You must include the first two.
19019 \begin_layout Description
19020 Body: from the beginning of the first section onwards.
19021 All other tags are allowed.
19025 \begin_layout Subsubsection
19026 The LinuxDoc Paragraph Environments
19029 \begin_layout Standard
19030 \begin_inset LatexCommand \label{sec:sgmlparas}
19034 Here is a list of all the tags you will find listed on the layout bar in
19035 the order they come there, with some comments where the purpose or use
19039 \begin_layout Itemize
19044 works as described in [cross reference]
19047 \begin_layout Itemize
19052 : This will appear at the top left of the document when printed, above a
19053 heavy horizontal rule, although you will not see this on the LyX screen.
19056 \begin_layout Itemize
19059 Section, Subsection, Subsubsection, Paragraph and Subparagraph:
19061 all do what you would expect and in the usual order.
19062 Whether they are numbered or not is controlled by the
19064 Section\InsetSpace ~
19065 number\InsetSpace ~
19069 You cannot get the equivalent number free versions in any other way; there
19077 \begin_layout Itemize
19082 As usual this produces a numbered and indented list as described in the
19090 \begin_layout Itemize
19095 Again much the same as in the other classes: see the
19102 \begin_layout Itemize
19107 : As explained in the
19112 Remember that if you want the bold element at the start of a description
19113 to be more than one word then you need to put protected spaces between
19118 \begin_layout Itemize
19126 \begin_layout Itemize
19129 Code: similar to the Lyx-Code
19134 \begin_layout Itemize
19139 : Anything you mark with this will appear on the left of the heading of
19140 the document, under the heavy rule.
19143 \begin_layout Itemize
19148 Anything you mark with this will appear on the right of the heading under
19150 You do not have to make this a date.
19151 Any text can be entered, e.\InsetSpace ~
19156 \begin_layout Itemize
19161 : You can use this to produce a free standing paragraph after the author
19162 and date, and before the first section.
19163 You are only allowed one such paragraph.
19167 \begin_layout Standard
19173 This needs checking ---
19183 \begin_layout Itemize
19192 \begin_layout Standard
19197 I have not yet checked this ---
19207 \begin_layout Subsubsection
19208 Other document features
19211 \begin_layout Standard
19212 You can also use the
19216 menu to set fonts or to emphasis words.
19217 You can also use the table of contents as usual; see the corresponding
19223 Although you will find some some other features on the menus e.\InsetSpace ~
19225 inserting footnotes.
19226 There is some doubt about whether these will work correctly.
19230 \begin_layout Standard
19235 Again still checking to see whether this is my system
19245 \begin_layout Subsubsection
19246 Cross references and HTML
19249 \begin_layout Standard
19254 menu you will find two new options relating to the inclusion of URL addresses.
19255 If you use either option you will find some highlighted TeX code inserted
19256 into your document in three separate blocks with spaces available between.
19257 The blocks will be:
19260 \begin_layout Quote
19292 \begin_layout Standard
19293 You insert a full HTML tag between the first and second blocks.
19295 \begin_inset LatexCommand \url{http://any.address}
19299 or other valid tags such as
19300 \begin_inset LatexCommand \url{mailto:me@my.address}
19312 insert some description between the second and third blocks.
19313 The differences are:
19316 \begin_layout Itemize
19321 both the HTML tag and the description will appear in the document
19324 \begin_layout Itemize
19330 only the description appears in the printed version
19333 \begin_layout Subsection
19334 Using the LinuxDoc Sgml scripts
19335 \begin_inset Note Note
19338 \begin_layout Standard
19339 This section is completely outdated.
19347 \begin_layout Standard
19348 \begin_inset LatexCommand \label{sec:sgmloperate}
19352 You can use LinuxDoc as a text class without any additional scripts or programs,
19353 but there is not much point in doing this.
19354 All you will get is a document that looks like a
19356 Linux Documentation Project Howto
19362 To do the document translation you need to get and install the
19364 sgml-tools-1.0.x.tar.gz
19367 \begin_inset Formula $x\geq3$
19372 the SGML-Tools WWW Page
19377 \begin_layout LyX-Code
19380 \begin_inset LatexCommand \url{http://pobox.com/~cg/sgmltools}
19389 \begin_layout Standard
19390 Alternatively, you can go to the
19398 \begin_layout Standard
19399 Note that, at the time of this writing (01/1998), version 1.0.3 of sgml-tools
19400 has not yet been made available at
19412 \begin_layout LyX-Code
19415 \begin_inset LatexCommand \url{ftp://sunsite.unc.edu/pub/Linux/utils/text/sgml-tools-1.0.x.tar.gz}
19422 \begin_layout Standard
19429 sgml-tools-1.0.x.tar.gz
19431 contains everything that you need to write SGML documents and convert them
19432 to groff, LaTeX, HTML, GNU info, LyX, and RTF\SpecialChar \@.
19436 \begin_layout Standard
19437 This package was renamed from
19439 linuxdoc-sgml-1.5.tar.gz
19444 \begin_layout Standard
19445 Follow the instructions in that package on how to install it and how to
19447 All this has to be done outside of LyX, before you can use the
19452 ile\SpecialChar \menuseparator
19457 xport\SpecialChar \menuseparator
19464 \begin_layout Subsection
19465 Troubleshooting LinuxDoc
19468 \begin_layout Standard
19469 When you print or preview a LinuxDoc document some checking is done of the
19470 tags before LaTeX is run.
19471 Some errors are trapped here, especially those concerning the structure
19473 LyX may produce an error message, but not leave an error box in the document
19475 You may have to look at the files directly to discover what is wrong.
19476 Most problems seem to come from the use of options that are not fully available
19480 \begin_layout Section
19484 \begin_layout Standard
19490 \begin_layout Subsection
19494 \begin_layout Standard
19502 menu, you'll find a
19511 This feature requires you to have the
19515 program installed, and is grayed out if you don't have it.
19516 You can get it from your nearest CTAN mirror, or over the Web from
19517 \begin_inset LatexCommand \url{http://www.ifi.uio.no/~jensthi/chktex/}
19524 \begin_layout Standard
19529 package is a program that was written by
19534 in frustration because some constructs in LaTeX are sometimes non-intuitive,
19535 and easy to forget.
19536 The program runs over your LaTeX file and checks the integrity of the file,
19537 and flags some common errors.
19538 In other technical words, it is
19545 \begin_layout Standard
19546 Well, what is a syntax checker doing in LyX which is supposed to produce
19547 correct LaTeX anyways? The answer is simple: Just as
19551 not only checks the
19555 of C programs, but also does
19559 checks for type-errors,
19563 catches some common
19567 errors, in addition to the syntactical ones.
19572 is capable of detecting several common errors, such as
19575 \begin_layout Itemize
19576 Ellipsis detection:
19578 Use \SpecialChar \ldots{}
19582 \begin_layout Itemize
19583 No space in front of/after parenthesis:
19588 \begin_layout Itemize
19589 Enforcement of normal space after common abbreviations:
19593 is too wide spacing.
19596 \begin_layout Itemize
19597 Enforcement of end-of-sentence space when the last sentence ends with a
19601 And this is wrong spacing.
19604 \begin_layout Itemize
19605 Space in front of labels and similar commands:
19607 The label should stick right
19608 up to the text to avoid falling to a wrong page.
19610 \begin_inset LatexCommand \label{sec:chktex}
19618 \begin_layout Standard
19619 This footnote is in danger of falling off to a wrong page
19624 The label is separated too much.
19627 \begin_layout Itemize
19628 Space in front of references, instead of hard spaces:
19630 In you are in bad luck,
19631 the text will break right between the referenced text and reference number,
19634 \begin_inset LatexCommand \ref{sec:chktex}
19641 \begin_layout Itemize
19643 \begin_inset Quotes eld
19647 \begin_inset Quotes erd
19651 \begin_inset Formula $\times$
19656 2x2 looks cheap compared to
19657 \begin_inset Formula $2\times2$
19663 \begin_layout Standard
19664 and more \SpecialChar \ldots{}
19665 It is an invaluable tool when you are
19666 \begin_inset Quotes eld
19670 \begin_inset Quotes erd
19673 your document before printing, and you should run it right after the obligatory
19674 spelling check, and before you go fine tuning the typesetting.
19677 \begin_layout Subsection
19681 \begin_layout Standard
19682 If you have the program installed, usage is as simple as choosing
19687 ools\SpecialChar \menuseparator
19696 This will make LyX generate a LaTeX file of your document, start
19700 to check it, and then make LyX insert
19701 \begin_inset Quotes eld
19705 \begin_inset Quotes erd
19708 with the warnings from
19712 , if there were any.
19713 The warnings will be placed close to the point of the mistake, and you
19714 can quickly find them by using the
19719 avigate\SpecialChar \menuseparator
19726 menu item, or the shortcut key
19735 Open the error boxes by clicking on them with the mouse, or use the shortcut
19744 bindings, or the corresponding
19753 Read the warning and correct the mistake, if it is a mistake.
19754 If you have trouble understanding what the warning is about, you can safely
19756 Remember that there is a hidden layer between the document on screen and
19757 the technical details in invoking
19761 , and this gap can make some warnings seem arcane or just right down plain
19765 \begin_layout Standard
19766 This document is an excellent testing bed for the feature, and it should
19767 provide quite a few warnings for you to fiddle with.
19768 Since computers are only so smart, expect most of the warnings to be false
19772 \begin_layout Subsection
19773 How to fine tune it
19776 \begin_layout Standard
19777 Sometimes, you'll find that
19781 makes more noise than suits your mood.
19782 Then you can choose not to use it, wait until your mood changes, or try
19787 to get better along with you.
19788 Another choice in the most desperate situations is to use
19793 iew\SpecialChar \menuseparator
19803 , which will get rid of all warnings instantly.
19806 \begin_layout Standard
19815 very configurable and extensible, you shouldn't expect to solve all problems
19821 Since LyX has to generate a somewhat special LaTeX file to be able to match
19822 the line numbers from the
19830 \begin_layout Standard
19831 You can inspect the specific output from
19837 Edit\SpecialChar \menuseparator
19851 to the internal document structure, some of the warnings will not seen
19852 to appear correctly.
19853 There are two things you can do about this:
19856 \begin_layout Itemize
19861 invocation command line in
19877 installation configuration file (usually with the file
19879 /usr/local/share/chktexrc
19882 See below to learn what warnings can be enabled and disabled on the command
19887 \begin_layout Itemize
19888 Export your document as a raw LaTeX file using
19893 ile\SpecialChar \menuseparator
19898 xport\SpecialChar \menuseparator
19910 Invoked in this way, it can be a hassle to find the corresponding place
19911 in the document inside LyX, but with a little patience, you should be able
19915 \begin_layout Standard
19916 Here follows the warning messages that can be enabled and disabled in
19925 to disable a warning, and
19929 to enable a warning.
19930 The emphasized entries are disabled by default, because the default is
19933 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
19938 \begin_layout Standard
19939 Notice that you should only use the options that enable and disable warnings,
19940 because LyX relies on some of the other command line parameters to be set
19941 in a specific way to have a chance to communicate with
19948 \begin_layout Enumerate
19952 Command terminated with space.
19955 \begin_layout Enumerate
19958 Non-breaking space (
19959 \begin_inset Quotes eld
19967 \begin_inset Quotes erd
19970 ) should have been used.
19973 \begin_layout Enumerate
19977 You should enclose the previous parenthesis with
19978 \begin_inset Quotes eld
19986 \begin_inset Quotes erd
19992 \begin_layout Enumerate
19995 Italic correction (
19996 \begin_inset Quotes eld
20006 \begin_inset Quotes erd
20009 ) found in non-italic buffer.
20012 \begin_layout Enumerate
20015 Italic correction (
20016 \begin_inset Quotes eld
20026 \begin_inset Quotes erd
20029 ) found more than once.
20032 \begin_layout Enumerate
20036 No italic correction (
20037 \begin_inset Quotes eld
20047 \begin_inset Quotes erd
20053 \begin_layout Enumerate
20057 \begin_inset Quotes eld
20065 \begin_inset Quotes erd
20069 \begin_inset Quotes eld
20077 \begin_inset Quotes erd
20083 \begin_layout Enumerate
20086 Wrong length of dash may have been used.
20089 \begin_layout Enumerate
20093 \begin_inset Quotes eld
20101 \begin_inset Quotes erd
20105 \begin_inset Quotes eld
20113 \begin_inset Quotes erd
20119 \begin_layout Enumerate
20123 \begin_inset Quotes eld
20131 \begin_inset Quotes erd
20137 \begin_layout Enumerate
20141 \begin_inset Quotes eld
20149 \begin_inset Quotes erd
20152 to achieve an ellipsis.
20155 \begin_layout Enumerate
20158 Inter-word spacing (
20159 \begin_inset Quotes eld
20169 \begin_inset Quotes eld
20172 ) should perhaps be used.
20175 \begin_layout Enumerate
20178 Inter-sentence spacing (
20179 \begin_inset Quotes eld
20189 \begin_inset Quotes erd
20192 ) should perhaps be used.
20195 \begin_layout Enumerate
20198 Could not find argument for command.
20201 \begin_layout Enumerate
20205 \begin_inset Quotes eld
20213 \begin_inset Quotes erd
20219 \begin_layout Enumerate
20222 Math mode still on at end of LaTeX file.
20225 \begin_layout Enumerate
20229 \begin_inset Quotes eld
20237 \begin_inset Quotes erd
20240 doesn't match the number of
20241 \begin_inset Quotes eld
20249 \begin_inset Quotes erd
20255 \begin_layout Enumerate
20258 You should use either
20261 \begin_inset Quotes eld
20269 \begin_inset Quotes erd
20274 as an alternative to
20275 \begin_inset Quotes eld
20283 \begin_inset Quotes erd
20289 \begin_layout Enumerate
20296 " (ASCII 39) instead of "
20303 \begin_layout Enumerate
20306 User-specified pattern found.
20309 \begin_layout Enumerate
20312 This command might not be intended.
20315 \begin_layout Enumerate
20322 \begin_layout Enumerate
20340 \begin_layout Enumerate
20343 Delete this space to maintain correct page references.
20346 \begin_layout Enumerate
20350 You might wish to put this between a pair of
20351 \begin_inset Quotes eld
20359 \begin_inset Quotes erd
20365 \begin_layout Enumerate
20368 You ought to remove spaces in front of punctuation.
20371 \begin_layout Enumerate
20374 Could not execute LaTeX command.
20377 \begin_layout Enumerate
20386 in front of small punctuation.
20389 \begin_layout Enumerate
20397 may look prettier here.
20400 \begin_layout Enumerate
20404 Multiple spaces detected in output.
20407 \begin_layout Enumerate
20410 This text may be ignored.
20413 \begin_layout Enumerate
20419 \begin_inset Quotes eld
20424 to begin quotation, not
20431 \begin_layout Enumerate
20438 to end quotation, not
20441 \begin_inset Quotes eld
20449 \begin_layout Enumerate
20455 \begin_layout Enumerate
20458 You should perhaps use
20459 \begin_inset Quotes eld
20467 \begin_inset Quotes erd
20473 \begin_layout Enumerate
20476 You should put a space in front of/after parenthesis.
20479 \begin_layout Enumerate
20482 You should avoid spaces in front of/after parenthesis.
20485 \begin_layout Enumerate
20489 You should not use punctuation in front of/after quotes.
20492 \begin_layout Enumerate
20495 Double space found.
20498 \begin_layout Enumerate
20501 You should put punctuation outside inner/inside display math mode.
20504 \begin_layout Enumerate
20507 You ought to not use primitive TeX in LaTeX code.
20510 \begin_layout Enumerate
20513 You should remove spaces in front of
20514 \begin_inset Quotes eld
20522 \begin_inset Quotes erd
20528 \begin_layout Enumerate
20531 \begin_inset Quotes eld
20539 \begin_inset Quotes erd
20542 is normally not followed by
20543 \begin_inset Quotes eld
20551 \begin_inset Quotes erd
20557 \begin_layout Standard
20558 In later versions of LyX, we hope to provide a more complete interface to
20559 this tool (and it's smaller cousin
20563 ) to exploit the full power of it.
20564 But it's not exactly useless as it is now: go try it on one of your existing
20565 documents of a certain length and be surprised.
20568 \begin_layout Section
20569 Version Control in LyX
20572 \begin_layout Standard
20575 Lars Gullik Bjønnes
20578 \begin_layout Subsection
20582 \begin_layout Standard
20583 A friend of mine wanted to try LyX for a group project.
20584 When he didn't find support for version control or file locking, he dropped
20586 This angered me a bit, so I thought that I should at least make support
20587 for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
20588 This has now been done.
20589 LyX now supports some of the most basic RCS commands.
20590 If you need to something a bit more sophisticated you will have to do that
20591 manually in an xterm.
20594 \begin_layout Standard
20595 Before you begin to use the version control features in LyX, you should
20597 \begin_inset Quotes eld
20601 \begin_inset Quotes erd
20604 (a man file, read it with
20609 This file describes all the basic features of RCS.
20610 You should especially notice the comment about a RCS directory, and the
20611 notion of a master RCS file (the file ending in
20618 \begin_layout Standard
20619 The implementation in LyX assumes a recent version of the GNU RCS package---no
20620 guarantees are made for older versions.
20623 \begin_layout Subsection
20624 RCS commands in LyX
20627 \begin_layout Standard
20628 The following sections describe the RCS commands supported by LyX.
20629 You can find them in the
20634 ile\SpecialChar \menuseparator
20639 ersion\InsetSpace ~
20645 \begin_layout Subsubsection
20651 \begin_layout Standard
20652 If your document is not under revision control, this is the only item shown
20654 And if it is under revision control, the
20661 item is grayed out.
20665 \begin_layout Standard
20666 This command registers your document with RCS\SpecialChar \@.
20667 You are asked interactively
20668 to supply an initial description of the document.
20669 The document is now set in Read-Only mode and you have to
20676 , before making any changes to it.
20677 A document under revision control has a
20678 \begin_inset Quotes eld
20681 [RCS:<version> <locker>]
20682 \begin_inset Quotes erd
20685 item tagged to the filename in the minibuffer.
20688 \begin_layout Standard
20689 RCS command that is run:
20691 ci -q -u -i -t-"<initial description>" <file-name>
20694 \begin_layout Standard
20699 to understand the switches.
20703 \begin_layout Subsubsection
20709 \begin_layout Standard
20710 When you are finished editing a file, you check in your changes.
20711 When you do this, you are asked for a description of the changes.
20712 This is stored in the history log.
20713 The version number is bumped, your changes are applied to the master RCS
20714 file, the document is unlocked and set to Read-Only mode.
20718 \begin_layout Standard
20721 ci -q -u -m"<description>" <file-name>
20724 \begin_layout Subsubsection
20730 \begin_layout Standard
20731 By doing this you lock the document so that only you can edit it.
20732 This will also make the document Read-Write only for you.
20733 You will usually continue editing for a while and when you are finished
20734 you check in your changes.
20735 The status line is changed to reflect that you have locked the file.
20739 \begin_layout Standard
20742 co -q -l <file-name>
20745 \begin_layout Subsubsection
20748 Revert To Last Version
20751 \begin_layout Standard
20752 This will discard all changes made to the document since the last check
20754 You get a warning before changes are discarded.
20757 \begin_layout Standard
20760 co -f -u<version> <file-name>
20763 \begin_layout Subsubsection
20769 \begin_layout Standard
20770 This makes as if the last check in never happened.
20771 No changes are made to the document loaded into LyX, but the last version
20772 is removed from the master RCS file.
20776 \begin_layout Standard
20779 rcs -o<version> <file-name>
20782 \begin_layout Subsubsection
20788 \begin_layout Standard
20789 This show the complete history of the RCS document.
20794 is shown in a browser.
20802 \begin_layout Section
20803 Literate Programming
20806 \begin_layout Standard
20811 (kayvan@sylvan.com)
20815 original documentation written by
20817 Edmar Wienskoski Jr.
20820 (edmar-w-jr@technologist.com)
20823 \begin_layout Subsection
20827 \begin_layout Standard
20828 The main purpose of this documentation is to show you how to use LyX for
20829 literate programming.
20830 Where it is assumed that you are familiar with this programming technique,
20832 \begin_inset Quotes eld
20836 \begin_inset Quotes erd
20840 \begin_inset Quotes eld
20844 \begin_inset Quotes erd
20848 If that is not the case, please follow the web links provided in the following
20850 There is a lot of good documentation out there covering old development
20851 history to the latest tools tips.
20854 \begin_layout Standard
20855 It is also assumed that you are familiar with LyX itself to a point that
20856 you are comfortable changing your LyX preferences, and X resources file.
20857 If that is not the case please refer to other LyX documentation to cover
20858 your specific needs.
20861 \begin_layout Subsection
20862 Literate Programming
20865 \begin_layout Standard
20866 From the Literate Programming FAQ:
20869 \begin_layout Quotation
20870 Literate programming is the combination of documentation and source together
20871 in a fashion suited for reading by human beings.
20872 In fact, literate programs should be enjoyable reading, even inviting!
20873 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
20874 and documentation in a single file.
20875 Literate programming tools then parse the file to produce either readable
20876 documentation or compilable source.
20877 The WEB style of literate programming was created by D.E.
20878 Knuth during the development of his TeX typesetting software.
20882 \begin_layout Standard
20883 Another excerpt says:
20886 \begin_layout Quotation
20889 How is literate programming different from verbose commenting?
20892 \begin_layout Quotation
20893 There are three distinguishing characteristics.
20894 In order of importance, they are:
20898 \begin_layout Itemize
20899 flexible order of elaboration
20902 \begin_layout Itemize
20903 automatic support for browsing
20906 \begin_layout Itemize
20907 typeset documentation, especially diagrams and mathematics
20911 \begin_layout Standard
20912 Now that I sparked your curiosity, take a look in the references.
20915 \begin_layout Subsubsection
20919 \begin_layout Standard
20920 The complete Literate Programming FAQ can be found at:
20923 \begin_layout Quote
20924 \begin_inset LatexCommand \url[Literate Programming FAQ]{http://shelob.ce.ttu.edu/daves/lpfaq/faq.html}
20931 \begin_layout Standard
20932 The FAQ lists 23 (twenty three!) different literate programming tools.
20933 Where some are specialized or
20934 \begin_inset Quotes eld
20938 \begin_inset Quotes erd
20941 for particular programming languages, while other have general scope.
20946 for my own use for several reasons:
20949 \begin_layout Itemize
20950 It can generate the documentation either in latex or html.
20953 \begin_layout Itemize
20954 It has a open architecture, i.e., it is easy to plug in new filters and to
20955 perform special processing that you may need.
20959 \begin_layout Itemize
20960 There is a good selection of filters available already (the html is one
20964 \begin_layout Itemize
20968 \begin_layout Standard
20969 The Noweb web page can be found at:
20972 \begin_layout Quote
20973 \begin_inset LatexCommand \url[Noweb home page]{http://www.cs.virginia.edu/~nr/noweb/}
20980 \begin_layout Standard
20981 Starting from there you can reach many other interesting links and even
20982 some literate program examples.
20985 \begin_layout Subsection
20986 LyX and Literate Programming
20989 \begin_layout Standard
20990 The LyX support for Literate Programming is provided by using the generic
20991 LyX convertors mechanism.
20992 This support is provided in a
20993 \begin_inset Quotes eld
20997 \begin_inset Quotes erd
21000 way, i.e., you will be able to use this new LyX feature with some other literate
21001 programming tool of your choice by just changing your LyX preferences.
21004 \begin_layout Subsubsection
21005 Generating documents and code (weaving and tangling)
21008 \begin_layout Paragraph
21009 Selecting the document class
21012 \begin_layout Standard
21013 If you have installed Noweb and LyX successfully, whenever you open a new
21014 document or try to change the document class of an existing one, you will
21015 find that there are three new document classes available:
21018 \begin_layout Itemize
21022 \begin_layout Itemize
21026 \begin_layout Itemize
21030 \begin_layout Standard
21031 You must select one of them to create your literate documents from.
21035 \begin_layout Standard
21036 Note that literate documents are not limited to these three classes.
21037 New classes can be generated from other styles like letter or in combination
21038 with other class variations like Article (AMS).
21039 If you have special needs that cannot be covered by one of the existing
21040 classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21041 will arrange to insert a new entry, or teach you how to do it.
21045 \begin_layout Standard
21046 It is very simple, it involves the creation of a file with four lines, and
21047 re-running of the auto configuration.
21052 Moreover, if you use a literate tool other than Noweb you may need to create
21053 a new set of document classes for it.
21056 \begin_layout Paragraph
21060 \begin_layout Standard
21061 LyX enables you to write code with a layout named
21069 \begin_layout Standard
21070 The equivalent Noweb term is
21071 \begin_inset Quotes eld
21075 \begin_inset Quotes erd
21079 For historical reasons, I got used to the term
21080 \begin_inset Quotes eld
21084 \begin_inset Quotes erd
21087 introduced by other literate tool named Nuweb, which I used for many years
21088 before rendering myself to Noweb.
21093 Noweb delimits scraps like this:
21096 \begin_layout LyX-Code
21100 \begin_layout LyX-Code
21104 \begin_layout LyX-Code
21108 \begin_layout LyX-Code
21112 \begin_layout LyX-Code
21116 \begin_layout Standard
21117 The problem is that whatever is written in between the << and the
21121 must be taken literally, i.e., LyX should be prevented from making any special
21122 interpretation of what has been written.
21123 This is handled by a special layout named Scrap, that works like a normal
21124 paragraph but has a free spacing capability.
21127 \begin_layout Standard
21128 The down side of the Scrap paragraph layout is that consecutive paragraphs
21129 of code will be spaced with one empty line in the source code and also
21130 in the printed documentation.
21131 The work around is to enter each line of code within a single Scrap, with
21132 a newline (ctrl-return).
21133 The example above will look like this:
21137 \begin_layout Standard
21138 If you have a printed version of this document you will not see any difference
21139 between the previous example and this one.
21147 \begin_layout LyX-Code
21159 \begin_layout Standard
21160 This layout works fine.
21161 The only real inconvenience is that you have to type ctrl-return instead
21166 \begin_layout Standard
21167 It is in my list of
21168 \begin_inset Quotes eld
21172 \begin_inset Quotes erd
21183 \begin_layout Standard
21184 As a special note, you can also use the
21185 \begin_inset Quotes eld
21189 \begin_inset Quotes erd
21192 construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21196 \begin_layout LyX-Code
21199 def some_function(args):
21201 "This is the doc string for this
21204 print "My args: ", args
21207 \begin_layout LyX-Code
21208 @ %def some_function
21211 \begin_layout Standard
21212 For an example of this usage and the resulting cross-reference output, look
21213 at the Literate python program in
21215 LIBDIR/examples/listerrors.lyx
21217 which should make this all clear.
21220 \begin_layout Paragraph
21221 Generating the documentation
21224 \begin_layout Standard
21225 At this point you already have a new document file with a proper document
21226 class, and with some code and text on it.
21227 How do I print it? The answer is simple, you select
21232 iew\SpecialChar \menuseparator
21240 Just like you would do for a plain document.
21241 No special procedure is required.
21244 \begin_layout Standard
21245 To help orientate you, I will now explain what happens inside LyX:
21248 \begin_layout Enumerate
21254 pdate\SpecialChar \menuseparator
21261 menu option is chosen, a latex file is generated.
21266 \begin_layout Standard
21267 If the document is of any literate class the generated file will be named
21268 with an extension name defined by the
21269 \begin_inset Quotes eld
21273 \begin_inset Quotes erd
21276 format (defined in the Preferences panel), otherwise the file will have
21285 \begin_layout Enumerate
21286 Note that the only difference so far is in the name of the file, no special
21287 processing is required by LyX.
21288 Given that you formatted the code using the Scrap layout that, by itself,
21289 takes care of the business.
21292 \begin_layout Enumerate
21293 If the document is of any literate class LyX will then use the internal
21294 LyX to Noweb converter, followed by the Noweb to LaTeX converter
21298 \begin_layout Standard
21299 The converters are defined in the
21304 ools\SpecialChar \menuseparator
21312 \begin_inset Quotes eld
21316 \begin_inset Quotes erd
21324 to generate the LaTeX file.
21328 \begin_layout Standard
21329 Otherwise it will just skip this step.
21333 \begin_layout Enumerate
21334 Finally, LaTeX is invoked and the regular post processing continues as in
21338 \begin_layout Standard
21339 Independence from a particular
21340 \begin_inset Quotes eld
21344 \begin_inset Quotes erd
21347 is easily achieved by changing the commands that are run by the various
21351 \begin_layout Paragraph
21352 Generating the code
21355 \begin_layout Standard
21356 When the build menu option is chosen or the corresponding button in the
21357 toolbar is pressed, a latex file is generated just like step 1 above.
21358 Next, LyX invokes the
21363 Typically, this converter (like any other converter), has two parts:
21366 \begin_layout Enumerate
21367 The converter program itself.
21368 This program performs the conversion from the one format to the other (in
21369 this case, from the Noweb format to the Program pseudo-format).
21372 \begin_layout Enumerate
21373 The error log parser.
21374 This is a program whose sole purpose is to rewrite error messages in a
21375 format that LyX understands.
21376 This makes it possible for LyX to place error boxes in the right places
21377 in the file buffer.
21380 \begin_layout Standard
21381 The first part, the
21382 \begin_inset Quotes eld
21386 \begin_inset Quotes erd
21389 setting, should be set to
21390 \begin_inset Quotes eld
21398 \begin_inset Quotes erd
21402 This basically means that LyX will call
21403 \begin_inset Quotes eld
21407 \begin_inset Quotes erd
21410 (a program or script) with the name of the Noweb file (generally a file
21411 in the LyX temp directory).
21415 \begin_layout Standard
21416 This is an implementation of
21417 \begin_inset Quotes eld
21421 \begin_inset Quotes erd
21424 that you can place in a directory on your path:
21427 \begin_layout LyX-Code
21431 \begin_layout LyX-Code
21435 \begin_layout LyX-Code
21436 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
21439 \begin_layout Standard
21440 The next part of the converter setting is the
21441 \begin_inset Quotes eld
21445 \begin_inset Quotes erd
21448 which is to be set to
21449 \begin_inset Quotes eld
21454 originaldir,parselog=listerrors
21457 \begin_inset Quotes erd
21461 This will run any errors that are generated by the
21462 \begin_inset Quotes eld
21466 \begin_inset Quotes erd
21469 process through the
21470 \begin_inset Quotes eld
21474 \begin_inset Quotes erd
21480 \begin_layout Standard
21481 The converter code looks in
21489 then on the path for the
21490 \begin_inset Quotes eld
21494 \begin_inset Quotes erd
21500 \begin_layout Paragraph
21501 Build instructions in the document
21504 \begin_layout Standard
21505 The last piece of the integration between LyX and noweb is the
21506 \begin_inset Quotes eld
21510 \begin_inset Quotes erd
21514 Generally, the instructions for building your program should be embedded
21515 in a scrap of its own.
21517 \begin_inset Quotes eld
21521 \begin_inset Quotes erd
21524 above uses the notangle command to look for this scrap (called
21525 \begin_inset Quotes eld
21529 \begin_inset Quotes erd
21532 ) and runs its contents through
21533 \begin_inset Quotes eld
21537 \begin_inset Quotes erd
21543 \begin_layout Standard
21544 Typically, such a scrap would look something like this:
21547 \begin_layout LyX-Code
21554 if [ -z "${NOWEB_SOURCE}" ]
21558 NOWEB_SOURCE=myfile.nw
21564 code to extract files ...]
21567 code to compile files ...]
21572 \begin_layout Standard
21575 LIBDIR/examples/listerrors.lyx
21579 LIBDIR/examples/Literate.lyx
21581 which implement two versions of the
21582 \begin_inset Quotes eld
21586 \begin_inset Quotes erd
21589 program for some illustrations of how all of these pieces go together or
21592 LIBDIR/examples/noweb2lyx.lyx.
21595 Interestingly, these three files show off the language-indepence of the
21596 LyX literate programming support since they are written in Python, C and
21600 \begin_layout Subsubsection
21604 \begin_layout Standard
21605 All the Literate Programming support is configured by the
21610 ools\SpecialChar \menuseparator
21618 \begin_inset Quotes eld
21622 \begin_inset Quotes erd
21626 The important parts are:
21629 \begin_layout Description
21632 \begin_inset Quotes eld
21636 \begin_inset Quotes erd
21640 format Set up via the Formats tab, this is where the Noweb-specific pieces
21650 , the file extension is set to
21655 This tells LyX to create a file with a
21659 extension in the first step of the conversion process.
21662 \begin_layout Description
21669 format This is an empty format whose sole purpose is to be the endpoint
21670 of a conversion (which then allows us to set up a converter for it).
21673 \begin_layout Description
21682 This converter performs the
21683 \begin_inset Quotes eld
21687 \begin_inset Quotes erd
21690 of the literate document.
21691 For Noweb, it is set to
21692 \begin_inset Quotes eld
21697 noweave -delay -index $$i > $$o
21700 \begin_inset Quotes erd
21706 \begin_layout Description
21716 \begin_inset Quotes eld
21720 \begin_inset Quotes erd
21724 As stated above, the Converter is set to
21725 \begin_inset Quotes eld
21733 \begin_inset Quotes erd
21736 , with Flags set to
21737 \begin_inset Quotes eld
21742 originaldir,parselog=listerrors
21745 \begin_inset Quotes erd
21751 \begin_layout Subsubsection
21755 \begin_layout Standard
21756 There is also a new function implemented in the LyX server, the
21757 \begin_inset Quotes eld
21760 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
21764 \begin_layout Standard
21765 When debugging code with ddd/gdb, it is possible to invoke a text editor
21766 at the current execution position with a single key stroke.
21767 The default ddd configuration for that is shift-ctrl-V.
21768 It happens that you can define the editor command line invocation in ddd
21775 dit\SpecialChar \menuseparator
21780 references\SpecialChar \menuseparator
21787 dialog and changing the "Edit Sources" entry.
21790 \begin_layout Standard
21791 I take advantage of the new created LyX server function and this ddd feature,
21793 \begin_inset Quotes eld
21797 \begin_inset Quotes erd
21803 \begin_layout LyX-Code
21804 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
21807 \begin_layout Standard
21808 With this, whenever you are using ddd and find a point in the program that
21809 you want to edit, you just press shift-ctrl-V (in the ddd window), and
21810 ddd you forward this information to LyX through the LyX server and then
21811 the LyX window will show the same file with the cursor at the same position
21812 ddd was pointing to.
21813 No more guessing or long scrolling to locate a point in the program back
21817 \begin_layout Standard
21818 Note however that you must enable the LyX server to get this feature working
21819 (it is disabled by default).
21820 You can enable it in
21832 ) by entering in the
21837 \begin_inset Quotes eld
21842 /home/<your-home-directory>/.lyx/lyxpipe
21845 \begin_inset Quotes erd
21851 \begin_layout Standard
21852 Read the LyX server documentation in the
21854 Customization Manual
21856 for further information.
21859 \begin_layout Subsubsection
21863 \begin_layout Standard
21864 There are six new buttons that can be added to your LyX toolbar.
21865 Five of these buttons are short cuts to layout styles:
21886 The last one is a short cut to the
21887 \begin_inset Quotes eld
21891 \begin_inset Quotes erd
21898 \begin_layout Standard
21899 LyX has a range of buttons that are available for tool bar customization.
21900 In my toolbar I like to combine the six short cuts above with two more:
21908 \SpecialChar \menuseparator
21916 \SpecialChar \menuseparator
21929 iew\SpecialChar \menuseparator
21937 Here is how it looks like:
21940 \begin_layout LyX-Code
21944 \begin_layout LyX-Code
21948 \begin_layout LyX-Code
21949 Icon "layout Standard"
21952 \begin_layout LyX-Code
21953 Icon "layout Section"
21956 \begin_layout LyX-Code
21957 Icon "layout LaTeX"
21960 \begin_layout LyX-Code
21961 Icon "layout LyX-Code"
21964 \begin_layout LyX-Code
21965 Icon "layout Scrap"
21968 \begin_layout LyX-Code
21972 \begin_layout LyX-Code
21976 \begin_layout LyX-Code
21977 Icon "buffer-typeset"
21980 \begin_layout LyX-Code
21981 Icon "build-program"
21984 \begin_layout LyX-Code
21988 \begin_layout LyX-Code
21992 \begin_layout LyX-Code
21996 \begin_layout LyX-Code
22000 \begin_layout LyX-Code
22004 \begin_layout Subsubsection
22005 Colors customization
22008 \begin_layout Standard
22009 There are a number of colors in LyX that can be customized in
22014 One of the things that bothers people is the LaTeX font color.
22015 The default color is red, since the scraps uses LaTeX font, and there is
22016 a lot of scraps in literate documents, you may get tired of seeing everything
22018 You can change it by going to the tabs
22027 \begin_layout Standard
22028 The next thing is the visible presence of the newline character in the screen.
22029 You can choose the color of this particular character and make it blend
22031 I recommend you choosing a color that is close to the background but not
22032 equal, that way you still can see it is there, but it is not bothering
22037 \begin_layout Chapter
22038 Secrets of the LaTeX Masters
22039 \begin_inset LatexCommand \label{cha:secrets}
22046 \begin_layout Standard
22047 Though LyX is a powerful tool, it cannot hope to support everything that
22048 can be done with pure TeX/LaTeX.
22049 However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
22050 as long as you are not afraid to use that
22051 \begin_inset Quotes eld
22055 \begin_inset Quotes erd
22058 button on the toolbar or add things to the LaTeX preamble.
22059 This section lists some tips, tricks, and otherwise cool ideas to give
22060 your document that extra little flair.
22063 Do try this at home
22065 , just start with something a little smaller and less important than your
22069 \begin_layout Standard
22070 Most ideas in this section require less common files in your LaTeX installation.
22071 If you have a system like teTeX, most will already be available.
22072 A few, however, will need to be downloaded from one of the CTAN archives.
22073 Often, there are several ways to do something, or several LaTeX style files
22074 which do the same thing.
22075 We do not endorse one choice over another, we simply claim that we have
22076 done a particular task with a particular file.
22077 Put on your wizard hat, keep an eye out for dragons, and let us begin.
22080 \begin_layout Section
22081 Tricks for Footnotes and Margin Notes
22084 \begin_layout Standard
22090 \begin_layout Subsection
22094 \begin_layout Standard
22095 LyX cannot yet take care of setting the footnote numbering back to 1 after
22096 each section in the
22097 \begin_inset Quotes eld
22105 \begin_inset Quotes erd
22110 document class or changing the counter style.
22111 You'll need to insert LaTeX commands like the following to achieve that:
22114 \begin_layout Standard
22118 \begin_layout Standard
22122 setcounter{footnote}{0}
22131 setcounter{footnote}{0}
22133 will set the counter back to 1
22137 \begin_layout Standard
22138 The counter has been set back to 1.
22146 \begin_layout Standard
22147 The following command will change the numbering to small letters.
22148 Take a look at the next footnote in your xdvi or ghostview
22152 \begin_layout Standard
22169 \begin_layout Standard
22170 This is an example for a footnote with alphabetic numbering.
22190 \begin_layout Standard
22191 The next command sets the counter style back to default, i.e.
22202 \begin_layout Standard
22213 to set the counter--style back to LyX's default, i.e.
22222 \begin_layout Standard
22243 \begin_layout Standard
22274 and others as counter styles.
22275 Just replace the LaTeX command in the above example and rerun TeX to see
22276 what those styles can do.
22280 \begin_layout Subsection
22284 \begin_layout Standard
22285 Here are two examples of neat things you can do to margin notes using LaTeX
22289 \begin_layout Standard
22290 The following command will make a vertical line appear alongside your text---gre
22292 \begin_inset Quotes eld
22296 \begin_inset Quotes erd
22305 rule[-10mm]{30mm}{5mm}}
22313 \begin_layout Standard
22319 rule[-10mm]{30mm}{5mm}}
22327 \begin_layout Standard
22328 Check your dvi- or ghostview-output to see what the
22334 command does to the following margin note.
22337 \begin_layout Standard
22341 \begin_layout Standard
22351 \begin_inset Marginal
22354 \begin_layout Standard
22365 \begin_layout Section
22369 \begin_layout Standard
22372 Lars Gullik Bjønnes
22375 \begin_layout Subsection
22379 \begin_layout Standard
22380 The aim for this chapter
22384 \begin_layout Standard
22385 Editor's note: Lars' original chapter was a masterful description of how
22391 However, it was too long to flow smoothly in this document.
22392 I have therefore chosen to excerpt the most important sections here (sorry,
22393 Lars); you can read the original chapter (and more of the story!) in the
22396 examples/multicol.lyx
22404 is to show how the LaTeX package
22408 can be used in a LyX document.
22409 As LyX doesn't support the
22413 package natively yet, we have to use some small hacks.
22414 By reading this section it should be obvious how to do this.
22417 \begin_layout Subsection
22421 \begin_layout Standard
22426 package allows switching between one and multicolumn format on the same
22428 Footnotes are handled correctly (for the most part), but will be placed
22429 at the bottom of the page and not under each column.
22430 LaTeX's float mechanism, however, is partly disabled in the current implementat
22432 At the moment only page-wide floats can be used within the scope of the
22436 \begin_layout Subsection
22440 \begin_layout Subsubsection
22444 \begin_layout Standard
22445 If you want to have two columns in your text, you have use LaTeX mode to
22450 begin{multicols}{2}
22452 at the point where you want the two column layout to start, and then
22458 where you want it to end.
22462 \begin_layout Standard
22466 \begin_layout Standard
22470 begin{multicols}{2}
22478 \begin_layout Standard
22483 The Adventure of the Empty House
22489 Sir Arthur Conan Doyle
22492 \begin_layout Standard
22495 It was in the spring of the year 1894 that all London was interested, and
22496 the fashionable world dismayed, by the murder of the Honourable Ronald
22497 Adair under most unusual and inexplicable circumstances.
22498 The public has already learned those particulars of the crime which came
22499 out in the police investigation, but a good deal was suppressed upon that
22500 occasion, since the case for the prosecution was so overwhelmingly strong
22501 that it was not necessary to bring forward all the facts.
22502 Only now, at the end of nearly ten years, am I allowed to supply those
22503 missing links which make up the whole of that remarkable chain.
22504 The crime was of interest in itself, but that interest was as nothing to
22505 me compared to the inconceivable sequel, which afforded me the greatest
22506 shock and surprise of any event in my adventurous life.
22507 Even now, after this long interval, I find myself thrilling as I think
22508 of it, and feeling once more that sudden flood of joy, amazement, and increduli
22509 ty which utterly submerged my mind.
22510 Let me say to that public, which has shown some interest in those glimpses
22511 which I have occasionally given them of the thoughts and actions of a very
22512 remarkable man, that they are not to blame me if I have not shared my knowledge
22513 with them, for I should have considered it my first duty to do so, had
22514 I not been barred by a positive prohibition from his own lips, which was
22515 only withdrawn upon the third of last month.
22518 \begin_layout Standard
22522 \begin_layout Standard
22534 \begin_layout Subsubsection
22538 \begin_layout Standard
22539 The same pattern is used when you want more than two columns:
22542 \begin_layout Standard
22546 \begin_layout Standard
22550 begin{multicols}{3}
22558 \begin_layout Standard
22561 It can be imagined that my close intimacy with Sherlock Holmes had interested
22562 me deeply in crime, and that after his disappearance I never failed to
22563 read with care the various problems which came before the public.
22564 And I even attempted, more than once, for my own private satisfaction,
22565 to employ his methods in their solution, though with indifferent success.
22566 There was none, however, which appealed to me like this tragedy of Ronald
22568 As I read the evidence at the inquest, which led up to a verdict of willful
22569 murder against some person or persons unknown, I realized more clearly
22570 than I had ever done the loss which the community had sustained by the
22571 death of Sherlock Holmes.
22572 There were points about this strange business which would, I was sure,
22573 have specially appealed to him, and the efforts of the police would have
22574 been supplemented, or more probably anticipated, by the trained observation
22575 and the alert mind of the first criminal agent in Europe.
22576 All day, as I drove upon my round, I turned over the case in my mind and
22577 found no explanation which appeared to me to be adequate.
22578 At the risk of telling a twice-told tale, I will recapitulate the facts
22579 as they were known to the public at the conclusion of the inquest.
22582 \begin_layout Standard
22586 \begin_layout Standard
22598 \begin_layout Standard
22599 You can have have more than 3 columns if you want to, but that might not
22600 be very pleasant for the eye.
22603 \begin_layout Subsubsection
22604 Columns inside columns
22607 \begin_layout Standard
22608 You can even have columns inside columns:
22611 \begin_layout Standard
22615 \begin_layout Standard
22619 begin{multicols}{2}
22627 \begin_layout Standard
22630 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22631 at that time governor of one of the Australian colonies.
22632 Adair's mother had returned from Australia to undergo the operation for
22633 cataract, and she, her son Ronald, and her daughter Hilda were living together
22637 \begin_layout Standard
22641 \begin_layout Standard
22645 begin{multicols}{2}
22653 \begin_layout Standard
22656 The youth moved in the best society--had, so far as was known, no enemies
22657 and no particular vices.
22658 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22659 had been broken off by mutual consent some months before, and there was
22660 no sign that it had left any very profound feeling behind it.
22661 For the rest {sic} the man's life moved in a narrow and conventional circle,
22662 for his habits were quiet and his nature unemotional.
22663 Yet it was upon this easy-going young aristocrat that death came, in most
22664 strange and unexpected form, between the hours of ten and eleven-twenty
22665 on the night of March 30, 1894.
22668 \begin_layout Standard
22672 \begin_layout Standard
22684 \begin_layout Standard
22687 Ronald Adair was fond of cards--playing continually, but never for such
22688 stakes as would hurt him.
22689 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22690 It was shown that, after dinner on the day of his death, he had played
22691 a rubber of whist at the latter club.
22692 He had also played there in the afternoon.
22697 The evidence of those who had played with him-- Mr.
22698 Murray, Sir John Hardy, and Colonel Moran--showed that the game was whist,
22699 and that there was a fairly equal fall of the cards.
22700 Adair might have lost five pounds, but not more.
22701 His fortune was a considerable one, and such a loss could not in any way
22703 He had played nearly every day at one club or other, but he was a cautious
22704 player, and usually rose a winner.
22705 It came out in evidence that, in partnership with Colonel Moran, he had
22706 actually won as much as four hundred and twenty pounds in a sitting, some
22707 weeks before, from Godfrey Milner and Lord Balmoral.
22708 So much for his recent history as it came out at the inquest.
22711 \begin_layout Standard
22715 \begin_layout Standard
22727 \begin_layout Standard
22728 Please do read the file
22730 examples/multicol.lyx
22732 for more advanced examples including column and header spacing, vertical
22733 separator lines, and more.
22736 \begin_layout Section
22741 Paragraph Environment
22742 \begin_inset OptArg
22745 \begin_layout Standard
22746 Numbering in Enumerate
22754 \begin_layout Standard
22760 \begin_layout Standard
22761 \begin_inset VSpace bigskip
22767 \begin_layout Standard
22769 The default numbering for the
22773 paragraph environment begins with Arabic numbers and ends with uppercase
22775 Suppose, however, you wanted a different type of numbering scheme.
22776 Here's a quickie example of how to change the numbering scheme:
22779 \begin_layout LyX-Code
22789 \begin_layout LyX-Code
22799 \begin_layout LyX-Code
22809 \begin_layout LyX-Code
22819 \begin_layout Standard
22820 \SpecialChar \ldots{}
22821 which changes the numbering scheme to uppercase Roman numerals, uppercase
22822 letters, Arabic numbers, and lowercase letter.
22825 \begin_layout Standard
22826 Additionally, the previous example also adds a little bit extra to the numbering
22828 For example, the first level label actually looks like:
22829 \begin_inset Quotes eld
22833 \begin_inset Quotes erd
22837 For ease of reading, we'll describe what the numbering schemes look like
22838 using a notation something like this: <
22839 \begin_inset Quotes eld
22843 \begin_inset Quotes erd
22848 \begin_inset Quotes erd
22852 \begin_inset Quotes erd
22857 \begin_inset Quotes erd
22861 \begin_inset Quotes erd
22866 \begin_inset Quotes eld
22870 \begin_inset Quotes erd
22877 \begin_layout Standard
22878 As you can see in the example, there is a label command for each nesting
22885 \SpecialChar \ldots{}
22892 , as well as a counter,
22896 \SpecialChar \ldots{}
22902 There are also five
22903 \begin_inset Quotes eld
22907 \begin_inset Quotes erd
22940 , each of which take one counter as an argument.
22941 You can add characters before or after these, but there's no need to add
22945 \begin_layout Standard
22946 You can get really fancy with these.
22950 \begin_layout LyX-Code
22964 \begin_layout LyX-Code
22976 \begin_layout LyX-Code
22986 \begin_layout LyX-Code
22996 \begin_layout Standard
22997 produces the somewhat out of hand numbering scheme: <
22998 \begin_inset Quotes eld
23002 \begin_inset Quotes erd
23007 \begin_inset Quotes erd
23011 \begin_inset Quotes erd
23016 \begin_inset Quotes erd
23020 \begin_inset Quotes erd
23025 \begin_inset Quotes eld
23029 \begin_inset Quotes erd
23036 \begin_layout Section
23037 Extra Space Between Table Rows
23040 \begin_layout Standard
23046 \begin_layout Standard
23047 \begin_inset VSpace bigskip
23053 \begin_layout Standard
23055 LaTeX allows you to put a bit of extra space between rows in a table by
23056 giving an optional argument to the end-of-row specifier (
23065 LyX has not yet implemented this in a formal way, so here are two dirty
23066 little tricks to do the same job.
23070 \begin_layout Standard
23071 The first is the more formal, but longwinded way to do it.
23072 In the LaTeX preamble, add the following command definition:
23075 \begin_layout Standard
23082 extratablespace}[1]{
23086 This command takes a single argument---the amount of space you would like
23088 Insert the command in the first column of the row
23092 where you would like the space to appear.
23093 Here is an example (I've removed all the borders using
23098 ayout\SpecialChar \menuseparator
23107 \begin_layout Standard
23109 \begin_inset Tabular
23110 <lyxtabular version="3" rows="4" columns="3">
23112 <column alignment="center" valignment="top" width="0pt">
23113 <column alignment="center" valignment="top" width="0pt">
23114 <column alignment="center" valignment="top" width="0pt">
23116 <cell alignment="center" valignment="top" topline="true" usebox="none">
23119 \begin_layout Standard
23134 <cell alignment="center" valignment="top" topline="true" usebox="none">
23137 \begin_layout Standard
23152 <cell alignment="center" valignment="top" topline="true" usebox="none">
23155 \begin_layout Standard
23172 <cell alignment="center" valignment="top" topline="true" usebox="none">
23175 \begin_layout Standard
23181 <cell alignment="center" valignment="top" topline="true" usebox="none">
23184 \begin_layout Standard
23199 <cell alignment="center" valignment="top" topline="true" usebox="none">
23202 \begin_layout Standard
23219 <cell alignment="center" valignment="top" topline="true" usebox="none">
23222 \begin_layout Standard
23235 \begin_layout Standard
23239 extratablespace{2ex}
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
23287 <cell alignment="center" valignment="top" topline="true" usebox="none">
23290 \begin_layout Standard
23296 <cell alignment="center" valignment="top" topline="true" usebox="none">
23299 \begin_layout Standard
23314 <cell alignment="center" valignment="top" topline="true" usebox="none">
23317 \begin_layout Standard
23340 \begin_layout Standard
23341 The second method is faster, but will make typographers and TeXperts all
23342 over the world groan.
23343 Simply put an end of row specifier with optional argument at the same spot.
23344 No fancy definitions are needed as in the above example, but there will
23345 be more space inserted than you specified because you essentially added
23346 a blank row plus the extra space.
23347 If the space added is too much, simply use a negative number, like so:
23350 \begin_layout Standard
23352 \begin_inset Tabular
23353 <lyxtabular version="3" rows="4" columns="3">
23355 <column alignment="center" valignment="top" width="0pt">
23356 <column alignment="center" valignment="top" width="0pt">
23357 <column alignment="center" valignment="top" width="0pt">
23359 <cell alignment="center" valignment="top" topline="true" usebox="none">
23362 \begin_layout Standard
23377 <cell alignment="center" valignment="top" topline="true" usebox="none">
23380 \begin_layout Standard
23395 <cell alignment="center" valignment="top" topline="true" usebox="none">
23398 \begin_layout Standard
23415 <cell alignment="center" valignment="top" topline="true" usebox="none">
23418 \begin_layout Standard
23424 <cell alignment="center" valignment="top" topline="true" usebox="none">
23427 \begin_layout Standard
23442 <cell alignment="center" valignment="top" topline="true" usebox="none">
23445 \begin_layout Standard
23462 <cell alignment="center" valignment="top" topline="true" usebox="none">
23465 \begin_layout Standard
23478 \begin_layout Standard
23494 <cell alignment="center" valignment="top" topline="true" usebox="none">
23497 \begin_layout Standard
23512 <cell alignment="center" valignment="top" topline="true" usebox="none">
23515 \begin_layout Standard
23532 <cell alignment="center" valignment="top" topline="true" usebox="none">
23535 \begin_layout Standard
23541 <cell alignment="center" valignment="top" topline="true" usebox="none">
23544 \begin_layout Standard
23559 <cell alignment="center" valignment="top" topline="true" usebox="none">
23562 \begin_layout Standard
23585 \begin_layout Standard
23586 It's short, sweet, and gets the job done quickly, even if it is really ugly.
23587 You may put away the rotten vegetables now! I promise I won't suggest anything
23591 \begin_layout Section
23595 \begin_layout Standard
23601 \begin_layout Standard
23602 \begin_inset VSpace bigskip
23608 \begin_layout Standard
23613 \begin_layout Standard
23619 tmpfont}{cmr17 scaled 2500}{
23631 \begin_layout Standard
23636 \begin_layout Standard
23647 hose of you who like the style of old books probably also like
23648 \begin_inset Quotes eld
23652 \begin_inset Quotes erd
23655 ---those large capital letters which begin each new chapter or section.
23656 Implementing them with plain LyX/LaTeX is straightforward (assuming you
23657 know some plain TeX!) but does require a lot of work and many iterations,
23658 as you can see by all the ugly TeX-mode stuff at the beginning of this
23662 \begin_layout Standard
23666 \begin_layout Standard
23672 bigdrop{-1em}{3}{ptmri}{T}+
23677 here is a much easier way of doing this, of course.
23686 ) package from CTAN allows a simple way to add such letters to your documents.
23687 Since this package is not a standard part of teTeX, I can't demonstrate
23688 it within this document, but if you copy this paragraph to a new document,
23690 \begin_inset Quotes eld
23700 \begin_inset Quotes erd
23703 and the pluses from the TeX code at the beginning of the paragraph, and
23708 usepackage{dropcaps}
23710 to your LaTeX preamble, you will get a nice Times Roman Italic
23711 \begin_inset Quotes eld
23715 \begin_inset Quotes erd
23718 , whose height is three lines of text and which protrudes 1 em into the
23720 (Make certain you have copied
23721 \begin_inset Quotes eld
23729 \begin_inset Quotes erd
23732 into a directory where TeX can see it.) The first argument is the amount
23733 of indentation; in this case the negative sign moves it into the margin.
23734 The second argument is the height of the letter in number of lines of text.
23735 The third argument is the font name: virtually anything which has a tfm
23736 file should work (wade through the
23738 .../texmf/fonts/tfm
23740 directory for possibilities).
23741 My personal favorite is
23742 \begin_inset Quotes eld
23750 \begin_inset Quotes erd
23753 , a fancy German font specifically designed for dropped capitals.
23754 The fourth argument is the letter (or letters) to be dropped.
23759 package also offers the
23765 command, as well as a slightly simplified
23774 \begin_layout Section
23775 Non-standard Paragraph Shapes
23778 \begin_layout Standard
23784 \begin_layout Standard
23785 \begin_inset VSpace bigskip
23791 \begin_layout Standard
23795 \begin_layout Standard
23807 \begin_layout Standard
23811 \begin_layout Standard
23820 \begin_layout Standard
23834 \begin_layout Standard
23839 \begin_layout Standard
23850 \begin_layout Standard
23859 \begin_layout Standard
23868 \begin_layout Standard
23877 \begin_layout Standard
23886 \begin_layout Standard
23895 \begin_layout Standard
23904 \begin_layout Standard
23913 \begin_layout Standard
23922 \begin_layout Standard
23931 \begin_layout Standard
23940 \begin_layout Standard
23949 \begin_layout Standard
23958 \begin_layout Standard
23967 \begin_layout Standard
23976 \begin_layout Standard
23985 \begin_layout Standard
23994 \begin_layout Standard
24003 \begin_layout Standard
24012 \begin_layout Standard
24018 There are times when the tyranny of rectangular paragraphs must be overthrown.
24019 In such situations, a call to the delightful plain TeX command
24026 As you can see, completely arbitrary shapes can be laid out with a suitable
24027 set of linelength definitions.
24028 While this parshape may look a bit silly and useless, one could conceive
24029 of situations such as finely tuned dropped capitals, word wrapping around
24030 non-rectangular graphics, etc.
24031 which will benefit from such handcrafting.
24034 \begin_layout Standard
24035 \begin_inset VSpace bigskip
24041 \begin_layout Standard
24046 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
24053 is the number of lines of text which define the paragraph.
24054 If there turn out to be fewer lines, the shape is truncated; if there are
24055 more, the excess lines have the same dimensions as the last line of the
24065 entries specify the indentation of the line from the left margin, and the
24066 length of the line as measured from that point.
24067 The shape applies only to the current paragraph; everything is reset to
24068 normal for the next paragraph.
24071 \begin_layout Standard
24075 \begin_layout Standard
24087 \begin_layout Section
24091 \begin_layout Standard
24092 As you can see, the examples in this section range from the useful to the
24094 While I don't expect that anyone will ever need the paragraph shape demonstrate
24095 d in the last section, the important point is that you can do almost anything
24096 you want in LyX if you are willing to figure out how to do it in TeX and
24098 TeX is a fantastically powerful typesetting system and all that power is
24099 available to you since LyX uses it as its backend.