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 notation entry is created if you place the cursor after a symbol entry
2702 and then use the menu
2704 Insert\SpecialChar \menuseparator
2705 Notation\InsetSpace ~
2710 \begin_inset Quotes eld
2718 \begin_inset Quotes erd
2721 is inserted and a window pops up asking for the notation entry.
2722 A notation 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 notation entry.
2730 \begin_layout Subsection
2731 Sort Order of Notation Entries
2734 \begin_layout Standard
2735 Suppose you have two notation 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 Notation List.
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 notation 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 notation 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
2890 Printing Notation List
2893 \begin_layout Standard
2894 You can insert the notation list with the menu
2896 Insert\SpecialChar \menuseparator
2898 &TOC\SpecialChar \menuseparator
2899 Notation\InsetSpace ~
2903 A light blue box labeled
2904 \begin_inset Quotes eld
2912 \begin_inset Quotes erd
2915 will show the place where the index is printed in the output.
2916 The index list box is not clickable like other LyX-boxes.
2917 In the printed output the title of the notation list appears as
2925 \begin_layout Standard
2926 This is translated to the document language for a small number of languages,
2927 amongst others French and German
2933 If you are not happy with the title, you can change it by re-defining the
2941 For example, in order to change the title
2949 add the following line to the preamble.
2952 \begin_layout LyX-Code
2957 nomname}{List of Symbols}
2960 \begin_layout LyX-Code
2964 \begin_layout Section
2968 \begin_layout Subsection
2972 \begin_layout Standard
2973 When you are working on a large file with many sections, it is often convenient
2974 to break up the document into several files, or perhaps you have something
2975 where a table may change from time to time, but the preceding text does
2977 In these cases, you should seriously consider using multipart documents.
2978 For example, scientific papers often have five major sections: the introduction
2979 , observations, results, discussion, and conclusion.
2980 Each of these could be its own separate LyX file, with one
2981 \begin_inset Quotes eld
2985 \begin_inset Quotes erd
2988 file which contains the title, authors, abstract, references, etc., plus
2989 the five included files.
2990 It is important to note that each of these files is a full LyX file which
2991 can be formatted and printed on its own, as well as included in a master
2993 Each of these files must have the same document class, however--- don't
2994 attempt to mix book classes with article classes.
2995 You may also include LaTeX files; however, these files must not have their
3001 everything up to and including the
3013 line must be deleted) or else errors will be generated when you try to
3017 \begin_layout Standard
3018 LyX allows you to include files quite easily with
3023 nsert\SpecialChar \menuseparator
3032 When you click on this selection a small box is inserted into the file
3033 at the current cursor location.
3034 Clicking on the box raises a dialog which allows you to select the file
3035 to be included, and the method of its inclusion.
3039 \begin_layout Standard
3040 The file selection box should by now be obvious.
3041 The three inclusion methods are
3042 \begin_inset Quotes eld
3046 \begin_inset Quotes erd
3050 \begin_inset Quotes eld
3054 \begin_inset Quotes erd
3058 \begin_inset Quotes eld
3062 \begin_inset Quotes erd
3066 The difference between
3067 \begin_inset Quotes eld
3071 \begin_inset Quotes erd
3075 \begin_inset Quotes eld
3079 \begin_inset Quotes erd
3082 is really only meaningful to LaTeXperts, but the practical difference is
3083 that files which are
3084 \begin_inset Quotes eld
3088 \begin_inset Quotes erd
3091 are typeset beginning on a new page, while files which are
3092 \begin_inset Quotes eld
3096 \begin_inset Quotes erd
3099 are typeset starting on the current page.
3100 Perhaps the labeling in LyX will be changed someday to reflect this.
3103 \begin_layout Standard
3104 Generally, the master file is converted into a full LaTeX file before typesettin
3105 g, while the included files are converted to LaTeX files which do not have
3106 all the preamble information.
3116 button prevents this conversion.
3119 \begin_layout Standard
3121 \begin_inset Quotes eld
3125 \begin_inset Quotes erd
3128 included file allows you to include a file typeset exactly as it appears
3129 in the file, i.e.\InsetSpace ~
3130 verbatim mode, with the characters set in a fixed-width
3132 Normally, spaces in this file are invisible, though two consecutive spaces
3133 are conserved, unlike LyX's normal treatment of spaces.
3134 However, setting the
3144 checkbox typesets a mark to unambiguously define the presence of a space.
3150 \begin_layout Subsection
3151 Cross-References Between Files
3154 \begin_layout Standard
3155 It is possible to set up cross-references between the different files.
3156 First, open all the files in question: let's call them A and B in a two
3157 file example, where B is included in A.
3158 Let's say you insert a label in A, then want to reference it in B.
3159 Open the cross-reference dialog in whilst in document B, and you can select
3161 \begin_inset Quotes eld
3165 \begin_inset Quotes erd
3171 \begin_layout Section
3175 \begin_layout Standard
3180 is needed by LyX to be able to output algorithm floats.
3181 These are useful in placing short algorithms across page breaks and support
3182 an index of algorithms too.
3185 \begin_layout Section
3189 \begin_layout Standard
3194 is used by LyX when you select ``subfigure'' in the graphics dialog and
3195 enter the subfigure caption.
3196 Several figures marked in this way can be packed into a single float with
3197 individual sub-captions.
3200 \begin_layout Section
3201 Fancy Headers and Footers
3204 \begin_layout Standard
3205 The default page layout is rather plain; for an article document class,
3206 all you get is a centered page number at the bottom of the page.
3207 This document is the book class, so it appears to be a bit fancier, but
3208 to really put on a show, you need to set the document page style to
3209 \begin_inset Quotes eld
3213 \begin_inset Quotes erd
3216 , as mentioned in the
3222 This section describes the LaTeX codes you need to insert in your LaTeX
3223 preamble or the text in order to get the desired effects.
3226 \begin_layout Standard
3227 The page header is divided into three fields, not surprisingly labeled
3228 \begin_inset Quotes eld
3232 \begin_inset Quotes erd
3236 \begin_inset Quotes eld
3240 \begin_inset Quotes erd
3244 \begin_inset Quotes eld
3248 \begin_inset Quotes erd
3252 The footer is also divided into these three fields.
3253 The LaTeX commands to set these fields in the simplest manner are
3278 Suppose you wish to put your name in the upper left hand corner of each
3280 Simply insert the following command in the preamble:
3283 \begin_layout Standard
3292 \begin_layout Standard
3293 You will now see your name in the upper left.
3294 If a field has a default entry that you would like to get rid of (often
3295 the page number appears in the central footer, simply include a command
3296 with a blank argument, e.g.
3299 \begin_layout Standard
3307 \begin_layout Standard
3308 Let's get really fancy: lets put the section number with the word
3309 \begin_inset Quotes eld
3313 \begin_inset Quotes erd
3317 Section 3) in the upper left, the page number (e.g.
3318 Page 4) in the upper right, your name in the lower left, and the date in
3320 The following commands should now appear in the preamble:
3323 \begin_layout Standard
3333 \begin_layout Standard
3341 \begin_layout Standard
3351 \begin_layout Standard
3360 \begin_layout Standard
3368 \begin_layout Standard
3378 \begin_layout Standard
3391 access LaTeX's section and page counters, and so print out the current
3392 section and page numbers.
3399 simply prints out today's date.
3402 \begin_layout Standard
3403 The thicknesses of the horizontal rules drawn beneath the header and above
3404 the footer can also be modified.
3405 If you don't want one of the headers, set its thickness to 0.
3406 The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3407 Use the commands, e.g.
3414 headrulewidth}{0.4pt}
3422 footrulewidth}{0.4pt}
3424 to set the thicknesses.
3427 \begin_layout Standard
3428 You can switch the header/footer settings on and off for individual pages
3433 thispagestyle{empty}
3439 thispagestyle{plain}
3445 thispagestyle{fancy}
3448 Simply insert them in the text on the page you want changed and mark them
3450 In fact, title pages are marked as plain by default, while following pages
3451 are marked fancy when using the global fancy setting.
3454 \begin_layout Standard
3455 There are more complex commands which will let you insert things in the
3456 upper left on odd numbered pages, etc., but I will refer you to the
3460 package documentation for more descriptions.
3461 For example, if you have a teTeX installation, look for
3463 /usr/share/texmf/doc/latex/fancyhdr/\SpecialChar \-
3469 \begin_layout Standard
3470 As a final example, it is possible to include an Encapsulated PostScript®
3471 file in the header or footer.
3472 Suppose you want to put a company logo in the upper lefthand corner.
3473 You might try something like
3476 \begin_layout Standard
3485 includegraphics{logo.eps}}}
3488 \begin_layout Standard
3490 (you may need to preface this with
3494 usepackage{graphics}
3496 if you don't include EPS files elsewhere in your document).
3499 \begin_layout Section
3503 \begin_layout Standard
3504 LaTeX provides a mechanism to produce essentially a page within a page,
3506 Within a minipage, all the usual rules of indentation, line wrapping, etc.\InsetSpace ~
3508 LyX also provides some of the minipage capability.
3511 \begin_layout Standard
3512 Minipages in LyX have their own collapsable box; insert one via
3517 nsert\SpecialChar \menuseparator
3525 Right-clicking on the box allows you to alter the minipage's width and
3526 alignment within the page.
3527 Warning: if the minipage is too long to fit on a page, it is truncated,
3528 not wrapped onto the next page.
3531 \begin_layout Standard
3532 If you place two minipages side-by-side, you can use
3537 nsert\SpecialChar \menuseparator
3545 to insert a special instruction known in the LaTeX world as an
3549 to put a maximum amount of space between them; it forces one minipage to
3550 the left edge, the other to the right edge.
3551 The examples below show the difference.
3554 \begin_layout Standard
3555 \begin_inset Box Frameless
3564 height_special "totalheight"
3567 \begin_layout Standard
3568 This is a minipage which does not use hfill.
3569 This is the second sentence of a minipage which does not use hfill.
3577 \begin_layout Standard
3578 \begin_inset Box Frameless
3587 height_special "totalheight"
3590 \begin_layout Standard
3591 This is a second minipage which does not use hfill.
3592 This is the second sentence of a second minipage which does not use hfill.
3600 \begin_layout Standard
3601 \begin_inset VSpace medskip
3607 \begin_layout Standard
3608 Here is some normal text to separate the two examples.
3611 \begin_layout Standard
3612 \begin_inset VSpace medskip
3618 \begin_layout Standard
3619 \begin_inset Box Frameless
3628 height_special "totalheight"
3631 \begin_layout Standard
3632 This is a minipage which does use hfill.
3633 This is the second sentence of a minipage which does use hfill.
3641 \begin_inset Box Frameless
3650 height_special "totalheight"
3653 \begin_layout Standard
3654 This is a second minipage which does use hfill.
3655 This is the second sentence of a second minipage which does use hfill.
3663 \begin_layout Section
3664 Wrapping Text Around Figures
3665 \begin_inset LatexCommand \label{sec:floatflt}
3672 \begin_layout Standard
3673 \begin_inset Wrap figure
3678 \begin_layout Standard
3679 \begin_inset Graphics
3690 \begin_layout Caption
3691 This is a wrapped figure, and this is the brilliant caption that describes
3700 \begin_layout Standard
3701 A very frequently asked question is whether text can be made to
3702 \begin_inset Quotes eld
3706 \begin_inset Quotes erd
3709 around figures so that a figure occupies some fraction of the column width
3710 and text fills the rest.
3711 If you have the LaTeX package
3715 installed (you can find out about it in the
3719 manual) you can do this.
3722 \begin_layout Standard
3723 At the right is a figure of a mobius strip---you should have already seen
3729 To wrap the text like this insert a wrap box via
3734 nsert\SpecialChar \menuseparator
3739 ts\SpecialChar \menuseparator
3745 \begin_layout Standard
3746 Note: this package is very fragile! For example, having a figure too close
3747 to the bottom of the page will mess things up, as will having two figures
3749 Use this package sparingly and do read the documentation that came with
3750 it (which will also tell you how to wrap text around tables).
3753 \begin_layout Section
3757 \begin_layout Standard
3758 While the standard table layout will suffice in 99% of all tables you generate,
3759 occasionally you will run into one which requires a bit of extra tweaking.
3760 The table dialog which appears on a right-click of a table allows these
3762 It will give you access to some extra column alignment parameters.
3763 A little bit of LaTeX background is useful here: when you set up a table
3764 in LaTeX, each column is given an alignment type.
3765 For example, you would give it
3766 \begin_inset Quotes eld
3774 \begin_inset Quotes erd
3778 \begin_inset Quotes eld
3786 \begin_inset Quotes erd
3790 \begin_inset Quotes eld
3798 \begin_inset Quotes erd
3801 for left-aligned, centered, and right-aligned columns respectively (which
3802 appear as the left/center/right radio buttons in LyX).
3804 \begin_inset Quotes eld
3812 \begin_inset Quotes erd
3815 , which will make a column of a specified width (the width box in LyX),
3816 and will wrap text within that box.
3818 \begin_inset Quotes eld
3826 \begin_inset Quotes erd
3829 (vertical bar) which rather than making a column will make a vertical rule
3830 at that point; this manifests itself in LyX as the
3831 \begin_inset Quotes eld
3835 \begin_inset Quotes erd
3839 Finally, there is a type
3840 \begin_inset Quotes eld
3848 \begin_inset Quotes erd
3851 , which allows you to use whatever is enclosed in the accompanying braces
3852 as the column separator, including a null argument.
3853 The reasons for doing this may not be obvious, but they can be very powerful.
3854 They are best demonstrated by example.
3857 \begin_layout Subsection
3858 Removing Extra Column Space
3861 \begin_layout Standard
3862 Here is a standard table:
3865 \begin_layout Standard
3867 \begin_inset Tabular
3868 <lyxtabular version="3" rows="3" columns="2">
3870 <column alignment="left" valignment="top" width="0pt">
3871 <column alignment="left" valignment="top" leftline="true" width="0pt">
3872 <row bottomline="true">
3873 <cell alignment="left" valignment="top" topline="true" usebox="none">
3876 \begin_layout Standard
3891 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
3894 \begin_layout Standard
3911 <cell alignment="left" valignment="top" topline="true" usebox="none">
3914 \begin_layout Standard
3929 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3932 \begin_layout Standard
3949 <cell alignment="center" valignment="top" topline="true" usebox="none">
3952 \begin_layout Standard
3967 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3970 \begin_layout Standard
3993 \begin_layout Standard
3994 Notice that the horizontal rule extends a bit past the text on both sides.
3995 If you wanted the line to end even with the text, we can put a null separator
3996 on the ends to get rid of the bit of extra space LaTeX adds by default.
3997 Here is the example:
4000 \begin_layout Standard
4002 \begin_inset Tabular
4003 <lyxtabular version="3" rows="3" columns="2">
4005 <column alignment="left" valignment="top" width="0pt" special="@{} l">
4006 <column alignment="left" valignment="top" leftline="true" width="0pt" special="l @{}">
4007 <row bottomline="true">
4008 <cell alignment="left" valignment="top" topline="true" usebox="none">
4011 \begin_layout Standard
4026 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
4029 \begin_layout Standard
4046 <cell alignment="left" valignment="top" topline="true" usebox="none">
4049 \begin_layout Standard
4064 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4067 \begin_layout Standard
4084 <cell alignment="center" valignment="top" topline="true" usebox="none">
4087 \begin_layout Standard
4102 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4105 \begin_layout Standard
4128 \begin_layout Standard
4129 In this case, the column specifier for the left column was set to
4130 \begin_inset Quotes eld
4138 \begin_inset Quotes erd
4141 , while the right column was set to
4142 \begin_inset Quotes eld
4150 \begin_inset Quotes erd
4153 , in order to put the null characters on the edges.
4157 \begin_layout Subsection
4158 Changing the Column Separator Character
4161 \begin_layout Standard
4162 Now suppose you really wanted, for reasons that are completely opaque, to
4164 \begin_inset Formula $\sqrt{\pi}$
4167 with some space around it for the column separator.
4168 Simply turn off the vertical border, then set the right column specifier
4170 \begin_inset Quotes eld
4182 \begin_inset Quotes erd
4186 You could now make a table like this:
4189 \begin_layout Standard
4191 \begin_inset Tabular
4192 <lyxtabular version="3" rows="3" columns="2">
4194 <column alignment="left" valignment="top" width="0pt">
4195 <column alignment="left" valignment="top" width="0in" special="@{~$\sqrt{\pi}$~}l">
4196 <row bottomline="true">
4197 <cell alignment="left" valignment="top" topline="true" usebox="none">
4200 \begin_layout Standard
4215 <cell alignment="left" valignment="top" topline="true" usebox="none">
4218 \begin_layout Standard
4235 <cell alignment="left" valignment="top" topline="true" usebox="none">
4238 \begin_layout Standard
4253 <cell alignment="center" valignment="top" topline="true" usebox="none">
4256 \begin_layout Standard
4273 <cell alignment="center" valignment="top" topline="true" usebox="none">
4276 \begin_layout Standard
4291 <cell alignment="center" valignment="top" topline="true" usebox="none">
4294 \begin_layout Standard
4317 \begin_layout Subsection
4318 Making a Decimal Point Aligned Column
4321 \begin_layout Standard
4322 Okay, that last example was very silly, but here is one that is not.
4323 Suppose you want to make a table that has a column which is aligned on
4325 A standard LaTeX trick to do this is to set the whole number part in a
4326 right-aligned column, use a decimal point for the column separator, then
4327 set the fractional part as a left-aligned column.
4328 A variation on this is to include the decimal point explicitly with the
4329 whole part, then use just a null separator in between.
4330 The latter variation is demonstrated here:
4333 \begin_layout Standard
4335 \begin_inset Tabular
4336 <lyxtabular version="3" rows="5" columns="3">
4338 <column alignment="center" valignment="top" width="0pt">
4339 <column alignment="right" valignment="top" leftline="true" width="0pt">
4340 <column alignment="center" valignment="top" width="0pt" special="@{} l">
4341 <row bottomline="true">
4342 <cell alignment="center" valignment="top" topline="true" usebox="none">
4345 \begin_layout Standard
4360 <cell multicolumn="1" alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
4363 \begin_layout Standard
4378 <cell multicolumn="2" alignment="center" valignment="top" topline="true" usebox="none">
4381 \begin_layout Standard
4389 <cell alignment="center" valignment="top" topline="true" usebox="none">
4392 \begin_layout Standard
4402 \begin_inset Formula $\pi$
4410 <cell alignment="right" valignment="top" topline="true" leftline="true" usebox="none">
4413 \begin_layout Standard
4428 <cell alignment="center" valignment="top" topline="true" usebox="none">
4431 \begin_layout Standard
4448 <cell alignment="center" valignment="top" topline="true" usebox="none">
4451 \begin_layout Standard
4461 \begin_inset Formula $\pi^{\pi}$
4469 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4472 \begin_layout Standard
4487 <cell alignment="center" valignment="top" topline="true" usebox="none">
4490 \begin_layout Standard
4507 <cell alignment="center" valignment="top" topline="true" usebox="none">
4510 \begin_layout Standard
4520 \begin_inset Formula $(\pi^{\pi})^{\pi}$
4528 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4531 \begin_layout Standard
4546 <cell alignment="center" valignment="top" topline="true" usebox="none">
4549 \begin_layout Standard
4557 <cell alignment="center" valignment="top" topline="true" usebox="none">
4560 \begin_layout Standard
4570 \begin_inset Formula $\pi^{\pi^{\pi}}$
4578 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4581 \begin_layout Standard
4596 <cell alignment="center" valignment="top" topline="true" usebox="none">
4599 \begin_layout Standard
4610 \begin_inset Formula $\times10^{18}$
4626 \begin_layout Standard
4627 Though it appears a bit funny in LyX, on paper it will produce what appears
4628 to be a 2-column table in which the right column is aligned on the decimal
4629 point and the header appears to be centered over it.
4632 \begin_layout Standard
4633 Perhaps it is best if I described just what I did: first, create a 3
4634 \begin_inset Formula $\times$
4637 3 table and remove all the borders.
4638 Then re-add a bottom border to the top row, and a right border to the first
4640 Type in the values for the first column and set its alignment to
4662 and set that column's alignment to
4678 \begin_inset Formula $\times10^{18}$
4683 and set the extra column alignment to
4688 Finally type in the word
4692 in the middle column, highlight it and the blank entry to its right, and
4705 \begin_layout Subsection
4706 A Better Decimal-Alignment Solution
4709 \begin_layout Standard
4710 An alternative way to have decimal alignment in tables is through the
4715 Add the following to the LateX preamble:
4718 \begin_layout LyX-Code
4724 \begin_layout LyX-Code
4727 newcolumntype{d}[1]{D{.}{.}{#1}}
4730 \begin_layout Standard
4731 To have a column decimally aligned, enter in the
4733 Special Column Alignment
4739 dialog the following:
4742 \begin_layout LyX-Code
4743 d{number of decimals of the data}
4746 \begin_layout Standard
4747 To create extra column space just increase the number of decimals in
4752 Setting the multicolumn attribute for a single cell makes it insensitive
4753 to the decimal alignment which comes in handy as well.
4754 A drawback of this method is that math mode is not allowed in a column
4755 with decimal alignment except if the multicolumn attribute is set.
4758 \begin_layout Standard
4759 This method offers the same flexibility as the
4764 One could, for example, change the alignment separator, and have different
4765 alignment separators for different columns by defining multiple column
4766 types in the preamble.
4767 The syntax is as follows:
4770 \begin_layout LyX-Code
4771 D{inputsep}{outputsep}{decimal places}
4774 \begin_layout Standard
4775 The interested reader is directed towards the
4779 package documentation for more details.
4782 \begin_layout Section
4783 Itemize Bullet Selection
4784 \begin_inset LatexCommand \label{sec:bullet}
4791 \begin_layout Standard
4797 \begin_layout Subsection
4801 \begin_layout Standard
4802 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
4803 Using this dialog you can easily specify what bullet shape to use at each
4804 level of an itemized list.
4805 These settings are document-wide so you won't be able to specify different
4806 sets of bullets for different paragraphs
4810 \begin_layout Standard
4811 Well, actually you can but you'll have to do it by hand.
4819 \begin_layout Subsection
4823 \begin_layout Standard
4824 Open the dialog by selecting the
4829 ocument\SpecialChar \menuseparator
4836 menu item and then select the
4846 \begin_layout Standard
4847 The dialog provides you with a table of bullet shapes.
4848 A column of buttons on the left of the table provides access to the six
4849 different panels of bullet shapes.
4850 The row of buttons across the top is used to select which bullet depth
4852 A text entry under the table shows the currently selected bullet shape's
4853 LaTeX equivalent and this can be edited if desired.
4854 If you do modify the text you will also need to specify any needed packages
4855 in the LaTeX preamble.
4858 \begin_layout Standard
4859 The six panels are divided up by the packages they require.
4860 The following table shows the mappings from button name to LaTeX packages.
4863 \begin_layout Standard
4865 \begin_inset Tabular
4866 <lyxtabular version="3" rows="7" columns="2">
4868 <column alignment="center" valignment="top" leftline="true" width="0pt">
4869 <column alignment="center" valignment="top" leftline="true" rightline="true" width="0pt">
4870 <row topline="true" bottomline="true">
4871 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4874 \begin_layout Standard
4889 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4892 \begin_layout Standard
4908 <row topline="true">
4909 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4912 \begin_layout Standard
4927 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4930 \begin_layout Standard
4945 <row topline="true">
4946 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4949 \begin_layout Standard
4964 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4967 \begin_layout Standard
4983 <row topline="true">
4984 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4987 \begin_layout Standard
5002 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
5005 \begin_layout Standard
5021 <row topline="true">
5022 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
5025 \begin_layout Standard
5040 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
5043 \begin_layout Standard
5059 <row topline="true">
5060 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
5063 \begin_layout Standard
5078 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
5081 \begin_layout Standard
5097 <row topline="true" bottomline="true">
5098 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
5101 \begin_layout Standard
5116 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
5119 \begin_layout Standard
5142 \begin_layout Standard
5143 LyX doesn't stop you using bullets from packages you don't have.
5144 If you get errors from LaTeX when you try to view or print the file then
5145 its likely you are missing a package.
5146 LyX doesn't restrict your use since you may be editing locally and exporting
5150 \begin_layout Subsection
5154 \begin_layout Standard
5155 Select which bullet depth you want to change then select the bullet shape
5161 Any changes will not be visible in LyX, but are visible when viewing the
5162 document using xdvi or ghostview.
5165 \begin_layout Standard
5166 You can reset a bullet shape to the default simply by clicking your right
5167 mouse button on the appropriate bullet depth button.
5170 \begin_layout Standard
5175 want to have multiple sets of paragraphs with different sets of bullets
5176 in each then you're going to have to get your hands dirty.
5177 The itemize bullet selection dialog can help though because it provides
5178 you with the LaTeX code for a wide range of bullet shapes.
5179 To make your own custom paragraphs you have the following options:
5182 \begin_layout Standard
5186 \begin_layout Standard
5202 \begin_layout Standard
5206 \begin_layout Standard
5228 \begin_layout Itemize
5229 Use the LaTeX command
5235 to specify a new bullet shape for a given depth.
5236 You'll also need to save the current bullet shape so you can restore it
5238 In this itemized list the following LaTeX code was used to change the bullet
5239 used for the first depth.
5271 Note that the itemize depth is specified in Roman numerals as part of the
5281 \begin_layout Itemize
5285 \begin_layout Standard
5298 Specify each individual entry by starting each item with the bullet shape
5299 enclosed in square brackets and set as TeX.
5300 For example, this item was started with
5313 \begin_layout Standard
5317 \begin_layout Standard
5333 \begin_layout Standard
5334 You'll also need to revert the labelitem back to its previous setting for
5335 the global bullet shape settings to remain in effect.
5336 The way used here was:
5349 \begin_layout Chapter
5350 Special Document Classes
5353 \begin_layout Section
5357 \begin_layout Standard
5363 \begin_layout Standard
5364 \begin_inset VSpace bigskip
5370 \begin_layout Standard
5372 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
5373 papers to be submitted to American Mathematical Society publications.
5374 The layouts are not tailored to a specific journal, but easily can be.
5375 You should refer to the AMS documentation for specific instructions for
5376 each journal (usually it will entail only changing a single line in the
5378 That documentation is available on the Web at
5379 \begin_inset LatexCommand \url{http://www.ams.org}
5384 \begin_inset LatexCommand \url{ftp://ftp.ams.org/pub/tex/amslatex/}
5388 .These layouts are appropriate, and useful, for any mathematical writing.
5389 There are currently 4 distinct AMS LaTeX layouts:
5392 \begin_layout Enumerate
5393 amsart: The standard AMS-article format.
5394 All results and similar statements are numbered as
5395 \begin_inset Formula $(n.m)$
5398 , where the first number refers to the section, and the second refers to
5399 the total number of results (Theorems, Corollaries, Propositions, Definitions
5400 and Remarks, etc.) in that section.
5401 There are also many (but not all) environments available unnumbered, which
5402 is occasionally needed.
5403 Unnumbered environments indicated by an asterisk at the end.
5406 \begin_layout Enumerate
5407 amsart-seq: Here, numbering for each type of statement is in its own sequence,
5408 with no reference to the section number.
5409 There are also many (but not all) environments available unnumbered, which
5410 is occasionally needed.
5411 Unnumbered environments indicated by an asterisk at the end.
5414 \begin_layout Enumerate
5415 amsart-plain: This one is even more terse, since all the environments are
5419 \begin_layout Enumerate
5420 amsbook: the standard AMS book (really, monograph) format.
5421 Numbering is similar to the amsart layout, except that all numbering is
5423 \begin_inset Formula $(n.m.p)$
5426 , where the first number refers to the chapter, the second to the section,
5427 and the third is the number of the results (Theorems, Corollaries, Propositions
5428 , Definitions and Remarks, etc.) in that section.
5429 There are also many (but not all) environments available unnumbered, which
5430 is occasionally needed.
5431 Unnumbered environments indicated by an asterisk at the end.
5434 \begin_layout Standard
5435 Any AMS LyX file can be converted to either of the numbering schemes by
5436 simply changing the document class in the
5441 ocument\SpecialChar \menuseparator
5452 \begin_layout Subsection
5453 What these layouts provide
5456 \begin_layout Standard
5457 There is a long list of included environments provided by these layouts.
5458 Most mathematical papers or books will set as special statements most of
5459 these environments, in AMS-LaTeX there is an opportunity to define an unlimited
5460 variety of such declarations.
5461 However, the AMS recommends the environments that are available in LyX.
5462 The list of environments (not counting the standard environments such as
5465 sections, bibliography, title, author, date
5470 \begin_layout Description
5471 Theorem This is typically used for the statements of major results.
5473 \begin_inset Quotes eld
5481 \begin_inset Quotes erd
5484 appears in bold type, along with an automatically-determined number (an
5489 , is also available).
5490 The text is italicized.
5493 \begin_layout Description
5494 Corollary This is used for statements which follow fairly directly from
5495 previous statements.
5496 Again, these can be major results.
5504 \begin_layout Description
5505 Lemma These are smaller results needed to prove other statements.
5508 \begin_layout Description
5509 Proposition These are less major results which (hopefully) add to the general
5510 theory being discussed.
5513 \begin_layout Description
5514 Conjecture These are statements provided without justification, which the
5515 author does not know how to prove, but which seem to be true (to the author,
5519 \begin_layout Description
5520 Criterion A required condition.
5523 \begin_layout Description
5524 Algorithm A general procedure to be used.
5527 \begin_layout Description
5528 Axiom This is a property or statement taken as true within the system being
5532 \begin_layout Description
5533 Definition Guess what this is for.
5534 The font, both on-screen and in the output, is different for this environment
5535 than for the previous ones.
5537 \begin_inset Quotes eld
5541 \begin_inset Quotes erd
5544 ) is still set in boldface, along with the number, if any, but the rest
5548 \begin_layout Description
5549 Example Typeset similarly to Definition.
5552 \begin_layout Description
5556 \begin_layout Description
5560 \begin_layout Description
5564 \begin_layout Description
5565 Remark This environment is also a new type of theorem.
5566 This is set with the word Remark in italics, and the rest upright.
5569 \begin_layout Description
5570 Note Set similarly to the Remark environment.
5573 \begin_layout Description
5577 \begin_layout Description
5581 \begin_layout Description
5585 \begin_layout Description
5589 \begin_layout Description
5590 Case Generally, these are used to break up long arguments, using specific
5591 instances of some condition.
5592 The numbering scheme for cases is on its own, not together with other numbered
5597 \begin_layout Description
5601 \begin_layout Description
5605 \begin_layout Description
5607 \begin_inset Quotes eld
5615 \begin_inset Quotes erd
5618 is set in italics, but the rest is set upright.
5619 At the end of this environment (other environments can be nested within
5620 this one, of course) a QED symbol (usually a square, but it can vary with
5621 different styles) is placed.
5624 \begin_layout Description
5625 Address This should be the author's permanent address.
5628 \begin_layout Description
5629 Current\InsetSpace ~
5630 Address This should be the author's temporary address at the time
5631 of submission, if different from the Address.
5634 \begin_layout Description
5635 Email Author's e-mail address
5638 \begin_layout Description
5639 URL Author's Web address, if desired.
5642 \begin_layout Description
5643 Keywords Key words or phrases used to identify specific topics discussed
5647 \begin_layout Description
5648 Subjectclass These refer to the AMS Subject Classifications, published and
5651 Mathematical Reviews
5654 These are also available online at the AMS cites listed above.
5657 \begin_layout Description
5661 \begin_layout Description
5665 \begin_layout Description
5669 \begin_layout Standard
5670 In addition, these environments automatically provide the AMS LaTeX and
5672 They need to be available on your system in order to use these environments.
5675 \begin_layout Section
5679 \begin_layout Standard
5684 can be used to type letters according to German conventions.
5685 A template file is included in
5687 .../lyx/share/templates
5689 for you to use as a starting point.
5692 \begin_layout Section
5696 \begin_layout Standard
5701 provides an alternative to the standard
5706 It provides similar functionality, but you might prefer this layout with
5707 sans serif sections, headings, and more.
5710 \begin_layout Section
5714 \begin_layout Standard
5720 \begin_layout Subsection
5724 \begin_layout Standard
5725 This section describes how LyX can be used to write articles for submission
5726 to the scientific journal
5728 Astronomy and Astrophysics
5731 \begin_inset LatexCommand \url[www.edpsciences.fr/aa/]{http://www.edpsciences.fr/aa/}
5743 Version 5.01 of the document class
5748 This package can be downloaded from the ftp site
5751 \begin_layout Standard
5752 \begin_inset VSpace medskip
5758 \begin_layout Standard
5760 \begin_inset LatexCommand \url{ftp://ftp.edpsciences.org/pub/aa/readme.html}
5767 \begin_layout Standard
5768 \begin_inset VSpace medskip
5774 \begin_layout Standard
5775 A manual comes together with that package, and this text is not meant to
5776 replace the original manual but merely a short guide how to realize the
5777 correct form of your paper.
5781 \begin_layout Standard
5782 Please note that the publisher of the journal was changed from Springer
5783 to EDP Sciences starting January 1, 2001.
5784 That change implicated also some slight changes of the style files, namely
5785 the removal of the thesaurus command.
5786 The LyX class aa supports the newest version of these style files, V 5.01.
5787 If you have an older version installed, please upgrade.
5788 For compatibility, the old (version 4) layout has been kept as
5793 Please refer to the comments in
5795 LyXDir/layouts/aapaper.layout
5800 \begin_layout Subsection
5804 \begin_layout Standard
5805 It is recommended you start from the example template distributed with LyX.
5806 If you are not using a template, note the following settings:
5809 \begin_layout Itemize
5819 ocument\SpecialChar \menuseparator
5826 dialog (OK, that one was obvious).
5829 \begin_layout Itemize
5830 Don't change the option
5840 The whole layout is done by the macros, you shouldn't change anything.
5843 \begin_layout Subsection
5847 \begin_layout Standard
5848 First thing to enter is the header information.
5849 It consists of seven entries, of which some are optional.
5853 \begin_layout Itemize
5861 \begin_layout Itemize
5869 \begin_layout Itemize
5877 \begin_layout Itemize
5885 \begin_layout Itemize
5890 : [optional] if more than one author: whom to contact for offprint requests.
5893 \begin_layout Itemize
5898 : [optional] mail address for contacts.
5901 \begin_layout Itemize
5909 Received: <date>; Accepted <date>
5912 \begin_layout Standard
5913 There is no need to issue the
5919 command, this is done automatically by LyX when the header is finished.
5920 Although the order of the single header entries doesn't matter it is advised
5921 to keep the above sequence, just to get the best optics and meets the layout
5922 of the real document.
5925 \begin_layout Standard
5926 If you want to place footnotes in the header block, e.g.
5930 \begin_layout Standard
5939 to state your present address, just use the standard footnote via
5944 nsert\SpecialChar \menuseparator
5952 LyX will automagically use the term
5961 \begin_layout Standard
5962 In addition to these topics, the macros use three additional LaTeX commands
5963 that have no counterpart in LyX:
5966 \begin_layout Itemize
5973 to separate different names for more than one author and institute, respectivel
5977 \begin_layout Itemize
5984 to mark corresponding author/institute pairs.
5985 The institutes are numbered sequentially as they appear in the
5989 field, so you have to put a marker to each author.
5992 \begin_layout Itemize
5999 to supply an email address for fast contact.
6002 \begin_layout Standard
6003 In all cases, the appropriate command has to be entered in LyX an marked
6009 \begin_layout Subsection
6013 \begin_layout Standard
6014 The abstract should immediately follow the header block.
6015 With version 5 the abstract environment was changed to a command, and there
6016 is now a resctriction to only one paragraph.
6017 In addition, it should contain an entry with the keywords.
6018 This is not yet implemented for LyX, therefore you have to enter the LaTeX
6025 by hand and mark it as LaTeX code.
6026 Refer to the example paper.
6029 \begin_layout Subsection
6030 Supported environments
6033 \begin_layout Standard
6034 The A&A paper layout supports the following environments for structuring
6038 \begin_layout Itemize
6044 \begin_layout Itemize
6050 \begin_layout Itemize
6056 \begin_layout Itemize
6062 \begin_layout Itemize
6068 \begin_layout Itemize
6074 \begin_layout Itemize
6080 \begin_layout Itemize
6086 \begin_layout Itemize
6092 \begin_layout Itemize
6098 \begin_layout Itemize
6104 \begin_layout Itemize
6110 \begin_layout Subsection
6111 Commands not supported by LyX
6114 \begin_layout Standard
6115 Some commands are not yet supported by the
6120 Some have already been mentioned.
6121 For the sake of completeness, they are listed all together here:
6124 \begin_layout Itemize
6132 \begin_layout Itemize
6140 \begin_layout Itemize
6148 \begin_layout Itemize
6156 \begin_layout Itemize
6164 \begin_layout Itemize
6172 \begin_layout Itemize
6180 \begin_layout Itemize
6188 \begin_layout Standard
6189 If you want to use any of these commands, you have to enter them yourself.
6192 Do not forget to mark them as LaTeX code!
6195 \begin_layout Subsection
6196 Figure and Table Floats
6199 \begin_layout Standard
6200 LyX provides support for the necessary float environments
6202 figure, figure*, table
6208 , therefore we won't tell much about it here.
6215 Just remember that tables should be left-aligned.
6216 For that, select the table and change the alignment in
6221 dit\SpecialChar \menuseparator
6226 aragraph\InsetSpace ~
6230 \begin_layout Standard
6235 only one special thing: the figures with caption besides the figure.
6236 To create such a figure, you have to do the following:
6239 \begin_layout Enumerate
6240 Create a wide figure float:
6245 nsert\SpecialChar \menuseparator
6250 t\SpecialChar \menuseparator
6253 , then right click in the figure and select
6265 \begin_layout Enumerate
6266 Enter your caption text.
6269 \begin_layout Enumerate
6274 to move the cursor above the caption.
6277 \begin_layout Enumerate
6281 \begin_layout Enumerate
6282 Position the cursor behind the figure and insert a horizontal fill:
6287 nsert\SpecialChar \menuseparator
6295 \SpecialChar \menuseparator
6298 orizontal\InsetSpace ~
6304 \begin_layout Enumerate
6305 Switch to LaTeX mode:
6313 \begin_layout Enumerate
6323 Do not close the brace!
6326 \begin_layout Enumerate
6327 Position the cursor behind the caption text, switch to LaTeX mode and insert
6338 \begin_layout Standard
6339 Also, refer to the figures in the example paper.
6342 \begin_layout Subsection
6346 \begin_layout Standard
6347 For submission, the paper has to be formated in a special double-spacing
6349 For this purpose, you have to give the option
6353 to the documentclass.
6354 This must be done using the extra class options field in the
6359 ocument\SpecialChar \menuseparator
6367 Just enter the string
6374 \begin_layout Subsection
6378 \begin_layout Standard
6383 directory contains an example paper written with LyX.
6384 It is the example paper from the original macro package, translated to
6386 Use it for inspiration, and compare the original LaTeX code with LyX way
6390 \begin_layout Section
6394 \begin_layout Standard
6400 \begin_layout Subsection
6404 \begin_layout Standard
6405 AASTeX is a set of macros produced by the American Astronomical Society
6406 to facilitate electronic manuscript submission to the three journals they
6407 publish: the Astrophysical Journal (including the Letters and Supplement),
6408 the Astronomical Journal, and the Publications of the Astronomical Society
6410 LyX has proven to be an excellent tool for generating these documents,
6411 especially given its equation, citation, and figure handling capabilities.
6412 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
6413 is the version described here, or higher.
6414 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
6415 incompatible with LyX.
6416 The AASTeX package may be downloaded from the AASTeX Web site
6419 \begin_layout Standard
6420 \begin_inset VSpace medskip
6426 \begin_layout Standard
6428 \begin_inset LatexCommand \url{http://www.journals.uchicago.edu/AAS/AASTeX}
6435 \begin_layout Standard
6436 \begin_inset VSpace medskip
6442 \begin_layout Standard
6443 A complete user guide is contained in that package and you should familiarize
6444 yourself with it thoroughly before embarking on writing a paper in LyX.
6445 LyX will not reduce the need to figure out all the AASTeX commands, it
6446 will only reduce the drudgery of typing everything in.
6447 It is your responsibility to ensure that the final exported LaTeX document
6448 conforms completely to the requirements of the journal to which you are
6449 submitting your paper.
6452 \begin_layout Subsection
6453 Starting a New Paper
6456 \begin_layout Standard
6457 I strongly suggest that you start with the AASTeX template file.
6463 ile\SpecialChar \menuseparator
6470 , enter the new file name, then choose the
6475 This will show the most common fields found in a manuscript.
6476 Simply overwrite the existing text (including the brackets,
6480 ) with the correct information.
6481 Many of the AASTeX commands and environments can be implemented directly
6482 in LyX, but some cannot: most noticeably
6494 , which should stick out like a sore thumb if you actually just opened the
6496 For commands such as these, the LaTeX code must be entered directly and
6498 Such commands are referred to as ERT, or Evil Red Text.
6499 I tried to minimize the amount of ERT needed in an AASTeX document, but
6500 there is still a bit more required than any of us would like.
6503 \begin_layout Subsection
6504 Finishing Your Paper
6507 \begin_layout Standard
6508 When the paper is finished to your satisfaction and previews/prints correctly,
6510 \begin_inset Quotes eld
6514 \begin_inset Quotes erd
6517 actions which need to be done before you submit it to the journals.
6521 \begin_layout Enumerate
6522 Export your paper as a LaTeX file (
6527 ile\SpecialChar \menuseparator
6532 xport\SpecialChar \menuseparator
6543 \begin_layout Enumerate
6548 file with your favorite text editor
6552 \begin_layout Enumerate
6553 remove the comment lines before the
6562 \begin_layout Enumerate
6567 usepackage...{fontenc}
6569 line if it appears (usually just after
6584 \begin_layout Enumerate
6585 remove everything between (and including) the
6597 commands, except for any commands you specifically put into the LaTeX preamble
6598 (which should appear immediately after the
6599 \begin_inset Quotes eld
6602 User specified LaTeX commands
6603 \begin_inset Quotes erd
6614 \begin_layout Enumerate
6615 Run the resulting file through LaTeX to make sure it still processes correctly.
6618 \begin_layout Enumerate
6619 Reread the journal requirements to make sure your filenames and formats
6623 \begin_layout Enumerate
6627 \begin_layout Subsection
6628 Comments On Specific Commands
6631 \begin_layout Standard
6632 I will not describe the detailed usage of the individual AASTeX commands:
6633 the AASTeX User Guide (
6637 ) gives a good description of each.
6638 Thus it's probably easiest for me to go down the list as found in the guide
6639 and offer comments where necessary.
6640 So let's begin \SpecialChar \ldots{}
6644 \begin_layout Subsubsection
6645 Things that work as expected
6648 \begin_layout Standard
6652 \begin_layout Standard
6664 \begin_layout Standard
6665 Because they work as you might expect, I simply list them and the section
6766 begin{thebibliography}
6774 (2.13.2), all the cite commands and their variations (2.13.2), the generic
6775 graphicx figure commands (2.14.1),
6799 (2.15.4, amongst other places),
6826 \begin_layout Standard
6827 The following style options also work correctly:
6848 Simply put them in the
6854 Layout\SpecialChar \menuseparator
6860 \begin_layout Standard
6864 \begin_layout Standard
6876 \begin_layout Subsubsection
6877 Things that work, but require more comment
6880 \begin_layout Standard
6881 The following items work, but require a little more discussion:
6884 \begin_layout Itemize
6885 These items are reserved for use by the journal editors, but you can put
6886 them into the LaTeX preamble if you feel compelled to do so:
6919 \begin_layout Itemize
6920 These items may be placed in the LaTeX preamble, and are included as blanks
6921 in the template file:
6942 \begin_layout Itemize
6949 (2.3) -- can only be used
6950 \begin_inset Quotes eld
6954 \begin_inset Quotes erd
6957 , not in the middle of a paragraph.
6958 Use ERT if you need to embed it.
6961 \begin_layout Itemize
6968 (2.3) -- will have extra {} after it.
6969 This should not cause an error.
6972 \begin_layout Itemize
6979 (2.6) -- can only be used
6980 \begin_inset Quotes eld
6984 \begin_inset Quotes erd
6987 , not in the middle of a paragraph.
6988 Use ERT if you need to embed it.
6991 \begin_layout Itemize
6998 (2.8) -- can't insert a cross-reference tag, you must type the tag name
7002 \begin_layout Itemize
7009 (2.8) -- same as for
7016 \begin_layout Itemize
7023 (2.9) -- will have extra {} after it.
7024 This should not cause an error.
7027 \begin_layout Itemize
7034 (2.11) -- will have extra {} after it.
7035 This should not cause an error.
7038 \begin_layout Itemize
7045 (2.14.2) -- you can insert an optional filename argument by placing the cursor
7046 at the beginning of the text and selecting
7048 Insert\SpecialChar \menuseparator
7053 \begin_inset Quotes eld
7057 \begin_inset Quotes erd
7060 inserts an optional argument of the type needed by
7067 Hopefully it will be renamed someday.
7070 \begin_layout Itemize
7083 for the catalog ID optional parameter
7086 \begin_layout Itemize
7099 for the catalog ID optional parameter
7102 \begin_layout Subsubsection
7103 Things not implemented, use ERT
7106 \begin_layout Standard
7110 \begin_layout Standard
7122 \begin_layout Standard
7145 setcounter{equation}
7147 (2.12), Journal name abbreviations (2.13.4),
7183 (2.15.4, insert it as the first element in the lefthand cell after where
7185 Don't use any of LyX's rules in the table),
7197 (2.15.5), much of Misc (2.17, except
7248 \begin_layout Standard
7252 \begin_layout Standard
7264 \begin_layout Subsubsection
7265 Things that cannot be implemented
7268 \begin_layout Standard
7269 \SpecialChar \ldots{}
7270 at least in any meaningful sort of way, so I suggest ignoring them.
7271 They are the references environment (2.13.3), and the deluxetable environment
7273 If you really, really need to use deluxetable, I suggest editing it in
7274 a separate file with a text editor, then using
7279 nsert\SpecialChar \menuseparator
7287 to include it in your LyX document.
7292 file to see an example of this.
7295 \begin_layout Subsection
7296 FAQs, Tips, Tricks, and Other Ruminations
7299 \begin_layout Subsubsection
7300 Getting LyX and AASTeX to cooperate
7303 \begin_layout Standard
7304 It can be a bit tricky to get LyX to recognize a new layout and document
7306 When all else fails, do this:
7309 \begin_layout Enumerate
7310 Make certain that LaTeX can find AASTeX.
7311 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
7312 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
7319 \begin_layout Enumerate
7326 /usr/.../share/lyx/layouts
7335 \begin_layout Enumerate
7341 ools\SpecialChar \menuseparator
7348 in LyX, then restart LyX.
7351 \begin_layout Enumerate
7352 Open a regular new file, not from a template.
7353 Does AASTeX appear in the class list in
7358 ocument\SpecialChar \menuseparator
7368 \begin_layout Standard
7369 If you get a warning from an existing AASTeX document about not being able
7370 to find the AASTeX layout or a message about
7371 \begin_inset Quotes eld
7374 You should not mix title layouts with normal ones
7375 \begin_inset Quotes erd
7378 , things haven't been installed correctly.
7381 \begin_layout Subsubsection
7382 LaTeX error processing a table
7385 \begin_layout Standard
7386 LyX, by default, attempts to center the table caption/title.
7387 This seems to produce a bad interaction in AASTeX so you should click somewhere
7388 in the caption/title, then select
7393 dit\SpecialChar \menuseparator
7398 aragraph\InsetSpace ~
7413 This took care of it for me.
7416 \begin_layout Subsubsection
7418 \begin_inset LatexCommand \label{cite}
7425 \begin_layout Standard
7426 A couple of things: 1) I have noticed some funny spacing in the reference
7427 entries in the text.
7428 When you enter the bibliography item data, make sure their is
7432 space between the last author and the parenthesis setting off the year;
7447 2) Entering the references at all is not obvious.
7448 The easiest thing is to start typing your first reference at the end of
7449 the document, then mark it as type
7454 That will put a small gray box in front of what you just typed.
7455 Click on the box to fill in the rest of the information.
7456 For new references, go to the end of an existing reference and press return.
7457 That will create a new line with its own box, etc.
7460 \begin_layout Subsubsection
7464 \begin_layout Standard
7465 Even though AASTeX provides its own figure commands (
7471 , for example), I much prefer LaTeX's standard figure commands (with the
7480 commands as ERT into a Figure Float box if you desire, but I never
7481 have much luck getting the layout right.
7482 With the standard graphics, LyX will insert a
7486 usepackage{graphicx}
7488 command into the LaTeX preamble and handle the figures in the standard
7489 LaTeX2e way, interspersing the figures in the text.
7490 I believe ApJ accepts figures exactly this way now; AJ might still use
7492 \begin_inset Quotes eld
7495 stack everything at the end
7496 \begin_inset Quotes erd
7502 \begin_layout Subsubsection
7503 Things I could have done, but didn't
7506 \begin_layout Standard
7508 \begin_inset Quotes eld
7512 \begin_inset Quotes erd
7515 things I could have implemented, but chose not to.
7516 For instance, I saw no point in double-spacing the text in the LyX window,
7517 even though it is double-spaced in the paper manuscript.
7518 Also, I chose not to make separate layouts for the preprint and preprint2
7520 Since I assume you will spend most of your time in the plain manuscript
7521 mode anyway, I decided not to chew up more disk space with this.
7525 \begin_layout Subsection
7529 \begin_layout Standard
7530 Your mileage may vary.
7531 I've now had papers published by both ApJ and AJ that have had 98% of the
7532 effort done in LyX; the last 2% was the LaTeX post-processing and a few
7534 I have had no trouble with the submission process, and I'm sure the journals
7535 were never aware that there might be a difference.
7536 So, go forth and publish!
7539 \begin_layout Section
7543 \begin_layout Standard
7546 Panayotis Papasotiriou
7549 \begin_layout Subsection
7553 \begin_layout Standard
7554 The ijmpc package is a set of macros that facilitates electronic manuscript
7557 International Journal of Modern Physics C
7560 Similarly, the ijmpd package is for creating manuscripts to be submitted
7563 International Journal of Modern Physics D
7566 Both journals are published by World Scientific.
7567 The corresponding document classes are named
7576 These files, together with instructions for the authors, can be downloaded
7578 \begin_inset LatexCommand \url{http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml}
7583 \begin_inset LatexCommand \url{http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml}
7588 Both packages are modified versions of the standard
7589 \begin_inset Quotes eld
7593 \begin_inset Quotes erd
7596 package, and they are almost (but not exactly) identical.
7597 Most of their features are supported by LyX.
7598 I have used LyX successfully to write articles submitted to both journals
7599 without any problem.
7602 \begin_layout Subsection
7606 \begin_layout Standard
7607 As usual, the easiest way to write a paper is to start with a template.
7613 ile\SpecialChar \menuseparator
7629 This will give an (almost) empty document that includes the most common
7630 fields found in a manuscript.
7631 Simply overwrite the existing text (including the brackets,
7636 You should keep in mind the following remarks.
7639 \begin_layout Enumerate
7640 LyX won't let you change the font size and the page style of the document,
7641 because such modifications are not allowed by both packages.
7644 \begin_layout Enumerate
7645 The language of the document should not be changed.
7646 Before previewing your paper, be sure that the babel package is not used.
7647 To do this, click on
7652 ools\SpecialChar \menuseparator
7670 checkbox in the language settings, and click on
7681 , if you wish to make this change permanent).
7684 \begin_layout Enumerate
7686 \begin_inset Quotes eld
7690 \begin_inset Quotes erd
7693 style must be used to define keywords.
7696 \begin_layout Enumerate
7697 The ijmpc package provides a style named
7698 \begin_inset Quotes eld
7701 Classification Codes
7702 \begin_inset Quotes erd
7705 , which can be used to define classification codes, such as PACS numbers.
7706 Note that this facility is not supported by the ijmpd package.
7709 \begin_layout Enumerate
7710 Several new environments are available:
7711 \begin_inset Quotes eld
7715 \begin_inset Quotes erd
7719 \begin_inset Quotes eld
7723 \begin_inset Quotes erd
7727 \begin_inset Quotes eld
7731 \begin_inset Quotes erd
7735 \begin_inset Quotes eld
7739 \begin_inset Quotes erd
7743 \begin_inset Quotes eld
7747 \begin_inset Quotes erd
7751 \begin_inset Quotes eld
7755 \begin_inset Quotes erd
7759 \begin_inset Quotes eld
7763 \begin_inset Quotes erd
7767 \begin_inset Quotes eld
7771 \begin_inset Quotes erd
7775 \begin_inset Quotes eld
7779 \begin_inset Quotes erd
7783 \begin_inset Quotes eld
7787 \begin_inset Quotes erd
7791 \begin_inset Quotes eld
7795 \begin_inset Quotes erd
7799 \begin_inset Quotes eld
7803 \begin_inset Quotes erd
7807 \begin_inset Quotes eld
7811 \begin_inset Quotes erd
7815 \begin_inset Quotes eld
7819 \begin_inset Quotes erd
7823 Their use is more or less obvious.
7824 LyX supports all these environments; it will use the proper label, text
7825 style, and numbering scheme for each of them.
7828 \begin_layout Enumerate
7829 Both packages use basic citations; the natbib package should not be used.
7830 In LyX, citation references are shown as usual; in the output, citations
7831 are shown as superscripts.
7832 If you want to use a citation as normal text, you should use the
7837 \begin_inset Quotes eld
7840 See Ref.\InsetSpace ~
7848 \begin_inset Quotes erd
7854 \begin_layout Enumerate
7856 \begin_inset Quotes eld
7860 \begin_inset Quotes erd
7863 section in both packages.
7864 To put acknowledgments, just use the
7865 \begin_inset Quotes eld
7869 \begin_inset Quotes erd
7875 \begin_layout Enumerate
7876 Appendices may be added to the paper,
7880 the Acknowledgments and
7885 LyX provides a special environment, called
7886 \begin_inset Quotes eld
7890 \begin_inset Quotes erd
7893 which marks the beginning of the appendices.
7894 This environment should be left blank; it just sends a LaTeX command, but
7895 nothing is really printed.
7897 \begin_inset Quotes eld
7901 \begin_inset Quotes erd
7904 is printed with blue letters, as a signal that all sections after that
7905 point are appendices.
7906 To write an appendix, use the
7907 \begin_inset Quotes eld
7911 \begin_inset Quotes erd
7915 LyX will number each appendix with capital letters, as required by both
7918 \begin_inset Quotes eld
7922 \begin_inset Quotes erd
7929 be present before the first appendix; if not, all appendices will be numbered
7930 as normal sections in the output.
7933 \begin_layout Enumerate
7934 The ijmpc and the ijmpd packages use the
7938 command to implement table captions.
7939 As a result, a table created by LyX is printed correctly, but its caption
7941 However, you can use some ERT to overpass this problem, so that captions
7942 are printed as expected.
7943 To do so, create a float table as usual, remove the caption, and replace
7954 (sic); you must also the ERT
7958 immediately after the tabular material.
7959 Study the example table included in the template files to see how this
7960 trick is implemented.
7961 Alternatively, If you need table captions, you should implement the whole
7966 file, then include this file to the LyX document (
7971 nsert\SpecialChar \menuseparator
7976 \SpecialChar \menuseparator
7985 Details on how to create a table float can be found in the files
7993 , included in the corresponding packages.
7996 \begin_layout Subsection
7997 Preparing a paper for submission
8000 \begin_layout Standard
8001 Before you submit your paper you must export the LyX document as a LaTeX
8007 ile\SpecialChar \menuseparator
8012 xport\SpecialChar \menuseparator
8019 ), then make the following changes to the resulting
8026 \begin_layout Enumerate
8027 Remove the comment lines before the
8036 \begin_layout Enumerate
8037 Remove everything between (and including) the
8049 commands, except for any commands you specifically put into the LaTeX preamble.
8052 \begin_layout Standard
8057 file should be saved and processed through LaTeX as many times as necessary.
8058 You may also want to check the resulting
8065 \begin_layout Subsection
8069 \begin_layout Standard
8070 The use of ERT is reduced to two commands, which must be placed at the top
8072 If you started writing your paper by using the
8080 template, the ERT needed is already in its place; you usually don't need
8082 You may only modify the first ERT to specify the information printed to
8083 the top of odd and even pages (authors' names and short paper's title,
8085 This ERT must have the form
8089 markboth{Authors' Names}{Short Paper's Title}
8094 \begin_layout Section
8098 \begin_layout Standard
8101 Panayotis Papasotiriou
8104 \begin_layout Subsection
8108 \begin_layout Standard
8109 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
8110 that facilitates electronic manuscript submission to the journals they
8112 Most known of them (at least in my domain of interest) are
8114 Astrophysics and Space Science
8120 , but there are many others (see a complete list at
8121 \begin_inset LatexCommand \url{http://www.wkap.nl/jrnllist.htm/JRNLHOME}
8126 The Kluwer package may be downloaded from the site
8127 \begin_inset LatexCommand \url{http://www.wkap.nl/kaphtml.htm/STYLEFILES}
8132 A complete user guide is contained in that package (but it can also be
8133 downloaded separately).
8136 \begin_layout Standard
8137 LyX supports many features of the package but not everything.
8138 However, the ERT needed is reduced to some
8139 \begin_inset Quotes eld
8143 \begin_inset Quotes erd
8146 commands of the package (see\InsetSpace ~
8148 \begin_inset LatexCommand \ref{subsec:kluwer_peculiarities}
8153 I have recently used LyX to write an article submitted to the
8155 Astrophysics and Space Science
8157 without any problem.
8160 \begin_layout Subsection
8164 \begin_layout Standard
8165 The easiest way to write a paper is to start with the Kluwer template file.
8168 File\SpecialChar \menuseparator
8180 This will give an (almost) empty document that includes the most common
8181 fields found in a manuscript and a short description of their use.
8182 As in most templates, simply overwrite the existing text (including the
8187 ) with the correct information.
8190 \begin_layout Subsection
8191 Preparing a paper for submission
8194 \begin_layout Standard
8195 As in the AASTeX package, before you submit your paper to a journal you
8197 \begin_inset Quotes eld
8201 \begin_inset Quotes erd
8207 \begin_layout Enumerate
8208 Export your paper as a LaTeX file.
8209 To do this, click on
8214 ile\SpecialChar \menuseparator
8219 xport\SpecialChar \menuseparator
8230 \begin_layout Enumerate
8235 file with a text editor and make the following changes
8239 \begin_layout Enumerate
8240 remove the comment lines before the
8249 \begin_layout Enumerate
8250 remove everything between (and including) the
8262 commands, except for any commands you specifically put into the LaTeX preamble.
8265 \begin_layout Standard
8274 \begin_layout Enumerate
8279 file through LaTeX as many times as necessary (usually up to three).
8282 \begin_layout Enumerate
8287 document using, e.g.,
8291 , and check if everything is ok (it should, if you didn't make any mistake).
8294 \begin_layout Subsection
8295 \begin_inset Quotes eld
8299 \begin_inset Quotes erd
8302 of the Kluwer package
8303 \begin_inset LatexCommand \label{subsec:kluwer_peculiarities}
8310 \begin_layout Standard
8311 The Kluwer package has the following
8312 \begin_inset Quotes eld
8316 \begin_inset Quotes erd
8322 \begin_layout Enumerate
8323 It is possible to write multiple articles in the same LaTeX file
8327 \begin_layout Standard
8328 I can't imagine any good reason to do this.
8334 Each article must be included in the environment
8335 \begin_inset Quotes eld
8339 \begin_inset Quotes erd
8343 Unfortunately, this environment cannot be omitted, even if you write just
8345 Therefore, each article starts with the command
8351 and, obviously, ends with the command
8358 Although this can be implemented in LyX, I didn't included it, since it
8359 looks ugly and can confuse the novice user.
8360 Therefore, you need to enter them directly and mark them as LaTeX code
8362 \begin_inset Quotes eld
8366 \begin_inset Quotes erd
8372 \begin_layout Enumerate
8373 Information given at the beginning of the article (i.e., title, subtitle,
8374 author, institution, running title, running author, abstract and keywords)
8375 must be included in an environment called
8376 \begin_inset Quotes eld
8380 \begin_inset Quotes erd
8384 This is not implemented in LyX, so you must enter title, subtitle etc.
8385 between two ERT lines (
8400 \begin_layout Enumerate
8401 According to the user manual, the label of each bibliography item must be
8425 \begin_layout Standard
8430 template takes care of all these
8431 \begin_inset Quotes eld
8435 \begin_inset Quotes erd
8439 If you start a new paper using this template you don't need to do anything
8444 \begin_layout Enumerate
8445 don't delete the ERT included in the template, and
8448 \begin_layout Enumerate
8449 copy the example bibliography item included in the template and modify it
8450 as necessary to enter new bibliography items.
8453 \begin_layout Section
8457 \begin_layout Standard
8463 \begin_layout Subsection
8467 \begin_layout Standard
8468 The LyX document classes
8470 article (koma-script)
8474 report (koma-script)
8492 correspond to the LaTeX document classes
8509 of the Koma-Script family.
8510 They are replacements for the standard document classes
8526 , resp., and fit better to European typography conventions in a number of
8530 \begin_layout Itemize
8531 Standard character size is 11pt in
8533 article (koma-script)
8537 report (koma-script)
8545 letter (koma-script)
8550 \begin_layout Itemize
8551 Headings, labels of the description environment, and a number of elements
8554 letter (koma-script)
8556 document class are set in a bold sans serif font.
8560 \begin_layout Standard
8561 There is a big difference between the bold sans serif old cm fonts and new
8562 ec fonts, especially in the appearance of headings.
8563 In comparison, the ec bold sans serif fonts look a bit thin.
8564 Here the LaTeX package
8571 helps to produce the
8572 \begin_inset Quotes eld
8576 \begin_inset Quotes erd
8579 appearance when using the ec fonts.
8584 The numbering of chapter headings is made in the same way as the numbering
8585 of section headings, that is without the extra line
8586 \begin_inset Quotes eld
8589 Chapter\SpecialChar \ldots{}
8591 \begin_inset Quotes erd
8595 In addition, the appearance of the headings can be modified by using a
8596 number of options (in LyX to be entered in the field
8610 ayout\SpecialChar \menuseparator
8618 A detailed German description of these options can be found in the Koma-Script
8626 \begin_layout Itemize
8627 The main means in the Koma-Script document classes to design the type area
8636 (in LyX to be entered in the extra class options field in the dialog
8641 ocument\SpecialChar \menuseparator
8649 They make a clearer modification of page margins possible as do the options
8655 ocument\SpecialChar \menuseparator
8663 A detailed German description of these and other type area options can
8664 be found in the Koma-Script documentation
8671 \begin_layout Itemize
8672 The LaTeX document classes of the Koma-Script family define a number of
8673 additional commands.
8674 Those part of it which makes sense in LyX is implemented in corresponding
8678 \begin_layout Standard
8679 A detailed German description of the LaTeX document classes of the Koma-Script
8680 family can be found in the Koma-Script documentation
8688 \begin_layout Standard
8689 There is an English translation
8693 , but it is not a complete one.
8698 The following sections describe only those aspects, which are relevant
8702 \begin_layout Subsection
8703 article (koma-script), report (koma-script), and book (koma-script)
8706 \begin_layout Standard
8707 The document classes
8709 article (koma-script)
8713 report (koma-script)
8723 are implemented in the layout files
8736 They contain all the paragraph types of the corresponding standard document
8749 , resp., partly modified, with the exception of the LyX specific
8753 -type, which is replaced by the new
8757 -type having the same functionality.
8762 -Type there is a number of new paragraph types added.
8769 letter (koma-script)
8774 \begin_layout Itemize
8783 : are equivalents to
8791 , resp., additionally inserting an entry in the table of contents.
8800 are not contained in
8802 article (koma-script)
8807 \begin_layout Itemize
8824 , resp., additionally clearing running heads.
8831 article (koma-script)
8837 \begin_layout Standard
8850 report (koma-script)
8852 , but since this is identical to
8856 , is has not been implemented in LyX.
8864 \begin_layout Itemize
8869 : generates a heading directly above the following paragraph in the standard
8870 character size without affecting the structure of the document.
8873 \begin_layout Itemize
8882 are special captions which respect the different space settings needed for
8883 captions placed above or below an element (if you follow strict typographic
8884 rules, you might want to place table captions always above the table).
8885 You can also use the class option
8902 You need at least Koma-Script version 2.8q to use this.
8905 \begin_layout Itemize
8910 : can be used to set a bonmot, e.
8914 \begin_layout Standard
8927 \begin_layout Standard
8936 at the beginning of a chapter.
8937 If you use the optional argument (
8942 nsert\SpecialChar \menuseparator
8946 ), you can insert the dictum's author there.
8947 Dictum and author are separated by a line.
8948 You need at least Koma-Script version 2.8q to use this.
8955 article (koma-script)
8960 \begin_layout Standard
8961 The following types, together with the standard types
8973 , form the title area of the document.
8974 They must be entered ahead of the first
8975 \begin_inset Quotes eld
8979 \begin_inset Quotes erd
8986 \begin_layout Standard
8987 The corresponding LaTeX commands must appear before the
8998 When such a type is used more than once, the latter usage overwrites the
8999 former one, that means, for every type only the latest usage is valid.
9000 The order of the different types however has, like
9012 , no effect on the appearance of the produced document.
9015 \begin_layout Itemize
9020 : produces a centered paragraph above the ordinary title (
9032 ) for the subject of the document.
9035 \begin_layout Itemize
9040 : produces a centered paragraph below the ordinary title (
9052 ) for the publishers' name.
9055 \begin_layout Itemize
9062 report (koma-script)
9068 produces a centered paragraph on its own page behind the title page, or
9071 article (koma-script)
9073 produces a centered paragraph below the ordinary title (
9092 \begin_layout Itemize
9097 : produces a left aligned paragraph above the ordinary title (
9113 ) for a document`s head.
9116 \begin_layout Itemize
9121 : produces in a double-sided print in
9123 report (koma-script)
9129 a left-aligned paragraph at the top of the title page`s back or has no
9130 effect in a single-sided print or in
9132 article (koma-script)
9137 \begin_layout Itemize
9142 : produces in a double-sided print in
9144 report (koma-script)
9150 a left-aligned paragraph at the bottom of the title page`s back or has
9151 no effect in a single-sided print or in
9153 article (koma-script)
9158 \begin_layout Itemize
9163 : produces a special
9164 \begin_inset Quotes eld
9168 \begin_inset Quotes erd
9171 page ahead of the actual document containing a paragraph without special
9175 \begin_layout Standard
9176 The layout files for the document classes
9178 article (koma-script)
9182 report (koma-script)
9193 This is thought of as a place to define your own types.
9198 in your personal layout directory and edit the file!
9201 \begin_layout Subsection
9202 letter (koma-script)
9205 \begin_layout Standard
9209 \begin_layout Standard
9221 \begin_layout Standard
9225 letter (koma-script)
9227 is implemented in the layout file
9232 It contains all the paragraph types of the corresponding standard document
9237 , partly modified, with the exception of the LyX specific types
9249 type, which is replaced by the new
9254 In addition, it contains, in contrast to the standard document class, the
9272 Furthermore, there are a number of new letter specific types.
9275 \begin_layout Standard
9279 \begin_layout Standard
9291 \begin_layout Standard
9292 The appearance of the letter produced by this document class can be controlled
9293 by a number of LaTeX commands, which you can put in the LaTeX preamble.
9297 \begin_layout Standard
9298 For example, the standard appearance of the letter`s heading, consisting
9299 of name and address, is quite self-willed.
9301 \begin_inset Quotes eld
9305 \begin_inset Quotes erd
9308 heading is produced by the following LaTeX commands in the preamble:
9311 \begin_layout LyX-Code
9321 \begin_layout LyX-Code
9337 \begin_layout LyX-Code
9347 \begin_layout LyX-Code
9367 A detailed German description of such LaTeX commands can be found in the
9368 Koma-Script documentation
9373 With it, the letter's author can produce his personal letter layout.
9376 \begin_layout Standard
9385 define the beginning of the letter and must be used in every letter.
9386 To emphasize them in the LyX document class, they are marked with the letter
9397 It is possible to write any number of letters in one file.
9402 type produces a new letter using the same addressee and a
9406 type produces a new addressee.
9423 are ordinary paragraph types and can also be used several times in one
9424 and the same letter.
9427 \begin_layout Itemize
9432 : produces a paragraph for the addressee and implicitly defines the beginning
9436 \begin_layout Itemize
9441 : produces a paragraph for the form of address and implicitly produces a
9445 \begin_layout Itemize
9450 : produces a paragraph for a close.
9453 \begin_layout Itemize
9458 : produces a paragraph for a postscript.
9461 \begin_layout Itemize
9466 : produces a paragraph for a distribution list.
9469 \begin_layout Itemize
9474 : produces a paragraph for enclosures.
9477 \begin_layout Standard
9518 are input types provided with a label to enter information, which will
9519 be processed by the document class.
9523 \begin_layout Standard
9524 It could be seen as a matter of inconsequence, that the types
9532 described above are not such input types as well.
9533 Because of the special meaning of those types, however, I have implemented
9534 them as ordinary paragraph types with a one letter mark in the left margin.
9535 Moreover, it would affect my feeling of symmetry, if the
9543 type had such a serious different appearance.
9548 The types must be used ahead of the corresponding
9555 \begin_layout Standard
9556 An implementation of these types in a WYSIWYG fashion does not seem to make
9557 sense, because the real appearance of the produced letter does not only
9558 depend on the usage of the particular type, but also on other factors.
9559 For example, a signature entered in the
9563 type will in the standard behavior appear in the produced letter only,
9564 when in the same letter also a
9569 The entered value of the
9573 type will in the standard behavior not appear in the produced letter at
9575 The possibility to design the letter`s heading freely is already indicated
9576 in a footnote above.
9579 \begin_layout Standard
9580 The input types can also be used as empty paragraphs.
9581 This makes sense e.\InsetSpace ~
9592 type is not used at all, in the standard behavior the value of the
9596 type is used as signature, whereas if an empty
9600 type is used, no signature value is defined.
9603 \begin_layout Standard
9604 By using the input types it is possible to write a letter template, containing
9605 filled input types with your personal dates (name, address, etc.) and empty
9606 input types for other dates you want to enter.
9609 \begin_layout Itemize
9614 : sender's name, in the standard behavior appears as a centered paragraph
9615 in small caps in the letter`s heading.
9618 \begin_layout Itemize
9623 : sender's signature, in the standard behavior appears below the
9632 type is used, the value of the
9636 type appears instead.
9639 \begin_layout Itemize
9644 : sender's address, in the standard behavior appears in a centered paragraph
9645 in the letter`s heading below the sender's name.
9648 \begin_layout Itemize
9653 : sender's telephone number, in the standard behavior only sets the LaTeX
9663 \begin_layout Itemize
9668 : place of the letter`s making.
9671 \begin_layout Itemize
9676 : date of the letter`s making.
9685 , in the standard behavior, produce the place and the date in a right-aligned
9686 line below the addressee's field.
9691 type is used, neither place nor date appear, independent of the value of
9701 type is used, the date of the letter `s production is used.
9704 \begin_layout Itemize
9709 : sender`s back address, in the standard behavior appears above the addressee's
9710 field in a small sans serif font.
9713 \begin_layout Itemize
9718 : special mail information, in the standard behavior appears underlined
9719 above the addressee's field below the back address.
9722 \begin_layout Itemize
9727 : additional information, in the standard behavior appears on right side
9728 below the addressee`s field.
9731 \begin_layout Itemize
9736 : the letter's title, in the standard behavior appears in a big, bold, sans
9737 serif font above the subject.
9740 \begin_layout Itemize
9745 : the letter's subject, in the standard behavior appears in a bold font
9753 \begin_layout Standard
9774 produce a business letter like line above the
9778 line containing the fields
9779 \begin_inset Quotes eld
9783 \begin_inset Quotes erd
9787 \begin_inset Quotes eld
9791 \begin_inset Quotes erd
9795 \begin_inset Quotes eld
9799 \begin_inset Quotes erd
9803 \begin_inset Quotes eld
9807 \begin_inset Quotes erd
9811 \begin_inset Quotes eld
9815 \begin_inset Quotes erd
9819 \begin_inset Quotes eld
9823 \begin_inset Quotes erd
9827 For the date field, the value of the
9833 \begin_inset Quotes eld
9836 business letter types
9837 \begin_inset Quotes erd
9840 is used, the value of the
9844 type however does not appear, but only the LaTeX variable
9851 The ordinary output of place and date in a right-aligned line below the
9852 addressee`s field is suppressed.
9853 The types are implemented as input types provided with a label and must
9854 be used ahead of the corresponding
9861 \begin_layout Itemize
9869 \begin_layout Itemize
9877 \begin_layout Itemize
9885 \begin_layout Itemize
9893 \begin_layout Itemize
9901 \begin_layout Subsection
9902 The new letter class: letter (koma-script v.2)
9905 \begin_layout Standard
9908 Jürgen Spitzmüller
9911 \begin_layout Standard
9912 \begin_inset VSpace medskip
9918 \begin_layout Standard
9920 Koma-Script version 2.8 has introduced a new letter class
9924 which superceeds the now unsupported
9929 It has --- on the LaTeX side --- a completely new interface and is not
9930 compatible with the old class.
9931 Therefore, LyX supports both, though it is recommended to use the new class.
9934 \begin_layout Standard
9935 This class covers the same functionality as
9937 letter (koma-script),
9944 (receiver's address, same as
9961 will start a new letter (i.
9965 \begin_layout Standard
9978 \begin_layout Standard
9987 you can write several letters per document).
9988 New elements are sender's
10004 and the possibility to use a
10013 nsert\SpecialChar \menuseparator
10023 \begin_layout Standard
10024 The biggest improvement is, though, that the letter's layout is configurable
10025 at almost any needs.
10026 This can be done via the preamble or with a special style file (Letter
10027 Class Option, extension
10031 ), that will be read in as a class option.
10035 \begin_layout Standard
10036 The KOMA package comes with some default
10041 There is, for instance, a
10045 file that follows german typesetting rules, or a
10049 that provides the default layout of the old
10054 The latter can be loaded with the class option
10063 ayout\SpecialChar \menuseparator
10068 ocument\SpecialChar \menuseparator
10080 template that is included in LyX for examples.
10081 A detailed description is to be found in the Koma-Script documentation
10089 \begin_layout Subsection
10093 \begin_layout Standard
10094 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
10098 \begin_layout Itemize
10099 The chapter number of a
10103 type appears on a line of its own above the chapter heading instead of
10104 appearing in the same line ahead of it.
10105 The cause for that is the LyX internal behavior for the labeltype
10109 in the layout file.
10112 \begin_layout Itemize
10113 The headings of the types
10121 are only put in the
10122 \begin_inset Quotes eld
10126 \begin_inset Quotes erd
10129 LaTeX table of contents, but not in the LyX table of contents (
10134 ocument\SpecialChar \menuseparator
10146 \begin_layout Itemize
10147 The paragraphs in a
10151 document class appear in a skip separation mode, not indented.
10152 This is the standard behavior, no special LaTeX commands are needed for
10159 ocument\SpecialChar \menuseparator
10166 dialog the corresponding radio button indicates
10182 value always has the effect that extra LaTeX commands are inserted in the
10183 document to produce the gap, which is not what is wanted in this case.
10186 \begin_layout Section
10187 Springer Journals (
10194 \begin_layout Standard
10200 \begin_layout Subsection
10204 \begin_layout Standard
10205 These are the layout files for some of the journal formats used by Springer
10206 Verlag and listed on
10207 \begin_inset LatexCommand \url{http://www.springer.de/author/tex/help-journals.html}
10211 , where you should also go to fetch the class files (yes, these are LaTeX2e
10213 It is a modular system: the things common to all journals are implemented
10218 , which journal-specific layout files (such as, e.g.,
10222 for Journal of Geodesy) can include.
10225 \begin_layout Standard
10226 This means that implementing support for any other Springer journal on this
10227 list is as simple as writing your own
10235 file following the outline given in
10243 \begin_layout Standard
10244 It is reasonably well tested only for the Journal of Geodesy.
10253 come with the standard LyX distribution.
10254 Install the relevant class file (downloaded from Springer) in a proper
10255 directory, reconfigure LaTeX (in the teTeX case by running
10259 , as root if necessary --- doesn't LyX take care of this?), reconfigure
10260 LyX and it should work.
10263 \begin_layout Subsection
10267 \begin_layout Standard
10268 A large number of theorem-like styles ---
10274 \SpecialChar \ldots{}
10280 \begin_layout Standard
10283 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
10284 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
10287 See the Springer class file documentation for details.
10290 \begin_layout Subsection
10294 \begin_layout Itemize
10306 \begin_layout Itemize
10309 Probability Theory and Related Fields
10315 --- Jean-Marc Lasgouttes
10318 \begin_layout Standard
10319 Add your own, it isn't so hard!
10322 \begin_layout Subsection
10326 \begin_layout Standard
10327 These files are partly based on the older
10331 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
10332 file from Springer.
10337 layout, are now defunct.
10338 Jean-Marc Lasgouttes helped out big in making me find my way around the
10339 LyX layout file mechanism.
10342 \begin_layout Subsection
10346 \begin_layout Standard
10348 But probably less than in the old hacked-LaTeX
10355 \begin_layout Standard
10356 Limitations e.g.: does not display the number for theorem-like layouts, just
10360 \begin_layout Section
10368 \begin_layout Standard
10374 \begin_layout Subsection
10378 \begin_layout Standard
10379 These are the layout files for some of the journals of the American Geophysical
10381 It is assumed that you have both the AGU's own class files and AGUplus
10382 installed (everything to be found at
10383 \begin_inset LatexCommand \url{ftp://ftp.agu.org/journals/latex/journals}
10390 \begin_layout Subsection
10394 \begin_layout Standard
10404 They are still called this in the LyX GUI, though their LaTeX equivalents
10405 in the AGU classes are
10416 \begin_layout Standard
10417 Newly defined styles are
10454 These are mostly manuscript attributes and defined in the AGU class documentati
10458 \begin_layout Standard
10459 I suspect this is still badly incomplete.
10462 \begin_layout Subsection
10466 \begin_layout Standard
10483 \begin_layout Subsection
10487 \begin_layout Itemize
10490 Journal of Geophysical Research
10499 \begin_layout Standard
10500 Add your own, it isn't so hard! Look at the
10511 \begin_layout Subsection
10512 Bugs and things to remember
10515 \begin_layout Standard
10516 In order to use the new layouts, you must remember to do the following for
10520 \begin_layout Enumerate
10526 This can be done in the
10528 layout\SpecialChar \menuseparator
10533 document\SpecialChar \menuseparator
10537 (AGU articles are always in English, right? So
10541 choose a language.)
10544 \begin_layout Enumerate
10549 into the document's
10554 (Yes, this is a bug.)
10557 \begin_layout Enumerate
10558 Make sure you use the
10562 bibliography style, by entering
10566 into the second field of the BibTeX inset.
10567 None of the standard styles will do.
10570 \begin_layout Section
10578 \begin_layout Standard
10584 \begin_layout Subsection
10588 \begin_layout Standard
10589 This is the layout file for the European Geophysical Society journals.
10594 can be downloaded from the web site of the EGS under
10595 \begin_inset LatexCommand \url{www.copernicus.org}
10602 \begin_layout Subsection
10606 \begin_layout Standard
10609 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
10617 The current layout file is unfortunately very unmodular and would benefit
10618 from using the various
10625 \begin_layout Section
10631 \begin_inset LatexCommand \label{sec:slitex}
10638 \begin_layout Standard
10646 \begin_layout Subsection
10650 \begin_layout Standard
10651 This section describes how to use LyX to make slides for overhead projectors.
10652 There are two document classes that can do this: the default slides class
10658 This section documents the former.
10661 \begin_layout Standard
10662 I'm going to say this again, nice and clear, so that there's no misunderstanding
10666 \begin_layout Standard
10667 \begin_inset VSpace bigskip
10673 \begin_layout Standard
10677 This section documents the class
10678 \begin_inset Quotes eld
10686 \begin_inset Quotes erd
10694 \begin_layout Standard
10695 \begin_inset VSpace bigskip
10701 \begin_layout Standard
10702 If you're looking for the documentation for
10703 \begin_inset Quotes eld
10711 \begin_inset Quotes erd
10714 , check out section\InsetSpace ~
10716 \begin_inset LatexCommand \ref{sec:foiltex}
10726 \begin_inset Quotes eld
10734 \begin_inset Quotes erd
10737 ] is actually somewhat better than the default
10745 \begin_layout Standard
10746 \SpecialChar \ldots{}
10747 or so I've been told repeatedly by its advocates.
10748 Having never used it, I have no idea if this claim is true or not.
10753 which this section documents.
10756 \begin_layout Standard
10757 This class is the LaTeX2e improvement of the old
10762 Every LaTeX2e distribution includes this class [which I'll just refer to
10764 \begin_inset Quotes eld
10772 \begin_inset Quotes erd
10775 from now on], so you're bound to have it.
10776 As I noted earlier, there are other classes, such as
10780 , which also produce slides for overhead projectors and do a better job
10782 However, there are some things which
10786 can do which the others can't, such as generate overlays.
10787 Read on to learn more!
10790 \begin_layout Subsection
10792 \begin_inset LatexCommand \label{sec:slidesetup}
10799 \begin_layout Standard
10800 Obviously, to use this document class, you need to select
10801 \begin_inset Quotes eld
10809 \begin_inset Quotes erd
10812 from the class list in the
10817 ocument\SpecialChar \menuseparator
10825 There are some other special things you should know about this class:
10828 \begin_layout Itemize
10829 Don't bother changing the options
10834 They're not supported by the
10841 \begin_layout Itemize
10850 behaves a bit differently for this class.
10851 The possible choices and what they do are as follows:
10855 \begin_layout Description
10860 The final output contains page numbers in the lower right corner.
10863 \begin_layout Description
10872 , but also prints out any time markers you've put in.
10873 This is the default.
10876 \begin_layout Description
10881 The final output contains no page numbers, time markers, or alignment markers.
10885 \begin_layout Itemize
10890 class has an extra option:
10896 \begin_inset Quotes eld
10904 \begin_inset Quotes erd
10907 in the extra class options.
10911 \begin_layout Standard
10912 Using this options allows you to add time markers to
10917 See section\InsetSpace ~
10919 \begin_inset LatexCommand \ref{sec:slideNote}
10927 \begin_layout Standard
10928 You can also use the template file
10929 \begin_inset Quotes eld
10937 \begin_inset Quotes erd
10940 to automatically set up a document to use the
10949 ile\SpecialChar \menuseparator
10958 to open your new document].
10959 The template file also contains some examples of the special paragraph
10960 environments used by this class.
10961 I'll describe those next.
10964 \begin_layout Subsection
10965 Paragraph Environments
10968 \begin_layout Subsubsection
10969 Supported Environments
10972 \begin_layout Standard
10973 The first thing you'll notice when you start up a new
10977 document is the font size and type: it's the equivalent of the size
10978 \begin_inset Quotes eld
10986 \begin_inset Quotes erd
10995 This is also what's used in the output.
10997 \begin_inset Quotes eld
11001 \begin_inset Quotes erd
11004 to remind you that this is a slide.
11005 Your final slides will use a larger font; ergo, you'll have less space.
11006 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
11009 \begin_layout Standard
11010 The next thing that becomes obvious is the changes to the paragraph environment
11011 pull-down box [at the far-left end of the toolbar].
11012 Most of the paragraph environments you're used to seeing are missing.
11013 There are also five new ones.
11018 class itself only supports certain paragraph environments:
11021 \begin_layout Itemize
11027 \begin_layout Itemize
11033 \begin_layout Itemize
11039 \begin_layout Itemize
11045 \begin_layout Itemize
11051 \begin_layout Itemize
11057 \begin_layout Itemize
11063 \begin_layout Itemize
11069 \begin_layout Itemize
11075 \begin_layout Itemize
11081 \begin_layout Itemize
11087 \begin_layout Standard
11088 All of the other standard environments, including the section-heading environmen
11089 ts, aren't used in the
11096 \begin_layout Standard
11097 On the other hand, you'll notice the following new environments:
11100 \begin_layout Itemize
11106 \begin_layout Itemize
11112 \begin_layout Itemize
11118 \begin_layout Itemize
11124 \begin_layout Itemize
11130 \begin_layout Standard
11131 These five are kind of quirky, due to a
11132 \begin_inset Quotes eld
11136 \begin_inset Quotes erd
11140 You see, LyX doesn't permit you to nest any other paragraph environment
11141 into an empty environment.
11142 Now, that's fine and dandy, but it means that you wouldn't be able to start
11143 a slide with anything except plain text.
11144 To deal with this, I've performed a little
11145 \begin_inset Quotes eld
11149 \begin_inset Quotes erd
11155 \begin_layout Subsubsection
11156 Quirks of the New Environments
11157 \begin_inset LatexCommand \label{sec:slideQuirk}
11164 \begin_layout Standard
11165 All five of the new paragraph environments are somewhat quirky due to inherent
11166 limitiations in the current version of LyX.
11167 As I just mentioned, LyX forbids environments that begin with another environme
11169 To get around this, the
11173 environment isn't a paragraph environment as described in the
11181 \begin_layout Standard
11182 You should consider
11195 \begin_inset Quotes eld
11198 pseudo-environments.
11199 \begin_inset Quotes erd
11202 They look like a section heading or a
11203 \begin_inset Quotes eld
11211 \begin_inset Quotes erd
11214 but really begin a [and, if necessary, end the previous] paragraph environment.
11224 \begin_inset Quotes eld
11228 \begin_inset Quotes erd
11231 These two perform some action.
11234 \begin_layout Standard
11235 A common feature of all five environments,
11255 , is a rather long-ish label.
11256 The text following this label --- ordinarily the contents of the paragraph
11257 environment --- is utterly irrelevant for
11278 LyX completely ignores it.
11279 In fact, you can leave these five environments completely empty.
11283 \begin_layout Standard
11288 to put any text after the rather long-ish label, you might want to.
11289 This could be a short description of the contents of the
11294 In that case, enter in your descriptive comment and hit
11298 as you normally would.
11301 \begin_layout Standard
11302 If, on the other hand, you don't want to enter in any descriptive text,
11303 you'll hit another LyX quirk.
11304 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
11305 environment until you put something in the old one.
11309 \begin_layout Itemize
11310 Start entering the text that will
11338 \begin_layout Itemize
11339 Now move to the beginning of that paragraph.
11343 \begin_layout Itemize
11352 \begin_layout Itemize
11353 Finally, change this new, empty paragraph to a
11377 \begin_layout Standard
11378 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
11382 \begin_layout Subsection
11383 Making a Presentation with
11396 \begin_layout Subsubsection
11404 \begin_layout Standard
11405 If you're expecting this section to teach you how to actually make a presentatio
11406 n, you'll be sorely disappointed.
11407 Naturally, I'll describe all of the ways the
11411 class can assist you in preparing the materials for a presentation.
11412 Filling in the contents, however, is up to you.
11417 the LyX philosophy.]
11420 \begin_layout Standard
11425 environment [in the manner described in section\InsetSpace ~
11427 \begin_inset LatexCommand \ref{sec:slideQuirk}
11431 ] tells LyX to begin a new slide [duh].
11432 The label for this environment/
11433 \begin_inset Quotes erd
11437 \begin_inset Quotes erd
11441 \begin_inset Quotes eld
11445 \begin_inset Quotes erd
11448 in cool blue, followed by the label,
11449 \begin_inset Quotes eld
11453 \begin_inset Quotes erd
11457 Any text or paragraph environments that follow this one go on the new slide.
11461 \begin_layout Standard
11462 Slides are probably the only time you'll need to forcibly end pages in LyX
11463 (this can be specified in the
11468 In fact, you'll want to, once you finish entering the contents of one slide.
11469 If you've entered more text than can physically fit on a slide, the extra
11470 overflows onto a new slide.
11471 I don't recommend doing this, however, since the overflow slide won't have
11472 any page number on it.
11473 Furthermore, it may interfere with any
11477 you've made to accompany the oversized
11484 \begin_layout Standard
11493 environments work the same way as the
11498 They both create an
11499 \begin_inset Quotes eld
11503 \begin_inset Quotes erd
11506 followed by a label [
11507 \begin_inset Quotes eld
11511 \begin_inset Quotes erd
11515 \begin_inset Quotes eld
11519 \begin_inset Quotes erd
11523 The color is a stunning magenta instead of blue, and the
11524 \begin_inset Quotes eld
11528 \begin_inset Quotes erd
11531 will look different, in style and in length.
11532 The label fonts of all three also differ from one another.
11535 \begin_layout Standard
11540 , if the contents of a
11548 exceed the physical size of a slide or sheet of paper, the extra will overflow
11550 Again, you should avoid this.
11551 It defeats the whole purpose of
11562 \begin_layout Subsubsection
11572 \begin_layout Standard
11577 is a slide that sits atop another slide.
11578 Perhaps you wish to discuss a figure on the main
11582 before displaying the text associated with it.
11583 One way to accomplish this is tape a flap of dark paper over the part of
11588 you want to display later.
11589 This method fails, however, if you wish to overlap one graph with another,
11591 You would then have to fumble while speaking to align the two separate,
11596 s to align the two graphs.
11601 environment in both cases makes life much easier.
11604 \begin_layout Standard
11609 receives the page number of its
11610 \begin_inset Quotes eld
11614 \begin_inset Quotes erd
11622 \begin_inset Quotes eld
11630 \begin_inset Quotes erd
11637 \begin_layout Standard
11638 Presumably, mutliple
11643 \begin_inset Quotes eld
11651 \begin_inset Quotes erd
11655 \begin_inset Quotes eld
11663 \begin_inset Quotes erd
11667 \begin_inset Quotes eld
11675 \begin_inset Quotes erd
11678 , etc.\InsetSpace ~
11679 appended to the page number of the parent
11689 Clearly, you want the contents of both the
11697 to each fit on a single physical slide! You should probably consider an
11703 \begin_inset Quotes eld
11707 \begin_inset Quotes erd
11719 class provides a visual cue for this: the label at the start of an
11723 is shorter than that at the start of a
11728 Lastly, when you generate printable output, you'll find alignment markers
11729 in all four corners of both the
11733 page and its parent
11738 These will assist you in lining up the two physical slides.
11741 \begin_layout Standard
11742 The major problem in overlaying two slides is aligning the contents of the
11743 two transparencies.
11744 How much space should you leave for that graph on the second slide? Worse
11745 still, what if you want a graph and a sentence on second slide, but there
11746 is text on the main transparency that goes in between them? You could try
11747 and insert vertical space of the right size.
11748 The better way is to use
11759 \begin_layout Standard
11760 As their names imply,
11768 are two command-like paragraph environments that make all subsequent text
11769 invisible and visible, respectively.
11770 Note from section\InsetSpace ~
11772 \begin_inset LatexCommand \ref{sec:slideQuirk}
11776 that you don't place anything
11780 these two environments, however.
11785 , it inserts a centered, sky-blue label into the page reading
11786 \begin_inset Quotes eld
11789 <Invisible Text Follows>
11790 \begin_inset Quotes erd
11794 For paragraphs following this label, the parts of the
11802 ; it doesn't matter which] where they would be contain instead blank space.
11806 \begin_layout Standard
11811 , the corresponding centered label is
11812 \begin_inset Quotes eld
11815 <Visible Text Follows>
11816 \begin_inset Quotes erd
11820 Paragraphs following this label behave normally.
11821 Note that the beginning of a new
11833 automatically shuts off an
11838 It's therefore not necessary to use
11849 \begin_layout Standard
11850 By now, it should be obvious how to create overlay transparencies using
11851 the proper combination of
11870 \begin_layout Enumerate
11875 , including everything that will appear on it, whether on the main slide
11883 \begin_layout Enumerate
11884 Before each figure or paragraph that will appear only on the
11893 If necessary, insert a
11897 environment after the
11904 \begin_layout Enumerate
11909 immediately following the
11916 \begin_layout Enumerate
11917 Copy the contents of this
11928 \begin_layout Enumerate
11933 , change all of the
11944 \begin_layout Standard
11946 You've just made an
11953 \begin_layout Standard
11954 There's one problem with the way I've designed the LyX
11958 class: you can't make text in the middle of a paragraph invisible, nor
11959 make text in the middle of an invisible paragraph visible again.
11960 To accomplish this feat, you'll need to use some inlined LaTeX codes.
11964 \begin_layout Standard
11965 The commands of interest are:
11968 \begin_layout Itemize
11973 invisible \SpecialChar \ldots{}
11977 \begin_layout Itemize
11982 visible \SpecialChar \ldots{}
11986 \begin_layout Standard
11987 \SpecialChar \ldots{}
11988 and need to be marked as TeX.
11990 \begin_inset Quotes eld
11994 \begin_inset Quotes erd
11997 you wish to change goes in between the brackets [and after the
12010 If you don't know how to mark text as TeX, see the apprpriate section of
12023 \begin_layout Subsubsection
12033 \begin_inset LatexCommand \label{sec:slideNote}
12040 \begin_layout Standard
12049 is associated with a
12050 \begin_inset Quotes eld
12054 \begin_inset Quotes erd
12066 class provides visual cues.
12071 is shorter than that of a
12075 [yet longer than that of an
12079 ] and, like the label of an
12083 is shockingly magenta.
12084 Additionally, the printed
12088 has the page number of its
12089 \begin_inset Quotes eld
12093 \begin_inset Quotes erd
12101 \begin_inset Quotes eld
12109 \begin_inset Quotes erd
12113 \begin_inset Quotes eld
12121 \begin_inset Quotes erd
12125 \begin_inset Quotes eld
12133 \begin_inset Quotes erd
12137 You can have multiple
12141 s associated with a single
12153 , you'll probably want to break up long
12157 s so that they fit on a single sheet of paper.
12160 \begin_layout Standard
12165 is obvious: it contains anything additional you might want to say about
12171 It could also be used as a sheet of reminders for a particular
12176 In the case of the latter, you might want to make use of time markers.
12182 \begin_inset Quotes eld
12186 \begin_inset Quotes erd
12189 support for time markers, a
12194 So, you'll have to resort to using the LaTeX codes.
12197 \begin_layout Standard
12198 To use time markers, you'll need to specify the extra class option
12199 \begin_inset Quotes eld
12207 \begin_inset Quotes erd
12210 [see section\InsetSpace ~
12212 \begin_inset LatexCommand \ref{sec:slidesetup}
12217 This option turns on timing marks, which will appear in the lower-left-hand
12223 To set what appears in the time marker, you use the LaTeX commands
12224 \begin_inset Quotes eld
12234 \begin_inset Quotes erd
12238 \begin_inset Quotes eld
12248 \begin_inset Quotes erd
12252 The arguments of both commands are time measured in seconds.
12254 \begin_inset Quotes eld
12264 \begin_inset Quotes erd
12267 sets the time marker to a given time.
12269 \begin_inset Quotes eld
12279 \begin_inset Quotes erd
12282 increments the time marker by the specified amount.
12283 Using time markers and
12287 s in this fashion, you can remind yourself how much time to spend on a particula
12295 \begin_layout Standard
12296 There's one last feature to describe.
12297 Clearly, you'd like to print out all of your
12305 s on transparencies while printing all of your
12322 with which it is associated.
12323 What's a person to do?
12326 \begin_layout Standard
12327 Luckily, there are two LaTeX commands that allow you to select what to print
12329 Both must be placed into the preamble of your document.
12331 \begin_inset Quotes eld
12343 \begin_inset Quotes erd
12346 will cause the output to contain only the
12355 Correspondingly, the command
12356 \begin_inset Quotes eld
12368 \begin_inset Quotes erd
12371 prevents the output of anything but
12376 I'd advise placing both commands in the preamble and initially comment
12378 You can then preview your entire presentation as you write.
12379 When you're done writing, you can then uncomment one of the two to select
12380 what you want to print.
12381 I like to uncomment
12382 \begin_inset Quotes eld
12394 \begin_inset Quotes erd
12397 , print to a file with
12398 \begin_inset Quotes eld
12406 \begin_inset Quotes erd
12409 in its name, comment it back out, then uncomment
12410 \begin_inset Quotes eld
12422 \begin_inset Quotes erd
12426 \begin_inset Quotes eld
12434 \begin_inset Quotes erd
12438 I can then send either file to a printer, loading transparencies or plain
12439 paper as appropriate.
12442 \begin_layout Standard
12443 You can also provide other arguments to the
12444 \begin_inset Quotes eld
12454 \begin_inset Quotes erd
12458 \begin_inset Quotes eld
12468 \begin_inset Quotes erd
12472 See a good LaTeX book for details.
12475 \begin_layout Subsection
12480 Class Template File
12483 \begin_layout Standard
12484 I have also provided a template file,
12485 \begin_inset Quotes eld
12493 \begin_inset Quotes erd
12501 To use it, begin your new presentation with
12506 ile\SpecialChar \menuseparator
12516 Your new LyX presentation file will contain an example
12537 additionally contain an example of the use of
12546 Lastly, the preamble will contain:
12549 \begin_layout LyX-Code
12550 % Uncomment to print out only slides and overlays
12553 \begin_layout LyX-Code
12557 \begin_layout LyX-Code
12567 \begin_layout LyX-Code
12568 % Uncomment to print out only notes
12571 \begin_layout LyX-Code
12575 \begin_layout LyX-Code
12583 \begin_layout Standard
12584 One final thing: I created this class to support the LaTeX2e
12585 \begin_inset Quotes eld
12593 \begin_inset Quotes erd
12596 class, one of the built-in LaTeX2e classes.
12597 Neither I nor the rest of the LyX Team endorse or oppose the use of this
12598 built-in slide class.
12599 It's here if you want it or need it.
12600 There exist other LaTeX2e classes for creating presentations, such as the
12605 class [see section\InsetSpace ~
12607 \begin_inset LatexCommand \ref{sec:foiltex}
12612 \begin_inset Quotes eld
12620 \begin_inset Quotes erd
12623 package [present on some TeX distributions].
12624 The latter is not yet supported under LyX.
12628 \begin_layout Standard
12629 Perhaps you can take on the task\SpecialChar \ldots{}
12635 I know nothing about these other classes.
12636 Try them out to see what sort of alternative they provide.
12639 \begin_layout Section
12648 \begin_inset LatexCommand \label{sec:foiltex}
12655 \begin_layout Standard
12661 \begin_layout Subsection
12665 \begin_layout Standard
12666 This section describes how to use LyX to make slides for overhead projectors.
12667 There are two document classes that can do this: the default slides class
12673 This section documents the latter.
12676 \begin_layout Standard
12677 I'm going to say this again, nice and clear, so that there's no misunderstanding
12681 \begin_layout Standard
12682 \begin_inset VSpace bigskip
12688 \begin_layout Standard
12692 This section documents the class
12693 \begin_inset Quotes eld
12701 \begin_inset Quotes erd
12709 \begin_layout Standard
12710 \begin_inset VSpace bigskip
12716 \begin_layout Standard
12717 If you're looking for the documentation for
12718 \begin_inset Quotes eld
12726 \begin_inset Quotes erd
12729 , check out section\InsetSpace ~
12731 \begin_inset LatexCommand \ref{sec:slitex}
12736 If your machine doesn't have the
12741 \begin_inset Quotes eld
12749 \begin_inset Quotes erd
12752 ] installed, you'll probably have to use the default
12756 class, which isn't quite as good as
12761 \begin_layout Standard
12766 class is designed for use with version 2.1 of the
12770 LaTeX class file which is now an integral part of LaTeX2e.
12773 \begin_layout Subsection
12777 \begin_layout Standard
12778 Obviously, to use this document class, you need to select
12779 \begin_inset Quotes eld
12787 \begin_inset Quotes erd
12799 Document\InsetSpace ~
12803 There are some settings in the
12805 Document\InsetSpace ~
12808 dialog that you should know about that are specific to this class:
12811 \begin_layout Itemize
12812 Don't change the options
12822 Document\InsetSpace ~
12826 They're ignored by the
12833 \begin_layout Itemize
12834 The default font size is 20pt with the other options being 17pt, 25pt and
12838 \begin_layout Itemize
12839 The default font is
12847 but all math equations are still typeset in the usual roman font.
12850 \begin_layout Itemize
12855 TeX supports A4 and Letter paper sizes as well as a special size for working
12857 It doesn't support A5, B5, legal or executive paper sizes.
12860 \begin_layout Itemize
12861 Don't bother changing the
12865 settings because they are ignored anyway.
12866 All floats appear where they are defined in the text.
12869 \begin_layout Itemize
12877 setting behaves a bit differently for this class.
12882 TeX provides extensive footer and header capabilities including a user-defined
12884 See section\InsetSpace ~
12886 \begin_inset LatexCommand \ref{sec:foilfoot}
12891 The title page is treated differently to all other pages in the document
12900 has the logo centered at the bottom of the page (if one is defined).
12901 The possible page style choices and what they do are as follows:
12906 \labelwidthstring MMMMMMM
12913 The final output contains no page numbers, or other headers or footers
12914 (except footnotes of course).
12919 \labelwidthstring MMMMMMM
12926 The final output contains page numbers centered at the bottom of the page.
12927 No other headings or footers (other than footnotes).
12931 \labelwidthstring MMMMMMM
12936 Page numbers in lower right corner.
12937 Additional headers and footers are also shown.
12938 This is also the default.
12942 \labelwidthstring MMMMMMM
12947 Gives you access to the
12951 package although its use with
12955 TeX is discouraged by the writer of the
12959 TeX package because of some potential page layout clashes.
12963 \begin_layout Subsubsection
12967 \begin_layout Standard
12968 The following options may be used in the extra class options in the
12973 ocument\SpecialChar \menuseparator
12984 \labelwidthstring MMMMMMx
12989 This sets up the page layout for 7.33in by 11in paper, which is about the
12990 same aspect ratio as a 35mm slide, making it a bit easier to work with
12995 \labelwidthstring MMMMMMx
13000 Places a rule across the page below the header on every page except the
13005 \labelwidthstring MMMMMMx
13010 Places a rule across the page above the footer on every page except the
13015 \labelwidthstring MMMMMMx
13020 This is automatically set each time you create a new
13029 TeX to use the dvips driver to rotate those pages that are set as landscape
13034 \labelwidthstring MMMMMMx
13039 Simply changes the page dimensions to those of a landscape page but doesn't
13041 Thus if you use this option you need to use an external program to rotate
13042 each page or feed your paper through your printer as landscape.
13043 Note that this option effectively reverses the roles of the
13051 environments (don't worry these are described in the next section).
13055 \labelwidthstring MMMMMMx
13060 Equation numbers on the left.
13064 \labelwidthstring MMMMMMx
13069 Flush-left equations.
13072 \begin_layout Subsection
13073 Supported Environments
13076 \begin_layout Standard
13077 Most of the environments commonly supported in other classes are also supported
13083 There are several additional environments provided by
13087 TeX as well as a couple added by LyX.
13088 The following environments are shared with other classes:
13091 \begin_layout Standard
13095 \begin_layout Standard
13099 begin{multicols}{2}
13107 \begin_layout Itemize
13113 \begin_layout Itemize
13119 \begin_layout Itemize
13125 \begin_layout Itemize
13131 \begin_layout Itemize
13137 \begin_layout Itemize
13143 \begin_layout Itemize
13149 \begin_layout Itemize
13155 \begin_layout Itemize
13161 \begin_layout Itemize
13167 \begin_layout Itemize
13173 \begin_layout Itemize
13179 \begin_layout Itemize
13185 \begin_layout Itemize
13191 \begin_layout Itemize
13197 \begin_layout Itemize
13203 \begin_layout Itemize
13209 \begin_layout Itemize
13215 \begin_layout Standard
13219 \begin_layout Standard
13231 \begin_layout Standard
13232 That is, all the major environments apart from the sectioning environments.
13233 Since foils are essentially self-contained sections, with a title and body,
13238 TeX provides specific commands for starting new foils and these are:
13241 \begin_layout Itemize
13247 \begin_layout Itemize
13253 \begin_layout Standard
13254 LyX also provides slightly modified versions of these two environments called:
13257 \begin_layout Itemize
13263 \begin_layout Itemize
13266 ShortRotatefoilhead
13269 \begin_layout Standard
13270 and the differences will be explained in the next section.
13273 \begin_layout Standard
13274 Since foils are often used in presenting ideas or new theorems and such
13279 TeX also provides a comprehensive box of goodies for presenting them:
13282 \begin_layout Standard
13286 \begin_layout Standard
13290 begin{multicols}{2}
13298 \begin_layout Itemize
13304 \begin_layout Itemize
13310 \begin_layout Itemize
13316 \begin_layout Itemize
13322 \begin_layout Itemize
13328 \begin_layout Itemize
13334 \begin_layout Itemize
13340 \begin_layout Itemize
13346 \begin_layout Itemize
13352 \begin_layout Itemize
13358 \begin_layout Itemize
13364 \begin_layout Standard
13368 \begin_layout Standard
13380 \begin_layout Standard
13381 The starred versions are unnumbered while the unstarred versions are numbered.
13382 There are also two list environments added by LyX and these are:
13385 \begin_layout Itemize
13391 \begin_layout Itemize
13397 \begin_layout Standard
13402 TeX provides some powerful header and footer capabilities that are best
13403 set in the preamble although they may be set at any point in a document.
13404 If you want to change these settings in your document the best place to
13405 do so is at the very top of a foil,
13410 straight after the foilhead.
13413 \begin_layout Standard
13414 For this purpose, the following command styles are provided [
13421 \begin_layout Standard
13425 \begin_layout Standard
13429 begin{multicols}{2}
13437 \begin_layout Itemize
13444 \begin_layout Itemize
13450 \begin_layout Itemize
13457 \begin_layout Itemize
13464 \begin_layout Itemize
13472 \begin_layout Standard
13478 \begin_layout Standard
13482 \begin_layout Standard
13494 \begin_layout Standard
13495 There are also a few commands provided by
13499 TeX that aren't directly supported by LyX but I'll tell you what they do
13500 and how to use them in section\InsetSpace ~
13502 \begin_inset LatexCommand \ref{sec:unsuppfoils}
13509 \begin_layout Subsection
13510 Building a Set of Foils
13513 \begin_layout Standard
13514 This section will give a simple introduction to using the different environments
13515 to build a set of foils.
13516 If you want to see an example set of foils take a look at the
13520 file accessible from the
13525 ile\SpecialChar \menuseparator
13530 pen\SpecialChar \ldots{}
13541 \begin_layout Subsubsection
13542 Give It a Title Page
13545 \begin_layout Standard
13546 Unlike other classes that provide
13566 creates the title on a page of its own.
13567 If you leave out the
13571 environment LaTeX will substitute the current date (every time you regenerate
13575 \begin_layout Subsubsection
13579 \begin_layout Standard
13580 As I mentioned earlier, there are four ways of starting a new foil.
13581 For portrait foils you should use
13590 The difference between these two environments is the amount of space between
13591 the title of the foil (the foilhead) and the body of the foil.
13594 \begin_layout Standard
13595 Landscape foils are generated using the
13601 ShortRotatefoilhead
13604 Again the only difference is the spacing between foilhead and body.
13605 Both of the short versions have 0.5 inches less separation between the foilhead
13610 \begin_layout Standard
13611 One problem with the support for landscape foils is the requirement that
13612 you have to use the
13616 driver to generate the PostScript® output otherwise the foils won't be
13618 It is possible to get landscape foils even if you haven't got the
13622 driver provided you can feed your foils sideways through your printer ;-)
13625 \begin_layout Subsubsection
13626 Theorems, Lemmas, Proofs and more
13629 \begin_layout Standard
13630 Due to a small bug in LyX you can't have two of the same type of these environme
13631 nts directly following each other.
13632 They must be separated by something.
13633 If you try, you will just be extending the previous environment as if you
13634 had merged the two environments together.
13635 So, how do you get around this problem? The simplest option is to insert
13636 some text between the two environments or add a
13640 environment between the two with just a
13641 \begin_inset Quotes eld
13649 \begin_inset Quotes erd
13653 This will force LyX to produce two separate environments and hence the
13654 correct LaTeX output.
13655 An example is provided in the example file included with the LyX distribution.
13656 Remember, this problem only occurs if you are trying to place two of the
13657 same type of theorem-like environments one directly after the other.
13660 \begin_layout Subsubsection
13664 \begin_layout Standard
13665 You get all the commonly supported list styles found in other classes as
13666 well as two new ones.
13667 I'll only describe the new ones here.
13668 If you want to find out more about the other list environments check out
13674 If you intend to use itemized lists you might also want to read about the
13677 Itemize\InsetSpace ~
13678 Bullet\InsetSpace ~
13681 dialog described above in section\InsetSpace ~
13683 \begin_inset LatexCommand \ref{sec:bullet}
13690 \begin_layout Standard
13691 The two new list styles,
13699 , are designed to make it easier for you to create lists of do's and don'ts
13700 or right and wrong by providing dedicated environments that use a tick
13701 or a cross as the label of the list.
13702 These lists are in fact dedicated variants of the
13707 They do however require that you have the
13711 packages installed.
13714 \begin_layout Subsubsection
13718 \begin_layout Standard
13723 TeX redefines the floating tables and figures so that they appear exactly
13724 where they are in the text rather than pushing them to the top of the page
13725 or to some user specified location.
13726 In fact if you change the float placement settings they are simply ignored.
13729 \begin_layout Subsubsection
13730 Page Headers and Footers
13731 \begin_inset LatexCommand \label{sec:foilfoot}
13738 \begin_layout Standard
13748 are two commands used to control the left-footer text string.
13749 The first is meant to allow you to include a graphic logo on your foils
13751 \begin_inset Quotes eld
13759 \begin_inset Quotes erd
13763 While the second is meant to provide a classification for the audience,
13770 It is empty by default.
13773 \begin_layout Standard
13774 The remaining page corners can be filled by
13779 (which defaults to page numbers),
13792 \begin_layout Subsection
13798 \begin_inset LatexCommand \label{sec:unsuppfoils}
13805 \begin_layout Standard
13806 All the commands mentioned below need to be set in a
13814 within another environment.
13817 \begin_layout Subsubsection
13821 \begin_layout Standard
13822 All lengths are adjusted using the
13845 should be replaced by the name given to the length you want to change and
13850 is the length value.
13851 All lengths should be specified in units of length such as inches (
13863 ) or relative to some document or font-based length such as
13873 \begin_layout Standard
13874 It's possible to change the spacing between a foilhead and the body of the
13875 foil by adjusting the length specified by
13882 For example, to make
13886 foilheads 0.5 inches closer to their bodies put the following in the preamble:
13893 foilheadskip}{-0.5in}
13896 \begin_layout Standard
13897 The spacings around floats can be adjusted by setting these lengths:
13901 \labelwidthstring MMMMMMMMMMM
13908 Separation between the text and the top of the float
13912 \labelwidthstring MMMMMMMMMMM
13919 Separation between the float and the caption
13923 \labelwidthstring MMMMMMMMMMM
13930 Separation between the caption and the following text
13934 \labelwidthstring MMMMMMMMMMM
13941 You can make the captions narrower than the surrounding text by adjusting
13943 Best done relative to
13952 \begin_layout Standard
13953 There are also several title page related lengths that you may find useful
13954 if you have a long title or several authors:
13958 \labelwidthstring MMMMMMMMMMM
13965 Separation from headers to
13971 \labelwidthstring MMMMMMMMMMM
13990 \labelwidthstring MMMMMMMMMMM
14005 \labelwidthstring MMMMMMMMMMM
14022 \labelwidthstring MMMMMMMMMMM
14038 \begin_layout Standard
14039 The last length related command affects all the list environments.
14050 a list environment then all the vertical spacing between the list items
14052 Note that this is a command not a length so it doesn't require
14058 like the stuff mentioned above.
14061 \begin_layout Subsubsection
14062 Headers and Footers
14065 \begin_layout Standard
14078 commands control whether the logo in the
14082 definition appear on a given page.
14089 in the preamble then none of the foils will have the logo on them.
14090 If you don't want the logo on a particular page place the
14096 directly after the foilhead of that page and the
14102 directly after the next foilhead.
14105 \begin_layout Standard
14106 If you decide to use the
14110 page style setting in the
14112 Document\InsetSpace ~
14115 dialog you should probably add
14125 to your preamble so headers and footers on landscape pages are correctly
14126 placed when rotated.
14127 This is due to some clashes between the page layouts provided by the
14138 \begin_layout Section
14139 Latex8 (IEEE Conference Papers)
14142 \begin_layout Standard
14148 \begin_layout Subsection
14152 \begin_layout Standard
14153 Since this class is specifically for writing submissions to IEEE sponsored
14154 conferences I strongly recommend that you get a copy of their Authors Kit.
14159 package and associated bibliography style file is included in the kit.
14160 The Authors Kit is usually sent out by email once your initial submission
14162 There is a lot of useful information in the Authors Kit explaining formatting
14163 restrictions and so on and I will assume you have read this since that
14164 means I don't have to repeat it all here.
14167 \begin_layout Subsection
14171 \begin_layout Standard
14172 [AR\SpecialChar \@.
14176 \begin_layout Subsection
14177 Supported Environments
14180 \begin_layout Itemize
14186 \begin_layout Itemize
14192 \begin_layout Itemize
14198 \begin_layout Itemize
14204 \begin_layout Itemize
14210 \begin_layout Itemize
14216 \begin_layout Itemize
14222 \begin_layout Itemize
14228 \begin_layout Itemize
14234 \begin_layout Subsection
14235 Differences Between Screen and Paper
14238 \begin_layout Standard
14239 There are slight differences in appearance mainly with the presentation
14240 of section counters.
14241 On screen the trailing period of the section counter is missing but it
14242 will appear in the output so don't let this worry you.
14245 \begin_layout Section
14246 Hollywood (Hollywood spec scripts)
14249 \begin_layout Standard
14255 \begin_layout Subsection
14259 \begin_layout Standard
14260 Getting the format of a Hollywood script right is a
14261 \begin_inset Quotes eld
14265 \begin_inset Quotes erd
14268 It is designed to make the readers focus on content and to be easy and
14269 familiar for the actors to read.
14270 Each page of a script should be one minute of film.
14271 Nothing goes in a script that you cannot see or hear on screen.
14272 The courier 12 pt font should be used throughout.
14276 \begin_layout Subsection
14280 \begin_layout Standard
14281 Speakers' lines should NEVER break in mid-sentence.
14282 If a speaker's lines continue over a page break, repeat the
14286 title followed by (Cont'd).
14289 \begin_layout Subsection
14293 \begin_layout Standard
14298 names as labels then cross-reference the label to insert the name.
14299 The cross-reference dialog will show the current cast of characters.
14300 You can use this to insert the speaker name in narratives also.
14303 \begin_layout Subsection
14304 Paper size and Margins
14307 \begin_layout Standard
14308 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
14311 \begin_layout Subsection
14315 \begin_layout Standard
14316 The following environments are available.
14317 You can use hollywood.bind to get the bind keys shown at the right.
14320 \begin_layout Itemize
14327 Used where nothing else works.
14331 \begin_layout Itemize
14344 Usually followed by something like
14345 \begin_inset Quotes eld
14348 on Sally waking up.
14349 \begin_inset Quotes erd
14355 \begin_layout Itemize
14364 Introduces a new INTERIOR camera set-up.
14365 Always followed by DAY or NIGHT, or something similar to define the lighting
14367 Everthing on this line in CAPS.
14370 \begin_layout Itemize
14379 Introduces a new EXTERIOR camera set-up.
14380 Everthing on this line in CAPS.
14383 \begin_layout Itemize
14392 The character speaking.
14395 \begin_layout Itemize
14404 Instructions to the speaker.
14405 The () are automatically inserted, but only the ( will show in LyX.
14406 Both will be printed.
14409 \begin_layout Itemize
14425 \begin_layout Itemize
14434 Camera movement instruction.
14439 \begin_layout Itemize
14447 \begin_layout Itemize
14455 \begin_layout Itemize
14463 \begin_layout Itemize
14471 \begin_layout Subsection
14475 \begin_layout Itemize
14476 (O.S) --- off screen
14479 \begin_layout Itemize
14480 (V.0) --- voice over
14483 \begin_layout Itemize
14488 \begin_layout Itemize
14493 \begin_layout Itemize
14494 PAN --- camera movement
14497 \begin_layout Itemize
14498 INSERT --- cut to close-up of
14501 \begin_layout Section
14505 \begin_layout Standard
14511 \begin_layout Subsection
14515 \begin_layout Standard
14516 Broadway is for writing plays.
14517 The format is more decorative than Hollywood, and much less standardized.
14518 This format should be suitable for workshops.
14521 \begin_layout Subsection
14525 \begin_layout Standard
14526 The same as in Hollywood.
14529 \begin_layout Subsection
14533 \begin_layout Standard
14538 names as labels then cross-reference the label to insert the name.
14539 The cross-reference dialog will show the current cast of characters.
14542 \begin_layout Subsection
14543 Paper size and Margins
14546 \begin_layout Standard
14547 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
14550 \begin_layout Subsection
14554 \begin_layout Standard
14555 The following environments are available.
14556 You can use broadway.bind to get the bind keys shown at the right.
14559 \begin_layout Itemize
14566 You should not have to use this, but it is here for anything that does not
14570 \begin_layout Itemize
14579 Used to describe stage setting and the action.
14580 First use of speaker names in all CAPs.
14583 \begin_layout Itemize
14592 Automatically numbered.
14593 On screen it will be arabic, but will print as Roman.
14596 \begin_layout Itemize
14610 It is just centered text.
14613 \begin_layout Itemize
14622 Not automatically numbered.
14623 You supply the number.
14624 This is because I couldn't figure out how.
14627 \begin_layout Itemize
14636 A special case of Narrative to describe the setting and action as the curtain
14640 \begin_layout Itemize
14649 The speaker's (actor's) title, centered in all CAPS.
14652 \begin_layout Itemize
14661 Instructions to the speaker.
14662 The parentheses are automatically inserted.
14663 The ( will appear on screen, but both will be in the printed play.
14664 This environment is only used within
14671 \begin_layout Itemize
14680 What the Speaker says.
14683 \begin_layout Itemize
14692 The curtain comes down.
14695 \begin_layout Itemize
14703 \begin_layout Itemize
14711 \begin_layout Itemize
14719 \begin_layout Standard
14723 \begin_layout Section
14727 \begin_layout Standard
14733 \begin_layout Standard
14734 \begin_inset VSpace bigskip
14740 \begin_layout Standard
14744 Revtex\InsetSpace ~
14747 textclass works with the American Physical Sociey's RevTeX 4.0 (the
14748 \begin_inset Formula $\beta$
14751 release of May, 1999) class.
14754 \begin_layout Standard
14759 textclass, which works with RevTeX 3.1.
14760 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
14761 That means that it doesn't interact very well with LyX, which requires
14762 LaTeX2e, although it has been kludged to work.
14763 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
14766 RevTeX\InsetSpace ~
14769 textclass should also be pretty easy to use.
14772 \begin_layout Standard
14773 These documents are supposed to be used in
14777 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
14778 macros, and assume you'll know what to put in the preamble if necessary.
14781 \begin_layout Subsection
14785 \begin_layout Standard
14786 All you need to do is install RevTeX 4, as described in the package's README
14788 the package can be found at
14789 \begin_inset LatexCommand \url[The RevTeX 4 Web Site]{http://publish.aps.org/revtex4/}
14794 Install it somewhere that LaTeX can see it.
14795 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
14796 (i.e., not the directory where you installed the class file.) Then, if you
14797 reconfigure LyX, it will find the class file and let you use the RevTeX4
14801 \begin_layout Standard
14802 Probably the easiest way to get started is either to import a RevTeX 4 document
14809 Revtex\InsetSpace ~
14812 template, found in the templates directory.
14815 \begin_layout Subsection
14819 \begin_layout Standard
14820 Optional arguments to
14827 \begin_inset Quotes eld
14831 \begin_inset Quotes erd
14835 \begin_inset Quotes eld
14839 \begin_inset Quotes erd
14853 Document\InsetSpace ~
14857 Remember that in RevTeX, at least one optional argument is required!
14860 \begin_layout Standard
14861 Other preamble matter, like
14873 dialog, also as usual.
14876 \begin_layout Subsection
14880 \begin_layout Standard
14881 The layouts basically correspond to the commands in RevTeX4.0.
14882 For example, the Email layout corresponds to
14889 Note that (at least as of RevTeX 4.0 Beta), the
14897 layouts are exactly equivalent, so you shouldn't need to use both.
14901 \begin_layout Standard
14902 In case you're curious, both were included so that
14906 would be able to translate both
14926 \begin_layout Subsection
14930 \begin_layout Standard
14931 There are a couple of important unique aspects of RevTeX 4 which might cause
14932 bugs that will be even more confusing in LyX.
14935 \begin_layout Standard
14953 The LyX equivalent is that there is a separate Thanks layout.
14958 write footnotes in the
14962 layout, or weird things may happen.
14963 See the RevTeX 4 documentation for more details.
14966 \begin_layout Standard
14969 Author\InsetSpace ~
14974 Author\InsetSpace ~
14981 layouts must be placed
14989 layout and the corresponding
15006 , the LaTeX won't compile.
15009 \begin_layout Subsection
15013 \begin_layout Standard
15014 The main problem with this layout is that you can't use the optional arguments
15015 to layouts like Email and Title.
15016 (The problem is not unique to this layout; you can't use optional arguments
15017 to the Section layouts either.) This means that after you export that file
15018 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15019 need to edit the LaTeX file with a text editor to add the optional arguments
15020 to set, e.g., the running title for the page headers.
15021 Lacking these layouts makes the
15027 (and the equivalent
15033 ) useless, so the corresponding layouts don't exist, and will have to be
15038 \begin_layout Standard
15043 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15044 has not been updated yet to take advantage of it.
15052 \begin_layout Section
15053 Article (mwart), book (mwbk) and report (mwrep)
15054 \begin_inset OptArg
15057 \begin_layout Standard
15070 \begin_layout Standard
15076 \begin_layout Standard
15077 The LyX document classes
15093 correspond to the LaTeX document classes
15106 They are replacements for the standard document classes
15118 , resp., and fit better to Polish typography conventions in a number of points.
15122 \begin_layout Standard
15126 \begin_layout Itemize
15127 Unnumbered titles (with star, eg.
15132 ) are added into table of contents,
15135 \begin_layout Itemize
15136 Additional page styles:
15140 \begin_layout Description
15141 uheadings header with separated lines,
15144 \begin_layout Description
15145 myheadings custom header, contents headers via commands:
15160 \begin_layout Description
15161 myuheadings custom header with separated lines,
15164 \begin_layout Description
15165 outer page number is placed on outer side of page
15169 \begin_layout Itemize
15174 \begin_layout Description
15175 rmheadings serif titles --- default,
15178 \begin_layout Description
15179 sfheadings sansserif titles,
15182 \begin_layout Description
15183 authortitle on title page first placed is author next title --- default,
15186 \begin_layout Description
15187 titleauthor on title page first placed is title next author,
15190 \begin_layout Description
15191 withmarginpar reserve place on page for margins.
15195 \begin_layout Section
15199 \begin_layout Standard
15205 \begin_layout Standard
15206 Elsevier Science Publishers B.V.
15207 provides a standard LaTeX document class (
15211 ) for submitting articles to their various journals.
15212 The style file can be downloaded directly from their web site:
15213 \begin_inset LatexCommand \url{http://authors.elsevier.com/}
15218 Instructions are supplied along with the class file, which details the
15219 requirements of the publishers.
15220 LyX includes package that allows for the use of this class, by a layout
15221 and a template file.
15222 Installation of the class file is the same as for any other LaTeX package;
15223 instructions are provided in the Elsevier documentation.
15226 \begin_layout Standard
15236 As the Elsevier class file is based mainly on the standard article class,
15237 most of the normal functionality is provided.
15238 The Elsevier class defines a number of mathematical environments, which
15239 are similar to the AMS environments.
15240 These commands are all described in the Elsevier documentation, and are
15244 \begin_layout Standard
15245 The easiest way to use the Elsevier style is to base documents on the included
15247 It is best not to use options such as fancy headings or the geometry package,
15248 as elements such as these are defined by Elsevier in their style file.
15249 Ideally, no extra packages except those mentioned in the Elsevier documentation
15251 Essentially, Elsevier require as
15252 \begin_inset Quotes eld
15256 \begin_inset Quotes erd
15263 \begin_layout Standard
15272 file as possible, as their intention is to take the supplied file and replace
15273 the class file with one for the particular journal to which the paper has
15275 This also means that not too much time should be spent on the formating
15277 When it comes to be published, this will change anyway.
15278 The rest of the usage for this layout is substantially the same as for
15279 the normal article class.
15280 For details of what Elsevier do and don't allow, refer to their documentation.
15283 \begin_layout Section
15287 \begin_layout Standard
15290 Jürgen Spitzmüller
15293 \begin_layout Subsection
15297 \begin_layout Standard
15298 Memoir is a very powerful and constantly evolving class.
15299 It has been designed with regard to fictional and non-fictional literature.
15300 Its aim is to let the user have maximum control over the typesetting of
15302 Memoir is based on the standard book class, but it can also emulate the
15303 article class (see below).
15306 \begin_layout Standard
15307 Peter Wilson, the developer of Memoir, is known as the author of lots of
15308 useful packages in the LaTeX world.
15309 Most of them have been merged with Memoir.
15310 Therefore, it is much easier to layout the table of contents, appendices,
15311 chapter designs and such.
15312 LyX, though, does not support all of these goodies natively.
15313 Some of them might be added to forthcoming releases
15317 \begin_layout Standard
15318 You are invited to send suggestions to
15319 \begin_inset LatexCommand \url{lyx-devel@lists.lyx.org}
15328 , lots will probably never, due to the limitations of LyX's framework.
15329 Of course you can still use all features with the help of some native LaTeX
15334 \begin_layout Standard
15339 \begin_layout Standard
15348 section\InsetSpace ~
15350 \begin_inset LatexCommand \ref{sec:Inserting-LaTeX-Code}
15360 In this section, we can only list those features which are natively supported
15362 For detailed descriptions (and for the rest of features) we are recommending
15363 to have a look at the detailed manual of the Memoir class
15367 \begin_layout Standard
15372 \begin_layout Standard
15382 \begin_inset LatexCommand \url{CTAN:/macros/latex/memoir/memman.pdf}
15391 , which is not only a user guide for the class, but also both a comprehensive
15392 description on good typesetting and a superb example for good typesetting
15396 \begin_layout Subsection
15397 Basic features and restrictions
15400 \begin_layout Standard
15401 Memoir supports basically all features of the standard book classes.
15402 There are, however, some differences, as follows:
15405 \begin_layout Description
15407 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14,
15411 \begin_layout Description
15413 style: The fancy page style is not supported, due to a command clash
15414 between Memoir and the fancyhdr package (they are both defining a command
15415 with the same name, which confuses LaTeX).
15416 Instead, Memoir comes with a bunch of own page styles (see
15418 Layout\SpecialChar \menuseparator
15419 Document\SpecialChar \menuseparator
15424 If you want to use these for the chapter pages, you have to use the command
15431 in the main text or in preamble (e.
15435 \begin_layout Standard
15448 \begin_layout Standard
15461 chapterstyle{companion}
15466 \begin_layout Description
15467 Sectioning: Sectionings (chapter, section, subsection etc.) are coming with
15468 an optional argument in the standard classes.
15469 With this, you can specify an alternative version of the title for the
15470 table of contents and the headers (for instance, if the title is too long).
15471 In LyX, you can do this via
15473 Insert\SpecialChar \menuseparator
15477 at the beginning of a chapter/section.
15478 Memoir features a second optional argument and thus separates the table
15479 of contents from the header.
15480 You can define three variants of a title with this: one for the main text,
15481 one for the table of contents, and one for the headers.
15482 Simply insert two optional arguments if you need this feature, the first
15483 one containing the short title for the Table of Contents, the second one
15484 containing an alternative short title for the headers.
15487 \begin_layout Description
15488 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
15489 of contents, the list of figures and the list of table start a new page
15491 Memoir does not follow this route.
15492 You have to insert a page break yourself, if you want to have one.
15495 \begin_layout Description
15496 Titlepage: For some unknown reason, Memoir uses pagination on the title
15497 page (in the standard classes, title pages are
15498 \begin_inset Quotes eld
15502 \begin_inset Quotes erd
15509 \begin_layout Standard
15522 \begin_layout Standard
15532 If you want an empty title page, type
15536 aliaspagestyle{title}{empty}
15541 \begin_layout Description
15542 Article: With the class option
15548 Layout\SpecialChar \menuseparator
15549 Document\SpecialChar \menuseparator
15553 ), you can emulate article style.
15554 That is, counters (footnotes, figures, tables etc.) will not be reset on
15555 new chapters, chapters don't start a new page (but are---in contrary to
15557 \begin_inset Quotes eld
15561 \begin_inset Quotes erd
15564 article classes---still allowed), parts, though, use their own page, as
15568 \begin_layout Description
15569 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
15570 font commands, which have been used in the old LaTeX version 2.09 (e.
15574 \begin_layout Standard
15587 \begin_layout Standard
15609 It produces an error and stops LaTeX whenever such a command appears.
15614 reallows the commands and spits out warnings instead (which does at least
15616 Since a lot of packages and particularly BibTeX style files are still using
15617 those commands, we have decided to use this option by default.
15620 \begin_layout Subsection
15624 \begin_layout Standard
15625 We will only describe the features supported by LyX (which is not much currently
15627 Please consult the Memoir manual
15631 \begin_layout Standard
15636 \begin_layout Standard
15646 \begin_inset LatexCommand \url{CTAN:/macros/latex/memoir/memman.pdf}
15658 \begin_layout Description
15659 Abstract: You may wonder why an abstract is an extra feature.
15660 Well, it is in book class.
15661 Usually books don't have abstracts.
15662 Memoir, however, has.
15663 You can use it whereever and how often you like.
15666 \begin_layout Description
15667 Chapterprecis: You may know this from belletristic: The contents of a chapter
15668 is shortly described below the title and also in the table of contents
15673 \begin_layout Standard
15686 \begin_layout Standard
15697 Our hero arrives in Troia; he loses some friends; he finds others
15700 Chapterprecis does exactly this.
15701 It is therefore only sensible below a chapter.
15704 \begin_layout Description
15705 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
15706 The epigraph environment provides an elegant way of typesetting such a
15708 The motto itself (text) and its author (source) are divided by a short
15710 Unfortunately, we have to fool LyX a bit here again, since the environment
15711 needs two arguments (text and source).
15712 In this case, we have to use curly brackets (in TeX mode) between the two
15723 <author of the slogan>.
15726 \begin_layout Description
15727 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
15728 complex figurative poems).
15729 Lyx can only support a few of them.
15730 One is poemtitle, which is a centered title for poems, which will also
15731 be added to the table of contents (verse is the standard environment for
15733 Memoir has some enhanced versions of verse, but you need to use ERT, because
15734 they have to be nested inside regular verse environments, which is not
15735 possible with LyX).
15738 \begin_layout Description
15739 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
15742 \begin_layout Chapter
15743 Importing and Exporting Alternate File Formats
15744 \begin_inset OptArg
15747 \begin_layout Standard
15748 Importing and Exporting
15756 \begin_layout Section
15760 \begin_layout Standard
15761 Importing and exporting LyX documents from/to other formats has been touched
15767 Here we describe more of the gory details needed to understand just what
15768 is going on when you click on the
15773 ile\SpecialChar \menuseparator
15785 ile\SpecialChar \menuseparator
15796 \begin_layout Section
15797 Importing Other Formats
15800 \begin_layout Subsection
15804 \begin_layout Standard
15805 Translating from LaTeX into LyX is performed by a Perl script called reLyX.
15806 Although it is a standalone program which can be called from the command
15807 line, LyX will call it automatically when a LaTeX document is imported.
15808 See section\InsetSpace ~
15810 \begin_inset LatexCommand \ref{sec:reLyX}
15814 for a complete description.
15815 There are no user tunable parameters for reLyX within LyX.
15818 \begin_layout Subsection
15822 \begin_layout Standard
15823 When importing plain ASCII text, there are two methods of reading the file.
15825 \begin_inset Quotes eld
15829 \begin_inset Quotes erd
15832 preserves all the linebreaks in the ASCII; to LyX, then, each line looks
15835 \begin_inset Quotes eld
15839 \begin_inset Quotes erd
15842 assumes that consecutive lines separated by only a single linebreak form
15843 a single paragraph.
15844 Successive linebreaks with no intervening text are thus assumed to be paragraph
15848 \begin_layout Subsection
15852 \begin_layout Standard
15855 [Editor's note: Needs to be written, obviously - any volunteers? --- mer]
15858 \begin_layout Section
15859 Exporting Other Formats
15862 \begin_layout Subsection
15866 \begin_layout Standard
15867 LyX generates two types of LaTeX files: stripped down versions for the normal
15872 , etc.) which one normally never sees
15876 \begin_layout Standard
15877 The resulting file is a perfectly valid LaTeX file, though the preamble
15878 might look a bit strange since it includes some definitions used by LyX
15879 which wouldn't show up in most human-written files.
15884 , and human readable forms which are suitable for exchanging with your colleague
15886 The only settable option for the translation is the line length of the
15888 The default is 65 characters, but it can be set in
15895 \SpecialChar \menuseparator
15916 \begin_layout Subsection
15917 Device Independent Files
15920 \begin_layout Standard
15921 Device Independent files (DVI files) are produced by running LaTeX on your
15923 There are no user settable options.
15926 \begin_layout Subsection
15930 \begin_layout Standard
15931 The next step in the conversion chain is converting a DVI file into Postscript®.
15939 \SpecialChar \menuseparator
15947 \SpecialChar \menuseparator
15956 or, if you need more control on the result,
15963 \SpecialChar \menuseparator
15972 If you use the later, note that it is possible to configure, in
15979 \SpecialChar \menuseparator
15987 , the options passed to the dvips program to achieve different effects.
15990 \begin_layout Subsection
15994 \begin_layout Standard
15995 Exporting as ASCII attempts to preserve the
15996 \begin_inset Quotes eld
16000 \begin_inset Quotes erd
16003 of the document as well as possible, but things like centering and indentation
16004 are thrown out; paragraphs are separated by blank lines.
16005 Section numbering and cross-references are done correctly, so the resulting
16006 text files is remarkably readable.
16007 The only changeable option is the length of lines, as for LaTeX output.
16010 \begin_layout Subsection
16014 \begin_layout Standard
16015 LyX documents can be converted to hypertext markup, usually by converting
16016 to LaTeX first, then converting that to HTML\SpecialChar \@.
16018 \begin_inset Formula $\rightarrow$
16021 HTML converters are currently known to LyX:
16038 Though they are autodetected, you can overide the selection in preferences.
16039 You can also include further command line options in this dialog.
16043 \begin_layout Subsection
16047 \begin_layout Standard
16055 \begin_layout Standard
16056 \begin_inset VSpace bigskip
16062 \begin_layout Standard
16063 The fastest way to generate a basic PDF file (no tags, links, etc.) with
16064 any version of LyX is to save the document as a Postscript® file, then
16070 Starting with version 1.1.6, the menu item
16074 will do all this for you.
16075 There are some issues with fonts that you need to pay attention to: see
16076 Section\InsetSpace ~
16078 \begin_inset LatexCommand \ref{sec:badfonts}
16083 Also, as of version 1.1.6, there is a better method that will generate much
16084 more sophisticated files.
16087 \begin_layout Subsubsection
16091 \begin_layout Standard
16092 With pdfLaTeX you need to convert your eps figures to PDF (see Section\InsetSpace ~
16094 \begin_inset LatexCommand \ref{sec:pdfeps}
16098 ), and you cannot use pstricks.
16099 On the other hand, with pdfLaTeX it is possible to insert directly images
16100 in JPEG or PNG format, use TrueType fonts, and more.
16103 \begin_layout Subsubsection
16104 Why does the text look so bad when viewed with Acrobat Reader?
16105 \begin_inset LatexCommand \label{sec:badfonts}
16110 \begin_inset OptArg
16113 \begin_layout Standard
16114 Bad Fonts in Acrobat Reader
16122 \begin_layout Standard
16123 The problem is that bitmap fonts are displayed poorly by Acrobat Reader.
16124 When creating a PDF from the LyX file, you need to use outline font instead
16125 of the default bitmap fonts (in fact, you should also use outline fonts
16126 for Postscript files).
16127 Recent LaTeX distributions come with Postscript® Type 1 version of the
16128 standard (Computer Modern) fonts.
16129 pdfLaTeX uses these font by default.
16130 Dvips doesn't use these fonts by default, so to make it use them, add the
16131 following to lines to your
16138 \begin_layout LyX-Code
16142 \begin_layout LyX-Code
16146 \begin_layout Standard
16147 If the default LaTeX font encoding (OT1) is used, nothing else need to be
16149 However, if the T1 font encoding is used, then LaTeX uses the newer EC
16150 fonts, for which there are no Type1 version.
16151 There are two solutions in this case: Either use the
16152 \begin_inset Quotes eld
16156 \begin_inset Quotes erd
16159 (which is in fact a
16160 \begin_inset Quotes eld
16164 \begin_inset Quotes erd
16167 font that emulates T1 coded fonts using the standard CM fonts).
16168 This is done by selecting
16169 \begin_inset Quotes eld
16172 AE (Almost European)
16173 \begin_inset Quotes erd
16178 Document\SpecialChar \menuseparator
16179 Settings\SpecialChar \menuseparator
16180 Fonts\SpecialChar \menuseparator
16184 However, some glyphs are missing from the CM fonts (e.g.
16185 eth, thorn), and they are taken from the EC fonts.
16186 Therefore you get these glyphs as bitmaps.
16188 \begin_inset Quotes eld
16192 \begin_inset Quotes erd
16197 Document\SpecialChar \menuseparator
16198 Settings\SpecialChar \menuseparator
16199 Fonts\SpecialChar \menuseparator
16203 It is a newer and probably the best Postscript® Type 1 version of cm.
16204 Basically, we recommend this over the
16205 \begin_inset Quotes eld
16209 \begin_inset Quotes erd
16213 However, the Latin Modern fonts differ from cm in some visual aspects,
16214 which does not please everybody.
16217 \begin_layout Standard
16218 Note: LyX uses by default the T1 font encoding.
16219 If you wish to use the default font encoding (this is not recommended,
16220 unless you only write English documents), clear the field
16228 in preferences (tabs
16240 \begin_layout Standard
16241 An alternate option is to use the standard Postscript® fonts instead of
16242 the Computer Modern fonts.
16243 To do that, you just need to select one of the fonts listed in the document
16244 layout dialog (except for
16245 \begin_inset Quotes eld
16249 \begin_inset Quotes erd
16253 \begin_inset Quotes eld
16257 \begin_inset Quotes erd
16260 , they're all Postscript® fonts).
16261 When using the Postscript® fonts, the result PDF file is smaller as the
16262 fonts are not saved into the file.
16263 Furthermore, the Postscript® fonts include all T1 glyphs.
16264 On the other hand, the Postscript® fonts have no bold symbol font, so poor
16265 man's bold must be used (see Section\InsetSpace ~
16267 \begin_inset LatexCommand \ref{sec:pdfbold}
16272 The Postscript® fonts also look different from the Computer Modern fonts.
16275 \begin_layout Standard
16276 To sum up, both the Computer Modern and the Postscript® fonts gives good
16277 results (with few exceptions).
16278 The decision of which one to use is a matter of taste.
16281 \begin_layout Subsubsection
16284 boldsymbol{} command work when I use pslatex?
16285 \begin_inset LatexCommand \label{sec:pdfbold}
16290 \begin_inset OptArg
16293 \begin_layout Standard
16310 \begin_layout Standard
16311 The Postscript® fonts do not have a bold symbol font.
16312 The solution is to use the
16318 (poor man's bold) command.
16321 \begin_layout Standard
16322 It is possible to redefine the
16337 \begin_layout LyX-Code
16347 \begin_layout Standard
16351 \begin_layout Subsubsection
16352 Is it possible to do write latex code which is processed only when running
16354 \begin_inset OptArg
16357 \begin_layout Standard
16358 Conditionals with pdfLaTeX
16366 \begin_layout Standard
16368 Here is an example:
16371 \begin_layout LyX-Code
16379 \begin_layout LyX-Code
16389 \begin_layout LyX-Code
16395 \begin_layout LyX-Code
16401 \begin_layout LyX-Code
16407 \begin_layout LyX-Code
16413 \begin_layout LyX-Code
16417 \begin_layout LyX-Code
16423 \begin_layout LyX-Code
16426 pdfinfo { /Author (your name and e-mail address)
16429 \begin_layout LyX-Code
16430 /Title (official title -- i.e., title element)
16433 \begin_layout LyX-Code
16434 /Subject (one line description of the document)
16437 \begin_layout LyX-Code
16441 \begin_layout LyX-Code
16444 pdfcatalog { /PageMode (/UseNone)
16447 \begin_layout LyX-Code
16448 % /OpenAction (fitbh)
16451 \begin_layout LyX-Code
16455 \begin_layout LyX-Code
16458 usepackage[pdftex]{hyperref}
16461 \begin_layout LyX-Code
16467 \begin_layout LyX-Code
16470 usepackage[ps2pdf]{hyperref}
16473 \begin_layout LyX-Code
16479 \begin_layout Subsubsection
16480 How can I make URLs clickable ?
16483 \begin_layout Standard
16484 See the references here :
16487 \begin_layout Standard
16488 \begin_inset LatexCommand \url{http://wiki.lyx.org/pmwiki.php/FAQ/PDF}
16495 \begin_layout Subsection
16499 \begin_layout Standard
16500 Custom exports are possible if you have some particularly weird format you
16501 wish to convert to, assuming you have the relevant converter, of course.
16506 file can be chosen in the
16511 ile\SpecialChar \menuseparator
16516 xport\SpecialChar \menuseparator
16523 dialog; LyX will automatically convert the file to this point, then feed
16524 it to your custom converter.
16525 The possible values are all formats that LyX can produce from its own documents.
16529 \begin_layout Standard
16530 The converter command is also specified in the dialog.It should be a completely
16531 qualified command line which uses the variable
16535 to specify the name of the file.
16536 If this variable is not given, then the file will be sent to the standard
16537 input of your command.
16538 You may have to apply a bit of ingenuity to escape this sequence correctly
16539 so that it is compatible with your shell.
16543 \begin_layout Standard
16544 While it is not possible to save this command using the
16548 dialog, you can manually edit your
16555 \begin_layout LyX-Code
16558 custom_export_command "mycommand $$FName"
16561 \begin_layout Section
16562 The Complete reLyX Description
16563 \begin_inset LatexCommand \label{sec:reLyX}
16570 \begin_layout Subsection
16574 \begin_layout Standard
16575 The simplest way to use reLyX is via the
16580 ile\SpecialChar \menuseparator
16588 That runs reLyX on the given file and loads the resulting file into LyX.
16589 You should try that first, and call it from the command line only if you
16590 need to use more complicated options.
16593 \begin_layout Standard
16645 \begin_layout Standard
16701 \begin_layout Standard
16711 \begin_layout Subsection
16715 \begin_layout Description
16721 By default, when reLyX sees a
16727 command, it creates a file of textclass
16728 \begin_inset Quotes eld
16732 \begin_inset Quotes erd
16735 and reads the LyX layout file for that class.
16740 to declare a different textclass (and read a different layout file).
16743 \begin_layout Description
16749 By default, reLyX gives sparse output and deletes the temporary files which
16750 were created during translation.
16755 flag will create much more output (both to stdout and stderr) and leave
16756 the temporary files around.
16759 \begin_layout Description
16765 reLyX will not run if the
16769 file it would generate already exists Use the
16773 option (carefully) to clobber any existing files.
16776 \begin_layout Description
16782 Print out usage information and quit
16785 \begin_layout Description
16791 With this option, all temporary files and LyX output files (for the given
16792 input file, for any included files, or for any file fragments given with
16797 option) will be put into
16802 Otherwise, for each file
16806 , the temporary files and the LyX output file will be created in
16811 This can be useful if a file includes files from other directories which
16812 you want to consolidate in one directory, or if you don't have write permission
16813 on the directory the LaTeX files are in.
16816 \begin_layout Description
16822 The input files are LaTeX fragments, with no preamble matter or
16829 This option requires the
16833 option, since there are no
16839 commands in the files reLyX is translating.
16840 When using this option, you can translate more than one file, as long as
16841 all files are the same class.
16842 The LyX file created by reLyX can be included in an existing LyX file using
16848 nsert\SpecialChar \menuseparator
16853 \SpecialChar \menuseparator
16864 \begin_layout Description
16869 Regular environments (see the Section\InsetSpace ~
16871 \begin_inset LatexCommand \ref{sub:relyx-syntax}
16876 If you give more than one environment, separate them with commas (not
16878 You'll probably need to quote the environment list, especially if it has
16879 asterisk environments (foo*) in it.
16880 If you use this command often, considering creating a personal syntax file.
16883 \begin_layout Description
16889 Input (one or more quoted, comma-separated) syntax files to read in addition
16891 (see the section Section\InsetSpace ~
16893 \begin_inset LatexCommand \ref{sub:relyx-syntax}
16900 \begin_layout Subsection
16904 \begin_layout Subsubsection
16908 \begin_layout Standard
16909 reLyX will create a LyX file
16913 from the LaTeX file
16924 \begin_layout Standard
16942 does not exist and does not have one of these suffixes, reLyX will try
16948 (This is similar to the behavior of LaTeX.)
16951 \begin_layout Standard
16952 The purpose of reLyX is to translate
16957 If your LaTeX file doesn't compile---or if you do weird things, like redefining
16958 standard LaTeX commands---it may choke.
16959 LaTeX209 will often be translated correctly, but it's not guaranteed.
16962 \begin_layout Standard
16963 reLyX has some bugs and lacks a few features.
16964 However, its main goals are:
16967 \begin_layout Itemize
16968 Get through a well-behaved LaTeX2e file without crashing
16971 \begin_layout Itemize
16972 Translate a lot of that file.
16975 \begin_layout Itemize
16976 Localize the parts that can't be translated and copy them in TeX mode
16979 \begin_layout Standard
16980 It achieves these main goals pretty well on most files.
16983 \begin_layout Standard
16984 There are many improvements that can and will be made to reLyX in the future.
16985 However, we wanted to get reLyX out there early on, to make it easier for
16986 new LyX users to read in their existing LaTeX files.
16989 \begin_layout Subsubsection
16993 \begin_layout Standard
16994 Here's a more lengthy description of what you should do to translate a LaTeX
16998 \begin_layout Itemize
17003 \begin_layout Standard
17004 reLyX will inform you of its progress and give any warnings to stderr, so
17005 if you don't want any output at all, try (in csh)
17006 \begin_inset Quotes eld
17011 reLyX foo.tex >& /dev/null
17014 \begin_inset Quotes erd
17018 \begin_inset Quotes eld
17030 \begin_inset Quotes erd
17034 You should NOT redirect standard output to
17043 \begin_layout Itemize
17044 Run LyX on the resulting .lyx file.
17048 \begin_layout Standard
17049 In theory, most of the file will have been translated, and anything that's
17050 untranslatable will be highlighted in red (TeX mode).
17051 In theory, LyX will be able to read in the file, and to create printed
17052 documents from it, because all that untranslated red stuff will be passed
17053 directly back to LaTeX, which LyX uses as a backend.
17054 Unfortunately, reality doesn't always reflect theory.
17055 If reLyX crashes, or LyX cannot read the generated LyX file, see Section\InsetSpace ~
17057 \begin_inset LatexCommand \ref{sub:relyx-bugs}
17069 \begin_layout Itemize
17070 Change things that are in ERT boxes (TeX code) by hand in LyX.
17074 \begin_layout Standard
17075 As mentioned above, you should be able to print out the LyX file even without
17077 However, changing a command in TeX mode to the corresponding LyX object
17078 will allow you to take advantage of LyX's WYSIWYM editing.
17081 \begin_layout Standard
17082 reLyX is not guaranteed to create a LyX file which generates exactly the
17083 same output as the LaTeX file, but it should come close.
17084 reLyX will generally err on the side of translating less to ensure that
17085 dvi or ps files are accurate, even though this leads to more
17086 \begin_inset Quotes eld
17090 \begin_inset Quotes erd
17097 \begin_layout Itemize
17098 PROOFREAD THE DOCUMENT!!
17102 \begin_layout Standard
17103 I'm sure you were planning on doing this anyway, but it's particularly important
17104 after translating a LaTeX document.
17105 reLyX is, at least now, better at
17106 \begin_inset Quotes eld
17110 \begin_inset Quotes erd
17113 (translating the whole document) than
17114 \begin_inset Quotes eld
17118 \begin_inset Quotes erd
17121 (translating every little detail).
17122 For example, you may see extra spaces or deleted spaces.
17123 Space handling has improved, but it's not perfect.
17127 \begin_layout Subsubsection
17128 What reLyX Can Handle
17131 \begin_layout Standard
17132 reLyX understands many LaTeX commands.
17136 \begin_layout Itemize
17137 regular text, including mini-commands like ~, '',
17149 , as well as accented characters like
17155 , and the special cases ?` and !`
17158 \begin_layout Itemize
17159 title commands like
17183 and the abstract environment
17186 \begin_layout Itemize
17187 heading commands like
17193 including starred commands (
17202 \begin_layout Itemize
17228 \begin_layout Itemize
17241 environments, and their
17248 Also, well-behaved nested lists
17251 \begin_layout Itemize
17252 cross-referencing commands:
17277 \begin_layout Itemize
17291 \begin_layout Itemize
17292 font-changing commands including
17310 , and corresponding commands to change family, size, series, and shape
17313 \begin_layout Itemize
17340 \begin_inset Quotes erd
17350 \begin_inset Quotes erd
17356 \begin_layout Itemize
17361 environment, and commands that go inside it like
17382 \begin_layout Itemize
17397 commands within them
17400 \begin_layout Itemize
17411 command, as well as BibTeX's
17426 \begin_layout Itemize
17427 miscellaneous commands:
17456 \begin_layout Itemize
17457 documentclass-specific environments (and some commands) which can be translated
17461 \begin_layout Itemize
17462 arguments to certain untranslatable commands (e.g.
17472 \begin_layout Standard
17473 Some of this support may not be 100% yet.
17474 See below for details
17477 \begin_layout Standard
17478 reLyX copies math (almost) verbatim from your LaTeX file.
17479 Luckily, LyX reads in LaTeX math, so (almost) any math which is supported
17480 by LyX should work just fine.
17481 A few math commands which are not supported by LyX will be replaced with
17482 their equivalents, e.g.,
17502 \begin_layout Standard
17503 reLyX will also copy any preamble commands (i.e., anything before
17509 ) verbatim, so fancy stuff you've got in your preamble should be conserved
17510 in dvi and printed documents, although it will not of course show up in
17512 Check the preamble to make sure.
17515 \begin_layout Subsubsection
17516 What reLyX Can't Handle --- But it's OK
17519 \begin_layout Itemize
17527 \begin_layout Itemize
17531 \begin_layout Itemize
17553 \begin_layout Itemize
17573 \begin_layout Itemize
17585 reLyX is careful to copy
17589 in this case, including comments and whitespace.
17592 \begin_layout Itemize
17593 some unknown (e.g., user-defined) environments and commands
17596 \begin_layout Standard
17597 reLyX copies unknown commands, along with their arguments, verbatim into
17605 where it doesn't recognize the
17606 \begin_inset Quotes eld
17610 \begin_inset Quotes erd
17613 environment, it will copy verbatim until it sees
17619 (unless you use the
17624 Hopefully, then, most of these unknown commands won't cause reLyX to break;
17625 they'll merely require you to do some editing once you've loaded the file
17627 That should be less painful than editing either the
17635 file using a text editor.
17638 \begin_layout Subsubsection
17639 What reLyX Handles Badly --- a.\InsetSpace ~
17643 \begin_inset LatexCommand \label{sub:relyx-bugs}
17650 \begin_layout Standard
17651 Since reLyX is relatively new, it's got a number of problems.
17652 As it matures, these bugs will be squished.
17653 A number of bugs and missing features can be found listed on the LyX bug
17655 \begin_inset LatexCommand \url[LyX Bugzilla]{http://bugzilla.lyx.org/}
17662 \begin_layout Standard
17663 If reLyX is choking on something, or LyX can't read it after reLyX translates
17664 it, the best thing to do is to put
17670 before the offending text, and
17678 \begin_inset Quotes eld
17682 \begin_inset Quotes erd
17686 reLyX will copy this block exactly, in TeX mode.
17687 Then edit the resulting LyX file, and translate the unknown stuff by hand.
17692 environment is magical; the
17704 commands will not be put into the LyX file.
17707 \begin_layout Itemize
17708 \begin_inset Quotes eld
17712 \begin_inset Quotes erd
17715 copying of unknown environments and commands isn't quite exact.
17716 Specifically, newlines and comments may be lost.
17717 This will yield ugly LyX, but in almost all cases the output will be the
17719 However, certain parts of the file will be copied perfectly, including
17720 whitespace and comments.
17721 This includes: the LaTeX preamble,
17731 commands, and skip blocks.
17734 \begin_layout Itemize
17735 reLyX translates only a few options to the
17742 (Specifically 1[012]pt, [letter|legal|executive|a4|a5|b5]paper, [one|two]side,
17743 landscape, and [one|two]column.) Other options are placed in the extra class
17744 options field in the
17749 ocument\SpecialChar \menuseparator
17760 \begin_layout Standard
17761 More importantly, reLyX doesn't translate
17767 commands, margin commands,
17773 s, or, in fact, anything else from the preamble.
17774 It simply copies them into the LaTeX preamble.
17775 If you have margin commands in your preamble, then the LyX file will generate
17777 However, these margins will override any margins you set in the LyX
17784 \SpecialChar \menuseparator
17790 So you should remove the options from the preamble to be safe.
17791 The same goes for setting your language with babel,
17807 \begin_layout Itemize
17808 The foil class has a couple bugs.
17809 reLyX may do weird things with optional arguments to
17816 Also, it may handle
17822 incorrectly (although the stuff in the environment should translate normally).
17825 \begin_layout Standard
17826 reLyX is hopefully rather robust.
17827 As mentioned above, it may not translate your file perfectly, but it shouldn't
17829 If it does crash---and the problem is not one of those mentioned above
17834 file---see Section\InsetSpace ~
17836 \begin_inset LatexCommand \ref{sub:relyx-bug-reports}
17843 \begin_layout Subsubsection
17844 What LyX Can't Handle
17847 \begin_layout Standard
17848 LyX itself is missing a couple features, such that even if reLyX translates
17849 things perfectly, LyX may still have trouble reading it.
17850 If you really need these features, you can export your final document as
17851 LaTeX, and put them back in.
17856 for more details on these bugs.
17859 \begin_layout Itemize
17860 For a number of commands, LyX does not support the optional argument.
17873 (and other sectioning commands), and
17882 reLyX will automatically discard the optional arguments with a warning
17884 LyX also ignores the width argument for the
17891 \begin_layout Itemize
17892 Centering (or right or left justifying) works on full paragraphs.
17895 \begin_layout Itemize
17896 LyX support for tables isn't perfect.
17897 For complicated tables, use a
17898 \begin_inset Quotes eld
17902 \begin_inset Quotes erd
17905 block, so that they will be copied in TeX mode.
17908 \begin_layout Itemize
17909 The LyX math editor can't handle the AMS-LaTeX math environments align,
17911 So those environments will be copied in TeX mode.
17916 environments to the exactly equivalent displaymath, and then they will
17917 be translated correctly.
17920 \begin_layout Subsection
17924 \begin_layout Standard
17928 \begin_inset Quotes eld
17932 \begin_inset Quotes erd
17936 \begin_inset Quotes eld
17940 \begin_inset Quotes erd
17943 foo.tex > foo.debug
17946 \begin_layout Standard
17947 The above will create a file my/dir/foo.lyx from foo.tex, overwriting if necessary.
17957 block, it will translate the stuff within the block, but copy the
17969 commands in TeX mode.
17970 Finally, I'm going to keep the temporary files around (they will also
17971 be in my/dir/) and output lots of debugging information into the file foo.debug.
17974 \begin_layout Subsection
17978 \begin_layout Subsubsection
17980 \begin_inset LatexCommand \label{sub:relyx-bug-reports}
17987 \begin_layout Standard
17988 If reLyX is crashing or otherwise acting strangely---in ways other than
17989 those described in Section\InsetSpace ~
17991 \begin_inset LatexCommand \ref{sub:relyx-bugs}
17995 or the bug tracker---then please run reLyX
18000 That will allow you to figure out where in the reLyXing process it crashed.
18001 That, in turn, will allow you to write a better bug report, which will
18002 allow the developers to fix it more quickly and easily.
18005 \begin_layout Standard
18006 Bug reports should be sent to the LyX developers' mailing list.
18007 Its address is currently
18009 lyx-devel@lists.lyx.org
18012 If you are running reLyX on a huge file, please do not send all of the
18013 output in your bug report.
18014 Just include the last ten or twenty lines of output, along with the piece
18015 of the LaTeX file it crashed on.
18016 Or, even better, attach a small but complete file which causes the same
18017 problem as your original file.
18020 \begin_layout Subsubsection
18021 Implementation Details:
18024 \begin_layout Standard
18025 reLyX makes several
18026 \begin_inset Quotes eld
18030 \begin_inset Quotes erd
18033 in order to translate a TeX file.
18034 On each pass, it creates one or two files.
18037 \begin_layout Description
18042 Before doing anything, read the syntax file (or files).
18045 \begin_layout Description
18050 Split preamble (anything before a
18056 command) off the rest of the file.
18057 It saves the two pieces in separate files.
18058 This is necessary because there may be very strange stuff in a preamble.
18059 It also ignores anything after the
18065 , on the assumption that it isn't LaTeX.
18068 \begin_layout Description
18073 Translate the preamble.
18074 Currently, that just means translating the
18080 command and copying the rest exactly into the LyX preamble.
18084 \begin_layout Standard
18085 Once you know what class the document is, read the LyX layout file for that
18090 \begin_layout Description
18096 \begin_inset Quotes eld
18100 \begin_inset Quotes erd
18103 the TeX file, generating slightly stricter LaTeX.
18108 \begin_layout Itemize
18113 to the equivalent but clearer
18118 \begin_layout Itemize
18119 Removing optional arguments that LyX can't handle (e.g., from
18128 \begin_layout Itemize
18142 This is necessary because LyX always writes out the non-local forms anyway.
18143 This should very rarely make a difference.
18147 \begin_layout Description
18152 Translate LaTeX text, commands, and environments to LyX.
18155 \begin_layout Description
18160 Put the two pieces back together, and do some final tweaking, to generate
18164 \begin_layout Standard
18177 commands, reLyX will loop back to the beginning and translate those.
18178 It assumes that the included files are the same class as the main file,
18179 and that they have no preamble matter.
18186 command in the preamble of a file, the command will be copied exactly into
18187 the LaTeX preamble portion of the LyX file, so the included file won't
18188 be translated.) So when translating included files, it skips passes 0 and
18192 \begin_layout Standard
18193 If reLyX doesn't find a file you wanted to include, it will give a warning,
18194 but will continue to translate any files it does find.
18197 \begin_layout Subsubsection
18201 \begin_layout Standard
18202 reLyX reads a LyX layout file to know how to handle LaTeX environments and
18203 commands which get translated to LyX layouts.
18204 This file will include all
18205 \begin_inset Quotes eld
18209 \begin_inset Quotes erd
18212 non-math environments (i.e., including quote and itemize, but not tabular,
18213 minipage, and some other fancy environments), and commands like
18226 If you want to reLyX a class that doesn't have an existing layout file,
18227 then you'll have to create a layout file.
18228 But you have to do this anyway, in order to LyX the file, since LyX depends
18229 on layout files to know how to display and process its files.
18230 Check the LyX documentation for help with this task (which can be hard
18231 or easy, depending on the class you want to create a layout file for.) If
18232 your class is quite similar to a class that has a layout file, then consider
18240 \begin_layout Subsubsection
18242 \begin_inset LatexCommand \label{sub:relyx-syntax}
18249 \begin_layout Standard
18250 reLyX always reads at least one syntax file, called the default syntax file.
18251 reLyX will read your personal syntax file if it exists; otherwise it will
18252 read the system-wide file.
18253 reLyX will read additional syntax files if you specify them with the
18258 (These extra files should have the same format as the default file, but
18259 will tend to be shorter, since they only have to specify extra commands
18260 not found in the default file.) A syntax file tells reLyX a few things.
18263 \begin_layout Standard
18264 First, it describes the syntax of each command, that is, how many required
18265 arguments and how many optional arguments the command takes.
18266 Knowing this makes it easier for reLyX to copy (in TeX mode) commands that
18267 it doesn't know how to translate.
18268 The syntax file simply has a command, followed by braces or brackets describing
18269 its arguments in the correct order.
18270 For example, a syntax file entry
18282 command takes an optional argument followed by a required one, while the
18295 command takes no arguments at all.
18296 When reLyX encounters a token that it doesn't know how to translate into
18297 LyX, it will copy the token---along with the correct number of arguments---exac
18299 If the token is not in the syntax file, then reLyX just copies as many
18300 arguments as it finds.
18301 This means that it may copy too much.
18302 But since the user can specify additional syntax files, that shouldn't
18306 \begin_layout Standard
18307 Some commands that cannot be translated to LyX, like
18313 , have as one of their arguments regular LaTeX text.
18315 \begin_inset Quotes eld
18319 \begin_inset Quotes erd
18322 is put into an argument of an (untranslatable) command in the syntax file,
18323 then reLyX will translate that argument instead of copying it verbatim.
18324 So, for example, the default syntax file has
18328 raisebox{}[][]{translate}
18331 This means that the
18337 command and the first argument (and optional arguments if they exist) are
18338 copied in TeX mode, but the last argument (which may contain math, complicated
18339 LaTeX, other untranslatable commands, etc.) will be translated into LyX.
18341 \begin_inset Quotes eld
18345 \begin_inset Quotes erd
18348 on optional arguments.
18351 \begin_layout Standard
18352 User-defined syntax files are allowed to define new commands and their syntax,
18353 or override the number of arguments for a command given in the default
18355 (E.g., if you're using a style that gives an extra argument to some command...)
18356 However, this will only be useful for commands copied in TeX mode.
18357 Commands which are actually translated by reLyX (like
18363 ) have their argument syntax hard-coded.
18364 The hard-coded commands are identified in the default syntax file.
18367 \begin_layout Standard
18368 Second, the syntax file describes any
18369 \begin_inset Quotes eld
18372 regular environments
18373 \begin_inset Quotes erd
18377 Usually, an entire unknown environment will be copied in TeX mode.
18378 If you define a regular environment
18379 \begin_inset Quotes eld
18383 \begin_inset Quotes erd
18386 , though, then only the
18398 commands will be copied in TeX mode; the text within the environment will
18399 be treated (i.e., translated) by reLyX as regular LaTeX, rather than being
18400 copied into TeX mode.
18401 Don't try to declare
18409 as regular environments, as the text within those environments will confuse
18410 reLyX; use this capability for new environments you create that have plain
18411 text or math or simple commands in them.
18412 You also can't declare unknown math environments (like
18416 ) as regular environments, either, since the LyX math editor won't understand
18418 The names of regular environments appear, whitespace-separated, between
18431 statements in the syntax file.
18432 (If you have a regular environment which you won't use very often, you
18437 option rather than writing a syntax file.)
18440 \begin_layout Standard
18441 Third, the syntax file describes a math translation table.
18442 The LyX math editor doesn't support a few commands.
18447 is supported, but the equivalent
18454 Put any commands you'd like translate between
18468 \begin_inset Quotes eld
18480 \begin_inset Quotes erd
18489 in math mode will be converted to
18490 \begin_inset Quotes eld
18500 \begin_inset Quotes erd
18507 (in cases where a token made up of a backslash and a non-letter is translated
18508 to something with letters at the end, a space is added by reLyX.
18510 \begin_inset Quotes eld
18520 \begin_inset Quotes erd
18523 is correctly translated to
18524 \begin_inset Quotes eld
18534 \begin_inset Quotes erd
18540 \begin_layout Subsubsection
18544 \begin_layout Standard
18545 You need Perl version 5.002 or later to run reLyX.
18546 <plug> If you don't have Perl, you should get it anyway (at
18547 \begin_inset LatexCommand \url[Perl]{http://www.perl.com/}
18551 ), because it's a really useful tool for pretty much anything.
18555 \begin_layout Subsection
18559 \begin_layout Standard
18560 reLyX should always explain why it crashes, if it crashes.
18561 Some diagnostics may be very technical, though, if they come from the guts
18563 reLyX gives much more information while running if you use the
18567 option, but you shouldn't need that unless something goes wrong.
18570 \begin_layout Standard
18571 When it's finished, reLyX will tell you if it finished successfully or died
18575 \begin_layout Subsection
18579 \begin_layout Standard
18580 Always keep a copy of your original LaTeX files either under a different
18581 name or in a different directory.
18582 There are a couple ways in which using LyX could lead to overwriting the
18583 original LaTeX file.
18586 \begin_layout Standard
18599 and want to re-export it, note that it will overwrite the original
18608 ask you if you want to overwrite it.)
18611 \begin_layout Standard
18612 If you have chosen not to use a temporary directory in the preferences,
18613 then LyX will create its temporary files in your current directory, which
18614 means your LaTeX original may be overwritten (without a warning from LyX)
18616 \begin_inset Quotes eld
18620 \begin_inset Quotes erd
18623 or print the LyX document.
18626 \begin_layout Subsection
18630 \begin_layout Description
18634 MY_LYXDIR/layouts/*.layout
18640 User's personal layout files for document classes
18643 \begin_layout Description
18647 MY_LYXDIR/reLyX/syntax.default
18653 User's personal syntax file
18656 \begin_layout Description
18660 LIBDIR/layouts/*.layout
18666 System-wide layout files for document classes
18669 \begin_layout Description
18673 LIBDIR/reLyX/syntax.default
18679 System-wide LaTeX syntax file
18682 \begin_layout Standard
18687 is the system-wide LyX directory, usually something like
18689 /usr/local/share/lyx/
18696 is your personal LyX directory, something like
18700 in your home directory.
18701 You can see their actual values in the
18706 elp\SpecialChar \menuseparator
18716 \begin_layout Subsection
18720 \begin_layout Standard
18732 \begin_layout Subsection
18736 \begin_layout Standard
18737 Copyright (c) 1998--9
18743 karger@voth.chem.utah.edu
18748 \begin_layout Standard
18752 \begin_layout Itemize
18757 wrote the original CleanTeX pass.
18760 \begin_layout Itemize
18766 \begin_layout Itemize
18774 \begin_layout Itemize
18777 David Suarez de Lis
18780 \begin_layout Standard
18781 Other contributors:
18784 \begin_layout Itemize
18787 Jean-Marc Lasgouttes
18789 worked on the wrapper script and offered lots of bug reports, advice, and
18790 feature suggestions.
18793 \begin_layout Itemize
18806 \begin_layout Itemize
18807 Various members of the LyX developers' and users' lists provided bug reports
18808 and feature suggestions.
18811 \begin_layout Standard
18812 reLyX uses a modified version the Perl TeX parser
18822 ilya@math.ohio-state.edu
18824 ), available on CPAN.
18827 \begin_layout Chapter
18828 LyX Features needing Extra Software
18831 \begin_layout Section
18832 Using LyX with SGML-Tools (aka LinuxDoc)
18835 \begin_layout Standard
18841 \begin_layout Subsection
18845 \begin_layout Standard
18846 LinuxDoc is a document class available in LyX if you have the
18851 You can use it to produce documents in the so-called Standardized General
18852 Mark-up Language (SGML) in the particular format used by the Linux Documentatio
18854 That is obviously helpful if you are contributing to that project.
18855 You can use the SGML format with the
18859 package of scripts and programs (to produce other formats, including Latex,
18860 HTML, plain text, man pages and\SpecialChar \ldots{}
18862 You may therefore prefer to use this document class if you want to write
18863 something that can be easily translated into other formats.
18866 \begin_layout Standard
18867 You will find that LinuxDoc has fewer layout options than the other text
18869 This is mainly so that the translations into other formats have a chance
18870 of making some sense.
18871 In this section we describe:
18874 \begin_layout Itemize
18875 how to setup and use a document in LinuxDoc
18878 \begin_layout Itemize
18879 how to use the tags in LinuxDoc to layout your document
18882 \begin_layout Itemize
18883 how to use the SGML packages to produce the various formats
18886 \begin_layout Itemize
18887 how to sort out some problems.
18890 \begin_layout Subsection
18891 Preparing and using a LinuxDoc document
18894 \begin_layout Subsubsection
18898 \begin_layout Standard
18899 You start by selecting the LinuxDoc class using the
18904 ocument\SpecialChar \menuseparator
18916 Then you will find that there are fewer paragraph environments than for
18917 most other classes.
18918 You can see them on the pull down box on the left of the tool bar.
18919 How to use them is described in section\InsetSpace ~
18921 \begin_inset LatexCommand \ref{sec:sgmlparas}
18928 \begin_layout Standard
18933 enter a title for the document, followed by an author, marking each with
18934 the appropriate paragraph environment.
18935 If you don't do this, you will get errors when you try to print the file.
18936 You can then enter the date and an abstract.
18937 The document proper must start with a Section paragraph environment rather
18938 than any standard layout.
18941 \begin_layout Standard
18942 After that you can prepare a document as usual using the available range
18943 of paragraph environments.
18944 See section\InsetSpace ~
18946 \begin_inset LatexCommand \ref{sec:sgmlparas}
18950 for the full list and their uses.
18953 \begin_layout Subsubsection
18954 Output from LinuxDoc
18957 \begin_layout Standard
18958 You can print and save these documents in the normal way.
18959 To use the other features of the SGML package you need to save your document
18960 as LinuxDoc; this is a version in which the document is translated into
18961 the basic sgml tags.
18968 ile\SpecialChar \menuseparator
18973 xport\SpecialChar \menuseparator
18981 You will get a file with the same name and a
18985 extension rather than a
18992 \begin_inset LatexCommand \ref{sec:sgmloperate}
18996 on how you than make use of this file.
18999 \begin_layout Subsection
19000 Using the paragraph environments in LinuxDoc
19003 \begin_layout Subsubsection
19004 The Structure of a LinuxDoc Document
19007 \begin_layout Standard
19008 There is a formal structure for LinuxDoc which limits how you can place
19010 There are two parts to all documents:
19013 \begin_layout Description
19014 Header: this is everything up to the first time you insert a Section layout
19016 It can include title, author, date, abstract and ToC.
19017 You must include the first two.
19020 \begin_layout Description
19021 Body: from the beginning of the first section onwards.
19022 All other tags are allowed.
19026 \begin_layout Subsubsection
19027 The LinuxDoc Paragraph Environments
19030 \begin_layout Standard
19031 \begin_inset LatexCommand \label{sec:sgmlparas}
19035 Here is a list of all the tags you will find listed on the layout bar in
19036 the order they come there, with some comments where the purpose or use
19040 \begin_layout Itemize
19045 works as described in [cross reference]
19048 \begin_layout Itemize
19053 : This will appear at the top left of the document when printed, above a
19054 heavy horizontal rule, although you will not see this on the LyX screen.
19057 \begin_layout Itemize
19060 Section, Subsection, Subsubsection, Paragraph and Subparagraph:
19062 all do what you would expect and in the usual order.
19063 Whether they are numbered or not is controlled by the
19065 Section\InsetSpace ~
19066 number\InsetSpace ~
19070 You cannot get the equivalent number free versions in any other way; there
19078 \begin_layout Itemize
19083 As usual this produces a numbered and indented list as described in the
19091 \begin_layout Itemize
19096 Again much the same as in the other classes: see the
19103 \begin_layout Itemize
19108 : As explained in the
19113 Remember that if you want the bold element at the start of a description
19114 to be more than one word then you need to put protected spaces between
19119 \begin_layout Itemize
19127 \begin_layout Itemize
19130 Code: similar to the Lyx-Code
19135 \begin_layout Itemize
19140 : Anything you mark with this will appear on the left of the heading of
19141 the document, under the heavy rule.
19144 \begin_layout Itemize
19149 Anything you mark with this will appear on the right of the heading under
19151 You do not have to make this a date.
19152 Any text can be entered, e.\InsetSpace ~
19157 \begin_layout Itemize
19162 : You can use this to produce a free standing paragraph after the author
19163 and date, and before the first section.
19164 You are only allowed one such paragraph.
19168 \begin_layout Standard
19174 This needs checking ---
19184 \begin_layout Itemize
19193 \begin_layout Standard
19198 I have not yet checked this ---
19208 \begin_layout Subsubsection
19209 Other document features
19212 \begin_layout Standard
19213 You can also use the
19217 menu to set fonts or to emphasis words.
19218 You can also use the table of contents as usual; see the corresponding
19224 Although you will find some some other features on the menus e.\InsetSpace ~
19226 inserting footnotes.
19227 There is some doubt about whether these will work correctly.
19231 \begin_layout Standard
19236 Again still checking to see whether this is my system
19246 \begin_layout Subsubsection
19247 Cross references and HTML
19250 \begin_layout Standard
19255 menu you will find two new options relating to the inclusion of URL addresses.
19256 If you use either option you will find some highlighted TeX code inserted
19257 into your document in three separate blocks with spaces available between.
19258 The blocks will be:
19261 \begin_layout Quote
19293 \begin_layout Standard
19294 You insert a full HTML tag between the first and second blocks.
19296 \begin_inset LatexCommand \url{http://any.address}
19300 or other valid tags such as
19301 \begin_inset LatexCommand \url{mailto:me@my.address}
19313 insert some description between the second and third blocks.
19314 The differences are:
19317 \begin_layout Itemize
19322 both the HTML tag and the description will appear in the document
19325 \begin_layout Itemize
19331 only the description appears in the printed version
19334 \begin_layout Subsection
19335 Using the LinuxDoc Sgml scripts
19336 \begin_inset Note Note
19339 \begin_layout Standard
19340 This section is completely outdated.
19348 \begin_layout Standard
19349 \begin_inset LatexCommand \label{sec:sgmloperate}
19353 You can use LinuxDoc as a text class without any additional scripts or programs,
19354 but there is not much point in doing this.
19355 All you will get is a document that looks like a
19357 Linux Documentation Project Howto
19363 To do the document translation you need to get and install the
19365 sgml-tools-1.0.x.tar.gz
19368 \begin_inset Formula $x\geq3$
19373 the SGML-Tools WWW Page
19378 \begin_layout LyX-Code
19381 \begin_inset LatexCommand \url{http://pobox.com/~cg/sgmltools}
19390 \begin_layout Standard
19391 Alternatively, you can go to the
19399 \begin_layout Standard
19400 Note that, at the time of this writing (01/1998), version 1.0.3 of sgml-tools
19401 has not yet been made available at
19413 \begin_layout LyX-Code
19416 \begin_inset LatexCommand \url{ftp://sunsite.unc.edu/pub/Linux/utils/text/sgml-tools-1.0.x.tar.gz}
19423 \begin_layout Standard
19430 sgml-tools-1.0.x.tar.gz
19432 contains everything that you need to write SGML documents and convert them
19433 to groff, LaTeX, HTML, GNU info, LyX, and RTF\SpecialChar \@.
19437 \begin_layout Standard
19438 This package was renamed from
19440 linuxdoc-sgml-1.5.tar.gz
19445 \begin_layout Standard
19446 Follow the instructions in that package on how to install it and how to
19448 All this has to be done outside of LyX, before you can use the
19453 ile\SpecialChar \menuseparator
19458 xport\SpecialChar \menuseparator
19465 \begin_layout Subsection
19466 Troubleshooting LinuxDoc
19469 \begin_layout Standard
19470 When you print or preview a LinuxDoc document some checking is done of the
19471 tags before LaTeX is run.
19472 Some errors are trapped here, especially those concerning the structure
19474 LyX may produce an error message, but not leave an error box in the document
19476 You may have to look at the files directly to discover what is wrong.
19477 Most problems seem to come from the use of options that are not fully available
19481 \begin_layout Section
19485 \begin_layout Standard
19491 \begin_layout Subsection
19495 \begin_layout Standard
19503 menu, you'll find a
19512 This feature requires you to have the
19516 program installed, and is grayed out if you don't have it.
19517 You can get it from your nearest CTAN mirror, or over the Web from
19518 \begin_inset LatexCommand \url{http://www.ifi.uio.no/~jensthi/chktex/}
19525 \begin_layout Standard
19530 package is a program that was written by
19535 in frustration because some constructs in LaTeX are sometimes non-intuitive,
19536 and easy to forget.
19537 The program runs over your LaTeX file and checks the integrity of the file,
19538 and flags some common errors.
19539 In other technical words, it is
19546 \begin_layout Standard
19547 Well, what is a syntax checker doing in LyX which is supposed to produce
19548 correct LaTeX anyways? The answer is simple: Just as
19552 not only checks the
19556 of C programs, but also does
19560 checks for type-errors,
19564 catches some common
19568 errors, in addition to the syntactical ones.
19573 is capable of detecting several common errors, such as
19576 \begin_layout Itemize
19577 Ellipsis detection:
19579 Use \SpecialChar \ldots{}
19583 \begin_layout Itemize
19584 No space in front of/after parenthesis:
19589 \begin_layout Itemize
19590 Enforcement of normal space after common abbreviations:
19594 is too wide spacing.
19597 \begin_layout Itemize
19598 Enforcement of end-of-sentence space when the last sentence ends with a
19602 And this is wrong spacing.
19605 \begin_layout Itemize
19606 Space in front of labels and similar commands:
19608 The label should stick right
19609 up to the text to avoid falling to a wrong page.
19611 \begin_inset LatexCommand \label{sec:chktex}
19619 \begin_layout Standard
19620 This footnote is in danger of falling off to a wrong page
19625 The label is separated too much.
19628 \begin_layout Itemize
19629 Space in front of references, instead of hard spaces:
19631 In you are in bad luck,
19632 the text will break right between the referenced text and reference number,
19635 \begin_inset LatexCommand \ref{sec:chktex}
19642 \begin_layout Itemize
19644 \begin_inset Quotes eld
19648 \begin_inset Quotes erd
19652 \begin_inset Formula $\times$
19657 2x2 looks cheap compared to
19658 \begin_inset Formula $2\times2$
19664 \begin_layout Standard
19665 and more \SpecialChar \ldots{}
19666 It is an invaluable tool when you are
19667 \begin_inset Quotes eld
19671 \begin_inset Quotes erd
19674 your document before printing, and you should run it right after the obligatory
19675 spelling check, and before you go fine tuning the typesetting.
19678 \begin_layout Subsection
19682 \begin_layout Standard
19683 If you have the program installed, usage is as simple as choosing
19688 ools\SpecialChar \menuseparator
19697 This will make LyX generate a LaTeX file of your document, start
19701 to check it, and then make LyX insert
19702 \begin_inset Quotes eld
19706 \begin_inset Quotes erd
19709 with the warnings from
19713 , if there were any.
19714 The warnings will be placed close to the point of the mistake, and you
19715 can quickly find them by using the
19720 avigate\SpecialChar \menuseparator
19727 menu item, or the shortcut key
19736 Open the error boxes by clicking on them with the mouse, or use the shortcut
19745 bindings, or the corresponding
19754 Read the warning and correct the mistake, if it is a mistake.
19755 If you have trouble understanding what the warning is about, you can safely
19757 Remember that there is a hidden layer between the document on screen and
19758 the technical details in invoking
19762 , and this gap can make some warnings seem arcane or just right down plain
19766 \begin_layout Standard
19767 This document is an excellent testing bed for the feature, and it should
19768 provide quite a few warnings for you to fiddle with.
19769 Since computers are only so smart, expect most of the warnings to be false
19773 \begin_layout Subsection
19774 How to fine tune it
19777 \begin_layout Standard
19778 Sometimes, you'll find that
19782 makes more noise than suits your mood.
19783 Then you can choose not to use it, wait until your mood changes, or try
19788 to get better along with you.
19789 Another choice in the most desperate situations is to use
19794 iew\SpecialChar \menuseparator
19804 , which will get rid of all warnings instantly.
19807 \begin_layout Standard
19816 very configurable and extensible, you shouldn't expect to solve all problems
19822 Since LyX has to generate a somewhat special LaTeX file to be able to match
19823 the line numbers from the
19831 \begin_layout Standard
19832 You can inspect the specific output from
19838 Edit\SpecialChar \menuseparator
19852 to the internal document structure, some of the warnings will not seen
19853 to appear correctly.
19854 There are two things you can do about this:
19857 \begin_layout Itemize
19862 invocation command line in
19878 installation configuration file (usually with the file
19880 /usr/local/share/chktexrc
19883 See below to learn what warnings can be enabled and disabled on the command
19888 \begin_layout Itemize
19889 Export your document as a raw LaTeX file using
19894 ile\SpecialChar \menuseparator
19899 xport\SpecialChar \menuseparator
19911 Invoked in this way, it can be a hassle to find the corresponding place
19912 in the document inside LyX, but with a little patience, you should be able
19916 \begin_layout Standard
19917 Here follows the warning messages that can be enabled and disabled in
19926 to disable a warning, and
19930 to enable a warning.
19931 The emphasized entries are disabled by default, because the default is
19934 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
19939 \begin_layout Standard
19940 Notice that you should only use the options that enable and disable warnings,
19941 because LyX relies on some of the other command line parameters to be set
19942 in a specific way to have a chance to communicate with
19949 \begin_layout Enumerate
19953 Command terminated with space.
19956 \begin_layout Enumerate
19959 Non-breaking space (
19960 \begin_inset Quotes eld
19968 \begin_inset Quotes erd
19971 ) should have been used.
19974 \begin_layout Enumerate
19978 You should enclose the previous parenthesis with
19979 \begin_inset Quotes eld
19987 \begin_inset Quotes erd
19993 \begin_layout Enumerate
19996 Italic correction (
19997 \begin_inset Quotes eld
20007 \begin_inset Quotes erd
20010 ) found in non-italic buffer.
20013 \begin_layout Enumerate
20016 Italic correction (
20017 \begin_inset Quotes eld
20027 \begin_inset Quotes erd
20030 ) found more than once.
20033 \begin_layout Enumerate
20037 No italic correction (
20038 \begin_inset Quotes eld
20048 \begin_inset Quotes erd
20054 \begin_layout Enumerate
20058 \begin_inset Quotes eld
20066 \begin_inset Quotes erd
20070 \begin_inset Quotes eld
20078 \begin_inset Quotes erd
20084 \begin_layout Enumerate
20087 Wrong length of dash may have been used.
20090 \begin_layout Enumerate
20094 \begin_inset Quotes eld
20102 \begin_inset Quotes erd
20106 \begin_inset Quotes eld
20114 \begin_inset Quotes erd
20120 \begin_layout Enumerate
20124 \begin_inset Quotes eld
20132 \begin_inset Quotes erd
20138 \begin_layout Enumerate
20142 \begin_inset Quotes eld
20150 \begin_inset Quotes erd
20153 to achieve an ellipsis.
20156 \begin_layout Enumerate
20159 Inter-word spacing (
20160 \begin_inset Quotes eld
20170 \begin_inset Quotes eld
20173 ) should perhaps be used.
20176 \begin_layout Enumerate
20179 Inter-sentence spacing (
20180 \begin_inset Quotes eld
20190 \begin_inset Quotes erd
20193 ) should perhaps be used.
20196 \begin_layout Enumerate
20199 Could not find argument for command.
20202 \begin_layout Enumerate
20206 \begin_inset Quotes eld
20214 \begin_inset Quotes erd
20220 \begin_layout Enumerate
20223 Math mode still on at end of LaTeX file.
20226 \begin_layout Enumerate
20230 \begin_inset Quotes eld
20238 \begin_inset Quotes erd
20241 doesn't match the number of
20242 \begin_inset Quotes eld
20250 \begin_inset Quotes erd
20256 \begin_layout Enumerate
20259 You should use either
20262 \begin_inset Quotes eld
20270 \begin_inset Quotes erd
20275 as an alternative to
20276 \begin_inset Quotes eld
20284 \begin_inset Quotes erd
20290 \begin_layout Enumerate
20297 " (ASCII 39) instead of "
20304 \begin_layout Enumerate
20307 User-specified pattern found.
20310 \begin_layout Enumerate
20313 This command might not be intended.
20316 \begin_layout Enumerate
20323 \begin_layout Enumerate
20341 \begin_layout Enumerate
20344 Delete this space to maintain correct page references.
20347 \begin_layout Enumerate
20351 You might wish to put this between a pair of
20352 \begin_inset Quotes eld
20360 \begin_inset Quotes erd
20366 \begin_layout Enumerate
20369 You ought to remove spaces in front of punctuation.
20372 \begin_layout Enumerate
20375 Could not execute LaTeX command.
20378 \begin_layout Enumerate
20387 in front of small punctuation.
20390 \begin_layout Enumerate
20398 may look prettier here.
20401 \begin_layout Enumerate
20405 Multiple spaces detected in output.
20408 \begin_layout Enumerate
20411 This text may be ignored.
20414 \begin_layout Enumerate
20420 \begin_inset Quotes eld
20425 to begin quotation, not
20432 \begin_layout Enumerate
20439 to end quotation, not
20442 \begin_inset Quotes eld
20450 \begin_layout Enumerate
20456 \begin_layout Enumerate
20459 You should perhaps use
20460 \begin_inset Quotes eld
20468 \begin_inset Quotes erd
20474 \begin_layout Enumerate
20477 You should put a space in front of/after parenthesis.
20480 \begin_layout Enumerate
20483 You should avoid spaces in front of/after parenthesis.
20486 \begin_layout Enumerate
20490 You should not use punctuation in front of/after quotes.
20493 \begin_layout Enumerate
20496 Double space found.
20499 \begin_layout Enumerate
20502 You should put punctuation outside inner/inside display math mode.
20505 \begin_layout Enumerate
20508 You ought to not use primitive TeX in LaTeX code.
20511 \begin_layout Enumerate
20514 You should remove spaces in front of
20515 \begin_inset Quotes eld
20523 \begin_inset Quotes erd
20529 \begin_layout Enumerate
20532 \begin_inset Quotes eld
20540 \begin_inset Quotes erd
20543 is normally not followed by
20544 \begin_inset Quotes eld
20552 \begin_inset Quotes erd
20558 \begin_layout Standard
20559 In later versions of LyX, we hope to provide a more complete interface to
20560 this tool (and it's smaller cousin
20564 ) to exploit the full power of it.
20565 But it's not exactly useless as it is now: go try it on one of your existing
20566 documents of a certain length and be surprised.
20569 \begin_layout Section
20570 Version Control in LyX
20573 \begin_layout Standard
20576 Lars Gullik Bjønnes
20579 \begin_layout Subsection
20583 \begin_layout Standard
20584 A friend of mine wanted to try LyX for a group project.
20585 When he didn't find support for version control or file locking, he dropped
20587 This angered me a bit, so I thought that I should at least make support
20588 for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
20589 This has now been done.
20590 LyX now supports some of the most basic RCS commands.
20591 If you need to something a bit more sophisticated you will have to do that
20592 manually in an xterm.
20595 \begin_layout Standard
20596 Before you begin to use the version control features in LyX, you should
20598 \begin_inset Quotes eld
20602 \begin_inset Quotes erd
20605 (a man file, read it with
20610 This file describes all the basic features of RCS.
20611 You should especially notice the comment about a RCS directory, and the
20612 notion of a master RCS file (the file ending in
20619 \begin_layout Standard
20620 The implementation in LyX assumes a recent version of the GNU RCS package---no
20621 guarantees are made for older versions.
20624 \begin_layout Subsection
20625 RCS commands in LyX
20628 \begin_layout Standard
20629 The following sections describe the RCS commands supported by LyX.
20630 You can find them in the
20635 ile\SpecialChar \menuseparator
20640 ersion\InsetSpace ~
20646 \begin_layout Subsubsection
20652 \begin_layout Standard
20653 If your document is not under revision control, this is the only item shown
20655 And if it is under revision control, the
20662 item is grayed out.
20666 \begin_layout Standard
20667 This command registers your document with RCS\SpecialChar \@.
20668 You are asked interactively
20669 to supply an initial description of the document.
20670 The document is now set in Read-Only mode and you have to
20677 , before making any changes to it.
20678 A document under revision control has a
20679 \begin_inset Quotes eld
20682 [RCS:<version> <locker>]
20683 \begin_inset Quotes erd
20686 item tagged to the filename in the minibuffer.
20689 \begin_layout Standard
20690 RCS command that is run:
20692 ci -q -u -i -t-"<initial description>" <file-name>
20695 \begin_layout Standard
20700 to understand the switches.
20704 \begin_layout Subsubsection
20710 \begin_layout Standard
20711 When you are finished editing a file, you check in your changes.
20712 When you do this, you are asked for a description of the changes.
20713 This is stored in the history log.
20714 The version number is bumped, your changes are applied to the master RCS
20715 file, the document is unlocked and set to Read-Only mode.
20719 \begin_layout Standard
20722 ci -q -u -m"<description>" <file-name>
20725 \begin_layout Subsubsection
20731 \begin_layout Standard
20732 By doing this you lock the document so that only you can edit it.
20733 This will also make the document Read-Write only for you.
20734 You will usually continue editing for a while and when you are finished
20735 you check in your changes.
20736 The status line is changed to reflect that you have locked the file.
20740 \begin_layout Standard
20743 co -q -l <file-name>
20746 \begin_layout Subsubsection
20749 Revert To Last Version
20752 \begin_layout Standard
20753 This will discard all changes made to the document since the last check
20755 You get a warning before changes are discarded.
20758 \begin_layout Standard
20761 co -f -u<version> <file-name>
20764 \begin_layout Subsubsection
20770 \begin_layout Standard
20771 This makes as if the last check in never happened.
20772 No changes are made to the document loaded into LyX, but the last version
20773 is removed from the master RCS file.
20777 \begin_layout Standard
20780 rcs -o<version> <file-name>
20783 \begin_layout Subsubsection
20789 \begin_layout Standard
20790 This show the complete history of the RCS document.
20795 is shown in a browser.
20803 \begin_layout Section
20804 Literate Programming
20807 \begin_layout Standard
20812 (kayvan@sylvan.com)
20816 original documentation written by
20818 Edmar Wienskoski Jr.
20821 (edmar-w-jr@technologist.com)
20824 \begin_layout Subsection
20828 \begin_layout Standard
20829 The main purpose of this documentation is to show you how to use LyX for
20830 literate programming.
20831 Where it is assumed that you are familiar with this programming technique,
20833 \begin_inset Quotes eld
20837 \begin_inset Quotes erd
20841 \begin_inset Quotes eld
20845 \begin_inset Quotes erd
20849 If that is not the case, please follow the web links provided in the following
20851 There is a lot of good documentation out there covering old development
20852 history to the latest tools tips.
20855 \begin_layout Standard
20856 It is also assumed that you are familiar with LyX itself to a point that
20857 you are comfortable changing your LyX preferences, and X resources file.
20858 If that is not the case please refer to other LyX documentation to cover
20859 your specific needs.
20862 \begin_layout Subsection
20863 Literate Programming
20866 \begin_layout Standard
20867 From the Literate Programming FAQ:
20870 \begin_layout Quotation
20871 Literate programming is the combination of documentation and source together
20872 in a fashion suited for reading by human beings.
20873 In fact, literate programs should be enjoyable reading, even inviting!
20874 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
20875 and documentation in a single file.
20876 Literate programming tools then parse the file to produce either readable
20877 documentation or compilable source.
20878 The WEB style of literate programming was created by D.E.
20879 Knuth during the development of his TeX typesetting software.
20883 \begin_layout Standard
20884 Another excerpt says:
20887 \begin_layout Quotation
20890 How is literate programming different from verbose commenting?
20893 \begin_layout Quotation
20894 There are three distinguishing characteristics.
20895 In order of importance, they are:
20899 \begin_layout Itemize
20900 flexible order of elaboration
20903 \begin_layout Itemize
20904 automatic support for browsing
20907 \begin_layout Itemize
20908 typeset documentation, especially diagrams and mathematics
20912 \begin_layout Standard
20913 Now that I sparked your curiosity, take a look in the references.
20916 \begin_layout Subsubsection
20920 \begin_layout Standard
20921 The complete Literate Programming FAQ can be found at:
20924 \begin_layout Quote
20925 \begin_inset LatexCommand \url[Literate Programming FAQ]{http://shelob.ce.ttu.edu/daves/lpfaq/faq.html}
20932 \begin_layout Standard
20933 The FAQ lists 23 (twenty three!) different literate programming tools.
20934 Where some are specialized or
20935 \begin_inset Quotes eld
20939 \begin_inset Quotes erd
20942 for particular programming languages, while other have general scope.
20947 for my own use for several reasons:
20950 \begin_layout Itemize
20951 It can generate the documentation either in latex or html.
20954 \begin_layout Itemize
20955 It has a open architecture, i.e., it is easy to plug in new filters and to
20956 perform special processing that you may need.
20960 \begin_layout Itemize
20961 There is a good selection of filters available already (the html is one
20965 \begin_layout Itemize
20969 \begin_layout Standard
20970 The Noweb web page can be found at:
20973 \begin_layout Quote
20974 \begin_inset LatexCommand \url[Noweb home page]{http://www.cs.virginia.edu/~nr/noweb/}
20981 \begin_layout Standard
20982 Starting from there you can reach many other interesting links and even
20983 some literate program examples.
20986 \begin_layout Subsection
20987 LyX and Literate Programming
20990 \begin_layout Standard
20991 The LyX support for Literate Programming is provided by using the generic
20992 LyX convertors mechanism.
20993 This support is provided in a
20994 \begin_inset Quotes eld
20998 \begin_inset Quotes erd
21001 way, i.e., you will be able to use this new LyX feature with some other literate
21002 programming tool of your choice by just changing your LyX preferences.
21005 \begin_layout Subsubsection
21006 Generating documents and code (weaving and tangling)
21009 \begin_layout Paragraph
21010 Selecting the document class
21013 \begin_layout Standard
21014 If you have installed Noweb and LyX successfully, whenever you open a new
21015 document or try to change the document class of an existing one, you will
21016 find that there are three new document classes available:
21019 \begin_layout Itemize
21023 \begin_layout Itemize
21027 \begin_layout Itemize
21031 \begin_layout Standard
21032 You must select one of them to create your literate documents from.
21036 \begin_layout Standard
21037 Note that literate documents are not limited to these three classes.
21038 New classes can be generated from other styles like letter or in combination
21039 with other class variations like Article (AMS).
21040 If you have special needs that cannot be covered by one of the existing
21041 classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21042 will arrange to insert a new entry, or teach you how to do it.
21046 \begin_layout Standard
21047 It is very simple, it involves the creation of a file with four lines, and
21048 re-running of the auto configuration.
21053 Moreover, if you use a literate tool other than Noweb you may need to create
21054 a new set of document classes for it.
21057 \begin_layout Paragraph
21061 \begin_layout Standard
21062 LyX enables you to write code with a layout named
21070 \begin_layout Standard
21071 The equivalent Noweb term is
21072 \begin_inset Quotes eld
21076 \begin_inset Quotes erd
21080 For historical reasons, I got used to the term
21081 \begin_inset Quotes eld
21085 \begin_inset Quotes erd
21088 introduced by other literate tool named Nuweb, which I used for many years
21089 before rendering myself to Noweb.
21094 Noweb delimits scraps like this:
21097 \begin_layout LyX-Code
21101 \begin_layout LyX-Code
21105 \begin_layout LyX-Code
21109 \begin_layout LyX-Code
21113 \begin_layout LyX-Code
21117 \begin_layout Standard
21118 The problem is that whatever is written in between the << and the
21122 must be taken literally, i.e., LyX should be prevented from making any special
21123 interpretation of what has been written.
21124 This is handled by a special layout named Scrap, that works like a normal
21125 paragraph but has a free spacing capability.
21128 \begin_layout Standard
21129 The down side of the Scrap paragraph layout is that consecutive paragraphs
21130 of code will be spaced with one empty line in the source code and also
21131 in the printed documentation.
21132 The work around is to enter each line of code within a single Scrap, with
21133 a newline (ctrl-return).
21134 The example above will look like this:
21138 \begin_layout Standard
21139 If you have a printed version of this document you will not see any difference
21140 between the previous example and this one.
21148 \begin_layout LyX-Code
21160 \begin_layout Standard
21161 This layout works fine.
21162 The only real inconvenience is that you have to type ctrl-return instead
21167 \begin_layout Standard
21168 It is in my list of
21169 \begin_inset Quotes eld
21173 \begin_inset Quotes erd
21184 \begin_layout Standard
21185 As a special note, you can also use the
21186 \begin_inset Quotes eld
21190 \begin_inset Quotes erd
21193 construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21197 \begin_layout LyX-Code
21200 def some_function(args):
21202 "This is the doc string for this
21205 print "My args: ", args
21208 \begin_layout LyX-Code
21209 @ %def some_function
21212 \begin_layout Standard
21213 For an example of this usage and the resulting cross-reference output, look
21214 at the Literate python program in
21216 LIBDIR/examples/listerrors.lyx
21218 which should make this all clear.
21221 \begin_layout Paragraph
21222 Generating the documentation
21225 \begin_layout Standard
21226 At this point you already have a new document file with a proper document
21227 class, and with some code and text on it.
21228 How do I print it? The answer is simple, you select
21233 iew\SpecialChar \menuseparator
21241 Just like you would do for a plain document.
21242 No special procedure is required.
21245 \begin_layout Standard
21246 To help orientate you, I will now explain what happens inside LyX:
21249 \begin_layout Enumerate
21255 pdate\SpecialChar \menuseparator
21262 menu option is chosen, a latex file is generated.
21267 \begin_layout Standard
21268 If the document is of any literate class the generated file will be named
21269 with an extension name defined by the
21270 \begin_inset Quotes eld
21274 \begin_inset Quotes erd
21277 format (defined in the Preferences panel), otherwise the file will have
21286 \begin_layout Enumerate
21287 Note that the only difference so far is in the name of the file, no special
21288 processing is required by LyX.
21289 Given that you formatted the code using the Scrap layout that, by itself,
21290 takes care of the business.
21293 \begin_layout Enumerate
21294 If the document is of any literate class LyX will then use the internal
21295 LyX to Noweb converter, followed by the Noweb to LaTeX converter
21299 \begin_layout Standard
21300 The converters are defined in the
21305 ools\SpecialChar \menuseparator
21313 \begin_inset Quotes eld
21317 \begin_inset Quotes erd
21325 to generate the LaTeX file.
21329 \begin_layout Standard
21330 Otherwise it will just skip this step.
21334 \begin_layout Enumerate
21335 Finally, LaTeX is invoked and the regular post processing continues as in
21339 \begin_layout Standard
21340 Independence from a particular
21341 \begin_inset Quotes eld
21345 \begin_inset Quotes erd
21348 is easily achieved by changing the commands that are run by the various
21352 \begin_layout Paragraph
21353 Generating the code
21356 \begin_layout Standard
21357 When the build menu option is chosen or the corresponding button in the
21358 toolbar is pressed, a latex file is generated just like step 1 above.
21359 Next, LyX invokes the
21364 Typically, this converter (like any other converter), has two parts:
21367 \begin_layout Enumerate
21368 The converter program itself.
21369 This program performs the conversion from the one format to the other (in
21370 this case, from the Noweb format to the Program pseudo-format).
21373 \begin_layout Enumerate
21374 The error log parser.
21375 This is a program whose sole purpose is to rewrite error messages in a
21376 format that LyX understands.
21377 This makes it possible for LyX to place error boxes in the right places
21378 in the file buffer.
21381 \begin_layout Standard
21382 The first part, the
21383 \begin_inset Quotes eld
21387 \begin_inset Quotes erd
21390 setting, should be set to
21391 \begin_inset Quotes eld
21399 \begin_inset Quotes erd
21403 This basically means that LyX will call
21404 \begin_inset Quotes eld
21408 \begin_inset Quotes erd
21411 (a program or script) with the name of the Noweb file (generally a file
21412 in the LyX temp directory).
21416 \begin_layout Standard
21417 This is an implementation of
21418 \begin_inset Quotes eld
21422 \begin_inset Quotes erd
21425 that you can place in a directory on your path:
21428 \begin_layout LyX-Code
21432 \begin_layout LyX-Code
21436 \begin_layout LyX-Code
21437 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
21440 \begin_layout Standard
21441 The next part of the converter setting is the
21442 \begin_inset Quotes eld
21446 \begin_inset Quotes erd
21449 which is to be set to
21450 \begin_inset Quotes eld
21455 originaldir,parselog=listerrors
21458 \begin_inset Quotes erd
21462 This will run any errors that are generated by the
21463 \begin_inset Quotes eld
21467 \begin_inset Quotes erd
21470 process through the
21471 \begin_inset Quotes eld
21475 \begin_inset Quotes erd
21481 \begin_layout Standard
21482 The converter code looks in
21490 then on the path for the
21491 \begin_inset Quotes eld
21495 \begin_inset Quotes erd
21501 \begin_layout Paragraph
21502 Build instructions in the document
21505 \begin_layout Standard
21506 The last piece of the integration between LyX and noweb is the
21507 \begin_inset Quotes eld
21511 \begin_inset Quotes erd
21515 Generally, the instructions for building your program should be embedded
21516 in a scrap of its own.
21518 \begin_inset Quotes eld
21522 \begin_inset Quotes erd
21525 above uses the notangle command to look for this scrap (called
21526 \begin_inset Quotes eld
21530 \begin_inset Quotes erd
21533 ) and runs its contents through
21534 \begin_inset Quotes eld
21538 \begin_inset Quotes erd
21544 \begin_layout Standard
21545 Typically, such a scrap would look something like this:
21548 \begin_layout LyX-Code
21555 if [ -z "${NOWEB_SOURCE}" ]
21559 NOWEB_SOURCE=myfile.nw
21565 code to extract files ...]
21568 code to compile files ...]
21573 \begin_layout Standard
21576 LIBDIR/examples/listerrors.lyx
21580 LIBDIR/examples/Literate.lyx
21582 which implement two versions of the
21583 \begin_inset Quotes eld
21587 \begin_inset Quotes erd
21590 program for some illustrations of how all of these pieces go together or
21593 LIBDIR/examples/noweb2lyx.lyx.
21596 Interestingly, these three files show off the language-indepence of the
21597 LyX literate programming support since they are written in Python, C and
21601 \begin_layout Subsubsection
21605 \begin_layout Standard
21606 All the Literate Programming support is configured by the
21611 ools\SpecialChar \menuseparator
21619 \begin_inset Quotes eld
21623 \begin_inset Quotes erd
21627 The important parts are:
21630 \begin_layout Description
21633 \begin_inset Quotes eld
21637 \begin_inset Quotes erd
21641 format Set up via the Formats tab, this is where the Noweb-specific pieces
21651 , the file extension is set to
21656 This tells LyX to create a file with a
21660 extension in the first step of the conversion process.
21663 \begin_layout Description
21670 format This is an empty format whose sole purpose is to be the endpoint
21671 of a conversion (which then allows us to set up a converter for it).
21674 \begin_layout Description
21683 This converter performs the
21684 \begin_inset Quotes eld
21688 \begin_inset Quotes erd
21691 of the literate document.
21692 For Noweb, it is set to
21693 \begin_inset Quotes eld
21698 noweave -delay -index $$i > $$o
21701 \begin_inset Quotes erd
21707 \begin_layout Description
21717 \begin_inset Quotes eld
21721 \begin_inset Quotes erd
21725 As stated above, the Converter is set to
21726 \begin_inset Quotes eld
21734 \begin_inset Quotes erd
21737 , with Flags set to
21738 \begin_inset Quotes eld
21743 originaldir,parselog=listerrors
21746 \begin_inset Quotes erd
21752 \begin_layout Subsubsection
21756 \begin_layout Standard
21757 There is also a new function implemented in the LyX server, the
21758 \begin_inset Quotes eld
21761 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
21765 \begin_layout Standard
21766 When debugging code with ddd/gdb, it is possible to invoke a text editor
21767 at the current execution position with a single key stroke.
21768 The default ddd configuration for that is shift-ctrl-V.
21769 It happens that you can define the editor command line invocation in ddd
21776 dit\SpecialChar \menuseparator
21781 references\SpecialChar \menuseparator
21788 dialog and changing the "Edit Sources" entry.
21791 \begin_layout Standard
21792 I take advantage of the new created LyX server function and this ddd feature,
21794 \begin_inset Quotes eld
21798 \begin_inset Quotes erd
21804 \begin_layout LyX-Code
21805 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
21808 \begin_layout Standard
21809 With this, whenever you are using ddd and find a point in the program that
21810 you want to edit, you just press shift-ctrl-V (in the ddd window), and
21811 ddd you forward this information to LyX through the LyX server and then
21812 the LyX window will show the same file with the cursor at the same position
21813 ddd was pointing to.
21814 No more guessing or long scrolling to locate a point in the program back
21818 \begin_layout Standard
21819 Note however that you must enable the LyX server to get this feature working
21820 (it is disabled by default).
21821 You can enable it in
21833 ) by entering in the
21838 \begin_inset Quotes eld
21843 /home/<your-home-directory>/.lyx/lyxpipe
21846 \begin_inset Quotes erd
21852 \begin_layout Standard
21853 Read the LyX server documentation in the
21855 Customization Manual
21857 for further information.
21860 \begin_layout Subsubsection
21864 \begin_layout Standard
21865 There are six new buttons that can be added to your LyX toolbar.
21866 Five of these buttons are short cuts to layout styles:
21887 The last one is a short cut to the
21888 \begin_inset Quotes eld
21892 \begin_inset Quotes erd
21899 \begin_layout Standard
21900 LyX has a range of buttons that are available for tool bar customization.
21901 In my toolbar I like to combine the six short cuts above with two more:
21909 \SpecialChar \menuseparator
21917 \SpecialChar \menuseparator
21930 iew\SpecialChar \menuseparator
21938 Here is how it looks like:
21941 \begin_layout LyX-Code
21945 \begin_layout LyX-Code
21949 \begin_layout LyX-Code
21950 Icon "layout Standard"
21953 \begin_layout LyX-Code
21954 Icon "layout Section"
21957 \begin_layout LyX-Code
21958 Icon "layout LaTeX"
21961 \begin_layout LyX-Code
21962 Icon "layout LyX-Code"
21965 \begin_layout LyX-Code
21966 Icon "layout Scrap"
21969 \begin_layout LyX-Code
21973 \begin_layout LyX-Code
21977 \begin_layout LyX-Code
21978 Icon "buffer-typeset"
21981 \begin_layout LyX-Code
21982 Icon "build-program"
21985 \begin_layout LyX-Code
21989 \begin_layout LyX-Code
21993 \begin_layout LyX-Code
21997 \begin_layout LyX-Code
22001 \begin_layout LyX-Code
22005 \begin_layout Subsubsection
22006 Colors customization
22009 \begin_layout Standard
22010 There are a number of colors in LyX that can be customized in
22015 One of the things that bothers people is the LaTeX font color.
22016 The default color is red, since the scraps uses LaTeX font, and there is
22017 a lot of scraps in literate documents, you may get tired of seeing everything
22019 You can change it by going to the tabs
22028 \begin_layout Standard
22029 The next thing is the visible presence of the newline character in the screen.
22030 You can choose the color of this particular character and make it blend
22032 I recommend you choosing a color that is close to the background but not
22033 equal, that way you still can see it is there, but it is not bothering
22038 \begin_layout Chapter
22039 Secrets of the LaTeX Masters
22040 \begin_inset LatexCommand \label{cha:secrets}
22047 \begin_layout Standard
22048 Though LyX is a powerful tool, it cannot hope to support everything that
22049 can be done with pure TeX/LaTeX.
22050 However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
22051 as long as you are not afraid to use that
22052 \begin_inset Quotes eld
22056 \begin_inset Quotes erd
22059 button on the toolbar or add things to the LaTeX preamble.
22060 This section lists some tips, tricks, and otherwise cool ideas to give
22061 your document that extra little flair.
22064 Do try this at home
22066 , just start with something a little smaller and less important than your
22070 \begin_layout Standard
22071 Most ideas in this section require less common files in your LaTeX installation.
22072 If you have a system like teTeX, most will already be available.
22073 A few, however, will need to be downloaded from one of the CTAN archives.
22074 Often, there are several ways to do something, or several LaTeX style files
22075 which do the same thing.
22076 We do not endorse one choice over another, we simply claim that we have
22077 done a particular task with a particular file.
22078 Put on your wizard hat, keep an eye out for dragons, and let us begin.
22081 \begin_layout Section
22082 Tricks for Footnotes and Margin Notes
22085 \begin_layout Standard
22091 \begin_layout Subsection
22095 \begin_layout Standard
22096 LyX cannot yet take care of setting the footnote numbering back to 1 after
22097 each section in the
22098 \begin_inset Quotes eld
22106 \begin_inset Quotes erd
22111 document class or changing the counter style.
22112 You'll need to insert LaTeX commands like the following to achieve that:
22115 \begin_layout Standard
22119 \begin_layout Standard
22123 setcounter{footnote}{0}
22132 setcounter{footnote}{0}
22134 will set the counter back to 1
22138 \begin_layout Standard
22139 The counter has been set back to 1.
22147 \begin_layout Standard
22148 The following command will change the numbering to small letters.
22149 Take a look at the next footnote in your xdvi or ghostview
22153 \begin_layout Standard
22170 \begin_layout Standard
22171 This is an example for a footnote with alphabetic numbering.
22191 \begin_layout Standard
22192 The next command sets the counter style back to default, i.e.
22203 \begin_layout Standard
22214 to set the counter--style back to LyX's default, i.e.
22223 \begin_layout Standard
22244 \begin_layout Standard
22275 and others as counter styles.
22276 Just replace the LaTeX command in the above example and rerun TeX to see
22277 what those styles can do.
22281 \begin_layout Subsection
22285 \begin_layout Standard
22286 Here are two examples of neat things you can do to margin notes using LaTeX
22290 \begin_layout Standard
22291 The following command will make a vertical line appear alongside your text---gre
22293 \begin_inset Quotes eld
22297 \begin_inset Quotes erd
22306 rule[-10mm]{30mm}{5mm}}
22314 \begin_layout Standard
22320 rule[-10mm]{30mm}{5mm}}
22328 \begin_layout Standard
22329 Check your dvi- or ghostview-output to see what the
22335 command does to the following margin note.
22338 \begin_layout Standard
22342 \begin_layout Standard
22352 \begin_inset Marginal
22355 \begin_layout Standard
22366 \begin_layout Section
22370 \begin_layout Standard
22373 Lars Gullik Bjønnes
22376 \begin_layout Subsection
22380 \begin_layout Standard
22381 The aim for this chapter
22385 \begin_layout Standard
22386 Editor's note: Lars' original chapter was a masterful description of how
22392 However, it was too long to flow smoothly in this document.
22393 I have therefore chosen to excerpt the most important sections here (sorry,
22394 Lars); you can read the original chapter (and more of the story!) in the
22397 examples/multicol.lyx
22405 is to show how the LaTeX package
22409 can be used in a LyX document.
22410 As LyX doesn't support the
22414 package natively yet, we have to use some small hacks.
22415 By reading this section it should be obvious how to do this.
22418 \begin_layout Subsection
22422 \begin_layout Standard
22427 package allows switching between one and multicolumn format on the same
22429 Footnotes are handled correctly (for the most part), but will be placed
22430 at the bottom of the page and not under each column.
22431 LaTeX's float mechanism, however, is partly disabled in the current implementat
22433 At the moment only page-wide floats can be used within the scope of the
22437 \begin_layout Subsection
22441 \begin_layout Subsubsection
22445 \begin_layout Standard
22446 If you want to have two columns in your text, you have use LaTeX mode to
22451 begin{multicols}{2}
22453 at the point where you want the two column layout to start, and then
22459 where you want it to end.
22463 \begin_layout Standard
22467 \begin_layout Standard
22471 begin{multicols}{2}
22479 \begin_layout Standard
22484 The Adventure of the Empty House
22490 Sir Arthur Conan Doyle
22493 \begin_layout Standard
22496 It was in the spring of the year 1894 that all London was interested, and
22497 the fashionable world dismayed, by the murder of the Honourable Ronald
22498 Adair under most unusual and inexplicable circumstances.
22499 The public has already learned those particulars of the crime which came
22500 out in the police investigation, but a good deal was suppressed upon that
22501 occasion, since the case for the prosecution was so overwhelmingly strong
22502 that it was not necessary to bring forward all the facts.
22503 Only now, at the end of nearly ten years, am I allowed to supply those
22504 missing links which make up the whole of that remarkable chain.
22505 The crime was of interest in itself, but that interest was as nothing to
22506 me compared to the inconceivable sequel, which afforded me the greatest
22507 shock and surprise of any event in my adventurous life.
22508 Even now, after this long interval, I find myself thrilling as I think
22509 of it, and feeling once more that sudden flood of joy, amazement, and increduli
22510 ty which utterly submerged my mind.
22511 Let me say to that public, which has shown some interest in those glimpses
22512 which I have occasionally given them of the thoughts and actions of a very
22513 remarkable man, that they are not to blame me if I have not shared my knowledge
22514 with them, for I should have considered it my first duty to do so, had
22515 I not been barred by a positive prohibition from his own lips, which was
22516 only withdrawn upon the third of last month.
22519 \begin_layout Standard
22523 \begin_layout Standard
22535 \begin_layout Subsubsection
22539 \begin_layout Standard
22540 The same pattern is used when you want more than two columns:
22543 \begin_layout Standard
22547 \begin_layout Standard
22551 begin{multicols}{3}
22559 \begin_layout Standard
22562 It can be imagined that my close intimacy with Sherlock Holmes had interested
22563 me deeply in crime, and that after his disappearance I never failed to
22564 read with care the various problems which came before the public.
22565 And I even attempted, more than once, for my own private satisfaction,
22566 to employ his methods in their solution, though with indifferent success.
22567 There was none, however, which appealed to me like this tragedy of Ronald
22569 As I read the evidence at the inquest, which led up to a verdict of willful
22570 murder against some person or persons unknown, I realized more clearly
22571 than I had ever done the loss which the community had sustained by the
22572 death of Sherlock Holmes.
22573 There were points about this strange business which would, I was sure,
22574 have specially appealed to him, and the efforts of the police would have
22575 been supplemented, or more probably anticipated, by the trained observation
22576 and the alert mind of the first criminal agent in Europe.
22577 All day, as I drove upon my round, I turned over the case in my mind and
22578 found no explanation which appeared to me to be adequate.
22579 At the risk of telling a twice-told tale, I will recapitulate the facts
22580 as they were known to the public at the conclusion of the inquest.
22583 \begin_layout Standard
22587 \begin_layout Standard
22599 \begin_layout Standard
22600 You can have have more than 3 columns if you want to, but that might not
22601 be very pleasant for the eye.
22604 \begin_layout Subsubsection
22605 Columns inside columns
22608 \begin_layout Standard
22609 You can even have columns inside columns:
22612 \begin_layout Standard
22616 \begin_layout Standard
22620 begin{multicols}{2}
22628 \begin_layout Standard
22631 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22632 at that time governor of one of the Australian colonies.
22633 Adair's mother had returned from Australia to undergo the operation for
22634 cataract, and she, her son Ronald, and her daughter Hilda were living together
22638 \begin_layout Standard
22642 \begin_layout Standard
22646 begin{multicols}{2}
22654 \begin_layout Standard
22657 The youth moved in the best society--had, so far as was known, no enemies
22658 and no particular vices.
22659 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22660 had been broken off by mutual consent some months before, and there was
22661 no sign that it had left any very profound feeling behind it.
22662 For the rest {sic} the man's life moved in a narrow and conventional circle,
22663 for his habits were quiet and his nature unemotional.
22664 Yet it was upon this easy-going young aristocrat that death came, in most
22665 strange and unexpected form, between the hours of ten and eleven-twenty
22666 on the night of March 30, 1894.
22669 \begin_layout Standard
22673 \begin_layout Standard
22685 \begin_layout Standard
22688 Ronald Adair was fond of cards--playing continually, but never for such
22689 stakes as would hurt him.
22690 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22691 It was shown that, after dinner on the day of his death, he had played
22692 a rubber of whist at the latter club.
22693 He had also played there in the afternoon.
22698 The evidence of those who had played with him-- Mr.
22699 Murray, Sir John Hardy, and Colonel Moran--showed that the game was whist,
22700 and that there was a fairly equal fall of the cards.
22701 Adair might have lost five pounds, but not more.
22702 His fortune was a considerable one, and such a loss could not in any way
22704 He had played nearly every day at one club or other, but he was a cautious
22705 player, and usually rose a winner.
22706 It came out in evidence that, in partnership with Colonel Moran, he had
22707 actually won as much as four hundred and twenty pounds in a sitting, some
22708 weeks before, from Godfrey Milner and Lord Balmoral.
22709 So much for his recent history as it came out at the inquest.
22712 \begin_layout Standard
22716 \begin_layout Standard
22728 \begin_layout Standard
22729 Please do read the file
22731 examples/multicol.lyx
22733 for more advanced examples including column and header spacing, vertical
22734 separator lines, and more.
22737 \begin_layout Section
22742 Paragraph Environment
22743 \begin_inset OptArg
22746 \begin_layout Standard
22747 Numbering in Enumerate
22755 \begin_layout Standard
22761 \begin_layout Standard
22762 \begin_inset VSpace bigskip
22768 \begin_layout Standard
22770 The default numbering for the
22774 paragraph environment begins with Arabic numbers and ends with uppercase
22776 Suppose, however, you wanted a different type of numbering scheme.
22777 Here's a quickie example of how to change the numbering scheme:
22780 \begin_layout LyX-Code
22790 \begin_layout LyX-Code
22800 \begin_layout LyX-Code
22810 \begin_layout LyX-Code
22820 \begin_layout Standard
22821 \SpecialChar \ldots{}
22822 which changes the numbering scheme to uppercase Roman numerals, uppercase
22823 letters, Arabic numbers, and lowercase letter.
22826 \begin_layout Standard
22827 Additionally, the previous example also adds a little bit extra to the numbering
22829 For example, the first level label actually looks like:
22830 \begin_inset Quotes eld
22834 \begin_inset Quotes erd
22838 For ease of reading, we'll describe what the numbering schemes look like
22839 using a notation something like this: <
22840 \begin_inset Quotes eld
22844 \begin_inset Quotes erd
22849 \begin_inset Quotes erd
22853 \begin_inset Quotes erd
22858 \begin_inset Quotes erd
22862 \begin_inset Quotes erd
22867 \begin_inset Quotes eld
22871 \begin_inset Quotes erd
22878 \begin_layout Standard
22879 As you can see in the example, there is a label command for each nesting
22886 \SpecialChar \ldots{}
22893 , as well as a counter,
22897 \SpecialChar \ldots{}
22903 There are also five
22904 \begin_inset Quotes eld
22908 \begin_inset Quotes erd
22941 , each of which take one counter as an argument.
22942 You can add characters before or after these, but there's no need to add
22946 \begin_layout Standard
22947 You can get really fancy with these.
22951 \begin_layout LyX-Code
22965 \begin_layout LyX-Code
22977 \begin_layout LyX-Code
22987 \begin_layout LyX-Code
22997 \begin_layout Standard
22998 produces the somewhat out of hand numbering scheme: <
22999 \begin_inset Quotes eld
23003 \begin_inset Quotes erd
23008 \begin_inset Quotes erd
23012 \begin_inset Quotes erd
23017 \begin_inset Quotes erd
23021 \begin_inset Quotes erd
23026 \begin_inset Quotes eld
23030 \begin_inset Quotes erd
23037 \begin_layout Section
23038 Extra Space Between Table Rows
23041 \begin_layout Standard
23047 \begin_layout Standard
23048 \begin_inset VSpace bigskip
23054 \begin_layout Standard
23056 LaTeX allows you to put a bit of extra space between rows in a table by
23057 giving an optional argument to the end-of-row specifier (
23066 LyX has not yet implemented this in a formal way, so here are two dirty
23067 little tricks to do the same job.
23071 \begin_layout Standard
23072 The first is the more formal, but longwinded way to do it.
23073 In the LaTeX preamble, add the following command definition:
23076 \begin_layout Standard
23083 extratablespace}[1]{
23087 This command takes a single argument---the amount of space you would like
23089 Insert the command in the first column of the row
23093 where you would like the space to appear.
23094 Here is an example (I've removed all the borders using
23099 ayout\SpecialChar \menuseparator
23108 \begin_layout Standard
23110 \begin_inset Tabular
23111 <lyxtabular version="3" rows="4" columns="3">
23113 <column alignment="center" valignment="top" width="0pt">
23114 <column alignment="center" valignment="top" width="0pt">
23115 <column alignment="center" valignment="top" width="0pt">
23117 <cell alignment="center" valignment="top" topline="true" usebox="none">
23120 \begin_layout Standard
23135 <cell alignment="center" valignment="top" topline="true" usebox="none">
23138 \begin_layout Standard
23153 <cell alignment="center" valignment="top" topline="true" usebox="none">
23156 \begin_layout Standard
23173 <cell alignment="center" valignment="top" topline="true" usebox="none">
23176 \begin_layout Standard
23182 <cell alignment="center" valignment="top" topline="true" usebox="none">
23185 \begin_layout Standard
23200 <cell alignment="center" valignment="top" topline="true" usebox="none">
23203 \begin_layout Standard
23220 <cell alignment="center" valignment="top" topline="true" usebox="none">
23223 \begin_layout Standard
23236 \begin_layout Standard
23240 extratablespace{2ex}
23250 <cell alignment="center" valignment="top" topline="true" usebox="none">
23253 \begin_layout Standard
23268 <cell alignment="center" valignment="top" topline="true" usebox="none">
23271 \begin_layout Standard
23288 <cell alignment="center" valignment="top" topline="true" usebox="none">
23291 \begin_layout Standard
23297 <cell alignment="center" valignment="top" topline="true" usebox="none">
23300 \begin_layout Standard
23315 <cell alignment="center" valignment="top" topline="true" usebox="none">
23318 \begin_layout Standard
23341 \begin_layout Standard
23342 The second method is faster, but will make typographers and TeXperts all
23343 over the world groan.
23344 Simply put an end of row specifier with optional argument at the same spot.
23345 No fancy definitions are needed as in the above example, but there will
23346 be more space inserted than you specified because you essentially added
23347 a blank row plus the extra space.
23348 If the space added is too much, simply use a negative number, like so:
23351 \begin_layout Standard
23353 \begin_inset Tabular
23354 <lyxtabular version="3" rows="4" columns="3">
23356 <column alignment="center" valignment="top" width="0pt">
23357 <column alignment="center" valignment="top" width="0pt">
23358 <column alignment="center" valignment="top" width="0pt">
23360 <cell alignment="center" valignment="top" topline="true" usebox="none">
23363 \begin_layout Standard
23378 <cell alignment="center" valignment="top" topline="true" usebox="none">
23381 \begin_layout Standard
23396 <cell alignment="center" valignment="top" topline="true" usebox="none">
23399 \begin_layout Standard
23416 <cell alignment="center" valignment="top" topline="true" usebox="none">
23419 \begin_layout Standard
23425 <cell alignment="center" valignment="top" topline="true" usebox="none">
23428 \begin_layout Standard
23443 <cell alignment="center" valignment="top" topline="true" usebox="none">
23446 \begin_layout Standard
23463 <cell alignment="center" valignment="top" topline="true" usebox="none">
23466 \begin_layout Standard
23479 \begin_layout Standard
23495 <cell alignment="center" valignment="top" topline="true" usebox="none">
23498 \begin_layout Standard
23513 <cell alignment="center" valignment="top" topline="true" usebox="none">
23516 \begin_layout Standard
23533 <cell alignment="center" valignment="top" topline="true" usebox="none">
23536 \begin_layout Standard
23542 <cell alignment="center" valignment="top" topline="true" usebox="none">
23545 \begin_layout Standard
23560 <cell alignment="center" valignment="top" topline="true" usebox="none">
23563 \begin_layout Standard
23586 \begin_layout Standard
23587 It's short, sweet, and gets the job done quickly, even if it is really ugly.
23588 You may put away the rotten vegetables now! I promise I won't suggest anything
23592 \begin_layout Section
23596 \begin_layout Standard
23602 \begin_layout Standard
23603 \begin_inset VSpace bigskip
23609 \begin_layout Standard
23614 \begin_layout Standard
23620 tmpfont}{cmr17 scaled 2500}{
23632 \begin_layout Standard
23637 \begin_layout Standard
23648 hose of you who like the style of old books probably also like
23649 \begin_inset Quotes eld
23653 \begin_inset Quotes erd
23656 ---those large capital letters which begin each new chapter or section.
23657 Implementing them with plain LyX/LaTeX is straightforward (assuming you
23658 know some plain TeX!) but does require a lot of work and many iterations,
23659 as you can see by all the ugly TeX-mode stuff at the beginning of this
23663 \begin_layout Standard
23667 \begin_layout Standard
23673 bigdrop{-1em}{3}{ptmri}{T}+
23678 here is a much easier way of doing this, of course.
23687 ) package from CTAN allows a simple way to add such letters to your documents.
23688 Since this package is not a standard part of teTeX, I can't demonstrate
23689 it within this document, but if you copy this paragraph to a new document,
23691 \begin_inset Quotes eld
23701 \begin_inset Quotes erd
23704 and the pluses from the TeX code at the beginning of the paragraph, and
23709 usepackage{dropcaps}
23711 to your LaTeX preamble, you will get a nice Times Roman Italic
23712 \begin_inset Quotes eld
23716 \begin_inset Quotes erd
23719 , whose height is three lines of text and which protrudes 1 em into the
23721 (Make certain you have copied
23722 \begin_inset Quotes eld
23730 \begin_inset Quotes erd
23733 into a directory where TeX can see it.) The first argument is the amount
23734 of indentation; in this case the negative sign moves it into the margin.
23735 The second argument is the height of the letter in number of lines of text.
23736 The third argument is the font name: virtually anything which has a tfm
23737 file should work (wade through the
23739 .../texmf/fonts/tfm
23741 directory for possibilities).
23742 My personal favorite is
23743 \begin_inset Quotes eld
23751 \begin_inset Quotes erd
23754 , a fancy German font specifically designed for dropped capitals.
23755 The fourth argument is the letter (or letters) to be dropped.
23760 package also offers the
23766 command, as well as a slightly simplified
23775 \begin_layout Section
23776 Non-standard Paragraph Shapes
23779 \begin_layout Standard
23785 \begin_layout Standard
23786 \begin_inset VSpace bigskip
23792 \begin_layout Standard
23796 \begin_layout Standard
23808 \begin_layout Standard
23812 \begin_layout Standard
23821 \begin_layout Standard
23835 \begin_layout Standard
23840 \begin_layout Standard
23851 \begin_layout Standard
23860 \begin_layout Standard
23869 \begin_layout Standard
23878 \begin_layout Standard
23887 \begin_layout Standard
23896 \begin_layout Standard
23905 \begin_layout Standard
23914 \begin_layout Standard
23923 \begin_layout Standard
23932 \begin_layout Standard
23941 \begin_layout Standard
23950 \begin_layout Standard
23959 \begin_layout Standard
23968 \begin_layout Standard
23977 \begin_layout Standard
23986 \begin_layout Standard
23995 \begin_layout Standard
24004 \begin_layout Standard
24013 \begin_layout Standard
24019 There are times when the tyranny of rectangular paragraphs must be overthrown.
24020 In such situations, a call to the delightful plain TeX command
24027 As you can see, completely arbitrary shapes can be laid out with a suitable
24028 set of linelength definitions.
24029 While this parshape may look a bit silly and useless, one could conceive
24030 of situations such as finely tuned dropped capitals, word wrapping around
24031 non-rectangular graphics, etc.
24032 which will benefit from such handcrafting.
24035 \begin_layout Standard
24036 \begin_inset VSpace bigskip
24042 \begin_layout Standard
24047 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
24054 is the number of lines of text which define the paragraph.
24055 If there turn out to be fewer lines, the shape is truncated; if there are
24056 more, the excess lines have the same dimensions as the last line of the
24066 entries specify the indentation of the line from the left margin, and the
24067 length of the line as measured from that point.
24068 The shape applies only to the current paragraph; everything is reset to
24069 normal for the next paragraph.
24072 \begin_layout Standard
24076 \begin_layout Standard
24088 \begin_layout Section
24092 \begin_layout Standard
24093 As you can see, the examples in this section range from the useful to the
24095 While I don't expect that anyone will ever need the paragraph shape demonstrate
24096 d in the last section, the important point is that you can do almost anything
24097 you want in LyX if you are willing to figure out how to do it in TeX and
24099 TeX is a fantastically powerful typesetting system and all that power is
24100 available to you since LyX uses it as its backend.