1 #LyX 1.4.3 created this file. For more info see http://www.lyx.org/
8 \newcommand{\extratablespace}[1]{\noalign{\vskip#1}}
14 \paperfontsize default
21 \paperorientation portrait
24 \paragraph_separation indent
26 \quotes_language english
29 \paperpagestyle headings
30 \tracking_changes false
45 \begin_layout Standard
47 Principal maintainer of this file is
52 If you have comments or error corrections, please send them to the LyX
53 Documentation mailing list, <lyx-docs@lists.lyx.org>.
61 \begin_layout Standard
62 \begin_inset LatexCommand \tableofcontents{}
73 \begin_layout Standard
78 manual, which you are now reading, is essentially Part II of the
80 User's Guide\SpecialChar \@.
83 The reason for splitting this document is simple: the
87 is already huge, and it contains all of the basic features one needs to
88 know in order to prepare most documents.
89 However, the LyX Team has a long-term goal of making LyX extensible through
90 various configuration files and external packages.
91 That means that if you want to support the Fizzwizzle LaTeX package, you
92 can create a layout file for it without having to alter LyX itself.
93 We've already had contributions of several new features this way.
94 This is the place where all of that gets documented.
97 \begin_layout Standard
98 This manual also documents some special features, like fax support, version
99 control, and SGML support, which require additional software to work properly.
100 Lastly, there's a chapter of LaTeX tools and tips, things you can use to
101 spruce up your documents by directly using the powerful features of LaTeX.
106 only WYSIWYM, and will only ever interface to certain LaTeX features.
109 \begin_layout Standard
110 Of course, with all of this extra documentation,
112 Extended LyX Features
114 may itself grow too big for its britches.
115 In that case, you can just call it the
116 \begin_inset Quotes eld
120 \begin_inset Quotes erd
126 \begin_layout Standard
127 If you haven't read the
131 yet, you are definitely in the wrong manual.
136 is the first place to go, since it will direct you to the correct manual,
137 and it also describes the notation and format of all of the manuals.
138 You should also be thoroughly familiar with the
142 and all of the basic features of LyX.
146 \begin_layout Standard
147 In this document, many sections are independent articles contributed by
148 an individual and are noted as such.
149 This person is generally whoever wrote the layout file for the new document
150 class or LaTeX package, or implemented the feature.
151 If there is no mention of an author to a chapter [or chapter sections],
152 that means it was written by the LyX Documentation Team.
155 \begin_layout Standard
156 Since all the topics in this manual depend heavily on LyX's interaction
157 with LaTeX, this first chapter covers
161 the inner workings of LyX and how to direct LyX to generate exactly the
163 It is obviously for more seasoned LyX users.
166 \begin_layout Chapter
170 \begin_layout Section
174 \begin_layout Standard
175 \begin_inset LatexCommand \label{sec:lyxandlatex}
179 This chapter is for both TeX-nicians and the LaTeX-curious.
180 In it, we'll explain how LyX and LaTeX work together to produce printable
182 This is the only place in any of the manuals where we assume you know something
186 \begin_layout Standard
187 At one time, we called LyX a
188 \begin_inset Quotes eld
191 WYSIWYM frontend to LaTeX,
192 \begin_inset Quotes erd
195 but that's no longer true.
196 There are frontends to LaTeX out there.
197 They are basically editors with the ability to run LaTeX and mark any errors
198 in the file you're editing.
207 run LaTeX, and it also marks errors in the file, it also does much, much
209 Thanks to the WYSIWYM concept, you don't need LaTeX to use LyX effectively.
210 LyX has also added a few extensions to LaTeX.
211 Try the following sometime: select
213 Export\SpecialChar \menuseparator
223 menu, then look at the preamble of the resulting
228 You'll notice a variety of new macros defined specifically by LyX.
229 These macros are defined automatically, according to the features you use
233 \begin_layout Standard
234 There are several commands that automatically invoke LaTeX.
238 \begin_layout Itemize
244 iew\SpecialChar \menuseparator
251 \begin_layout Itemize
257 iew\SpecialChar \menuseparator
262 pdate\SpecialChar \menuseparator
268 \begin_layout Itemize
276 \SpecialChar \menuseparator
282 \begin_layout Itemize
290 \SpecialChar \menuseparator
296 \begin_layout Standard
297 They will only invoke LaTeX if the file has changed since the last time
302 \begin_layout Standard
303 When you run LaTeX on the file you're editing, LyX performs these steps:
306 \begin_layout Enumerate
307 Convert the document to LaTeX and save to a file with the extension
318 \begin_layout Enumerate
323 file (maybe several times).
326 \begin_layout Enumerate
327 If there are any errors, insert error boxes in the document to mark where
329 These boxes are transient and are not saved along with the document.
332 \begin_layout Standard
333 If you've run LaTeX using
355 , LyX performs two more steps:
358 \begin_layout Itemize
363 to convert the Dvi file to PostScript®:
367 \begin_layout Itemize
373 , the output file has the extension
378 \begin_layout Itemize
387 , the output file has the extension
395 \begin_layout Itemize
400 or send the PostScript® file to the printer.
403 \begin_layout Section
404 \begin_inset Quotes eld
407 Help! LyX generated an unreadable
412 \begin_inset Quotes erd
418 \begin_layout Standard
419 Die-hard LaTeX users will scream and howl this into the night, then declare
420 LyX useless, simply because they didn't RTFM.
423 \begin_layout Standard
424 We're going to set the record straight.
425 LyX produces two kinds of LaTeX files.
426 One is human readable.
427 The other is LyX readable.
428 Every time LyX executes LaTeX, it produces a LaTeX file that it can easily
434 file is not human readable.
435 Don't even try to read it.
440 file that you can send to a colleague, select
445 xport\SpecialChar \menuseparator
462 \begin_layout Section
463 Translating LaTeX files into LyX
466 \begin_layout Standard
467 You can import a LaTeX file into LyX by using the
472 ile\SpecialChar \menuseparator
477 mport\SpecialChar \menuseparator
485 This will call a Perl script named
489 ---which will create a file
497 ---and then open that file.
498 If the translation doesn't work, you can try calling
502 from the command line, possibly using fancier options.
505 \begin_layout Standard
510 will translate most legal LaTeX, but not everything.
511 It will leave things it doesn't understand in TeX mode, so after translating
516 , you can look for red text and hand-edit it to look right.
519 \begin_layout Standard
524 has its own section in the
528 manual (as well as a Unix manpage equivalent), which you should read to
529 find out about what LaTeX isn't supported, bugs (and how to get around
530 them), and how to use the various options.
533 \begin_layout Standard
538 to work, or you just want to put a piece of LaTeX code into a LyX file,
540 \begin_inset LatexCommand \ref{sec:latexcodes}
547 \begin_layout Section
548 Inserting LaTeX Code into LyX Documents
549 \begin_inset LatexCommand \label{sec:Inserting-LaTeX-Code}
556 \begin_layout Standard
557 \begin_inset LatexCommand \label{sec:latexcodes}
561 This is a rather important point: You can always insert LaTeX code into
563 LyX simply cannot, and will probably never be able to, display every possible
565 If ever you need to insert LaTeX commands into your LyX document, you can
566 use the ERT box, which you can insert into your document with
571 nsert\SpecialChar \menuseparator
579 The ERT box comes in three forms: collapsed, open, and inlined.
580 The first two are used just like any other collapsable (foldable) box (such
581 as footnotes), and are useful for significant amounts of LaTeX commands.
583 \begin_inset Quotes eld
587 \begin_inset Quotes erd
590 ERT box displays its content as part of the button, and is useful for very
591 short sections of LaTeX commands.
596 \begin_layout Standard
606 \begin_layout Standard
607 You can switch between all three by right-clicking on the ERT.
608 Note that if you want more than one line of LaTeX commands, you cannot
609 use the inlined mode.
612 \begin_layout Standard
613 Here's an example of inserting LaTeX commands in a LyX document.
614 The code looks like this:
617 \begin_layout LyX-Code
626 This is an example for a minipage environment.
629 can put nearly everything in it, even (non-floating)
672 \begin_layout LyX-Code
676 \begin_layout Standard
677 The ERT box containing this text is directly after this paragraph.
678 Those of you reading the manual online will only see a bunch of funky text
680 Those reading a printed version of the manuals will see the actual results:
683 \begin_layout Standard
687 \begin_layout Standard
694 \begin_layout Standard
701 \begin_layout Standard
703 This is an example for a minipage environment.
704 You can put nearly everything in it, even (non-floating) figures and tables.
708 \begin_layout Standard
715 \begin_layout Standard
720 \begin_layout Standard
727 \begin_layout Standard
734 \begin_layout Standard
741 \begin_layout Standard
747 \begin_layout Standard
754 \begin_layout Standard
761 \begin_layout Standard
768 \begin_layout Standard
780 \begin_layout Standard
781 In addition to these two methods, you can also create a separate file containing
782 some complex LaTeX structure.
788 nsert\SpecialChar \menuseparator
796 to include your file (you should select the type
801 We recommend that you only do this if you have a
810 Otherwise, you'll have a big job tracking down LaTeX errors\SpecialChar \ldots{}
814 \begin_layout Standard
815 There are a few last notes to emphasize:
818 \begin_layout Itemize
819 Inside of LyX, LaTeX code appears
824 \begin_layout Itemize
829 check if your LaTeX code is correct.
832 \begin_layout Itemize
833 Beware reinventing the wheel.
836 \begin_layout Standard
837 That last note refers to two things.
838 First, LyX does have quite a few features tucked into it, and more are
840 Be sure to check the manuals to make sure that LyX doesn't have such-and-such
841 feature before you go off merrily coding LaTeX.
842 Second, there are numerous LaTeX packages out there to do all sorts of
843 things, from labels to envelopes to fancy multipage tables.
844 Check out a CTAN site for details (see Section
845 \begin_inset Quotes eld
849 \begin_inset Quotes erd
860 \begin_layout Standard
865 : I seem to do this an awful lot.
866 Sat down and merrily began coding something to print out labels, only to
867 learn that there were already 2 different LaTeX packages to do this.
868 Worse yet --- I had them already!
876 \begin_layout Standard
877 If you do need to do some wild and fancy things within your document, be
878 sure to check out a good LaTeX book for assistance.
879 There are a number of them listed in the bibliography of the
886 \begin_layout Standard
887 There are a number of LaTeX commands which have to be placed before the
888 beginning of the actual text.
889 They go into the preamble, and this is explained in the next section.
892 \begin_layout Section
893 LyX and the LaTeX Preamble
896 \begin_layout Subsection
897 About the LaTeX Preamble
900 \begin_layout Standard
901 \begin_inset LatexCommand \label{sec:preamble}
905 If you already know LaTeX, there is no need to explain here what the preamble
907 If you don't, the following will give you some ideas --- we recommend again
908 that you consult a LaTeX book for further information.
909 In any case, you should read the points below, because they explain what
910 you can do and what you don't need to do in the LaTeX preamble of a LyX
914 \begin_layout Standard
915 The LaTeX preamble comes at the very beginning of a document,
923 \begin_layout Itemize
924 declare the document class.
925 LyX already does this for you.
929 \begin_layout Standard
930 If you're a seasoned LaTeX-nician, and you have some custom document class
931 you want to use, check out the
935 for information on how to make LyX interface to it.
936 Be sure to submit your efforts to the LyX Team for inclusion in future
941 \begin_layout Itemize
942 declare the usage of packages.
943 LaTeX packages provide special commands, which are only available within
944 a document when the package has been declared in the preamble.
953 forces all paragraphs to be indented.
954 There are other packages for labels, envelopes, margins, etc.
958 \begin_layout Itemize
959 set counters, variables, lengths and widths.
960 There are several LaTeX counters and variables which
964 be set globally from within the preamble in order to have the desired effect.
965 [There are other variables which you can set and reset inside the document,
966 too.] Margins are a good example of something which must be set in the preamble.
967 Another example is the label format for lists.
968 You can actually set these just about anywhere, but it's best to do it
969 just once, inside the preamble.
972 \begin_layout Itemize
973 declare user defined commands [with
985 ], mostly abbreviations for LaTeX commands which appear very often inside
987 Although the preamble is a good place to declare such commands, they
991 be declared anywhere else [but
995 they are used for the first time, of course\SpecialChar \ldots{}
997 This can be useful if there is a lot of raw LaTeX code in your document,
998 which normally should not be the case.
1001 \begin_layout Standard
1002 LyX adds its own set of definitions to the preamble of the
1007 This makes LaTeX files generated by LyX portable.
1010 \begin_layout Subsection
1011 Changing the Preamble
1014 \begin_layout Standard
1015 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1016 can't change them without patching LyX itself.
1017 You can, however, add your own stuff to the preamble.
1018 There are two ways to do this:
1021 \begin_layout Enumerate
1048 \SpecialChar \menuseparator
1056 dialog, depending on your frontend.
1057 Note that the LyX keybindings will not work in this dialog, alas.
1060 \begin_layout Enumerate
1061 Use the preamble contents you've added as your default template (see
1062 \begin_inset Quotes eld
1066 \begin_inset Quotes erd
1073 ), so that it will be the default preamble for any file you create.
1076 \begin_layout Standard
1077 LyX adds anything in the
1084 dialog to its own built-in preamble.
1085 Before adding your own declarations in the preamble, you should make sure
1086 that LyX doesn't already support what you want to do (remember what we
1087 said about reinventing the wheel?).
1090 make sure your preamble code is correct
1093 LyX doesn't check it.
1096 \begin_layout Subsection
1100 \begin_layout Standard
1101 Here are some examples of what you can add to a preamble, and what they
1105 \begin_layout Subsubsection
1109 \begin_layout Standard
1110 There are two variables under LaTeX that control page position:
1123 Their names should be self-explanatory.
1124 These variables are useful if you think for a moment about computer labels.
1125 Sometimes, the size of a print medium and the area of the medium that you
1126 can actually print on aren't the same.
1142 \begin_layout Standard
1143 The default values for
1155 are both 0 pt.,\InsetSpace ~
1158 the page isn't shifted.
1161 \begin_layout Standard
1162 Unfortunately, some DVI drivers always seem to shift the page.
1163 We have no idea why, or why the sysadmin hasn't fixed such behavior.
1164 If you're using LyX on a system that you don't personally maintain, and
1165 your sysadmin is a doofus,
1178 Suppose you're left and top margins are always 0.5 inches too big.
1179 You can add this to the preamble:
1182 \begin_layout LyX-Code
1190 \begin_layout LyX-Code
1198 \begin_layout Standard
1199 \SpecialChar \ldots{}
1200 and your margins should now be correct.
1203 \begin_layout Subsubsection
1207 \begin_layout Standard
1208 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1209 There's a rather nice package, available at your nearest CTAN archive,
1210 for printing sheets of labels, called
1215 Now, your system may not have this package installed by default.
1216 We leave that up to you to check.
1217 You'll also want to read the documentation for it; we're not going to do
1219 Since this is an example, however, we'll give you an example of how you
1223 \begin_layout Standard
1224 First, make sure you're using the
1229 Next, you need to put the following in your preamble:
1232 \begin_layout LyX-Code
1238 \begin_layout LyX-Code
1244 \begin_layout LyX-Code
1250 \begin_layout LyX-Code
1256 \begin_layout LyX-Code
1262 \begin_layout LyX-Code
1268 \begin_layout LyX-Code
1274 \begin_layout Standard
1275 This sets things up for Avery® label sheets, stock #5360.
1276 You're now ready to print labels, but you'll need to insert LaTeX code,
1277 placing the commands
1289 around each label text.
1290 This and other special features of
1294 are explained in its documentation.
1297 \begin_layout Standard
1298 Someday, someone may write a LyX layout file to support this package directly.
1299 Maybe that someone is you.
1302 \begin_layout Subsubsection
1303 Example #3: Paragraph Indentation
1306 \begin_layout Standard
1307 Americans are trained to indent the first line of
1312 As with all of their other weird quirks, most Americans will whine and
1313 moan until they can have their way and indent the first line of all paragraphs.
1317 \begin_layout Standard
1322 : This was written by an American ---
1326 ! It's my perception of my fellow countrymen.
1327 Tough if you don't like it.
1336 \begin_layout Standard
1337 Of course, this behavior isn't standard typography.
1338 In books, you typically only indent the first line of a paragraph
1342 it follows another one.
1343 The idea behind indenting the first line of a paragraph is to distinguish
1344 neighboring paragraphs from one another.
1345 If there is no previous paragraph, for example, it follows a figure, or
1346 is the first paragraph in a section, then there is no special indentation.
1350 \begin_layout Standard
1351 If you're a typical American, though, you don't care about such esoteric
1352 things; you want your indentation! Add this to the preamble:
1355 \begin_layout LyX-Code
1358 usepackage{indentfirst}
1361 \begin_layout Standard
1362 If your TeX distribution isn't a braindead one, you'll have this package,
1363 and all of your paragraphs will get the indentation you think they deserve.
1366 \begin_layout Subsubsection
1367 Example #4: This Document
1370 \begin_layout Standard
1371 You can also check out the preamble of this document to get an idea of some
1372 of the advanced things you can do.
1373 You'll probably need to make the
1378 reamble\SpecialChar \ldots{}
1381 dialog full-screen to see most of it.
1382 Also, there are more examples and an assortment of LaTeX
1383 \begin_inset Quotes eld
1387 \begin_inset Quotes erd
1390 given in Chapter\InsetSpace ~
1392 \begin_inset LatexCommand \ref{cha:secrets}
1400 \begin_layout Section
1401 LyX and LaTeX Errors
1404 \begin_layout Standard
1405 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1407 It then uses the log-file from the LaTeX run to do a post-mortem.
1408 As we stated earlier in the chapter, LyX generates two kinds of
1412 files, one of which it uses to locate errors in the document.
1413 If there was an error someplace, LyX will put a box with the word
1414 \begin_inset Quotes eld
1418 \begin_inset Quotes erd
1421 at the appropriate place in the document.
1425 \begin_layout Standard
1426 LyX will occasionally misguess where the error was.
1427 This will typically happen with tables, figures, math, and the preamble.
1432 It will also display a message alerting you to the fact that there were
1436 \begin_layout Standard
1437 You can navigate through the errors by using
1453 \begin_inset Quotes eld
1457 \begin_inset Quotes erd
1460 the error-boxes and view the error message LaTeX produced by clicking on
1464 \begin_layout Standard
1465 Some folks also like to look at the log file directly, accessible from
1471 ocument\SpecialChar \menuseparator
1481 There are some fairly common error messages and warnings.
1482 We'll cover those here.
1483 You should look at a good LaTeX book for a complete listing.
1486 \begin_layout Itemize
1487 \begin_inset Quotes eld
1495 \begin_inset Quotes eld
1502 \begin_layout Standard
1503 Anything beginning with these word is a warning message for the purpose
1505 \begin_inset Quotes eld
1509 \begin_inset Quotes erd
1512 the LaTeX code itself.
1513 You'll get messages like this if you added or changed cross-references
1514 or bibliography entries, in which case, LaTeX is trying to tell you that
1515 you need to make another run.
1518 \begin_layout Standard
1519 You can by-and-large ignore these.
1523 \begin_layout Itemize
1524 \begin_inset Quotes eld
1532 \begin_inset Quotes erd
1539 \begin_layout Standard
1540 Another warning message, this time about fonts which LaTeX couldn't find.
1541 The rest of the message will often say something about a replacement font
1545 \begin_layout Standard
1546 You can safely ignore these.
1550 \begin_layout Itemize
1551 \begin_inset Quotes eld
1561 \begin_inset Quotes erd
1568 \begin_layout Standard
1574 They are warning you about lines that were too long and run past the right
1576 Almost always, this is unnoticeable in the final output.
1577 Or, only one or two characters extend past the margin.
1578 LaTeX seems to generate at least one of these messages for just about any
1582 \begin_layout Standard
1583 You can ignore these stupid messages.
1584 Your eyes will tell you if there's a problem with something that's too
1585 wide; just look at the output.
1589 \begin_layout Itemize
1590 \begin_inset Quotes eld
1600 \begin_inset Quotes erd
1607 \begin_layout Standard
1608 Not quite as common as its cousin.
1609 LaTeX seems to like to print lines that are a bit too wide as opposed to
1610 ones that are a bit too narrow.
1611 We have no idea why.
1614 \begin_layout Standard
1615 You can ignore these, too.
1619 \begin_layout Itemize
1620 \begin_inset Quotes eld
1630 \begin_inset Quotes erd
1634 \begin_inset Quotes eld
1644 \begin_inset Quotes erd
1651 \begin_layout Standard
1652 Warnings about troubles breaking the page.
1653 Once again, just look at the output.
1654 Your eyes will tell you where something has gone wrong.
1658 \begin_layout Itemize
1659 \begin_inset Quotes eld
1665 \begin_inset Quotes els
1669 \begin_inset Quotes ers
1675 \begin_inset Quotes erd
1682 \begin_layout Standard
1684 \begin_inset Quotes eld
1688 \begin_inset Quotes erd
1691 isn't installed on this system.
1692 This usually appears because some package your document needs isn't installed.
1693 If you didn't touch the preamble or didn't use the
1699 command, then one of the packages LyX tried to load is missing.
1705 elp\SpecialChar \menuseparator
1712 , to get a list of packages that LyX knows about.
1713 This file is updated whenever you reconfigure LyX (using
1720 \SpecialChar \menuseparator
1725 ) and tells you which packages have been detected and what they do.
1728 \begin_layout Standard
1739 command, and the package in question isn't installed, you'll need to install
1744 \begin_layout Itemize
1745 \begin_inset Quotes eld
1750 LaTeX Error: Unknown option
1753 \begin_inset Quotes erd
1760 \begin_layout Standard
1761 Error messages beginning with this are trying to tell you that you specified
1762 a bad or undefined option to a package.
1763 Check the package's documentation.
1767 \begin_layout Itemize
1768 \begin_inset Quotes eld
1773 Undefined control sequence
1776 \begin_inset Quotes erd
1783 \begin_layout Standard
1784 If you've inserted LaTeX code into your document, but made a typo, you'll
1786 You may have forgotten to load a package.
1787 In any case, this error message usually means that you used an undefined
1792 \begin_layout Standard
1793 There are other error and warning messages.
1794 Some are self-explanatory.
1795 These are usually LaTeX messages.
1796 Others are downright cryptic.
1797 These are actually TeX error messages, and we really have
1801 what they mean or how to decipher them.
1804 \begin_layout Standard
1805 There's a general sequence you should follow if you get error messages:
1808 \begin_layout Enumerate
1809 Look at the LaTeX code you inserted for typos.
1812 \begin_layout Enumerate
1813 If there are no typos, check and see that you used the command(s) correctly.
1816 \begin_layout Enumerate
1817 If you get a bunch of error boxes piled up at the very top of the document,
1818 it means that there are errors in the preamble.
1819 Start debugging your preamble.
1822 \begin_layout Enumerate
1823 If you didn't add anything to the preamble and didn't add any LaTeX code
1824 to the document, the first suspect is your LaTeX distribution itself.
1825 Check for missing packages and install them.
1828 \begin_layout Enumerate
1829 Okay, so there are no missing packages.
1830 Did you use any of the fine-tuning options in LyX? Specifically, did you
1835 any of them, like trying to manually insert lots of
1837 Protected\InsetSpace ~
1848 s? Did you try to kludge something together with these instead of using
1849 the appropriate paragraph environment?
1852 \begin_layout Enumerate
1853 All right, you didn't use any of the fine-tuning options, you played by
1855 Did you try to pull a fancy maneuver? Did you do something funky inside
1856 a table or an equation, like inserting a graphic into a table cell?
1859 \begin_layout Enumerate
1860 Do you have long sections of text where LaTeX cannot find a place to break
1861 a line? By default, LaTeX is rather strict about how much extra inter-word
1862 spacing it will add in order to break a line.
1863 Preferrably, you should rework the paragraph to avoid the problem.
1864 If this isn't an option, you can wrap your text in
1870 to make LaTeX's line breaking more, well, sloppy.
1873 \begin_layout Enumerate
1874 Did you go overboard with the nesting? LyX (currently) doesn't check to
1875 make sure you're in the limits for nesting environments.
1876 If you nested a bunch of environments to the
1877 \begin_inset Formula $17^{\mathrm{th}}$
1880 level, that's the problem.
1883 \begin_layout Enumerate
1884 Okay, you didn't get any error messages, but your output looks whacked.
1885 If you have a table or figure that's too wide or long for the page, you
1890 \begin_layout Enumerate
1891 rescale the figure so it fits.
1894 \begin_layout Enumerate
1895 trim down the table so it fits.
1898 \begin_layout Standard
1899 If something else is wrong with the output, and you didn't try to pull anything
1900 fancy or kludge the fine-tuning options, we're not sure what's wrong.
1904 \begin_layout Standard
1905 If all this doesn't help --- well, then
1909 you might have found a bug in LyX\SpecialChar \ldots{}
1913 \begin_layout Chapter
1917 \begin_layout Section
1918 Preparing a Bibliography with BibTeX
1919 \begin_inset LatexCommand \label{sec:Preparing-a-Bibliography}
1926 \begin_layout Standard
1933 Jürgen Spitzmüller
1936 \begin_layout Standard
1937 \begin_inset VSpace bigskip
1943 \begin_layout Standard
1945 STOP! If you don't know what BibTeX is, or have a reasonably good idea of
1951 setting up your own bibliographic databases),
1955 , do not walk, to your nearest copy of the 2nd edition of Lamport's
1957 LaTeX: A Document Preparation System
1959 , particularly Appendix B.
1960 The rest of this discussion assumes you have created a correct bibliography
1961 file, that you have all relevant environment variables set correctly (esp.
1974 ), and that if sufficiently desperate, you could create and
1975 \begin_inset Quotes eld
1979 \begin_inset Quotes erd
1982 a LaTeX file with a BibTeX database.
1986 \begin_layout Standard
1987 For those who don't know what BibTeX is, it is a system for creating a large
1988 database of your most used journal references.
1989 For all future articles you write, you only need to include this standard
1990 database and reference the appropriate key to each reference.
1991 Even if you write only a few papers with handful of references each, it
1992 is well worth your time to examine BibTeX and decide whether it will be
1996 \begin_layout Standard
1997 To use BibTeX with LyX, first read the
2001 where it describes how to insert citations.
2002 The basic mechanism for inserting BibTeX references is the same.
2003 Then, at the very end of your document, select
2005 Insert\SpecialChar \menuseparator
2010 TOC\SpecialChar \menuseparator
2014 In the resulting dialog, fill out the dialog boxes as follows:
2017 \begin_layout Description
2018 Database: enter the name of your
2031 For searching multiple
2035 files, just enter them in the desired order, separated by commas.
2039 \begin_layout Description
2040 Style: enter the name of your BibTeX style file *without* the
2045 The default style is
2049 (which should be included in your LaTeX distribution, so you don't have
2050 to worry about creating it).
2053 \begin_layout Standard
2054 For each citation, assuming that the source is in the
2063 nsert\SpecialChar \menuseparator
2070 at the correct location in the text, and enter the appropriate reference
2072 Nothing else is required; when invoking
2077 iew\SpecialChar \menuseparator
2084 , for example, you should see that BibTex and LaTeX are invoked as needed,
2085 including multiple invocations of LaTeX.
2089 \begin_layout Subsection
2090 Alternative Citation Styles
2093 \begin_layout Standard
2094 Standard BibTeX uses numbers (e.\InsetSpace \thinspace{}
2095 g.\InsetSpace \space{}
2097 \begin_inset Quotes eld
2101 \begin_inset Quotes erd
2104 ) to refer to a cited work.
2105 However, in many scientific disciplines, other citation styles are in use.
2106 The most common one is the author-year style (e.\InsetSpace \thinspace{}
2107 g.\InsetSpace \space{}
2109 \begin_inset Quotes eld
2113 \begin_inset Quotes erd
2117 LyX supports two packages that provide this style,
2126 Both packages have their own pros and cons, which cannot be listed in detail.
2127 If you only want to have simple author-year (or author-numerical) style
2128 or if you want to use one of the countless style files for natbib, than
2133 package is probably your choice.
2134 If you need special features like short title references, ibidem etc., you
2135 might consider the fairly new
2142 \begin_layout Standard
2143 The handling of both packages in LyX is basically the same.
2149 ocument\SpecialChar \menuseparator
2160 pane (with the xforms frontend: the
2174 With both packages, you will get some extra features in the citation dialog
2175 and you can select the style of the reference (
2176 \begin_inset Quotes eld
2180 \begin_inset Quotes erd
2184 \begin_inset Quotes eld
2188 \begin_inset Quotes erd
2192 \begin_inset Quotes eld
2196 \begin_inset Quotes erd
2200 \begin_inset Quotes eld
2204 \begin_inset Quotes erd
2208 Note that both packages need specifically designed style files (they both
2209 ship their own, while there are lots of additional style files and even
2210 an interactive style file builder
2214 \begin_layout Standard
2216 \begin_inset LatexCommand \url{ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/}
2232 \begin_layout Subsection
2233 Sectionated Bibliographies
2234 \begin_inset LatexCommand \label{sub:Sectionated-Bibliographies}
2241 \begin_layout Standard
2242 Sometimes you might need to divide your bibliography into several sections.
2243 If you are, for instance, a historian, the possibility to separate sources
2244 and scientific works is most likely a
2245 \begin_inset Quotes eld
2249 \begin_inset Quotes erd
2253 Unfortunately, BibTeX itself does not allow you to do this.
2254 The good news is, though: With the help of some LaTeX packages, BibTeX
2255 can be extended to fit your historical needs.
2258 \begin_layout Standard
2259 As of version 1.4, LyX provides native support for one of these packages,
2268 \begin_layout Standard
2270 \begin_inset LatexCommand \url{ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/}
2279 The advantage of this package (compared to other packages like
2283 ) is that you don't need to define new citation commands.
2284 Instead, you need to prepare different bibliographic databases which include
2285 the entries for the different sections of the bibliography.
2286 For example: If you want to divide your bibliography into the sections
2288 \begin_inset Quotes eld
2292 \begin_inset Quotes erd
2296 \begin_inset Quotes eld
2300 \begin_inset Quotes erd
2303 , you first need to create two bibliographic databases, e.\InsetSpace \thinspace{}
2304 g.\InsetSpace \space{}
2317 \begin_layout Standard
2323 ocument\SpecialChar \menuseparator
2334 pane (with the xforms frontend: the
2341 Sectionated\InsetSpace ~
2345 Now you can insert multiple BibTeX references (as described in section\InsetSpace ~
2347 \begin_inset LatexCommand \ref{sec:Preparing-a-Bibliography}
2351 ), one for each section of your bibliography.
2352 Returning to our example: Insert a BibTeX reference for the database
2356 and a second one for the database
2361 You are free to use the same or different styles for each section.
2362 Additionally, you can chose if the bibliography section should contain
2364 \begin_inset Quotes eld
2367 all cited references
2368 \begin_inset Quotes erd
2371 of the specified database(s) (which is the default),
2372 \begin_inset Quotes eld
2375 all uncited references
2376 \begin_inset Quotes erd
2380 \begin_inset Quotes eld
2384 \begin_inset Quotes erd
2388 This might be useful if you would like to separate your bibliography into
2390 \begin_inset Quotes eld
2394 \begin_inset Quotes erd
2398 \begin_inset Quotes eld
2402 \begin_inset Quotes erd
2406 \begin_inset Quotes eld
2410 \begin_inset Quotes erd
2414 The titles for the sections can be added as ordinary sections or subsections.
2419 removes the bibliography title, you have manually re-add that, too (as
2420 a chapter* or section*, for instance).
2423 \begin_layout Subsection
2424 Multiple Bibliographies
2427 \begin_layout Standard
2428 Multiple bibliographies, e.\InsetSpace \thinspace{}
2429 g.\InsetSpace \space{}
2430 a bibliography for each section or chapter of
2431 the document, are not supported by BibTeX itself.
2436 package, which is used for the creation of sectionated bibliographies in
2437 LyX (cf.\InsetSpace ~
2438 section\InsetSpace ~
2440 \begin_inset LatexCommand \ref{sub:Sectionated-Bibliographies}
2444 ), provides an easy way to solve this task, if you are willing to use some
2445 LaTeX-Code (ERT, cf.\InsetSpace ~
2446 section\InsetSpace ~
2448 \begin_inset LatexCommand \ref{sec:Inserting-LaTeX-Code}
2456 \begin_layout Standard
2457 An alternative approach is to use the
2465 package, respectively.
2473 \begin_layout Standard
2479 ocument\SpecialChar \menuseparator
2490 pane (with the xforms frontend: the
2497 Sectionated\InsetSpace ~
2501 In the document, you have to enclose the sections, which shall contain
2502 their own bibliography (including the BibTeX reference itself), between
2515 (those commands have to be inserted as ERT).
2516 The bibliography will contain all references which have been cited in the
2518 N.\InsetSpace \thinspace{}
2519 B.: If you are using this approach, then
2523 citation reference has to be inside some btUnit.
2524 Also, the btUnits cannot be nested.
2527 \begin_layout Section
2531 \begin_layout Standard
2532 A good index is one of the hardest things to make in a lengthy document,
2533 but LyX helps make things a bit simpler by interfacing to the
2537 program which is found in most recent LaTeX distributions.
2541 \begin_layout Standard
2559 Outputs\SpecialChar \menuseparator
2560 LaT\SpecialChar \textcompwordmark{}
2569 section of the preferences dialog, however, you can customize the index
2570 command, if you prefer an alternative program like
2591 Inserting an index and marking words to include in it works much the same
2592 way as preparing a bibliography as mentioned in the last section.
2595 \begin_layout Standard
2596 First, go to the end of your file and select
2601 nsert\SpecialChar \menuseparator
2612 C\SpecialChar \menuseparator
2625 Then, for each word you would like to include in the index, go to the end
2626 of that word and click on
2631 nsert\SpecialChar \menuseparator
2644 This will insert a tag showing the word as it will appear in the index.
2645 That's all there is to it; LyX will automatically call
2649 for you and create the index itself.
2650 The text in the dialog available from right-clicking on the index button
2651 accepts LaTeX, so you'll need to be careful to avoid using any special
2653 On the positive side, you can use the advanced options - have a look at
2654 the documentation which comes with your LaTeX distribution to find out
2655 how to do things like
2656 \begin_inset Quotes eld
2660 \begin_inset Quotes erd
2666 \begin_layout Standard
2667 Be careful not to put spaces between the word in the text and the index
2668 marker; apparently the wrong page number can be produced if this happens.
2671 \begin_layout Section
2675 \begin_layout Standard
2683 \begin_layout Standard
2684 Sometimes you need to compile a list of symbols that are mentioned in your
2685 document with a brief explanation of them.
2686 A LaTeX package named
2690 provides an easy way of compiling such lists.
2695 is included in most standard Linux distributions.
2696 If your distribution doesn't contain it, you should download it from a
2697 CTAN mirror and install the package in order to use this feature of LyX.
2700 \begin_layout Standard
2701 A glossary entry is created if you place the cursor after a symbol entry
2702 and then use the menu
2704 Insert\SpecialChar \menuseparator
2705 Glossary\InsetSpace ~
2710 \begin_inset Quotes eld
2718 \begin_inset Quotes erd
2721 is inserted and a window pops up asking for the glossary entry.
2722 A glossary entry consists of two main entries.
2723 The first is the symbol that you want to refer to.
2724 You should enter a valid LaTeX code for the corresponding field in the
2726 The second is the description of the symbol.
2727 You should fill the corresponding field to complete the glossary entry.
2730 \begin_layout Subsection
2731 Sort Order of Glossary Entries
2734 \begin_layout Standard
2735 Suppose you have two glossary entries for the symbols
2736 \begin_inset Formula $a$
2740 \begin_inset Formula $\sigma$
2748 package automatically sorts these two entries considering the symbol entry,
2749 while printing the Glossary.
2750 However, this can lead to an undesired sort order.
2751 For the example given, the first entry appears as
2755 , while the second is
2762 Note that, in this case
2763 \begin_inset Formula $\sigma$
2766 is located in front of the
2767 \begin_inset Formula $a$
2770 , since the character
2771 \begin_inset Quotes eld
2777 \begin_inset Quotes erd
2780 is considered in sorting.
2781 In order to control the sort order, you can edit the
2786 field of the glossary dialog.
2787 For the given example, you can edit this field as
2796 Then, these entries will be effective in the sort ordering and
2797 \begin_inset Formula $a$
2800 will be located before
2801 \begin_inset Formula $\sigma$
2807 \begin_layout Standard
2808 This feature provides exciting ways of ordering the entries.
2809 For subgrouping and tips for using sort entries see the official nomencl
2813 \begin_layout Subsection
2817 \begin_layout Standard
2818 You can turn on referencing to the equations and pages in the glossary entries.
2819 For this purpose, you should add referencing options commands at the end
2820 of description field.
2821 There are six referencing options in nomencl package:
2824 \begin_layout Paragraph*
2830 \begin_layout Standard
2831 Adds reference to the equation by adding the phrase
2832 \begin_inset Quotes eld
2836 \begin_inset Quotes erd
2842 \begin_layout Paragraph*
2848 \begin_layout Standard
2849 Adds reference to the page by adding the phrase
2850 \begin_inset Quotes eld
2854 \begin_inset Quotes erd
2860 \begin_layout Paragraph*
2866 \begin_layout Standard
2867 Is the short notation of
2874 \begin_layout Paragraph*
2884 \begin_layout Standard
2885 Turns off corresponding referencing options if they are turned on globally
2886 (see reference documentation of nomencl).
2889 \begin_layout Subsection
2893 \begin_layout Standard
2894 You can insert the glossary with the menu
2896 Insert\SpecialChar \menuseparator
2898 &TOC\SpecialChar \menuseparator
2902 A light blue box labeled
2903 \begin_inset Quotes eld
2911 \begin_inset Quotes erd
2914 will show the place where the index is printed in the output.
2915 The index list box is not clickable like other LyX-boxes.
2916 In the printed output the title of the glossary appears as
2924 \begin_layout Standard
2925 This is translated to the document language for a small number of languages,
2926 amongst others French and German
2932 If you are not happy with the title, you can change it by re-defining the
2940 For example, in order to change the title
2948 add the following line to the preamble.
2951 \begin_layout LyX-Code
2956 nomname}{List of Symbols}
2959 \begin_layout Standard
2960 If you're unhappy with the amount of space for symbols, you can alter it
2961 by adding following line to the preamble.
2964 \begin_layout LyX-Code
2969 nomlabelwidth}{3.0cm}
2972 \begin_layout Standard
2976 \begin_layout Section
2980 \begin_layout Subsection
2984 \begin_layout Standard
2985 When you are working on a large file with many sections, it is often convenient
2986 to break up the document into several files, or perhaps you have something
2987 where a table may change from time to time, but the preceding text does
2989 In these cases, you should seriously consider using multipart documents.
2990 For example, scientific papers often have five major sections: the introduction
2991 , observations, results, discussion, and conclusion.
2992 Each of these could be its own separate LyX file, with one
2993 \begin_inset Quotes eld
2997 \begin_inset Quotes erd
3000 file which contains the title, authors, abstract, references, etc., plus
3001 the five included files.
3002 It is important to note that each of these files is a full LyX file which
3003 can be formatted and printed on its own, as well as included in a master
3005 Each of these files must have the same document class, however--- don't
3006 attempt to mix book classes with article classes.
3007 You may also include LaTeX files; however, these files must not have their
3013 everything up to and including the
3025 line must be deleted) or else errors will be generated when you try to
3029 \begin_layout Standard
3030 LyX allows you to include files quite easily with
3035 nsert\SpecialChar \menuseparator
3044 When you click on this selection a small box is inserted into the file
3045 at the current cursor location.
3046 Clicking on the box raises a dialog which allows you to select the file
3047 to be included, and the method of its inclusion.
3051 \begin_layout Standard
3052 The file selection box should by now be obvious.
3053 The three inclusion methods are
3054 \begin_inset Quotes eld
3058 \begin_inset Quotes erd
3062 \begin_inset Quotes eld
3066 \begin_inset Quotes erd
3070 \begin_inset Quotes eld
3074 \begin_inset Quotes erd
3078 The difference between
3079 \begin_inset Quotes eld
3083 \begin_inset Quotes erd
3087 \begin_inset Quotes eld
3091 \begin_inset Quotes erd
3094 is really only meaningful to LaTeXperts, but the practical difference is
3095 that files which are
3096 \begin_inset Quotes eld
3100 \begin_inset Quotes erd
3103 are typeset beginning on a new page, while files which are
3104 \begin_inset Quotes eld
3108 \begin_inset Quotes erd
3111 are typeset starting on the current page.
3112 Perhaps the labeling in LyX will be changed someday to reflect this.
3115 \begin_layout Standard
3116 Generally, the master file is converted into a full LaTeX file before typesettin
3117 g, while the included files are converted to LaTeX files which do not have
3118 all the preamble information.
3128 button prevents this conversion.
3131 \begin_layout Standard
3133 \begin_inset Quotes eld
3137 \begin_inset Quotes erd
3140 included file allows you to include a file typeset exactly as it appears
3141 in the file, i.e.\InsetSpace ~
3142 verbatim mode, with the characters set in a fixed-width
3144 Normally, spaces in this file are invisible, though two consecutive spaces
3145 are conserved, unlike LyX's normal treatment of spaces.
3146 However, setting the
3156 checkbox typesets a mark to unambiguously define the presence of a space.
3162 \begin_layout Subsection
3163 Cross-References Between Files
3166 \begin_layout Standard
3167 It is possible to set up cross-references between the different files.
3168 First, open all the files in question: let's call them A and B in a two
3169 file example, where B is included in A.
3170 Let's say you insert a label in A, then want to reference it in B.
3171 Open the cross-reference dialog in whilst in document B, and you can select
3173 \begin_inset Quotes eld
3177 \begin_inset Quotes erd
3183 \begin_layout Section
3187 \begin_layout Standard
3192 is needed by LyX to be able to output algorithm floats.
3193 These are useful in placing short algorithms across page breaks and support
3194 an index of algorithms too.
3197 \begin_layout Section
3201 \begin_layout Standard
3206 is used by LyX when you select ``subfigure'' in the graphics dialog and
3207 enter the subfigure caption.
3208 Several figures marked in this way can be packed into a single float with
3209 individual sub-captions.
3212 \begin_layout Section
3213 Fancy Headers and Footers
3216 \begin_layout Standard
3217 The default page layout is rather plain; for an article document class,
3218 all you get is a centered page number at the bottom of the page.
3219 This document is the book class, so it appears to be a bit fancier, but
3220 to really put on a show, you need to set the document page style to
3221 \begin_inset Quotes eld
3225 \begin_inset Quotes erd
3228 , as mentioned in the
3234 This section describes the LaTeX codes you need to insert in your LaTeX
3235 preamble or the text in order to get the desired effects.
3238 \begin_layout Standard
3239 The page header is divided into three fields, not surprisingly labeled
3240 \begin_inset Quotes eld
3244 \begin_inset Quotes erd
3248 \begin_inset Quotes eld
3252 \begin_inset Quotes erd
3256 \begin_inset Quotes eld
3260 \begin_inset Quotes erd
3264 The footer is also divided into these three fields.
3265 The LaTeX commands to set these fields in the simplest manner are
3290 Suppose you wish to put your name in the upper left hand corner of each
3292 Simply insert the following command in the preamble:
3295 \begin_layout Standard
3304 \begin_layout Standard
3305 You will now see your name in the upper left.
3306 If a field has a default entry that you would like to get rid of (often
3307 the page number appears in the central footer, simply include a command
3308 with a blank argument, e.g.
3311 \begin_layout Standard
3319 \begin_layout Standard
3320 Let's get really fancy: lets put the section number with the word
3321 \begin_inset Quotes eld
3325 \begin_inset Quotes erd
3329 Section 3) in the upper left, the page number (e.g.
3330 Page 4) in the upper right, your name in the lower left, and the date in
3332 The following commands should now appear in the preamble:
3335 \begin_layout Standard
3345 \begin_layout Standard
3353 \begin_layout Standard
3363 \begin_layout Standard
3372 \begin_layout Standard
3380 \begin_layout Standard
3390 \begin_layout Standard
3403 access LaTeX's section and page counters, and so print out the current
3404 section and page numbers.
3411 simply prints out today's date.
3414 \begin_layout Standard
3415 The thicknesses of the horizontal rules drawn beneath the header and above
3416 the footer can also be modified.
3417 If you don't want one of the headers, set its thickness to 0.
3418 The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3419 Use the commands, e.g.
3426 headrulewidth}{0.4pt}
3434 footrulewidth}{0.4pt}
3436 to set the thicknesses.
3439 \begin_layout Standard
3440 You can switch the header/footer settings on and off for individual pages
3445 thispagestyle{empty}
3451 thispagestyle{plain}
3457 thispagestyle{fancy}
3460 Simply insert them in the text on the page you want changed and mark them
3462 In fact, title pages are marked as plain by default, while following pages
3463 are marked fancy when using the global fancy setting.
3466 \begin_layout Standard
3467 There are more complex commands which will let you insert things in the
3468 upper left on odd numbered pages, etc., but I will refer you to the
3472 package documentation for more descriptions.
3473 For example, if you have a teTeX installation, look for
3475 /usr/share/texmf/doc/latex/fancyhdr/\SpecialChar \-
3481 \begin_layout Standard
3482 As a final example, it is possible to include an Encapsulated PostScript®
3483 file in the header or footer.
3484 Suppose you want to put a company logo in the upper lefthand corner.
3485 You might try something like
3488 \begin_layout Standard
3497 includegraphics{logo.eps}}}
3500 \begin_layout Standard
3502 (you may need to preface this with
3506 usepackage{graphics}
3508 if you don't include EPS files elsewhere in your document).
3511 \begin_layout Section
3515 \begin_layout Standard
3516 LaTeX provides a mechanism to produce essentially a page within a page,
3518 Within a minipage, all the usual rules of indentation, line wrapping, etc.\InsetSpace ~
3520 LyX also provides some of the minipage capability.
3523 \begin_layout Standard
3524 Minipages in LyX have their own collapsable box; insert one via
3529 nsert\SpecialChar \menuseparator
3537 Right-clicking on the box allows you to alter the minipage's width and
3538 alignment within the page.
3539 Warning: if the minipage is too long to fit on a page, it is truncated,
3540 not wrapped onto the next page.
3543 \begin_layout Standard
3544 If you place two minipages side-by-side, you can use
3549 nsert\SpecialChar \menuseparator
3557 to insert a special instruction known in the LaTeX world as an
3561 to put a maximum amount of space between them; it forces one minipage to
3562 the left edge, the other to the right edge.
3563 The examples below show the difference.
3566 \begin_layout Standard
3567 \begin_inset Box Frameless
3576 height_special "totalheight"
3579 \begin_layout Standard
3580 This is a minipage which does not use hfill.
3581 This is the second sentence of a minipage which does not use hfill.
3589 \begin_layout Standard
3590 \begin_inset Box Frameless
3599 height_special "totalheight"
3602 \begin_layout Standard
3603 This is a second minipage which does not use hfill.
3604 This is the second sentence of a second minipage which does not use hfill.
3612 \begin_layout Standard
3613 \begin_inset VSpace medskip
3619 \begin_layout Standard
3620 Here is some normal text to separate the two examples.
3623 \begin_layout Standard
3624 \begin_inset VSpace medskip
3630 \begin_layout Standard
3631 \begin_inset Box Frameless
3640 height_special "totalheight"
3643 \begin_layout Standard
3644 This is a minipage which does use hfill.
3645 This is the second sentence of a minipage which does use hfill.
3653 \begin_inset Box Frameless
3662 height_special "totalheight"
3665 \begin_layout Standard
3666 This is a second minipage which does use hfill.
3667 This is the second sentence of a second minipage which does use hfill.
3675 \begin_layout Section
3676 Wrapping Text Around Figures
3677 \begin_inset LatexCommand \label{sec:floatflt}
3684 \begin_layout Standard
3685 \begin_inset Wrap figure
3690 \begin_layout Standard
3691 \begin_inset Graphics
3702 \begin_layout Caption
3703 This is a wrapped figure, and this is the brilliant caption that describes
3712 \begin_layout Standard
3713 A very frequently asked question is whether text can be made to
3714 \begin_inset Quotes eld
3718 \begin_inset Quotes erd
3721 around figures so that a figure occupies some fraction of the column width
3722 and text fills the rest.
3723 If you have the LaTeX package
3727 installed (you can find out about it in the
3731 manual) you can do this.
3734 \begin_layout Standard
3735 At the right is a figure of a mobius strip---you should have already seen
3741 To wrap the text like this insert a wrap box via
3746 nsert\SpecialChar \menuseparator
3751 ts\SpecialChar \menuseparator
3757 \begin_layout Standard
3758 Note: this package is very fragile! For example, having a figure too close
3759 to the bottom of the page will mess things up, as will having two figures
3761 Use this package sparingly and do read the documentation that came with
3762 it (which will also tell you how to wrap text around tables).
3765 \begin_layout Section
3769 \begin_layout Standard
3770 While the standard table layout will suffice in 99% of all tables you generate,
3771 occasionally you will run into one which requires a bit of extra tweaking.
3772 The table dialog which appears on a right-click of a table allows these
3774 It will give you access to some extra column alignment parameters.
3775 A little bit of LaTeX background is useful here: when you set up a table
3776 in LaTeX, each column is given an alignment type.
3777 For example, you would give it
3778 \begin_inset Quotes eld
3786 \begin_inset Quotes erd
3790 \begin_inset Quotes eld
3798 \begin_inset Quotes erd
3802 \begin_inset Quotes eld
3810 \begin_inset Quotes erd
3813 for left-aligned, centered, and right-aligned columns respectively (which
3814 appear as the left/center/right radio buttons in LyX).
3816 \begin_inset Quotes eld
3824 \begin_inset Quotes erd
3827 , which will make a column of a specified width (the width box in LyX),
3828 and will wrap text within that box.
3830 \begin_inset Quotes eld
3838 \begin_inset Quotes erd
3841 (vertical bar) which rather than making a column will make a vertical rule
3842 at that point; this manifests itself in LyX as the
3843 \begin_inset Quotes eld
3847 \begin_inset Quotes erd
3851 Finally, there is a type
3852 \begin_inset Quotes eld
3860 \begin_inset Quotes erd
3863 , which allows you to use whatever is enclosed in the accompanying braces
3864 as the column separator, including a null argument.
3865 The reasons for doing this may not be obvious, but they can be very powerful.
3866 They are best demonstrated by example.
3869 \begin_layout Subsection
3870 Removing Extra Column Space
3873 \begin_layout Standard
3874 Here is a standard table:
3877 \begin_layout Standard
3879 \begin_inset Tabular
3880 <lyxtabular version="3" rows="3" columns="2">
3882 <column alignment="left" valignment="top" width="0pt">
3883 <column alignment="left" valignment="top" leftline="true" width="0pt">
3884 <row bottomline="true">
3885 <cell alignment="left" valignment="top" topline="true" usebox="none">
3888 \begin_layout Standard
3903 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
3906 \begin_layout Standard
3923 <cell alignment="left" valignment="top" topline="true" usebox="none">
3926 \begin_layout Standard
3941 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3944 \begin_layout Standard
3961 <cell alignment="center" valignment="top" topline="true" usebox="none">
3964 \begin_layout Standard
3979 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3982 \begin_layout Standard
4005 \begin_layout Standard
4006 Notice that the horizontal rule extends a bit past the text on both sides.
4007 If you wanted the line to end even with the text, we can put a null separator
4008 on the ends to get rid of the bit of extra space LaTeX adds by default.
4009 Here is the example:
4012 \begin_layout Standard
4014 \begin_inset Tabular
4015 <lyxtabular version="3" rows="3" columns="2">
4017 <column alignment="left" valignment="top" width="0pt" special="@{} l">
4018 <column alignment="left" valignment="top" leftline="true" width="0pt" special="l @{}">
4019 <row bottomline="true">
4020 <cell alignment="left" valignment="top" topline="true" usebox="none">
4023 \begin_layout Standard
4038 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
4041 \begin_layout Standard
4058 <cell alignment="left" valignment="top" topline="true" usebox="none">
4061 \begin_layout Standard
4076 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4079 \begin_layout Standard
4096 <cell alignment="center" valignment="top" topline="true" usebox="none">
4099 \begin_layout Standard
4114 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4117 \begin_layout Standard
4140 \begin_layout Standard
4141 In this case, the column specifier for the left column was set to
4142 \begin_inset Quotes eld
4150 \begin_inset Quotes erd
4153 , while the right column was set to
4154 \begin_inset Quotes eld
4162 \begin_inset Quotes erd
4165 , in order to put the null characters on the edges.
4169 \begin_layout Subsection
4170 Changing the Column Separator Character
4173 \begin_layout Standard
4174 Now suppose you really wanted, for reasons that are completely opaque, to
4176 \begin_inset Formula $\sqrt{\pi}$
4179 with some space around it for the column separator.
4180 Simply turn off the vertical border, then set the right column specifier
4182 \begin_inset Quotes eld
4194 \begin_inset Quotes erd
4198 You could now make a table like this:
4201 \begin_layout Standard
4203 \begin_inset Tabular
4204 <lyxtabular version="3" rows="3" columns="2">
4206 <column alignment="left" valignment="top" width="0pt">
4207 <column alignment="left" valignment="top" width="0in" special="@{~$\sqrt{\pi}$~}l">
4208 <row bottomline="true">
4209 <cell alignment="left" valignment="top" topline="true" usebox="none">
4212 \begin_layout Standard
4227 <cell alignment="left" valignment="top" topline="true" usebox="none">
4230 \begin_layout Standard
4247 <cell alignment="left" valignment="top" topline="true" usebox="none">
4250 \begin_layout Standard
4265 <cell alignment="center" valignment="top" topline="true" usebox="none">
4268 \begin_layout Standard
4285 <cell alignment="center" valignment="top" topline="true" usebox="none">
4288 \begin_layout Standard
4303 <cell alignment="center" valignment="top" topline="true" usebox="none">
4306 \begin_layout Standard
4329 \begin_layout Subsection
4330 Making a Decimal Point Aligned Column
4333 \begin_layout Standard
4334 Okay, that last example was very silly, but here is one that is not.
4335 Suppose you want to make a table that has a column which is aligned on
4337 A standard LaTeX trick to do this is to set the whole number part in a
4338 right-aligned column, use a decimal point for the column separator, then
4339 set the fractional part as a left-aligned column.
4340 A variation on this is to include the decimal point explicitly with the
4341 whole part, then use just a null separator in between.
4342 The latter variation is demonstrated here:
4345 \begin_layout Standard
4347 \begin_inset Tabular
4348 <lyxtabular version="3" rows="5" columns="3">
4350 <column alignment="center" valignment="top" width="0pt">
4351 <column alignment="right" valignment="top" leftline="true" width="0pt">
4352 <column alignment="center" valignment="top" width="0pt" special="@{} l">
4353 <row bottomline="true">
4354 <cell alignment="center" valignment="top" topline="true" usebox="none">
4357 \begin_layout Standard
4372 <cell multicolumn="1" alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
4375 \begin_layout Standard
4390 <cell multicolumn="2" alignment="center" valignment="top" topline="true" usebox="none">
4393 \begin_layout Standard
4401 <cell alignment="center" valignment="top" topline="true" usebox="none">
4404 \begin_layout Standard
4414 \begin_inset Formula $\pi$
4422 <cell alignment="right" valignment="top" topline="true" leftline="true" usebox="none">
4425 \begin_layout Standard
4440 <cell alignment="center" valignment="top" topline="true" usebox="none">
4443 \begin_layout Standard
4460 <cell alignment="center" valignment="top" topline="true" usebox="none">
4463 \begin_layout Standard
4473 \begin_inset Formula $\pi^{\pi}$
4481 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4484 \begin_layout Standard
4499 <cell alignment="center" valignment="top" topline="true" usebox="none">
4502 \begin_layout Standard
4519 <cell alignment="center" valignment="top" topline="true" usebox="none">
4522 \begin_layout Standard
4532 \begin_inset Formula $(\pi^{\pi})^{\pi}$
4540 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4543 \begin_layout Standard
4558 <cell alignment="center" valignment="top" topline="true" usebox="none">
4561 \begin_layout Standard
4569 <cell alignment="center" valignment="top" topline="true" usebox="none">
4572 \begin_layout Standard
4582 \begin_inset Formula $\pi^{\pi^{\pi}}$
4590 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4593 \begin_layout Standard
4608 <cell alignment="center" valignment="top" topline="true" usebox="none">
4611 \begin_layout Standard
4622 \begin_inset Formula $\times10^{18}$
4638 \begin_layout Standard
4639 Though it appears a bit funny in LyX, on paper it will produce what appears
4640 to be a 2-column table in which the right column is aligned on the decimal
4641 point and the header appears to be centered over it.
4644 \begin_layout Standard
4645 Perhaps it is best if I described just what I did: first, create a 3
4646 \begin_inset Formula $\times$
4649 3 table and remove all the borders.
4650 Then re-add a bottom border to the top row, and a right border to the first
4652 Type in the values for the first column and set its alignment to
4674 and set that column's alignment to
4690 \begin_inset Formula $\times10^{18}$
4695 and set the extra column alignment to
4700 Finally type in the word
4704 in the middle column, highlight it and the blank entry to its right, and
4717 \begin_layout Subsection
4718 A Better Decimal-Alignment Solution
4721 \begin_layout Standard
4722 An alternative way to have decimal alignment in tables is through the
4727 Add the following to the LateX preamble:
4730 \begin_layout LyX-Code
4736 \begin_layout LyX-Code
4739 newcolumntype{d}[1]{D{.}{.}{#1}}
4742 \begin_layout Standard
4743 To have a column decimally aligned, enter in the
4745 Special Column Alignment
4751 dialog the following:
4754 \begin_layout LyX-Code
4755 d{number of decimals of the data}
4758 \begin_layout Standard
4759 To create extra column space just increase the number of decimals in
4764 Setting the multicolumn attribute for a single cell makes it insensitive
4765 to the decimal alignment which comes in handy as well.
4766 A drawback of this method is that math mode is not allowed in a column
4767 with decimal alignment except if the multicolumn attribute is set.
4770 \begin_layout Standard
4771 This method offers the same flexibility as the
4776 One could, for example, change the alignment separator, and have different
4777 alignment separators for different columns by defining multiple column
4778 types in the preamble.
4779 The syntax is as follows:
4782 \begin_layout LyX-Code
4783 D{inputsep}{outputsep}{decimal places}
4786 \begin_layout Standard
4787 The interested reader is directed towards the
4791 package documentation for more details.
4794 \begin_layout Section
4795 Itemize Bullet Selection
4796 \begin_inset LatexCommand \label{sec:bullet}
4803 \begin_layout Standard
4809 \begin_layout Subsection
4813 \begin_layout Standard
4814 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
4815 Using this dialog you can easily specify what bullet shape to use at each
4816 level of an itemized list.
4817 These settings are document-wide so you won't be able to specify different
4818 sets of bullets for different paragraphs
4822 \begin_layout Standard
4823 Well, actually you can but you'll have to do it by hand.
4831 \begin_layout Subsection
4835 \begin_layout Standard
4836 Open the dialog by selecting the
4841 ocument\SpecialChar \menuseparator
4848 menu item and then select the
4858 \begin_layout Standard
4859 The dialog provides you with a table of bullet shapes.
4860 A column of buttons on the left of the table provides access to the six
4861 different panels of bullet shapes.
4862 The row of buttons across the top is used to select which bullet depth
4864 A text entry under the table shows the currently selected bullet shape's
4865 LaTeX equivalent and this can be edited if desired.
4866 If you do modify the text you will also need to specify any needed packages
4867 in the LaTeX preamble.
4870 \begin_layout Standard
4871 The six panels are divided up by the packages they require.
4872 The following table shows the mappings from button name to LaTeX packages.
4875 \begin_layout Standard
4877 \begin_inset Tabular
4878 <lyxtabular version="3" rows="7" columns="2">
4880 <column alignment="center" valignment="top" leftline="true" width="0pt">
4881 <column alignment="center" valignment="top" leftline="true" rightline="true" width="0pt">
4882 <row topline="true" bottomline="true">
4883 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4886 \begin_layout Standard
4901 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4904 \begin_layout Standard
4920 <row topline="true">
4921 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4924 \begin_layout Standard
4939 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4942 \begin_layout Standard
4957 <row topline="true">
4958 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4961 \begin_layout Standard
4976 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4979 \begin_layout Standard
4995 <row topline="true">
4996 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4999 \begin_layout Standard
5014 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
5017 \begin_layout Standard
5033 <row topline="true">
5034 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
5037 \begin_layout Standard
5052 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
5055 \begin_layout Standard
5071 <row topline="true">
5072 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
5075 \begin_layout Standard
5090 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
5093 \begin_layout Standard
5109 <row topline="true" bottomline="true">
5110 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
5113 \begin_layout Standard
5128 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
5131 \begin_layout Standard
5154 \begin_layout Standard
5155 LyX doesn't stop you using bullets from packages you don't have.
5156 If you get errors from LaTeX when you try to view or print the file then
5157 its likely you are missing a package.
5158 LyX doesn't restrict your use since you may be editing locally and exporting
5162 \begin_layout Subsection
5166 \begin_layout Standard
5167 Select which bullet depth you want to change then select the bullet shape
5173 Any changes will not be visible in LyX, but are visible when viewing the
5174 document using xdvi or ghostview.
5177 \begin_layout Standard
5178 You can reset a bullet shape to the default simply by clicking your right
5179 mouse button on the appropriate bullet depth button.
5182 \begin_layout Standard
5187 want to have multiple sets of paragraphs with different sets of bullets
5188 in each then you're going to have to get your hands dirty.
5189 The itemize bullet selection dialog can help though because it provides
5190 you with the LaTeX code for a wide range of bullet shapes.
5191 To make your own custom paragraphs you have the following options:
5194 \begin_layout Standard
5198 \begin_layout Standard
5214 \begin_layout Standard
5218 \begin_layout Standard
5240 \begin_layout Itemize
5241 Use the LaTeX command
5247 to specify a new bullet shape for a given depth.
5248 You'll also need to save the current bullet shape so you can restore it
5250 In this itemized list the following LaTeX code was used to change the bullet
5251 used for the first depth.
5283 Note that the itemize depth is specified in Roman numerals as part of the
5293 \begin_layout Itemize
5297 \begin_layout Standard
5310 Specify each individual entry by starting each item with the bullet shape
5311 enclosed in square brackets and set as TeX.
5312 For example, this item was started with
5325 \begin_layout Standard
5329 \begin_layout Standard
5345 \begin_layout Standard
5346 You'll also need to revert the labelitem back to its previous setting for
5347 the global bullet shape settings to remain in effect.
5348 The way used here was:
5361 \begin_layout Chapter
5362 Special Document Classes
5365 \begin_layout Section
5369 \begin_layout Standard
5375 \begin_layout Standard
5376 \begin_inset VSpace bigskip
5382 \begin_layout Standard
5384 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
5385 papers to be submitted to American Mathematical Society publications.
5386 The layouts are not tailored to a specific journal, but easily can be.
5387 You should refer to the AMS documentation for specific instructions for
5388 each journal (usually it will entail only changing a single line in the
5390 That documentation is available on the Web at
5391 \begin_inset LatexCommand \url{http://www.ams.org}
5396 \begin_inset LatexCommand \url{ftp://ftp.ams.org/pub/tex/amslatex/}
5400 .These layouts are appropriate, and useful, for any mathematical writing.
5401 There are currently 4 distinct AMS LaTeX layouts:
5404 \begin_layout Enumerate
5405 amsart: The standard AMS-article format.
5406 All results and similar statements are numbered as
5407 \begin_inset Formula $(n.m)$
5410 , where the first number refers to the section, and the second refers to
5411 the total number of results (Theorems, Corollaries, Propositions, Definitions
5412 and Remarks, etc.) in that section.
5413 There are also many (but not all) environments available unnumbered, which
5414 is occasionally needed.
5415 Unnumbered environments indicated by an asterisk at the end.
5418 \begin_layout Enumerate
5419 amsart-seq: Here, numbering for each type of statement is in its own sequence,
5420 with no reference to the section number.
5421 There are also many (but not all) environments available unnumbered, which
5422 is occasionally needed.
5423 Unnumbered environments indicated by an asterisk at the end.
5426 \begin_layout Enumerate
5427 amsart-plain: This one is even more terse, since all the environments are
5431 \begin_layout Enumerate
5432 amsbook: the standard AMS book (really, monograph) format.
5433 Numbering is similar to the amsart layout, except that all numbering is
5435 \begin_inset Formula $(n.m.p)$
5438 , where the first number refers to the chapter, the second to the section,
5439 and the third is the number of the results (Theorems, Corollaries, Propositions
5440 , Definitions and Remarks, etc.) in that section.
5441 There are also many (but not all) environments available unnumbered, which
5442 is occasionally needed.
5443 Unnumbered environments indicated by an asterisk at the end.
5446 \begin_layout Standard
5447 Any AMS LyX file can be converted to either of the numbering schemes by
5448 simply changing the document class in the
5453 ocument\SpecialChar \menuseparator
5464 \begin_layout Subsection
5465 What these layouts provide
5468 \begin_layout Standard
5469 There is a long list of included environments provided by these layouts.
5470 Most mathematical papers or books will set as special statements most of
5471 these environments, in AMS-LaTeX there is an opportunity to define an unlimited
5472 variety of such declarations.
5473 However, the AMS recommends the environments that are available in LyX.
5474 The list of environments (not counting the standard environments such as
5477 sections, bibliography, title, author, date
5482 \begin_layout Description
5483 Theorem This is typically used for the statements of major results.
5485 \begin_inset Quotes eld
5493 \begin_inset Quotes erd
5496 appears in bold type, along with an automatically-determined number (an
5501 , is also available).
5502 The text is italicized.
5505 \begin_layout Description
5506 Corollary This is used for statements which follow fairly directly from
5507 previous statements.
5508 Again, these can be major results.
5516 \begin_layout Description
5517 Lemma These are smaller results needed to prove other statements.
5520 \begin_layout Description
5521 Proposition These are less major results which (hopefully) add to the general
5522 theory being discussed.
5525 \begin_layout Description
5526 Conjecture These are statements provided without justification, which the
5527 author does not know how to prove, but which seem to be true (to the author,
5531 \begin_layout Description
5532 Criterion A required condition.
5535 \begin_layout Description
5536 Algorithm A general procedure to be used.
5539 \begin_layout Description
5540 Axiom This is a property or statement taken as true within the system being
5544 \begin_layout Description
5545 Definition Guess what this is for.
5546 The font, both on-screen and in the output, is different for this environment
5547 than for the previous ones.
5549 \begin_inset Quotes eld
5553 \begin_inset Quotes erd
5556 ) is still set in boldface, along with the number, if any, but the rest
5560 \begin_layout Description
5561 Example Typeset similarly to Definition.
5564 \begin_layout Description
5568 \begin_layout Description
5572 \begin_layout Description
5576 \begin_layout Description
5577 Remark This environment is also a new type of theorem.
5578 This is set with the word Remark in italics, and the rest upright.
5581 \begin_layout Description
5582 Note Set similarly to the Remark environment.
5585 \begin_layout Description
5589 \begin_layout Description
5593 \begin_layout Description
5597 \begin_layout Description
5601 \begin_layout Description
5602 Case Generally, these are used to break up long arguments, using specific
5603 instances of some condition.
5604 The numbering scheme for cases is on its own, not together with other numbered
5609 \begin_layout Description
5613 \begin_layout Description
5617 \begin_layout Description
5619 \begin_inset Quotes eld
5627 \begin_inset Quotes erd
5630 is set in italics, but the rest is set upright.
5631 At the end of this environment (other environments can be nested within
5632 this one, of course) a QED symbol (usually a square, but it can vary with
5633 different styles) is placed.
5636 \begin_layout Description
5637 Address This should be the author's permanent address.
5640 \begin_layout Description
5641 Current\InsetSpace ~
5642 Address This should be the author's temporary address at the time
5643 of submission, if different from the Address.
5646 \begin_layout Description
5647 Email Author's e-mail address
5650 \begin_layout Description
5651 URL Author's Web address, if desired.
5654 \begin_layout Description
5655 Keywords Key words or phrases used to identify specific topics discussed
5659 \begin_layout Description
5660 Subjectclass These refer to the AMS Subject Classifications, published and
5663 Mathematical Reviews
5666 These are also available online at the AMS cites listed above.
5669 \begin_layout Description
5673 \begin_layout Description
5677 \begin_layout Description
5681 \begin_layout Standard
5682 In addition, these environments automatically provide the AMS LaTeX and
5684 They need to be available on your system in order to use these environments.
5687 \begin_layout Section
5691 \begin_layout Standard
5696 can be used to type letters according to German conventions.
5697 A template file is included in
5699 .../lyx/share/templates
5701 for you to use as a starting point.
5704 \begin_layout Section
5708 \begin_layout Standard
5713 provides an alternative to the standard
5718 It provides similar functionality, but you might prefer this layout with
5719 sans serif sections, headings, and more.
5722 \begin_layout Section
5726 \begin_layout Standard
5732 \begin_layout Subsection
5736 \begin_layout Standard
5737 This section describes how LyX can be used to write articles for submission
5738 to the scientific journal
5740 Astronomy and Astrophysics
5743 \begin_inset LatexCommand \url[www.edpsciences.fr/aa/]{http://www.edpsciences.fr/aa/}
5755 Version 5.01 of the document class
5760 This package can be downloaded from the ftp site
5763 \begin_layout Standard
5764 \begin_inset VSpace medskip
5770 \begin_layout Standard
5772 \begin_inset LatexCommand \url{ftp://ftp.edpsciences.org/pub/aa/readme.html}
5779 \begin_layout Standard
5780 \begin_inset VSpace medskip
5786 \begin_layout Standard
5787 A manual comes together with that package, and this text is not meant to
5788 replace the original manual but merely a short guide how to realize the
5789 correct form of your paper.
5793 \begin_layout Standard
5794 Please note that the publisher of the journal was changed from Springer
5795 to EDP Sciences starting January 1, 2001.
5796 That change implicated also some slight changes of the style files, namely
5797 the removal of the thesaurus command.
5798 The LyX class aa supports the newest version of these style files, V 5.01.
5799 If you have an older version installed, please upgrade.
5800 For compatibility, the old (version 4) layout has been kept as
5805 Please refer to the comments in
5807 LyXDir/layouts/aapaper.layout
5812 \begin_layout Subsection
5816 \begin_layout Standard
5817 It is recommended you start from the example template distributed with LyX.
5818 If you are not using a template, note the following settings:
5821 \begin_layout Itemize
5831 ocument\SpecialChar \menuseparator
5838 dialog (OK, that one was obvious).
5841 \begin_layout Itemize
5842 Don't change the option
5852 The whole layout is done by the macros, you shouldn't change anything.
5855 \begin_layout Subsection
5859 \begin_layout Standard
5860 First thing to enter is the header information.
5861 It consists of seven entries, of which some are optional.
5865 \begin_layout Itemize
5873 \begin_layout Itemize
5881 \begin_layout Itemize
5889 \begin_layout Itemize
5897 \begin_layout Itemize
5902 : [optional] if more than one author: whom to contact for offprint requests.
5905 \begin_layout Itemize
5910 : [optional] mail address for contacts.
5913 \begin_layout Itemize
5921 Received: <date>; Accepted <date>
5924 \begin_layout Standard
5925 There is no need to issue the
5931 command, this is done automatically by LyX when the header is finished.
5932 Although the order of the single header entries doesn't matter it is advised
5933 to keep the above sequence, just to get the best optics and meets the layout
5934 of the real document.
5937 \begin_layout Standard
5938 If you want to place footnotes in the header block, e.g.
5942 \begin_layout Standard
5951 to state your present address, just use the standard footnote via
5956 nsert\SpecialChar \menuseparator
5964 LyX will automagically use the term
5973 \begin_layout Standard
5974 In addition to these topics, the macros use three additional LaTeX commands
5975 that have no counterpart in LyX:
5978 \begin_layout Itemize
5985 to separate different names for more than one author and institute, respectivel
5989 \begin_layout Itemize
5996 to mark corresponding author/institute pairs.
5997 The institutes are numbered sequentially as they appear in the
6001 field, so you have to put a marker to each author.
6004 \begin_layout Itemize
6011 to supply an email address for fast contact.
6014 \begin_layout Standard
6015 In all cases, the appropriate command has to be entered in LyX an marked
6021 \begin_layout Subsection
6025 \begin_layout Standard
6026 The abstract should immediately follow the header block.
6027 With version 5 the abstract environment was changed to a command, and there
6028 is now a resctriction to only one paragraph.
6029 In addition, it should contain an entry with the keywords.
6030 This is not yet implemented for LyX, therefore you have to enter the LaTeX
6037 by hand and mark it as LaTeX code.
6038 Refer to the example paper.
6041 \begin_layout Subsection
6042 Supported environments
6045 \begin_layout Standard
6046 The A&A paper layout supports the following environments for structuring
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 Itemize
6116 \begin_layout Itemize
6122 \begin_layout Subsection
6123 Commands not supported by LyX
6126 \begin_layout Standard
6127 Some commands are not yet supported by the
6132 Some have already been mentioned.
6133 For the sake of completeness, they are listed all together here:
6136 \begin_layout Itemize
6144 \begin_layout Itemize
6152 \begin_layout Itemize
6160 \begin_layout Itemize
6168 \begin_layout Itemize
6176 \begin_layout Itemize
6184 \begin_layout Itemize
6192 \begin_layout Itemize
6200 \begin_layout Standard
6201 If you want to use any of these commands, you have to enter them yourself.
6204 Do not forget to mark them as LaTeX code!
6207 \begin_layout Subsection
6208 Figure and Table Floats
6211 \begin_layout Standard
6212 LyX provides support for the necessary float environments
6214 figure, figure*, table
6220 , therefore we won't tell much about it here.
6227 Just remember that tables should be left-aligned.
6228 For that, select the table and change the alignment in
6233 dit\SpecialChar \menuseparator
6238 aragraph\InsetSpace ~
6242 \begin_layout Standard
6247 only one special thing: the figures with caption besides the figure.
6248 To create such a figure, you have to do the following:
6251 \begin_layout Enumerate
6252 Create a wide figure float:
6257 nsert\SpecialChar \menuseparator
6262 t\SpecialChar \menuseparator
6265 , then right click in the figure and select
6277 \begin_layout Enumerate
6278 Enter your caption text.
6281 \begin_layout Enumerate
6286 to move the cursor above the caption.
6289 \begin_layout Enumerate
6293 \begin_layout Enumerate
6294 Position the cursor behind the figure and insert a horizontal fill:
6299 nsert\SpecialChar \menuseparator
6307 \SpecialChar \menuseparator
6310 orizontal\InsetSpace ~
6316 \begin_layout Enumerate
6317 Switch to LaTeX mode:
6325 \begin_layout Enumerate
6335 Do not close the brace!
6338 \begin_layout Enumerate
6339 Position the cursor behind the caption text, switch to LaTeX mode and insert
6350 \begin_layout Standard
6351 Also, refer to the figures in the example paper.
6354 \begin_layout Subsection
6358 \begin_layout Standard
6359 For submission, the paper has to be formated in a special double-spacing
6361 For this purpose, you have to give the option
6365 to the documentclass.
6366 This must be done using the extra class options field in the
6371 ocument\SpecialChar \menuseparator
6379 Just enter the string
6386 \begin_layout Subsection
6390 \begin_layout Standard
6395 directory contains an example paper written with LyX.
6396 It is the example paper from the original macro package, translated to
6398 Use it for inspiration, and compare the original LaTeX code with LyX way
6402 \begin_layout Section
6406 \begin_layout Standard
6412 \begin_layout Subsection
6416 \begin_layout Standard
6417 AASTeX is a set of macros produced by the American Astronomical Society
6418 to facilitate electronic manuscript submission to the three journals they
6419 publish: the Astrophysical Journal (including the Letters and Supplement),
6420 the Astronomical Journal, and the Publications of the Astronomical Society
6422 LyX has proven to be an excellent tool for generating these documents,
6423 especially given its equation, citation, and figure handling capabilities.
6424 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
6425 is the version described here, or higher.
6426 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
6427 incompatible with LyX.
6428 The AASTeX package may be downloaded from the AASTeX Web site
6431 \begin_layout Standard
6432 \begin_inset VSpace medskip
6438 \begin_layout Standard
6440 \begin_inset LatexCommand \url{http://www.journals.uchicago.edu/AAS/AASTeX}
6447 \begin_layout Standard
6448 \begin_inset VSpace medskip
6454 \begin_layout Standard
6455 A complete user guide is contained in that package and you should familiarize
6456 yourself with it thoroughly before embarking on writing a paper in LyX.
6457 LyX will not reduce the need to figure out all the AASTeX commands, it
6458 will only reduce the drudgery of typing everything in.
6459 It is your responsibility to ensure that the final exported LaTeX document
6460 conforms completely to the requirements of the journal to which you are
6461 submitting your paper.
6464 \begin_layout Subsection
6465 Starting a New Paper
6468 \begin_layout Standard
6469 I strongly suggest that you start with the AASTeX template file.
6475 ile\SpecialChar \menuseparator
6482 , enter the new file name, then choose the
6487 This will show the most common fields found in a manuscript.
6488 Simply overwrite the existing text (including the brackets,
6492 ) with the correct information.
6493 Many of the AASTeX commands and environments can be implemented directly
6494 in LyX, but some cannot: most noticeably
6506 , which should stick out like a sore thumb if you actually just opened the
6508 For commands such as these, the LaTeX code must be entered directly and
6510 Such commands are referred to as ERT, or Evil Red Text.
6511 I tried to minimize the amount of ERT needed in an AASTeX document, but
6512 there is still a bit more required than any of us would like.
6515 \begin_layout Subsection
6516 Finishing Your Paper
6519 \begin_layout Standard
6520 When the paper is finished to your satisfaction and previews/prints correctly,
6522 \begin_inset Quotes eld
6526 \begin_inset Quotes erd
6529 actions which need to be done before you submit it to the journals.
6533 \begin_layout Enumerate
6534 Export your paper as a LaTeX file (
6539 ile\SpecialChar \menuseparator
6544 xport\SpecialChar \menuseparator
6555 \begin_layout Enumerate
6560 file with your favorite text editor
6564 \begin_layout Enumerate
6565 remove the comment lines before the
6574 \begin_layout Enumerate
6579 usepackage...{fontenc}
6581 line if it appears (usually just after
6596 \begin_layout Enumerate
6597 remove everything between (and including) the
6609 commands, except for any commands you specifically put into the LaTeX preamble
6610 (which should appear immediately after the
6611 \begin_inset Quotes eld
6614 User specified LaTeX commands
6615 \begin_inset Quotes erd
6626 \begin_layout Enumerate
6627 Run the resulting file through LaTeX to make sure it still processes correctly.
6630 \begin_layout Enumerate
6631 Reread the journal requirements to make sure your filenames and formats
6635 \begin_layout Enumerate
6639 \begin_layout Subsection
6640 Comments On Specific Commands
6643 \begin_layout Standard
6644 I will not describe the detailed usage of the individual AASTeX commands:
6645 the AASTeX User Guide (
6649 ) gives a good description of each.
6650 Thus it's probably easiest for me to go down the list as found in the guide
6651 and offer comments where necessary.
6652 So let's begin \SpecialChar \ldots{}
6656 \begin_layout Subsubsection
6657 Things that work as expected
6660 \begin_layout Standard
6664 \begin_layout Standard
6676 \begin_layout Standard
6677 Because they work as you might expect, I simply list them and the section
6778 begin{thebibliography}
6786 (2.13.2), all the cite commands and their variations (2.13.2), the generic
6787 graphicx figure commands (2.14.1),
6811 (2.15.4, amongst other places),
6838 \begin_layout Standard
6839 The following style options also work correctly:
6860 Simply put them in the
6866 Layout\SpecialChar \menuseparator
6872 \begin_layout Standard
6876 \begin_layout Standard
6888 \begin_layout Subsubsection
6889 Things that work, but require more comment
6892 \begin_layout Standard
6893 The following items work, but require a little more discussion:
6896 \begin_layout Itemize
6897 These items are reserved for use by the journal editors, but you can put
6898 them into the LaTeX preamble if you feel compelled to do so:
6931 \begin_layout Itemize
6932 These items may be placed in the LaTeX preamble, and are included as blanks
6933 in the template file:
6954 \begin_layout Itemize
6961 (2.3) -- can only be used
6962 \begin_inset Quotes eld
6966 \begin_inset Quotes erd
6969 , not in the middle of a paragraph.
6970 Use ERT if you need to embed it.
6973 \begin_layout Itemize
6980 (2.3) -- will have extra {} after it.
6981 This should not cause an error.
6984 \begin_layout Itemize
6991 (2.6) -- can only be used
6992 \begin_inset Quotes eld
6996 \begin_inset Quotes erd
6999 , not in the middle of a paragraph.
7000 Use ERT if you need to embed it.
7003 \begin_layout Itemize
7010 (2.8) -- can't insert a cross-reference tag, you must type the tag name
7014 \begin_layout Itemize
7021 (2.8) -- same as for
7028 \begin_layout Itemize
7035 (2.9) -- will have extra {} after it.
7036 This should not cause an error.
7039 \begin_layout Itemize
7046 (2.11) -- will have extra {} after it.
7047 This should not cause an error.
7050 \begin_layout Itemize
7057 (2.14.2) -- you can insert an optional filename argument by placing the cursor
7058 at the beginning of the text and selecting
7060 Insert\SpecialChar \menuseparator
7065 \begin_inset Quotes eld
7069 \begin_inset Quotes erd
7072 inserts an optional argument of the type needed by
7079 Hopefully it will be renamed someday.
7082 \begin_layout Itemize
7095 for the catalog ID optional parameter
7098 \begin_layout Itemize
7111 for the catalog ID optional parameter
7114 \begin_layout Subsubsection
7115 Things not implemented, use ERT
7118 \begin_layout Standard
7122 \begin_layout Standard
7134 \begin_layout Standard
7157 setcounter{equation}
7159 (2.12), Journal name abbreviations (2.13.4),
7195 (2.15.4, insert it as the first element in the lefthand cell after where
7197 Don't use any of LyX's rules in the table),
7209 (2.15.5), much of Misc (2.17, except
7260 \begin_layout Standard
7264 \begin_layout Standard
7276 \begin_layout Subsubsection
7277 Things that cannot be implemented
7280 \begin_layout Standard
7281 \SpecialChar \ldots{}
7282 at least in any meaningful sort of way, so I suggest ignoring them.
7283 They are the references environment (2.13.3), and the deluxetable environment
7285 If you really, really need to use deluxetable, I suggest editing it in
7286 a separate file with a text editor, then using
7291 nsert\SpecialChar \menuseparator
7299 to include it in your LyX document.
7304 file to see an example of this.
7307 \begin_layout Subsection
7308 FAQs, Tips, Tricks, and Other Ruminations
7311 \begin_layout Subsubsection
7312 Getting LyX and AASTeX to cooperate
7315 \begin_layout Standard
7316 It can be a bit tricky to get LyX to recognize a new layout and document
7318 When all else fails, do this:
7321 \begin_layout Enumerate
7322 Make certain that LaTeX can find AASTeX.
7323 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
7324 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
7331 \begin_layout Enumerate
7338 /usr/.../share/lyx/layouts
7347 \begin_layout Enumerate
7353 ools\SpecialChar \menuseparator
7360 in LyX, then restart LyX.
7363 \begin_layout Enumerate
7364 Open a regular new file, not from a template.
7365 Does AASTeX appear in the class list in
7370 ocument\SpecialChar \menuseparator
7380 \begin_layout Standard
7381 If you get a warning from an existing AASTeX document about not being able
7382 to find the AASTeX layout or a message about
7383 \begin_inset Quotes eld
7386 You should not mix title layouts with normal ones
7387 \begin_inset Quotes erd
7390 , things haven't been installed correctly.
7393 \begin_layout Subsubsection
7394 LaTeX error processing a table
7397 \begin_layout Standard
7398 LyX, by default, attempts to center the table caption/title.
7399 This seems to produce a bad interaction in AASTeX so you should click somewhere
7400 in the caption/title, then select
7405 dit\SpecialChar \menuseparator
7410 aragraph\InsetSpace ~
7425 This took care of it for me.
7428 \begin_layout Subsubsection
7430 \begin_inset LatexCommand \label{cite}
7437 \begin_layout Standard
7438 A couple of things: 1) I have noticed some funny spacing in the reference
7439 entries in the text.
7440 When you enter the bibliography item data, make sure their is
7444 space between the last author and the parenthesis setting off the year;
7459 2) Entering the references at all is not obvious.
7460 The easiest thing is to start typing your first reference at the end of
7461 the document, then mark it as type
7466 That will put a small gray box in front of what you just typed.
7467 Click on the box to fill in the rest of the information.
7468 For new references, go to the end of an existing reference and press return.
7469 That will create a new line with its own box, etc.
7472 \begin_layout Subsubsection
7476 \begin_layout Standard
7477 Even though AASTeX provides its own figure commands (
7483 , for example), I much prefer LaTeX's standard figure commands (with the
7492 commands as ERT into a Figure Float box if you desire, but I never
7493 have much luck getting the layout right.
7494 With the standard graphics, LyX will insert a
7498 usepackage{graphicx}
7500 command into the LaTeX preamble and handle the figures in the standard
7501 LaTeX2e way, interspersing the figures in the text.
7502 I believe ApJ accepts figures exactly this way now; AJ might still use
7504 \begin_inset Quotes eld
7507 stack everything at the end
7508 \begin_inset Quotes erd
7514 \begin_layout Subsubsection
7515 Things I could have done, but didn't
7518 \begin_layout Standard
7520 \begin_inset Quotes eld
7524 \begin_inset Quotes erd
7527 things I could have implemented, but chose not to.
7528 For instance, I saw no point in double-spacing the text in the LyX window,
7529 even though it is double-spaced in the paper manuscript.
7530 Also, I chose not to make separate layouts for the preprint and preprint2
7532 Since I assume you will spend most of your time in the plain manuscript
7533 mode anyway, I decided not to chew up more disk space with this.
7537 \begin_layout Subsection
7541 \begin_layout Standard
7542 Your mileage may vary.
7543 I've now had papers published by both ApJ and AJ that have had 98% of the
7544 effort done in LyX; the last 2% was the LaTeX post-processing and a few
7546 I have had no trouble with the submission process, and I'm sure the journals
7547 were never aware that there might be a difference.
7548 So, go forth and publish!
7551 \begin_layout Section
7555 \begin_layout Standard
7558 Panayotis Papasotiriou
7561 \begin_layout Subsection
7565 \begin_layout Standard
7566 The ijmpc package is a set of macros that facilitates electronic manuscript
7569 International Journal of Modern Physics C
7572 Similarly, the ijmpd package is for creating manuscripts to be submitted
7575 International Journal of Modern Physics D
7578 Both journals are published by World Scientific.
7579 The corresponding document classes are named
7588 These files, together with instructions for the authors, can be downloaded
7590 \begin_inset LatexCommand \url{http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml}
7595 \begin_inset LatexCommand \url{http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml}
7600 Both packages are modified versions of the standard
7601 \begin_inset Quotes eld
7605 \begin_inset Quotes erd
7608 package, and they are almost (but not exactly) identical.
7609 Most of their features are supported by LyX.
7610 I have used LyX successfully to write articles submitted to both journals
7611 without any problem.
7614 \begin_layout Subsection
7618 \begin_layout Standard
7619 As usual, the easiest way to write a paper is to start with a template.
7625 ile\SpecialChar \menuseparator
7641 This will give an (almost) empty document that includes the most common
7642 fields found in a manuscript.
7643 Simply overwrite the existing text (including the brackets,
7648 You should keep in mind the following remarks.
7651 \begin_layout Enumerate
7652 LyX won't let you change the font size and the page style of the document,
7653 because such modifications are not allowed by both packages.
7656 \begin_layout Enumerate
7657 The language of the document should not be changed.
7658 Before previewing your paper, be sure that the babel package is not used.
7659 To do this, click on
7664 ools\SpecialChar \menuseparator
7682 checkbox in the language settings, and click on
7693 , if you wish to make this change permanent).
7696 \begin_layout Enumerate
7698 \begin_inset Quotes eld
7702 \begin_inset Quotes erd
7705 style must be used to define keywords.
7708 \begin_layout Enumerate
7709 The ijmpc package provides a style named
7710 \begin_inset Quotes eld
7713 Classification Codes
7714 \begin_inset Quotes erd
7717 , which can be used to define classification codes, such as PACS numbers.
7718 Note that this facility is not supported by the ijmpd package.
7721 \begin_layout Enumerate
7722 Several new environments are available:
7723 \begin_inset Quotes eld
7727 \begin_inset Quotes erd
7731 \begin_inset Quotes eld
7735 \begin_inset Quotes erd
7739 \begin_inset Quotes eld
7743 \begin_inset Quotes erd
7747 \begin_inset Quotes eld
7751 \begin_inset Quotes erd
7755 \begin_inset Quotes eld
7759 \begin_inset Quotes erd
7763 \begin_inset Quotes eld
7767 \begin_inset Quotes erd
7771 \begin_inset Quotes eld
7775 \begin_inset Quotes erd
7779 \begin_inset Quotes eld
7783 \begin_inset Quotes erd
7787 \begin_inset Quotes eld
7791 \begin_inset Quotes erd
7795 \begin_inset Quotes eld
7799 \begin_inset Quotes erd
7803 \begin_inset Quotes eld
7807 \begin_inset Quotes erd
7811 \begin_inset Quotes eld
7815 \begin_inset Quotes erd
7819 \begin_inset Quotes eld
7823 \begin_inset Quotes erd
7827 \begin_inset Quotes eld
7831 \begin_inset Quotes erd
7835 Their use is more or less obvious.
7836 LyX supports all these environments; it will use the proper label, text
7837 style, and numbering scheme for each of them.
7840 \begin_layout Enumerate
7841 Both packages use basic citations; the natbib package should not be used.
7842 In LyX, citation references are shown as usual; in the output, citations
7843 are shown as superscripts.
7844 If you want to use a citation as normal text, you should use the
7849 \begin_inset Quotes eld
7852 See Ref.\InsetSpace ~
7860 \begin_inset Quotes erd
7866 \begin_layout Enumerate
7868 \begin_inset Quotes eld
7872 \begin_inset Quotes erd
7875 section in both packages.
7876 To put acknowledgments, just use the
7877 \begin_inset Quotes eld
7881 \begin_inset Quotes erd
7887 \begin_layout Enumerate
7888 Appendices may be added to the paper,
7892 the Acknowledgments and
7897 LyX provides a special environment, called
7898 \begin_inset Quotes eld
7902 \begin_inset Quotes erd
7905 which marks the beginning of the appendices.
7906 This environment should be left blank; it just sends a LaTeX command, but
7907 nothing is really printed.
7909 \begin_inset Quotes eld
7913 \begin_inset Quotes erd
7916 is printed with blue letters, as a signal that all sections after that
7917 point are appendices.
7918 To write an appendix, use the
7919 \begin_inset Quotes eld
7923 \begin_inset Quotes erd
7927 LyX will number each appendix with capital letters, as required by both
7930 \begin_inset Quotes eld
7934 \begin_inset Quotes erd
7941 be present before the first appendix; if not, all appendices will be numbered
7942 as normal sections in the output.
7945 \begin_layout Enumerate
7946 The ijmpc and the ijmpd packages use the
7950 command to implement table captions.
7951 As a result, a table created by LyX is printed correctly, but its caption
7953 However, you can use some ERT to overpass this problem, so that captions
7954 are printed as expected.
7955 To do so, create a float table as usual, remove the caption, and replace
7966 (sic); you must also the ERT
7970 immediately after the tabular material.
7971 Study the example table included in the template files to see how this
7972 trick is implemented.
7973 Alternatively, If you need table captions, you should implement the whole
7978 file, then include this file to the LyX document (
7983 nsert\SpecialChar \menuseparator
7988 \SpecialChar \menuseparator
7997 Details on how to create a table float can be found in the files
8005 , included in the corresponding packages.
8008 \begin_layout Subsection
8009 Preparing a paper for submission
8012 \begin_layout Standard
8013 Before you submit your paper you must export the LyX document as a LaTeX
8019 ile\SpecialChar \menuseparator
8024 xport\SpecialChar \menuseparator
8031 ), then make the following changes to the resulting
8038 \begin_layout Enumerate
8039 Remove the comment lines before the
8048 \begin_layout Enumerate
8049 Remove everything between (and including) the
8061 commands, except for any commands you specifically put into the LaTeX preamble.
8064 \begin_layout Standard
8069 file should be saved and processed through LaTeX as many times as necessary.
8070 You may also want to check the resulting
8077 \begin_layout Subsection
8081 \begin_layout Standard
8082 The use of ERT is reduced to two commands, which must be placed at the top
8084 If you started writing your paper by using the
8092 template, the ERT needed is already in its place; you usually don't need
8094 You may only modify the first ERT to specify the information printed to
8095 the top of odd and even pages (authors' names and short paper's title,
8097 This ERT must have the form
8101 markboth{Authors' Names}{Short Paper's Title}
8106 \begin_layout Section
8110 \begin_layout Standard
8113 Panayotis Papasotiriou
8116 \begin_layout Subsection
8120 \begin_layout Standard
8121 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
8122 that facilitates electronic manuscript submission to the journals they
8124 Most known of them (at least in my domain of interest) are
8126 Astrophysics and Space Science
8132 , but there are many others (see a complete list at
8133 \begin_inset LatexCommand \url{http://www.wkap.nl/jrnllist.htm/JRNLHOME}
8138 The Kluwer package may be downloaded from the site
8139 \begin_inset LatexCommand \url{http://www.wkap.nl/kaphtml.htm/STYLEFILES}
8144 A complete user guide is contained in that package (but it can also be
8145 downloaded separately).
8148 \begin_layout Standard
8149 LyX supports many features of the package but not everything.
8150 However, the ERT needed is reduced to some
8151 \begin_inset Quotes eld
8155 \begin_inset Quotes erd
8158 commands of the package (see\InsetSpace ~
8160 \begin_inset LatexCommand \ref{subsec:kluwer_peculiarities}
8165 I have recently used LyX to write an article submitted to the
8167 Astrophysics and Space Science
8169 without any problem.
8172 \begin_layout Subsection
8176 \begin_layout Standard
8177 The easiest way to write a paper is to start with the Kluwer template file.
8180 File\SpecialChar \menuseparator
8192 This will give an (almost) empty document that includes the most common
8193 fields found in a manuscript and a short description of their use.
8194 As in most templates, simply overwrite the existing text (including the
8199 ) with the correct information.
8202 \begin_layout Subsection
8203 Preparing a paper for submission
8206 \begin_layout Standard
8207 As in the AASTeX package, before you submit your paper to a journal you
8209 \begin_inset Quotes eld
8213 \begin_inset Quotes erd
8219 \begin_layout Enumerate
8220 Export your paper as a LaTeX file.
8221 To do this, click on
8226 ile\SpecialChar \menuseparator
8231 xport\SpecialChar \menuseparator
8242 \begin_layout Enumerate
8247 file with a text editor and make the following changes
8251 \begin_layout Enumerate
8252 remove the comment lines before the
8261 \begin_layout Enumerate
8262 remove everything between (and including) the
8274 commands, except for any commands you specifically put into the LaTeX preamble.
8277 \begin_layout Standard
8286 \begin_layout Enumerate
8291 file through LaTeX as many times as necessary (usually up to three).
8294 \begin_layout Enumerate
8299 document using, e.g.,
8303 , and check if everything is ok (it should, if you didn't make any mistake).
8306 \begin_layout Subsection
8307 \begin_inset Quotes eld
8311 \begin_inset Quotes erd
8314 of the Kluwer package
8315 \begin_inset LatexCommand \label{subsec:kluwer_peculiarities}
8322 \begin_layout Standard
8323 The Kluwer package has the following
8324 \begin_inset Quotes eld
8328 \begin_inset Quotes erd
8334 \begin_layout Enumerate
8335 It is possible to write multiple articles in the same LaTeX file
8339 \begin_layout Standard
8340 I can't imagine any good reason to do this.
8346 Each article must be included in the environment
8347 \begin_inset Quotes eld
8351 \begin_inset Quotes erd
8355 Unfortunately, this environment cannot be omitted, even if you write just
8357 Therefore, each article starts with the command
8363 and, obviously, ends with the command
8370 Although this can be implemented in LyX, I didn't included it, since it
8371 looks ugly and can confuse the novice user.
8372 Therefore, you need to enter them directly and mark them as LaTeX code
8374 \begin_inset Quotes eld
8378 \begin_inset Quotes erd
8384 \begin_layout Enumerate
8385 Information given at the beginning of the article (i.e., title, subtitle,
8386 author, institution, running title, running author, abstract and keywords)
8387 must be included in an environment called
8388 \begin_inset Quotes eld
8392 \begin_inset Quotes erd
8396 This is not implemented in LyX, so you must enter title, subtitle etc.
8397 between two ERT lines (
8412 \begin_layout Enumerate
8413 According to the user manual, the label of each bibliography item must be
8437 \begin_layout Standard
8442 template takes care of all these
8443 \begin_inset Quotes eld
8447 \begin_inset Quotes erd
8451 If you start a new paper using this template you don't need to do anything
8456 \begin_layout Enumerate
8457 don't delete the ERT included in the template, and
8460 \begin_layout Enumerate
8461 copy the example bibliography item included in the template and modify it
8462 as necessary to enter new bibliography items.
8465 \begin_layout Section
8469 \begin_layout Standard
8475 \begin_layout Subsection
8479 \begin_layout Standard
8480 The LyX document classes
8482 article (koma-script)
8486 report (koma-script)
8504 correspond to the LaTeX document classes
8521 of the Koma-Script family.
8522 They are replacements for the standard document classes
8538 , resp., and fit better to European typography conventions in a number of
8542 \begin_layout Itemize
8543 Standard character size is 11pt in
8545 article (koma-script)
8549 report (koma-script)
8557 letter (koma-script)
8562 \begin_layout Itemize
8563 Headings, labels of the description environment, and a number of elements
8566 letter (koma-script)
8568 document class are set in a bold sans serif font.
8572 \begin_layout Standard
8573 There is a big difference between the bold sans serif old cm fonts and new
8574 ec fonts, especially in the appearance of headings.
8575 In comparison, the ec bold sans serif fonts look a bit thin.
8576 Here the LaTeX package
8583 helps to produce the
8584 \begin_inset Quotes eld
8588 \begin_inset Quotes erd
8591 appearance when using the ec fonts.
8596 The numbering of chapter headings is made in the same way as the numbering
8597 of section headings, that is without the extra line
8598 \begin_inset Quotes eld
8601 Chapter\SpecialChar \ldots{}
8603 \begin_inset Quotes erd
8607 In addition, the appearance of the headings can be modified by using a
8608 number of options (in LyX to be entered in the field
8622 ayout\SpecialChar \menuseparator
8630 A detailed German description of these options can be found in the Koma-Script
8638 \begin_layout Itemize
8639 The main means in the Koma-Script document classes to design the type area
8648 (in LyX to be entered in the extra class options field in the dialog
8653 ocument\SpecialChar \menuseparator
8661 They make a clearer modification of page margins possible as do the options
8667 ocument\SpecialChar \menuseparator
8675 A detailed German description of these and other type area options can
8676 be found in the Koma-Script documentation
8683 \begin_layout Itemize
8684 The LaTeX document classes of the Koma-Script family define a number of
8685 additional commands.
8686 Those part of it which makes sense in LyX is implemented in corresponding
8690 \begin_layout Standard
8691 A detailed German description of the LaTeX document classes of the Koma-Script
8692 family can be found in the Koma-Script documentation
8700 \begin_layout Standard
8701 There is an English translation
8705 , but it is not a complete one.
8710 The following sections describe only those aspects, which are relevant
8714 \begin_layout Subsection
8715 article (koma-script), report (koma-script), and book (koma-script)
8718 \begin_layout Standard
8719 The document classes
8721 article (koma-script)
8725 report (koma-script)
8735 are implemented in the layout files
8748 They contain all the paragraph types of the corresponding standard document
8761 , resp., partly modified, with the exception of the LyX specific
8765 -type, which is replaced by the new
8769 -type having the same functionality.
8774 -Type there is a number of new paragraph types added.
8781 letter (koma-script)
8786 \begin_layout Itemize
8795 : are equivalents to
8803 , resp., additionally inserting an entry in the table of contents.
8812 are not contained in
8814 article (koma-script)
8819 \begin_layout Itemize
8836 , resp., additionally clearing running heads.
8843 article (koma-script)
8849 \begin_layout Standard
8862 report (koma-script)
8864 , but since this is identical to
8868 , is has not been implemented in LyX.
8876 \begin_layout Itemize
8881 : generates a heading directly above the following paragraph in the standard
8882 character size without affecting the structure of the document.
8885 \begin_layout Itemize
8894 are special captions which respect the different space settings needed for
8895 captions placed above or below an element (if you follow strict typographic
8896 rules, you might want to place table captions always above the table).
8897 You can also use the class option
8914 You need at least Koma-Script version 2.8q to use this.
8917 \begin_layout Itemize
8922 : can be used to set a bonmot, e.
8926 \begin_layout Standard
8939 \begin_layout Standard
8948 at the beginning of a chapter.
8949 If you use the optional argument (
8954 nsert\SpecialChar \menuseparator
8958 ), you can insert the dictum's author there.
8959 Dictum and author are separated by a line.
8960 You need at least Koma-Script version 2.8q to use this.
8967 article (koma-script)
8972 \begin_layout Standard
8973 The following types, together with the standard types
8985 , form the title area of the document.
8986 They must be entered ahead of the first
8987 \begin_inset Quotes eld
8991 \begin_inset Quotes erd
8998 \begin_layout Standard
8999 The corresponding LaTeX commands must appear before the
9010 When such a type is used more than once, the latter usage overwrites the
9011 former one, that means, for every type only the latest usage is valid.
9012 The order of the different types however has, like
9024 , no effect on the appearance of the produced document.
9027 \begin_layout Itemize
9032 : produces a centered paragraph above the ordinary title (
9044 ) for the subject of the document.
9047 \begin_layout Itemize
9052 : produces a centered paragraph below the ordinary title (
9064 ) for the publishers' name.
9067 \begin_layout Itemize
9074 report (koma-script)
9080 produces a centered paragraph on its own page behind the title page, or
9083 article (koma-script)
9085 produces a centered paragraph below the ordinary title (
9104 \begin_layout Itemize
9109 : produces a left aligned paragraph above the ordinary title (
9125 ) for a document`s head.
9128 \begin_layout Itemize
9133 : produces in a double-sided print in
9135 report (koma-script)
9141 a left-aligned paragraph at the top of the title page`s back or has no
9142 effect in a single-sided print or in
9144 article (koma-script)
9149 \begin_layout Itemize
9154 : produces in a double-sided print in
9156 report (koma-script)
9162 a left-aligned paragraph at the bottom of the title page`s back or has
9163 no effect in a single-sided print or in
9165 article (koma-script)
9170 \begin_layout Itemize
9175 : produces a special
9176 \begin_inset Quotes eld
9180 \begin_inset Quotes erd
9183 page ahead of the actual document containing a paragraph without special
9187 \begin_layout Standard
9188 The layout files for the document classes
9190 article (koma-script)
9194 report (koma-script)
9205 This is thought of as a place to define your own types.
9210 in your personal layout directory and edit the file!
9213 \begin_layout Subsection
9214 letter (koma-script)
9217 \begin_layout Standard
9221 \begin_layout Standard
9233 \begin_layout Standard
9237 letter (koma-script)
9239 is implemented in the layout file
9244 It contains all the paragraph types of the corresponding standard document
9249 , partly modified, with the exception of the LyX specific types
9261 type, which is replaced by the new
9266 In addition, it contains, in contrast to the standard document class, the
9284 Furthermore, there are a number of new letter specific types.
9287 \begin_layout Standard
9291 \begin_layout Standard
9303 \begin_layout Standard
9304 The appearance of the letter produced by this document class can be controlled
9305 by a number of LaTeX commands, which you can put in the LaTeX preamble.
9309 \begin_layout Standard
9310 For example, the standard appearance of the letter`s heading, consisting
9311 of name and address, is quite self-willed.
9313 \begin_inset Quotes eld
9317 \begin_inset Quotes erd
9320 heading is produced by the following LaTeX commands in the preamble:
9323 \begin_layout LyX-Code
9333 \begin_layout LyX-Code
9349 \begin_layout LyX-Code
9359 \begin_layout LyX-Code
9379 A detailed German description of such LaTeX commands can be found in the
9380 Koma-Script documentation
9385 With it, the letter's author can produce his personal letter layout.
9388 \begin_layout Standard
9397 define the beginning of the letter and must be used in every letter.
9398 To emphasize them in the LyX document class, they are marked with the letter
9409 It is possible to write any number of letters in one file.
9414 type produces a new letter using the same addressee and a
9418 type produces a new addressee.
9435 are ordinary paragraph types and can also be used several times in one
9436 and the same letter.
9439 \begin_layout Itemize
9444 : produces a paragraph for the addressee and implicitly defines the beginning
9448 \begin_layout Itemize
9453 : produces a paragraph for the form of address and implicitly produces a
9457 \begin_layout Itemize
9462 : produces a paragraph for a close.
9465 \begin_layout Itemize
9470 : produces a paragraph for a postscript.
9473 \begin_layout Itemize
9478 : produces a paragraph for a distribution list.
9481 \begin_layout Itemize
9486 : produces a paragraph for enclosures.
9489 \begin_layout Standard
9530 are input types provided with a label to enter information, which will
9531 be processed by the document class.
9535 \begin_layout Standard
9536 It could be seen as a matter of inconsequence, that the types
9544 described above are not such input types as well.
9545 Because of the special meaning of those types, however, I have implemented
9546 them as ordinary paragraph types with a one letter mark in the left margin.
9547 Moreover, it would affect my feeling of symmetry, if the
9555 type had such a serious different appearance.
9560 The types must be used ahead of the corresponding
9567 \begin_layout Standard
9568 An implementation of these types in a WYSIWYG fashion does not seem to make
9569 sense, because the real appearance of the produced letter does not only
9570 depend on the usage of the particular type, but also on other factors.
9571 For example, a signature entered in the
9575 type will in the standard behavior appear in the produced letter only,
9576 when in the same letter also a
9581 The entered value of the
9585 type will in the standard behavior not appear in the produced letter at
9587 The possibility to design the letter`s heading freely is already indicated
9588 in a footnote above.
9591 \begin_layout Standard
9592 The input types can also be used as empty paragraphs.
9593 This makes sense e.\InsetSpace ~
9604 type is not used at all, in the standard behavior the value of the
9608 type is used as signature, whereas if an empty
9612 type is used, no signature value is defined.
9615 \begin_layout Standard
9616 By using the input types it is possible to write a letter template, containing
9617 filled input types with your personal dates (name, address, etc.) and empty
9618 input types for other dates you want to enter.
9621 \begin_layout Itemize
9626 : sender's name, in the standard behavior appears as a centered paragraph
9627 in small caps in the letter`s heading.
9630 \begin_layout Itemize
9635 : sender's signature, in the standard behavior appears below the
9644 type is used, the value of the
9648 type appears instead.
9651 \begin_layout Itemize
9656 : sender's address, in the standard behavior appears in a centered paragraph
9657 in the letter`s heading below the sender's name.
9660 \begin_layout Itemize
9665 : sender's telephone number, in the standard behavior only sets the LaTeX
9675 \begin_layout Itemize
9680 : place of the letter`s making.
9683 \begin_layout Itemize
9688 : date of the letter`s making.
9697 , in the standard behavior, produce the place and the date in a right-aligned
9698 line below the addressee's field.
9703 type is used, neither place nor date appear, independent of the value of
9713 type is used, the date of the letter `s production is used.
9716 \begin_layout Itemize
9721 : sender`s back address, in the standard behavior appears above the addressee's
9722 field in a small sans serif font.
9725 \begin_layout Itemize
9730 : special mail information, in the standard behavior appears underlined
9731 above the addressee's field below the back address.
9734 \begin_layout Itemize
9739 : additional information, in the standard behavior appears on right side
9740 below the addressee`s field.
9743 \begin_layout Itemize
9748 : the letter's title, in the standard behavior appears in a big, bold, sans
9749 serif font above the subject.
9752 \begin_layout Itemize
9757 : the letter's subject, in the standard behavior appears in a bold font
9765 \begin_layout Standard
9786 produce a business letter like line above the
9790 line containing the fields
9791 \begin_inset Quotes eld
9795 \begin_inset Quotes erd
9799 \begin_inset Quotes eld
9803 \begin_inset Quotes erd
9807 \begin_inset Quotes eld
9811 \begin_inset Quotes erd
9815 \begin_inset Quotes eld
9819 \begin_inset Quotes erd
9823 \begin_inset Quotes eld
9827 \begin_inset Quotes erd
9831 \begin_inset Quotes eld
9835 \begin_inset Quotes erd
9839 For the date field, the value of the
9845 \begin_inset Quotes eld
9848 business letter types
9849 \begin_inset Quotes erd
9852 is used, the value of the
9856 type however does not appear, but only the LaTeX variable
9863 The ordinary output of place and date in a right-aligned line below the
9864 addressee`s field is suppressed.
9865 The types are implemented as input types provided with a label and must
9866 be used ahead of the corresponding
9873 \begin_layout Itemize
9881 \begin_layout Itemize
9889 \begin_layout Itemize
9897 \begin_layout Itemize
9905 \begin_layout Itemize
9913 \begin_layout Subsection
9914 The new letter class: letter (koma-script v.2)
9917 \begin_layout Standard
9920 Jürgen Spitzmüller
9923 \begin_layout Standard
9924 \begin_inset VSpace medskip
9930 \begin_layout Standard
9932 Koma-Script version 2.8 has introduced a new letter class
9936 which superceeds the now unsupported
9941 It has --- on the LaTeX side --- a completely new interface and is not
9942 compatible with the old class.
9943 Therefore, LyX supports both, though it is recommended to use the new class.
9946 \begin_layout Standard
9947 This class covers the same functionality as
9949 letter (koma-script),
9956 (receiver's address, same as
9973 will start a new letter (i.
9977 \begin_layout Standard
9990 \begin_layout Standard
9999 you can write several letters per document).
10000 New elements are sender's
10016 and the possibility to use a
10025 nsert\SpecialChar \menuseparator
10035 \begin_layout Standard
10036 The biggest improvement is, though, that the letter's layout is configurable
10037 at almost any needs.
10038 This can be done via the preamble or with a special style file (Letter
10039 Class Option, extension
10043 ), that will be read in as a class option.
10047 \begin_layout Standard
10048 The KOMA package comes with some default
10053 There is, for instance, a
10057 file that follows german typesetting rules, or a
10061 that provides the default layout of the old
10066 The latter can be loaded with the class option
10075 ayout\SpecialChar \menuseparator
10080 ocument\SpecialChar \menuseparator
10092 template that is included in LyX for examples.
10093 A detailed description is to be found in the Koma-Script documentation
10101 \begin_layout Subsection
10105 \begin_layout Standard
10106 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
10110 \begin_layout Itemize
10111 The chapter number of a
10115 type appears on a line of its own above the chapter heading instead of
10116 appearing in the same line ahead of it.
10117 The cause for that is the LyX internal behavior for the labeltype
10121 in the layout file.
10124 \begin_layout Itemize
10125 The headings of the types
10133 are only put in the
10134 \begin_inset Quotes eld
10138 \begin_inset Quotes erd
10141 LaTeX table of contents, but not in the LyX table of contents (
10146 ocument\SpecialChar \menuseparator
10158 \begin_layout Itemize
10159 The paragraphs in a
10163 document class appear in a skip separation mode, not indented.
10164 This is the standard behavior, no special LaTeX commands are needed for
10171 ocument\SpecialChar \menuseparator
10178 dialog the corresponding radio button indicates
10194 value always has the effect that extra LaTeX commands are inserted in the
10195 document to produce the gap, which is not what is wanted in this case.
10198 \begin_layout Section
10199 Springer Journals (
10206 \begin_layout Standard
10212 \begin_layout Subsection
10216 \begin_layout Standard
10217 These are the layout files for some of the journal formats used by Springer
10218 Verlag and listed on
10219 \begin_inset LatexCommand \url{http://www.springer.de/author/tex/help-journals.html}
10223 , where you should also go to fetch the class files (yes, these are LaTeX2e
10225 It is a modular system: the things common to all journals are implemented
10230 , which journal-specific layout files (such as, e.g.,
10234 for Journal of Geodesy) can include.
10237 \begin_layout Standard
10238 This means that implementing support for any other Springer journal on this
10239 list is as simple as writing your own
10247 file following the outline given in
10255 \begin_layout Standard
10256 It is reasonably well tested only for the Journal of Geodesy.
10265 come with the standard LyX distribution.
10266 Install the relevant class file (downloaded from Springer) in a proper
10267 directory, reconfigure LaTeX (in the teTeX case by running
10271 , as root if necessary --- doesn't LyX take care of this?), reconfigure
10272 LyX and it should work.
10275 \begin_layout Subsection
10279 \begin_layout Standard
10280 A large number of theorem-like styles ---
10286 \SpecialChar \ldots{}
10292 \begin_layout Standard
10295 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
10296 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
10299 See the Springer class file documentation for details.
10302 \begin_layout Subsection
10306 \begin_layout Itemize
10318 \begin_layout Itemize
10321 Probability Theory and Related Fields
10327 --- Jean-Marc Lasgouttes
10330 \begin_layout Standard
10331 Add your own, it isn't so hard!
10334 \begin_layout Subsection
10338 \begin_layout Standard
10339 These files are partly based on the older
10343 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
10344 file from Springer.
10349 layout, are now defunct.
10350 Jean-Marc Lasgouttes helped out big in making me find my way around the
10351 LyX layout file mechanism.
10354 \begin_layout Subsection
10358 \begin_layout Standard
10360 But probably less than in the old hacked-LaTeX
10367 \begin_layout Standard
10368 Limitations e.g.: does not display the number for theorem-like layouts, just
10372 \begin_layout Section
10380 \begin_layout Standard
10386 \begin_layout Subsection
10390 \begin_layout Standard
10391 These are the layout files for some of the journals of the American Geophysical
10393 It is assumed that you have both the AGU's own class files and AGUplus
10394 installed (everything to be found at
10395 \begin_inset LatexCommand \url{ftp://ftp.agu.org/journals/latex/journals}
10402 \begin_layout Subsection
10406 \begin_layout Standard
10416 They are still called this in the LyX GUI, though their LaTeX equivalents
10417 in the AGU classes are
10428 \begin_layout Standard
10429 Newly defined styles are
10466 These are mostly manuscript attributes and defined in the AGU class documentati
10470 \begin_layout Standard
10471 I suspect this is still badly incomplete.
10474 \begin_layout Subsection
10478 \begin_layout Standard
10495 \begin_layout Subsection
10499 \begin_layout Itemize
10502 Journal of Geophysical Research
10511 \begin_layout Standard
10512 Add your own, it isn't so hard! Look at the
10523 \begin_layout Subsection
10524 Bugs and things to remember
10527 \begin_layout Standard
10528 In order to use the new layouts, you must remember to do the following for
10532 \begin_layout Enumerate
10538 This can be done in the
10540 layout\SpecialChar \menuseparator
10545 document\SpecialChar \menuseparator
10549 (AGU articles are always in English, right? So
10553 choose a language.)
10556 \begin_layout Enumerate
10561 into the document's
10566 (Yes, this is a bug.)
10569 \begin_layout Enumerate
10570 Make sure you use the
10574 bibliography style, by entering
10578 into the second field of the BibTeX inset.
10579 None of the standard styles will do.
10582 \begin_layout Section
10590 \begin_layout Standard
10596 \begin_layout Subsection
10600 \begin_layout Standard
10601 This is the layout file for the European Geophysical Society journals.
10606 can be downloaded from the web site of the EGS under
10607 \begin_inset LatexCommand \url{www.copernicus.org}
10614 \begin_layout Subsection
10618 \begin_layout Standard
10621 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
10629 The current layout file is unfortunately very unmodular and would benefit
10630 from using the various
10637 \begin_layout Section
10643 \begin_inset LatexCommand \label{sec:slitex}
10650 \begin_layout Standard
10658 \begin_layout Subsection
10662 \begin_layout Standard
10663 This section describes how to use LyX to make slides for overhead projectors.
10664 There are two document classes that can do this: the default slides class
10670 This section documents the former.
10673 \begin_layout Standard
10674 I'm going to say this again, nice and clear, so that there's no misunderstanding
10678 \begin_layout Standard
10679 \begin_inset VSpace bigskip
10685 \begin_layout Standard
10689 This section documents the class
10690 \begin_inset Quotes eld
10698 \begin_inset Quotes erd
10706 \begin_layout Standard
10707 \begin_inset VSpace bigskip
10713 \begin_layout Standard
10714 If you're looking for the documentation for
10715 \begin_inset Quotes eld
10723 \begin_inset Quotes erd
10726 , check out section\InsetSpace ~
10728 \begin_inset LatexCommand \ref{sec:foiltex}
10738 \begin_inset Quotes eld
10746 \begin_inset Quotes erd
10749 ] is actually somewhat better than the default
10757 \begin_layout Standard
10758 \SpecialChar \ldots{}
10759 or so I've been told repeatedly by its advocates.
10760 Having never used it, I have no idea if this claim is true or not.
10765 which this section documents.
10768 \begin_layout Standard
10769 This class is the LaTeX2e improvement of the old
10774 Every LaTeX2e distribution includes this class [which I'll just refer to
10776 \begin_inset Quotes eld
10784 \begin_inset Quotes erd
10787 from now on], so you're bound to have it.
10788 As I noted earlier, there are other classes, such as
10792 , which also produce slides for overhead projectors and do a better job
10794 However, there are some things which
10798 can do which the others can't, such as generate overlays.
10799 Read on to learn more!
10802 \begin_layout Subsection
10804 \begin_inset LatexCommand \label{sec:slidesetup}
10811 \begin_layout Standard
10812 Obviously, to use this document class, you need to select
10813 \begin_inset Quotes eld
10821 \begin_inset Quotes erd
10824 from the class list in the
10829 ocument\SpecialChar \menuseparator
10837 There are some other special things you should know about this class:
10840 \begin_layout Itemize
10841 Don't bother changing the options
10846 They're not supported by the
10853 \begin_layout Itemize
10862 behaves a bit differently for this class.
10863 The possible choices and what they do are as follows:
10867 \begin_layout Description
10872 The final output contains page numbers in the lower right corner.
10875 \begin_layout Description
10884 , but also prints out any time markers you've put in.
10885 This is the default.
10888 \begin_layout Description
10893 The final output contains no page numbers, time markers, or alignment markers.
10897 \begin_layout Itemize
10902 class has an extra option:
10908 \begin_inset Quotes eld
10916 \begin_inset Quotes erd
10919 in the extra class options.
10923 \begin_layout Standard
10924 Using this options allows you to add time markers to
10929 See section\InsetSpace ~
10931 \begin_inset LatexCommand \ref{sec:slideNote}
10939 \begin_layout Standard
10940 You can also use the template file
10941 \begin_inset Quotes eld
10949 \begin_inset Quotes erd
10952 to automatically set up a document to use the
10961 ile\SpecialChar \menuseparator
10970 to open your new document].
10971 The template file also contains some examples of the special paragraph
10972 environments used by this class.
10973 I'll describe those next.
10976 \begin_layout Subsection
10977 Paragraph Environments
10980 \begin_layout Subsubsection
10981 Supported Environments
10984 \begin_layout Standard
10985 The first thing you'll notice when you start up a new
10989 document is the font size and type: it's the equivalent of the size
10990 \begin_inset Quotes eld
10998 \begin_inset Quotes erd
11007 This is also what's used in the output.
11009 \begin_inset Quotes eld
11013 \begin_inset Quotes erd
11016 to remind you that this is a slide.
11017 Your final slides will use a larger font; ergo, you'll have less space.
11018 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
11021 \begin_layout Standard
11022 The next thing that becomes obvious is the changes to the paragraph environment
11023 pull-down box [at the far-left end of the toolbar].
11024 Most of the paragraph environments you're used to seeing are missing.
11025 There are also five new ones.
11030 class itself only supports certain paragraph environments:
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 Itemize
11093 \begin_layout Itemize
11099 \begin_layout Standard
11100 All of the other standard environments, including the section-heading environmen
11101 ts, aren't used in the
11108 \begin_layout Standard
11109 On the other hand, you'll notice the following new environments:
11112 \begin_layout Itemize
11118 \begin_layout Itemize
11124 \begin_layout Itemize
11130 \begin_layout Itemize
11136 \begin_layout Itemize
11142 \begin_layout Standard
11143 These five are kind of quirky, due to a
11144 \begin_inset Quotes eld
11148 \begin_inset Quotes erd
11152 You see, LyX doesn't permit you to nest any other paragraph environment
11153 into an empty environment.
11154 Now, that's fine and dandy, but it means that you wouldn't be able to start
11155 a slide with anything except plain text.
11156 To deal with this, I've performed a little
11157 \begin_inset Quotes eld
11161 \begin_inset Quotes erd
11167 \begin_layout Subsubsection
11168 Quirks of the New Environments
11169 \begin_inset LatexCommand \label{sec:slideQuirk}
11176 \begin_layout Standard
11177 All five of the new paragraph environments are somewhat quirky due to inherent
11178 limitiations in the current version of LyX.
11179 As I just mentioned, LyX forbids environments that begin with another environme
11181 To get around this, the
11185 environment isn't a paragraph environment as described in the
11193 \begin_layout Standard
11194 You should consider
11207 \begin_inset Quotes eld
11210 pseudo-environments.
11211 \begin_inset Quotes erd
11214 They look like a section heading or a
11215 \begin_inset Quotes eld
11223 \begin_inset Quotes erd
11226 but really begin a [and, if necessary, end the previous] paragraph environment.
11236 \begin_inset Quotes eld
11240 \begin_inset Quotes erd
11243 These two perform some action.
11246 \begin_layout Standard
11247 A common feature of all five environments,
11267 , is a rather long-ish label.
11268 The text following this label --- ordinarily the contents of the paragraph
11269 environment --- is utterly irrelevant for
11290 LyX completely ignores it.
11291 In fact, you can leave these five environments completely empty.
11295 \begin_layout Standard
11300 to put any text after the rather long-ish label, you might want to.
11301 This could be a short description of the contents of the
11306 In that case, enter in your descriptive comment and hit
11310 as you normally would.
11313 \begin_layout Standard
11314 If, on the other hand, you don't want to enter in any descriptive text,
11315 you'll hit another LyX quirk.
11316 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
11317 environment until you put something in the old one.
11321 \begin_layout Itemize
11322 Start entering the text that will
11350 \begin_layout Itemize
11351 Now move to the beginning of that paragraph.
11355 \begin_layout Itemize
11364 \begin_layout Itemize
11365 Finally, change this new, empty paragraph to a
11389 \begin_layout Standard
11390 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
11394 \begin_layout Subsection
11395 Making a Presentation with
11408 \begin_layout Subsubsection
11416 \begin_layout Standard
11417 If you're expecting this section to teach you how to actually make a presentatio
11418 n, you'll be sorely disappointed.
11419 Naturally, I'll describe all of the ways the
11423 class can assist you in preparing the materials for a presentation.
11424 Filling in the contents, however, is up to you.
11429 the LyX philosophy.]
11432 \begin_layout Standard
11437 environment [in the manner described in section\InsetSpace ~
11439 \begin_inset LatexCommand \ref{sec:slideQuirk}
11443 ] tells LyX to begin a new slide [duh].
11444 The label for this environment/
11445 \begin_inset Quotes erd
11449 \begin_inset Quotes erd
11453 \begin_inset Quotes eld
11457 \begin_inset Quotes erd
11460 in cool blue, followed by the label,
11461 \begin_inset Quotes eld
11465 \begin_inset Quotes erd
11469 Any text or paragraph environments that follow this one go on the new slide.
11473 \begin_layout Standard
11474 Slides are probably the only time you'll need to forcibly end pages in LyX
11475 (this can be specified in the
11480 In fact, you'll want to, once you finish entering the contents of one slide.
11481 If you've entered more text than can physically fit on a slide, the extra
11482 overflows onto a new slide.
11483 I don't recommend doing this, however, since the overflow slide won't have
11484 any page number on it.
11485 Furthermore, it may interfere with any
11489 you've made to accompany the oversized
11496 \begin_layout Standard
11505 environments work the same way as the
11510 They both create an
11511 \begin_inset Quotes eld
11515 \begin_inset Quotes erd
11518 followed by a label [
11519 \begin_inset Quotes eld
11523 \begin_inset Quotes erd
11527 \begin_inset Quotes eld
11531 \begin_inset Quotes erd
11535 The color is a stunning magenta instead of blue, and the
11536 \begin_inset Quotes eld
11540 \begin_inset Quotes erd
11543 will look different, in style and in length.
11544 The label fonts of all three also differ from one another.
11547 \begin_layout Standard
11552 , if the contents of a
11560 exceed the physical size of a slide or sheet of paper, the extra will overflow
11562 Again, you should avoid this.
11563 It defeats the whole purpose of
11574 \begin_layout Subsubsection
11584 \begin_layout Standard
11589 is a slide that sits atop another slide.
11590 Perhaps you wish to discuss a figure on the main
11594 before displaying the text associated with it.
11595 One way to accomplish this is tape a flap of dark paper over the part of
11600 you want to display later.
11601 This method fails, however, if you wish to overlap one graph with another,
11603 You would then have to fumble while speaking to align the two separate,
11608 s to align the two graphs.
11613 environment in both cases makes life much easier.
11616 \begin_layout Standard
11621 receives the page number of its
11622 \begin_inset Quotes eld
11626 \begin_inset Quotes erd
11634 \begin_inset Quotes eld
11642 \begin_inset Quotes erd
11649 \begin_layout Standard
11650 Presumably, mutliple
11655 \begin_inset Quotes eld
11663 \begin_inset Quotes erd
11667 \begin_inset Quotes eld
11675 \begin_inset Quotes erd
11679 \begin_inset Quotes eld
11687 \begin_inset Quotes erd
11690 , etc.\InsetSpace ~
11691 appended to the page number of the parent
11701 Clearly, you want the contents of both the
11709 to each fit on a single physical slide! You should probably consider an
11715 \begin_inset Quotes eld
11719 \begin_inset Quotes erd
11731 class provides a visual cue for this: the label at the start of an
11735 is shorter than that at the start of a
11740 Lastly, when you generate printable output, you'll find alignment markers
11741 in all four corners of both the
11745 page and its parent
11750 These will assist you in lining up the two physical slides.
11753 \begin_layout Standard
11754 The major problem in overlaying two slides is aligning the contents of the
11755 two transparencies.
11756 How much space should you leave for that graph on the second slide? Worse
11757 still, what if you want a graph and a sentence on second slide, but there
11758 is text on the main transparency that goes in between them? You could try
11759 and insert vertical space of the right size.
11760 The better way is to use
11771 \begin_layout Standard
11772 As their names imply,
11780 are two command-like paragraph environments that make all subsequent text
11781 invisible and visible, respectively.
11782 Note from section\InsetSpace ~
11784 \begin_inset LatexCommand \ref{sec:slideQuirk}
11788 that you don't place anything
11792 these two environments, however.
11797 , it inserts a centered, sky-blue label into the page reading
11798 \begin_inset Quotes eld
11801 <Invisible Text Follows>
11802 \begin_inset Quotes erd
11806 For paragraphs following this label, the parts of the
11814 ; it doesn't matter which] where they would be contain instead blank space.
11818 \begin_layout Standard
11823 , the corresponding centered label is
11824 \begin_inset Quotes eld
11827 <Visible Text Follows>
11828 \begin_inset Quotes erd
11832 Paragraphs following this label behave normally.
11833 Note that the beginning of a new
11845 automatically shuts off an
11850 It's therefore not necessary to use
11861 \begin_layout Standard
11862 By now, it should be obvious how to create overlay transparencies using
11863 the proper combination of
11882 \begin_layout Enumerate
11887 , including everything that will appear on it, whether on the main slide
11895 \begin_layout Enumerate
11896 Before each figure or paragraph that will appear only on the
11905 If necessary, insert a
11909 environment after the
11916 \begin_layout Enumerate
11921 immediately following the
11928 \begin_layout Enumerate
11929 Copy the contents of this
11940 \begin_layout Enumerate
11945 , change all of the
11956 \begin_layout Standard
11958 You've just made an
11965 \begin_layout Standard
11966 There's one problem with the way I've designed the LyX
11970 class: you can't make text in the middle of a paragraph invisible, nor
11971 make text in the middle of an invisible paragraph visible again.
11972 To accomplish this feat, you'll need to use some inlined LaTeX codes.
11976 \begin_layout Standard
11977 The commands of interest are:
11980 \begin_layout Itemize
11985 invisible \SpecialChar \ldots{}
11989 \begin_layout Itemize
11994 visible \SpecialChar \ldots{}
11998 \begin_layout Standard
11999 \SpecialChar \ldots{}
12000 and need to be marked as TeX.
12002 \begin_inset Quotes eld
12006 \begin_inset Quotes erd
12009 you wish to change goes in between the brackets [and after the
12022 If you don't know how to mark text as TeX, see the apprpriate section of
12035 \begin_layout Subsubsection
12045 \begin_inset LatexCommand \label{sec:slideNote}
12052 \begin_layout Standard
12061 is associated with a
12062 \begin_inset Quotes eld
12066 \begin_inset Quotes erd
12078 class provides visual cues.
12083 is shorter than that of a
12087 [yet longer than that of an
12091 ] and, like the label of an
12095 is shockingly magenta.
12096 Additionally, the printed
12100 has the page number of its
12101 \begin_inset Quotes eld
12105 \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 \begin_inset Quotes eld
12145 \begin_inset Quotes erd
12149 You can have multiple
12153 s associated with a single
12165 , you'll probably want to break up long
12169 s so that they fit on a single sheet of paper.
12172 \begin_layout Standard
12177 is obvious: it contains anything additional you might want to say about
12183 It could also be used as a sheet of reminders for a particular
12188 In the case of the latter, you might want to make use of time markers.
12194 \begin_inset Quotes eld
12198 \begin_inset Quotes erd
12201 support for time markers, a
12206 So, you'll have to resort to using the LaTeX codes.
12209 \begin_layout Standard
12210 To use time markers, you'll need to specify the extra class option
12211 \begin_inset Quotes eld
12219 \begin_inset Quotes erd
12222 [see section\InsetSpace ~
12224 \begin_inset LatexCommand \ref{sec:slidesetup}
12229 This option turns on timing marks, which will appear in the lower-left-hand
12235 To set what appears in the time marker, you use the LaTeX commands
12236 \begin_inset Quotes eld
12246 \begin_inset Quotes erd
12250 \begin_inset Quotes eld
12260 \begin_inset Quotes erd
12264 The arguments of both commands are time measured in seconds.
12266 \begin_inset Quotes eld
12276 \begin_inset Quotes erd
12279 sets the time marker to a given time.
12281 \begin_inset Quotes eld
12291 \begin_inset Quotes erd
12294 increments the time marker by the specified amount.
12295 Using time markers and
12299 s in this fashion, you can remind yourself how much time to spend on a particula
12307 \begin_layout Standard
12308 There's one last feature to describe.
12309 Clearly, you'd like to print out all of your
12317 s on transparencies while printing all of your
12334 with which it is associated.
12335 What's a person to do?
12338 \begin_layout Standard
12339 Luckily, there are two LaTeX commands that allow you to select what to print
12341 Both must be placed into the preamble of your document.
12343 \begin_inset Quotes eld
12355 \begin_inset Quotes erd
12358 will cause the output to contain only the
12367 Correspondingly, the command
12368 \begin_inset Quotes eld
12380 \begin_inset Quotes erd
12383 prevents the output of anything but
12388 I'd advise placing both commands in the preamble and initially comment
12390 You can then preview your entire presentation as you write.
12391 When you're done writing, you can then uncomment one of the two to select
12392 what you want to print.
12393 I like to uncomment
12394 \begin_inset Quotes eld
12406 \begin_inset Quotes erd
12409 , print to a file with
12410 \begin_inset Quotes eld
12418 \begin_inset Quotes erd
12421 in its name, comment it back out, then uncomment
12422 \begin_inset Quotes eld
12434 \begin_inset Quotes erd
12438 \begin_inset Quotes eld
12446 \begin_inset Quotes erd
12450 I can then send either file to a printer, loading transparencies or plain
12451 paper as appropriate.
12454 \begin_layout Standard
12455 You can also provide other arguments to the
12456 \begin_inset Quotes eld
12466 \begin_inset Quotes erd
12470 \begin_inset Quotes eld
12480 \begin_inset Quotes erd
12484 See a good LaTeX book for details.
12487 \begin_layout Subsection
12492 Class Template File
12495 \begin_layout Standard
12496 I have also provided a template file,
12497 \begin_inset Quotes eld
12505 \begin_inset Quotes erd
12513 To use it, begin your new presentation with
12518 ile\SpecialChar \menuseparator
12528 Your new LyX presentation file will contain an example
12549 additionally contain an example of the use of
12558 Lastly, the preamble will contain:
12561 \begin_layout LyX-Code
12562 % Uncomment to print out only slides and overlays
12565 \begin_layout LyX-Code
12569 \begin_layout LyX-Code
12579 \begin_layout LyX-Code
12580 % Uncomment to print out only notes
12583 \begin_layout LyX-Code
12587 \begin_layout LyX-Code
12595 \begin_layout Standard
12596 One final thing: I created this class to support the LaTeX2e
12597 \begin_inset Quotes eld
12605 \begin_inset Quotes erd
12608 class, one of the built-in LaTeX2e classes.
12609 Neither I nor the rest of the LyX Team endorse or oppose the use of this
12610 built-in slide class.
12611 It's here if you want it or need it.
12612 There exist other LaTeX2e classes for creating presentations, such as the
12617 class [see section\InsetSpace ~
12619 \begin_inset LatexCommand \ref{sec:foiltex}
12624 \begin_inset Quotes eld
12632 \begin_inset Quotes erd
12635 package [present on some TeX distributions].
12636 The latter is not yet supported under LyX.
12640 \begin_layout Standard
12641 Perhaps you can take on the task\SpecialChar \ldots{}
12647 I know nothing about these other classes.
12648 Try them out to see what sort of alternative they provide.
12651 \begin_layout Section
12660 \begin_inset LatexCommand \label{sec:foiltex}
12667 \begin_layout Standard
12673 \begin_layout Subsection
12677 \begin_layout Standard
12678 This section describes how to use LyX to make slides for overhead projectors.
12679 There are two document classes that can do this: the default slides class
12685 This section documents the latter.
12688 \begin_layout Standard
12689 I'm going to say this again, nice and clear, so that there's no misunderstanding
12693 \begin_layout Standard
12694 \begin_inset VSpace bigskip
12700 \begin_layout Standard
12704 This section documents the class
12705 \begin_inset Quotes eld
12713 \begin_inset Quotes erd
12721 \begin_layout Standard
12722 \begin_inset VSpace bigskip
12728 \begin_layout Standard
12729 If you're looking for the documentation for
12730 \begin_inset Quotes eld
12738 \begin_inset Quotes erd
12741 , check out section\InsetSpace ~
12743 \begin_inset LatexCommand \ref{sec:slitex}
12748 If your machine doesn't have the
12753 \begin_inset Quotes eld
12761 \begin_inset Quotes erd
12764 ] installed, you'll probably have to use the default
12768 class, which isn't quite as good as
12773 \begin_layout Standard
12778 class is designed for use with version 2.1 of the
12782 LaTeX class file which is now an integral part of LaTeX2e.
12785 \begin_layout Subsection
12789 \begin_layout Standard
12790 Obviously, to use this document class, you need to select
12791 \begin_inset Quotes eld
12799 \begin_inset Quotes erd
12811 Document\InsetSpace ~
12815 There are some settings in the
12817 Document\InsetSpace ~
12820 dialog that you should know about that are specific to this class:
12823 \begin_layout Itemize
12824 Don't change the options
12834 Document\InsetSpace ~
12838 They're ignored by the
12845 \begin_layout Itemize
12846 The default font size is 20pt with the other options being 17pt, 25pt and
12850 \begin_layout Itemize
12851 The default font is
12859 but all math equations are still typeset in the usual roman font.
12862 \begin_layout Itemize
12867 TeX supports A4 and Letter paper sizes as well as a special size for working
12869 It doesn't support A5, B5, legal or executive paper sizes.
12872 \begin_layout Itemize
12873 Don't bother changing the
12877 settings because they are ignored anyway.
12878 All floats appear where they are defined in the text.
12881 \begin_layout Itemize
12889 setting behaves a bit differently for this class.
12894 TeX provides extensive footer and header capabilities including a user-defined
12896 See section\InsetSpace ~
12898 \begin_inset LatexCommand \ref{sec:foilfoot}
12903 The title page is treated differently to all other pages in the document
12912 has the logo centered at the bottom of the page (if one is defined).
12913 The possible page style choices and what they do are as follows:
12918 \labelwidthstring MMMMMMM
12925 The final output contains no page numbers, or other headers or footers
12926 (except footnotes of course).
12931 \labelwidthstring MMMMMMM
12938 The final output contains page numbers centered at the bottom of the page.
12939 No other headings or footers (other than footnotes).
12943 \labelwidthstring MMMMMMM
12948 Page numbers in lower right corner.
12949 Additional headers and footers are also shown.
12950 This is also the default.
12954 \labelwidthstring MMMMMMM
12959 Gives you access to the
12963 package although its use with
12967 TeX is discouraged by the writer of the
12971 TeX package because of some potential page layout clashes.
12975 \begin_layout Subsubsection
12979 \begin_layout Standard
12980 The following options may be used in the extra class options in the
12985 ocument\SpecialChar \menuseparator
12996 \labelwidthstring MMMMMMx
13001 This sets up the page layout for 7.33in by 11in paper, which is about the
13002 same aspect ratio as a 35mm slide, making it a bit easier to work with
13007 \labelwidthstring MMMMMMx
13012 Places a rule across the page below the header on every page except the
13017 \labelwidthstring MMMMMMx
13022 Places a rule across the page above the footer on every page except the
13027 \labelwidthstring MMMMMMx
13032 This is automatically set each time you create a new
13041 TeX to use the dvips driver to rotate those pages that are set as landscape
13046 \labelwidthstring MMMMMMx
13051 Simply changes the page dimensions to those of a landscape page but doesn't
13053 Thus if you use this option you need to use an external program to rotate
13054 each page or feed your paper through your printer as landscape.
13055 Note that this option effectively reverses the roles of the
13063 environments (don't worry these are described in the next section).
13067 \labelwidthstring MMMMMMx
13072 Equation numbers on the left.
13076 \labelwidthstring MMMMMMx
13081 Flush-left equations.
13084 \begin_layout Subsection
13085 Supported Environments
13088 \begin_layout Standard
13089 Most of the environments commonly supported in other classes are also supported
13095 There are several additional environments provided by
13099 TeX as well as a couple added by LyX.
13100 The following environments are shared with other classes:
13103 \begin_layout Standard
13107 \begin_layout Standard
13111 begin{multicols}{2}
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 Itemize
13221 \begin_layout Itemize
13227 \begin_layout Standard
13231 \begin_layout Standard
13243 \begin_layout Standard
13244 That is, all the major environments apart from the sectioning environments.
13245 Since foils are essentially self-contained sections, with a title and body,
13250 TeX provides specific commands for starting new foils and these are:
13253 \begin_layout Itemize
13259 \begin_layout Itemize
13265 \begin_layout Standard
13266 LyX also provides slightly modified versions of these two environments called:
13269 \begin_layout Itemize
13275 \begin_layout Itemize
13278 ShortRotatefoilhead
13281 \begin_layout Standard
13282 and the differences will be explained in the next section.
13285 \begin_layout Standard
13286 Since foils are often used in presenting ideas or new theorems and such
13291 TeX also provides a comprehensive box of goodies for presenting them:
13294 \begin_layout Standard
13298 \begin_layout Standard
13302 begin{multicols}{2}
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 Itemize
13370 \begin_layout Itemize
13376 \begin_layout Standard
13380 \begin_layout Standard
13392 \begin_layout Standard
13393 The starred versions are unnumbered while the unstarred versions are numbered.
13394 There are also two list environments added by LyX and these are:
13397 \begin_layout Itemize
13403 \begin_layout Itemize
13409 \begin_layout Standard
13414 TeX provides some powerful header and footer capabilities that are best
13415 set in the preamble although they may be set at any point in a document.
13416 If you want to change these settings in your document the best place to
13417 do so is at the very top of a foil,
13422 straight after the foilhead.
13425 \begin_layout Standard
13426 For this purpose, the following command styles are provided [
13433 \begin_layout Standard
13437 \begin_layout Standard
13441 begin{multicols}{2}
13449 \begin_layout Itemize
13456 \begin_layout Itemize
13462 \begin_layout Itemize
13469 \begin_layout Itemize
13476 \begin_layout Itemize
13484 \begin_layout Standard
13490 \begin_layout Standard
13494 \begin_layout Standard
13506 \begin_layout Standard
13507 There are also a few commands provided by
13511 TeX that aren't directly supported by LyX but I'll tell you what they do
13512 and how to use them in section\InsetSpace ~
13514 \begin_inset LatexCommand \ref{sec:unsuppfoils}
13521 \begin_layout Subsection
13522 Building a Set of Foils
13525 \begin_layout Standard
13526 This section will give a simple introduction to using the different environments
13527 to build a set of foils.
13528 If you want to see an example set of foils take a look at the
13532 file accessible from the
13537 ile\SpecialChar \menuseparator
13542 pen\SpecialChar \ldots{}
13553 \begin_layout Subsubsection
13554 Give It a Title Page
13557 \begin_layout Standard
13558 Unlike other classes that provide
13578 creates the title on a page of its own.
13579 If you leave out the
13583 environment LaTeX will substitute the current date (every time you regenerate
13587 \begin_layout Subsubsection
13591 \begin_layout Standard
13592 As I mentioned earlier, there are four ways of starting a new foil.
13593 For portrait foils you should use
13602 The difference between these two environments is the amount of space between
13603 the title of the foil (the foilhead) and the body of the foil.
13606 \begin_layout Standard
13607 Landscape foils are generated using the
13613 ShortRotatefoilhead
13616 Again the only difference is the spacing between foilhead and body.
13617 Both of the short versions have 0.5 inches less separation between the foilhead
13622 \begin_layout Standard
13623 One problem with the support for landscape foils is the requirement that
13624 you have to use the
13628 driver to generate the PostScript® output otherwise the foils won't be
13630 It is possible to get landscape foils even if you haven't got the
13634 driver provided you can feed your foils sideways through your printer ;-)
13637 \begin_layout Subsubsection
13638 Theorems, Lemmas, Proofs and more
13641 \begin_layout Standard
13642 Due to a small bug in LyX you can't have two of the same type of these environme
13643 nts directly following each other.
13644 They must be separated by something.
13645 If you try, you will just be extending the previous environment as if you
13646 had merged the two environments together.
13647 So, how do you get around this problem? The simplest option is to insert
13648 some text between the two environments or add a
13652 environment between the two with just a
13653 \begin_inset Quotes eld
13661 \begin_inset Quotes erd
13665 This will force LyX to produce two separate environments and hence the
13666 correct LaTeX output.
13667 An example is provided in the example file included with the LyX distribution.
13668 Remember, this problem only occurs if you are trying to place two of the
13669 same type of theorem-like environments one directly after the other.
13672 \begin_layout Subsubsection
13676 \begin_layout Standard
13677 You get all the commonly supported list styles found in other classes as
13678 well as two new ones.
13679 I'll only describe the new ones here.
13680 If you want to find out more about the other list environments check out
13686 If you intend to use itemized lists you might also want to read about the
13689 Itemize\InsetSpace ~
13690 Bullet\InsetSpace ~
13693 dialog described above in section\InsetSpace ~
13695 \begin_inset LatexCommand \ref{sec:bullet}
13702 \begin_layout Standard
13703 The two new list styles,
13711 , are designed to make it easier for you to create lists of do's and don'ts
13712 or right and wrong by providing dedicated environments that use a tick
13713 or a cross as the label of the list.
13714 These lists are in fact dedicated variants of the
13719 They do however require that you have the
13723 packages installed.
13726 \begin_layout Subsubsection
13730 \begin_layout Standard
13735 TeX redefines the floating tables and figures so that they appear exactly
13736 where they are in the text rather than pushing them to the top of the page
13737 or to some user specified location.
13738 In fact if you change the float placement settings they are simply ignored.
13741 \begin_layout Subsubsection
13742 Page Headers and Footers
13743 \begin_inset LatexCommand \label{sec:foilfoot}
13750 \begin_layout Standard
13760 are two commands used to control the left-footer text string.
13761 The first is meant to allow you to include a graphic logo on your foils
13763 \begin_inset Quotes eld
13771 \begin_inset Quotes erd
13775 While the second is meant to provide a classification for the audience,
13782 It is empty by default.
13785 \begin_layout Standard
13786 The remaining page corners can be filled by
13791 (which defaults to page numbers),
13804 \begin_layout Subsection
13810 \begin_inset LatexCommand \label{sec:unsuppfoils}
13817 \begin_layout Standard
13818 All the commands mentioned below need to be set in a
13826 within another environment.
13829 \begin_layout Subsubsection
13833 \begin_layout Standard
13834 All lengths are adjusted using the
13857 should be replaced by the name given to the length you want to change and
13862 is the length value.
13863 All lengths should be specified in units of length such as inches (
13875 ) or relative to some document or font-based length such as
13885 \begin_layout Standard
13886 It's possible to change the spacing between a foilhead and the body of the
13887 foil by adjusting the length specified by
13894 For example, to make
13898 foilheads 0.5 inches closer to their bodies put the following in the preamble:
13905 foilheadskip}{-0.5in}
13908 \begin_layout Standard
13909 The spacings around floats can be adjusted by setting these lengths:
13913 \labelwidthstring MMMMMMMMMMM
13920 Separation between the text and the top of the float
13924 \labelwidthstring MMMMMMMMMMM
13931 Separation between the float and the caption
13935 \labelwidthstring MMMMMMMMMMM
13942 Separation between the caption and the following text
13946 \labelwidthstring MMMMMMMMMMM
13953 You can make the captions narrower than the surrounding text by adjusting
13955 Best done relative to
13964 \begin_layout Standard
13965 There are also several title page related lengths that you may find useful
13966 if you have a long title or several authors:
13970 \labelwidthstring MMMMMMMMMMM
13977 Separation from headers to
13983 \labelwidthstring MMMMMMMMMMM
14002 \labelwidthstring MMMMMMMMMMM
14017 \labelwidthstring MMMMMMMMMMM
14034 \labelwidthstring MMMMMMMMMMM
14050 \begin_layout Standard
14051 The last length related command affects all the list environments.
14062 a list environment then all the vertical spacing between the list items
14064 Note that this is a command not a length so it doesn't require
14070 like the stuff mentioned above.
14073 \begin_layout Subsubsection
14074 Headers and Footers
14077 \begin_layout Standard
14090 commands control whether the logo in the
14094 definition appear on a given page.
14101 in the preamble then none of the foils will have the logo on them.
14102 If you don't want the logo on a particular page place the
14108 directly after the foilhead of that page and the
14114 directly after the next foilhead.
14117 \begin_layout Standard
14118 If you decide to use the
14122 page style setting in the
14124 Document\InsetSpace ~
14127 dialog you should probably add
14137 to your preamble so headers and footers on landscape pages are correctly
14138 placed when rotated.
14139 This is due to some clashes between the page layouts provided by the
14150 \begin_layout Section
14151 Latex8 (IEEE Conference Papers)
14154 \begin_layout Standard
14160 \begin_layout Subsection
14164 \begin_layout Standard
14165 Since this class is specifically for writing submissions to IEEE sponsored
14166 conferences I strongly recommend that you get a copy of their Authors Kit.
14171 package and associated bibliography style file is included in the kit.
14172 The Authors Kit is usually sent out by email once your initial submission
14174 There is a lot of useful information in the Authors Kit explaining formatting
14175 restrictions and so on and I will assume you have read this since that
14176 means I don't have to repeat it all here.
14179 \begin_layout Subsection
14183 \begin_layout Standard
14184 [AR\SpecialChar \@.
14188 \begin_layout Subsection
14189 Supported Environments
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 Itemize
14240 \begin_layout Itemize
14246 \begin_layout Subsection
14247 Differences Between Screen and Paper
14250 \begin_layout Standard
14251 There are slight differences in appearance mainly with the presentation
14252 of section counters.
14253 On screen the trailing period of the section counter is missing but it
14254 will appear in the output so don't let this worry you.
14257 \begin_layout Section
14258 Hollywood (Hollywood spec scripts)
14261 \begin_layout Standard
14267 \begin_layout Subsection
14271 \begin_layout Standard
14272 Getting the format of a Hollywood script right is a
14273 \begin_inset Quotes eld
14277 \begin_inset Quotes erd
14280 It is designed to make the readers focus on content and to be easy and
14281 familiar for the actors to read.
14282 Each page of a script should be one minute of film.
14283 Nothing goes in a script that you cannot see or hear on screen.
14284 The courier 12 pt font should be used throughout.
14288 \begin_layout Subsection
14292 \begin_layout Standard
14293 Speakers' lines should NEVER break in mid-sentence.
14294 If a speaker's lines continue over a page break, repeat the
14298 title followed by (Cont'd).
14301 \begin_layout Subsection
14305 \begin_layout Standard
14310 names as labels then cross-reference the label to insert the name.
14311 The cross-reference dialog will show the current cast of characters.
14312 You can use this to insert the speaker name in narratives also.
14315 \begin_layout Subsection
14316 Paper size and Margins
14319 \begin_layout Standard
14320 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
14323 \begin_layout Subsection
14327 \begin_layout Standard
14328 The following environments are available.
14329 You can use hollywood.bind to get the bind keys shown at the right.
14332 \begin_layout Itemize
14339 Used where nothing else works.
14343 \begin_layout Itemize
14356 Usually followed by something like
14357 \begin_inset Quotes eld
14360 on Sally waking up.
14361 \begin_inset Quotes erd
14367 \begin_layout Itemize
14376 Introduces a new INTERIOR camera set-up.
14377 Always followed by DAY or NIGHT, or something similar to define the lighting
14379 Everthing on this line in CAPS.
14382 \begin_layout Itemize
14391 Introduces a new EXTERIOR camera set-up.
14392 Everthing on this line in CAPS.
14395 \begin_layout Itemize
14404 The character speaking.
14407 \begin_layout Itemize
14416 Instructions to the speaker.
14417 The () are automatically inserted, but only the ( will show in LyX.
14418 Both will be printed.
14421 \begin_layout Itemize
14437 \begin_layout Itemize
14446 Camera movement instruction.
14451 \begin_layout Itemize
14459 \begin_layout Itemize
14467 \begin_layout Itemize
14475 \begin_layout Itemize
14483 \begin_layout Subsection
14487 \begin_layout Itemize
14488 (O.S) --- off screen
14491 \begin_layout Itemize
14492 (V.0) --- voice over
14495 \begin_layout Itemize
14500 \begin_layout Itemize
14505 \begin_layout Itemize
14506 PAN --- camera movement
14509 \begin_layout Itemize
14510 INSERT --- cut to close-up of
14513 \begin_layout Section
14517 \begin_layout Standard
14523 \begin_layout Subsection
14527 \begin_layout Standard
14528 Broadway is for writing plays.
14529 The format is more decorative than Hollywood, and much less standardized.
14530 This format should be suitable for workshops.
14533 \begin_layout Subsection
14537 \begin_layout Standard
14538 The same as in Hollywood.
14541 \begin_layout Subsection
14545 \begin_layout Standard
14550 names as labels then cross-reference the label to insert the name.
14551 The cross-reference dialog will show the current cast of characters.
14554 \begin_layout Subsection
14555 Paper size and Margins
14558 \begin_layout Standard
14559 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
14562 \begin_layout Subsection
14566 \begin_layout Standard
14567 The following environments are available.
14568 You can use broadway.bind to get the bind keys shown at the right.
14571 \begin_layout Itemize
14578 You should not have to use this, but it is here for anything that does not
14582 \begin_layout Itemize
14591 Used to describe stage setting and the action.
14592 First use of speaker names in all CAPs.
14595 \begin_layout Itemize
14604 Automatically numbered.
14605 On screen it will be arabic, but will print as Roman.
14608 \begin_layout Itemize
14622 It is just centered text.
14625 \begin_layout Itemize
14634 Not automatically numbered.
14635 You supply the number.
14636 This is because I couldn't figure out how.
14639 \begin_layout Itemize
14648 A special case of Narrative to describe the setting and action as the curtain
14652 \begin_layout Itemize
14661 The speaker's (actor's) title, centered in all CAPS.
14664 \begin_layout Itemize
14673 Instructions to the speaker.
14674 The parentheses are automatically inserted.
14675 The ( will appear on screen, but both will be in the printed play.
14676 This environment is only used within
14683 \begin_layout Itemize
14692 What the Speaker says.
14695 \begin_layout Itemize
14704 The curtain comes down.
14707 \begin_layout Itemize
14715 \begin_layout Itemize
14723 \begin_layout Itemize
14731 \begin_layout Standard
14735 \begin_layout Section
14739 \begin_layout Standard
14745 \begin_layout Standard
14746 \begin_inset VSpace bigskip
14752 \begin_layout Standard
14756 Revtex\InsetSpace ~
14759 textclass works with the American Physical Sociey's RevTeX 4.0 (the
14760 \begin_inset Formula $\beta$
14763 release of May, 1999) class.
14766 \begin_layout Standard
14771 textclass, which works with RevTeX 3.1.
14772 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
14773 That means that it doesn't interact very well with LyX, which requires
14774 LaTeX2e, although it has been kludged to work.
14775 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
14778 RevTeX\InsetSpace ~
14781 textclass should also be pretty easy to use.
14784 \begin_layout Standard
14785 These documents are supposed to be used in
14789 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
14790 macros, and assume you'll know what to put in the preamble if necessary.
14793 \begin_layout Subsection
14797 \begin_layout Standard
14798 All you need to do is install RevTeX 4, as described in the package's README
14800 the package can be found at
14801 \begin_inset LatexCommand \url[The RevTeX 4 Web Site]{http://publish.aps.org/revtex4/}
14806 Install it somewhere that LaTeX can see it.
14807 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
14808 (i.e., not the directory where you installed the class file.) Then, if you
14809 reconfigure LyX, it will find the class file and let you use the RevTeX4
14813 \begin_layout Standard
14814 Probably the easiest way to get started is either to import a RevTeX 4 document
14821 Revtex\InsetSpace ~
14824 template, found in the templates directory.
14827 \begin_layout Subsection
14831 \begin_layout Standard
14832 Optional arguments to
14839 \begin_inset Quotes eld
14843 \begin_inset Quotes erd
14847 \begin_inset Quotes eld
14851 \begin_inset Quotes erd
14865 Document\InsetSpace ~
14869 Remember that in RevTeX, at least one optional argument is required!
14872 \begin_layout Standard
14873 Other preamble matter, like
14885 dialog, also as usual.
14888 \begin_layout Subsection
14892 \begin_layout Standard
14893 The layouts basically correspond to the commands in RevTeX4.0.
14894 For example, the Email layout corresponds to
14901 Note that (at least as of RevTeX 4.0 Beta), the
14909 layouts are exactly equivalent, so you shouldn't need to use both.
14913 \begin_layout Standard
14914 In case you're curious, both were included so that
14918 would be able to translate both
14938 \begin_layout Subsection
14942 \begin_layout Standard
14943 There are a couple of important unique aspects of RevTeX 4 which might cause
14944 bugs that will be even more confusing in LyX.
14947 \begin_layout Standard
14965 The LyX equivalent is that there is a separate Thanks layout.
14970 write footnotes in the
14974 layout, or weird things may happen.
14975 See the RevTeX 4 documentation for more details.
14978 \begin_layout Standard
14981 Author\InsetSpace ~
14986 Author\InsetSpace ~
14993 layouts must be placed
15001 layout and the corresponding
15018 , the LaTeX won't compile.
15021 \begin_layout Subsection
15025 \begin_layout Standard
15026 The main problem with this layout is that you can't use the optional arguments
15027 to layouts like Email and Title.
15028 (The problem is not unique to this layout; you can't use optional arguments
15029 to the Section layouts either.) This means that after you export that file
15030 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15031 need to edit the LaTeX file with a text editor to add the optional arguments
15032 to set, e.g., the running title for the page headers.
15033 Lacking these layouts makes the
15039 (and the equivalent
15045 ) useless, so the corresponding layouts don't exist, and will have to be
15050 \begin_layout Standard
15055 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15056 has not been updated yet to take advantage of it.
15064 \begin_layout Section
15065 Article (mwart), book (mwbk) and report (mwrep)
15066 \begin_inset OptArg
15069 \begin_layout Standard
15082 \begin_layout Standard
15088 \begin_layout Standard
15089 The LyX document classes
15105 correspond to the LaTeX document classes
15118 They are replacements for the standard document classes
15130 , resp., and fit better to Polish typography conventions in a number of points.
15134 \begin_layout Standard
15138 \begin_layout Itemize
15139 Unnumbered titles (with star, eg.
15144 ) are added into table of contents,
15147 \begin_layout Itemize
15148 Additional page styles:
15152 \begin_layout Description
15153 uheadings header with separated lines,
15156 \begin_layout Description
15157 myheadings custom header, contents headers via commands:
15172 \begin_layout Description
15173 myuheadings custom header with separated lines,
15176 \begin_layout Description
15177 outer page number is placed on outer side of page
15181 \begin_layout Itemize
15186 \begin_layout Description
15187 rmheadings serif titles --- default,
15190 \begin_layout Description
15191 sfheadings sansserif titles,
15194 \begin_layout Description
15195 authortitle on title page first placed is author next title --- default,
15198 \begin_layout Description
15199 titleauthor on title page first placed is title next author,
15202 \begin_layout Description
15203 withmarginpar reserve place on page for margins.
15207 \begin_layout Section
15211 \begin_layout Standard
15217 \begin_layout Standard
15218 Elsevier Science Publishers B.V.
15219 provides a standard LaTeX document class (
15223 ) for submitting articles to their various journals.
15224 The style file can be downloaded directly from their web site:
15225 \begin_inset LatexCommand \url{http://authors.elsevier.com/}
15230 Instructions are supplied along with the class file, which details the
15231 requirements of the publishers.
15232 LyX includes package that allows for the use of this class, by a layout
15233 and a template file.
15234 Installation of the class file is the same as for any other LaTeX package;
15235 instructions are provided in the Elsevier documentation.
15238 \begin_layout Standard
15248 As the Elsevier class file is based mainly on the standard article class,
15249 most of the normal functionality is provided.
15250 The Elsevier class defines a number of mathematical environments, which
15251 are similar to the AMS environments.
15252 These commands are all described in the Elsevier documentation, and are
15256 \begin_layout Standard
15257 The easiest way to use the Elsevier style is to base documents on the included
15259 It is best not to use options such as fancy headings or the geometry package,
15260 as elements such as these are defined by Elsevier in their style file.
15261 Ideally, no extra packages except those mentioned in the Elsevier documentation
15263 Essentially, Elsevier require as
15264 \begin_inset Quotes eld
15268 \begin_inset Quotes erd
15275 \begin_layout Standard
15284 file as possible, as their intention is to take the supplied file and replace
15285 the class file with one for the particular journal to which the paper has
15287 This also means that not too much time should be spent on the formating
15289 When it comes to be published, this will change anyway.
15290 The rest of the usage for this layout is substantially the same as for
15291 the normal article class.
15292 For details of what Elsevier do and don't allow, refer to their documentation.
15295 \begin_layout Section
15299 \begin_layout Standard
15302 Jürgen Spitzmüller
15305 \begin_layout Subsection
15309 \begin_layout Standard
15310 Memoir is a very powerful and constantly evolving class.
15311 It has been designed with regard to fictional and non-fictional literature.
15312 Its aim is to let the user have maximum control over the typesetting of
15314 Memoir is based on the standard book class, but it can also emulate the
15315 article class (see below).
15318 \begin_layout Standard
15319 Peter Wilson, the developer of Memoir, is known as the author of lots of
15320 useful packages in the LaTeX world.
15321 Most of them have been merged with Memoir.
15322 Therefore, it is much easier to layout the table of contents, appendices,
15323 chapter designs and such.
15324 LyX, though, does not support all of these goodies natively.
15325 Some of them might be added to forthcoming releases
15329 \begin_layout Standard
15330 You are invited to send suggestions to
15331 \begin_inset LatexCommand \url{lyx-devel@lists.lyx.org}
15340 , lots will probably never, due to the limitations of LyX's framework.
15341 Of course you can still use all features with the help of some native LaTeX
15346 \begin_layout Standard
15351 \begin_layout Standard
15360 section\InsetSpace ~
15362 \begin_inset LatexCommand \ref{sec:Inserting-LaTeX-Code}
15372 In this section, we can only list those features which are natively supported
15374 For detailed descriptions (and for the rest of features) we are recommending
15375 to have a look at the detailed manual of the Memoir class
15379 \begin_layout Standard
15384 \begin_layout Standard
15394 \begin_inset LatexCommand \url{CTAN:/macros/latex/memoir/memman.pdf}
15403 , which is not only a user guide for the class, but also both a comprehensive
15404 description on good typesetting and a superb example for good typesetting
15408 \begin_layout Subsection
15409 Basic features and restrictions
15412 \begin_layout Standard
15413 Memoir supports basically all features of the standard book classes.
15414 There are, however, some differences, as follows:
15417 \begin_layout Description
15419 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14,
15423 \begin_layout Description
15425 style: The fancy page style is not supported, due to a command clash
15426 between Memoir and the fancyhdr package (they are both defining a command
15427 with the same name, which confuses LaTeX).
15428 Instead, Memoir comes with a bunch of own page styles (see
15430 Layout\SpecialChar \menuseparator
15431 Document\SpecialChar \menuseparator
15436 If you want to use these for the chapter pages, you have to use the command
15443 in the main text or in preamble (e.
15447 \begin_layout Standard
15460 \begin_layout Standard
15473 chapterstyle{companion}
15478 \begin_layout Description
15479 Sectioning: Sectionings (chapter, section, subsection etc.) are coming with
15480 an optional argument in the standard classes.
15481 With this, you can specify an alternative version of the title for the
15482 table of contents and the headers (for instance, if the title is too long).
15483 In LyX, you can do this via
15485 Insert\SpecialChar \menuseparator
15489 at the beginning of a chapter/section.
15490 Memoir features a second optional argument and thus separates the table
15491 of contents from the header.
15492 You can define three variants of a title with this: one for the main text,
15493 one for the table of contents, and one for the headers.
15494 Simply insert two optional arguments if you need this feature, the first
15495 one containing the short title for the Table of Contents, the second one
15496 containing an alternative short title for the headers.
15499 \begin_layout Description
15500 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
15501 of contents, the list of figures and the list of table start a new page
15503 Memoir does not follow this route.
15504 You have to insert a page break yourself, if you want to have one.
15507 \begin_layout Description
15508 Titlepage: For some unknown reason, Memoir uses pagination on the title
15509 page (in the standard classes, title pages are
15510 \begin_inset Quotes eld
15514 \begin_inset Quotes erd
15521 \begin_layout Standard
15534 \begin_layout Standard
15544 If you want an empty title page, type
15548 aliaspagestyle{title}{empty}
15553 \begin_layout Description
15554 Article: With the class option
15560 Layout\SpecialChar \menuseparator
15561 Document\SpecialChar \menuseparator
15565 ), you can emulate article style.
15566 That is, counters (footnotes, figures, tables etc.) will not be reset on
15567 new chapters, chapters don't start a new page (but are---in contrary to
15569 \begin_inset Quotes eld
15573 \begin_inset Quotes erd
15576 article classes---still allowed), parts, though, use their own page, as
15580 \begin_layout Description
15581 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
15582 font commands, which have been used in the old LaTeX version 2.09 (e.
15586 \begin_layout Standard
15599 \begin_layout Standard
15621 It produces an error and stops LaTeX whenever such a command appears.
15626 reallows the commands and spits out warnings instead (which does at least
15628 Since a lot of packages and particularly BibTeX style files are still using
15629 those commands, we have decided to use this option by default.
15632 \begin_layout Subsection
15636 \begin_layout Standard
15637 We will only describe the features supported by LyX (which is not much currently
15639 Please consult the Memoir manual
15643 \begin_layout Standard
15648 \begin_layout Standard
15658 \begin_inset LatexCommand \url{CTAN:/macros/latex/memoir/memman.pdf}
15670 \begin_layout Description
15671 Abstract: You may wonder why an abstract is an extra feature.
15672 Well, it is in book class.
15673 Usually books don't have abstracts.
15674 Memoir, however, has.
15675 You can use it whereever and how often you like.
15678 \begin_layout Description
15679 Chapterprecis: You may know this from belletristic: The contents of a chapter
15680 is shortly described below the title and also in the table of contents
15685 \begin_layout Standard
15698 \begin_layout Standard
15709 Our hero arrives in Troia; he loses some friends; he finds others
15712 Chapterprecis does exactly this.
15713 It is therefore only sensible below a chapter.
15716 \begin_layout Description
15717 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
15718 The epigraph environment provides an elegant way of typesetting such a
15720 The motto itself (text) and its author (source) are divided by a short
15722 Unfortunately, we have to fool LyX a bit here again, since the environment
15723 needs two arguments (text and source).
15724 In this case, we have to use curly brackets (in TeX mode) between the two
15735 <author of the slogan>.
15738 \begin_layout Description
15739 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
15740 complex figurative poems).
15741 Lyx can only support a few of them.
15742 One is poemtitle, which is a centered title for poems, which will also
15743 be added to the table of contents (verse is the standard environment for
15745 Memoir has some enhanced versions of verse, but you need to use ERT, because
15746 they have to be nested inside regular verse environments, which is not
15747 possible with LyX).
15750 \begin_layout Description
15751 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
15754 \begin_layout Chapter
15755 Importing and Exporting Alternate File Formats
15756 \begin_inset OptArg
15759 \begin_layout Standard
15760 Importing and Exporting
15768 \begin_layout Section
15772 \begin_layout Standard
15773 Importing and exporting LyX documents from/to other formats has been touched
15779 Here we describe more of the gory details needed to understand just what
15780 is going on when you click on the
15785 ile\SpecialChar \menuseparator
15797 ile\SpecialChar \menuseparator
15808 \begin_layout Section
15809 Importing Other Formats
15812 \begin_layout Subsection
15816 \begin_layout Standard
15817 Translating from LaTeX into LyX is performed by a Perl script called reLyX.
15818 Although it is a standalone program which can be called from the command
15819 line, LyX will call it automatically when a LaTeX document is imported.
15820 See section\InsetSpace ~
15822 \begin_inset LatexCommand \ref{sec:reLyX}
15826 for a complete description.
15827 There are no user tunable parameters for reLyX within LyX.
15830 \begin_layout Subsection
15834 \begin_layout Standard
15835 When importing plain ASCII text, there are two methods of reading the file.
15837 \begin_inset Quotes eld
15841 \begin_inset Quotes erd
15844 preserves all the linebreaks in the ASCII; to LyX, then, each line looks
15847 \begin_inset Quotes eld
15851 \begin_inset Quotes erd
15854 assumes that consecutive lines separated by only a single linebreak form
15855 a single paragraph.
15856 Successive linebreaks with no intervening text are thus assumed to be paragraph
15860 \begin_layout Subsection
15864 \begin_layout Standard
15867 [Editor's note: Needs to be written, obviously - any volunteers? --- mer]
15870 \begin_layout Section
15871 Exporting Other Formats
15874 \begin_layout Subsection
15878 \begin_layout Standard
15879 LyX generates two types of LaTeX files: stripped down versions for the normal
15884 , etc.) which one normally never sees
15888 \begin_layout Standard
15889 The resulting file is a perfectly valid LaTeX file, though the preamble
15890 might look a bit strange since it includes some definitions used by LyX
15891 which wouldn't show up in most human-written files.
15896 , and human readable forms which are suitable for exchanging with your colleague
15898 The only settable option for the translation is the line length of the
15900 The default is 65 characters, but it can be set in
15907 \SpecialChar \menuseparator
15928 \begin_layout Subsection
15929 Device Independent Files
15932 \begin_layout Standard
15933 Device Independent files (DVI files) are produced by running LaTeX on your
15935 There are no user settable options.
15938 \begin_layout Subsection
15942 \begin_layout Standard
15943 The next step in the conversion chain is converting a DVI file into Postscript®.
15951 \SpecialChar \menuseparator
15959 \SpecialChar \menuseparator
15968 or, if you need more control on the result,
15975 \SpecialChar \menuseparator
15984 If you use the later, note that it is possible to configure, in
15991 \SpecialChar \menuseparator
15999 , the options passed to the dvips program to achieve different effects.
16002 \begin_layout Subsection
16006 \begin_layout Standard
16007 Exporting as ASCII attempts to preserve the
16008 \begin_inset Quotes eld
16012 \begin_inset Quotes erd
16015 of the document as well as possible, but things like centering and indentation
16016 are thrown out; paragraphs are separated by blank lines.
16017 Section numbering and cross-references are done correctly, so the resulting
16018 text files is remarkably readable.
16019 The only changeable option is the length of lines, as for LaTeX output.
16022 \begin_layout Subsection
16026 \begin_layout Standard
16027 LyX documents can be converted to hypertext markup, usually by converting
16028 to LaTeX first, then converting that to HTML\SpecialChar \@.
16030 \begin_inset Formula $\rightarrow$
16033 HTML converters are currently known to LyX:
16050 Though they are autodetected, you can overide the selection in preferences.
16051 You can also include further command line options in this dialog.
16055 \begin_layout Subsection
16059 \begin_layout Standard
16067 \begin_layout Standard
16068 \begin_inset VSpace bigskip
16074 \begin_layout Standard
16075 The fastest way to generate a basic PDF file (no tags, links, etc.) with
16076 any version of LyX is to save the document as a Postscript® file, then
16082 Starting with version 1.1.6, the menu item
16086 will do all this for you.
16087 There are some issues with fonts that you need to pay attention to: see
16088 Section\InsetSpace ~
16090 \begin_inset LatexCommand \ref{sec:badfonts}
16095 Also, as of version 1.1.6, there is a better method that will generate much
16096 more sophisticated files.
16099 \begin_layout Subsubsection
16103 \begin_layout Standard
16104 With pdfLaTeX you need to convert your eps figures to PDF (see Section\InsetSpace ~
16106 \begin_inset LatexCommand \ref{sec:pdfeps}
16110 ), and you cannot use pstricks.
16111 On the other hand, with pdfLaTeX it is possible to insert directly images
16112 in JPEG or PNG format, use TrueType fonts, and more.
16115 \begin_layout Subsubsection
16116 Why does the text look so bad when viewed with Acrobat Reader?
16117 \begin_inset LatexCommand \label{sec:badfonts}
16122 \begin_inset OptArg
16125 \begin_layout Standard
16126 Bad Fonts in Acrobat Reader
16134 \begin_layout Standard
16135 The problem is that bitmap fonts are displayed poorly by Acrobat Reader.
16136 When creating a PDF from the LyX file, you need to use outline font instead
16137 of the default bitmap fonts (in fact, you should also use outline fonts
16138 for Postscript files).
16139 Recent LaTeX distributions come with Postscript® Type 1 version of the
16140 standard (Computer Modern) fonts.
16141 pdfLaTeX uses these font by default.
16142 Dvips doesn't use these fonts by default, so to make it use them, add the
16143 following to lines to your
16150 \begin_layout LyX-Code
16154 \begin_layout LyX-Code
16158 \begin_layout Standard
16159 If the default LaTeX font encoding (OT1) is used, nothing else need to be
16161 However, if the T1 font encoding is used, then LaTeX uses the newer EC
16162 fonts, for which there are no Type1 version.
16163 There are two solutions in this case: Either use the
16164 \begin_inset Quotes eld
16168 \begin_inset Quotes erd
16171 (which is in fact a
16172 \begin_inset Quotes eld
16176 \begin_inset Quotes erd
16179 font that emulates T1 coded fonts using the standard CM fonts).
16180 This is done by selecting
16181 \begin_inset Quotes eld
16184 AE (Almost European)
16185 \begin_inset Quotes erd
16190 Document\SpecialChar \menuseparator
16191 Settings\SpecialChar \menuseparator
16192 Fonts\SpecialChar \menuseparator
16196 However, some glyphs are missing from the CM fonts (e.g.
16197 eth, thorn), and they are taken from the EC fonts.
16198 Therefore you get these glyphs as bitmaps.
16200 \begin_inset Quotes eld
16204 \begin_inset Quotes erd
16209 Document\SpecialChar \menuseparator
16210 Settings\SpecialChar \menuseparator
16211 Fonts\SpecialChar \menuseparator
16215 It is a newer and probably the best Postscript® Type 1 version of cm.
16216 Basically, we recommend this over the
16217 \begin_inset Quotes eld
16221 \begin_inset Quotes erd
16225 However, the Latin Modern fonts differ from cm in some visual aspects,
16226 which does not please everybody.
16229 \begin_layout Standard
16230 Note: LyX uses by default the T1 font encoding.
16231 If you wish to use the default font encoding (this is not recommended,
16232 unless you only write English documents), clear the field
16240 in preferences (tabs
16252 \begin_layout Standard
16253 An alternate option is to use the standard Postscript® fonts instead of
16254 the Computer Modern fonts.
16255 To do that, you just need to select one of the fonts listed in the document
16256 layout dialog (except for
16257 \begin_inset Quotes eld
16261 \begin_inset Quotes erd
16265 \begin_inset Quotes eld
16269 \begin_inset Quotes erd
16272 , they're all Postscript® fonts).
16273 When using the Postscript® fonts, the result PDF file is smaller as the
16274 fonts are not saved into the file.
16275 Furthermore, the Postscript® fonts include all T1 glyphs.
16276 On the other hand, the Postscript® fonts have no bold symbol font, so poor
16277 man's bold must be used (see Section\InsetSpace ~
16279 \begin_inset LatexCommand \ref{sec:pdfbold}
16284 The Postscript® fonts also look different from the Computer Modern fonts.
16287 \begin_layout Standard
16288 To sum up, both the Computer Modern and the Postscript® fonts gives good
16289 results (with few exceptions).
16290 The decision of which one to use is a matter of taste.
16293 \begin_layout Subsubsection
16296 boldsymbol{} command work when I use pslatex?
16297 \begin_inset LatexCommand \label{sec:pdfbold}
16302 \begin_inset OptArg
16305 \begin_layout Standard
16322 \begin_layout Standard
16323 The Postscript® fonts do not have a bold symbol font.
16324 The solution is to use the
16330 (poor man's bold) command.
16333 \begin_layout Standard
16334 It is possible to redefine the
16349 \begin_layout LyX-Code
16359 \begin_layout Standard
16363 \begin_layout Subsubsection
16364 Is it possible to do write latex code which is processed only when running
16366 \begin_inset OptArg
16369 \begin_layout Standard
16370 Conditionals with pdfLaTeX
16378 \begin_layout Standard
16380 Here is an example:
16383 \begin_layout LyX-Code
16391 \begin_layout LyX-Code
16401 \begin_layout LyX-Code
16407 \begin_layout LyX-Code
16413 \begin_layout LyX-Code
16419 \begin_layout LyX-Code
16425 \begin_layout LyX-Code
16429 \begin_layout LyX-Code
16435 \begin_layout LyX-Code
16438 pdfinfo { /Author (your name and e-mail address)
16441 \begin_layout LyX-Code
16442 /Title (official title -- i.e., title element)
16445 \begin_layout LyX-Code
16446 /Subject (one line description of the document)
16449 \begin_layout LyX-Code
16453 \begin_layout LyX-Code
16456 pdfcatalog { /PageMode (/UseNone)
16459 \begin_layout LyX-Code
16460 % /OpenAction (fitbh)
16463 \begin_layout LyX-Code
16467 \begin_layout LyX-Code
16470 usepackage[pdftex]{hyperref}
16473 \begin_layout LyX-Code
16479 \begin_layout LyX-Code
16482 usepackage[ps2pdf]{hyperref}
16485 \begin_layout LyX-Code
16491 \begin_layout Subsubsection
16492 How can I make URLs clickable ?
16495 \begin_layout Standard
16496 See the references here :
16499 \begin_layout Standard
16500 \begin_inset LatexCommand \url{http://wiki.lyx.org/pmwiki.php/FAQ/PDF}
16507 \begin_layout Subsection
16511 \begin_layout Standard
16512 Custom exports are possible if you have some particularly weird format you
16513 wish to convert to, assuming you have the relevant converter, of course.
16518 file can be chosen in the
16523 ile\SpecialChar \menuseparator
16528 xport\SpecialChar \menuseparator
16535 dialog; LyX will automatically convert the file to this point, then feed
16536 it to your custom converter.
16537 The possible values are all formats that LyX can produce from its own documents.
16541 \begin_layout Standard
16542 The converter command is also specified in the dialog.It should be a completely
16543 qualified command line which uses the variable
16547 to specify the name of the file.
16548 If this variable is not given, then the file will be sent to the standard
16549 input of your command.
16550 You may have to apply a bit of ingenuity to escape this sequence correctly
16551 so that it is compatible with your shell.
16555 \begin_layout Standard
16556 While it is not possible to save this command using the
16560 dialog, you can manually edit your
16567 \begin_layout LyX-Code
16570 custom_export_command "mycommand $$FName"
16573 \begin_layout Section
16574 The Complete reLyX Description
16575 \begin_inset LatexCommand \label{sec:reLyX}
16582 \begin_layout Subsection
16586 \begin_layout Standard
16587 The simplest way to use reLyX is via the
16592 ile\SpecialChar \menuseparator
16600 That runs reLyX on the given file and loads the resulting file into LyX.
16601 You should try that first, and call it from the command line only if you
16602 need to use more complicated options.
16605 \begin_layout Standard
16657 \begin_layout Standard
16713 \begin_layout Standard
16723 \begin_layout Subsection
16727 \begin_layout Description
16733 By default, when reLyX sees a
16739 command, it creates a file of textclass
16740 \begin_inset Quotes eld
16744 \begin_inset Quotes erd
16747 and reads the LyX layout file for that class.
16752 to declare a different textclass (and read a different layout file).
16755 \begin_layout Description
16761 By default, reLyX gives sparse output and deletes the temporary files which
16762 were created during translation.
16767 flag will create much more output (both to stdout and stderr) and leave
16768 the temporary files around.
16771 \begin_layout Description
16777 reLyX will not run if the
16781 file it would generate already exists Use the
16785 option (carefully) to clobber any existing files.
16788 \begin_layout Description
16794 Print out usage information and quit
16797 \begin_layout Description
16803 With this option, all temporary files and LyX output files (for the given
16804 input file, for any included files, or for any file fragments given with
16809 option) will be put into
16814 Otherwise, for each file
16818 , the temporary files and the LyX output file will be created in
16823 This can be useful if a file includes files from other directories which
16824 you want to consolidate in one directory, or if you don't have write permission
16825 on the directory the LaTeX files are in.
16828 \begin_layout Description
16834 The input files are LaTeX fragments, with no preamble matter or
16841 This option requires the
16845 option, since there are no
16851 commands in the files reLyX is translating.
16852 When using this option, you can translate more than one file, as long as
16853 all files are the same class.
16854 The LyX file created by reLyX can be included in an existing LyX file using
16860 nsert\SpecialChar \menuseparator
16865 \SpecialChar \menuseparator
16876 \begin_layout Description
16881 Regular environments (see the Section\InsetSpace ~
16883 \begin_inset LatexCommand \ref{sub:relyx-syntax}
16888 If you give more than one environment, separate them with commas (not
16890 You'll probably need to quote the environment list, especially if it has
16891 asterisk environments (foo*) in it.
16892 If you use this command often, considering creating a personal syntax file.
16895 \begin_layout Description
16901 Input (one or more quoted, comma-separated) syntax files to read in addition
16903 (see the section Section\InsetSpace ~
16905 \begin_inset LatexCommand \ref{sub:relyx-syntax}
16912 \begin_layout Subsection
16916 \begin_layout Subsubsection
16920 \begin_layout Standard
16921 reLyX will create a LyX file
16925 from the LaTeX file
16936 \begin_layout Standard
16954 does not exist and does not have one of these suffixes, reLyX will try
16960 (This is similar to the behavior of LaTeX.)
16963 \begin_layout Standard
16964 The purpose of reLyX is to translate
16969 If your LaTeX file doesn't compile---or if you do weird things, like redefining
16970 standard LaTeX commands---it may choke.
16971 LaTeX209 will often be translated correctly, but it's not guaranteed.
16974 \begin_layout Standard
16975 reLyX has some bugs and lacks a few features.
16976 However, its main goals are:
16979 \begin_layout Itemize
16980 Get through a well-behaved LaTeX2e file without crashing
16983 \begin_layout Itemize
16984 Translate a lot of that file.
16987 \begin_layout Itemize
16988 Localize the parts that can't be translated and copy them in TeX mode
16991 \begin_layout Standard
16992 It achieves these main goals pretty well on most files.
16995 \begin_layout Standard
16996 There are many improvements that can and will be made to reLyX in the future.
16997 However, we wanted to get reLyX out there early on, to make it easier for
16998 new LyX users to read in their existing LaTeX files.
17001 \begin_layout Subsubsection
17005 \begin_layout Standard
17006 Here's a more lengthy description of what you should do to translate a LaTeX
17010 \begin_layout Itemize
17015 \begin_layout Standard
17016 reLyX will inform you of its progress and give any warnings to stderr, so
17017 if you don't want any output at all, try (in csh)
17018 \begin_inset Quotes eld
17023 reLyX foo.tex >& /dev/null
17026 \begin_inset Quotes erd
17030 \begin_inset Quotes eld
17042 \begin_inset Quotes erd
17046 You should NOT redirect standard output to
17055 \begin_layout Itemize
17056 Run LyX on the resulting .lyx file.
17060 \begin_layout Standard
17061 In theory, most of the file will have been translated, and anything that's
17062 untranslatable will be highlighted in red (TeX mode).
17063 In theory, LyX will be able to read in the file, and to create printed
17064 documents from it, because all that untranslated red stuff will be passed
17065 directly back to LaTeX, which LyX uses as a backend.
17066 Unfortunately, reality doesn't always reflect theory.
17067 If reLyX crashes, or LyX cannot read the generated LyX file, see Section\InsetSpace ~
17069 \begin_inset LatexCommand \ref{sub:relyx-bugs}
17081 \begin_layout Itemize
17082 Change things that are in ERT boxes (TeX code) by hand in LyX.
17086 \begin_layout Standard
17087 As mentioned above, you should be able to print out the LyX file even without
17089 However, changing a command in TeX mode to the corresponding LyX object
17090 will allow you to take advantage of LyX's WYSIWYM editing.
17093 \begin_layout Standard
17094 reLyX is not guaranteed to create a LyX file which generates exactly the
17095 same output as the LaTeX file, but it should come close.
17096 reLyX will generally err on the side of translating less to ensure that
17097 dvi or ps files are accurate, even though this leads to more
17098 \begin_inset Quotes eld
17102 \begin_inset Quotes erd
17109 \begin_layout Itemize
17110 PROOFREAD THE DOCUMENT!!
17114 \begin_layout Standard
17115 I'm sure you were planning on doing this anyway, but it's particularly important
17116 after translating a LaTeX document.
17117 reLyX is, at least now, better at
17118 \begin_inset Quotes eld
17122 \begin_inset Quotes erd
17125 (translating the whole document) than
17126 \begin_inset Quotes eld
17130 \begin_inset Quotes erd
17133 (translating every little detail).
17134 For example, you may see extra spaces or deleted spaces.
17135 Space handling has improved, but it's not perfect.
17139 \begin_layout Subsubsection
17140 What reLyX Can Handle
17143 \begin_layout Standard
17144 reLyX understands many LaTeX commands.
17148 \begin_layout Itemize
17149 regular text, including mini-commands like ~, '',
17161 , as well as accented characters like
17167 , and the special cases ?` and !`
17170 \begin_layout Itemize
17171 title commands like
17195 and the abstract environment
17198 \begin_layout Itemize
17199 heading commands like
17205 including starred commands (
17214 \begin_layout Itemize
17240 \begin_layout Itemize
17253 environments, and their
17260 Also, well-behaved nested lists
17263 \begin_layout Itemize
17264 cross-referencing commands:
17289 \begin_layout Itemize
17303 \begin_layout Itemize
17304 font-changing commands including
17322 , and corresponding commands to change family, size, series, and shape
17325 \begin_layout Itemize
17352 \begin_inset Quotes erd
17362 \begin_inset Quotes erd
17368 \begin_layout Itemize
17373 environment, and commands that go inside it like
17394 \begin_layout Itemize
17409 commands within them
17412 \begin_layout Itemize
17423 command, as well as BibTeX's
17438 \begin_layout Itemize
17439 miscellaneous commands:
17468 \begin_layout Itemize
17469 documentclass-specific environments (and some commands) which can be translated
17473 \begin_layout Itemize
17474 arguments to certain untranslatable commands (e.g.
17484 \begin_layout Standard
17485 Some of this support may not be 100% yet.
17486 See below for details
17489 \begin_layout Standard
17490 reLyX copies math (almost) verbatim from your LaTeX file.
17491 Luckily, LyX reads in LaTeX math, so (almost) any math which is supported
17492 by LyX should work just fine.
17493 A few math commands which are not supported by LyX will be replaced with
17494 their equivalents, e.g.,
17514 \begin_layout Standard
17515 reLyX will also copy any preamble commands (i.e., anything before
17521 ) verbatim, so fancy stuff you've got in your preamble should be conserved
17522 in dvi and printed documents, although it will not of course show up in
17524 Check the preamble to make sure.
17527 \begin_layout Subsubsection
17528 What reLyX Can't Handle --- But it's OK
17531 \begin_layout Itemize
17539 \begin_layout Itemize
17543 \begin_layout Itemize
17565 \begin_layout Itemize
17585 \begin_layout Itemize
17597 reLyX is careful to copy
17601 in this case, including comments and whitespace.
17604 \begin_layout Itemize
17605 some unknown (e.g., user-defined) environments and commands
17608 \begin_layout Standard
17609 reLyX copies unknown commands, along with their arguments, verbatim into
17617 where it doesn't recognize the
17618 \begin_inset Quotes eld
17622 \begin_inset Quotes erd
17625 environment, it will copy verbatim until it sees
17631 (unless you use the
17636 Hopefully, then, most of these unknown commands won't cause reLyX to break;
17637 they'll merely require you to do some editing once you've loaded the file
17639 That should be less painful than editing either the
17647 file using a text editor.
17650 \begin_layout Subsubsection
17651 What reLyX Handles Badly --- a.\InsetSpace ~
17655 \begin_inset LatexCommand \label{sub:relyx-bugs}
17662 \begin_layout Standard
17663 Since reLyX is relatively new, it's got a number of problems.
17664 As it matures, these bugs will be squished.
17665 A number of bugs and missing features can be found listed on the LyX bug
17667 \begin_inset LatexCommand \url[LyX Bugzilla]{http://bugzilla.lyx.org/}
17674 \begin_layout Standard
17675 If reLyX is choking on something, or LyX can't read it after reLyX translates
17676 it, the best thing to do is to put
17682 before the offending text, and
17690 \begin_inset Quotes eld
17694 \begin_inset Quotes erd
17698 reLyX will copy this block exactly, in TeX mode.
17699 Then edit the resulting LyX file, and translate the unknown stuff by hand.
17704 environment is magical; the
17716 commands will not be put into the LyX file.
17719 \begin_layout Itemize
17720 \begin_inset Quotes eld
17724 \begin_inset Quotes erd
17727 copying of unknown environments and commands isn't quite exact.
17728 Specifically, newlines and comments may be lost.
17729 This will yield ugly LyX, but in almost all cases the output will be the
17731 However, certain parts of the file will be copied perfectly, including
17732 whitespace and comments.
17733 This includes: the LaTeX preamble,
17743 commands, and skip blocks.
17746 \begin_layout Itemize
17747 reLyX translates only a few options to the
17754 (Specifically 1[012]pt, [letter|legal|executive|a4|a5|b5]paper, [one|two]side,
17755 landscape, and [one|two]column.) Other options are placed in the extra class
17756 options field in the
17761 ocument\SpecialChar \menuseparator
17772 \begin_layout Standard
17773 More importantly, reLyX doesn't translate
17779 commands, margin commands,
17785 s, or, in fact, anything else from the preamble.
17786 It simply copies them into the LaTeX preamble.
17787 If you have margin commands in your preamble, then the LyX file will generate
17789 However, these margins will override any margins you set in the LyX
17796 \SpecialChar \menuseparator
17802 So you should remove the options from the preamble to be safe.
17803 The same goes for setting your language with babel,
17819 \begin_layout Itemize
17820 The foil class has a couple bugs.
17821 reLyX may do weird things with optional arguments to
17828 Also, it may handle
17834 incorrectly (although the stuff in the environment should translate normally).
17837 \begin_layout Standard
17838 reLyX is hopefully rather robust.
17839 As mentioned above, it may not translate your file perfectly, but it shouldn't
17841 If it does crash---and the problem is not one of those mentioned above
17846 file---see Section\InsetSpace ~
17848 \begin_inset LatexCommand \ref{sub:relyx-bug-reports}
17855 \begin_layout Subsubsection
17856 What LyX Can't Handle
17859 \begin_layout Standard
17860 LyX itself is missing a couple features, such that even if reLyX translates
17861 things perfectly, LyX may still have trouble reading it.
17862 If you really need these features, you can export your final document as
17863 LaTeX, and put them back in.
17868 for more details on these bugs.
17871 \begin_layout Itemize
17872 For a number of commands, LyX does not support the optional argument.
17885 (and other sectioning commands), and
17894 reLyX will automatically discard the optional arguments with a warning
17896 LyX also ignores the width argument for the
17903 \begin_layout Itemize
17904 Centering (or right or left justifying) works on full paragraphs.
17907 \begin_layout Itemize
17908 LyX support for tables isn't perfect.
17909 For complicated tables, use a
17910 \begin_inset Quotes eld
17914 \begin_inset Quotes erd
17917 block, so that they will be copied in TeX mode.
17920 \begin_layout Itemize
17921 The LyX math editor can't handle the AMS-LaTeX math environments align,
17923 So those environments will be copied in TeX mode.
17928 environments to the exactly equivalent displaymath, and then they will
17929 be translated correctly.
17932 \begin_layout Subsection
17936 \begin_layout Standard
17940 \begin_inset Quotes eld
17944 \begin_inset Quotes erd
17948 \begin_inset Quotes eld
17952 \begin_inset Quotes erd
17955 foo.tex > foo.debug
17958 \begin_layout Standard
17959 The above will create a file my/dir/foo.lyx from foo.tex, overwriting if necessary.
17969 block, it will translate the stuff within the block, but copy the
17981 commands in TeX mode.
17982 Finally, I'm going to keep the temporary files around (they will also
17983 be in my/dir/) and output lots of debugging information into the file foo.debug.
17986 \begin_layout Subsection
17990 \begin_layout Subsubsection
17992 \begin_inset LatexCommand \label{sub:relyx-bug-reports}
17999 \begin_layout Standard
18000 If reLyX is crashing or otherwise acting strangely---in ways other than
18001 those described in Section\InsetSpace ~
18003 \begin_inset LatexCommand \ref{sub:relyx-bugs}
18007 or the bug tracker---then please run reLyX
18012 That will allow you to figure out where in the reLyXing process it crashed.
18013 That, in turn, will allow you to write a better bug report, which will
18014 allow the developers to fix it more quickly and easily.
18017 \begin_layout Standard
18018 Bug reports should be sent to the LyX developers' mailing list.
18019 Its address is currently
18021 lyx-devel@lists.lyx.org
18024 If you are running reLyX on a huge file, please do not send all of the
18025 output in your bug report.
18026 Just include the last ten or twenty lines of output, along with the piece
18027 of the LaTeX file it crashed on.
18028 Or, even better, attach a small but complete file which causes the same
18029 problem as your original file.
18032 \begin_layout Subsubsection
18033 Implementation Details:
18036 \begin_layout Standard
18037 reLyX makes several
18038 \begin_inset Quotes eld
18042 \begin_inset Quotes erd
18045 in order to translate a TeX file.
18046 On each pass, it creates one or two files.
18049 \begin_layout Description
18054 Before doing anything, read the syntax file (or files).
18057 \begin_layout Description
18062 Split preamble (anything before a
18068 command) off the rest of the file.
18069 It saves the two pieces in separate files.
18070 This is necessary because there may be very strange stuff in a preamble.
18071 It also ignores anything after the
18077 , on the assumption that it isn't LaTeX.
18080 \begin_layout Description
18085 Translate the preamble.
18086 Currently, that just means translating the
18092 command and copying the rest exactly into the LyX preamble.
18096 \begin_layout Standard
18097 Once you know what class the document is, read the LyX layout file for that
18102 \begin_layout Description
18108 \begin_inset Quotes eld
18112 \begin_inset Quotes erd
18115 the TeX file, generating slightly stricter LaTeX.
18120 \begin_layout Itemize
18125 to the equivalent but clearer
18130 \begin_layout Itemize
18131 Removing optional arguments that LyX can't handle (e.g., from
18140 \begin_layout Itemize
18154 This is necessary because LyX always writes out the non-local forms anyway.
18155 This should very rarely make a difference.
18159 \begin_layout Description
18164 Translate LaTeX text, commands, and environments to LyX.
18167 \begin_layout Description
18172 Put the two pieces back together, and do some final tweaking, to generate
18176 \begin_layout Standard
18189 commands, reLyX will loop back to the beginning and translate those.
18190 It assumes that the included files are the same class as the main file,
18191 and that they have no preamble matter.
18198 command in the preamble of a file, the command will be copied exactly into
18199 the LaTeX preamble portion of the LyX file, so the included file won't
18200 be translated.) So when translating included files, it skips passes 0 and
18204 \begin_layout Standard
18205 If reLyX doesn't find a file you wanted to include, it will give a warning,
18206 but will continue to translate any files it does find.
18209 \begin_layout Subsubsection
18213 \begin_layout Standard
18214 reLyX reads a LyX layout file to know how to handle LaTeX environments and
18215 commands which get translated to LyX layouts.
18216 This file will include all
18217 \begin_inset Quotes eld
18221 \begin_inset Quotes erd
18224 non-math environments (i.e., including quote and itemize, but not tabular,
18225 minipage, and some other fancy environments), and commands like
18238 If you want to reLyX a class that doesn't have an existing layout file,
18239 then you'll have to create a layout file.
18240 But you have to do this anyway, in order to LyX the file, since LyX depends
18241 on layout files to know how to display and process its files.
18242 Check the LyX documentation for help with this task (which can be hard
18243 or easy, depending on the class you want to create a layout file for.) If
18244 your class is quite similar to a class that has a layout file, then consider
18252 \begin_layout Subsubsection
18254 \begin_inset LatexCommand \label{sub:relyx-syntax}
18261 \begin_layout Standard
18262 reLyX always reads at least one syntax file, called the default syntax file.
18263 reLyX will read your personal syntax file if it exists; otherwise it will
18264 read the system-wide file.
18265 reLyX will read additional syntax files if you specify them with the
18270 (These extra files should have the same format as the default file, but
18271 will tend to be shorter, since they only have to specify extra commands
18272 not found in the default file.) A syntax file tells reLyX a few things.
18275 \begin_layout Standard
18276 First, it describes the syntax of each command, that is, how many required
18277 arguments and how many optional arguments the command takes.
18278 Knowing this makes it easier for reLyX to copy (in TeX mode) commands that
18279 it doesn't know how to translate.
18280 The syntax file simply has a command, followed by braces or brackets describing
18281 its arguments in the correct order.
18282 For example, a syntax file entry
18294 command takes an optional argument followed by a required one, while the
18307 command takes no arguments at all.
18308 When reLyX encounters a token that it doesn't know how to translate into
18309 LyX, it will copy the token---along with the correct number of arguments---exac
18311 If the token is not in the syntax file, then reLyX just copies as many
18312 arguments as it finds.
18313 This means that it may copy too much.
18314 But since the user can specify additional syntax files, that shouldn't
18318 \begin_layout Standard
18319 Some commands that cannot be translated to LyX, like
18325 , have as one of their arguments regular LaTeX text.
18327 \begin_inset Quotes eld
18331 \begin_inset Quotes erd
18334 is put into an argument of an (untranslatable) command in the syntax file,
18335 then reLyX will translate that argument instead of copying it verbatim.
18336 So, for example, the default syntax file has
18340 raisebox{}[][]{translate}
18343 This means that the
18349 command and the first argument (and optional arguments if they exist) are
18350 copied in TeX mode, but the last argument (which may contain math, complicated
18351 LaTeX, other untranslatable commands, etc.) will be translated into LyX.
18353 \begin_inset Quotes eld
18357 \begin_inset Quotes erd
18360 on optional arguments.
18363 \begin_layout Standard
18364 User-defined syntax files are allowed to define new commands and their syntax,
18365 or override the number of arguments for a command given in the default
18367 (E.g., if you're using a style that gives an extra argument to some command...)
18368 However, this will only be useful for commands copied in TeX mode.
18369 Commands which are actually translated by reLyX (like
18375 ) have their argument syntax hard-coded.
18376 The hard-coded commands are identified in the default syntax file.
18379 \begin_layout Standard
18380 Second, the syntax file describes any
18381 \begin_inset Quotes eld
18384 regular environments
18385 \begin_inset Quotes erd
18389 Usually, an entire unknown environment will be copied in TeX mode.
18390 If you define a regular environment
18391 \begin_inset Quotes eld
18395 \begin_inset Quotes erd
18398 , though, then only the
18410 commands will be copied in TeX mode; the text within the environment will
18411 be treated (i.e., translated) by reLyX as regular LaTeX, rather than being
18412 copied into TeX mode.
18413 Don't try to declare
18421 as regular environments, as the text within those environments will confuse
18422 reLyX; use this capability for new environments you create that have plain
18423 text or math or simple commands in them.
18424 You also can't declare unknown math environments (like
18428 ) as regular environments, either, since the LyX math editor won't understand
18430 The names of regular environments appear, whitespace-separated, between
18443 statements in the syntax file.
18444 (If you have a regular environment which you won't use very often, you
18449 option rather than writing a syntax file.)
18452 \begin_layout Standard
18453 Third, the syntax file describes a math translation table.
18454 The LyX math editor doesn't support a few commands.
18459 is supported, but the equivalent
18466 Put any commands you'd like translate between
18480 \begin_inset Quotes eld
18492 \begin_inset Quotes erd
18501 in math mode will be converted to
18502 \begin_inset Quotes eld
18512 \begin_inset Quotes erd
18519 (in cases where a token made up of a backslash and a non-letter is translated
18520 to something with letters at the end, a space is added by reLyX.
18522 \begin_inset Quotes eld
18532 \begin_inset Quotes erd
18535 is correctly translated to
18536 \begin_inset Quotes eld
18546 \begin_inset Quotes erd
18552 \begin_layout Subsubsection
18556 \begin_layout Standard
18557 You need Perl version 5.002 or later to run reLyX.
18558 <plug> If you don't have Perl, you should get it anyway (at
18559 \begin_inset LatexCommand \url[Perl]{http://www.perl.com/}
18563 ), because it's a really useful tool for pretty much anything.
18567 \begin_layout Subsection
18571 \begin_layout Standard
18572 reLyX should always explain why it crashes, if it crashes.
18573 Some diagnostics may be very technical, though, if they come from the guts
18575 reLyX gives much more information while running if you use the
18579 option, but you shouldn't need that unless something goes wrong.
18582 \begin_layout Standard
18583 When it's finished, reLyX will tell you if it finished successfully or died
18587 \begin_layout Subsection
18591 \begin_layout Standard
18592 Always keep a copy of your original LaTeX files either under a different
18593 name or in a different directory.
18594 There are a couple ways in which using LyX could lead to overwriting the
18595 original LaTeX file.
18598 \begin_layout Standard
18611 and want to re-export it, note that it will overwrite the original
18620 ask you if you want to overwrite it.)
18623 \begin_layout Standard
18624 If you have chosen not to use a temporary directory in the preferences,
18625 then LyX will create its temporary files in your current directory, which
18626 means your LaTeX original may be overwritten (without a warning from LyX)
18628 \begin_inset Quotes eld
18632 \begin_inset Quotes erd
18635 or print the LyX document.
18638 \begin_layout Subsection
18642 \begin_layout Description
18646 MY_LYXDIR/layouts/*.layout
18652 User's personal layout files for document classes
18655 \begin_layout Description
18659 MY_LYXDIR/reLyX/syntax.default
18665 User's personal syntax file
18668 \begin_layout Description
18672 LIBDIR/layouts/*.layout
18678 System-wide layout files for document classes
18681 \begin_layout Description
18685 LIBDIR/reLyX/syntax.default
18691 System-wide LaTeX syntax file
18694 \begin_layout Standard
18699 is the system-wide LyX directory, usually something like
18701 /usr/local/share/lyx/
18708 is your personal LyX directory, something like
18712 in your home directory.
18713 You can see their actual values in the
18718 elp\SpecialChar \menuseparator
18728 \begin_layout Subsection
18732 \begin_layout Standard
18744 \begin_layout Subsection
18748 \begin_layout Standard
18749 Copyright (c) 1998--9
18755 karger@voth.chem.utah.edu
18760 \begin_layout Standard
18764 \begin_layout Itemize
18769 wrote the original CleanTeX pass.
18772 \begin_layout Itemize
18778 \begin_layout Itemize
18786 \begin_layout Itemize
18789 David Suarez de Lis
18792 \begin_layout Standard
18793 Other contributors:
18796 \begin_layout Itemize
18799 Jean-Marc Lasgouttes
18801 worked on the wrapper script and offered lots of bug reports, advice, and
18802 feature suggestions.
18805 \begin_layout Itemize
18818 \begin_layout Itemize
18819 Various members of the LyX developers' and users' lists provided bug reports
18820 and feature suggestions.
18823 \begin_layout Standard
18824 reLyX uses a modified version the Perl TeX parser
18834 ilya@math.ohio-state.edu
18836 ), available on CPAN.
18839 \begin_layout Chapter
18840 LyX Features needing Extra Software
18843 \begin_layout Section
18844 Using LyX with SGML-Tools (aka LinuxDoc)
18847 \begin_layout Standard
18853 \begin_layout Subsection
18857 \begin_layout Standard
18858 LinuxDoc is a document class available in LyX if you have the
18863 You can use it to produce documents in the so-called Standardized General
18864 Mark-up Language (SGML) in the particular format used by the Linux Documentatio
18866 That is obviously helpful if you are contributing to that project.
18867 You can use the SGML format with the
18871 package of scripts and programs (to produce other formats, including Latex,
18872 HTML, plain text, man pages and\SpecialChar \ldots{}
18874 You may therefore prefer to use this document class if you want to write
18875 something that can be easily translated into other formats.
18878 \begin_layout Standard
18879 You will find that LinuxDoc has fewer layout options than the other text
18881 This is mainly so that the translations into other formats have a chance
18882 of making some sense.
18883 In this section we describe:
18886 \begin_layout Itemize
18887 how to setup and use a document in LinuxDoc
18890 \begin_layout Itemize
18891 how to use the tags in LinuxDoc to layout your document
18894 \begin_layout Itemize
18895 how to use the SGML packages to produce the various formats
18898 \begin_layout Itemize
18899 how to sort out some problems.
18902 \begin_layout Subsection
18903 Preparing and using a LinuxDoc document
18906 \begin_layout Subsubsection
18910 \begin_layout Standard
18911 You start by selecting the LinuxDoc class using the
18916 ocument\SpecialChar \menuseparator
18928 Then you will find that there are fewer paragraph environments than for
18929 most other classes.
18930 You can see them on the pull down box on the left of the tool bar.
18931 How to use them is described in section\InsetSpace ~
18933 \begin_inset LatexCommand \ref{sec:sgmlparas}
18940 \begin_layout Standard
18945 enter a title for the document, followed by an author, marking each with
18946 the appropriate paragraph environment.
18947 If you don't do this, you will get errors when you try to print the file.
18948 You can then enter the date and an abstract.
18949 The document proper must start with a Section paragraph environment rather
18950 than any standard layout.
18953 \begin_layout Standard
18954 After that you can prepare a document as usual using the available range
18955 of paragraph environments.
18956 See section\InsetSpace ~
18958 \begin_inset LatexCommand \ref{sec:sgmlparas}
18962 for the full list and their uses.
18965 \begin_layout Subsubsection
18966 Output from LinuxDoc
18969 \begin_layout Standard
18970 You can print and save these documents in the normal way.
18971 To use the other features of the SGML package you need to save your document
18972 as LinuxDoc; this is a version in which the document is translated into
18973 the basic sgml tags.
18980 ile\SpecialChar \menuseparator
18985 xport\SpecialChar \menuseparator
18993 You will get a file with the same name and a
18997 extension rather than a
19004 \begin_inset LatexCommand \ref{sec:sgmloperate}
19008 on how you than make use of this file.
19011 \begin_layout Subsection
19012 Using the paragraph environments in LinuxDoc
19015 \begin_layout Subsubsection
19016 The Structure of a LinuxDoc Document
19019 \begin_layout Standard
19020 There is a formal structure for LinuxDoc which limits how you can place
19022 There are two parts to all documents:
19025 \begin_layout Description
19026 Header: this is everything up to the first time you insert a Section layout
19028 It can include title, author, date, abstract and ToC.
19029 You must include the first two.
19032 \begin_layout Description
19033 Body: from the beginning of the first section onwards.
19034 All other tags are allowed.
19038 \begin_layout Subsubsection
19039 The LinuxDoc Paragraph Environments
19042 \begin_layout Standard
19043 \begin_inset LatexCommand \label{sec:sgmlparas}
19047 Here is a list of all the tags you will find listed on the layout bar in
19048 the order they come there, with some comments where the purpose or use
19052 \begin_layout Itemize
19057 works as described in [cross reference]
19060 \begin_layout Itemize
19065 : This will appear at the top left of the document when printed, above a
19066 heavy horizontal rule, although you will not see this on the LyX screen.
19069 \begin_layout Itemize
19072 Section, Subsection, Subsubsection, Paragraph and Subparagraph:
19074 all do what you would expect and in the usual order.
19075 Whether they are numbered or not is controlled by the
19077 Section\InsetSpace ~
19078 number\InsetSpace ~
19082 You cannot get the equivalent number free versions in any other way; there
19090 \begin_layout Itemize
19095 As usual this produces a numbered and indented list as described in the
19103 \begin_layout Itemize
19108 Again much the same as in the other classes: see the
19115 \begin_layout Itemize
19120 : As explained in the
19125 Remember that if you want the bold element at the start of a description
19126 to be more than one word then you need to put protected spaces between
19131 \begin_layout Itemize
19139 \begin_layout Itemize
19142 Code: similar to the Lyx-Code
19147 \begin_layout Itemize
19152 : Anything you mark with this will appear on the left of the heading of
19153 the document, under the heavy rule.
19156 \begin_layout Itemize
19161 Anything you mark with this will appear on the right of the heading under
19163 You do not have to make this a date.
19164 Any text can be entered, e.\InsetSpace ~
19169 \begin_layout Itemize
19174 : You can use this to produce a free standing paragraph after the author
19175 and date, and before the first section.
19176 You are only allowed one such paragraph.
19180 \begin_layout Standard
19186 This needs checking ---
19196 \begin_layout Itemize
19205 \begin_layout Standard
19210 I have not yet checked this ---
19220 \begin_layout Subsubsection
19221 Other document features
19224 \begin_layout Standard
19225 You can also use the
19229 menu to set fonts or to emphasis words.
19230 You can also use the table of contents as usual; see the corresponding
19236 Although you will find some some other features on the menus e.\InsetSpace ~
19238 inserting footnotes.
19239 There is some doubt about whether these will work correctly.
19243 \begin_layout Standard
19248 Again still checking to see whether this is my system
19258 \begin_layout Subsubsection
19259 Cross references and HTML
19262 \begin_layout Standard
19267 menu you will find two new options relating to the inclusion of URL addresses.
19268 If you use either option you will find some highlighted TeX code inserted
19269 into your document in three separate blocks with spaces available between.
19270 The blocks will be:
19273 \begin_layout Quote
19305 \begin_layout Standard
19306 You insert a full HTML tag between the first and second blocks.
19308 \begin_inset LatexCommand \url{http://any.address}
19312 or other valid tags such as
19313 \begin_inset LatexCommand \url{mailto:me@my.address}
19325 insert some description between the second and third blocks.
19326 The differences are:
19329 \begin_layout Itemize
19334 both the HTML tag and the description will appear in the document
19337 \begin_layout Itemize
19343 only the description appears in the printed version
19346 \begin_layout Subsection
19347 Using the LinuxDoc Sgml scripts
19348 \begin_inset Note Note
19351 \begin_layout Standard
19352 This section is completely outdated.
19360 \begin_layout Standard
19361 \begin_inset LatexCommand \label{sec:sgmloperate}
19365 You can use LinuxDoc as a text class without any additional scripts or programs,
19366 but there is not much point in doing this.
19367 All you will get is a document that looks like a
19369 Linux Documentation Project Howto
19375 To do the document translation you need to get and install the
19377 sgml-tools-1.0.x.tar.gz
19380 \begin_inset Formula $x\geq3$
19385 the SGML-Tools WWW Page
19390 \begin_layout LyX-Code
19393 \begin_inset LatexCommand \url{http://pobox.com/~cg/sgmltools}
19402 \begin_layout Standard
19403 Alternatively, you can go to the
19411 \begin_layout Standard
19412 Note that, at the time of this writing (01/1998), version 1.0.3 of sgml-tools
19413 has not yet been made available at
19425 \begin_layout LyX-Code
19428 \begin_inset LatexCommand \url{ftp://sunsite.unc.edu/pub/Linux/utils/text/sgml-tools-1.0.x.tar.gz}
19435 \begin_layout Standard
19442 sgml-tools-1.0.x.tar.gz
19444 contains everything that you need to write SGML documents and convert them
19445 to groff, LaTeX, HTML, GNU info, LyX, and RTF\SpecialChar \@.
19449 \begin_layout Standard
19450 This package was renamed from
19452 linuxdoc-sgml-1.5.tar.gz
19457 \begin_layout Standard
19458 Follow the instructions in that package on how to install it and how to
19460 All this has to be done outside of LyX, before you can use the
19465 ile\SpecialChar \menuseparator
19470 xport\SpecialChar \menuseparator
19477 \begin_layout Subsection
19478 Troubleshooting LinuxDoc
19481 \begin_layout Standard
19482 When you print or preview a LinuxDoc document some checking is done of the
19483 tags before LaTeX is run.
19484 Some errors are trapped here, especially those concerning the structure
19486 LyX may produce an error message, but not leave an error box in the document
19488 You may have to look at the files directly to discover what is wrong.
19489 Most problems seem to come from the use of options that are not fully available
19493 \begin_layout Section
19497 \begin_layout Standard
19503 \begin_layout Subsection
19507 \begin_layout Standard
19515 menu, you'll find a
19524 This feature requires you to have the
19528 program installed, and is grayed out if you don't have it.
19529 You can get it from your nearest CTAN mirror, or over the Web from
19530 \begin_inset LatexCommand \url{http://www.ifi.uio.no/~jensthi/chktex/}
19537 \begin_layout Standard
19542 package is a program that was written by
19547 in frustration because some constructs in LaTeX are sometimes non-intuitive,
19548 and easy to forget.
19549 The program runs over your LaTeX file and checks the integrity of the file,
19550 and flags some common errors.
19551 In other technical words, it is
19558 \begin_layout Standard
19559 Well, what is a syntax checker doing in LyX which is supposed to produce
19560 correct LaTeX anyways? The answer is simple: Just as
19564 not only checks the
19568 of C programs, but also does
19572 checks for type-errors,
19576 catches some common
19580 errors, in addition to the syntactical ones.
19585 is capable of detecting several common errors, such as
19588 \begin_layout Itemize
19589 Ellipsis detection:
19591 Use \SpecialChar \ldots{}
19595 \begin_layout Itemize
19596 No space in front of/after parenthesis:
19601 \begin_layout Itemize
19602 Enforcement of normal space after common abbreviations:
19606 is too wide spacing.
19609 \begin_layout Itemize
19610 Enforcement of end-of-sentence space when the last sentence ends with a
19614 And this is wrong spacing.
19617 \begin_layout Itemize
19618 Space in front of labels and similar commands:
19620 The label should stick right
19621 up to the text to avoid falling to a wrong page.
19623 \begin_inset LatexCommand \label{sec:chktex}
19631 \begin_layout Standard
19632 This footnote is in danger of falling off to a wrong page
19637 The label is separated too much.
19640 \begin_layout Itemize
19641 Space in front of references, instead of hard spaces:
19643 In you are in bad luck,
19644 the text will break right between the referenced text and reference number,
19647 \begin_inset LatexCommand \ref{sec:chktex}
19654 \begin_layout Itemize
19656 \begin_inset Quotes eld
19660 \begin_inset Quotes erd
19664 \begin_inset Formula $\times$
19669 2x2 looks cheap compared to
19670 \begin_inset Formula $2\times2$
19676 \begin_layout Standard
19677 and more \SpecialChar \ldots{}
19678 It is an invaluable tool when you are
19679 \begin_inset Quotes eld
19683 \begin_inset Quotes erd
19686 your document before printing, and you should run it right after the obligatory
19687 spelling check, and before you go fine tuning the typesetting.
19690 \begin_layout Subsection
19694 \begin_layout Standard
19695 If you have the program installed, usage is as simple as choosing
19700 ools\SpecialChar \menuseparator
19709 This will make LyX generate a LaTeX file of your document, start
19713 to check it, and then make LyX insert
19714 \begin_inset Quotes eld
19718 \begin_inset Quotes erd
19721 with the warnings from
19725 , if there were any.
19726 The warnings will be placed close to the point of the mistake, and you
19727 can quickly find them by using the
19732 avigate\SpecialChar \menuseparator
19739 menu item, or the shortcut key
19748 Open the error boxes by clicking on them with the mouse, or use the shortcut
19757 bindings, or the corresponding
19766 Read the warning and correct the mistake, if it is a mistake.
19767 If you have trouble understanding what the warning is about, you can safely
19769 Remember that there is a hidden layer between the document on screen and
19770 the technical details in invoking
19774 , and this gap can make some warnings seem arcane or just right down plain
19778 \begin_layout Standard
19779 This document is an excellent testing bed for the feature, and it should
19780 provide quite a few warnings for you to fiddle with.
19781 Since computers are only so smart, expect most of the warnings to be false
19785 \begin_layout Subsection
19786 How to fine tune it
19789 \begin_layout Standard
19790 Sometimes, you'll find that
19794 makes more noise than suits your mood.
19795 Then you can choose not to use it, wait until your mood changes, or try
19800 to get better along with you.
19801 Another choice in the most desperate situations is to use
19806 iew\SpecialChar \menuseparator
19816 , which will get rid of all warnings instantly.
19819 \begin_layout Standard
19828 very configurable and extensible, you shouldn't expect to solve all problems
19834 Since LyX has to generate a somewhat special LaTeX file to be able to match
19835 the line numbers from the
19843 \begin_layout Standard
19844 You can inspect the specific output from
19850 Edit\SpecialChar \menuseparator
19864 to the internal document structure, some of the warnings will not seen
19865 to appear correctly.
19866 There are two things you can do about this:
19869 \begin_layout Itemize
19874 invocation command line in
19890 installation configuration file (usually with the file
19892 /usr/local/share/chktexrc
19895 See below to learn what warnings can be enabled and disabled on the command
19900 \begin_layout Itemize
19901 Export your document as a raw LaTeX file using
19906 ile\SpecialChar \menuseparator
19911 xport\SpecialChar \menuseparator
19923 Invoked in this way, it can be a hassle to find the corresponding place
19924 in the document inside LyX, but with a little patience, you should be able
19928 \begin_layout Standard
19929 Here follows the warning messages that can be enabled and disabled in
19938 to disable a warning, and
19942 to enable a warning.
19943 The emphasized entries are disabled by default, because the default is
19946 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
19951 \begin_layout Standard
19952 Notice that you should only use the options that enable and disable warnings,
19953 because LyX relies on some of the other command line parameters to be set
19954 in a specific way to have a chance to communicate with
19961 \begin_layout Enumerate
19965 Command terminated with space.
19968 \begin_layout Enumerate
19971 Non-breaking space (
19972 \begin_inset Quotes eld
19980 \begin_inset Quotes erd
19983 ) should have been used.
19986 \begin_layout Enumerate
19990 You should enclose the previous parenthesis with
19991 \begin_inset Quotes eld
19999 \begin_inset Quotes erd
20005 \begin_layout Enumerate
20008 Italic correction (
20009 \begin_inset Quotes eld
20019 \begin_inset Quotes erd
20022 ) found in non-italic buffer.
20025 \begin_layout Enumerate
20028 Italic correction (
20029 \begin_inset Quotes eld
20039 \begin_inset Quotes erd
20042 ) found more than once.
20045 \begin_layout Enumerate
20049 No italic correction (
20050 \begin_inset Quotes eld
20060 \begin_inset Quotes erd
20066 \begin_layout Enumerate
20070 \begin_inset Quotes eld
20078 \begin_inset Quotes erd
20082 \begin_inset Quotes eld
20090 \begin_inset Quotes erd
20096 \begin_layout Enumerate
20099 Wrong length of dash may have been used.
20102 \begin_layout Enumerate
20106 \begin_inset Quotes eld
20114 \begin_inset Quotes erd
20118 \begin_inset Quotes eld
20126 \begin_inset Quotes erd
20132 \begin_layout Enumerate
20136 \begin_inset Quotes eld
20144 \begin_inset Quotes erd
20150 \begin_layout Enumerate
20154 \begin_inset Quotes eld
20162 \begin_inset Quotes erd
20165 to achieve an ellipsis.
20168 \begin_layout Enumerate
20171 Inter-word spacing (
20172 \begin_inset Quotes eld
20182 \begin_inset Quotes eld
20185 ) should perhaps be used.
20188 \begin_layout Enumerate
20191 Inter-sentence spacing (
20192 \begin_inset Quotes eld
20202 \begin_inset Quotes erd
20205 ) should perhaps be used.
20208 \begin_layout Enumerate
20211 Could not find argument for command.
20214 \begin_layout Enumerate
20218 \begin_inset Quotes eld
20226 \begin_inset Quotes erd
20232 \begin_layout Enumerate
20235 Math mode still on at end of LaTeX file.
20238 \begin_layout Enumerate
20242 \begin_inset Quotes eld
20250 \begin_inset Quotes erd
20253 doesn't match the number of
20254 \begin_inset Quotes eld
20262 \begin_inset Quotes erd
20268 \begin_layout Enumerate
20271 You should use either
20274 \begin_inset Quotes eld
20282 \begin_inset Quotes erd
20287 as an alternative to
20288 \begin_inset Quotes eld
20296 \begin_inset Quotes erd
20302 \begin_layout Enumerate
20309 " (ASCII 39) instead of "
20316 \begin_layout Enumerate
20319 User-specified pattern found.
20322 \begin_layout Enumerate
20325 This command might not be intended.
20328 \begin_layout Enumerate
20335 \begin_layout Enumerate
20353 \begin_layout Enumerate
20356 Delete this space to maintain correct page references.
20359 \begin_layout Enumerate
20363 You might wish to put this between a pair of
20364 \begin_inset Quotes eld
20372 \begin_inset Quotes erd
20378 \begin_layout Enumerate
20381 You ought to remove spaces in front of punctuation.
20384 \begin_layout Enumerate
20387 Could not execute LaTeX command.
20390 \begin_layout Enumerate
20399 in front of small punctuation.
20402 \begin_layout Enumerate
20410 may look prettier here.
20413 \begin_layout Enumerate
20417 Multiple spaces detected in output.
20420 \begin_layout Enumerate
20423 This text may be ignored.
20426 \begin_layout Enumerate
20432 \begin_inset Quotes eld
20437 to begin quotation, not
20444 \begin_layout Enumerate
20451 to end quotation, not
20454 \begin_inset Quotes eld
20462 \begin_layout Enumerate
20468 \begin_layout Enumerate
20471 You should perhaps use
20472 \begin_inset Quotes eld
20480 \begin_inset Quotes erd
20486 \begin_layout Enumerate
20489 You should put a space in front of/after parenthesis.
20492 \begin_layout Enumerate
20495 You should avoid spaces in front of/after parenthesis.
20498 \begin_layout Enumerate
20502 You should not use punctuation in front of/after quotes.
20505 \begin_layout Enumerate
20508 Double space found.
20511 \begin_layout Enumerate
20514 You should put punctuation outside inner/inside display math mode.
20517 \begin_layout Enumerate
20520 You ought to not use primitive TeX in LaTeX code.
20523 \begin_layout Enumerate
20526 You should remove spaces in front of
20527 \begin_inset Quotes eld
20535 \begin_inset Quotes erd
20541 \begin_layout Enumerate
20544 \begin_inset Quotes eld
20552 \begin_inset Quotes erd
20555 is normally not followed by
20556 \begin_inset Quotes eld
20564 \begin_inset Quotes erd
20570 \begin_layout Standard
20571 In later versions of LyX, we hope to provide a more complete interface to
20572 this tool (and it's smaller cousin
20576 ) to exploit the full power of it.
20577 But it's not exactly useless as it is now: go try it on one of your existing
20578 documents of a certain length and be surprised.
20581 \begin_layout Section
20582 Version Control in LyX
20585 \begin_layout Standard
20588 Lars Gullik Bjønnes
20591 \begin_layout Subsection
20595 \begin_layout Standard
20596 A friend of mine wanted to try LyX for a group project.
20597 When he didn't find support for version control or file locking, he dropped
20599 This angered me a bit, so I thought that I should at least make support
20600 for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
20601 This has now been done.
20602 LyX now supports some of the most basic RCS commands.
20603 If you need to something a bit more sophisticated you will have to do that
20604 manually in an xterm.
20607 \begin_layout Standard
20608 Before you begin to use the version control features in LyX, you should
20610 \begin_inset Quotes eld
20614 \begin_inset Quotes erd
20617 (a man file, read it with
20622 This file describes all the basic features of RCS.
20623 You should especially notice the comment about a RCS directory, and the
20624 notion of a master RCS file (the file ending in
20631 \begin_layout Standard
20632 The implementation in LyX assumes a recent version of the GNU RCS package---no
20633 guarantees are made for older versions.
20636 \begin_layout Subsection
20637 RCS commands in LyX
20640 \begin_layout Standard
20641 The following sections describe the RCS commands supported by LyX.
20642 You can find them in the
20647 ile\SpecialChar \menuseparator
20652 ersion\InsetSpace ~
20658 \begin_layout Subsubsection
20664 \begin_layout Standard
20665 If your document is not under revision control, this is the only item shown
20667 And if it is under revision control, the
20674 item is grayed out.
20678 \begin_layout Standard
20679 This command registers your document with RCS\SpecialChar \@.
20680 You are asked interactively
20681 to supply an initial description of the document.
20682 The document is now set in Read-Only mode and you have to
20689 , before making any changes to it.
20690 A document under revision control has a
20691 \begin_inset Quotes eld
20694 [RCS:<version> <locker>]
20695 \begin_inset Quotes erd
20698 item tagged to the filename in the minibuffer.
20701 \begin_layout Standard
20702 RCS command that is run:
20704 ci -q -u -i -t-"<initial description>" <file-name>
20707 \begin_layout Standard
20712 to understand the switches.
20716 \begin_layout Subsubsection
20722 \begin_layout Standard
20723 When you are finished editing a file, you check in your changes.
20724 When you do this, you are asked for a description of the changes.
20725 This is stored in the history log.
20726 The version number is bumped, your changes are applied to the master RCS
20727 file, the document is unlocked and set to Read-Only mode.
20731 \begin_layout Standard
20734 ci -q -u -m"<description>" <file-name>
20737 \begin_layout Subsubsection
20743 \begin_layout Standard
20744 By doing this you lock the document so that only you can edit it.
20745 This will also make the document Read-Write only for you.
20746 You will usually continue editing for a while and when you are finished
20747 you check in your changes.
20748 The status line is changed to reflect that you have locked the file.
20752 \begin_layout Standard
20755 co -q -l <file-name>
20758 \begin_layout Subsubsection
20761 Revert To Last Version
20764 \begin_layout Standard
20765 This will discard all changes made to the document since the last check
20767 You get a warning before changes are discarded.
20770 \begin_layout Standard
20773 co -f -u<version> <file-name>
20776 \begin_layout Subsubsection
20782 \begin_layout Standard
20783 This makes as if the last check in never happened.
20784 No changes are made to the document loaded into LyX, but the last version
20785 is removed from the master RCS file.
20789 \begin_layout Standard
20792 rcs -o<version> <file-name>
20795 \begin_layout Subsubsection
20801 \begin_layout Standard
20802 This show the complete history of the RCS document.
20807 is shown in a browser.
20815 \begin_layout Section
20816 Literate Programming
20819 \begin_layout Standard
20824 (kayvan@sylvan.com)
20828 original documentation written by
20830 Edmar Wienskoski Jr.
20833 (edmar-w-jr@technologist.com)
20836 \begin_layout Subsection
20840 \begin_layout Standard
20841 The main purpose of this documentation is to show you how to use LyX for
20842 literate programming.
20843 Where it is assumed that you are familiar with this programming technique,
20845 \begin_inset Quotes eld
20849 \begin_inset Quotes erd
20853 \begin_inset Quotes eld
20857 \begin_inset Quotes erd
20861 If that is not the case, please follow the web links provided in the following
20863 There is a lot of good documentation out there covering old development
20864 history to the latest tools tips.
20867 \begin_layout Standard
20868 It is also assumed that you are familiar with LyX itself to a point that
20869 you are comfortable changing your LyX preferences, and X resources file.
20870 If that is not the case please refer to other LyX documentation to cover
20871 your specific needs.
20874 \begin_layout Subsection
20875 Literate Programming
20878 \begin_layout Standard
20879 From the Literate Programming FAQ:
20882 \begin_layout Quotation
20883 Literate programming is the combination of documentation and source together
20884 in a fashion suited for reading by human beings.
20885 In fact, literate programs should be enjoyable reading, even inviting!
20886 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
20887 and documentation in a single file.
20888 Literate programming tools then parse the file to produce either readable
20889 documentation or compilable source.
20890 The WEB style of literate programming was created by D.E.
20891 Knuth during the development of his TeX typesetting software.
20895 \begin_layout Standard
20896 Another excerpt says:
20899 \begin_layout Quotation
20902 How is literate programming different from verbose commenting?
20905 \begin_layout Quotation
20906 There are three distinguishing characteristics.
20907 In order of importance, they are:
20911 \begin_layout Itemize
20912 flexible order of elaboration
20915 \begin_layout Itemize
20916 automatic support for browsing
20919 \begin_layout Itemize
20920 typeset documentation, especially diagrams and mathematics
20924 \begin_layout Standard
20925 Now that I sparked your curiosity, take a look in the references.
20928 \begin_layout Subsubsection
20932 \begin_layout Standard
20933 The complete Literate Programming FAQ can be found at:
20936 \begin_layout Quote
20937 \begin_inset LatexCommand \url[Literate Programming FAQ]{http://shelob.ce.ttu.edu/daves/lpfaq/faq.html}
20944 \begin_layout Standard
20945 The FAQ lists 23 (twenty three!) different literate programming tools.
20946 Where some are specialized or
20947 \begin_inset Quotes eld
20951 \begin_inset Quotes erd
20954 for particular programming languages, while other have general scope.
20959 for my own use for several reasons:
20962 \begin_layout Itemize
20963 It can generate the documentation either in latex or html.
20966 \begin_layout Itemize
20967 It has a open architecture, i.e., it is easy to plug in new filters and to
20968 perform special processing that you may need.
20972 \begin_layout Itemize
20973 There is a good selection of filters available already (the html is one
20977 \begin_layout Itemize
20981 \begin_layout Standard
20982 The Noweb web page can be found at:
20985 \begin_layout Quote
20986 \begin_inset LatexCommand \url[Noweb home page]{http://www.cs.virginia.edu/~nr/noweb/}
20993 \begin_layout Standard
20994 Starting from there you can reach many other interesting links and even
20995 some literate program examples.
20998 \begin_layout Subsection
20999 LyX and Literate Programming
21002 \begin_layout Standard
21003 The LyX support for Literate Programming is provided by using the generic
21004 LyX convertors mechanism.
21005 This support is provided in a
21006 \begin_inset Quotes eld
21010 \begin_inset Quotes erd
21013 way, i.e., you will be able to use this new LyX feature with some other literate
21014 programming tool of your choice by just changing your LyX preferences.
21017 \begin_layout Subsubsection
21018 Generating documents and code (weaving and tangling)
21021 \begin_layout Paragraph
21022 Selecting the document class
21025 \begin_layout Standard
21026 If you have installed Noweb and LyX successfully, whenever you open a new
21027 document or try to change the document class of an existing one, you will
21028 find that there are three new document classes available:
21031 \begin_layout Itemize
21035 \begin_layout Itemize
21039 \begin_layout Itemize
21043 \begin_layout Standard
21044 You must select one of them to create your literate documents from.
21048 \begin_layout Standard
21049 Note that literate documents are not limited to these three classes.
21050 New classes can be generated from other styles like letter or in combination
21051 with other class variations like Article (AMS).
21052 If you have special needs that cannot be covered by one of the existing
21053 classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21054 will arrange to insert a new entry, or teach you how to do it.
21058 \begin_layout Standard
21059 It is very simple, it involves the creation of a file with four lines, and
21060 re-running of the auto configuration.
21065 Moreover, if you use a literate tool other than Noweb you may need to create
21066 a new set of document classes for it.
21069 \begin_layout Paragraph
21073 \begin_layout Standard
21074 LyX enables you to write code with a layout named
21082 \begin_layout Standard
21083 The equivalent Noweb term is
21084 \begin_inset Quotes eld
21088 \begin_inset Quotes erd
21092 For historical reasons, I got used to the term
21093 \begin_inset Quotes eld
21097 \begin_inset Quotes erd
21100 introduced by other literate tool named Nuweb, which I used for many years
21101 before rendering myself to Noweb.
21106 Noweb delimits scraps like this:
21109 \begin_layout LyX-Code
21113 \begin_layout LyX-Code
21117 \begin_layout LyX-Code
21121 \begin_layout LyX-Code
21125 \begin_layout LyX-Code
21129 \begin_layout Standard
21130 The problem is that whatever is written in between the << and the
21134 must be taken literally, i.e., LyX should be prevented from making any special
21135 interpretation of what has been written.
21136 This is handled by a special layout named Scrap, that works like a normal
21137 paragraph but has a free spacing capability.
21140 \begin_layout Standard
21141 The down side of the Scrap paragraph layout is that consecutive paragraphs
21142 of code will be spaced with one empty line in the source code and also
21143 in the printed documentation.
21144 The work around is to enter each line of code within a single Scrap, with
21145 a newline (ctrl-return).
21146 The example above will look like this:
21150 \begin_layout Standard
21151 If you have a printed version of this document you will not see any difference
21152 between the previous example and this one.
21160 \begin_layout LyX-Code
21172 \begin_layout Standard
21173 This layout works fine.
21174 The only real inconvenience is that you have to type ctrl-return instead
21179 \begin_layout Standard
21180 It is in my list of
21181 \begin_inset Quotes eld
21185 \begin_inset Quotes erd
21196 \begin_layout Standard
21197 As a special note, you can also use the
21198 \begin_inset Quotes eld
21202 \begin_inset Quotes erd
21205 construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21209 \begin_layout LyX-Code
21212 def some_function(args):
21214 "This is the doc string for this
21217 print "My args: ", args
21220 \begin_layout LyX-Code
21221 @ %def some_function
21224 \begin_layout Standard
21225 For an example of this usage and the resulting cross-reference output, look
21226 at the Literate python program in
21228 LIBDIR/examples/listerrors.lyx
21230 which should make this all clear.
21233 \begin_layout Paragraph
21234 Generating the documentation
21237 \begin_layout Standard
21238 At this point you already have a new document file with a proper document
21239 class, and with some code and text on it.
21240 How do I print it? The answer is simple, you select
21245 iew\SpecialChar \menuseparator
21253 Just like you would do for a plain document.
21254 No special procedure is required.
21257 \begin_layout Standard
21258 To help orientate you, I will now explain what happens inside LyX:
21261 \begin_layout Enumerate
21267 pdate\SpecialChar \menuseparator
21274 menu option is chosen, a latex file is generated.
21279 \begin_layout Standard
21280 If the document is of any literate class the generated file will be named
21281 with an extension name defined by the
21282 \begin_inset Quotes eld
21286 \begin_inset Quotes erd
21289 format (defined in the Preferences panel), otherwise the file will have
21298 \begin_layout Enumerate
21299 Note that the only difference so far is in the name of the file, no special
21300 processing is required by LyX.
21301 Given that you formatted the code using the Scrap layout that, by itself,
21302 takes care of the business.
21305 \begin_layout Enumerate
21306 If the document is of any literate class LyX will then use the internal
21307 LyX to Noweb converter, followed by the Noweb to LaTeX converter
21311 \begin_layout Standard
21312 The converters are defined in the
21317 ools\SpecialChar \menuseparator
21325 \begin_inset Quotes eld
21329 \begin_inset Quotes erd
21337 to generate the LaTeX file.
21341 \begin_layout Standard
21342 Otherwise it will just skip this step.
21346 \begin_layout Enumerate
21347 Finally, LaTeX is invoked and the regular post processing continues as in
21351 \begin_layout Standard
21352 Independence from a particular
21353 \begin_inset Quotes eld
21357 \begin_inset Quotes erd
21360 is easily achieved by changing the commands that are run by the various
21364 \begin_layout Paragraph
21365 Generating the code
21368 \begin_layout Standard
21369 When the build menu option is chosen or the corresponding button in the
21370 toolbar is pressed, a latex file is generated just like step 1 above.
21371 Next, LyX invokes the
21376 Typically, this converter (like any other converter), has two parts:
21379 \begin_layout Enumerate
21380 The converter program itself.
21381 This program performs the conversion from the one format to the other (in
21382 this case, from the Noweb format to the Program pseudo-format).
21385 \begin_layout Enumerate
21386 The error log parser.
21387 This is a program whose sole purpose is to rewrite error messages in a
21388 format that LyX understands.
21389 This makes it possible for LyX to place error boxes in the right places
21390 in the file buffer.
21393 \begin_layout Standard
21394 The first part, the
21395 \begin_inset Quotes eld
21399 \begin_inset Quotes erd
21402 setting, should be set to
21403 \begin_inset Quotes eld
21411 \begin_inset Quotes erd
21415 This basically means that LyX will call
21416 \begin_inset Quotes eld
21420 \begin_inset Quotes erd
21423 (a program or script) with the name of the Noweb file (generally a file
21424 in the LyX temp directory).
21428 \begin_layout Standard
21429 This is an implementation of
21430 \begin_inset Quotes eld
21434 \begin_inset Quotes erd
21437 that you can place in a directory on your path:
21440 \begin_layout LyX-Code
21444 \begin_layout LyX-Code
21448 \begin_layout LyX-Code
21449 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
21452 \begin_layout Standard
21453 The next part of the converter setting is the
21454 \begin_inset Quotes eld
21458 \begin_inset Quotes erd
21461 which is to be set to
21462 \begin_inset Quotes eld
21467 originaldir,parselog=listerrors
21470 \begin_inset Quotes erd
21474 This will run any errors that are generated by the
21475 \begin_inset Quotes eld
21479 \begin_inset Quotes erd
21482 process through the
21483 \begin_inset Quotes eld
21487 \begin_inset Quotes erd
21493 \begin_layout Standard
21494 The converter code looks in
21502 then on the path for the
21503 \begin_inset Quotes eld
21507 \begin_inset Quotes erd
21513 \begin_layout Paragraph
21514 Build instructions in the document
21517 \begin_layout Standard
21518 The last piece of the integration between LyX and noweb is the
21519 \begin_inset Quotes eld
21523 \begin_inset Quotes erd
21527 Generally, the instructions for building your program should be embedded
21528 in a scrap of its own.
21530 \begin_inset Quotes eld
21534 \begin_inset Quotes erd
21537 above uses the notangle command to look for this scrap (called
21538 \begin_inset Quotes eld
21542 \begin_inset Quotes erd
21545 ) and runs its contents through
21546 \begin_inset Quotes eld
21550 \begin_inset Quotes erd
21556 \begin_layout Standard
21557 Typically, such a scrap would look something like this:
21560 \begin_layout LyX-Code
21567 if [ -z "${NOWEB_SOURCE}" ]
21571 NOWEB_SOURCE=myfile.nw
21577 code to extract files ...]
21580 code to compile files ...]
21585 \begin_layout Standard
21588 LIBDIR/examples/listerrors.lyx
21592 LIBDIR/examples/Literate.lyx
21594 which implement two versions of the
21595 \begin_inset Quotes eld
21599 \begin_inset Quotes erd
21602 program for some illustrations of how all of these pieces go together or
21605 LIBDIR/examples/noweb2lyx.lyx.
21608 Interestingly, these three files show off the language-indepence of the
21609 LyX literate programming support since they are written in Python, C and
21613 \begin_layout Subsubsection
21617 \begin_layout Standard
21618 All the Literate Programming support is configured by the
21623 ools\SpecialChar \menuseparator
21631 \begin_inset Quotes eld
21635 \begin_inset Quotes erd
21639 The important parts are:
21642 \begin_layout Description
21645 \begin_inset Quotes eld
21649 \begin_inset Quotes erd
21653 format Set up via the Formats tab, this is where the Noweb-specific pieces
21663 , the file extension is set to
21668 This tells LyX to create a file with a
21672 extension in the first step of the conversion process.
21675 \begin_layout Description
21682 format This is an empty format whose sole purpose is to be the endpoint
21683 of a conversion (which then allows us to set up a converter for it).
21686 \begin_layout Description
21695 This converter performs the
21696 \begin_inset Quotes eld
21700 \begin_inset Quotes erd
21703 of the literate document.
21704 For Noweb, it is set to
21705 \begin_inset Quotes eld
21710 noweave -delay -index $$i > $$o
21713 \begin_inset Quotes erd
21719 \begin_layout Description
21729 \begin_inset Quotes eld
21733 \begin_inset Quotes erd
21737 As stated above, the Converter is set to
21738 \begin_inset Quotes eld
21746 \begin_inset Quotes erd
21749 , with Flags set to
21750 \begin_inset Quotes eld
21755 originaldir,parselog=listerrors
21758 \begin_inset Quotes erd
21764 \begin_layout Subsubsection
21768 \begin_layout Standard
21769 There is also a new function implemented in the LyX server, the
21770 \begin_inset Quotes eld
21773 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
21777 \begin_layout Standard
21778 When debugging code with ddd/gdb, it is possible to invoke a text editor
21779 at the current execution position with a single key stroke.
21780 The default ddd configuration for that is shift-ctrl-V.
21781 It happens that you can define the editor command line invocation in ddd
21788 dit\SpecialChar \menuseparator
21793 references\SpecialChar \menuseparator
21800 dialog and changing the "Edit Sources" entry.
21803 \begin_layout Standard
21804 I take advantage of the new created LyX server function and this ddd feature,
21806 \begin_inset Quotes eld
21810 \begin_inset Quotes erd
21816 \begin_layout LyX-Code
21817 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
21820 \begin_layout Standard
21821 With this, whenever you are using ddd and find a point in the program that
21822 you want to edit, you just press shift-ctrl-V (in the ddd window), and
21823 ddd you forward this information to LyX through the LyX server and then
21824 the LyX window will show the same file with the cursor at the same position
21825 ddd was pointing to.
21826 No more guessing or long scrolling to locate a point in the program back
21830 \begin_layout Standard
21831 Note however that you must enable the LyX server to get this feature working
21832 (it is disabled by default).
21833 You can enable it in
21845 ) by entering in the
21850 \begin_inset Quotes eld
21855 /home/<your-home-directory>/.lyx/lyxpipe
21858 \begin_inset Quotes erd
21864 \begin_layout Standard
21865 Read the LyX server documentation in the
21867 Customization Manual
21869 for further information.
21872 \begin_layout Subsubsection
21876 \begin_layout Standard
21877 There are six new buttons that can be added to your LyX toolbar.
21878 Five of these buttons are short cuts to layout styles:
21899 The last one is a short cut to the
21900 \begin_inset Quotes eld
21904 \begin_inset Quotes erd
21911 \begin_layout Standard
21912 LyX has a range of buttons that are available for tool bar customization.
21913 In my toolbar I like to combine the six short cuts above with two more:
21921 \SpecialChar \menuseparator
21929 \SpecialChar \menuseparator
21942 iew\SpecialChar \menuseparator
21950 Here is how it looks like:
21953 \begin_layout LyX-Code
21957 \begin_layout LyX-Code
21961 \begin_layout LyX-Code
21962 Icon "layout Standard"
21965 \begin_layout LyX-Code
21966 Icon "layout Section"
21969 \begin_layout LyX-Code
21970 Icon "layout LaTeX"
21973 \begin_layout LyX-Code
21974 Icon "layout LyX-Code"
21977 \begin_layout LyX-Code
21978 Icon "layout Scrap"
21981 \begin_layout LyX-Code
21985 \begin_layout LyX-Code
21989 \begin_layout LyX-Code
21990 Icon "buffer-typeset"
21993 \begin_layout LyX-Code
21994 Icon "build-program"
21997 \begin_layout LyX-Code
22001 \begin_layout LyX-Code
22005 \begin_layout LyX-Code
22009 \begin_layout LyX-Code
22013 \begin_layout LyX-Code
22017 \begin_layout Subsubsection
22018 Colors customization
22021 \begin_layout Standard
22022 There are a number of colors in LyX that can be customized in
22027 One of the things that bothers people is the LaTeX font color.
22028 The default color is red, since the scraps uses LaTeX font, and there is
22029 a lot of scraps in literate documents, you may get tired of seeing everything
22031 You can change it by going to the tabs
22040 \begin_layout Standard
22041 The next thing is the visible presence of the newline character in the screen.
22042 You can choose the color of this particular character and make it blend
22044 I recommend you choosing a color that is close to the background but not
22045 equal, that way you still can see it is there, but it is not bothering
22050 \begin_layout Chapter
22051 Secrets of the LaTeX Masters
22052 \begin_inset LatexCommand \label{cha:secrets}
22059 \begin_layout Standard
22060 Though LyX is a powerful tool, it cannot hope to support everything that
22061 can be done with pure TeX/LaTeX.
22062 However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
22063 as long as you are not afraid to use that
22064 \begin_inset Quotes eld
22068 \begin_inset Quotes erd
22071 button on the toolbar or add things to the LaTeX preamble.
22072 This section lists some tips, tricks, and otherwise cool ideas to give
22073 your document that extra little flair.
22076 Do try this at home
22078 , just start with something a little smaller and less important than your
22082 \begin_layout Standard
22083 Most ideas in this section require less common files in your LaTeX installation.
22084 If you have a system like teTeX, most will already be available.
22085 A few, however, will need to be downloaded from one of the CTAN archives.
22086 Often, there are several ways to do something, or several LaTeX style files
22087 which do the same thing.
22088 We do not endorse one choice over another, we simply claim that we have
22089 done a particular task with a particular file.
22090 Put on your wizard hat, keep an eye out for dragons, and let us begin.
22093 \begin_layout Section
22094 Tricks for Footnotes and Margin Notes
22097 \begin_layout Standard
22103 \begin_layout Subsection
22107 \begin_layout Standard
22108 LyX cannot yet take care of setting the footnote numbering back to 1 after
22109 each section in the
22110 \begin_inset Quotes eld
22118 \begin_inset Quotes erd
22123 document class or changing the counter style.
22124 You'll need to insert LaTeX commands like the following to achieve that:
22127 \begin_layout Standard
22131 \begin_layout Standard
22135 setcounter{footnote}{0}
22144 setcounter{footnote}{0}
22146 will set the counter back to 1
22150 \begin_layout Standard
22151 The counter has been set back to 1.
22159 \begin_layout Standard
22160 The following command will change the numbering to small letters.
22161 Take a look at the next footnote in your xdvi or ghostview
22165 \begin_layout Standard
22182 \begin_layout Standard
22183 This is an example for a footnote with alphabetic numbering.
22203 \begin_layout Standard
22204 The next command sets the counter style back to default, i.e.
22215 \begin_layout Standard
22226 to set the counter--style back to LyX's default, i.e.
22235 \begin_layout Standard
22256 \begin_layout Standard
22287 and others as counter styles.
22288 Just replace the LaTeX command in the above example and rerun TeX to see
22289 what those styles can do.
22293 \begin_layout Subsection
22297 \begin_layout Standard
22298 Here are two examples of neat things you can do to margin notes using LaTeX
22302 \begin_layout Standard
22303 The following command will make a vertical line appear alongside your text---gre
22305 \begin_inset Quotes eld
22309 \begin_inset Quotes erd
22318 rule[-10mm]{30mm}{5mm}}
22326 \begin_layout Standard
22332 rule[-10mm]{30mm}{5mm}}
22340 \begin_layout Standard
22341 Check your dvi- or ghostview-output to see what the
22347 command does to the following margin note.
22350 \begin_layout Standard
22354 \begin_layout Standard
22364 \begin_inset Marginal
22367 \begin_layout Standard
22378 \begin_layout Section
22382 \begin_layout Standard
22385 Lars Gullik Bjønnes
22388 \begin_layout Subsection
22392 \begin_layout Standard
22393 The aim for this chapter
22397 \begin_layout Standard
22398 Editor's note: Lars' original chapter was a masterful description of how
22404 However, it was too long to flow smoothly in this document.
22405 I have therefore chosen to excerpt the most important sections here (sorry,
22406 Lars); you can read the original chapter (and more of the story!) in the
22409 examples/multicol.lyx
22417 is to show how the LaTeX package
22421 can be used in a LyX document.
22422 As LyX doesn't support the
22426 package natively yet, we have to use some small hacks.
22427 By reading this section it should be obvious how to do this.
22430 \begin_layout Subsection
22434 \begin_layout Standard
22439 package allows switching between one and multicolumn format on the same
22441 Footnotes are handled correctly (for the most part), but will be placed
22442 at the bottom of the page and not under each column.
22443 LaTeX's float mechanism, however, is partly disabled in the current implementat
22445 At the moment only page-wide floats can be used within the scope of the
22449 \begin_layout Subsection
22453 \begin_layout Subsubsection
22457 \begin_layout Standard
22458 If you want to have two columns in your text, you have use LaTeX mode to
22463 begin{multicols}{2}
22465 at the point where you want the two column layout to start, and then
22471 where you want it to end.
22475 \begin_layout Standard
22479 \begin_layout Standard
22483 begin{multicols}{2}
22491 \begin_layout Standard
22496 The Adventure of the Empty House
22502 Sir Arthur Conan Doyle
22505 \begin_layout Standard
22508 It was in the spring of the year 1894 that all London was interested, and
22509 the fashionable world dismayed, by the murder of the Honourable Ronald
22510 Adair under most unusual and inexplicable circumstances.
22511 The public has already learned those particulars of the crime which came
22512 out in the police investigation, but a good deal was suppressed upon that
22513 occasion, since the case for the prosecution was so overwhelmingly strong
22514 that it was not necessary to bring forward all the facts.
22515 Only now, at the end of nearly ten years, am I allowed to supply those
22516 missing links which make up the whole of that remarkable chain.
22517 The crime was of interest in itself, but that interest was as nothing to
22518 me compared to the inconceivable sequel, which afforded me the greatest
22519 shock and surprise of any event in my adventurous life.
22520 Even now, after this long interval, I find myself thrilling as I think
22521 of it, and feeling once more that sudden flood of joy, amazement, and increduli
22522 ty which utterly submerged my mind.
22523 Let me say to that public, which has shown some interest in those glimpses
22524 which I have occasionally given them of the thoughts and actions of a very
22525 remarkable man, that they are not to blame me if I have not shared my knowledge
22526 with them, for I should have considered it my first duty to do so, had
22527 I not been barred by a positive prohibition from his own lips, which was
22528 only withdrawn upon the third of last month.
22531 \begin_layout Standard
22535 \begin_layout Standard
22547 \begin_layout Subsubsection
22551 \begin_layout Standard
22552 The same pattern is used when you want more than two columns:
22555 \begin_layout Standard
22559 \begin_layout Standard
22563 begin{multicols}{3}
22571 \begin_layout Standard
22574 It can be imagined that my close intimacy with Sherlock Holmes had interested
22575 me deeply in crime, and that after his disappearance I never failed to
22576 read with care the various problems which came before the public.
22577 And I even attempted, more than once, for my own private satisfaction,
22578 to employ his methods in their solution, though with indifferent success.
22579 There was none, however, which appealed to me like this tragedy of Ronald
22581 As I read the evidence at the inquest, which led up to a verdict of willful
22582 murder against some person or persons unknown, I realized more clearly
22583 than I had ever done the loss which the community had sustained by the
22584 death of Sherlock Holmes.
22585 There were points about this strange business which would, I was sure,
22586 have specially appealed to him, and the efforts of the police would have
22587 been supplemented, or more probably anticipated, by the trained observation
22588 and the alert mind of the first criminal agent in Europe.
22589 All day, as I drove upon my round, I turned over the case in my mind and
22590 found no explanation which appeared to me to be adequate.
22591 At the risk of telling a twice-told tale, I will recapitulate the facts
22592 as they were known to the public at the conclusion of the inquest.
22595 \begin_layout Standard
22599 \begin_layout Standard
22611 \begin_layout Standard
22612 You can have have more than 3 columns if you want to, but that might not
22613 be very pleasant for the eye.
22616 \begin_layout Subsubsection
22617 Columns inside columns
22620 \begin_layout Standard
22621 You can even have columns inside columns:
22624 \begin_layout Standard
22628 \begin_layout Standard
22632 begin{multicols}{2}
22640 \begin_layout Standard
22643 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22644 at that time governor of one of the Australian colonies.
22645 Adair's mother had returned from Australia to undergo the operation for
22646 cataract, and she, her son Ronald, and her daughter Hilda were living together
22650 \begin_layout Standard
22654 \begin_layout Standard
22658 begin{multicols}{2}
22666 \begin_layout Standard
22669 The youth moved in the best society--had, so far as was known, no enemies
22670 and no particular vices.
22671 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22672 had been broken off by mutual consent some months before, and there was
22673 no sign that it had left any very profound feeling behind it.
22674 For the rest {sic} the man's life moved in a narrow and conventional circle,
22675 for his habits were quiet and his nature unemotional.
22676 Yet it was upon this easy-going young aristocrat that death came, in most
22677 strange and unexpected form, between the hours of ten and eleven-twenty
22678 on the night of March 30, 1894.
22681 \begin_layout Standard
22685 \begin_layout Standard
22697 \begin_layout Standard
22700 Ronald Adair was fond of cards--playing continually, but never for such
22701 stakes as would hurt him.
22702 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22703 It was shown that, after dinner on the day of his death, he had played
22704 a rubber of whist at the latter club.
22705 He had also played there in the afternoon.
22710 The evidence of those who had played with him-- Mr.
22711 Murray, Sir John Hardy, and Colonel Moran--showed that the game was whist,
22712 and that there was a fairly equal fall of the cards.
22713 Adair might have lost five pounds, but not more.
22714 His fortune was a considerable one, and such a loss could not in any way
22716 He had played nearly every day at one club or other, but he was a cautious
22717 player, and usually rose a winner.
22718 It came out in evidence that, in partnership with Colonel Moran, he had
22719 actually won as much as four hundred and twenty pounds in a sitting, some
22720 weeks before, from Godfrey Milner and Lord Balmoral.
22721 So much for his recent history as it came out at the inquest.
22724 \begin_layout Standard
22728 \begin_layout Standard
22740 \begin_layout Standard
22741 Please do read the file
22743 examples/multicol.lyx
22745 for more advanced examples including column and header spacing, vertical
22746 separator lines, and more.
22749 \begin_layout Section
22754 Paragraph Environment
22755 \begin_inset OptArg
22758 \begin_layout Standard
22759 Numbering in Enumerate
22767 \begin_layout Standard
22773 \begin_layout Standard
22774 \begin_inset VSpace bigskip
22780 \begin_layout Standard
22782 The default numbering for the
22786 paragraph environment begins with Arabic numbers and ends with uppercase
22788 Suppose, however, you wanted a different type of numbering scheme.
22789 Here's a quickie example of how to change the numbering scheme:
22792 \begin_layout LyX-Code
22802 \begin_layout LyX-Code
22812 \begin_layout LyX-Code
22822 \begin_layout LyX-Code
22832 \begin_layout Standard
22833 \SpecialChar \ldots{}
22834 which changes the numbering scheme to uppercase Roman numerals, uppercase
22835 letters, Arabic numbers, and lowercase letter.
22838 \begin_layout Standard
22839 Additionally, the previous example also adds a little bit extra to the numbering
22841 For example, the first level label actually looks like:
22842 \begin_inset Quotes eld
22846 \begin_inset Quotes erd
22850 For ease of reading, we'll describe what the numbering schemes look like
22851 using a notation something like this: <
22852 \begin_inset Quotes eld
22856 \begin_inset Quotes erd
22861 \begin_inset Quotes erd
22865 \begin_inset Quotes erd
22870 \begin_inset Quotes erd
22874 \begin_inset Quotes erd
22879 \begin_inset Quotes eld
22883 \begin_inset Quotes erd
22890 \begin_layout Standard
22891 As you can see in the example, there is a label command for each nesting
22898 \SpecialChar \ldots{}
22905 , as well as a counter,
22909 \SpecialChar \ldots{}
22915 There are also five
22916 \begin_inset Quotes eld
22920 \begin_inset Quotes erd
22953 , each of which take one counter as an argument.
22954 You can add characters before or after these, but there's no need to add
22958 \begin_layout Standard
22959 You can get really fancy with these.
22963 \begin_layout LyX-Code
22977 \begin_layout LyX-Code
22989 \begin_layout LyX-Code
22999 \begin_layout LyX-Code
23009 \begin_layout Standard
23010 produces the somewhat out of hand numbering scheme: <
23011 \begin_inset Quotes eld
23015 \begin_inset Quotes erd
23020 \begin_inset Quotes erd
23024 \begin_inset Quotes erd
23029 \begin_inset Quotes erd
23033 \begin_inset Quotes erd
23038 \begin_inset Quotes eld
23042 \begin_inset Quotes erd
23049 \begin_layout Section
23050 Extra Space Between Table Rows
23053 \begin_layout Standard
23059 \begin_layout Standard
23060 \begin_inset VSpace bigskip
23066 \begin_layout Standard
23068 LaTeX allows you to put a bit of extra space between rows in a table by
23069 giving an optional argument to the end-of-row specifier (
23078 LyX has not yet implemented this in a formal way, so here are two dirty
23079 little tricks to do the same job.
23083 \begin_layout Standard
23084 The first is the more formal, but longwinded way to do it.
23085 In the LaTeX preamble, add the following command definition:
23088 \begin_layout Standard
23095 extratablespace}[1]{
23099 This command takes a single argument---the amount of space you would like
23101 Insert the command in the first column of the row
23105 where you would like the space to appear.
23106 Here is an example (I've removed all the borders using
23111 ayout\SpecialChar \menuseparator
23120 \begin_layout Standard
23122 \begin_inset Tabular
23123 <lyxtabular version="3" rows="4" columns="3">
23125 <column alignment="center" valignment="top" width="0pt">
23126 <column alignment="center" valignment="top" width="0pt">
23127 <column alignment="center" valignment="top" width="0pt">
23129 <cell alignment="center" valignment="top" topline="true" usebox="none">
23132 \begin_layout Standard
23147 <cell alignment="center" valignment="top" topline="true" usebox="none">
23150 \begin_layout Standard
23165 <cell alignment="center" valignment="top" topline="true" usebox="none">
23168 \begin_layout Standard
23185 <cell alignment="center" valignment="top" topline="true" usebox="none">
23188 \begin_layout Standard
23194 <cell alignment="center" valignment="top" topline="true" usebox="none">
23197 \begin_layout Standard
23212 <cell alignment="center" valignment="top" topline="true" usebox="none">
23215 \begin_layout Standard
23232 <cell alignment="center" valignment="top" topline="true" usebox="none">
23235 \begin_layout Standard
23248 \begin_layout Standard
23252 extratablespace{2ex}
23262 <cell alignment="center" valignment="top" topline="true" usebox="none">
23265 \begin_layout Standard
23280 <cell alignment="center" valignment="top" topline="true" usebox="none">
23283 \begin_layout Standard
23300 <cell alignment="center" valignment="top" topline="true" usebox="none">
23303 \begin_layout Standard
23309 <cell alignment="center" valignment="top" topline="true" usebox="none">
23312 \begin_layout Standard
23327 <cell alignment="center" valignment="top" topline="true" usebox="none">
23330 \begin_layout Standard
23353 \begin_layout Standard
23354 The second method is faster, but will make typographers and TeXperts all
23355 over the world groan.
23356 Simply put an end of row specifier with optional argument at the same spot.
23357 No fancy definitions are needed as in the above example, but there will
23358 be more space inserted than you specified because you essentially added
23359 a blank row plus the extra space.
23360 If the space added is too much, simply use a negative number, like so:
23363 \begin_layout Standard
23365 \begin_inset Tabular
23366 <lyxtabular version="3" rows="4" columns="3">
23368 <column alignment="center" valignment="top" width="0pt">
23369 <column alignment="center" valignment="top" width="0pt">
23370 <column alignment="center" valignment="top" width="0pt">
23372 <cell alignment="center" valignment="top" topline="true" usebox="none">
23375 \begin_layout Standard
23390 <cell alignment="center" valignment="top" topline="true" usebox="none">
23393 \begin_layout Standard
23408 <cell alignment="center" valignment="top" topline="true" usebox="none">
23411 \begin_layout Standard
23428 <cell alignment="center" valignment="top" topline="true" usebox="none">
23431 \begin_layout Standard
23437 <cell alignment="center" valignment="top" topline="true" usebox="none">
23440 \begin_layout Standard
23455 <cell alignment="center" valignment="top" topline="true" usebox="none">
23458 \begin_layout Standard
23475 <cell alignment="center" valignment="top" topline="true" usebox="none">
23478 \begin_layout Standard
23491 \begin_layout Standard
23507 <cell alignment="center" valignment="top" topline="true" usebox="none">
23510 \begin_layout Standard
23525 <cell alignment="center" valignment="top" topline="true" usebox="none">
23528 \begin_layout Standard
23545 <cell alignment="center" valignment="top" topline="true" usebox="none">
23548 \begin_layout Standard
23554 <cell alignment="center" valignment="top" topline="true" usebox="none">
23557 \begin_layout Standard
23572 <cell alignment="center" valignment="top" topline="true" usebox="none">
23575 \begin_layout Standard
23598 \begin_layout Standard
23599 It's short, sweet, and gets the job done quickly, even if it is really ugly.
23600 You may put away the rotten vegetables now! I promise I won't suggest anything
23604 \begin_layout Section
23608 \begin_layout Standard
23614 \begin_layout Standard
23615 \begin_inset VSpace bigskip
23621 \begin_layout Standard
23626 \begin_layout Standard
23632 tmpfont}{cmr17 scaled 2500}{
23644 \begin_layout Standard
23649 \begin_layout Standard
23660 hose of you who like the style of old books probably also like
23661 \begin_inset Quotes eld
23665 \begin_inset Quotes erd
23668 ---those large capital letters which begin each new chapter or section.
23669 Implementing them with plain LyX/LaTeX is straightforward (assuming you
23670 know some plain TeX!) but does require a lot of work and many iterations,
23671 as you can see by all the ugly TeX-mode stuff at the beginning of this
23675 \begin_layout Standard
23679 \begin_layout Standard
23685 bigdrop{-1em}{3}{ptmri}{T}+
23690 here is a much easier way of doing this, of course.
23699 ) package from CTAN allows a simple way to add such letters to your documents.
23700 Since this package is not a standard part of teTeX, I can't demonstrate
23701 it within this document, but if you copy this paragraph to a new document,
23703 \begin_inset Quotes eld
23713 \begin_inset Quotes erd
23716 and the pluses from the TeX code at the beginning of the paragraph, and
23721 usepackage{dropcaps}
23723 to your LaTeX preamble, you will get a nice Times Roman Italic
23724 \begin_inset Quotes eld
23728 \begin_inset Quotes erd
23731 , whose height is three lines of text and which protrudes 1 em into the
23733 (Make certain you have copied
23734 \begin_inset Quotes eld
23742 \begin_inset Quotes erd
23745 into a directory where TeX can see it.) The first argument is the amount
23746 of indentation; in this case the negative sign moves it into the margin.
23747 The second argument is the height of the letter in number of lines of text.
23748 The third argument is the font name: virtually anything which has a tfm
23749 file should work (wade through the
23751 .../texmf/fonts/tfm
23753 directory for possibilities).
23754 My personal favorite is
23755 \begin_inset Quotes eld
23763 \begin_inset Quotes erd
23766 , a fancy German font specifically designed for dropped capitals.
23767 The fourth argument is the letter (or letters) to be dropped.
23772 package also offers the
23778 command, as well as a slightly simplified
23787 \begin_layout Section
23788 Non-standard Paragraph Shapes
23791 \begin_layout Standard
23797 \begin_layout Standard
23798 \begin_inset VSpace bigskip
23804 \begin_layout Standard
23808 \begin_layout Standard
23820 \begin_layout Standard
23824 \begin_layout Standard
23833 \begin_layout Standard
23847 \begin_layout Standard
23852 \begin_layout Standard
23863 \begin_layout Standard
23872 \begin_layout Standard
23881 \begin_layout Standard
23890 \begin_layout Standard
23899 \begin_layout Standard
23908 \begin_layout Standard
23917 \begin_layout Standard
23926 \begin_layout Standard
23935 \begin_layout Standard
23944 \begin_layout Standard
23953 \begin_layout Standard
23962 \begin_layout Standard
23971 \begin_layout Standard
23980 \begin_layout Standard
23989 \begin_layout Standard
23998 \begin_layout Standard
24007 \begin_layout Standard
24016 \begin_layout Standard
24025 \begin_layout Standard
24031 There are times when the tyranny of rectangular paragraphs must be overthrown.
24032 In such situations, a call to the delightful plain TeX command
24039 As you can see, completely arbitrary shapes can be laid out with a suitable
24040 set of linelength definitions.
24041 While this parshape may look a bit silly and useless, one could conceive
24042 of situations such as finely tuned dropped capitals, word wrapping around
24043 non-rectangular graphics, etc.
24044 which will benefit from such handcrafting.
24047 \begin_layout Standard
24048 \begin_inset VSpace bigskip
24054 \begin_layout Standard
24059 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
24066 is the number of lines of text which define the paragraph.
24067 If there turn out to be fewer lines, the shape is truncated; if there are
24068 more, the excess lines have the same dimensions as the last line of the
24078 entries specify the indentation of the line from the left margin, and the
24079 length of the line as measured from that point.
24080 The shape applies only to the current paragraph; everything is reset to
24081 normal for the next paragraph.
24084 \begin_layout Standard
24088 \begin_layout Standard
24100 \begin_layout Section
24104 \begin_layout Standard
24105 As you can see, the examples in this section range from the useful to the
24107 While I don't expect that anyone will ever need the paragraph shape demonstrate
24108 d in the last section, the important point is that you can do almost anything
24109 you want in LyX if you are willing to figure out how to do it in TeX and
24111 TeX is a fantastically powerful typesetting system and all that power is
24112 available to you since LyX uses it as its backend.