1 #LyX 2.0.0svn created this file. For more info see http://www.lyx.org/
7 % DO NOT ALTER THIS PREAMBLE!!!
9 % This preamble is designed to ensure that the manual prints
10 % out as advertised. If you mess with this preamble,
11 % parts of the manual may not print out as expected. If you
12 % have problems LaTeXing this file, please contact
13 % the documentation team
14 % email: lyx-docs@lists.lyx.org
20 % set fonts for nicer pdf view
21 \IfFileExists{lmodern.sty}
22 {\usepackage{lmodern}}{}
24 \fi % end if pdflatex is used
26 % the pages of the TOC are numbered roman
27 % and a PDF-bookmark for the TOC is added
29 \let\myTOC\tableofcontents
30 \renewcommand{\tableofcontents}{%
31 \pdfbookmark[1]{\contentsname}{}
34 \pagenumbering{arabic}}
36 % redefine the \LyX macro for PDF bookmarks
37 \def\LyX{\texorpdfstring{%
38 L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}
41 % used for multi-column text
44 % extra space for tables
45 \newcommand{\extratablespace}[1]{\noalign{\vskip#1}}
47 \options fleqn,liststotoc,bibtotoc,idxtotoc,BCOR7.5mm,titlepage,tablecaptionabove
48 \use_default_options false
56 InsetLayout CharStyle:MenuItem
65 \newcommand*{\menuitem}[1]{{\sffamily #1}}
73 \font_typewriter default
74 \font_default_family default
82 \default_output_format default
83 \bibtex_command default
84 \index_command default
88 \pdf_title "LyX's Additional Features manual"
89 \pdf_author "LyX Team"
90 \pdf_subject "LyX's additional features documentation"
91 \pdf_keywords "LyX, Documentation, Additional"
93 \pdf_bookmarksnumbered true
94 \pdf_bookmarksopen false
95 \pdf_bookmarksopenlevel 1
100 \pdf_pdfusetitle false
101 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false, pdfpagelabels"
109 \paperorientation portrait
117 \paragraph_separation indent
118 \paragraph_indentation default
119 \quotes_language english
122 \paperpagestyle headings
123 \tracking_changes false
124 \output_changes false
130 Additional LyX Features
138 \begin_layout Plain Layout
140 Principal maintainer of this file is
145 If you have comments or error corrections, please send them to the LyX
146 Documentation mailing list,
147 \begin_inset Flex CharStyle:Code
150 \begin_layout Plain Layout
152 <lyx-docs@lists.lyx.org>
165 \begin_layout Standard
166 \begin_inset CommandInset toc
167 LatexCommand tableofcontents
174 \begin_layout Chapter
178 \begin_layout Standard
179 This manual is essentially Part II of the
181 User's Guide\SpecialChar \@.
184 The reason for separating this document out is simple: the
188 is already quite lengthy, and it contains information on all of the basic
189 features one needs to know in order to prepare most documents.
190 However, the LyX Team has worked to LyX extensible through various configuratio
191 n files and external packages.
192 That means that if you want to support the Fizzwizzle LaTeX package, you
193 can create a layout file (or module) for it without having to alter LyX
195 We've already had contributions of several new features this way.
196 This is the place where all of those get documented.
199 \begin_layout Standard
200 This manual also documents some special features, like fax support, version
201 control, and SGML support, which require additional software to work properly.
202 Lastly, there's a chapter of LaTeX tools and tips, things you can use to
203 spruce up your documents by directly using the powerful features of LaTeX.
208 only WYSIWYM and will only ever interface to some, not all, LaTeX features.
211 \begin_layout Standard
212 If you haven't read the
216 yet, you are definitely in the wrong manual.
221 is the first place to go, since it describes the notation and format of
223 You should also be thoroughly familiar with the
227 and all of the basic features of LyX before attempting to read this one.
230 \begin_layout Standard
231 Since all the topics in this manual depend heavily on LyX's interaction
232 with LaTeX, this first chapter covers the inner workings of LyX and how
233 to direct LyX to generate exactly the LaTeX code you want.
234 It is obviously for more seasoned LyX users.
237 \begin_layout Chapter
241 \begin_layout Section
245 \begin_layout Standard
246 This chapter is for both TeX-nicians and the LaTeX-curious.
247 In it, we'll explain how LyX and LaTeX work together to produce printable
249 This is the only place in any of the manuals where we assume you know something
253 \begin_layout Standard
254 At one time, LyX was called a
255 \begin_inset Quotes eld
258 WYSIWYM frontend to LaTeX,
259 \begin_inset Quotes erd
262 but that's no longer true.
263 There are frontends to LaTeX out there.
267 \begin_layout Plain Layout
268 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
269 There are also the LaTeX modes for vi and emacs, of course.
274 These are basically text editors with the ability to run LaTeX and mark
275 any errors in the file you're editing.
284 run LaTeX, and it also indicates errors in the file, it also does much,
286 For one thing, you don't need to know LaTeX to use LyX effectively.
287 And LyX has added its own extensions to LaTeX.
288 Try the following sometime: select
289 \begin_inset Flex CharStyle:MenuItem
292 \begin_layout Plain Layout
293 Export\SpecialChar \menuseparator
300 \begin_inset Flex CharStyle:MenuItem
303 \begin_layout Plain Layout
310 \begin_inset Flex CharStyle:MenuItem
313 \begin_layout Plain Layout
314 View\SpecialChar \menuseparator
320 ), then look at the preamble of the resulting
321 \begin_inset Flex CharStyle:Code
324 \begin_layout Plain Layout
331 You'll notice a variety of new macros defined specifically by LyX.
332 These macros are defined automatically, according to the features you use
336 \begin_layout Standard
337 There are several commands that automatically invoke LaTeX.
341 \begin_layout Itemize
342 \begin_inset Flex CharStyle:MenuItem
345 \begin_layout Plain Layout
346 View\SpecialChar \menuseparator
355 \begin_layout Itemize
356 \begin_inset Flex CharStyle:MenuItem
359 \begin_layout Plain Layout
360 View\SpecialChar \menuseparator
361 Update\SpecialChar \menuseparator
370 \begin_layout Itemize
371 \begin_inset Flex CharStyle:MenuItem
374 \begin_layout Plain Layout
375 File\SpecialChar \menuseparator
384 \begin_layout Itemize
385 \begin_inset Flex CharStyle:MenuItem
388 \begin_layout Plain Layout
389 File\SpecialChar \menuseparator
398 \begin_layout Standard
399 They will only invoke LaTeX if the file has changed since the last time
404 \begin_layout Standard
405 When LyX runs LaTeX on the file you're editing, it performs these steps:
408 \begin_layout Enumerate
409 Convert the document to LaTeX and save to a file with the extension
410 \begin_inset Flex CharStyle:Code
413 \begin_layout Plain Layout
420 \begin_inset Flex CharStyle:Code
423 \begin_layout Plain Layout
432 \begin_layout Enumerate
434 \begin_inset Flex CharStyle:Code
437 \begin_layout Plain Layout
443 file (maybe several times), and run any other commands (such as
444 \begin_inset Flex CharStyle:Code
447 \begin_layout Plain Layout
454 \begin_inset Flex CharStyle:Code
457 \begin_layout Plain Layout
463 ) needed to compile the LaTeX file.
466 \begin_layout Enumerate
467 If there are any errors, show the error log.
470 \begin_layout Standard
471 If you've run LaTeX using
472 \begin_inset Flex CharStyle:MenuItem
475 \begin_layout Plain Layout
478 \SpecialChar \menuseparator
486 , LyX then runs a DVI viewer to display the DVI-file.
488 \begin_inset Flex CharStyle:MenuItem
491 \begin_layout Plain Layout
494 \SpecialChar \menuseparator
502 , LyX performs further steps:
505 \begin_layout Itemize
507 \begin_inset Flex CharStyle:Code
510 \begin_layout Plain Layout
516 to convert the DVI file to PostScript.
519 \begin_layout Itemize
520 Run a PostScript viewer, such as
521 \begin_inset Flex CharStyle:Code
524 \begin_layout Plain Layout
530 , to display the PostScript file.
533 \begin_layout Standard
534 LyX does similar things when viewing, or exporting, other formats.
537 \begin_layout Section
538 Translating LaTeX files into LyX
541 \begin_layout Standard
542 You can import a LaTeX file into LyX by using the
543 \begin_inset Flex CharStyle:MenuItem
546 \begin_layout Plain Layout
547 File\SpecialChar \menuseparator
548 Import\SpecialChar \menuseparator
555 This will call a program named
556 \begin_inset Flex CharStyle:Code
559 \begin_layout Plain Layout
565 which will create a file
566 \begin_inset Flex CharStyle:Code
569 \begin_layout Plain Layout
576 \begin_inset Flex CharStyle:Code
579 \begin_layout Plain Layout
586 LyX will then open that file.
590 \begin_layout Plain Layout
591 \begin_inset Flex CharStyle:Code
594 \begin_layout Plain Layout
600 can also be run from the command line, of course.
608 \begin_layout Standard
609 \begin_inset Flex CharStyle:Code
612 \begin_layout Plain Layout
618 will translate most legal LaTeX, but not everything.
619 It will put things it doesn't understand into TeX code, so after translating
621 \begin_inset Flex CharStyle:Code
624 \begin_layout Plain Layout
630 , you can look for TeX code and hand-edit it until it looks right.
633 \begin_layout Standard
634 If you don't know what TeX code is, read the next section.
637 \begin_layout Section
638 \begin_inset CommandInset label
640 name "sec:Inserting-TeX-Code"
644 Inserting TeX Code into LyX Documents
647 \begin_layout Standard
648 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
649 You can always insert TeX code into any LyX document.
650 LyX cannot, and will never be able to, display every possible LaTeX construct.
651 If ever you need to insert LaTeX commands into your LyX document, you can
653 \begin_inset Flex CharStyle:Code
656 \begin_layout Plain Layout
662 box, which you can insert into your document with
663 \begin_inset Flex CharStyle:MenuItem
666 \begin_layout Plain Layout
667 Insert\SpecialChar \menuseparator
676 \begin_layout Standard
677 Here's an example of inserting LaTeX commands in a LyX document.
678 The code looks like this:
681 \begin_layout LyX-Code
685 \begin_inset Newline newline
691 \begin_inset Newline newline
694 This is an example for a minipage environment.
696 \begin_inset Newline newline
699 can put nearly everything in it, even (non-floating)
700 \begin_inset Newline newline
705 \begin_inset Newline newline
711 \begin_inset Newline newline
715 \begin_inset Newline newline
721 \begin_inset Newline newline
727 \begin_inset Newline newline
733 \begin_inset Newline newline
738 \begin_inset Newline newline
744 \begin_inset Newline newline
750 \begin_inset Newline newline
756 \begin_inset Newline newline
764 \begin_layout LyX-Code
768 \begin_layout Standard
770 \begin_inset Flex CharStyle:Code
773 \begin_layout Plain Layout
779 box containing this text is directly after this paragraph.
780 Those of you reading the manual in LyX will only see the TeX code inset.
781 Those reading a printed version of the manuals will see the actual results:
784 \begin_layout Standard
788 \begin_layout Plain Layout
795 \begin_layout Plain Layout
802 \begin_layout Plain Layout
804 This is an example for a minipage environment.
805 You can put nearly everything in it, even (non-floating) figures and tables.
809 \begin_layout Plain Layout
816 \begin_layout Plain Layout
821 \begin_layout Plain Layout
828 \begin_layout Plain Layout
835 \begin_layout Plain Layout
842 \begin_layout Plain Layout
848 \begin_layout Plain Layout
855 \begin_layout Plain Layout
862 \begin_layout Plain Layout
869 \begin_layout Plain Layout
881 \begin_layout Standard
882 In addition to using TeX code, you can also create a separate file containing
883 some complex LaTeX structure and then use
884 \begin_inset Flex CharStyle:MenuItem
887 \begin_layout Plain Layout
888 Insert\SpecialChar \menuseparator
898 to include your file (you should select the type
899 \begin_inset Flex CharStyle:Code
902 \begin_layout Plain Layout
909 We recommend that you only do this if you have a
910 \begin_inset Flex CharStyle:Code
913 \begin_layout Plain Layout
924 Otherwise, you'll have a big job tracking down LaTeX errors.
927 \begin_layout Standard
928 There are a few last points to emphasize:
931 \begin_layout Itemize
936 check if your LaTeX code is correct.
939 \begin_layout Itemize
940 Beware reinventing the wheel.
943 \begin_layout Standard
944 On that last point, LyX does have quite a few features tucked into it, and
946 Be sure to check the manuals to make sure that LyX doesn't have such-and-such
947 feature before you decide you have to do it by hand.
948 Moreover, there are numerous LaTeX packages out there to do all sorts of
949 things, from labels to envelopes to fancy multipage tables.
951 \begin_inset CommandInset href
954 target "http://www.ctan.org/"
958 for details, and see chapter
959 \begin_inset CommandInset ref
961 reference "cha:secrets"
968 \begin_layout Standard
969 If you do need to do some wild and fancy things within your document, be
970 sure to check out a good LaTeX book for assistance.
971 There are a number of them listed in the bibliography of the
978 \begin_layout Section
979 LyX and the LaTeX Preamble
982 \begin_layout Subsection
983 About the LaTeX Preamble
986 \begin_layout Standard
987 If you already know LaTeX, there is no need to explain here what the preamble
989 If you don't, the following will give you some ideas—we recommend again
990 that you consult a LaTeX book for further information.
991 In any case, you should read the points below, because they explain what
992 you can do and what you don't need to do in the LaTeX preamble of a LyX
996 \begin_layout Standard
997 The LaTeX preamble comes at the very beginning of a document,
1005 \begin_layout Itemize
1006 Declare the document class.
1008 \begin_inset Newline newline
1011 LyX already does this for you.
1012 If you're a seasoned LaTeX-nician, and you have a custom document class
1013 you want to use, check out the
1015 Customization Manual
1017 for information on how to make LyX interface to it.
1020 \begin_layout Itemize
1021 Declare the usage of packages.
1023 \begin_inset Newline newline
1026 LaTeX packages provide special commands, which are only available within
1027 a document when the package has been declared in the preamble.
1028 For example, the package
1029 \begin_inset Flex CharStyle:Code
1032 \begin_layout Plain Layout
1038 forces all paragraphs to be indented.
1039 There are other packages for labels, envelopes, margins, etc.
1043 \begin_layout Itemize
1044 Set counters, variables, lengths and widths.
1046 \begin_inset Newline newline
1049 There are several LaTeX counters and variables which
1053 be set globally from within the preamble in order to have the desired effect.
1054 (There are variables which you can set and reset inside the document, too.)
1055 Margins are a good example of something which must be set in the preamble.
1056 Another example is the label format for lists.
1057 You can actually set these just about anywhere, but it's best to do it
1058 just once, inside the preamble.
1061 \begin_layout Itemize
1062 Declare user defined commands (with
1063 \begin_inset Flex CharStyle:Code
1066 \begin_layout Plain Layout
1075 \begin_inset Flex CharStyle:Code
1078 \begin_layout Plain Layout
1087 \begin_inset Newline newline
1090 These are abbreviations for LaTeX commands which appear very often inside
1092 Although the preamble is a good place to declare such commands, they
1096 be declared anywhere (before they are used for the first time, of course).
1097 This can be useful if there is a lot of raw LaTeX code in your document,
1098 which normally should not be the case.
1101 \begin_layout Standard
1102 LyX adds its own set of definitions to the preamble of the
1103 \begin_inset Flex CharStyle:Code
1106 \begin_layout Plain Layout
1113 This makes LaTeX files generated by LyX portable.
1116 \begin_layout Subsection
1117 Changing the Preamble
1120 \begin_layout Standard
1121 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1122 can't change them without patching LyX itself.
1123 You can, however, add your own stuff to the preamble by selecting
1124 \begin_inset Flex CharStyle:MenuItem
1127 \begin_layout Plain Layout
1129 \begin_inset space ~
1138 \begin_inset Flex CharStyle:MenuItem
1141 \begin_layout Plain Layout
1142 Document\SpecialChar \menuseparator
1149 LyX adds anything in the
1150 \begin_inset Flex CharStyle:MenuItem
1153 \begin_layout Plain Layout
1159 dialog to its own built-in preamble.
1160 Before adding your own declarations in the preamble, you should make sure
1161 that LyX doesn't already support what you want to do.
1162 (Remember what we said about reinventing the wheel?) Also,
1164 make sure your preamble code is correct
1167 LyX doesn't check it for you.
1168 If there is an error, you're likely to get an error like
1169 \begin_inset Quotes eld
1173 \begin_inset Flex CharStyle:Code
1176 \begin_layout Plain Layout
1185 \begin_inset Quotes erd
1189 If you see this error, check your preamble.
1192 \begin_layout Subsection
1196 \begin_layout Standard
1197 Here are some examples of what you can add to a preamble, and what they
1201 \begin_layout Subsubsection
1205 \begin_layout Standard
1206 There are two variables under LaTeX that control page position:
1207 \begin_inset Flex CharStyle:Code
1210 \begin_layout Plain Layout
1219 \begin_inset Flex CharStyle:Code
1222 \begin_layout Plain Layout
1231 Their names should be self-explanatory.
1232 These variables are useful if you think for a moment about computer labels.
1233 Sometimes, the size of a print medium and the area of the medium that you
1234 can actually print on aren't the same.
1236 \begin_inset Flex CharStyle:Code
1239 \begin_layout Plain Layout
1248 \begin_inset Flex CharStyle:Code
1251 \begin_layout Plain Layout
1262 \begin_layout Standard
1263 The default values for
1264 \begin_inset Flex CharStyle:Code
1267 \begin_layout Plain Layout
1276 \begin_inset Flex CharStyle:Code
1279 \begin_layout Plain Layout
1288 \begin_inset space \thinspace{}
1292 \begin_inset space \thinspace{}
1296 \begin_inset space \space{}
1299 the page isn't shifted.
1300 Unfortunately, some DVI drivers always seem to shift the page.
1301 We have no idea why, or why the sysadmin hasn't fixed such behavior.
1302 If you're using LyX on a system that you don't personally maintain, and
1303 your sysadmin is a doofus,
1304 \begin_inset Flex CharStyle:Code
1307 \begin_layout Plain Layout
1316 \begin_inset Flex CharStyle:Code
1319 \begin_layout Plain Layout
1328 Suppose you're left and top margins are always 0.5
1329 \begin_inset space \thinspace{}
1333 You can add this to the preamble:
1336 \begin_layout LyX-Code
1344 \begin_layout LyX-Code
1352 \begin_layout Standard
1353 and your margins should now be correct.
1356 \begin_layout Subsubsection
1360 \begin_layout Standard
1361 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1362 There's a rather nice package, available at your nearest CTAN archive,
1363 for printing sheets of labels:
1364 \begin_inset Flex CharStyle:Code
1367 \begin_layout Plain Layout
1374 Now, your system may not have this package installed by default.
1375 We leave that up to you to check.
1376 You'll also want to read the documentation for it; we're not going to do
1378 Since this is an example, however, we'll give you an example of how you
1382 \begin_layout Standard
1383 First, make sure you're using the
1384 \begin_inset Flex CharStyle:Code
1387 \begin_layout Plain Layout
1394 Next, you need to put the following in your preamble:
1397 \begin_layout LyX-Code
1403 \begin_layout LyX-Code
1409 \begin_layout LyX-Code
1415 \begin_layout LyX-Code
1421 \begin_layout LyX-Code
1427 \begin_layout LyX-Code
1433 \begin_layout LyX-Code
1439 \begin_layout Standard
1440 This sets things up for Avery label sheets, stock #5360.
1441 You're now ready to print labels, but you'll need to insert LaTeX code,
1442 placing the commands
1443 \begin_inset Flex CharStyle:Code
1446 \begin_layout Plain Layout
1455 \begin_inset Flex CharStyle:Code
1458 \begin_layout Plain Layout
1466 around each label text.
1467 This and other special features of
1468 \begin_inset Flex CharStyle:Code
1471 \begin_layout Plain Layout
1477 are explained in its documentation.
1480 \begin_layout Standard
1481 Someday, someone may write a LyX layout file to support this package directly.
1482 Maybe that someone is you.
1485 \begin_layout Subsubsection
1486 Example #3: Paragraph Indentation
1489 \begin_layout Standard
1490 Americans are trained to indent the first line of
1495 As with all of their other weird quirks, most Americans will whine and
1496 moan until they can have their way and indent the first line of all paragraphs.
1505 \begin_layout Standard
1506 Of course, this behavior isn't standard typography.
1507 In books, you typically only indent the first line of a paragraph
1511 it follows another one.
1512 The idea behind indenting the first line of a paragraph is to distinguish
1513 neighboring paragraphs from one another.
1514 If there is no previous paragraph—for example, if it follows a figure or
1515 is the first paragraph in a section—then there is no need for indentation.
1519 \begin_layout Standard
1520 If you're a typical American (we're still joking!), though, you don't care
1521 about such esoteric things; you want your indentation! Add this to the
1525 \begin_layout LyX-Code
1528 usepackage{indentfirst}
1531 \begin_layout Standard
1532 If your TeX distribution isn't braindead, you'll have this package, and
1533 all of your paragraphs will get the indentation the Founding Fathers intended
1537 \begin_layout Subsubsection
1538 Example #4: This Document
1541 \begin_layout Standard
1542 You can also check out the preamble of this document to get an idea of some
1543 of the advanced things you can do.
1544 Also, there are more examples and an assortment of LaTeX
1545 \begin_inset Quotes eld
1549 \begin_inset Quotes erd
1553 \begin_inset space ~
1557 \begin_inset CommandInset ref
1559 reference "cha:secrets"
1567 \begin_layout Section
1568 LyX and LaTeX Errors
1571 \begin_layout Standard
1572 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1574 It then uses the logfile from the LaTeX run to do a post-mortem.
1575 After analyzing the logfile,LyX displays a dialog listing the errors.
1576 Clicking on any one of them will take you to the position in your LyX file
1577 where the error occurred.
1581 \begin_layout Plain Layout
1583 Analyzing the logfile is a tough job, and LyX doesn't always go to the
1585 There are also cases where LaTeX reports the error on one line, but the
1586 actual error is earlier.
1587 This is not unlike forgetting a closing brace in a program: You'll get
1588 an error, but only later.
1596 \begin_layout Standard
1597 Some folks also like to look at the log file directly: It is available from
1599 \begin_inset Flex CharStyle:MenuItem
1602 \begin_layout Plain Layout
1605 \SpecialChar \menuseparator
1609 \begin_inset space ~
1618 There are some fairly common error messages and warnings.
1619 We'll cover those here.
1620 You should look at a good LaTeX book for a complete listing.
1623 \begin_layout Itemize
1624 \begin_inset Flex CharStyle:Code
1627 \begin_layout Plain Layout
1634 \begin_inset Newline newline
1637 Anything beginning with these words is a warning message for the purpose
1639 \begin_inset Quotes eld
1643 \begin_inset Quotes erd
1646 the LaTeX code itself.
1647 You'll get messages like this if you added or changed cross-references
1648 or bibliography entries, in which case, LaTeX is trying to tell you that
1649 you need to make another run.
1650 You can by-and-large ignore these.
1653 \begin_layout Itemize
1654 \begin_inset Flex CharStyle:Code
1657 \begin_layout Plain Layout
1664 \begin_inset Newline newline
1667 Another warning message, this time about fonts which LaTeX couldn't find.
1668 The rest of the message will often say something about a replacement font
1670 You can safely ignore these, too.
1673 \begin_layout Itemize
1674 \begin_inset Flex CharStyle:Code
1677 \begin_layout Plain Layout
1686 \begin_inset Newline newline
1694 They are warnings about lines that were too long and run past the right
1696 Almost always, this is unnoticeable in the final output.
1697 (It can be just a point or two.) Or, only one or two characters extend past
1699 LaTeX seems to generate at least one of these messages for just about any
1701 \begin_inset Newline newline
1704 You can ignore these messages.
1705 Your eyes will tell you if there's a problem with something that's too
1706 wide; just look at the output.
1710 \begin_layout Plain Layout
1711 You can also enable the `draft' option in
1712 \begin_inset Flex CharStyle:MenuItem
1715 \begin_layout Plain Layout
1718 \SpecialChar \menuseparator
1726 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1734 \begin_layout Itemize
1735 \begin_inset Flex CharStyle:Code
1738 \begin_layout Plain Layout
1747 \begin_inset Newline newline
1750 Not quite as common as its cousin.
1751 LaTeX seems to like to print lines that are a bit too wide as opposed to
1752 ones that are a bit too narrow.
1753 We have no idea why.
1756 \begin_layout Itemize
1757 \begin_inset Flex CharStyle:Code
1760 \begin_layout Plain Layout
1769 \begin_inset Flex CharStyle:Code
1772 \begin_layout Plain Layout
1781 \begin_inset Newline newline
1784 Warnings about troubles breaking the page.
1785 Once again, just look at the output.
1786 Your eyes will tell you where something has gone wrong.
1789 \begin_layout Itemize
1790 \begin_inset Flex CharStyle:Code
1793 \begin_layout Plain Layout
1795 \begin_inset Quotes els
1799 \begin_inset Quotes ers
1808 \begin_inset Newline newline
1812 \begin_inset Quotes eld
1816 \begin_inset Quotes erd
1819 isn't installed on this system.
1820 This usually appears because some package your document needs isn't installed.
1821 If you didn't touch the preamble or didn't use the
1822 \begin_inset Flex CharStyle:Code
1825 \begin_layout Plain Layout
1833 command, then one of the packages LyX tried to load is missing.
1835 \begin_inset Flex CharStyle:MenuItem
1838 \begin_layout Plain Layout
1839 Help\SpecialChar \menuseparator
1845 to get a list of packages that LyX knows about.
1846 This file is updated whenever you reconfigure LyX (using
1847 \begin_inset Flex CharStyle:MenuItem
1850 \begin_layout Plain Layout
1851 Tools\SpecialChar \menuseparator
1857 ) and tells you which packages have been detected and what they do.
1858 \begin_inset Newline newline
1862 \begin_inset Flex CharStyle:Code
1865 \begin_layout Plain Layout
1873 command and the package in question isn't installed, then you'll need to
1874 install it yourself.
1877 \begin_layout Itemize
1878 \begin_inset Flex CharStyle:Code
1881 \begin_layout Plain Layout
1882 LaTeX Error: Unknown option
1888 \begin_inset Newline newline
1891 Error messages beginning with this are trying to tell you that you specified
1892 a bad or undefined option to a package.
1893 Check the package's documentation.
1896 \begin_layout Itemize
1897 \begin_inset Flex CharStyle:Code
1900 \begin_layout Plain Layout
1901 Undefined control sequence
1907 \begin_inset Newline newline
1910 If you've inserted LaTeX code into your document, but made a typo, you'll
1912 You may have forgotten to load a package.
1913 In any case, this error message usually means that you used an undefined
1918 \begin_layout Standard
1919 There are other error and warning messages.
1920 Some are self-explanatory.
1921 These are usually LaTeX messages.
1922 Others are downright cryptic.
1923 These are usually TeX error messages, and we really have
1927 what they mean or how to decipher them.
1931 \begin_layout Standard
1932 There's a general sequence you should follow if you get error messages:
1935 \begin_layout Enumerate
1936 Look at the LaTeX code you inserted for typos.
1939 \begin_layout Enumerate
1940 If there are no typos, check that you used the command(s) correctly.
1943 \begin_layout Enumerate
1944 If you get a bunch of error boxes piled up at the very top of the document—and
1945 especially if you see a
1946 \begin_inset Quotes eld
1950 \begin_inset Flex CharStyle:Code
1953 \begin_layout Plain Layout
1962 \begin_inset Quotes erd
1965 error—it means that there are errors in the preamble.
1966 Start debugging your preamble.
1969 \begin_layout Enumerate
1970 If you didn't add anything to the preamble and didn't add any LaTeX code
1971 to the document, the first suspect is your LaTeX distribution itself.
1972 Check for missing packages and install them.
1975 \begin_layout Enumerate
1976 Okay, so there are no missing packages.
1977 Did you use any of the fine-tuning options in LyX? Specifically, did you
1982 any of them, like trying to manually insert lots of
1983 \begin_inset Flex CharStyle:Code
1986 \begin_layout Plain Layout
1988 \begin_inset space ~
1997 \begin_inset Flex CharStyle:Code
2000 \begin_layout Plain Layout
2007 \begin_inset Flex CharStyle:Code
2010 \begin_layout Plain Layout
2016 ? Did you try to kludge something together with these instead of using the
2017 appropriate paragraph environment?
2020 \begin_layout Enumerate
2021 All right, you didn't use any of the fine-tuning options, you played by
2023 Did you try to pull a fancy maneuver? Did you do something funky inside
2024 a table or an equation, like inserting a graphic into a table cell?
2027 \begin_layout Enumerate
2028 Do you have long sections of text where LaTeX cannot find a place to break
2029 a line? By default, LaTeX is rather strict about how much extra inter-word
2030 spacing it will add in order to break a line.
2031 Preferably, you should rework the paragraph to avoid the problem.
2032 If this isn't an option, you can wrap your text in
2033 \begin_inset Flex CharStyle:Code
2036 \begin_layout Plain Layout
2044 to make LaTeX's line breaking more, well, sloppy.
2047 \begin_layout Enumerate
2048 Did you go overboard with the nesting? LyX (currently) doesn't check to
2049 make sure you're in the limits for nesting environments.
2050 If you nested a bunch of environments to the
2051 \begin_inset Formula $17^{\mathrm{th}}$
2054 level, that's the problem.
2055 (The limit in LaTeX is five.)
2058 \begin_layout Enumerate
2059 Okay, you didn't get any error messages, but your output looks awful.
2060 If you have a table or figure that's too wide or long for the page, you
2065 \begin_layout Enumerate
2066 rescale the figure so it fits.
2069 \begin_layout Enumerate
2070 trim down the table so it fits.
2074 \begin_layout Enumerate
2075 If something else is wrong with the output, and you didn't try to pull anything
2076 fancy or kludge the fine-tuning options, we're not sure what's wrong.
2079 \begin_layout Standard
2080 If all this doesn't help—well, then
2084 you might have found a bug in LyX\SpecialChar \ldots{}
2088 \begin_layout Chapter
2092 \begin_layout Section
2093 Customizing Bibliographies with BibTeX
2096 \begin_layout Standard
2097 The basics how to use BibTeX are explained in section
2099 Bibliography databases (BibTeX)
2106 The following subsections explain special bibliography features supported
2110 \begin_layout Subsection
2111 Alternative Citation Styles
2114 \begin_layout Standard
2115 Standard BibTeX uses numbers (e.
2116 \begin_inset space \thinspace{}
2120 \begin_inset space \space{}
2124 \begin_inset Quotes eld
2128 \begin_inset Quotes erd
2131 ) to refer to a cited work.
2132 However, in many scientific disciplines, other citation styles are in use.
2133 The most common one is the author-year style (e.
2134 \begin_inset space \thinspace{}
2138 \begin_inset space \space{}
2142 \begin_inset Quotes eld
2146 \begin_inset Quotes erd
2150 LyX supports two packages that provide this style,
2151 \begin_inset Flex CharStyle:Code
2154 \begin_layout Plain Layout
2161 \begin_inset Flex CharStyle:Code
2164 \begin_layout Plain Layout
2171 Both packages have their pros and cons, which cannot be listed in detail.
2172 If you only want to have simple author-year (or author-numerical) style,
2173 or if you want to use one of the countless style files for
2174 \begin_inset Flex CharStyle:Code
2177 \begin_layout Plain Layout
2183 , than the established
2184 \begin_inset Flex CharStyle:Code
2187 \begin_layout Plain Layout
2193 package is probably your choice.
2194 If you need special features like short title references, ibidem etc., you
2196 \begin_inset Flex CharStyle:Code
2199 \begin_layout Plain Layout
2208 \begin_layout Standard
2209 The handling of both packages in LyX is basically the same.
2211 \begin_inset Flex CharStyle:MenuItem
2214 \begin_layout Plain Layout
2215 Document\SpecialChar \menuseparator
2222 \begin_inset Flex CharStyle:MenuItem
2225 \begin_layout Plain Layout
2232 \begin_inset Flex CharStyle:MenuItem
2235 \begin_layout Plain Layout
2242 \begin_inset Flex CharStyle:MenuItem
2245 \begin_layout Plain Layout
2252 With both packages, you will get some extra features in the citation dialog
2253 and you can select the style of the reference (
2254 \begin_inset Quotes eld
2258 \begin_inset Quotes erd
2262 \begin_inset Quotes eld
2266 \begin_inset Quotes erd
2270 \begin_inset Quotes eld
2274 \begin_inset Quotes erd
2278 \begin_inset Quotes eld
2282 \begin_inset Quotes erd
2286 Note that both packages need specifically designed style files.
2287 They both ship their own, but there are lots of additional style files,
2288 and there is even an interactive style file builder
2292 \begin_layout Plain Layout
2294 \begin_inset Flex URL
2297 \begin_layout Plain Layout
2299 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2310 \begin_inset Flex CharStyle:Code
2313 \begin_layout Plain Layout
2322 \begin_layout Subsection
2323 Sectioned Bibliographies
2326 \begin_layout Standard
2327 Sometimes you might need to divide your bibliography into several sections.
2328 If you are for instance a historian, the possibility to separate sources
2329 and scientific works is most likely a
2330 \begin_inset Quotes eld
2334 \begin_inset Quotes erd
2338 Unfortunately, BibTeX itself does not allow you to do this.
2339 But with the help of some LaTeX packages, BibTeX can be extended to fit
2343 \begin_layout Standard
2344 LyX provides native support for one of these packages,
2352 \begin_layout Plain Layout
2354 \begin_inset Flex URL
2357 \begin_layout Plain Layout
2359 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2369 The advantage of this package (compared to other packages like
2373 ) is that you don't need to define new citation commands.
2374 Instead, you need to prepare different bibliographic databases which include
2375 the entries for the different sections of the bibliography.
2376 For example: If you want to divide your bibliography into the sections
2378 \begin_inset Quotes eld
2382 \begin_inset Quotes erd
2386 \begin_inset Quotes eld
2390 \begin_inset Quotes erd
2393 , you first need to create two bibliographic databases, e.
2394 \begin_inset space \thinspace{}
2398 \begin_inset space \space{}
2402 \begin_inset Flex CharStyle:Code
2405 \begin_layout Plain Layout
2412 \begin_inset Flex CharStyle:Code
2415 \begin_layout Plain Layout
2425 \begin_layout Standard
2427 \begin_inset Flex CharStyle:MenuItem
2430 \begin_layout Plain Layout
2431 Document\SpecialChar \menuseparator
2438 \begin_inset Flex CharStyle:MenuItem
2441 \begin_layout Plain Layout
2448 \begin_inset Flex CharStyle:MenuItem
2451 \begin_layout Plain Layout
2452 Sectioned bibliography
2458 Now you can insert multiple BibTeX bibliographies, one for each section
2459 of your bibliography.
2460 Returning to our example: Insert the BibTeX bibliography
2461 \begin_inset Flex CharStyle:Code
2464 \begin_layout Plain Layout
2470 and a second one for the database
2471 \begin_inset Flex CharStyle:Code
2474 \begin_layout Plain Layout
2481 You are free to use the same or different styles for each section.
2482 Additionally, you can chose if the bibliography section should contain
2484 \begin_inset Quotes eld
2487 all cited references
2488 \begin_inset Quotes erd
2491 of the specified database(s) (which is the default),
2492 \begin_inset Quotes eld
2495 all uncited references
2496 \begin_inset Quotes erd
2500 \begin_inset Quotes eld
2504 \begin_inset Quotes erd
2508 This might be useful if you would like to separate your bibliography into
2510 \begin_inset Quotes eld
2514 \begin_inset Quotes erd
2518 \begin_inset Quotes eld
2522 \begin_inset Quotes erd
2526 \begin_inset Quotes eld
2530 \begin_inset Quotes erd
2534 The titles for the sections can be added as ordinary sections or subsections.
2536 \begin_inset Flex CharStyle:Code
2539 \begin_layout Plain Layout
2545 removes the bibliography title, you have manually re-add that, too (as
2546 a chapter* or section*, for instance).
2549 \begin_layout Subsection
2550 Multiple Bibliographies
2553 \begin_layout Standard
2554 Multiple bibliographies, e.
2555 \begin_inset space \thinspace{}
2559 \begin_inset space \space{}
2562 a bibliography for each section or chapter of the document, are not supported
2565 \begin_inset Flex CharStyle:Code
2568 \begin_layout Plain Layout
2574 package, which is used for the creation of sectioned bibliographies in
2575 LyX (see the previous section), provides an easy way to solve this task,
2576 if you are willing to use some
2577 \begin_inset Flex CharStyle:MenuItem
2580 \begin_layout Plain Layout
2587 \begin_inset space ~
2591 \begin_inset CommandInset ref
2593 reference "sec:Inserting-TeX-Code"
2601 \begin_layout Plain Layout
2602 An alternative approach is to use the
2603 \begin_inset Flex CharStyle:Code
2606 \begin_layout Plain Layout
2613 \begin_inset Flex CharStyle:Code
2616 \begin_layout Plain Layout
2622 package, respectively.
2630 \begin_layout Standard
2632 \begin_inset Flex CharStyle:MenuItem
2635 \begin_layout Plain Layout
2636 Document\SpecialChar \menuseparator
2643 \begin_inset Flex CharStyle:MenuItem
2646 \begin_layout Plain Layout
2653 \begin_inset Flex CharStyle:MenuItem
2656 \begin_layout Plain Layout
2657 Sectioned bibliography
2663 In the document, you have to enclose the sections, which shall contain
2664 their own bibliography (including the BibTeX bibliography itself), between
2666 \begin_inset Flex CharStyle:Code
2669 \begin_layout Plain Layout
2678 \begin_inset Flex CharStyle:Code
2681 \begin_layout Plain Layout
2689 (those commands have to be inserted as TeX code).
2690 The bibliography will contain all references which have been cited in the
2692 \begin_inset Flex CharStyle:Code
2695 \begin_layout Plain Layout
2706 If you are using this approach, then every citation reference has to be
2708 \begin_inset Flex CharStyle:Code
2711 \begin_layout Plain Layout
2719 \begin_inset Flex CharStyle:Code
2722 \begin_layout Plain Layout
2731 \begin_layout Section
2735 \begin_layout Subsection
2739 \begin_layout Standard
2740 When you are working on a large file with many sections, it is often convenient
2741 to break up the document into several files, or perhaps you have something
2742 where a table may change from time to time, but the preceding text does
2744 In these cases, you should seriously consider using multipart documents.
2745 For example, scientific papers often have five major sections: the introduction
2746 , observations, results, discussion, and conclusion.
2747 Each of these could be its own separate LyX file, with one
2748 \begin_inset Quotes eld
2752 \begin_inset Quotes erd
2755 file which contains the title, authors, abstract, references, etc., plus
2756 the five included files.
2757 It is important to note that each of these files is a full LyX file which
2758 can be formatted and printed on its own, as well as included in a master
2760 Each of these files must have the same document class, however—don't attempt
2761 to mix book classes with article classes.
2762 You may also include LaTeX files; however, these files must not have their
2764 \begin_inset space \thinspace{}
2768 \begin_inset space \space{}
2771 everything up to and including the
2772 \begin_inset Flex CharStyle:Code
2775 \begin_layout Plain Layout
2784 \begin_inset Flex CharStyle:Code
2787 \begin_layout Plain Layout
2795 line must be deleted) or else errors will be generated when you try to
2799 \begin_layout Standard
2800 LyX allows you to include files quite easily with
2801 \begin_inset Flex CharStyle:MenuItem
2804 \begin_layout Plain Layout
2805 Insert\SpecialChar \menuseparator
2807 \begin_inset space ~
2816 When you click on this selection a small box is inserted into the file
2817 at the current cursor location.
2818 Clicking on the box raises a dialog which allows you to select the file
2819 to be included, and the method of its inclusion.
2823 \begin_layout Standard
2824 The file selection box should by now be obvious.
2825 The three inclusion methods are
2826 \begin_inset Quotes eld
2830 \begin_inset Quotes erd
2834 \begin_inset Quotes eld
2838 \begin_inset Quotes erd
2842 \begin_inset Quotes eld
2846 \begin_inset Quotes erd
2850 The difference between
2851 \begin_inset Quotes eld
2855 \begin_inset Quotes erd
2859 \begin_inset Quotes eld
2863 \begin_inset Quotes erd
2866 is really only meaningful to LaTeXperts, but the practical difference is
2867 that files which are
2868 \begin_inset Quotes eld
2872 \begin_inset Quotes erd
2875 are typeset beginning on a new page, while files which are
2876 \begin_inset Quotes eld
2880 \begin_inset Quotes erd
2883 are typeset starting on the current page.
2886 \begin_layout Standard
2887 Generally, the master file is converted into a full LaTeX file before typesettin
2888 g, while the included files are converted to LaTeX files which do not have
2889 all the preamble information.
2892 \begin_layout Standard
2894 \begin_inset Quotes eld
2898 \begin_inset Quotes erd
2901 included file allows you to include a file typeset exactly as it appears
2903 \begin_inset space \thinspace{}
2907 \begin_inset space \space{}
2911 \begin_inset Flex CharStyle:Code
2914 \begin_layout Plain Layout
2920 mode, with the characters set in a fixed-width typewriter font.
2921 Normally, spaces in this file are invisible, though two consecutive spaces
2922 are conserved, unlike LyX's normal treatment of spaces.
2923 However, setting the
2924 \begin_inset Flex CharStyle:MenuItem
2927 \begin_layout Plain Layout
2929 \begin_inset space ~
2933 \begin_inset space ~
2937 \begin_inset space ~
2945 checkbox typesets a mark to unambiguously define the presence of a space.
2949 \begin_layout Subsection
2950 Cross-References Between Files
2953 \begin_layout Standard
2954 \begin_inset Box Shadowbox
2963 height_special "totalheight"
2966 \begin_layout Plain Layout
2967 This section is somewhat out of date.
2968 Need to describe default master documents and how children are opened when
2978 \begin_layout Standard
2979 It is possible to set up cross-references between the different files.
2980 First, open all the files in question: let's call them A and B in a two
2981 file example, where B is included in A.
2982 Let's say you insert a label in A, then want to reference it in B.
2983 Open the cross-reference dialog in whilst in document B, and you can select
2985 \begin_inset Quotes eld
2989 \begin_inset Quotes erd
2995 \begin_layout Subsection
2996 Bibliography Lists in all Subdocuments
2999 \begin_layout Standard
3000 \begin_inset Box Frameless
3009 height_special "totalheight"
3012 \begin_layout Plain Layout
3013 This section also needs updating.
3014 There is now material about this on the wiki, and it could be copied here.
3022 \begin_layout Standard
3023 Copy the bibliography list with all entries to all subdocuments and transform
3025 This way LyX will find the
3026 \begin_inset Flex CharStyle:Code
3029 \begin_layout Plain Layout
3035 -files and you can easily insert references without making the bibliography
3039 \begin_layout Standard
3040 As the bibliography list is in a comment, LaTeX won't use use it and the
3041 references will look like this: [?], instead of like this: [1].
3042 One solution is to use the LaTeX-package
3043 \begin_inset Flex CharStyle:Code
3046 \begin_layout Plain Layout
3052 that will only include comments by processing the files separately.
3053 To do this, add in the LaTeX preamble of every subdocument the following:
3056 \begin_layout LyX-Code
3062 \begin_layout LyX-Code
3065 includecomment{comment}
3068 \begin_layout Standard
3070 \begin_inset Flex URL
3073 \begin_layout Plain Layout
3075 http://wiki.lyx.org/FAQ/Unsorted#toc31
3083 \begin_layout Section
3084 Fancy Headers and Footers
3087 \begin_layout Standard
3088 The default page layout is rather plain; for an
3089 \begin_inset Flex CharStyle:Code
3092 \begin_layout Plain Layout
3098 document class, all you get is a centered page number at the bottom of
3100 This document uses KOMA-script's book class, so it appears to be a bit
3102 But to really put on a show, you need to set the document page style to
3104 \begin_inset Quotes eld
3108 \begin_inset Quotes erd
3111 , as mentioned in the
3116 This section describes the LaTeX code you need to insert in your LaTeX
3117 preamble in order to get the desired effects.
3120 \begin_layout Standard
3121 For more information on fancy headers, see the
3122 \begin_inset Flex CharStyle:Code
3125 \begin_layout Plain Layout
3131 package documentation.
3132 This can be found in the file
3133 \begin_inset Flex CharStyle:Code
3136 \begin_layout Plain Layout
3142 , which should have been installed with your LaTeX distribution, or
3143 \begin_inset CommandInset href
3146 target "http://www.ctan.org/tex-archive/macros/latex/contrib/fancyhdr/"
3153 \begin_layout Standard
3154 The page header is divided into three fields, not surprisingly labeled
3155 \begin_inset Quotes eld
3159 \begin_inset Quotes erd
3163 \begin_inset Quotes eld
3167 \begin_inset Quotes erd
3171 \begin_inset Quotes eld
3175 \begin_inset Quotes erd
3179 The footer is also divided into these three fields.
3180 The LaTeX commands to set these fields in the simplest manner are
3181 \begin_inset Flex CharStyle:Code
3184 \begin_layout Plain Layout
3193 \begin_inset Flex CharStyle:Code
3196 \begin_layout Plain Layout
3205 \begin_inset Flex CharStyle:Code
3208 \begin_layout Plain Layout
3217 \begin_inset Flex CharStyle:Code
3220 \begin_layout Plain Layout
3229 Suppose you wish to put your name in the upper left hand corner of each
3231 Simply insert the following command in the preamble:
3234 \begin_layout Standard
3243 \begin_layout Standard
3244 You will now see your name in the upper left.
3245 If a field has a default entry that you would like to get rid of (often
3246 the page number appears in the central footer, simply include a command
3247 with a blank argument, e.
3248 \begin_inset space \thinspace{}
3254 \begin_layout Standard
3262 \begin_layout Standard
3263 Let's get really fancy: lets put the section number with the word
3264 \begin_inset Quotes eld
3268 \begin_inset Quotes erd
3272 \begin_inset space \thinspace{}
3276 \begin_inset space \space{}
3279 Section 3) in the upper left, the page number (e.
3280 \begin_inset space \thinspace{}
3284 \begin_inset space \space{}
3287 Page 4) in the upper right, your name in the lower left, and the date in
3289 The following commands should now appear in the preamble:
3292 \begin_layout Standard
3302 \begin_layout Standard
3310 \begin_layout Standard
3320 \begin_layout Standard
3329 \begin_layout Standard
3337 \begin_layout Standard
3347 \begin_layout Standard
3349 \begin_inset Flex CharStyle:Code
3352 \begin_layout Plain Layout
3361 \begin_inset Flex CharStyle:Code
3364 \begin_layout Plain Layout
3372 access LaTeX's section and page counters, and so print out the current
3373 section and page numbers.
3375 \begin_inset Flex CharStyle:Code
3378 \begin_layout Plain Layout
3386 simply prints out today's date.
3389 \begin_layout Standard
3390 The thicknesses of the horizontal rules drawn beneath the header and above
3391 the footer can also be modified.
3392 If you don't want one of the rules, set its thickness to 0.
3393 The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3399 \begin_inset Flex CharStyle:Code
3402 \begin_layout Plain Layout
3407 headrulewidth}{0.4pt}
3413 \begin_inset Flex CharStyle:Code
3416 \begin_layout Plain Layout
3421 footrulewidth}{0.4pt}
3426 to set the thicknesses.
3429 \begin_layout Standard
3430 You can switch the header/footer settings on and off for individual pages
3432 \begin_inset Flex CharStyle:Code
3435 \begin_layout Plain Layout
3438 thispagestyle{empty}
3444 \begin_inset Flex CharStyle:Code
3447 \begin_layout Plain Layout
3450 thispagestyle{plain}
3456 \begin_inset Flex CharStyle:Code
3459 \begin_layout Plain Layout
3462 thispagestyle{fancy}
3468 Simply insert them in the text on the page you want changed and mark them
3470 In fact, title pages are marked as plain by default, while following pages
3471 are marked fancy when using the global fancy setting.
3474 \begin_layout Standard
3475 As a final example, it is possible to include an image in the header or
3477 Suppose you want to put a company logo in the upper lefthand corner.
3478 You might try something like
3481 \begin_layout Standard
3490 includegraphics{logo.eps}}}
3493 \begin_layout Standard
3495 (you may need to preface this with
3496 \begin_inset Flex CharStyle:Code
3499 \begin_layout Plain Layout
3503 usepackage{graphics}
3508 if you don't include graphics elsewhere in your document).
3511 \begin_layout Section
3512 Itemize Bullet Selection
3513 \begin_inset CommandInset label
3522 \begin_layout Standard
3528 \begin_layout Subsection
3532 \begin_layout Standard
3533 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3534 Using this dialog you can easily specify what bullet shape to use at each
3535 level of an itemized list.
3536 These settings are document-wide so you won't be able to specify different
3537 sets of bullets for different paragraphs.
3541 \begin_layout Plain Layout
3542 Well, actually you can but you'll have to do it by hand.
3550 \begin_layout Subsection
3554 \begin_layout Standard
3555 Open the dialog by selecting the
3556 \begin_inset Flex CharStyle:MenuItem
3559 \begin_layout Plain Layout
3560 Document\SpecialChar \menuseparator
3566 menu item and then select the
3567 \begin_inset Flex CharStyle:MenuItem
3570 \begin_layout Plain Layout
3579 \begin_layout Standard
3580 The dialog provides you with a table of bullet shapes.
3581 A column of buttons on the left of the table provides access to the six
3582 different panels of bullet shapes.
3583 The row of buttons across the top is used to select which bullet depth
3585 A text entry under the table shows the currently selected bullet shape's
3586 LaTeX equivalent and this can be edited if desired.
3587 If you do modify the text you will also need to specify any needed packages
3588 in the LaTeX preamble.
3591 \begin_layout Standard
3592 The six panels are divided up by the packages they require.
3593 The following table shows the mappings from button name to LaTeX packages.
3596 \begin_layout Standard
3598 \begin_inset Tabular
3599 <lyxtabular version="3" rows="7" columns="2">
3600 <features tabularvalignment="middle">
3601 <column alignment="center" valignment="top" width="0pt">
3602 <column alignment="center" valignment="top" width="0pt">
3604 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3607 \begin_layout Plain Layout
3622 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3625 \begin_layout Plain Layout
3642 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3645 \begin_layout Plain Layout
3660 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3663 \begin_layout Plain Layout
3679 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3682 \begin_layout Plain Layout
3697 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3700 \begin_layout Plain Layout
3717 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3720 \begin_layout Plain Layout
3735 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3738 \begin_layout Plain Layout
3755 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3758 \begin_layout Plain Layout
3773 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3776 \begin_layout Plain Layout
3793 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3796 \begin_layout Plain Layout
3811 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3814 \begin_layout Plain Layout
3831 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3834 \begin_layout Plain Layout
3849 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3852 \begin_layout Plain Layout
3875 \begin_layout Standard
3876 LyX doesn't stop you using bullets from packages you don't have.
3877 If you get errors from LaTeX when you try to view or print the file, then
3878 it is likely you are missing a package.
3882 \begin_layout Plain Layout
3883 LyX doesn't restrict your use since you may be editing locally and exporting
3892 \begin_layout Subsection
3896 \begin_layout Standard
3897 Select which bullet depth you want to change then select the bullet shape
3899 Any changes will not be visible in LyX, but are visible when viewing the
3903 \begin_layout Standard
3904 You can reset a bullet shape to the default simply by clicking your right
3905 mouse button on the appropriate bullet depth button.
3909 \begin_layout Plain Layout
3914 want to have multiple sets of paragraphs with different sets of bullets
3915 in each, then you're going to have to get your hands dirty with TeX code.
3916 The bullet selection dialog can help though because it provides you with
3917 the LaTeX code for a wide range of bullet shapes.
3918 To make your own custom paragraphs you have the following options:
3921 \begin_layout Plain Layout
3925 \begin_layout Plain Layout
3941 \begin_layout Plain Layout
3945 \begin_layout Plain Layout
3967 \begin_layout Itemize
3968 Use the LaTeX command
3969 \begin_inset Flex CharStyle:Code
3972 \begin_layout Plain Layout
3980 to specify a new bullet shape for a given depth.
3981 You'll also need to save the current bullet shape so you can restore it
3983 In this itemized list the following LaTeX code was used to change the bullet
3984 used for the first depth.
3988 \begin_layout LyX-Code
3998 \begin_layout LyX-Code
4015 \begin_layout Itemize
4016 Note that the itemize depth is specified in Roman numerals as part of the
4026 \begin_layout Itemize
4030 \begin_layout Plain Layout
4043 Specify each individual entry by starting each item with the bullet shape
4044 enclosed in square brackets and set as
4045 \begin_inset Flex CharStyle:MenuItem
4048 \begin_layout Plain Layout
4055 For example, this item was started with
4056 \begin_inset Flex CharStyle:Code
4059 \begin_layout Plain Layout
4074 \begin_layout Plain Layout
4078 \begin_layout Plain Layout
4094 \begin_layout Plain Layout
4095 You'll also need to revert the labelitem back to its previous setting for
4096 the global bullet shape settings to remain in effect.
4097 The way used here was:
4100 \begin_layout LyX-Code
4115 \begin_layout Chapter
4119 \begin_layout Section
4123 \begin_layout Standard
4124 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
4125 and retrieve information about the LyX internal state.
4126 This is only intended for advanced users, but they should find it useful.
4127 It is by writing to the LyX server, for example, that bibliography managers,
4128 such as JabRef, are able to
4129 \begin_inset Quotes eld
4133 \begin_inset Quotes erd
4139 \begin_layout Section
4140 Starting the LyX Server
4143 \begin_layout Standard
4144 The LyX server works through the use of a pair of named pipes.
4145 These are usually located in
4146 \begin_inset Flex CharStyle:Code
4149 \begin_layout Plain Layout
4159 \begin_layout Plain Layout
4164 named pipes are special objects located in
4165 \begin_inset Flex CharStyle:Code
4168 \begin_layout Plain Layout
4186 \begin_inset Quotes eld
4190 \begin_inset Flex CharStyle:Code
4193 \begin_layout Plain Layout
4200 \begin_inset Quotes erd
4204 \begin_inset Quotes eld
4208 \begin_inset Flex CharStyle:Code
4211 \begin_layout Plain Layout
4218 \begin_inset Quotes erd
4222 External programs write into
4223 \begin_inset Flex CharStyle:Code
4226 \begin_layout Plain Layout
4232 and read back data from
4233 \begin_inset Flex CharStyle:Code
4236 \begin_layout Plain Layout
4243 The stem of the pipe names can be defined in the
4244 \begin_inset Flex CharStyle:MenuItem
4247 \begin_layout Plain Layout
4248 Tools\SpecialChar \menuseparator
4255 \begin_inset Flex CharStyle:Code
4258 \begin_layout Plain Layout
4259 "/home/myhome/lyxpipe"
4265 \begin_inset Flex CharStyle:Code
4268 \begin_layout Plain Layout
4287 configure this manually in order for the server to start.
4290 \begin_layout Standard
4292 \begin_inset Flex CharStyle:Code
4295 \begin_layout Plain Layout
4302 \begin_inset Flex CharStyle:Code
4305 \begin_layout Plain Layout
4311 ' to create the pipes.
4312 If one of the pipes already exists, LyX will assume that another LyX process
4313 is already running and will not start the server.
4314 On POSIX (Unix like) systems, if for some other reason, an unused
4315 \begin_inset Quotes eld
4319 \begin_inset Quotes erd
4322 pipe is left in existence when LyX closes, then LyX will try to delete
4324 If this fails for some reason, you will need to delete the pipes manually
4325 and then restart LyX.
4326 On Windows, pipes are deleted by the OS on program termination or crash,
4328 \begin_inset Quotes eld
4332 \begin_inset Quotes erd
4335 pipes should not be possible.
4338 \begin_layout Standard
4339 To have several LyX processes with servers at the same time, you have to
4340 use different configurations, perhaps by using separate user directories,
4342 \begin_inset Flex CharStyle:Code
4345 \begin_layout Plain Layout
4351 file, for each process.
4354 \begin_layout Standard
4355 If you are developing a client program, you might find it useful to enable
4356 debugging information from the LyX server.
4357 Do this by starting LyX as
4358 \begin_inset Flex CharStyle:Code
4361 \begin_layout Plain Layout
4370 \begin_layout Standard
4371 You can find a complete example client written in C in the source distribution
4373 \begin_inset Flex CharStyle:Code
4376 \begin_layout Plain Layout
4377 development/lyxserver/server_monitor.c
4385 \begin_layout Standard
4386 Another useful tool is command-line based client you will find in
4387 \begin_inset Flex CharStyle:Code
4390 \begin_layout Plain Layout
4391 src/client/lyxclient
4399 \begin_layout Section
4400 Normal communication
4403 \begin_layout Standard
4404 To issue a LyX call, the client writes a line of ASCII text into the input
4406 This line has the following format:
4423 \begin_layout Description
4424 clientname is a name that the client can choose arbitrarily.
4425 Its only use is that LyX will echo it if it sends an answer—so a client
4426 can dispatch results from different requesters.
4429 \begin_layout Description
4430 function is the function you want LyX to perform.
4431 It is the same as the commands you'd use in the minibuffer.
4434 \begin_layout Description
4435 argument is an optional argument which is meaningful only to some functions
4437 \begin_inset Quotes eld
4441 \begin_inset Quotes erd
4444 LFUN will insert the argument as text at the cursor position).
4447 \begin_layout Standard
4448 The answer from LyX will arrive in the output pipe and be of the form
4465 \begin_layout Standard
4474 are just echoed from the command request, while
4478 is more or less useful information filled according to how the command
4479 execution worked out.
4480 Some commands, such as
4481 \begin_inset Quotes eld
4485 \begin_inset Quotes erd
4488 , will return information about the internal state of LyX, while other will
4489 return an empty data-response.
4490 This means that the command execution went fine.
4493 \begin_layout Standard
4494 In case of errors, the response from LyX will have this form
4511 \begin_layout Standard
4516 should contain an explanation of why the command failed.
4519 \begin_layout Standard
4523 \begin_layout LyX-Code
4524 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
4525 \begin_inset Newline newline
4528 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
4529 \begin_inset Newline newline
4532 read a <~/.lyxpipe.out
4533 \begin_inset Newline newline
4539 \begin_layout Section
4543 \begin_layout Standard
4544 LyX can notify clients of events going on asynchronously.
4545 Currently it will only do this if the user binds a key sequence with the
4547 \begin_inset Quotes eld
4551 \begin_inset Quotes erd
4555 The format of the string LyX sends is as follows:
4559 \begin_inset Flex CharStyle:Code
4562 \begin_layout Plain Layout
4573 \begin_layout Standard
4578 is the printed representation of the key sequence that was actually typed
4582 \begin_layout Standard
4583 This mechanism can be used to extend LyX's command set and implement macros.
4584 Bind some key sequence to
4585 \begin_inset Quotes eld
4589 \begin_inset Quotes erd
4593 Then start a client that listens on the output pipe, dispatches the command
4594 according to the sequence, and starts a function that may use LyX calls
4595 and LyX requests to issue a command or a series of commands to LyX.
4598 \begin_layout Section
4599 The simple LyX Server Protocol
4602 \begin_layout Standard
4603 LyX implements a simple protocol that can be used for session management.
4604 All messages are of the form
4617 \begin_layout Standard
4623 \begin_inset Quotes eld
4627 \begin_inset Quotes erd
4631 \begin_inset Quotes eld
4635 \begin_inset Quotes erd
4640 \begin_inset Quotes eld
4644 \begin_inset Quotes erd
4647 is received from a client, LyX will report back to inform the client that
4648 it's listening to it's messages, while
4649 \begin_inset Quotes eld
4653 \begin_inset Quotes erd
4656 sent from LyX will inform clients that LyX is closing.
4659 \begin_layout Section
4660 Reverse DVI/PDF search
4663 \begin_layout Standard
4664 Some DVI/PDF viewers
4668 \begin_layout Plain Layout
4669 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
4670 Skim on Mac OSX and SumatraPDF on Windows.
4679 facility (also called
4684 This means that you can tell LyX to put the cursor to a specific line in
4685 the document by clicking at the respective position in the DVI/PDF output.
4686 To achieve this, the viewer must be able to communicate with LyX.
4687 This is done via the LyX server either by using the named pipe (
4691 ), or the UNIX domain socket (
4695 ) that LyX creates in its temporary directory (this is the way the
4696 \begin_inset Flex CharStyle:Code
4699 \begin_layout Plain Layout
4705 program communicates with LyX).
4706 In some cases, you need a helper script that mediates between the viewer
4707 and LyX, in others, the viewer can communicate with LyX directly.
4708 This depends on the selected viewer and on your operating system.
4709 The same applies to the way viewers need to be configured and the way the
4710 reverse search is actually performed.
4711 In what follows, we will thus describe how to setup reverse search for
4713 Before we turn to this, though, we will explain what needs to be done generally
4714 to enable reverse search in the DVI/PDF output.
4717 \begin_layout Subsection
4718 Enabling reverse search
4721 \begin_layout Standard
4722 LaTeX provides several different methods for reverse search.
4723 Some are built-in in the
4724 \begin_inset Flex CharStyle:Code
4727 \begin_layout Plain Layout
4733 program, some are provided by external packages.
4734 Your choice depends on whether your LaTeX distribution already provides
4735 a given method (the built-in methods are rather new) and whether your viewer
4737 The available methods are described in the following.
4740 \begin_layout Subsubsection*
4741 Built-in DVI-search via src-specials (DVI only)
4744 \begin_layout Standard
4745 This method provides the DVI file with the necessary information for reverse
4747 It is available in LaTeX since quite some time (any somewhat recent LaTeX
4748 distribution should include it), and it works reliably.
4749 To enable it, change the
4750 \begin_inset Flex CharStyle:MenuItem
4753 \begin_layout Plain Layout
4758 \begin_layout Plain Layout
4771 \begin_inset Flex CharStyle:MenuItem
4774 \begin_layout Plain Layout
4779 \begin_layout Plain Layout
4786 eX (plain)->DraftDVI
4792 \begin_inset Flex CharStyle:MenuItem
4795 \begin_layout Plain Layout
4796 Preferences\SpecialChar \menuseparator
4797 File Handling\SpecialChar \menuseparator
4804 \begin_inset Flex CharStyle:Code
4807 \begin_layout Plain Layout
4808 latex -src-specials $$i
4814 If this doesn't work, check if your TeX engine needs different options
4815 (the syntax might differ in some distributions).
4818 \begin_layout Subsubsection*
4819 External Packages (PDFSync and scrltx)
4822 \begin_layout Standard
4831 provide reverse search facility for PDF output (via pdflatex) and DVI output,
4833 In order to enable it, load the packages in the LyX preamble:
4836 \begin_layout Itemize
4837 \begin_inset Flex CharStyle:Code
4840 \begin_layout Plain Layout
4848 for reverse PDF search,
4851 \begin_layout Itemize
4853 \begin_inset Flex CharStyle:Code
4856 \begin_layout Plain Layout
4859 usepackage[active]{srcltx}
4864 for reverse DVI search.
4867 \begin_layout Standard
4868 If you want to be able to perform both DVI and PDF reverse searches, you
4869 can also insert in the preamble the following lines
4872 \begin_layout LyX-Code
4876 \begin_inset Newline newline
4882 \begin_inset Newline newline
4888 \begin_inset Newline newline
4894 \begin_inset Newline newline
4899 usepackage[active]{srcltx}
4900 \begin_inset Newline newline
4908 \begin_layout Standard
4909 This way, you can preview the file as either DVI or PDF (pdflatex) and the
4910 right package will be used.
4913 \begin_layout Standard
4914 Note that PDFSync might affect the output layout of your document.
4915 It is therefore advised to disable PDFsync for final documents.
4918 \begin_layout Subsubsection*
4919 Built-in reverse search via SyncTeX (DVI and PDF)
4922 \begin_layout Standard
4924 \begin_inset Flex CharStyle:Code
4927 \begin_layout Plain Layout
4933 have built-in support for both PDF and DVI reverse search.
4938 facility is basically the result of the integration of the PDFSync package
4939 to the pdftex program and its merge with the
4944 You need at least TeXLive 2008 or a recent MikTeX distribution in order
4946 Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
4947 already provide SyncTeX support.
4950 \begin_layout Standard
4951 To enable SyncTeX for DVI output, change the
4952 \begin_inset Flex CharStyle:MenuItem
4955 \begin_layout Plain Layout
4960 \begin_layout Plain Layout
4973 \begin_inset Flex CharStyle:MenuItem
4976 \begin_layout Plain Layout
4981 \begin_layout Plain Layout
4988 eX (plain) -> DraftDVI
4994 \begin_inset Flex CharStyle:MenuItem
4997 \begin_layout Plain Layout
4998 Preferences\SpecialChar \menuseparator
4999 File Handling\SpecialChar \menuseparator
5006 \begin_inset Flex CharStyle:Code
5009 \begin_layout Plain Layout
5010 latex -synctex=1 $$i
5015 , and for PDF output, change the
5016 \begin_inset Flex CharStyle:MenuItem
5019 \begin_layout Plain Layout
5024 \begin_layout Plain Layout
5031 eX (pdflatex) -> PDF (pdflatex)
5037 \begin_inset Flex CharStyle:Code
5040 \begin_layout Plain Layout
5041 pdflatex -synctex=1 $$i
5047 Check the documentation of your viewer whether the viewer needs to be configure
5048 d for the use with SyncTeX.
5052 \begin_layout Plain Layout
5054 \begin_inset Flex CharStyle:Code
5057 \begin_layout Plain Layout
5063 option enables gzip compression.
5064 If your viewer does not support it, you should instead use
5065 \begin_inset Flex CharStyle:Code
5068 \begin_layout Plain Layout
5082 \begin_layout Subsection
5083 Configuring and using specific viewers
5086 \begin_layout Subsubsection*
5087 Xdvi (all platforms)
5090 \begin_layout Standard
5092 \begin_inset Flex CharStyle:Code
5095 \begin_layout Plain Layout
5101 , you don't need to do anything else for performing a reverse DVI search,
5102 as LyX already provides the necessary hooks for automatically using the
5104 \begin_inset Flex CharStyle:Code
5107 \begin_layout Plain Layout
5114 Just setup your document as described above (reverse search is triggered
5115 by Ctrl-click or Alt-click on Mac OSX, respectively).
5118 \begin_layout Standard
5119 However, if for whatever reason you want to use the named pipe instead of
5120 the socket for communicating with LyX, simply change the DVI viewer in
5122 \begin_inset Flex CharStyle:MenuItem
5125 \begin_layout Plain Layout
5126 Preferences\SpecialChar \menuseparator
5127 File Handling\SpecialChar \menuseparator
5137 \begin_layout Plain Layout
5138 On Mac OSX you have to use
5139 \begin_inset Flex CharStyle:Code
5142 \begin_layout Plain Layout
5143 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
5154 \begin_inset Flex CharStyle:Code
5157 \begin_layout Plain Layout
5158 xdvi -editor 'lyxeditor.sh %f %l'
5164 \begin_inset Flex CharStyle:Code
5167 \begin_layout Plain Layout
5173 is a suitable script.
5174 For example, a minimal shell script is the following one:
5177 \begin_layout LyX-Code
5179 \begin_inset Newline newline
5182 LYXPIPE="/path/to/lyxpipe"
5183 \begin_inset Newline newline
5186 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
5187 \begin_inset Newline newline
5190 echo "$COMMAND" > "${LYXPIPE}".in || exit
5191 \begin_inset Newline newline
5194 read < "${LYXPIPE}".out || exit
5197 \begin_layout Standard
5199 \begin_inset Flex CharStyle:Code
5202 \begin_layout Plain Layout
5212 \begin_layout Plain Layout
5219 XServer pipe path specified in
5220 \begin_inset Flex CharStyle:MenuItem
5223 \begin_layout Plain Layout
5224 Preferences\SpecialChar \menuseparator
5234 \begin_layout Plain Layout
5236 \begin_inset Flex CharStyle:Code
5239 \begin_layout Plain Layout
5245 folder of a source distribution you can find a
5246 \begin_inset Flex CharStyle:Code
5249 \begin_layout Plain Layout
5255 script which is able to locate the
5259 based on your preferences.
5267 \begin_layout Subsubsection*
5271 \begin_layout Standard
5273 \begin_inset Flex CharStyle:Code
5276 \begin_layout Plain Layout
5277 /Applications/MacDviX_Folder/calleditor.script
5282 , add the following lines:
5285 \begin_layout LyX-Code
5290 \begin_layout Plain Layout
5297 X.app/Contents/MacOS/lyxeditor "$2" $1
5298 \begin_inset Newline newline
5304 \begin_layout Standard
5305 Modify the lines accordingly if you install LyX somewhere else than in the
5306 Applications folder.
5309 \begin_layout Standard
5310 Reverse search is triggered by Alt-click (OPTION-click).
5313 \begin_layout Subsubsection*
5317 \begin_layout Standard
5319 \begin_inset Flex CharStyle:Code
5322 \begin_layout Plain Layout
5323 open -a Skim.app $$i
5328 to the viewer setting in
5329 \begin_inset Flex CharStyle:MenuItem
5332 \begin_layout Plain Layout
5333 Preferences\SpecialChar \menuseparator
5334 File Handling\SpecialChar \menuseparator
5335 File formats\SpecialChar \menuseparator
5342 \begin_inset Flex CharStyle:MenuItem
5345 \begin_layout Plain Layout
5346 Skim\SpecialChar \menuseparator
5347 Preferences\SpecialChar \menuseparator
5357 \begin_layout Plain Layout
5367 \begin_layout Standard
5368 Reverse search is triggered by COMMAND-SHIFT-click
5371 \begin_layout Subsubsection*
5375 \begin_layout Standard
5377 \begin_inset Flex CharStyle:MenuItem
5380 \begin_layout Plain Layout
5381 Settings\SpecialChar \menuseparator
5382 Configure Okular\SpecialChar \ldots{}
5383 \SpecialChar \menuseparator
5390 \begin_inset Quotes eld
5394 \begin_inset Quotes erd
5398 \begin_inset Flex CharStyle:Code
5401 \begin_layout Plain Layout
5410 \begin_layout Standard
5411 Reverse search is triggered by SHIFT-click.
5414 \begin_layout Subsubsection*
5418 \begin_layout Standard
5419 Launch yap, choose its
5420 \begin_inset Flex CharStyle:MenuItem
5423 \begin_layout Plain Layout
5424 View\SpecialChar \menuseparator
5431 \begin_inset Quotes eld
5435 \begin_inset Quotes erd
5440 \begin_inset Quotes eld
5443 New\SpecialChar \ldots{}
5445 \begin_inset Quotes erd
5448 button and, in the window that opens, enter
5449 \begin_inset Quotes eld
5453 \begin_inset Quotes erd
5456 (or any other name you like) in the
5457 \begin_inset Quotes eld
5461 \begin_inset Quotes erd
5465 Now click on the button labeled
5466 \begin_inset Quotes eld
5469 \SpecialChar \ldots{}
5471 \begin_inset Quotes erd
5474 to open a file dialog and navigate to the directory containing the batch
5476 \begin_inset Flex CharStyle:Code
5479 \begin_layout Plain Layout
5487 \begin_inset Flex CharStyle:Code
5490 \begin_layout Plain Layout
5496 and then specify the program arguments as
5497 \begin_inset Flex CharStyle:Code
5500 \begin_layout Plain Layout
5508 \begin_inset Flex CharStyle:Code
5511 \begin_layout Plain Layout
5517 wrapper is used for communicating with LyX through the
5524 \begin_layout LyX-Code
5526 \begin_inset Newline newline
5529 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
5538 \begin_inset Newline newline
5552 \begin_layout Standard
5553 Make sure that the LyXServer pipe path you specified in LyX is
5554 \begin_inset Flex CharStyle:Code
5557 \begin_layout Plain Layout
5571 , otherwise change the
5572 \begin_inset Flex CharStyle:Code
5575 \begin_layout Plain Layout
5581 wrapper accordingly.
5582 You are advised to select in
5583 \begin_inset Flex CharStyle:MenuItem
5586 \begin_layout Plain Layout
5587 Preferences\SpecialChar \menuseparator
5593 a temporary directory whose name does not contain spaces, otherwise inverse
5597 \begin_layout Standard
5598 In yap, reverse search is triggered by double-click.
5601 \begin_layout Subsubsection*
5602 SumatraPDF (Windows)
5605 \begin_layout Standard
5606 In order to use SumatraPDF for inverse search, enter
5607 \begin_inset Flex CharStyle:Code
5610 \begin_layout Plain Layout
5611 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
5616 in the viewer setting in
5617 \begin_inset Flex CharStyle:MenuItem
5620 \begin_layout Plain Layout
5621 Preferences\SpecialChar \menuseparator
5622 File Handling\SpecialChar \menuseparator
5623 File formats\SpecialChar \menuseparator
5630 \begin_inset Flex CharStyle:Code
5633 \begin_layout Plain Layout
5639 is the previous wrapper.
5640 If SumatraPDF.exe is not in your command PATH, use its full file name.
5641 Again, make sure that the LyX temporary directory name does not contain
5642 spaces, otherwise inverse search will fail.
5645 \begin_layout Standard
5646 Reverse search is triggered by double-click.
5649 \begin_layout Subsubsection*
5653 \begin_layout Standard
5654 First of all, make sure that yap is your default DVI viewer in the Windows
5655 environment, then launch it, choose its
5656 \begin_inset Flex CharStyle:MenuItem
5659 \begin_layout Plain Layout
5660 View\SpecialChar \menuseparator
5667 \begin_inset Quotes eld
5671 \begin_inset Quotes erd
5676 \begin_inset Quotes eld
5679 New\SpecialChar \ldots{}
5681 \begin_inset Quotes erd
5684 button and, in the window that opens, enter
5685 \begin_inset Quotes eld
5689 \begin_inset Quotes erd
5692 (or any other name you like) in the
5693 \begin_inset Quotes eld
5697 \begin_inset Quotes erd
5701 Now click on the button labeled
5702 \begin_inset Quotes eld
5705 \SpecialChar \ldots{}
5707 \begin_inset Quotes erd
5710 to open a file dialog and navigate to the directory containing the
5711 \begin_inset Flex CharStyle:Code
5714 \begin_layout Plain Layout
5722 \begin_inset Flex CharStyle:Code
5725 \begin_layout Plain Layout
5731 and then specify the program arguments as as
5732 \begin_inset Flex CharStyle:Code
5735 \begin_layout Plain Layout
5742 In this way, you will be using the
5746 for communicating with LyX.
5747 If, for whatever reason, you want to use the
5752 \begin_inset Flex CharStyle:Code
5755 \begin_layout Plain Layout
5762 \begin_inset Flex CharStyle:Code
5765 \begin_layout Plain Layout
5772 \begin_inset Flex CharStyle:Code
5775 \begin_layout Plain Layout
5776 -c 'lyxeditor.sh "%f" %l'
5781 as program arguments (here, don't forget the double quotes around
5782 \begin_inset Flex CharStyle:Code
5785 \begin_layout Plain Layout
5791 as they are essential), where
5792 \begin_inset Flex CharStyle:Code
5795 \begin_layout Plain Layout
5801 is the previously introduced shell script (make sure that
5802 \begin_inset Flex CharStyle:Code
5805 \begin_layout Plain Layout
5811 is in the bash command PATH, otherwise use its full posix name).
5814 \begin_layout Standard
5815 In yap, reverse search is triggered by double-click.
5818 \begin_layout Subsubsection*
5822 \begin_layout Standard
5823 In order to use SumatraPDF for inverse search, enter
5824 \begin_inset Flex CharStyle:Code
5827 \begin_layout Plain Layout
5833 in the viewer setting in
5834 \begin_inset Flex CharStyle:MenuItem
5837 \begin_layout Plain Layout
5838 Preferences\SpecialChar \menuseparator
5839 File Handling\SpecialChar \menuseparator
5840 File formats\SpecialChar \menuseparator
5847 \begin_inset Flex CharStyle:Code
5850 \begin_layout Plain Layout
5856 is the following script (to be placed in your command PATH,
5857 \begin_inset Flex CharStyle:Code
5860 \begin_layout Plain Layout
5866 being the best choice):
5869 \begin_layout LyX-Code
5871 \begin_inset Newline newline
5875 \begin_inset Newline newline
5878 SumatraPDF -inverse-search "lyxclient -g %f %l" $(basename $1)
5881 \begin_layout Standard
5882 This is needed because SumatraPDF is a native Windows application and does
5883 not understand the posix paths used by the Cygwin version of LyX.
5884 If SumatraPDF is not in your command PATH, use its full posix path in the
5886 Again, if you want to use the
5895 \begin_inset Flex CharStyle:Code
5898 \begin_layout Plain Layout
5899 "lyxclient -g %f %l"
5905 \begin_inset Flex CharStyle:Code
5908 \begin_layout Plain Layout
5909 "bash -c 'lyxeditor.sh
5921 \begin_layout Standard
5922 Reverse search is triggered by double-click.
5925 \begin_layout Chapter
5926 Special Document Classes
5929 \begin_layout Section
5933 \begin_layout Standard
5939 \begin_layout Subsection
5943 \begin_layout Standard
5944 This section describes how LyX can be used to write articles for submission
5945 to the scientific journal
5947 Astronomy and Astrophysics
5949 (www.edpsciences.fr/aa/
5950 \begin_inset Flex URL
5953 \begin_layout Plain Layout
5955 http://www.edpsciences.fr/aa/
5960 ) using Version 5.01 of the document class
5965 This package can be downloaded from the ftp site
5968 \begin_layout Standard
5969 \begin_inset VSpace medskip
5975 \begin_layout Standard
5977 \begin_inset Flex URL
5980 \begin_layout Plain Layout
5982 ftp://ftp.edpsciences.org/pub/aa/readme.html
5990 \begin_layout Standard
5991 \begin_inset VSpace medskip
5997 \begin_layout Standard
5998 A manual comes together with that package, and this text is not meant to
5999 replace the original manual but merely a short guide how to realize the
6000 correct form of your paper.
6004 \begin_layout Standard
6005 Please note that the publisher of the journal was changed from Springer
6006 to EDP Sciences starting January 1, 2001.
6007 That change implicated also some slight changes of the style files, namely
6008 the removal of the thesaurus command.
6009 The LyX class aa supports the newest version of these style files, V 5.01.
6010 If you have an older version installed, please upgrade.
6011 For compatibility, the old (version 4) layout has been kept as
6016 Please refer to the comments in
6018 LyXDir/layouts/aapaper.layout
6023 \begin_layout Subsection
6027 \begin_layout Standard
6028 It is recommended you start from the example template distributed with LyX.
6029 If you are not using a template, note the following settings:
6032 \begin_layout Itemize
6039 Document\SpecialChar \menuseparator
6042 dialog (OK, that one was obvious).
6045 \begin_layout Itemize
6046 Don't change the option
6049 \begin_inset space ~
6059 The whole layout is done by the macros, you shouldn't change anything.
6062 \begin_layout Subsection
6066 \begin_layout Standard
6067 First thing to enter is the header information.
6068 It consists of seven entries, of which some are optional.
6072 \begin_layout Itemize
6080 \begin_layout Itemize
6088 \begin_layout Itemize
6096 \begin_layout Itemize
6104 \begin_layout Itemize
6109 : [optional] if more than one author: whom to contact for offprint requests.
6112 \begin_layout Itemize
6117 : [optional] mail address for contacts.
6120 \begin_layout Itemize
6128 Received: <date>; Accepted <date>
6131 \begin_layout Standard
6132 There is no need to issue the
6138 command, this is done automatically by LyX when the header is finished.
6139 Although the order of the single header entries doesn't matter it is advised
6140 to keep the above sequence, just to get the best optics and meets the layout
6141 of the real document.
6144 \begin_layout Standard
6145 If you want to place footnotes in the header block, e.
6146 \begin_inset space \thinspace{}
6150 \begin_inset space \space{}
6153 to state your present address, just use the standard footnote via the menu
6156 Insert\SpecialChar \menuseparator
6160 LyX will automagically use the term
6169 \begin_layout Standard
6170 In addition to these topics, the macros use three additional LaTeX commands
6171 that have no counterpart in LyX:
6174 \begin_layout Itemize
6181 to separate different names for more than one author and institute, respectivel
6185 \begin_layout Itemize
6192 to mark corresponding author/institute pairs.
6193 The institutes are numbered sequentially as they appear in the
6197 field, so you have to put a marker to each author.
6200 \begin_layout Itemize
6207 to supply an email address for fast contact.
6210 \begin_layout Standard
6211 In all cases, the appropriate command has to be entered in LyX and marked
6217 \begin_layout Subsection
6221 \begin_layout Standard
6222 The abstract should immediately follow the header block.
6223 With version 5 the abstract environment was changed to a command, and there
6224 is now a resctriction to only one paragraph.
6225 In addition, it should contain an entry with the keywords.
6226 This is not yet implemented for LyX, therefore you have to enter the LaTeX
6233 by hand and mark it as LaTeX code.
6234 Refer to the example paper.
6237 \begin_layout Subsection
6238 Supported environments
6241 \begin_layout Standard
6242 The A&A paper layout supports the following environments for structuring
6246 \begin_layout Itemize
6252 \begin_layout Itemize
6258 \begin_layout Itemize
6264 \begin_layout Itemize
6270 \begin_layout Itemize
6276 \begin_layout Itemize
6282 \begin_layout Itemize
6288 \begin_layout Itemize
6294 \begin_layout Itemize
6300 \begin_layout Itemize
6306 \begin_layout Itemize
6312 \begin_layout Itemize
6318 \begin_layout Subsection
6319 Commands not supported by LyX
6322 \begin_layout Standard
6323 Some commands are not yet supported by the
6328 Some have already been mentioned.
6329 For the sake of completeness, they are listed all together here:
6332 \begin_layout Itemize
6340 \begin_layout Itemize
6348 \begin_layout Itemize
6356 \begin_layout Itemize
6364 \begin_layout Itemize
6372 \begin_layout Itemize
6380 \begin_layout Itemize
6388 \begin_layout Itemize
6396 \begin_layout Standard
6397 If you want to use any of these commands, you have to enter them yourself.
6400 Do not forget to mark them as LaTeX code!
6403 \begin_layout Subsection
6404 Figure and Table Floats
6407 \begin_layout Standard
6408 LyX provides support for the necessary float environments
6410 figure, figure*, table
6416 , therefore we won't tell much about it here.
6420 \begin_inset space ~
6426 Just remember that tables should be left-aligned.
6427 For that, select the table and change the alignment in
6429 Edit\SpecialChar \menuseparator
6431 \begin_inset space ~
6437 \begin_layout Standard
6438 There is only one special thing: the figures with caption besides the figure.
6439 To create such a figure, you have to do the following:
6442 \begin_layout Enumerate
6443 Create a wide figure float:
6445 Insert\SpecialChar \menuseparator
6446 Float\SpecialChar \menuseparator
6449 , then right click in the figure and select
6455 \begin_inset space ~
6463 \begin_layout Enumerate
6464 Enter your caption text.
6467 \begin_layout Enumerate
6472 to move the cursor above the caption.
6475 \begin_layout Enumerate
6479 \begin_layout Enumerate
6480 Position the cursor behind the figure and insert a horizontal fill:
6482 Insert\SpecialChar \menuseparator
6484 \begin_inset space ~
6487 Character\SpecialChar \menuseparator
6489 \begin_inset space ~
6497 \begin_layout Enumerate
6498 Switch to LaTeX mode:
6501 \begin_inset space ~
6509 \begin_layout Enumerate
6519 Do not close the brace!
6522 \begin_layout Enumerate
6523 Position the cursor behind the caption text, switch to LaTeX mode and insert
6527 \begin_inset space ~
6539 \begin_layout Standard
6540 Also, refer to the figures in the example paper.
6543 \begin_layout Subsection
6547 \begin_layout Standard
6548 For submission, the paper has to be formated in a special double-spacing
6550 For this purpose, you have to give the option
6554 to the documentclass.
6555 This must be done using the extra class options field in the
6557 Document\SpecialChar \menuseparator
6561 Just enter the string
6568 \begin_layout Subsection
6572 \begin_layout Standard
6577 directory contains an example paper written with LyX.
6578 It is the example paper from the original macro package, translated to
6580 Use it for inspiration, and compare the original LaTeX code with LyX way
6584 \begin_layout Section
6588 \begin_layout Standard
6594 \begin_layout Subsection
6598 \begin_layout Standard
6599 AASTeX is a set of macros produced by the American Astronomical Society
6600 to facilitate electronic manuscript submission to the three journals they
6601 publish: the Astrophysical Journal (including the Letters and Supplement),
6602 the Astronomical Journal, and the Publications of the Astronomical Society
6604 LyX has proven to be an excellent tool for generating these documents,
6605 especially given its equation, citation, and figure handling capabilities.
6606 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
6607 is the version described here, or higher.
6608 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
6609 incompatible with LyX.
6610 The AASTeX package may be downloaded from the AASTeX Web site
6613 \begin_layout Standard
6614 \begin_inset VSpace medskip
6620 \begin_layout Standard
6622 \begin_inset Flex URL
6625 \begin_layout Plain Layout
6627 http://www.journals.uchicago.edu/AAS/AASTeX
6635 \begin_layout Standard
6636 \begin_inset VSpace medskip
6642 \begin_layout Standard
6643 A complete user guide is contained in that package and you should familiarize
6644 yourself with it thoroughly before embarking on writing a paper in LyX.
6645 LyX will not reduce the need to figure out all the AASTeX commands, it
6646 will only reduce the drudgery of typing everything in.
6647 It is your responsibility to ensure that the final exported LaTeX document
6648 conforms completely to the requirements of the journal to which you are
6649 submitting your paper.
6652 \begin_layout Subsection
6653 Starting a New Paper
6656 \begin_layout Standard
6657 I strongly suggest that you start with the AASTeX template file.
6660 File\SpecialChar \menuseparator
6667 , enter the new file name, then choose the
6672 This will show the most common fields found in a manuscript.
6673 Simply overwrite the existing text (including the brackets,
6677 ) with the correct information.
6678 Many of the AASTeX commands and environments can be implemented directly
6679 in LyX, but some cannot: most noticeably
6691 , which should stick out like a sore thumb if you actually just opened the
6693 For commands such as these, the LaTeX code must be entered directly and
6695 Such commands are referred to as TeX code, or Evil Red Text.
6696 I tried to minimize the amount of TeX code needed in an AASTeX document,
6697 but there is still a bit more required than any of us would like.
6700 \begin_layout Subsection
6701 Finishing Your Paper
6704 \begin_layout Standard
6705 When the paper is finished to your satisfaction and previews/prints correctly,
6707 \begin_inset Quotes eld
6711 \begin_inset Quotes erd
6714 actions which need to be done before you submit it to the journals.
6718 \begin_layout Enumerate
6719 Export your paper as a LaTeX file (
6721 File\SpecialChar \menuseparator
6722 Export\SpecialChar \menuseparator
6729 \begin_layout Enumerate
6734 file with your favorite text editor
6738 \begin_layout Enumerate
6739 remove the comment lines before the
6748 \begin_layout Enumerate
6753 usepackage...{fontenc}
6755 line if it appears (usually just after
6770 \begin_layout Enumerate
6771 remove everything between (and including) the
6783 commands, except for any commands you specifically put into the LaTeX preamble
6784 (which should appear immediately after the
6785 \begin_inset Quotes eld
6788 User specified LaTeX commands
6789 \begin_inset Quotes erd
6800 \begin_layout Enumerate
6801 Run the resulting file through LaTeX to make sure it still processes correctly.
6804 \begin_layout Enumerate
6805 Reread the journal requirements to make sure your filenames and formats
6809 \begin_layout Enumerate
6813 \begin_layout Subsection
6814 Comments On Specific Commands
6817 \begin_layout Standard
6818 I will not describe the detailed usage of the individual AASTeX commands:
6819 the AASTeX User Guide (
6823 ) gives a good description of each.
6824 Thus it's probably easiest for me to go down the list as found in the guide
6825 and offer comments where necessary.
6826 So let's begin \SpecialChar \ldots{}
6830 \begin_layout Subsubsection
6831 Things that work as expected
6834 \begin_layout Standard
6838 \begin_layout Plain Layout
6850 \begin_layout Standard
6851 Because they work as you might expect, I simply list them and the section
6952 begin{thebibliography}
6960 (2.13.2), all the cite commands and their variations (2.13.2), the generic
6961 graphicx figure commands (2.14.1),
6985 (2.15.4, amongst other places),
7012 \begin_layout Standard
7013 The following style options also work correctly:
7034 Simply put them in the
7040 Layout\SpecialChar \menuseparator
7046 \begin_layout Standard
7050 \begin_layout Plain Layout
7062 \begin_layout Subsubsection
7063 Things that work, but require more comment
7066 \begin_layout Standard
7067 The following items work, but require a little more discussion:
7070 \begin_layout Itemize
7071 These items are reserved for use by the journal editors, but you can put
7072 them into the LaTeX preamble if you feel compelled to do so:
7105 \begin_layout Itemize
7106 These items may be placed in the LaTeX preamble, and are included as blanks
7107 in the template file:
7128 \begin_layout Itemize
7135 (2.3) – can only be used
7136 \begin_inset Quotes eld
7140 \begin_inset Quotes erd
7143 , not in the middle of a paragraph.
7144 Use TeX code if you need to embed it.
7147 \begin_layout Itemize
7154 (2.3) – will have extra {} after it.
7155 This should not cause an error.
7158 \begin_layout Itemize
7165 (2.6) – can only be used
7166 \begin_inset Quotes eld
7170 \begin_inset Quotes erd
7173 , not in the middle of a paragraph.
7174 Use TeX code if you need to embed it.
7177 \begin_layout Itemize
7184 (2.8) – can't insert a cross-reference tag, you must type the tag name by
7188 \begin_layout Itemize
7195 (2.8) – same as for
7202 \begin_layout Itemize
7209 (2.9) – will have extra {} after it.
7210 This should not cause an error.
7213 \begin_layout Itemize
7220 (2.11) – will have extra {} after it.
7221 This should not cause an error.
7224 \begin_layout Itemize
7231 (2.14.2) – you can insert an optional filename argument by placing the cursor
7232 at the beginning of the text and selecting
7234 Insert\SpecialChar \menuseparator
7239 \begin_inset Quotes eld
7243 \begin_inset Quotes erd
7246 inserts an optional argument of the type needed by
7253 Hopefully it will be renamed someday.
7256 \begin_layout Itemize
7263 (2.17.1) – same as
7269 for the catalog ID optional parameter
7272 \begin_layout Itemize
7279 (2.17.1) – same as
7285 for the catalog ID optional parameter
7288 \begin_layout Subsubsection
7289 Things not implemented, use TeX code
7292 \begin_layout Standard
7296 \begin_layout Plain Layout
7308 \begin_layout Standard
7331 setcounter{equation}
7333 (2.12), Journal name abbreviations (2.13.4),
7369 (2.15.4, insert it as the first element in the lefthand cell after where
7371 Don't use any of LyX's rules in the table),
7383 (2.15.5), much of Misc (2.17, except
7434 \begin_layout Standard
7438 \begin_layout Plain Layout
7450 \begin_layout Subsubsection
7451 Things that cannot be implemented
7454 \begin_layout Standard
7455 \SpecialChar \ldots{}
7456 at least in any meaningful sort of way, so I suggest ignoring them.
7457 They are the references environment (2.13.3), and the deluxetable environment
7459 If you really, really need to use deluxetable, I suggest editing it in
7460 a separate file with a text editor, then using
7462 Insert\SpecialChar \menuseparator
7464 \begin_inset space ~
7469 to include it in your LyX document.
7474 file to see an example of this.
7477 \begin_layout Subsection
7478 FAQs, Tips, Tricks, and Other Ruminations
7481 \begin_layout Subsubsection
7482 Getting LyX and AASTeX to cooperate
7485 \begin_layout Standard
7486 It can be a bit tricky to get LyX to recognize a new layout and document
7488 When all else fails, do this:
7491 \begin_layout Enumerate
7492 Make certain that LaTeX can find AASTeX.
7493 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
7494 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
7501 \begin_layout Enumerate
7513 \begin_layout Enumerate
7516 Tools\SpecialChar \menuseparator
7519 in LyX, then restart LyX.
7522 \begin_layout Enumerate
7523 Open a regular new file, not from a template.
7524 Does AASTeX appear in the class list in
7526 Document\SpecialChar \menuseparator
7532 \begin_layout Standard
7533 If you get a warning from an existing AASTeX document about not being able
7534 to find the AASTeX layout or a message about
7535 \begin_inset Quotes eld
7538 You should not mix title layouts with normal ones
7539 \begin_inset Quotes erd
7542 , things haven't been installed correctly.
7545 \begin_layout Subsubsection
7546 LaTeX error processing a table
7549 \begin_layout Standard
7550 LyX, by default, attempts to center the table caption/title.
7551 This seems to produce a bad interaction in AASTeX so you should click somewhere
7552 in the caption/title, then select
7554 Edit\SpecialChar \menuseparator
7556 \begin_inset space ~
7570 This took care of it for me.
7573 \begin_layout Subsubsection
7577 \begin_layout Standard
7578 A couple of things: 1) I have noticed some funny spacing in the reference
7579 entries in the text.
7580 When you enter the bibliography item data, make sure their is
7584 space between the last author and the parenthesis setting off the year;
7588 \begin_inset space \thinspace{}
7592 \begin_inset space \space{}
7606 2) Entering the references at all is not obvious.
7607 The easiest thing is to start typing your first reference at the end of
7608 the document, then mark it as type
7613 That will put a small gray box in front of what you just typed.
7614 Click on the box to fill in the rest of the information.
7615 For new references, go to the end of an existing reference and press return.
7616 That will create a new line with its own box, etc.
7619 \begin_layout Subsubsection
7623 \begin_layout Standard
7624 Even though AASTeX provides its own figure commands (
7630 , for example), I much prefer LaTeX's standard figure commands (with the
7639 \begin_inset space ~
7642 commands as TeX code into a Figure Float box if you desire, but I never
7643 have much luck getting the layout right.
7644 With the standard graphics, LyX will insert a
7648 usepackage{graphicx}
7650 command into the LaTeX preamble and handle the figures in the standard
7651 LaTeX2e way, interspersing the figures in the text.
7652 I believe ApJ accepts figures exactly this way now; AJ might still use
7654 \begin_inset Quotes eld
7657 stack everything at the end
7658 \begin_inset Quotes erd
7664 \begin_layout Subsubsection
7665 Things I could have done, but didn't
7668 \begin_layout Standard
7670 \begin_inset Quotes eld
7674 \begin_inset Quotes erd
7677 things I could have implemented, but chose not to.
7678 For instance, I saw no point in double-spacing the text in the LyX window,
7679 even though it is double-spaced in the paper manuscript.
7680 Also, I chose not to make separate layouts for the preprint and preprint2
7682 Since I assume you will spend most of your time in the plain manuscript
7683 mode anyway, I decided not to chew up more disk space with this.
7687 \begin_layout Subsection
7691 \begin_layout Standard
7692 Your mileage may vary.
7693 I've now had papers published by both ApJ and AJ that have had 98% of the
7694 effort done in LyX; the last 2% was the LaTeX post-processing and a few
7696 I have had no trouble with the submission process, and I'm sure the journals
7697 were never aware that there might be a difference.
7698 So, go forth and publish!
7701 \begin_layout Section
7705 \begin_layout Standard
7708 David Johnson; updated by Richard Heck
7711 \begin_layout Standard
7712 \begin_inset VSpace bigskip
7718 \begin_layout Standard
7720 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
7721 papers to be submitted to American Mathematical Society publications.
7722 The layouts are not tailored to a specific journal, but easily can be.
7723 You should refer to the AMS documentation for specific instructions for
7724 each journal (usually it will entail only changing a single line in the
7726 That documentation is available on the Web at
7727 \begin_inset Flex URL
7730 \begin_layout Plain Layout
7738 \begin_inset Flex URL
7741 \begin_layout Plain Layout
7743 ftp://ftp.ams.org/pub/tex/amslatex/
7749 These layouts are appropriate, and useful, for any mathematical writing.
7753 \begin_layout Standard
7754 There are two basic AMS LaTeX layouts:
7757 \begin_layout Itemize
7758 amsart: The standard AMS article format.
7761 \begin_layout Itemize
7762 amsbook: the standard AMS book (really, monograph) format.
7766 \begin_layout Standard
7767 The layouts themselves contain only the minimum necessary to use the AMS
7769 They do not, in particular, contain any of the `theorem' environments used
7770 for setting theorems, lemmas, and the like.
7771 These are contained, instead, in the
7772 \begin_inset Flex CharStyle:Code
7775 \begin_layout Plain Layout
7781 module, which is loaded by default when when you select one of the AMS
7783 (It can also be used with other classes and can be removed, if you would
7784 rather use something else.) Less commonly used environments are in the
7785 \begin_inset Flex CharStyle:Code
7788 \begin_layout Plain Layout
7789 Theorems (AMS-Extended)
7794 module, which must be loaded manually.
7797 \begin_layout Standard
7798 By default, theorems and the like are numbered consecutively throughout
7799 the document, but this may be modified by loading the module
7800 \begin_inset Flex CharStyle:Code
7803 \begin_layout Plain Layout
7804 Theorems (Order by Section)
7809 or, if you are using
7810 \begin_inset Flex CharStyle:Code
7813 \begin_layout Plain Layout
7820 \begin_inset Flex CharStyle:Code
7823 \begin_layout Plain Layout
7824 Theorems (Order by Chapter)
7830 These will number the results as
7831 \begin_inset Formula $n.m$
7834 , where the first number refers to the section (or chapter) and the second
7835 refers to the total number of results so far in that section (or chapter).
7836 Many environments are also available unnumbered.
7837 These are indicated by an asterisk at the end.
7838 If you happen to want
7842 unnumbered results, the the module
7843 \begin_inset Flex CharStyle:Code
7846 \begin_layout Plain Layout
7852 provides that option.
7855 \begin_layout Standard
7856 Note that these modules do not
7860 to be used with the AMS classes.
7861 It is perfectly possible to use the
7862 \begin_inset Flex CharStyle:Code
7865 \begin_layout Plain Layout
7871 module, and the others mentioned, with other classes, such as
7872 \begin_inset Flex CharStyle:Code
7875 \begin_layout Plain Layout
7882 \begin_inset Flex CharStyle:Code
7885 \begin_layout Plain Layout
7892 \begin_inset Flex CharStyle:Code
7895 \begin_layout Plain Layout
7904 \begin_layout Subsection
7905 What these layouts provide
7908 \begin_layout Standard
7909 There is a long list of included environments provided by these layouts.
7910 In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
7911 variety of `theorem' environments.
7912 However, the AMS recommends the environments that are available in LyX.
7916 \begin_layout Standard
7917 The following environments—as well as the standard environments, such as
7919 \begin_inset Flex CharStyle:Noun
7922 \begin_layout Plain Layout
7929 \begin_inset Flex CharStyle:Noun
7932 \begin_layout Plain Layout
7939 \begin_inset Flex CharStyle:Noun
7942 \begin_layout Plain Layout
7949 \begin_inset Flex CharStyle:Noun
7952 \begin_layout Plain Layout
7959 \begin_inset Flex CharStyle:Noun
7962 \begin_layout Plain Layout
7969 \begin_inset Flex CharStyle:Code
7972 \begin_layout Plain Layout
7979 \begin_inset Flex CharStyle:Code
7982 \begin_layout Plain Layout
7991 \begin_layout Description
7992 Address This should be the author's permanent address.
7995 \begin_layout Description
7997 \begin_inset space ~
8000 Address This should be the author's temporary address at the time of submission,
8001 if different from the Address.
8004 \begin_layout Description
8005 Email Author's e-mail address
8008 \begin_layout Description
8009 URL Author's Web address, if desired.
8012 \begin_layout Description
8013 Keywords Key words or phrases used to identify specific topics discussed
8017 \begin_layout Description
8018 Subjectclass These refer to the AMS Subject Classifications, published and
8021 Mathematical Reviews
8024 These are also available online at the AMS cites listed above.
8027 \begin_layout Description
8031 \begin_layout Description
8035 \begin_layout Description
8039 \begin_layout Standard
8040 The following environments are provided by both the
8041 \begin_inset Flex CharStyle:Code
8044 \begin_layout Plain Layout
8051 \begin_inset Flex CharStyle:Code
8054 \begin_layout Plain Layout
8060 modules, in the latter case in both starred (unnumbered) and unstarred
8061 (numbered) versions.
8062 These same environments are provided only in the starred versions by the
8064 \begin_inset Flex CharStyle:Code
8067 \begin_layout Plain Layout
8076 \begin_layout Theorem
8077 This is typically used for the statements of major results.
8081 \begin_layout Corollary*
8082 This is used for statements which follow fairly directly from previous statement
8084 Again, these can be major results.
8089 These are smaller results needed to prove other statements.
8092 \begin_layout Proposition
8093 These are less major results which (hopefully) add to the general theory
8097 \begin_layout Conjecture
8098 These are statements provided without justification, which the author does
8099 not know how to prove, but which seem to be true (to the author, at least).
8102 \begin_layout Definition*
8103 Guess what this is for.
8104 The font is different for this environment than for the previous ones.
8108 \begin_layout Example*
8109 Used for examples illustrating proven results.
8112 \begin_layout Problem
8113 It's not really known what this is for.
8114 You should figure it out.
8117 \begin_layout Exercise*
8118 Write a description for this one.
8121 \begin_layout Remark
8122 This environment is also a type of theorem, usually a lesser sort of observation.
8125 \begin_layout Claim*
8126 Often used in the course of giving a proof of a larger result.
8130 Generally, these are used to break up long arguments, using specific instances
8136 The numbering scheme for cases is on its own, not together with other numbered
8142 At the end of this environment, a QED symbol (usually a square, but it can
8143 vary with different styles) is placed.
8144 If you want to have other environments within this one—for example, Case
8145 environments—and have the QED symbol appear only after them, then the other
8146 environments need to be nested within the proof environment.
8149 Nesting Environments
8155 for information on nesting.
8158 \begin_layout Standard
8159 And these environments are provided by
8160 \begin_inset Flex CharStyle:Code
8163 \begin_layout Plain Layout
8164 Theorems (AMS-Extended)
8172 \begin_layout Criterion*
8173 A required condition.
8176 \begin_layout Algorithm*
8177 A general procedure to be used.
8180 \begin_layout Axiom*
8181 This is a property or statement taken as true within the system being discussed.
8184 \begin_layout Condition*
8185 Sometimes used to state a condition assumed within the present context of
8190 Similar to a Remark.
8193 \begin_layout Notation*
8194 Used for the explanation of, yes, notation.
8197 \begin_layout Summary
8198 Do we really need to tell you?
8201 \begin_layout Acknowledgement*
8205 \begin_layout Conclusion*
8206 Sometimes used at the end of a long train of argument.
8210 Used in a way similar to Proposition, though perhaps lower on the scale.
8213 \begin_layout Standard
8214 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
8216 They need to be available on your system in order to use these environments.
8219 \begin_layout Section
8227 \begin_layout Standard
8233 \begin_layout Subsection
8237 \begin_layout Standard
8238 These are the layout files for some of the journals of the American Geophysical
8240 It is assumed that you have both the AGU's own class files and AGUplus
8241 installed (everything to be found at
8242 \begin_inset Flex URL
8245 \begin_layout Plain Layout
8247 ftp://ftp.agu.org/journals/latex/journals
8255 \begin_layout Subsection
8259 \begin_layout Standard
8269 They are still called this in the LyX GUI, though their LaTeX equivalents
8270 in the AGU classes are
8281 \begin_layout Standard
8282 Newly defined styles are
8319 These are mostly manuscript attributes and defined in the AGU class documentati
8323 \begin_layout Standard
8324 I suspect this is still badly incomplete.
8327 \begin_layout Subsection
8331 \begin_layout Standard
8348 \begin_layout Subsection
8352 \begin_layout Itemize
8355 Journal of Geophysical Research
8364 \begin_layout Standard
8365 Add your own, it isn't so hard! Look at the
8376 \begin_layout Subsection
8377 Bugs and things to remember
8380 \begin_layout Standard
8381 In order to use the new layouts, you must remember to do the following for
8385 \begin_layout Enumerate
8391 This can be done in the
8393 Layout\SpecialChar \menuseparator
8398 Document\SpecialChar \menuseparator
8402 (AGU articles are always in English, right? So
8409 \begin_layout Enumerate
8419 (Yes, this is a bug.)
8422 \begin_layout Enumerate
8423 Make sure you use the
8427 bibliography style, by entering
8431 into the second field of the BibTeX inset.
8432 None of the standard styles will do.
8435 \begin_layout Section
8439 \begin_layout Standard
8445 \begin_layout Subsection
8449 \begin_layout Standard
8450 Broadway is for writing plays.
8451 The format is more decorative than Hollywood, and much less standardized.
8452 This format should be suitable for workshops.
8455 \begin_layout Subsection
8459 \begin_layout Standard
8460 The same as in Hollywood.
8463 \begin_layout Subsection
8467 \begin_layout Standard
8472 names as labels then cross-reference the label to insert the name.
8473 The cross-reference dialog will show the current cast of characters.
8476 \begin_layout Subsection
8477 Paper size and Margins
8480 \begin_layout Standard
8481 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
8484 \begin_layout Subsection
8488 \begin_layout Standard
8489 The following environments are available.
8490 You can use broadway.bind to get the bind keys shown at the right.
8493 \begin_layout Itemize
8497 \begin_inset Newline newline
8502 You should not have to use this, but it is here for anything that does not
8506 \begin_layout Itemize
8510 \begin_inset space \hfill{}
8514 \begin_inset Newline newline
8519 Used to describe stage setting and the action.
8520 First use of speaker names in all CAPs.
8523 \begin_layout Itemize
8527 \begin_inset space \hfill{}
8531 \begin_inset Newline newline
8536 Automatically numbered.
8537 On screen it will be arabic, but will print as Roman.
8540 \begin_layout Itemize
8544 \begin_inset space \hfill{}
8548 \begin_inset Newline newline
8558 It is just centered text.
8561 \begin_layout Itemize
8565 \begin_inset space \hfill{}
8569 \begin_inset Newline newline
8574 Not automatically numbered.
8575 You supply the number.
8576 This is because I couldn't figure out how.
8579 \begin_layout Itemize
8583 \begin_inset space \hfill{}
8587 \begin_inset Newline newline
8592 A special case of Narrative to describe the setting and action as the curtain
8596 \begin_layout Itemize
8600 \begin_inset space \hfill{}
8604 \begin_inset Newline newline
8609 The speaker's (actor's) title, centered in all CAPS.
8612 \begin_layout Itemize
8616 \begin_inset space \hfill{}
8620 \begin_inset Newline newline
8625 Instructions to the speaker.
8626 The parentheses are automatically inserted.
8627 The ( will appear on screen, but both will be in the printed play.
8628 This environment is only used within
8635 \begin_layout Itemize
8639 \begin_inset space \hfill{}
8643 \begin_inset Newline newline
8648 What the Speaker says.
8651 \begin_layout Itemize
8655 \begin_inset space \hfill{}
8659 \begin_inset Newline newline
8664 The curtain comes down.
8667 \begin_layout Itemize
8671 \begin_inset space \hfill{}
8677 \begin_layout Itemize
8681 \begin_inset space \hfill{}
8687 \begin_layout Itemize
8691 \begin_inset space \hfill{}
8697 \begin_layout Standard
8701 \begin_layout Section
8705 \begin_layout Standard
8710 can be used to type letters according to German conventions.
8711 A template file is included in
8713 .../lyx/share/templates
8715 for you to use as a starting point.
8718 \begin_layout Section
8726 \begin_layout Standard
8732 \begin_layout Subsection
8736 \begin_layout Standard
8737 This is the layout file for the European Geophysical Society journals.
8742 can be downloaded from the web site of the EGS under
8743 \begin_inset Flex URL
8746 \begin_layout Plain Layout
8756 \begin_layout Subsection
8760 \begin_layout Standard
8763 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
8771 The current layout file is unfortunately very unmodular and would benefit
8772 from using the various
8779 \begin_layout Section
8783 \begin_layout Standard
8789 \begin_layout Standard
8790 Elsevier Science Publishers B.V.
8791 provides a standard LaTeX document class (
8795 ) for submitting articles to their various journals.
8796 The style file can be downloaded directly from their web site:
8797 \begin_inset Flex URL
8800 \begin_layout Plain Layout
8802 http://authors.elsevier.com/
8808 Instructions are supplied along with the class file, which details the
8809 requirements of the publishers.
8810 LyX includes package that allows for the use of this class, by a layout
8811 and a template file.
8812 Installation of the class file is the same as for any other LaTeX package;
8813 instructions are provided in the Elsevier documentation.
8816 \begin_layout Standard
8826 As the Elsevier class file is based mainly on the standard article class,
8827 most of the normal functionality is provided.
8828 The Elsevier class defines a number of mathematical environments, which
8829 are similar to the AMS environments.
8830 These commands are all described in the Elsevier documentation, and are
8834 \begin_layout Standard
8835 The easiest way to use the Elsevier style is to base documents on the included
8837 It is best not to use options such as fancy headings or the geometry package,
8838 as elements such as these are defined by Elsevier in their style file.
8839 Ideally, no extra packages except those mentioned in the Elsevier documentation
8841 Essentially, Elsevier require as
8842 \begin_inset Quotes eld
8846 \begin_inset Quotes erd
8849 a LaTeX file as possible, as their intention is to take the supplied file
8850 and replace the class file with one for the particular journal to which
8851 the paper has been submitted.
8852 This also means that not too much time should be spent on the formating
8854 When it comes to be published, this will change anyway.
8855 The rest of the usage for this layout is substantially the same as for
8856 the normal article class.
8857 For details of what Elsevier do and don't allow, refer to their documentation.
8860 \begin_layout Section
8866 \begin_inset CommandInset label
8875 \begin_layout Standard
8881 \begin_layout Subsection
8885 \begin_layout Standard
8886 This section describes how to use LyX to make slides for overhead projectors.
8887 There are two document classes that can do this: the default slides class
8893 This section documents the latter.
8896 \begin_layout Standard
8897 I'm going to say this again, nice and clear, so that there's no misunderstanding
8901 \begin_layout Standard
8902 \begin_inset VSpace bigskip
8908 \begin_layout Standard
8912 This section documents the class
8913 \begin_inset Quotes eld
8921 \begin_inset Quotes erd
8929 \begin_layout Standard
8930 \begin_inset VSpace bigskip
8936 \begin_layout Standard
8937 If you're looking for the documentation for
8938 \begin_inset Quotes eld
8946 \begin_inset Quotes erd
8950 \begin_inset space ~
8954 \begin_inset CommandInset ref
8956 reference "sec:slitex"
8961 If your machine doesn't have the
8966 \begin_inset Quotes eld
8974 \begin_inset Quotes erd
8977 ] installed, you'll probably have to use the default
8981 class, which isn't quite as good as
8986 \begin_layout Standard
8991 class is designed for use with version 2.1 of the
8995 LaTeX class file which is now an integral part of LaTeX2e.
8998 \begin_layout Subsection
9002 \begin_layout Standard
9003 Obviously, to use this document class, you need to select
9004 \begin_inset Quotes eld
9012 \begin_inset Quotes erd
9022 \begin_inset space ~
9028 There are some settings in the
9031 \begin_inset space ~
9036 dialog that you should know about that are specific to this class:
9039 \begin_layout Itemize
9040 Don't change the options
9051 \begin_inset space ~
9057 They're ignored by the
9064 \begin_layout Itemize
9065 The default font size is 20
9066 \begin_inset space \thinspace{}
9069 pt with the other options being 17
9070 \begin_inset space \thinspace{}
9074 \begin_inset space \thinspace{}
9078 \begin_inset space \thinspace{}
9084 \begin_layout Itemize
9093 but all math equations are still typeset in the usual roman font.
9096 \begin_layout Itemize
9101 supports A4 and Letter paper sizes as well as a special size for working
9103 \begin_inset space \thinspace{}
9107 It doesn't support A5, B5, legal or executive paper sizes.
9110 \begin_layout Itemize
9111 Don't bother changing the
9115 settings because they are ignored anyway.
9116 All floats appear where they are defined in the text.
9119 \begin_layout Itemize
9124 setting behaves a bit differently for this class.
9129 provides extensive footer and header capabilities including a user-defined
9132 \begin_inset space ~
9136 \begin_inset CommandInset ref
9138 reference "sec:foilfoot"
9143 The title page is treated differently to all other pages in the document
9152 has the logo centered at the bottom of the page (if one is defined).
9153 The possible page style choices and what they do are as follows:
9157 \begin_layout Labeling
9158 \labelwidthstring MMMMMMM
9165 The final output contains no page numbers, or other headers or footers
9166 (except footnotes of course).
9170 \begin_layout Labeling
9171 \labelwidthstring MMMMMMM
9178 The final output contains page numbers centered at the bottom of the page.
9179 No other headings or footers (other than footnotes).
9182 \begin_layout Labeling
9183 \labelwidthstring MMMMMMM
9188 Page numbers in lower right corner.
9189 Additional headers and footers are also shown.
9190 This is also the default.
9193 \begin_layout Labeling
9194 \labelwidthstring MMMMMMM
9199 Gives you access to the
9203 package although its use with
9207 is discouraged by the writer of the
9211 package because of some potential page layout clashes.
9215 \begin_layout Subsubsection
9219 \begin_layout Standard
9220 The following options may be used in the extra class options in the
9222 Document\SpecialChar \menuseparator
9228 \begin_layout Labeling
9229 \labelwidthstring MMMMMMx
9234 This sets up the page layout for 7.33
9235 \begin_inset space \thinspace{}
9239 \begin_inset space \thinspace{}
9242 in paper, which is about the same aspect ratio as a 35
9243 \begin_inset space \thinspace{}
9246 mm slide, making it a bit easier to work with this medium.
9249 \begin_layout Labeling
9250 \labelwidthstring MMMMMMx
9255 Places a rule across the page below the header on every page except the
9259 \begin_layout Labeling
9260 \labelwidthstring MMMMMMx
9265 Places a rule across the page above the footer on every page except the
9269 \begin_layout Labeling
9270 \labelwidthstring MMMMMMx
9275 This is automatically set each time you create a new
9284 to use the dvips driver to rotate those pages that are set as landscape
9288 \begin_layout Labeling
9289 \labelwidthstring MMMMMMx
9294 Simply changes the page dimensions to those of a landscape page but doesn't
9296 Thus if you use this option you need to use an external program to rotate
9297 each page or feed your paper through your printer as landscape.
9298 Note that this option effectively reverses the roles of the
9306 environments (don't worry these are described in the next section).
9309 \begin_layout Labeling
9310 \labelwidthstring MMMMMMx
9315 Equation numbers on the left.
9318 \begin_layout Labeling
9319 \labelwidthstring MMMMMMx
9324 Flush-left equations.
9327 \begin_layout Subsection
9328 Supported Environments
9331 \begin_layout Standard
9332 Most of the environments commonly supported in other classes are also supported
9338 There are several additional environments provided by
9342 as well as a couple added by LyX.
9343 The following environments are shared with other classes:
9346 \begin_layout Standard
9350 \begin_layout Plain Layout
9362 \begin_layout Itemize
9368 \begin_layout Itemize
9374 \begin_layout Itemize
9380 \begin_layout Itemize
9386 \begin_layout Itemize
9392 \begin_layout Itemize
9398 \begin_layout Itemize
9404 \begin_layout Itemize
9410 \begin_layout Itemize
9416 \begin_layout Itemize
9422 \begin_layout Itemize
9428 \begin_layout Itemize
9434 \begin_layout Itemize
9440 \begin_layout Itemize
9446 \begin_layout Itemize
9452 \begin_layout Itemize
9458 \begin_layout Itemize
9464 \begin_layout Itemize
9470 \begin_layout Standard
9474 \begin_layout Plain Layout
9486 \begin_layout Standard
9487 That is, all the major environments apart from the sectioning environments.
9488 Since foils are essentially self-contained sections, with a title and body,
9493 provides specific commands for starting new foils and these are:
9496 \begin_layout Itemize
9502 \begin_layout Itemize
9508 \begin_layout Standard
9509 LyX also provides slightly modified versions of these two environments called:
9512 \begin_layout Itemize
9518 \begin_layout Itemize
9524 \begin_layout Standard
9525 and the differences will be explained in the next section.
9528 \begin_layout Standard
9529 Since foils are often used in presenting ideas or new theorems and such
9534 also provides a comprehensive box of goodies for presenting them:
9537 \begin_layout Standard
9541 \begin_layout Plain Layout
9553 \begin_layout Itemize
9559 \begin_layout Itemize
9565 \begin_layout Itemize
9571 \begin_layout Itemize
9577 \begin_layout Itemize
9583 \begin_layout Itemize
9589 \begin_layout Itemize
9595 \begin_layout Itemize
9601 \begin_layout Itemize
9607 \begin_layout Itemize
9613 \begin_layout Itemize
9619 \begin_layout Standard
9623 \begin_layout Plain Layout
9635 \begin_layout Standard
9636 The starred versions are unnumbered while the unstarred versions are numbered.
9637 There are also two list environments added by LyX and these are:
9640 \begin_layout Itemize
9646 \begin_layout Itemize
9652 \begin_layout Standard
9657 provides some powerful header and footer capabilities that are best set
9658 in the preamble although they may be set at any point in a document.
9659 If you want to change these settings in your document the best place to
9660 do so is at the very top of a foil, i.
9661 \begin_inset space \thinspace{}
9667 \begin_inset space \space{}
9672 straight after the foilhead.
9675 \begin_layout Standard
9676 For this purpose, the following command styles are provided [
9683 \begin_layout Standard
9687 \begin_layout Plain Layout
9699 \begin_layout Itemize
9703 \begin_inset space ~
9709 \begin_layout Itemize
9715 \begin_layout Itemize
9719 \begin_inset space ~
9725 \begin_layout Itemize
9729 \begin_inset space ~
9735 \begin_layout Itemize
9739 \begin_inset space ~
9746 \begin_layout Standard
9747 \begin_inset space ~
9754 \begin_layout Standard
9758 \begin_layout Plain Layout
9770 \begin_layout Standard
9771 There are also a few commands provided by
9775 that aren't directly supported by LyX but I'll tell you what they do and
9776 how to use them in section
9777 \begin_inset space ~
9781 \begin_inset CommandInset ref
9783 reference "sec:unsuppfoils"
9790 \begin_layout Subsection
9791 Building a Set of Foils
9794 \begin_layout Standard
9795 This section will give a simple introduction to using the different environments
9796 to build a set of foils.
9797 If you want to see an example set of foils, take a look at the
9801 file you find in LyX's
9808 \begin_layout Subsubsection
9809 Give It a Title Page
9812 \begin_layout Standard
9813 Unlike other classes that provide
9833 creates the title on a page of its own.
9834 If you leave out the
9838 environment LaTeX will substitute the current date (every time you regenerate
9842 \begin_layout Subsubsection
9846 \begin_layout Standard
9847 As I mentioned earlier, there are four ways of starting a new foil.
9848 For portrait foils you should use
9857 The difference between these two environments is the amount of space between
9858 the title of the foil (the foilhead) and the body of the foil.
9861 \begin_layout Standard
9862 Landscape foils are generated using the
9871 Again the only difference is the spacing between foilhead and body.
9872 Both of the short versions have 0.5 inches less separation between the foilhead
9877 \begin_layout Standard
9878 One problem with the support for landscape foils is the requirement that
9883 driver to generate the PostScript output otherwise the foils won't be rotated.
9884 It is possible to get landscape foils even if you haven't got the
9888 driver provided you can feed your foils sideways through your printer ;-)
9891 \begin_layout Subsubsection
9892 Theorems, Lemmas, Proofs and more
9895 \begin_layout Standard
9896 Due to a small bug in LyX you can't have two of the same type of these environme
9897 nts directly following each other.
9898 They must be separated by something.
9899 If you try, you will just be extending the previous environment as if you
9900 had merged the two environments together.
9901 So, how do you get around this problem? The simplest option is to insert
9902 some text between the two environments or add a
9906 environment between the two with just a
9907 \begin_inset Quotes eld
9915 \begin_inset Quotes erd
9919 This will force LyX to produce two separate environments and hence the
9920 correct LaTeX output.
9921 An example is provided in the example file included with the LyX distribution.
9922 Remember, this problem only occurs if you are trying to place two of the
9923 same type of theorem-like environments one directly after the other.
9926 \begin_layout Subsubsection
9930 \begin_layout Standard
9931 You get all the commonly supported list styles found in other classes as
9932 well as two new ones.
9933 I'll only describe the new ones here.
9934 If you want to find out more about the other list environments check out
9940 If you intend to use itemized lists you might also want to read about the
9944 \begin_inset space ~
9948 \begin_inset space ~
9953 dialog described above in section
9954 \begin_inset space ~
9958 \begin_inset CommandInset ref
9960 reference "sec:bullet"
9967 \begin_layout Standard
9968 The two new list styles,
9976 , are designed to make it easier for you to create lists of do's and don'ts
9977 or right and wrong by providing dedicated environments that use a tick
9978 or a cross as the label of the list.
9979 These lists are in fact dedicated variants of the
9984 They do however require that you have the
9991 \begin_layout Subsubsection
9995 \begin_layout Standard
10000 redefines the floating tables and figures so that they appear exactly where
10001 they are in the text rather than pushing them to the top of the page or
10002 to some user specified location.
10003 In fact if you change the float placement settings they are simply ignored.
10006 \begin_layout Subsubsection
10007 Page Headers and Footers
10008 \begin_inset CommandInset label
10010 name "sec:foilfoot"
10017 \begin_layout Standard
10021 \begin_inset space ~
10030 are two commands used to control the left-footer text string.
10031 The first is meant to allow you to include a graphic logo on your foils
10033 \begin_inset Quotes eld
10041 \begin_inset Quotes erd
10045 While the second is meant to provide a classification for the audience,
10049 \begin_inset space \thinspace{}
10055 \begin_inset space \space{}
10059 It is empty by default.
10062 \begin_layout Standard
10063 The remaining page corners can be filled by
10066 \begin_inset space ~
10071 (which defaults to page numbers),
10074 \begin_inset space ~
10082 \begin_inset space ~
10090 \begin_layout Subsection
10096 \begin_inset CommandInset label
10098 name "sec:unsuppfoils"
10105 \begin_layout Standard
10106 All the commands mentioned below need to be set in a
10114 within another environment.
10117 \begin_layout Subsubsection
10121 \begin_layout Standard
10122 All lengths are adjusted using the
10145 should be replaced by the name given to the length you want to change and
10150 is the length value.
10151 All lengths should be specified in units of length such as inches (
10163 ) or relative to some document or font-based length such as
10173 \begin_layout Standard
10174 It's possible to change the spacing between a foilhead and the body of the
10175 foil by adjusting the length specified by
10182 For example, to make
10187 \begin_inset space \space{}
10190 in closer to their bodies put the following in the preamble:
10196 foilheadskip}{-0.5in}
10199 \begin_layout Standard
10200 The spacings around floats can be adjusted by setting these lengths:
10203 \begin_layout Labeling
10204 \labelwidthstring MMMMMMMMMMM
10211 Separation between the text and the top of the float
10214 \begin_layout Labeling
10215 \labelwidthstring MMMMMMMMMMM
10222 Separation between the float and the caption
10225 \begin_layout Labeling
10226 \labelwidthstring MMMMMMMMMMM
10233 Separation between the caption and the following text
10236 \begin_layout Labeling
10237 \labelwidthstring MMMMMMMMMMM
10244 You can make the captions narrower than the surrounding text by adjusting
10246 Best done relative to
10255 \begin_layout Standard
10256 There are also several title page related lengths that you may find useful
10257 if you have a long title or several authors:
10260 \begin_layout Labeling
10261 \labelwidthstring MMMMMMMMMMM
10268 Separation from headers to
10273 \begin_layout Labeling
10274 \labelwidthstring MMMMMMMMMMM
10292 \begin_layout Labeling
10293 \labelwidthstring MMMMMMMMMMM
10307 \begin_layout Labeling
10308 \labelwidthstring MMMMMMMMMMM
10324 \begin_layout Labeling
10325 \labelwidthstring MMMMMMMMMMM
10341 \begin_layout Standard
10342 The last length related command affects all the list environments.
10353 a list environment then all the vertical spacing between the list items
10355 Note that this is a command not a length so it doesn't require
10361 like the stuff mentioned above.
10364 \begin_layout Subsubsection
10365 Headers and Footers
10368 \begin_layout Standard
10381 commands control whether the logo in the
10385 definition appear on a given page.
10392 in the preamble then none of the foils will have the logo on them.
10393 If you don't want the logo on a particular page place the
10399 directly after the foilhead of that page and the
10405 directly after the next foilhead.
10408 \begin_layout Standard
10409 If you decide to use the
10413 page style setting in the
10416 \begin_inset space ~
10421 dialog you should probably add
10431 to your preamble so headers and footers on landscape pages are correctly
10432 placed when rotated.
10433 This is due to some clashes between the page layouts provided by the
10444 \begin_layout Section
10445 Hollywood (Hollywood spec scripts)
10448 \begin_layout Standard
10454 \begin_layout Subsection
10458 \begin_layout Standard
10459 Getting the format of a Hollywood script right is a
10460 \begin_inset Quotes eld
10464 \begin_inset Quotes erd
10467 It is designed to make the readers focus on content and to be easy and
10468 familiar for the actors to read.
10469 Each page of a script should be one minute of film.
10470 Nothing goes in a script that you cannot see or hear on screen.
10471 The courier 12 pt font should be used throughout.
10475 \begin_layout Subsection
10479 \begin_layout Standard
10480 Speakers' lines should NEVER break in mid-sentence.
10481 If a speaker's lines continue over a page break, repeat the
10485 title followed by (Cont'd).
10488 \begin_layout Subsection
10492 \begin_layout Standard
10497 names as labels then cross-reference the label to insert the name.
10498 The cross-reference dialog will show the current cast of characters.
10499 You can use this to insert the speaker name in narratives also.
10502 \begin_layout Subsection
10503 Paper size and Margins
10506 \begin_layout Standard
10507 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
10510 \begin_layout Subsection
10514 \begin_layout Standard
10515 The following environments are available.
10516 You can use hollywood.bind to get the bind keys shown at the right.
10519 \begin_layout Itemize
10523 \begin_inset Newline newline
10528 Used where nothing else works.
10532 \begin_layout Itemize
10538 \begin_inset space \hfill{}
10546 \begin_inset Newline newline
10549 Usually followed by something like
10550 \begin_inset Quotes eld
10553 on Sally waking up.
10554 \begin_inset Quotes erd
10560 \begin_layout Itemize
10564 \begin_inset space \hfill{}
10568 \begin_inset Newline newline
10573 Introduces a new INTERIOR camera set-up.
10574 Always followed by DAY or NIGHT, or something similar to define the lighting
10576 Everthing on this line in CAPS.
10579 \begin_layout Itemize
10583 \begin_inset space \hfill{}
10587 \begin_inset Newline newline
10592 Introduces a new EXTERIOR camera set-up.
10593 Everthing on this line in CAPS.
10596 \begin_layout Itemize
10600 \begin_inset space \hfill{}
10604 \begin_inset Newline newline
10609 The character speaking.
10612 \begin_layout Itemize
10616 \begin_inset space \hfill{}
10620 \begin_inset Newline newline
10625 Instructions to the speaker.
10626 The () are automatically inserted, but only the ( will show in LyX.
10627 Both will be printed.
10630 \begin_layout Itemize
10634 \begin_inset space \hfill{}
10638 \begin_inset Newline newline
10650 \begin_layout Itemize
10654 \begin_inset space \hfill{}
10658 \begin_inset Newline newline
10663 Camera movement instruction.
10665 \begin_inset space \thinspace{}
10669 \begin_inset space \space{}
10675 \begin_layout Itemize
10679 \begin_inset space \hfill{}
10685 \begin_layout Itemize
10689 \begin_inset space \hfill{}
10695 \begin_layout Itemize
10699 \begin_inset space \hfill{}
10705 \begin_layout Itemize
10709 \begin_inset space \hfill{}
10715 \begin_layout Subsection
10719 \begin_layout Itemize
10720 (O.S) — off screen
10723 \begin_layout Itemize
10724 (V.0) — voice over
10727 \begin_layout Itemize
10729 \begin_inset space \thinspace{}
10736 \begin_layout Itemize
10741 \begin_layout Itemize
10742 PAN — camera movement
10745 \begin_layout Itemize
10746 INSERT — cut to close-up of
10749 \begin_layout Section
10753 \begin_layout Standard
10756 Panayotis Papasotiriou
10759 \begin_layout Subsection
10763 \begin_layout Standard
10764 The ijmpc package is a set of macros that facilitates electronic manuscript
10767 International Journal of Modern Physics C
10770 Similarly, the ijmpd package is for creating manuscripts to be submitted
10773 International Journal of Modern Physics D
10776 Both journals are published by World Scientific.
10777 The corresponding document classes are named
10786 These files, together with instructions for the authors, can be downloaded
10788 \begin_inset Flex URL
10791 \begin_layout Plain Layout
10793 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
10799 \begin_inset Flex URL
10802 \begin_layout Plain Layout
10804 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
10810 Both packages are modified versions of the standard
10811 \begin_inset Quotes eld
10815 \begin_inset Quotes erd
10818 package, and they are almost (but not exactly) identical.
10819 Most of their features are supported by LyX.
10820 I have used LyX successfully to write articles submitted to both journals
10821 without any problem.
10824 \begin_layout Subsection
10828 \begin_layout Standard
10829 As usual, the easiest way to write a paper is to start with a template.
10832 File\SpecialChar \menuseparator
10851 This will give an (almost) empty document that includes the most common
10852 fields found in a manuscript.
10853 Simply overwrite the existing text (including the brackets,
10858 You should keep in mind the following remarks.
10861 \begin_layout Enumerate
10862 LyX won't let you change the font size and the page style of the document,
10863 because such modifications are not allowed by both packages.
10866 \begin_layout Enumerate
10867 The language of the document should not be changed.
10868 Before previewing your paper, be sure that the babel package is not used.
10869 To do this, click on
10871 Tools\SpecialChar \menuseparator
10882 checkbox in the language settings, and click on
10890 , if you wish to make this change permanent).
10893 \begin_layout Enumerate
10895 \begin_inset Quotes eld
10899 \begin_inset Quotes erd
10902 style must be used to define keywords.
10905 \begin_layout Enumerate
10906 The ijmpc package provides a style named
10907 \begin_inset Quotes eld
10910 Classification Codes
10911 \begin_inset Quotes erd
10914 , which can be used to define classification codes, such as PACS numbers.
10915 Note that this facility is not supported by the ijmpd package.
10918 \begin_layout Enumerate
10919 Several new environments are available:
10920 \begin_inset Quotes eld
10924 \begin_inset Quotes erd
10928 \begin_inset Quotes eld
10932 \begin_inset Quotes erd
10936 \begin_inset Quotes eld
10940 \begin_inset Quotes erd
10944 \begin_inset Quotes eld
10948 \begin_inset Quotes erd
10952 \begin_inset Quotes eld
10956 \begin_inset Quotes erd
10960 \begin_inset Quotes eld
10964 \begin_inset Quotes erd
10968 \begin_inset Quotes eld
10972 \begin_inset Quotes erd
10976 \begin_inset Quotes eld
10980 \begin_inset Quotes erd
10984 \begin_inset Quotes eld
10988 \begin_inset Quotes erd
10992 \begin_inset Quotes eld
10996 \begin_inset Quotes erd
11000 \begin_inset Quotes eld
11004 \begin_inset Quotes erd
11008 \begin_inset Quotes eld
11012 \begin_inset Quotes erd
11016 \begin_inset Quotes eld
11020 \begin_inset Quotes erd
11024 \begin_inset Quotes eld
11028 \begin_inset Quotes erd
11032 Their use is more or less obvious.
11033 LyX supports all these environments; it will use the proper label, text
11034 style, and numbering scheme for each of them.
11037 \begin_layout Enumerate
11038 Both packages use basic citations; the natbib package should not be used.
11039 In LyX, citation references are shown as usual; in the output, citations
11040 are shown as superscripts.
11041 If you want to use a citation as normal text, you should use the
11046 \begin_inset space \thinspace{}
11050 \begin_inset space \space{}
11054 \begin_inset Quotes eld
11058 \begin_inset space \space{}
11068 \begin_inset Quotes erd
11074 \begin_layout Enumerate
11076 \begin_inset Quotes eld
11080 \begin_inset Quotes erd
11083 section in both packages.
11084 To put acknowledgments, just use the
11085 \begin_inset Quotes eld
11089 \begin_inset Quotes erd
11095 \begin_layout Enumerate
11096 Appendices may be added to the paper,
11100 the Acknowledgments and
11105 LyX provides a special environment, called
11106 \begin_inset Quotes eld
11110 \begin_inset Quotes erd
11113 which marks the beginning of the appendices.
11114 This environment should be left blank; it just sends a LaTeX command, but
11115 nothing is really printed.
11117 \begin_inset Quotes eld
11121 \begin_inset Quotes erd
11124 is printed with blue letters, as a signal that all sections after that
11125 point are appendices.
11126 To write an appendix, use the
11127 \begin_inset Quotes eld
11131 \begin_inset Quotes erd
11135 LyX will number each appendix with capital letters, as required by both
11138 \begin_inset Quotes eld
11142 \begin_inset Quotes erd
11149 be present before the first appendix; if not, all appendices will be numbered
11150 as normal sections in the output.
11153 \begin_layout Enumerate
11154 The ijmpc and the ijmpd packages use the
11158 command to implement table captions.
11159 As a result, a table created by LyX is printed correctly, but its caption
11161 However, you can use some TeX code to overpass this problem, so that captions
11162 are printed as expected.
11163 To do so, create a float table as usual, remove the caption, and replace
11164 it with the TeX code
11174 (sic); you must also the TeX code
11178 immediately after the tabular material.
11179 Study the example table included in the template files to see how this
11180 trick is implemented.
11181 Alternatively, If you need table captions, you should implement the whole
11186 file, then include this file to the LyX document (
11188 Insert\SpecialChar \menuseparator
11189 File\SpecialChar \menuseparator
11191 \begin_inset space ~
11197 Details on how to create a table float can be found in the files
11205 , included in the corresponding packages.
11208 \begin_layout Subsection
11209 Preparing a paper for submission
11212 \begin_layout Standard
11213 Before you submit your paper you must export the LyX document as a LaTeX
11216 File\SpecialChar \menuseparator
11217 Export\SpecialChar \menuseparator
11224 \begin_layout Plain Layout
11225 Actually you have the choice between LaTeX (plain) and pdflatex.
11226 If you intend to use pdflatex to prepare the paper, you should use the
11227 pdflatex option so that included graphics are converted to PDF format,
11228 ready for use by pdflatex.
11233 , then make the following changes to the resulting
11240 \begin_layout Enumerate
11241 Remove the comment lines before the
11250 \begin_layout Enumerate
11251 Remove everything between (and including) the
11263 commands, except for any commands you specifically put into the LaTeX preamble.
11266 \begin_layout Standard
11271 file should be saved and processed through LaTeX as many times as necessary.
11272 You may also want to check the resulting
11279 \begin_layout Subsection
11283 \begin_layout Standard
11284 The use of TeX code is reduced to two commands, which must be placed at
11285 the top of the document.
11286 If you started writing your paper by using the
11294 template, the TeX code needed is already in its place; you usually don't
11296 You may only modify the first TeX code to specify the information printed
11297 to the top of odd and even pages (authors' names and short paper's title,
11299 This TeX code must have the form
11303 markboth{Authors' Names}{Short Paper's Title}
11308 \begin_layout Section
11312 \begin_layout Standard
11318 \begin_layout Subsection
11322 \begin_layout Standard
11323 The iopart package provides a document class to create electronic manuscript
11324 submission to the journals published by the Institute of Physics.
11325 Instructions for the authors how to create a paper using the iopart class
11326 can be downloaded together with the iopart package from the site
11327 \begin_inset Flex URL
11330 \begin_layout Plain Layout
11332 ftp://ftp.iop.org/pub/journals/latex2e
11340 \begin_layout Subsection
11344 \begin_layout Standard
11345 The easiest way to write a paper is to start with the file
11349 that is available in LyX's examples files folder.
11350 Open this file, save it under a new name, and start writing.
11351 The example file explains how to use the special text environments.
11352 Here are the most important advices:
11355 \begin_layout Itemize
11356 To be able to compile your document to a PDF, PS, or DVI, assure that the
11359 Use AMS math package
11361 in the document settings under
11368 \begin_layout Itemize
11371 The title environment defines the kind of your paper.
11372 So use one of the following environments for the title:
11376 \begin_layout Itemize
11385 \begin_layout Itemize
11394 \begin_layout Itemize
11400 for a Topical review
11403 \begin_layout Itemize
11412 \begin_layout Itemize
11421 \begin_layout Itemize
11427 for a Paper (same as Title)
11430 \begin_layout Itemize
11436 for a Preliminary communication
11439 \begin_layout Itemize
11445 for a Rapid communication
11448 \begin_layout Itemize
11454 for a Letter to the editor
11458 \begin_layout Itemize
11461 All title environments except of
11465 can have an optional short title.
11468 \begin_layout Itemize
11469 There is a general title environment
11473 which is not directly supported by the LyX.
11474 This can be used as TeX code when your document doesn't fit into one of
11475 the other title types.
11478 \begin_layout Standard
11479 For more informations like hints for special table and formula formatting,
11480 look at the IOP author guidelines.
11483 \begin_layout Section
11487 \begin_layout Standard
11490 Panayotis Papasotiriou
11493 \begin_layout Subsection
11497 \begin_layout Standard
11498 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
11499 that facilitates electronic manuscript submission to the journals they
11501 Most known of them (at least in my domain of interest) are
11503 Astrophysics and Space Science
11509 , but there are many others (see a complete list at
11510 \begin_inset Flex URL
11513 \begin_layout Plain Layout
11515 http://www.wkap.nl/jrnllist.htm/JRNLHOME
11521 The Kluwer package may be downloaded from the site
11522 \begin_inset Flex URL
11525 \begin_layout Plain Layout
11527 http://www.wkap.nl/kaphtml.htm/STYLEFILES
11533 A complete user guide is contained in that package (but it can also be
11534 downloaded separately).
11537 \begin_layout Standard
11538 LyX supports many features of the package but not everything.
11539 However, the TeX code needed is reduced to some
11540 \begin_inset Quotes eld
11544 \begin_inset Quotes erd
11547 commands of the package (see
11548 \begin_inset space ~
11552 \begin_inset CommandInset ref
11554 reference "subsec:kluwer_peculiarities"
11559 I have recently used LyX to write an article submitted to the
11561 Astrophysics and Space Science
11563 without any problem.
11566 \begin_layout Subsection
11570 \begin_layout Standard
11571 The easiest way to write a paper is to start with the Kluwer template file.
11574 File\SpecialChar \menuseparator
11586 This will give an (almost) empty document that includes the most common
11587 fields found in a manuscript and a short description of their use.
11588 As in most templates, simply overwrite the existing text (including the
11593 ) with the correct information.
11596 \begin_layout Subsection
11597 Preparing a paper for submission
11600 \begin_layout Standard
11601 As in the AASTeX package, before you submit your paper to a journal you
11603 \begin_inset Quotes eld
11607 \begin_inset Quotes erd
11613 \begin_layout Enumerate
11614 Export your paper as a LaTeX file.
11615 To do this, click on
11617 File\SpecialChar \menuseparator
11618 Export\SpecialChar \menuseparator
11625 \begin_layout Enumerate
11630 file with a text editor and make the following changes
11634 \begin_layout Enumerate
11635 remove the comment lines before the
11644 \begin_layout Enumerate
11645 remove everything between (and including) the
11657 commands, except for any commands you specifically put into the LaTeX preamble.
11660 \begin_layout Standard
11669 \begin_layout Enumerate
11674 file through LaTeX as many times as necessary (usually up to three).
11677 \begin_layout Enumerate
11683 \begin_inset space \thinspace{}
11687 \begin_inset space \space{}
11694 , and check if everything is OK (it should, if you didn't make any mistake).
11697 \begin_layout Subsection
11698 \begin_inset Quotes eld
11702 \begin_inset Quotes erd
11705 of the Kluwer package
11706 \begin_inset CommandInset label
11708 name "subsec:kluwer_peculiarities"
11715 \begin_layout Standard
11716 The Kluwer package has the following
11717 \begin_inset Quotes eld
11721 \begin_inset Quotes erd
11727 \begin_layout Enumerate
11728 It is possible to write multiple articles in the same LaTeX file
11732 \begin_layout Plain Layout
11733 I can't imagine any good reason to do this.
11739 Each article must be included in the environment
11740 \begin_inset Quotes eld
11744 \begin_inset Quotes erd
11748 Unfortunately, this environment cannot be omitted, even if you write just
11750 Therefore, each article starts with the command
11756 and, obviously, ends with the command
11763 Although this can be implemented in LyX, I didn't included it, since it
11764 looks ugly and can confuse the novice user.
11765 Therefore, you need to enter them directly and mark them as LaTeX code
11767 \begin_inset Quotes eld
11771 \begin_inset Quotes erd
11777 \begin_layout Enumerate
11778 Information given at the beginning of the article (i.
11779 \begin_inset space \thinspace{}
11783 \begin_inset space \space{}
11786 title, subtitle, author, institution, running title, running author, abstract
11787 and keywords) must be included in an environment called
11788 \begin_inset Quotes eld
11792 \begin_inset Quotes erd
11796 This is not implemented in LyX, so you must enter title, subtitle etc.
11797 \begin_inset space ~
11800 between two TeX code lines (
11815 \begin_layout Enumerate
11816 According to the user manual, the label of each bibliography item must be
11840 \begin_layout Standard
11845 template takes care of all these
11846 \begin_inset Quotes eld
11850 \begin_inset Quotes erd
11854 If you start a new paper using this template you don't need to do anything
11859 \begin_layout Enumerate
11860 don't delete the TeX code included in the template, and
11863 \begin_layout Enumerate
11864 copy the example bibliography item included in the template and modify it
11865 as necessary to enter new bibliography items.
11868 \begin_layout Section
11872 \begin_layout Standard
11878 \begin_layout Subsection
11882 \begin_layout Standard
11883 The LyX document classes
11885 article (koma-script)
11889 report (koma-script)
11907 correspond to the LaTeX document classes
11924 \begin_inset space ~
11927 of the Koma-Script family.
11928 They are replacements for the standard document classes
11944 , resp., and fit better to European typography conventions in a number of
11948 \begin_layout Itemize
11949 Standard character size is 11pt in
11951 article (koma-script)
11955 report (koma-script)
11963 letter (koma-script)
11968 \begin_layout Itemize
11969 Headings, labels of the description environment, and a number of elements
11972 letter (koma-script)
11974 document class are set in a bold sans serif font.
11978 \begin_layout Plain Layout
11979 There is a big difference between the bold sans serif old cm fonts and new
11980 ec fonts, especially in the appearance of headings.
11981 In comparison, the ec bold sans serif fonts look a bit thin.
11982 Here the LaTeX package
11990 helps to produce the
11991 \begin_inset Quotes eld
11995 \begin_inset Quotes erd
11998 appearance when using the ec fonts.
12003 The numbering of chapter headings is made in the same way as the numbering
12004 of section headings, that is without the extra line
12005 \begin_inset Quotes eld
12008 Chapter\SpecialChar \ldots{}
12010 \begin_inset Quotes erd
12014 In addition, the appearance of the headings can be modified by using a
12015 number of options (in LyX to be entered in the field
12018 \begin_inset space ~
12025 Layout\SpecialChar \menuseparator
12029 A detailed German description of these options can be found in the Koma-Script
12037 \begin_layout Itemize
12038 The main means in the Koma-Script document classes to design the type area
12047 (in LyX to be entered in the extra class options field in the dialog
12049 Document\SpecialChar \menuseparator
12053 They make a clearer modification of page margins possible as do the options
12056 Document\SpecialChar \menuseparator
12060 A detailed German description of these and other type area options can
12061 be found in the Koma-Script documentation
12068 \begin_layout Itemize
12069 The LaTeX document classes of the Koma-Script family define a number of
12070 additional commands.
12071 Those part of it which makes sense in LyX is implemented in corresponding
12075 \begin_layout Standard
12076 A detailed German description of the LaTeX document classes of the Koma-Script
12077 family can be found in the Koma-Script documentation
12085 \begin_layout Plain Layout
12086 There is an English translation
12090 , but it is not a complete one.
12095 The following sections describe only those aspects, which are relevant
12099 \begin_layout Subsection
12100 article (koma-script), report (koma-script), and book (koma-script)
12103 \begin_layout Standard
12104 The document classes
12106 article (koma-script)
12110 report (koma-script)
12120 are implemented in the layout files
12133 They contain all the paragraph types of the corresponding standard document
12146 , resp., partly modified, with the exception of the LyX specific
12150 -type, which is replaced by the new
12154 -type having the same functionality.
12159 -Type there is a number of new paragraph types added.
12166 letter (koma-script)
12171 \begin_layout Itemize
12180 : are equivalents to
12188 , resp., additionally inserting an entry in the table of contents.
12197 are not contained in
12199 article (koma-script)
12204 \begin_layout Itemize
12213 : behave exactly as
12221 , resp., additionally clearing running heads.
12226 is not contained in
12228 article (koma-script)
12234 \begin_layout Plain Layout
12247 report (koma-script)
12249 , but since this is identical to
12253 , is has not been implemented in LyX.
12261 \begin_layout Itemize
12266 : generates a heading directly above the following paragraph in the standard
12267 character size without affecting the structure of the document.
12270 \begin_layout Itemize
12279 are special captions which respect the different space settings needed
12280 for captions placed above or below an element (if you follow strict typographic
12281 rules, you might want to place table captions always above the table).
12282 You can also use the class option
12286 , which will switch
12299 You need at least Koma-Script version 2.8q to use this.
12302 \begin_layout Itemize
12307 : can be used to set a bonmot, e.
12308 \begin_inset space \thinspace{}
12312 \begin_inset space \space{}
12315 at the beginning of a chapter.
12316 If you use the optional argument (
12318 Insert\SpecialChar \menuseparator
12320 \begin_inset space ~
12325 ), you can insert the dictum's author there.
12326 Dictum and author are separated by a line.
12327 You need at least Koma-Script version 2.8q to use this.
12332 is not contained in
12334 article (koma-script)
12339 \begin_layout Standard
12340 The following types, together with the standard types
12352 , form the title area of the document.
12353 They must be entered ahead of the first
12354 \begin_inset Quotes eld
12358 \begin_inset Quotes erd
12365 \begin_layout Plain Layout
12366 The corresponding LaTeX commands must appear before the
12377 When such a type is used more than once, the latter usage overwrites the
12378 former one, that means, for every type only the latest usage is valid.
12379 The order of the different types however has, like
12391 , no effect on the appearance of the produced document.
12394 \begin_layout Itemize
12399 : produces a centered paragraph above the ordinary title (
12411 ) for the subject of the document.
12414 \begin_layout Itemize
12419 : produces a centered paragraph below the ordinary title (
12431 ) for the publishers' name.
12434 \begin_layout Itemize
12441 report (koma-script)
12447 produces a centered paragraph on its own page behind the title page, or
12450 article (koma-script)
12452 produces a centered paragraph below the ordinary title (
12468 ) for a dedication.
12471 \begin_layout Itemize
12476 : produces a left aligned paragraph above the ordinary title (
12492 ) for a document`s head.
12495 \begin_layout Itemize
12500 : produces in a double-sided print in
12502 report (koma-script)
12508 a left-aligned paragraph at the top of the title page`s back or has no
12509 effect in a single-sided print or in
12511 article (koma-script)
12516 \begin_layout Itemize
12521 : produces in a double-sided print in
12523 report (koma-script)
12529 a left-aligned paragraph at the bottom of the title page`s back or has
12530 no effect in a single-sided print or in
12532 article (koma-script)
12537 \begin_layout Itemize
12542 : produces a special
12543 \begin_inset Quotes eld
12547 \begin_inset Quotes erd
12550 page ahead of the actual document containing a paragraph without special
12554 \begin_layout Standard
12555 The layout files for the document classes
12557 article (koma-script)
12561 report (koma-script)
12567 do include the file
12572 This is thought of as a place to define your own types.
12577 in your personal layout directory and edit the file!
12580 \begin_layout Subsection
12581 letter (koma-script)
12584 \begin_layout Standard
12588 \begin_layout Plain Layout
12600 \begin_layout Standard
12604 letter (koma-script)
12606 is implemented in the layout file
12611 It contains all the paragraph types of the corresponding standard document
12616 , partly modified, with the exception of the LyX specific types
12628 type, which is replaced by the new
12633 In addition, it contains, in contrast to the standard document class, the
12651 Furthermore, there are a number of new letter specific types.
12654 \begin_layout Standard
12658 \begin_layout Plain Layout
12670 \begin_layout Standard
12671 The appearance of the letter produced by this document class can be controlled
12672 by a number of LaTeX commands, which you can put in the LaTeX preamble.
12676 \begin_layout Plain Layout
12677 For example, the standard appearance of the letter`s heading, consisting
12678 of name and address, is quite self-willed.
12680 \begin_inset Quotes eld
12684 \begin_inset Quotes erd
12687 heading is produced by the following LaTeX commands in the preamble:
12690 \begin_layout LyX-Code
12700 \begin_layout LyX-Code
12716 \begin_layout LyX-Code
12726 \begin_layout LyX-Code
12746 A detailed German description of such LaTeX commands can be found in the
12747 Koma-Script documentation
12752 With it, the letter's author can produce his personal letter layout.
12755 \begin_layout Standard
12764 define the beginning of the letter and must be used in every letter.
12765 To emphasize them in the LyX document class, they are marked with the letter
12775 \begin_inset space ~
12778 in the left margin.
12779 It is possible to write any number of letters in one file.
12784 type produces a new letter using the same addressee and a
12788 type produces a new addressee.
12805 are ordinary paragraph types and can also be used several times in one
12806 and the same letter.
12809 \begin_layout Itemize
12814 : produces a paragraph for the addressee and implicitly defines the beginning
12818 \begin_layout Itemize
12823 : produces a paragraph for the form of address and implicitly produces a
12827 \begin_layout Itemize
12832 : produces a paragraph for a close.
12835 \begin_layout Itemize
12840 : produces a paragraph for a postscript.
12843 \begin_layout Itemize
12848 : produces a paragraph for a distribution list.
12851 \begin_layout Itemize
12856 : produces a paragraph for enclosures.
12859 \begin_layout Standard
12900 are input types provided with a label to enter information, which will
12901 be processed by the document class.
12905 \begin_layout Plain Layout
12906 It could be seen as a matter of inconsequence, that the types
12914 described above are not such input types as well.
12915 Because of the special meaning of those types, however, I have implemented
12916 them as ordinary paragraph types with a one letter mark in the left margin.
12917 Moreover, it would affect my feeling of symmetry, if the
12925 type had such a serious different appearance.
12930 The types must be used ahead of the corresponding
12937 \begin_layout Standard
12938 An implementation of these types in a WYSIWYG fashion does not seem to make
12939 sense, because the real appearance of the produced letter does not only
12940 depend on the usage of the particular type, but also on other factors.
12941 For example, a signature entered in the
12945 type will in the standard behavior appear in the produced letter only,
12946 when in the same letter also a
12951 The entered value of the
12955 type will in the standard behavior not appear in the produced letter at
12957 The possibility to design the letter`s heading freely is already indicated
12958 in a footnote above.
12961 \begin_layout Standard
12962 The input types can also be used as empty paragraphs.
12963 This makes sense e.
12964 \begin_inset space \thinspace{}
12968 \begin_inset space \space{}
12980 type is not used at all, in the standard behavior the value of the
12984 type is used as signature, whereas if an empty
12988 type is used, no signature value is defined.
12991 \begin_layout Standard
12992 By using the input types it is possible to write a letter template, containing
12993 filled input types with your personal dates (name, address, etc.) and empty
12994 input types for other dates you want to enter.
12997 \begin_layout Itemize
13002 : sender's name, in the standard behavior appears as a centered paragraph
13003 in small caps in the letter`s heading.
13006 \begin_layout Itemize
13011 : sender's signature, in the standard behavior appears below the
13020 type is used, the value of the
13024 type appears instead.
13027 \begin_layout Itemize
13032 : sender's address, in the standard behavior appears in a centered paragraph
13033 in the letter`s heading below the sender's name.
13036 \begin_layout Itemize
13041 : sender's telephone number, in the standard behavior only sets the LaTeX
13051 \begin_layout Itemize
13056 : place of the letter`s making.
13059 \begin_layout Itemize
13064 : date of the letter`s making.
13073 , in the standard behavior, produce the place and the date in a right-aligned
13074 line below the addressee's field.
13079 type is used, neither place nor date appear, independent of the value of
13089 type is used, the date of the letter `s production is used.
13092 \begin_layout Itemize
13097 : sender`s back address, in the standard behavior appears above the addressee's
13098 field in a small sans serif font.
13101 \begin_layout Itemize
13106 : special mail information, in the standard behavior appears underlined
13107 above the addressee's field below the back address.
13110 \begin_layout Itemize
13115 : additional information, in the standard behavior appears on right side
13116 below the addressee`s field.
13119 \begin_layout Itemize
13124 : the letter's title, in the standard behavior appears in a big, bold, sans
13125 serif font above the subject.
13128 \begin_layout Itemize
13133 : the letter's subject, in the standard behavior appears in a bold font
13141 \begin_layout Standard
13162 produce a business letter like line above the
13166 line containing the fields
13167 \begin_inset Quotes eld
13171 \begin_inset Quotes erd
13175 \begin_inset Quotes eld
13179 \begin_inset Quotes erd
13183 \begin_inset Quotes eld
13187 \begin_inset Quotes erd
13191 \begin_inset Quotes eld
13195 \begin_inset Quotes erd
13199 \begin_inset Quotes eld
13203 \begin_inset Quotes erd
13207 \begin_inset Quotes eld
13211 \begin_inset Quotes erd
13215 For the date field, the value of the
13221 \begin_inset Quotes eld
13224 business letter types
13225 \begin_inset Quotes erd
13228 is used, the value of the
13232 type however does not appear, but only the LaTeX variable
13239 The ordinary output of place and date in a right-aligned line below the
13240 addressee`s field is suppressed.
13241 The types are implemented as input types provided with a label and must
13242 be used ahead of the corresponding
13249 \begin_layout Itemize
13257 \begin_layout Itemize
13265 \begin_layout Itemize
13273 \begin_layout Itemize
13281 \begin_layout Itemize
13289 \begin_layout Subsection
13290 The new letter class: letter (koma-script v.2)
13293 \begin_layout Standard
13296 Jürgen Spitzmüller
13299 \begin_layout Standard
13300 \begin_inset VSpace medskip
13306 \begin_layout Standard
13308 Koma-Script version 2.8 has introduced a new letter class
13312 which supersedes the now unsupported
13317 It has — on the LaTeX side — a completely new interface and is not compatible
13318 with the old class.
13319 Therefore, LyX supports both, though it is recommended to use the new class.
13322 \begin_layout Standard
13323 This class covers the same functionality as
13325 letter (koma-script),
13328 The basic items are
13332 (receiver's address, same as
13336 in the old layout),
13349 will start a new letter (i.
13350 \begin_inset space \thinspace{}
13354 \begin_inset space \space{}
13357 you can write several letters per document).
13358 New elements are sender's
13374 and the possibility to use a
13380 Insert\SpecialChar \menuseparator
13386 \begin_layout Standard
13387 The biggest improvement is, though, that the letter's layout is configurable
13388 at almost any needs.
13389 This can be done via the preamble or with a special style file (Letter
13390 Class Option, extension
13394 ), that will be read in as a class option.
13398 \begin_layout Plain Layout
13399 The KOMA package comes with some default
13404 There is, for instance, a
13408 file that follows german typesetting rules, or a
13412 that provides the default layout of the old
13417 The latter can be loaded with the class option
13426 ayout\SpecialChar \menuseparator
13431 ocument\SpecialChar \menuseparator
13443 template that is included in LyX for examples.
13444 A detailed description is to be found in the Koma-Script documentation
13452 \begin_layout Subsection
13456 \begin_layout Standard
13457 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
13461 \begin_layout Itemize
13462 The chapter number of a
13466 type appears on a line of its own above the chapter heading instead of
13467 appearing in the same line ahead of it.
13468 The cause for that is the LyX internal behavior for the labeltype
13472 in the layout file.
13475 \begin_layout Itemize
13476 The headings of the types
13484 are only put in the
13485 \begin_inset Quotes eld
13489 \begin_inset Quotes erd
13492 LaTeX table of contents, but not in the LyX table of contents (
13494 Document\SpecialChar \menuseparator
13496 \begin_inset space ~
13500 \begin_inset space ~
13508 \begin_layout Itemize
13509 The paragraphs in a
13513 document class appear in a skip separation mode, not indented.
13514 This is the standard behavior, no special LaTeX commands are needed for
13518 Document\SpecialChar \menuseparator
13521 dialog the corresponding radio button indicates
13530 value always has the effect that extra LaTeX commands are inserted in the
13531 document to produce the gap, which is not what is wanted in this case.
13534 \begin_layout Section
13535 Latex8 (IEEE Conference Papers)
13538 \begin_layout Standard
13544 \begin_layout Subsection
13548 \begin_layout Standard
13549 Since this class is specifically for writing submissions to IEEE sponsored
13550 conferences I strongly recommend that you get a copy of their Authors Kit.
13555 package and associated bibliography style file is included in the kit.
13556 The Authors Kit is usually sent out by email once your initial submission
13558 There is a lot of useful information in the Authors Kit explaining formatting
13559 restrictions and so on and I will assume you have read this since that
13560 means I don't have to repeat it all here.
13563 \begin_layout Subsection
13567 \begin_layout Standard
13568 [AR\SpecialChar \@.
13572 \begin_layout Subsection
13573 Supported Environments
13576 \begin_layout Itemize
13582 \begin_layout Itemize
13588 \begin_layout Itemize
13594 \begin_layout Itemize
13600 \begin_layout Itemize
13606 \begin_layout Itemize
13612 \begin_layout Itemize
13618 \begin_layout Itemize
13624 \begin_layout Itemize
13630 \begin_layout Subsection
13631 Differences Between Screen and Paper
13634 \begin_layout Standard
13635 There are slight differences in appearance mainly with the presentation
13636 of section counters.
13637 On screen the trailing period of the section counter is missing but it
13638 will appear in the output so don't let this worry you.
13641 \begin_layout Section
13645 \begin_layout Standard
13648 Jürgen Spitzmüller
13651 \begin_layout Subsection
13655 \begin_layout Standard
13656 Memoir is a very powerful and constantly evolving class.
13657 It has been designed with regard to fictional and non-fictional literature.
13658 Its aim is to let the user have maximum control over the typesetting of
13660 Memoir is based on the standard book class, but it can also emulate the
13661 article class (see below).
13664 \begin_layout Standard
13665 Peter Wilson, the developer of Memoir, is known as the author of lots of
13666 useful packages in the LaTeX world.
13667 Most of them have been merged with Memoir.
13668 Therefore, it is much easier to layout the table of contents, appendices,
13669 chapter designs and such.
13670 LyX, though, does not support all of these goodies natively.
13671 Some of them might be added to forthcoming releases
13675 \begin_layout Plain Layout
13676 You are invited to send suggestions to
13677 \begin_inset Flex URL
13680 \begin_layout Plain Layout
13682 lyx-devel@lists.lyx.org
13692 , lots will probably never, due to the limitations of LyX's framework.
13693 Of course you can still use all features with the help of some native LaTeX
13698 \begin_layout Plain Layout
13703 \begin_layout Plain Layout
13713 \begin_inset space ~
13717 \begin_inset CommandInset ref
13719 reference "sec:Inserting-TeX-Code"
13729 In this section, we can only list those features which are natively supported
13731 For detailed descriptions (and for the rest of features) we are recommending
13732 to have a look at the detailed manual of the Memoir class
13736 \begin_layout Plain Layout
13741 \begin_layout Plain Layout
13751 \begin_inset Flex URL
13754 \begin_layout Plain Layout
13756 CTAN:/macros/latex/memoir/memman.pdf
13766 , which is not only a user guide for the class, but also both a comprehensive
13767 description on good typesetting and a superb example for good typesetting
13771 \begin_layout Subsection
13772 Basic features and restrictions
13775 \begin_layout Standard
13776 Memoir supports basically all features of the standard book classes.
13777 There are, however, some differences, as follows:
13780 \begin_layout Description
13782 \begin_inset space ~
13785 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
13788 \begin_layout Description
13790 \begin_inset space ~
13793 style: The fancy page style is not supported, due to a command clash between
13794 Memoir and the fancyhdr package (they are both defining a command with
13795 the same name, which confuses LaTeX).
13796 Instead, Memoir comes with a bunch of own page styles (see
13798 Layout\SpecialChar \menuseparator
13799 Document\SpecialChar \menuseparator
13801 \begin_inset space ~
13807 If you want to use these for the chapter pages, you have to use the command
13814 in the main text or in preamble (e.
13815 \begin_inset space \thinspace{}
13819 \begin_inset space \space{}
13826 chapterstyle{companion}
13831 \begin_layout Description
13832 Sectioning: Sectionings (chapter, section, subsection etc.) are coming with
13833 an optional argument in the standard classes.
13834 With this, you can specify an alternative version of the title for the
13835 table of contents and the headers (for instance, if the title is too long).
13836 In LyX, you can do this via
13838 Insert\SpecialChar \menuseparator
13840 \begin_inset space ~
13845 at the beginning of a chapter/section.
13846 Memoir features a second optional argument and thus separates the table
13847 of contents from the header.
13848 You can define three variants of a title with this: one for the main text,
13849 one for the table of contents, and one for the headers.
13850 Simply insert two optional arguments if you need this feature, the first
13851 one containing the short title for the Table of Contents, the second one
13852 containing an alternative short title for the headers.
13855 \begin_layout Description
13856 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
13857 of contents, the list of figures and the list of table start a new page
13859 Memoir does not follow this route.
13860 You have to insert a page break yourself, if you want to have one.
13863 \begin_layout Description
13864 Titlepage: For some unknown reason, Memoir uses pagination on the title
13865 page (in the standard classes, title pages are
13866 \begin_inset Quotes eld
13870 \begin_inset Quotes erd
13874 \begin_inset space \thinspace{}
13878 \begin_inset space \space{}
13882 If you want an empty title page, type
13886 aliaspagestyle{title}{empty}
13891 \begin_layout Description
13892 Article: With the class option
13898 Layout\SpecialChar \menuseparator
13899 Document\SpecialChar \menuseparator
13901 \begin_inset space ~
13906 ), you can emulate article style.
13907 That is, counters (footnotes, figures, tables etc.) will not be reset on
13908 new chapters, chapters don't start a new page (but are—in contrary to
13909 \begin_inset Quotes eld
13913 \begin_inset Quotes erd
13916 article classes—still allowed), parts, though, use their own page, as in
13920 \begin_layout Description
13921 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
13922 font commands, which have been used in the old LaTeX version 2.09 (e.
13923 \begin_inset space \thinspace{}
13927 \begin_inset space \space{}
13943 It produces an error and stops LaTeX whenever such a command appears.
13948 reallows the commands and spits out warnings instead (which does at least
13950 Since a lot of packages and particularly BibTeX style files are still using
13951 those commands, we have decided to use this option by default.
13954 \begin_layout Subsection
13958 \begin_layout Standard
13959 We will only describe the features supported by LyX (which is not much currently
13961 Please consult the Memoir manual
13965 \begin_layout Plain Layout
13970 \begin_layout Plain Layout
13980 \begin_inset Flex URL
13983 \begin_layout Plain Layout
13985 CTAN:/macros/latex/memoir/memman.pdf
13998 \begin_layout Description
13999 Abstract: You may wonder why an abstract is an extra feature.
14000 Well, it is in book class.
14001 Usually books don't have abstracts.
14002 Memoir, however, has.
14003 You can use it wherever and how often you like.
14006 \begin_layout Description
14007 Chapterprecis: You may know this from belletristic: The contents of a chapter
14008 is shortly described below the title and also in the table of contents
14010 \begin_inset space \thinspace{}
14014 \begin_inset space \space{}
14019 Our hero arrives in Troia; he loses some friends; he finds others
14022 Chapterprecis does exactly this.
14023 It is therefore only sensible below a chapter.
14026 \begin_layout Description
14027 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14028 The epigraph environment provides an elegant way of typesetting such a
14030 The motto itself (text) and its author (source) are divided by a short
14032 Unfortunately, we have to fool LyX a bit here again, since the environment
14033 needs two arguments (text and source).
14034 In this case, we have to use curly brackets (in TeX mode) between the two
14045 <author of the slogan>.
14048 \begin_layout Description
14049 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14050 complex figurative poems).
14051 LyX can only support a few of them.
14052 One is poemtitle, which is a centered title for poems, which will also
14053 be added to the table of contents (verse is the standard environment for
14055 Memoir has some enhanced versions of verse, but you need to use TeX code,
14056 because they have to be nested inside regular verse environments, which
14057 is not possible with LyX).
14060 \begin_layout Description
14061 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14064 \begin_layout Section
14065 Article (mwart), book (mwbk) and report (mwrep)
14066 \begin_inset OptArg
14069 \begin_layout Plain Layout
14082 \begin_layout Standard
14088 \begin_layout Standard
14089 The LyX document classes
14105 correspond to the LaTeX document classes
14118 They are replacements for the standard document classes
14130 , resp., and fit better to Polish typography conventions in a number of points.
14134 \begin_layout Standard
14138 \begin_layout Itemize
14139 Unnumbered titles (with star, e.
14140 \begin_inset space \thinspace{}
14144 \begin_inset space \space{}
14151 ) are added into table of contents,
14154 \begin_layout Itemize
14155 Additional page styles:
14159 \begin_layout Description
14160 uheadings header with separated lines,
14163 \begin_layout Description
14164 myheadings custom header, contents headers via commands:
14179 \begin_layout Description
14180 myuheadings custom header with separated lines,
14183 \begin_layout Description
14184 outer page number is placed on outer side of page
14188 \begin_layout Itemize
14193 \begin_layout Description
14194 rmheadings serif titles — default,
14197 \begin_layout Description
14198 sfheadings sansserif titles,
14201 \begin_layout Description
14202 authortitle on title page first placed is author next title — default,
14205 \begin_layout Description
14206 titleauthor on title page first placed is title next author,
14209 \begin_layout Description
14210 withmarginpar reserve place on page for margins.
14214 \begin_layout Section
14218 \begin_layout Standard
14223 provides an alternative to the standard
14228 It provides similar functionality, but you might prefer this layout with
14229 sans serif sections, headings, and more.
14232 \begin_layout Section
14236 \begin_layout Standard
14242 \begin_layout Standard
14243 \begin_inset VSpace bigskip
14249 \begin_layout Standard
14254 \begin_inset space ~
14259 textclass works with the American Physical Sociey's RevTeX 4.0 (the
14260 \begin_inset Formula $\beta$
14263 release of May, 1999) class.
14266 \begin_layout Standard
14271 textclass, which works with RevTeX 3.1.
14272 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
14273 That means that it doesn't interact very well with LyX, which requires
14274 LaTeX2e, although it has been kludged to work.
14275 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
14279 \begin_inset space ~
14284 textclass should also be pretty easy to use.
14287 \begin_layout Standard
14288 These documents are supposed to be used in
14292 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
14293 macros, and assume you'll know what to put in the preamble if necessary.
14296 \begin_layout Subsection
14300 \begin_layout Standard
14301 All you need to do is install RevTeX 4, as described in the package's README
14303 The package can be found at The RevTeX 4 Web Site
14304 \begin_inset Flex URL
14307 \begin_layout Plain Layout
14309 http://publish.aps.org/revtex4/
14315 Install it somewhere that LaTeX can see it.
14316 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
14318 \begin_inset space \thinspace{}
14322 \begin_inset space \space{}
14325 not the directory where you installed the class file.) Then, if you reconfigure
14326 LyX, it will find the class file and let you use the RevTeX4 textclass.
14329 \begin_layout Standard
14330 Probably the easiest way to get started is either to import a RevTeX 4 document
14338 \begin_inset space ~
14343 template, found in the templates directory.
14346 \begin_layout Subsection
14350 \begin_layout Standard
14351 Optional arguments to
14358 \begin_inset Quotes eld
14362 \begin_inset Quotes erd
14366 \begin_inset Quotes eld
14370 \begin_inset Quotes erd
14380 \begin_inset space ~
14388 \begin_inset space ~
14394 Remember that in RevTeX, at least one optional argument is required!
14397 \begin_layout Standard
14398 Other preamble matter, like
14405 \begin_inset space ~
14411 \begin_inset space ~
14416 dialog, also as usual.
14419 \begin_layout Subsection
14423 \begin_layout Standard
14424 The layouts basically correspond to the commands in RevTeX4.0.
14425 For example, the Email layout corresponds to
14432 Note that (at least as of RevTeX 4.0 Beta), the
14440 layouts are exactly equivalent, so you shouldn't need to use both.
14444 \begin_layout Plain Layout
14445 In case you're curious, both were included so that
14449 would be able to translate both
14469 \begin_layout Subsection
14473 \begin_layout Standard
14474 There are a couple of important unique aspects of RevTeX 4 which might cause
14475 bugs that will be even more confusing in LyX.
14478 \begin_layout Standard
14496 The LyX equivalent is that there is a separate Thanks layout.
14501 write footnotes in the
14505 layout, or weird things may happen.
14506 See the RevTeX 4 documentation for more details.
14509 \begin_layout Standard
14513 \begin_inset space ~
14521 \begin_inset space ~
14530 layouts must be placed
14538 layout and the corresponding
14555 , the LaTeX won't compile.
14558 \begin_layout Subsection
14562 \begin_layout Standard
14563 The main problem with this layout is that you can't use the optional arguments
14564 to layouts like Email and Title.
14565 (The problem is not unique to this layout; you can't use optional arguments
14566 to the Section layouts either.) This means that after you export that file
14567 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
14568 need to edit the LaTeX file with a text editor to add the optional arguments
14570 \begin_inset space \thinspace{}
14574 \begin_inset space \space{}
14577 the running title for the page headers.
14578 Lacking these layouts makes the
14584 (and the equivalent
14590 ) useless, so the corresponding layouts don't exist, and will have to be
14595 \begin_layout Plain Layout
14600 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
14601 has not been updated yet to take advantage of it.
14609 \begin_layout Section
14610 Springer Journals (
14617 \begin_layout Standard
14623 \begin_layout Subsection
14627 \begin_layout Standard
14628 These are the layout files for some of the journal formats used by Springer
14629 Verlag and listed on
14630 \begin_inset Flex URL
14633 \begin_layout Plain Layout
14635 http://www.springer.de/author/tex/help-journals.html
14640 , where you should also go to fetch the class files (yes, these are LaTeX2e
14642 It is a modular system: the things common to all journals are implemented
14647 , which journal-specific layout files (such as, e.
14648 \begin_inset space \thinspace{}
14652 \begin_inset space \space{}
14659 for Journal of Geodesy) can include.
14662 \begin_layout Standard
14663 This means that implementing support for any other Springer journal on this
14664 list is as simple as writing your own
14672 file following the outline given in
14680 \begin_layout Standard
14681 It is reasonably well tested only for the Journal of Geodesy.
14690 come with the standard LyX distribution.
14691 Install the relevant class file (downloaded from Springer) in a proper
14692 directory, reconfigure LaTeX (in the teTeX case by running
14696 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
14697 and it should work.
14700 \begin_layout Subsection
14704 \begin_layout Standard
14705 A large number of theorem-like styles —
14711 \SpecialChar \ldots{}
14717 \begin_layout Standard
14720 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
14721 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
14724 See the Springer class file documentation for details.
14727 \begin_layout Subsection
14731 \begin_layout Itemize
14743 \begin_layout Itemize
14746 Probability Theory and Related Fields
14752 — Jean-Marc Lasgouttes
14755 \begin_layout Standard
14756 Add your own, it isn't so hard!
14759 \begin_layout Subsection
14763 \begin_layout Standard
14764 These files are partly based on the older
14768 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
14769 file from Springer.
14774 layout, are now defunct.
14775 Jean-Marc Lasgouttes helped out big in making me find my way around the
14776 LyX layout file mechanism.
14779 \begin_layout Subsection
14783 \begin_layout Standard
14785 But probably less than in the old hacked-LaTeX
14792 \begin_layout Standard
14794 \begin_inset space \thinspace{}
14797 g.: does not display the number for theorem-like layouts, just #.
14800 \begin_layout Section
14806 \begin_inset CommandInset label
14815 \begin_layout Standard
14823 \begin_layout Subsection
14827 \begin_layout Standard
14828 This section describes how to use LyX to make slides for overhead projectors.
14829 There are two document classes that can do this: the default slides class
14835 This section documents the former.
14838 \begin_layout Standard
14839 I'm going to say this again, nice and clear, so that there's no misunderstanding
14843 \begin_layout Standard
14844 \begin_inset VSpace bigskip
14850 \begin_layout Standard
14854 This section documents the class
14855 \begin_inset Quotes eld
14863 \begin_inset Quotes erd
14871 \begin_layout Standard
14872 \begin_inset VSpace bigskip
14878 \begin_layout Standard
14879 If you're looking for the documentation for
14880 \begin_inset Quotes eld
14888 \begin_inset Quotes erd
14891 , check out section
14892 \begin_inset space ~
14896 \begin_inset CommandInset ref
14898 reference "sec:foiltex"
14908 \begin_inset Quotes eld
14916 \begin_inset Quotes erd
14919 ] is actually somewhat better than the default
14927 \begin_layout Plain Layout
14928 \SpecialChar \ldots{}
14929 or so I've been told repeatedly by its advocates.
14930 Having never used it, I have no idea if this claim is true or not.
14935 which this section documents.
14938 \begin_layout Standard
14939 This class is the LaTeX2e improvement of the old
14944 Every LaTeX2e distribution includes this class [which I'll just refer to
14946 \begin_inset Quotes eld
14954 \begin_inset Quotes erd
14957 from now on], so you're bound to have it.
14958 As I noted earlier, there are other classes, such as
14962 , which also produce slides for overhead projectors and do a better job
14964 However, there are some things which
14968 can do which the others can't, such as generate overlays.
14969 Read on to learn more!
14972 \begin_layout Subsection
14974 \begin_inset CommandInset label
14976 name "sec:slidesetup"
14983 \begin_layout Standard
14984 Obviously, to use this document class, you need to select
14985 \begin_inset Quotes eld
14993 \begin_inset Quotes erd
14996 from the class list in the
14998 Document\SpecialChar \menuseparator
15002 There are some other special things you should know about this class:
15005 \begin_layout Itemize
15006 Don't bother changing the options
15011 They're not supported by the
15018 \begin_layout Itemize
15022 \begin_inset space ~
15027 behaves a bit differently for this class.
15028 The possible choices and what they do are as follows:
15032 \begin_layout Description
15037 The final output contains page numbers in the lower right corner.
15040 \begin_layout Description
15049 , but also prints out any time markers you've put in.
15050 This is the default.
15053 \begin_layout Description
15058 The final output contains no page numbers, time markers, or alignment markers.
15062 \begin_layout Itemize
15067 class has an extra option:
15073 \begin_inset Quotes eld
15081 \begin_inset Quotes erd
15084 in the extra class options.
15088 \begin_layout Standard
15089 Using this options allows you to add time markers to
15095 \begin_inset space ~
15099 \begin_inset CommandInset ref
15101 reference "sec:slideNote"
15109 \begin_layout Standard
15110 You can also use the template file
15111 \begin_inset Quotes eld
15119 \begin_inset Quotes erd
15122 to automatically set up a document to use the
15128 File\SpecialChar \menuseparator
15130 \begin_inset space ~
15134 \begin_inset space ~
15139 to open your new document].
15140 The template file also contains some examples of the special paragraph
15141 environments used by this class.
15142 I'll describe those next.
15145 \begin_layout Subsection
15146 Paragraph Environments
15149 \begin_layout Subsubsection
15150 Supported Environments
15153 \begin_layout Standard
15154 The first thing you'll notice when you start up a new
15158 document is the font size and type: it's the equivalent of the size
15159 \begin_inset Quotes eld
15167 \begin_inset Quotes erd
15173 \begin_inset space ~
15179 This is also what's used in the output.
15181 \begin_inset Quotes eld
15185 \begin_inset Quotes erd
15188 to remind you that this is a slide.
15189 Your final slides will use a larger font; ergo, you'll have less space.
15190 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
15193 \begin_layout Standard
15194 The next thing that becomes obvious is the changes to the paragraph environment
15195 pull-down box [at the far-left end of the toolbar].
15196 Most of the paragraph environments you're used to seeing are missing.
15197 There are also five new ones.
15202 class itself only supports certain paragraph environments:
15205 \begin_layout Itemize
15211 \begin_layout Itemize
15217 \begin_layout Itemize
15223 \begin_layout Itemize
15229 \begin_layout Itemize
15235 \begin_layout Itemize
15241 \begin_layout Itemize
15247 \begin_layout Itemize
15253 \begin_layout Itemize
15259 \begin_layout Itemize
15265 \begin_layout Itemize
15271 \begin_layout Standard
15272 All of the other standard environments, including the section-heading environmen
15273 ts, aren't used in the
15280 \begin_layout Standard
15281 On the other hand, you'll notice the following new environments:
15284 \begin_layout Itemize
15290 \begin_layout Itemize
15296 \begin_layout Itemize
15302 \begin_layout Itemize
15308 \begin_layout Itemize
15314 \begin_layout Standard
15315 These five are kind of quirky, due to a
15316 \begin_inset Quotes eld
15320 \begin_inset Quotes erd
15324 You see, LyX doesn't permit you to nest any other paragraph environment
15325 into an empty environment.
15326 Now, that's fine and dandy, but it means that you wouldn't be able to start
15327 a slide with anything except plain text.
15328 To deal with this, I've performed a little
15329 \begin_inset Quotes eld
15333 \begin_inset Quotes erd
15339 \begin_layout Subsubsection
15340 Quirks of the New Environments
15341 \begin_inset CommandInset label
15343 name "sec:slideQuirk"
15350 \begin_layout Standard
15351 All five of the new paragraph environments are somewhat quirky due to inherent
15352 limitiations in the current version of LyX.
15353 As I just mentioned, LyX forbids environments that begin with another environme
15355 To get around this, the
15359 environment isn't a paragraph environment as described in the
15367 \begin_layout Standard
15368 You should consider
15381 \begin_inset Quotes eld
15384 pseudo-environments.
15385 \begin_inset Quotes erd
15388 They look like a section heading or a
15389 \begin_inset Quotes eld
15397 \begin_inset Quotes erd
15400 but really begin a [and, if necessary, end the previous] paragraph environment.
15410 \begin_inset Quotes eld
15414 \begin_inset Quotes erd
15417 These two perform some action.
15420 \begin_layout Standard
15421 A common feature of all five environments,
15441 , is a rather long-ish label.
15442 The text following this label — ordinarily the contents of the paragraph
15443 environment — is utterly irrelevant for
15464 LyX completely ignores it.
15465 In fact, you can leave these five environments completely empty.
15469 \begin_layout Standard
15474 to put any text after the rather long-ish label, you might want to.
15475 This could be a short description of the contents of the
15480 In that case, enter in your descriptive comment and hit
15484 as you normally would.
15487 \begin_layout Standard
15488 If, on the other hand, you don't want to enter in any descriptive text,
15489 you'll hit another LyX quirk.
15490 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
15491 environment until you put something in the old one.
15495 \begin_layout Itemize
15496 Start entering the text that will
15524 \begin_layout Itemize
15525 Now move to the beginning of that paragraph.
15529 \begin_layout Itemize
15538 \begin_layout Itemize
15539 Finally, change this new, empty paragraph to a
15563 \begin_layout Standard
15564 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
15568 \begin_layout Subsection
15569 Making a Presentation with
15582 \begin_layout Subsubsection
15590 \begin_layout Standard
15591 If you're expecting this section to teach you how to actually make a presentatio
15592 n, you'll be sorely disappointed.
15593 Naturally, I'll describe all of the ways the
15597 class can assist you in preparing the materials for a presentation.
15598 Filling in the contents, however, is up to you.
15603 the LyX philosophy.]
15606 \begin_layout Standard
15611 environment [in the manner described in section
15612 \begin_inset space ~
15616 \begin_inset CommandInset ref
15618 reference "sec:slideQuirk"
15622 ] tells LyX to begin a new slide [duh].
15623 The label for this environment/
15624 \begin_inset Quotes erd
15628 \begin_inset Quotes erd
15632 \begin_inset Quotes eld
15636 \begin_inset Quotes erd
15639 in cool blue, followed by the label,
15640 \begin_inset Quotes eld
15644 \begin_inset Quotes erd
15648 Any text or paragraph environments that follow this one go on the new slide.
15652 \begin_layout Standard
15653 Slides are probably the only time you'll need to forcibly end pages in LyX
15654 (this can be specified in the
15659 In fact, you'll want to, once you finish entering the contents of one slide.
15660 If you've entered more text than can physically fit on a slide, the extra
15661 overflows onto a new slide.
15662 I don't recommend doing this, however, since the overflow slide won't have
15663 any page number on it.
15664 Furthermore, it may interfere with any
15668 you've made to accompany the oversized
15675 \begin_layout Standard
15684 environments work the same way as the
15689 They both create an
15690 \begin_inset Quotes eld
15694 \begin_inset Quotes erd
15697 followed by a label [
15698 \begin_inset Quotes eld
15702 \begin_inset Quotes erd
15706 \begin_inset Quotes eld
15710 \begin_inset Quotes erd
15714 The color is a stunning magenta instead of blue, and the
15715 \begin_inset Quotes eld
15719 \begin_inset Quotes erd
15722 will look different, in style and in length.
15723 The label fonts of all three also differ from one another.
15726 \begin_layout Standard
15731 , if the contents of a
15739 exceed the physical size of a slide or sheet of paper, the extra will overflow
15741 Again, you should avoid this.
15742 It defeats the whole purpose of
15753 \begin_layout Subsubsection
15763 \begin_layout Standard
15768 is a slide that sits atop another slide.
15769 Perhaps you wish to discuss a figure on the main
15773 before displaying the text associated with it.
15774 One way to accomplish this is tape a flap of dark paper over the part of
15779 you want to display later.
15780 This method fails, however, if you wish to overlap one graph with another,
15782 You would then have to fumble while speaking to align the two separate,
15787 s to align the two graphs.
15792 environment in both cases makes life much easier.
15795 \begin_layout Standard
15800 receives the page number of its
15801 \begin_inset Quotes eld
15805 \begin_inset Quotes erd
15813 \begin_inset Quotes eld
15821 \begin_inset Quotes erd
15828 \begin_layout Plain Layout
15829 Presumably, mutliple
15834 \begin_inset Quotes eld
15842 \begin_inset Quotes erd
15846 \begin_inset Quotes eld
15854 \begin_inset Quotes erd
15858 \begin_inset Quotes eld
15866 \begin_inset Quotes erd
15870 \begin_inset space ~
15873 appended to the page number of the parent
15883 Clearly, you want the contents of both the
15891 to each fit on a single physical slide! You should probably consider an
15897 \begin_inset Quotes eld
15901 \begin_inset Quotes erd
15913 class provides a visual cue for this: the label at the start of an
15917 is shorter than that at the start of a
15922 Lastly, when you generate printable output, you'll find alignment markers
15923 in all four corners of both the
15927 page and its parent
15932 These will assist you in lining up the two physical slides.
15935 \begin_layout Standard
15936 The major problem in overlaying two slides is aligning the contents of the
15937 two transparencies.
15938 How much space should you leave for that graph on the second slide? Worse
15939 still, what if you want a graph and a sentence on second slide, but there
15940 is text on the main transparency that goes in between them? You could try
15941 and insert vertical space of the right size.
15942 The better way is to use
15953 \begin_layout Standard
15954 As their names imply,
15962 are two command-like paragraph environments that make all subsequent text
15963 invisible and visible, respectively.
15965 \begin_inset space ~
15969 \begin_inset CommandInset ref
15971 reference "sec:slideQuirk"
15975 that you don't place anything
15979 these two environments, however.
15984 , it inserts a centered, sky-blue label into the page reading
15985 \begin_inset Quotes eld
15988 <Invisible Text Follows>
15989 \begin_inset Quotes erd
15993 For paragraphs following this label, the parts of the
16001 ; it doesn't matter which] where they would be contain instead blank space.
16005 \begin_layout Standard
16010 , the corresponding centered label is
16011 \begin_inset Quotes eld
16014 <Visible Text Follows>
16015 \begin_inset Quotes erd
16019 Paragraphs following this label behave normally.
16020 Note that the beginning of a new
16032 automatically shuts off an
16037 It's therefore not necessary to use
16048 \begin_layout Standard
16049 By now, it should be obvious how to create overlay transparencies using
16050 the proper combination of
16069 \begin_layout Enumerate
16074 , including everything that will appear on it, whether on the main slide
16082 \begin_layout Enumerate
16083 Before each figure or paragraph that will appear only on the
16092 If necessary, insert a
16096 environment after the
16103 \begin_layout Enumerate
16108 immediately following the
16115 \begin_layout Enumerate
16116 Copy the contents of this
16127 \begin_layout Enumerate
16132 , change all of the
16143 \begin_layout Standard
16145 You've just made an
16152 \begin_layout Standard
16153 There's one problem with the way I've designed the LyX
16157 class: you can't make text in the middle of a paragraph invisible, nor
16158 make text in the middle of an invisible paragraph visible again.
16159 To accomplish this feat, you'll need to use some inlined LaTeX codes.
16163 \begin_layout Plain Layout
16164 The commands of interest are:
16167 \begin_layout Itemize
16172 invisible \SpecialChar \ldots{}
16176 \begin_layout Itemize
16181 visible \SpecialChar \ldots{}
16185 \begin_layout Plain Layout
16186 \SpecialChar \ldots{}
16187 and need to be marked as TeX.
16189 \begin_inset Quotes eld
16193 \begin_inset Quotes erd
16196 you wish to change goes in between the brackets [and after the
16209 If you don't know how to mark text as TeX, see the appropriate section
16222 \begin_layout Subsubsection
16232 \begin_inset CommandInset label
16234 name "sec:slideNote"
16241 \begin_layout Standard
16250 is associated with a
16251 \begin_inset Quotes eld
16255 \begin_inset Quotes erd
16267 class provides visual cues.
16272 is shorter than that of a
16276 [yet longer than that of an
16280 ] and, like the label of an
16284 is shockingly magenta.
16285 Additionally, the printed
16289 has the page number of its
16290 \begin_inset Quotes eld
16294 \begin_inset Quotes erd
16302 \begin_inset Quotes eld
16310 \begin_inset Quotes erd
16314 \begin_inset Quotes eld
16322 \begin_inset Quotes erd
16326 \begin_inset Quotes eld
16334 \begin_inset Quotes erd
16338 You can have multiple
16342 s associated with a single
16354 , you'll probably want to break up long
16358 s so that they fit on a single sheet of paper.
16361 \begin_layout Standard
16366 is obvious: it contains anything additional you might want to say about
16372 It could also be used as a sheet of reminders for a particular
16377 In the case of the latter, you might want to make use of time markers.
16383 \begin_inset Quotes eld
16387 \begin_inset Quotes erd
16390 support for time markers, a
16395 So, you'll have to resort to using the LaTeX codes.
16398 \begin_layout Standard
16399 To use time markers, you'll need to specify the extra class option
16400 \begin_inset Quotes eld
16408 \begin_inset Quotes erd
16412 \begin_inset space ~
16416 \begin_inset CommandInset ref
16418 reference "sec:slidesetup"
16423 This option turns on timing marks, which will appear in the lower-left-hand
16429 To set what appears in the time marker, you use the LaTeX commands
16430 \begin_inset Quotes eld
16440 \begin_inset Quotes erd
16444 \begin_inset Quotes eld
16454 \begin_inset Quotes erd
16458 The arguments of both commands are time measured in seconds.
16460 \begin_inset Quotes eld
16470 \begin_inset Quotes erd
16473 sets the time marker to a given time.
16475 \begin_inset Quotes eld
16485 \begin_inset Quotes erd
16488 increments the time marker by the specified amount.
16489 Using time markers and
16493 s in this fashion, you can remind yourself how much time to spend on a particula
16501 \begin_layout Standard
16502 There's one last feature to describe.
16503 Clearly, you'd like to print out all of your
16511 s on transparencies while printing all of your
16528 with which it is associated.
16529 What's a person to do?
16532 \begin_layout Standard
16533 Luckily, there are two LaTeX commands that allow you to select what to print
16535 Both must be placed into the preamble of your document.
16537 \begin_inset Quotes eld
16549 \begin_inset Quotes erd
16552 will cause the output to contain only the
16561 Correspondingly, the command
16562 \begin_inset Quotes eld
16574 \begin_inset Quotes erd
16577 prevents the output of anything but
16582 I'd advise placing both commands in the preamble and initially comment
16584 You can then preview your entire presentation as you write.
16585 When you're done writing, you can then uncomment one of the two to select
16586 what you want to print.
16587 I like to uncomment
16588 \begin_inset Quotes eld
16600 \begin_inset Quotes erd
16603 , print to a file with
16604 \begin_inset Quotes eld
16612 \begin_inset Quotes erd
16615 in its name, comment it back out, then uncomment
16616 \begin_inset Quotes eld
16628 \begin_inset Quotes erd
16632 \begin_inset Quotes eld
16640 \begin_inset Quotes erd
16644 I can then send either file to a printer, loading transparencies or plain
16645 paper as appropriate.
16648 \begin_layout Standard
16649 You can also provide other arguments to the
16650 \begin_inset Quotes eld
16660 \begin_inset Quotes erd
16664 \begin_inset Quotes eld
16674 \begin_inset Quotes erd
16678 See a good LaTeX book for details.
16681 \begin_layout Subsection
16686 Class Template File
16689 \begin_layout Standard
16690 I have also provided a template file,
16691 \begin_inset Quotes eld
16699 \begin_inset Quotes erd
16707 To use it, begin your new presentation with
16712 ile\SpecialChar \menuseparator
16714 \begin_inset space ~
16718 \begin_inset space ~
16728 Your new LyX presentation file will contain an example
16749 additionally contain an example of the use of
16758 Lastly, the preamble will contain:
16761 \begin_layout LyX-Code
16762 % Uncomment to print out only slides and overlays
16765 \begin_layout LyX-Code
16769 \begin_layout LyX-Code
16775 \begin_inset Newline newline
16781 \begin_layout LyX-Code
16782 % Uncomment to print out only notes
16785 \begin_layout LyX-Code
16789 \begin_layout LyX-Code
16797 \begin_layout Standard
16798 One final thing: I created this class to support the LaTeX2e
16799 \begin_inset Quotes eld
16807 \begin_inset Quotes erd
16810 class, one of the built-in LaTeX2e classes.
16811 Neither I nor the rest of the LyX Team endorse or oppose the use of this
16812 built-in slide class.
16813 It's here if you want it or need it.
16814 There exist other LaTeX2e classes for creating presentations, such as the
16820 \begin_inset space ~
16824 \begin_inset CommandInset ref
16826 reference "sec:foiltex"
16831 \begin_inset Quotes eld
16839 \begin_inset Quotes erd
16842 package [present on some TeX distributions].
16843 The latter is not yet supported under LyX.
16847 \begin_layout Plain Layout
16848 Perhaps you can take on the task\SpecialChar \ldots{}
16854 I know nothing about these other classes.
16855 Try them out to see what sort of alternative they provide.
16858 \begin_layout Chapter
16859 LyX Features needing Extra Software
16862 \begin_layout Section
16866 \begin_layout Standard
16872 \begin_layout Subsection
16876 \begin_layout Standard
16885 \begin_layout Plain Layout
16890 is not yet available when you are using the LaTeX distribution MiKTeX.
16895 , you'll find in the
16902 \begin_inset space ~
16913 \begin_inset CommandInset href
16915 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
16922 \begin_layout Standard
16927 package is a program that was written by
16928 \begin_inset Flex CharStyle:Noun
16931 \begin_layout Plain Layout
16933 \begin_inset space ~
16941 in frustration because some constructs in LaTeX are sometimes non-intuitive,
16942 and easy to forget.
16943 The program runs over your LaTeX file, checks the integrity of the file,
16944 and flags some common errors.
16945 In other technical words, it is
16952 \begin_layout Standard
16953 Well, what is a syntax checker doing in LyX which is supposed to produce
16954 correct LaTeX anyways? The answer is simple: Just as
16958 not only checks the
16962 of C programs, but also does
16966 checks for type-errors,
16970 catches some common
16974 errors, in addition to the syntactical ones.
16979 is capable of detecting several common errors, such as
16982 \begin_layout Itemize
16983 Ellipsis detection:
16984 \begin_inset Newline newline
16987 Use \SpecialChar \ldots{}
16991 \begin_layout Itemize
16992 No space in front of/after parenthesis:
16993 \begin_inset Newline newline
16999 \begin_layout Itemize
17000 Enforcement of normal space after common abbreviations:
17001 \begin_inset Newline newline
17005 \begin_inset space \thinspace{}
17009 \begin_inset space \space{}
17012 is too wide spacing.
17015 \begin_layout Itemize
17016 Enforcement of end-of-sentence space when the last sentence ends with a
17018 \begin_inset Newline newline
17022 And this is wrong spacing.
17025 \begin_layout Itemize
17026 Space in front of labels and similar commands:
17027 \begin_inset Newline newline
17030 The label should stick right up to the text to avoid falling to a wrong
17033 \begin_inset CommandInset label
17043 \begin_layout Plain Layout
17044 This footnote is in danger of falling off to a wrong page
17049 The label is separated too much.
17052 \begin_layout Itemize
17053 Space in front of references, instead of hard spaces:
17054 \begin_inset Newline newline
17057 In you are in bad luck, the text will break right between the referenced
17058 text and reference number, and that's a pity.
17060 \begin_inset CommandInset ref
17062 reference "sec:chktex"
17069 \begin_layout Itemize
17071 \begin_inset Quotes eld
17075 \begin_inset Quotes erd
17079 \begin_inset Formula $\times$
17083 \begin_inset Newline newline
17086 2x2 looks cheap compared to
17087 \begin_inset Formula $2\times2$
17093 \begin_layout Standard
17094 and more \SpecialChar \ldots{}
17095 It is an invaluable tool when you are
17096 \begin_inset Quotes eld
17100 \begin_inset Quotes erd
17103 your document before printing, and you should run it right after the obligatory
17104 spelling check, and before you go fine tuning the typesetting.
17107 \begin_layout Subsection
17111 \begin_layout Standard
17112 If you have the program installed, usage is as simple as choosing
17114 Tools\SpecialChar \menuseparator
17116 \begin_inset space ~
17122 This will make LyX generate a LaTeX file of your document, start
17126 to check it, and then make LyX insert
17127 \begin_inset Quotes eld
17131 \begin_inset Quotes erd
17134 with the warnings from
17138 , if there were any.
17139 The warnings will be placed close to the point of the mistake, and you
17140 can quickly find them by using the
17142 Navigate\SpecialChar \menuseparator
17145 menu item, or the shortcut key
17154 Open the error boxes by clicking on them with the mouse, or use the shortcut
17163 bindings, or the corresponding
17172 Read the warning and correct the mistake, if it is a mistake.
17173 If you have trouble understanding what the warning is about, you can safely
17175 Remember that there is a hidden layer between the document on screen and
17176 the technical details in invoking
17180 , and this gap can make some warnings seem arcane or just right down plain
17184 \begin_layout Standard
17185 This document is an excellent testing bed for the feature, and it should
17186 provide quite a few warnings for you to fiddle with.
17187 Since computers are only so smart, expect most of the warnings to be false
17191 \begin_layout Subsection
17192 How to fine tune it
17195 \begin_layout Standard
17196 Sometimes, you'll find that
17200 makes more noise than suits your mood.
17201 Then you can choose not to use it, wait until your mood changes, or try
17206 to get better along with you.
17207 Another choice in the most desperate situations is to use
17209 View\SpecialChar \menuseparator
17211 \begin_inset space ~
17215 \begin_inset space ~
17219 \begin_inset space ~
17224 , which will get rid of all warnings instantly.
17227 \begin_layout Standard
17236 very configurable and extensible, you shouldn't expect to solve all problems
17242 Since LyX has to generate a somewhat special LaTeX file to be able to match
17243 the line numbers from the
17251 \begin_layout Plain Layout
17252 You can inspect the specific output from
17258 Edit\SpecialChar \menuseparator
17260 \begin_inset space ~
17264 \begin_inset space ~
17278 to the internal document structure, some of the warnings will not seen
17279 to appear correctly.
17280 There are two things you can do about this:
17283 \begin_layout Itemize
17288 invocation command line in
17304 installation configuration file (usually with the file
17309 See below to learn what warnings can be enabled and disabled on the command
17314 \begin_layout Itemize
17315 Export your document as a raw LaTeX file using
17317 File\SpecialChar \menuseparator
17318 Export\SpecialChar \menuseparator
17326 Invoked in this way, it can be a hassle to find the corresponding place
17327 in the document inside LyX, but with a little patience, you should be able
17331 \begin_layout Standard
17332 Here follows the warning messages that can be enabled and disabled in
17341 to disable a warning, and
17345 to enable a warning.
17346 The emphasized entries are disabled by default, because the default is
17349 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
17354 \begin_layout Standard
17355 Notice that you should only use the options that enable and disable warnings,
17356 because LyX relies on some of the other command line parameters to be set
17357 in a specific way to have a chance to communicate with
17364 \begin_layout Enumerate
17368 Command terminated with space.
17371 \begin_layout Enumerate
17374 Non-breaking space (
17375 \begin_inset Quotes eld
17383 \begin_inset Quotes erd
17386 ) should have been used.
17389 \begin_layout Enumerate
17393 You should enclose the previous parenthesis with
17394 \begin_inset Quotes eld
17402 \begin_inset Quotes erd
17408 \begin_layout Enumerate
17411 Italic correction (
17412 \begin_inset Quotes eld
17422 \begin_inset Quotes erd
17425 ) found in non-italic buffer.
17428 \begin_layout Enumerate
17431 Italic correction (
17432 \begin_inset Quotes eld
17442 \begin_inset Quotes erd
17445 ) found more than once.
17448 \begin_layout Enumerate
17452 No italic correction (
17453 \begin_inset Quotes eld
17463 \begin_inset Quotes erd
17469 \begin_layout Enumerate
17473 \begin_inset Quotes eld
17481 \begin_inset Quotes erd
17485 \begin_inset Quotes eld
17493 \begin_inset Quotes erd
17499 \begin_layout Enumerate
17502 Wrong length of dash may have been used.
17505 \begin_layout Enumerate
17509 \begin_inset Quotes eld
17517 \begin_inset Quotes erd
17521 \begin_inset Quotes eld
17529 \begin_inset Quotes erd
17535 \begin_layout Enumerate
17539 \begin_inset Quotes eld
17547 \begin_inset Quotes erd
17553 \begin_layout Enumerate
17557 \begin_inset Quotes eld
17565 \begin_inset Quotes erd
17568 to achieve an ellipsis.
17571 \begin_layout Enumerate
17574 Inter-word spacing (
17575 \begin_inset Quotes eld
17585 \begin_inset Quotes eld
17588 ) should perhaps be used.
17591 \begin_layout Enumerate
17594 Inter-sentence spacing (
17595 \begin_inset Quotes eld
17605 \begin_inset Quotes erd
17608 ) should perhaps be used.
17611 \begin_layout Enumerate
17614 Could not find argument for command.
17617 \begin_layout Enumerate
17621 \begin_inset Quotes eld
17629 \begin_inset Quotes erd
17635 \begin_layout Enumerate
17638 Math mode still on at end of LaTeX file.
17641 \begin_layout Enumerate
17645 \begin_inset Quotes eld
17653 \begin_inset Quotes erd
17656 doesn't match the number of
17657 \begin_inset Quotes eld
17665 \begin_inset Quotes erd
17671 \begin_layout Enumerate
17674 You should use either
17677 \begin_inset Quotes eld
17685 \begin_inset Quotes erd
17690 as an alternative to
17691 \begin_inset Quotes eld
17699 \begin_inset Quotes erd
17705 \begin_layout Enumerate
17712 " (ASCII 39) instead of "
17719 \begin_layout Enumerate
17722 User-specified pattern found.
17725 \begin_layout Enumerate
17728 This command might not be intended.
17731 \begin_layout Enumerate
17738 \begin_layout Enumerate
17756 \begin_layout Enumerate
17759 Delete this space to maintain correct page references.
17762 \begin_layout Enumerate
17766 You might wish to put this between a pair of
17767 \begin_inset Quotes eld
17775 \begin_inset Quotes erd
17781 \begin_layout Enumerate
17784 You ought to remove spaces in front of punctuation.
17787 \begin_layout Enumerate
17790 Could not execute LaTeX command.
17793 \begin_layout Enumerate
17802 in front of small punctuation.
17805 \begin_layout Enumerate
17813 may look prettier here.
17816 \begin_layout Enumerate
17820 Multiple spaces detected in output.
17823 \begin_layout Enumerate
17826 This text may be ignored.
17829 \begin_layout Enumerate
17835 \begin_inset Quotes eld
17840 to begin quotation, not
17847 \begin_layout Enumerate
17854 to end quotation, not
17857 \begin_inset Quotes eld
17865 \begin_layout Enumerate
17871 \begin_layout Enumerate
17874 You should perhaps use
17875 \begin_inset Quotes eld
17883 \begin_inset Quotes erd
17889 \begin_layout Enumerate
17892 You should put a space in front of/after parenthesis.
17895 \begin_layout Enumerate
17898 You should avoid spaces in front of/after parenthesis.
17901 \begin_layout Enumerate
17905 You should not use punctuation in front of/after quotes.
17908 \begin_layout Enumerate
17911 Double space found.
17914 \begin_layout Enumerate
17917 You should put punctuation outside inner/inside display math mode.
17920 \begin_layout Enumerate
17923 You ought to not use primitive TeX in LaTeX code.
17926 \begin_layout Enumerate
17929 You should remove spaces in front of
17930 \begin_inset Quotes eld
17938 \begin_inset Quotes erd
17944 \begin_layout Enumerate
17947 \begin_inset Quotes eld
17955 \begin_inset Quotes erd
17958 is normally not followed by
17959 \begin_inset Quotes eld
17967 \begin_inset Quotes erd
17973 \begin_layout Standard
17974 In later versions of LyX, we hope to provide a more complete interface to
17975 this tool (and it's smaller cousin
17979 ) to exploit the full power of it.
17980 But it's not exactly useless as it is now: go try it on one of your existing
17981 documents of a certain length and be surprised.
17984 \begin_layout Section
17985 Version Control in LyX
17988 \begin_layout Standard
17991 Lars Gullik Bjønnes,
17998 \begin_layout Subsection
18002 \begin_layout Standard
18003 A friend of mine wanted to try LyX for a group project.
18004 When he didn't find support for version control or file locking, he dropped
18006 This angered me a bit, so I thought that I should at least make support
18007 for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
18008 This has now been done.
18009 LyX now supports some of the most basic RCS commands.
18010 If you need to something a bit more sophisticated you will have to do that
18011 manually in an xterm.
18014 \begin_layout Standard
18015 Before you begin to use the version control features in LyX, you should
18017 \begin_inset Quotes eld
18021 \begin_inset Quotes erd
18024 (a man file, read it with
18029 This file describes all the basic features of RCS.
18030 You should especially notice the comment about a RCS directory, and the
18031 notion of a master RCS file (the file ending in
18038 \begin_layout Standard
18039 Later basic CVS/SVN support was added.
18040 You should be familiar with CVS/SVN usage before start using it under LyX.
18041 Most of the log messages are not currently displayed after operations -
18042 you can check them in terminal window if unsure.
18045 \begin_layout Standard
18046 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18047 package—no guarantees are made for older versions.
18050 \begin_layout Standard
18051 For introducing your own external commands consult vc-command in the manual
18055 \begin_layout Subsection
18056 RCS commands in LyX
18059 \begin_layout Standard
18060 The following sections describe the RCS commands supported by LyX.
18061 You can find them in the
18063 File\SpecialChar \menuseparator
18065 \begin_inset space ~
18071 LyX was tested against RCS 5.7.
18074 \begin_layout Subsubsection
18080 \begin_layout Standard
18081 If your document is not under revision control, this is the only item shown
18083 And if it is under revision control, the
18087 item is not visible.
18091 \begin_layout Standard
18092 This command registers your document with RCS (unless you are under the
18093 directory managed by CVS)\SpecialChar \@.
18094 You are asked interactively to supply an initial
18095 description of the document.
18096 The document is now set in Read-Only mode and you have to
18099 \begin_inset space ~
18103 \begin_inset space ~
18107 \begin_inset space ~
18112 , before making any changes to it.
18113 A document under revision control has a
18114 \begin_inset Quotes eld
18117 [RCS:<version> <locker>]
18118 \begin_inset Quotes erd
18121 item tagged to the filename in the minibuffer.
18124 \begin_layout Standard
18125 RCS command that is run:
18127 ci -q -u -i -t-"<initial description>" <file-name>
18130 \begin_layout Standard
18135 to understand the switches.
18139 \begin_layout Subsubsection
18145 \begin_layout Standard
18146 When you are finished editing a file, you check in your changes.
18147 When you do this, you are asked for a description of the changes.
18148 This is stored in the history log.
18149 The version number is bumped, your changes are applied to the master RCS
18150 file, the document is unlocked and set to Read-Only mode.
18154 \begin_layout Standard
18157 ci -q -u -m"<description>" <file-name>
18160 \begin_layout Subsubsection
18166 \begin_layout Standard
18167 By doing this you lock the document so that only you can edit it.
18168 This will also make the document Read-Write only for you.
18169 You will usually continue editing for a while and when you are finished
18170 you check in your changes.
18171 The status line is changed to reflect that you have locked the file.
18175 \begin_layout Standard
18178 co -q -l <file-name>
18181 \begin_layout Subsubsection
18184 Revert To Repository Version
18187 \begin_layout Standard
18188 This will discard all changes made to the document since the last check
18190 You get a warning before changes are discarded.
18193 \begin_layout Standard
18196 co -f -u<version> <file-name>
18199 \begin_layout Subsubsection
18205 \begin_layout Standard
18206 This makes as if the last check in never happened.
18207 No changes are made to the document loaded into LyX, but the last version
18208 is removed from the master RCS file.
18212 \begin_layout Standard
18215 rcs -o<version> <file-name>
18218 \begin_layout Subsubsection
18224 \begin_layout Standard
18225 This show the complete history of the RCS document.
18230 is shown in a browser.
18238 \begin_layout Subsection
18239 CVS commands in LyX
18242 \begin_layout Standard
18243 CVS is now partially supported by LyX.
18244 You can find the commands in the
18246 File\SpecialChar \menuseparator
18248 \begin_inset space ~
18256 \begin_layout Subsubsection
18262 \begin_layout Standard
18263 If your document is not under revision control, this is the only item shown
18265 And if it is under revision control, the
18272 item is not visible.
18276 \begin_layout Standard
18277 This command registers in CVS your document ONLY in case you have already
18278 the documents directory under CVS control (in particular
18283 This means you have to checkout the archive by yourself.
18287 \begin_layout Standard
18288 Then you are asked interactively to supply an initial description of the
18290 Don't forget that registered file is not yet commited.
18293 \begin_layout Standard
18294 CVS command that is run:
18297 \begin_inset Quotes erd
18301 \begin_inset Quotes eld
18305 \begin_inset Quotes erd
18311 \begin_layout Standard
18316 to understand the switches.
18320 \begin_layout Subsubsection
18326 \begin_layout Standard
18327 When you are finished editing a file, you commit your changes.
18328 When you do this, you are asked for a description of the changes.
18329 After that changes are commited.
18332 \begin_layout Standard
18335 cvs -q commit -m"<description>" "<file-name>"
18338 \begin_layout Subsubsection
18341 Revert To Repository Version
18344 \begin_layout Standard
18345 This will discard all changes made to the document since the last check
18347 You get a warning before changes are discarded.
18348 Firstly the file is deleted, secondly CVS update command is run.
18351 \begin_layout Standard
18355 \begin_inset Quotes eld
18359 \begin_inset Quotes erd
18365 \begin_layout Subsubsection
18371 \begin_layout Standard
18372 This show the complete history of the CVS document.
18376 \begin_inset Quotes eld
18380 \begin_inset Quotes erd
18385 is shown in a browser.
18388 \begin_layout Subsection
18389 SVN commands in LyX
18392 \begin_layout Standard
18393 SVN is now partially supported by LyX.
18394 You can find the commands in the
18396 File\SpecialChar \menuseparator
18398 \begin_inset space ~
18404 Please note that if you use password protected access to repository via
18405 ssh, you will be asked in terminal window.
18406 LyX was tested against SVN 1.5 and 1.6
18410 \begin_layout Plain Layout
18411 Most of the commands will work with 1.4 too, see
18412 \begin_inset CommandInset ref
18414 reference "sub:SVN-Repo-Update"
18426 \begin_layout Subsubsection
18432 \begin_layout Standard
18433 If your document is not under revision control, this is the only item shown
18435 And if it is under revision control, the
18442 item is not visible.
18446 \begin_layout Standard
18447 This command registers in SVN your document ONLY in case you have already
18448 the documents directory under SVN control (in particular
18453 This means you have to checkout the archive by yourself.
18457 \begin_layout Standard
18458 Then you are asked interactively to supply an initial description of the
18460 Don't forget that registered file is not yet commited.
18463 \begin_layout Standard
18464 SVN command that is run:
18467 \begin_inset Quotes eld
18471 \begin_inset Quotes erd
18477 \begin_layout Standard
18482 to understand the switches.
18486 \begin_layout Subsubsection
18492 \begin_layout Standard
18493 When you are finished editing a file, you commit your changes.
18494 When you do this, you are asked for a description of the changes.
18495 After that changes are commited.
18498 \begin_layout Standard
18503 \begin_layout Plain Layout
18504 In case locking is not enabled.
18506 \begin_inset CommandInset ref
18508 reference "subsec:SVN-File-Locking"
18519 svn commit -q -m"<description>" <file-name>
18522 \begin_layout Subsubsection
18528 \begin_layout Standard
18529 Updates the changes of this file from the repository.
18530 Be sure you understand SVN merging and conflicts resolving before using
18531 this function, because all conflicts has to be resolved manually by you!
18534 \begin_layout Standard
18539 \begin_layout Plain Layout
18548 \begin_inset Quotes eld
18552 \begin_inset Quotes erd
18558 \begin_layout Subsubsection
18561 Revert To Repository Version
18564 \begin_layout Standard
18565 This will discard all changes made to the document since the last check
18567 You get a warning before changes are discarded.
18571 \begin_layout Standard
18575 \begin_inset Quotes eld
18579 \begin_inset Quotes erd
18585 \begin_layout Subsubsection
18586 \begin_inset CommandInset label
18588 name "sub:SVN-Repo-Update"
18592 Update of the local directory checkout from repository
18596 \begin_layout Plain Layout
18597 Note that this command will work only with subversion
18598 \begin_inset Formula $\geqq1.5$
18609 \begin_layout Standard
18610 All the commands above have one shortcomming - they deal with the current
18612 Once your document contains pictures, includes external
18613 \begin_inset Flex CharStyle:Code
18616 \begin_layout Plain Layout
18622 files and so on administration becomes more complicate.
18623 LyX now supports updating the whole tree in which resides the document
18627 \begin_layout Plain Layout
18628 One need to organize the files structure so that all external files are
18629 in the same directory or subdirectories of the document.
18636 This become especially useful once you cooperate with people which neither
18637 know about subversion management nor they have ambition to commit additional
18638 material to the repository.
18642 \begin_layout Standard
18643 \begin_inset Flex CharStyle:Code
18646 \begin_layout Plain Layout
18647 Update local directory from repository
18652 command updates the whole directory and in case of merge conflicts local
18653 version of the files are left, so no unintended data loss occurs.
18654 If local changes are detected user is warned before update starts.
18657 \begin_layout Labeling
18658 \labelwidthstring 00.00.0000
18660 \begin_inset space ~
18664 \begin_inset space ~
18668 \begin_inset Newline newline
18672 \begin_inset Flex CharStyle:Code
18675 \begin_layout Plain Layout
18681 (Ask if changes are detected.)
18682 \begin_inset Newline newline
18686 \begin_inset Flex CharStyle:Code
18689 \begin_layout Plain Layout
18690 svn update --accept mine-full $path
18698 \begin_layout Standard
18700 \begin_inset Flex CharStyle:Code
18703 \begin_layout Plain Layout
18709 stands for the path to the document.
18712 \begin_layout Subsubsection
18718 \begin_layout Standard
18719 This show the complete history of the SVN document.
18723 \begin_inset Quotes eld
18727 \begin_inset Quotes erd
18732 is shown in a browser.
18735 \begin_layout Subsubsection
18737 \begin_inset CommandInset label
18739 name "subsec:SVN-File-Locking"
18746 \begin_layout Standard
18747 The file exchange through various revision control systems brings the problem
18748 of merge conflicts in case two different users try to edit the same (parts
18750 When such conflict happens it needs manual resolving and one reasonable
18751 alternative is to provide some kind of locking mechanism, which guarantees
18752 that only one user is allowed to edit file at the given time.
18755 \begin_layout Standard
18756 SVN has two mechanisms to provide such kind of mutual exclusivity for file
18757 access - locks and automatical setting of write permissions (see sec.
18759 \begin_inset CommandInset ref
18761 reference "subsec:Automatical-Locking-Property"
18766 \begin_inset Flex CharStyle:Code
18769 \begin_layout Plain Layout
18779 \begin_layout Plain Layout
18780 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
18786 In a case this property is detected for a given document LyX starts to
18787 use SVN locks for document editing automatically and the whole check-in/out
18788 mechanism switches to the same regimen as for RCS.
18789 This in particular means there are two different modes how file is used
18793 \begin_layout Itemize
18795 The loaded file is in the read-only mode.
18796 For editation on needs to check-out.
18801 consists of update from repository and gaining write lock.
18802 If the lock is not possible to obtain, we remain in unlocked state.
18805 \begin_layout Itemize
18807 The loaded file is in the 'normal' edit mode.
18808 No other user is allowed to edit the file.
18813 consists of commiting changes and releasing write-lock.
18814 If no changes have been made to the document, no commit will be produced
18818 \begin_layout Plain Layout
18819 Don't be puzzled by the fact that you will be asked for commit message anyway.
18824 and only the write-lock will be released.
18827 \begin_layout Standard
18831 \begin_layout Labeling
18832 \labelwidthstring 00.00.0000
18835 svn commit -q -m"<description>" "<file-name>"
18836 \begin_inset Newline newline
18839 svn unlock "<file-name>"
18842 \begin_layout Labeling
18843 \labelwidthstring 00.00.0000
18846 svn update "<file-name>"
18847 \begin_inset Newline newline
18850 svn lock "<file-name>"
18853 \begin_layout Subsubsection
18856 \begin_inset CommandInset label
18858 name "subsec:Automatical-Locking-Property"
18864 Automatical Locking Property
18867 \begin_layout Standard
18868 The above mentioned automatical setting of write permissions of the .lyx
18869 file can be set through
18874 ile\SpecialChar \menuseparator
18880 \begin_inset space ~
18883 Control\SpecialChar \menuseparator
18888 oggle locking property
18891 This command is active only when the file is not locked on the svn server
18893 you need to check-out before proceeding).
18896 \begin_layout Labeling
18897 \labelwidthstring 00.00.0000
18899 \begin_inset space ~
18905 \begin_layout Labeling
18906 \labelwidthstring 00.00.0000
18909 svn propset svn:needs-lock ON "<file-name>"
18912 \begin_layout Labeling
18913 \labelwidthstring 00.00.0000
18916 svn propdel svn:needs-lock "<file-name>"
18919 \begin_layout Subsubsection
18920 Revision Information in Documents
18923 \begin_layout Standard
18924 Currently there is no way how to provide such kind of information directly
18926 There are possibilities how to activate it with the help of svn features,
18927 but each has its own drawbacks.
18930 \begin_layout Standard
18931 One possibility is to use svn keywords
18935 \begin_layout Plain Layout
18936 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
18942 In short -- you set file keywords property (e.g.
18945 svn propset svn:keywords 'Rev' file.lyx
18947 ) and then paste keyword ERT
18951 \begin_layout Plain Layout
18952 This is an easy way how to ensure that LyX won't break the line in the middle
18958 tag in your document (e.g.
18963 \begin_layout Plain Layout
18971 This way svn client will automatically substitute revision number (e.g.
18976 \begin_layout Plain Layout
18983 ) after each update and commit.
18984 There are more problems with this approach.
18985 Firstly, the '$' character is used in TeX world for math equations, so
18986 any occurence of math formula
18987 \begin_inset Formula $Rev$
18991 \begin_inset Formula $Rev:59$
18994 in your LyX document.
18995 Similarly for other keywords like Id, Date, Author, etc.
18996 Secondly svn output is dependent on your locales, so its very easy that
18997 svn would produce some problematic strings once Date is used.
18998 Thirdly you get the whole 'Rev: 59' string in your document instead of
19000 Until subversion implements user's custom keywords it will be hard to use
19001 this approach reliably or let LyX to support it directly .
19004 \begin_layout Standard
19005 The second possibility would be to write your own external-material template
19007 \begin_inset Flex CharStyle:Code
19010 \begin_layout Plain Layout
19016 utility or parses the output of
19017 \begin_inset Flex CharStyle:Code
19020 \begin_layout Plain Layout
19026 command and returns the result back, when typeseting the document.
19029 \begin_layout Subsection
19030 SVN and Windows Environment
19033 \begin_layout Quote
19034 My inclination is to say that if the user cannot figure out the command
19035 line operations on their own fairly quickly, they would be well advised
19036 to use TortoiseSVN.
19042 \begin_layout Subsubsection
19046 \begin_layout Standard
19047 In addition to installing LyX, and having access to a Subversion repository,
19048 the user will need to install the Subversion client program.
19049 A Windows installer for the client program is available from
19050 \begin_inset CommandInset href
19053 target "http://www.collab.net/nonav/downloads/subversion/"
19058 The user may also want to install
19059 \begin_inset CommandInset href
19062 target "http://tortoisesvn.tigris.org/"
19066 , which integrates Subversion operations into the context (rightclick) menu
19067 of Windows Explorer.
19068 Operations done outside LyX will typically be more convenient using the
19069 Explorer context menu.
19070 Note that TortoiseSVN is not a replacement for the client program, which
19071 is what LyX itself will use.
19074 \begin_layout Subsubsection
19075 Bringing a document under Subversion control
19078 \begin_layout Standard
19079 Before a LyX document can be brought under version control in Subversion,
19080 its parent directory needs to be under version control.
19081 If the document is being added to a project already in the repository,
19082 this is accomplished by checking the project out to the directory where
19083 the new document will be placed.
19084 If the project itself is not yet under version control (for instance, if
19085 this document starts a new project), the directory must be imported into
19087 This is done outside LyX.
19088 Both import and checkout are easily accomplished from the Explorer context
19089 menu using TortoiseSVN, or alternatively can be done using the command
19090 line client at a DOS prompt.
19091 The procedure for importing the project using TortoiseSVN is described
19092 below, assuming an existing repository and a new project being started
19100 For information on using the Subversion client program, run
19107 \begin_layout Enumerate
19114 in Windows Explorer, right click it, and select
19116 TortoiseSVN > Repo-browser
19119 If necessary, adjust the URL for the repository, then click OK.
19122 \begin_layout Enumerate
19123 Right click the level of the repository under which you want to place the
19124 new project folder (typically the top level) and click
19126 Create folder\SpecialChar \ldots{}
19129 Supply a name for the project folder and click OK.
19130 Add a message for the log file if desired, then click OK again.
19131 The new project folder should appear in the repository.
19132 Finally, click OK again to exit the repository browser.
19135 \begin_layout Enumerate
19136 Once again right click
19142 , this time selecting SVN Checkout\SpecialChar \ldots{}
19143 Select the URL of the project folder
19144 you just created in the repository, and set the checkout directory to
19152 You will be warned about a non-empty folder; click OK to proceed.
19153 You should now have a
19164 \begin_layout Enumerate
19165 Create or open your document in LyX and click
19170 ile\SpecialChar \menuseparator
19176 \begin_inset space ~
19179 Control\SpecialChar \menuseparator
19187 Add a log message and click OK to commit the document to version control.
19190 \begin_layout Standard
19191 From this point onward, you should have full functionality in the
19196 ile\SpecialChar \menuseparator
19202 \begin_inset space ~
19208 You also have the option of checking the document in and out, viewing its
19210 using the TortoiseSVN context menu in Windows Explorer or the Subversion
19211 client program from a command prompt.
19214 \begin_layout Subsection
19218 \begin_layout Standard
19219 With the recent addition of the vc-command function LyX power users are
19220 allowed to create their own commands for revision control.
19223 \begin_layout Standard
19224 As an example you can see how two TortoiseSVN commands could be integrated
19228 \begin_layout Description
19230 \begin_inset Flex CharStyle:Code
19233 \begin_layout Plain Layout
19234 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
19242 \begin_layout Description
19244 \begin_inset Flex CharStyle:Code
19247 \begin_layout Plain Layout
19248 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
19256 \begin_layout Section
19257 Literate Programming
19260 \begin_layout Standard
19265 (kayvan@sylvan.com)
19269 original documentation written by
19271 Edmar Wienskoski Jr.
19274 (edmar-w-jr@technologist.com)
19277 \begin_layout Subsection
19281 \begin_layout Standard
19282 The main purpose of this documentation is to show you how to use LyX for
19283 literate programming.
19284 Where it is assumed that you are familiar with this programming technique,
19286 \begin_inset Quotes eld
19290 \begin_inset Quotes erd
19294 \begin_inset Quotes eld
19298 \begin_inset Quotes erd
19302 If that is not the case, please follow the web links provided in the following
19304 There is a lot of good documentation out there covering old development
19305 history to the latest tools tips.
19308 \begin_layout Standard
19309 It is also assumed that you are familiar with LyX itself to a point that
19310 you are comfortable changing your LyX preferences, and X resources file.
19311 If that is not the case please refer to other LyX documentation to cover
19312 your specific needs.
19315 \begin_layout Subsection
19316 Literate Programming
19319 \begin_layout Standard
19320 From the Literate Programming FAQ:
19323 \begin_layout Quotation
19324 Literate programming is the combination of documentation and source together
19325 in a fashion suited for reading by human beings.
19326 In fact, literate programs should be enjoyable reading, even inviting!
19327 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
19328 and documentation in a single file.
19329 Literate programming tools then parse the file to produce either readable
19330 documentation or compilable source.
19331 The WEB style of literate programming was created by D.
19332 \begin_inset space \thinspace{}
19336 Knuth during the development of his TeX typesetting software.
19340 \begin_layout Standard
19341 Another excerpt says:
19344 \begin_layout Quotation
19347 How is literate programming different from verbose commenting?
19350 \begin_layout Quotation
19351 There are three distinguishing characteristics.
19352 In order of importance, they are:
19356 \begin_layout Itemize
19357 flexible order of elaboration
19360 \begin_layout Itemize
19361 automatic support for browsing
19364 \begin_layout Itemize
19365 typeset documentation, especially diagrams and mathematics
19369 \begin_layout Standard
19370 Now that I sparked your curiosity, take a look in the references.
19373 \begin_layout Subsubsection
19377 \begin_layout Standard
19378 The complete Literate Programming FAQ can be found at:
19381 \begin_layout Quote
19382 Literate Programming FAQ
19383 \begin_inset Flex URL
19386 \begin_layout Plain Layout
19388 http://shelob.ce.ttu.edu/daves/lpfaq/faq.html
19396 \begin_layout Standard
19397 The FAQ lists 23 (twenty three!) different literate programming tools.
19398 Where some are specialized or
19399 \begin_inset Quotes eld
19403 \begin_inset Quotes erd
19406 for particular programming languages, while other have general scope.
19411 for my own use for several reasons:
19414 \begin_layout Itemize
19415 It can generate the documentation either in LaTeX or HTML.
19418 \begin_layout Itemize
19419 It has a open architecture, i.
19420 \begin_inset space \thinspace{}
19424 \begin_inset space \space{}
19427 it is easy to plug in new filters and to perform special processing that
19432 \begin_layout Itemize
19433 There is a good selection of filters available already (the HTML is one
19437 \begin_layout Itemize
19441 \begin_layout Standard
19442 The Noweb web page can be found at:
19445 \begin_layout Quote
19447 \begin_inset Flex URL
19450 \begin_layout Plain Layout
19452 http://www.cs.virginia.edu/~nr/noweb/
19460 \begin_layout Standard
19461 Starting from there you can reach many other interesting links and even
19462 some literate program examples.
19465 \begin_layout Subsection
19466 LyX and Literate Programming
19469 \begin_layout Standard
19470 The LyX support for Literate Programming is provided by using the generic
19471 LyX converters mechanism.
19472 This support is provided in a
19473 \begin_inset Quotes eld
19477 \begin_inset Quotes erd
19481 \begin_inset space \thinspace{}
19485 \begin_inset space \space{}
19488 you will be able to use this new LyX feature with some other literate programmin
19489 g tool of your choice by just changing your LyX preferences.
19492 \begin_layout Subsubsection
19493 Generating documents and code (weaving and tangling)
19496 \begin_layout Paragraph
19497 Selecting the document class
19500 \begin_layout Standard
19501 If you have installed Noweb and LyX successfully, whenever you open a new
19502 document or try to change the document class of an existing one, you will
19503 find that there are three new document classes available:
19506 \begin_layout Itemize
19510 \begin_layout Itemize
19514 \begin_layout Itemize
19518 \begin_layout Standard
19519 You must select one of them to create your literate documents from.
19523 \begin_layout Standard
19524 Note that literate documents are not limited to these three classes.
19525 New classes can be generated from other styles like letter or in combination
19526 with other class variations like Article (AMS).
19527 If you have special needs that cannot be covered by one of the existing
19528 classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
19529 will arrange to insert a new entry, or teach you how to do it.
19533 \begin_layout Plain Layout
19534 It is very simple, it involves the creation of a file with four lines, and
19535 re-running of the auto configuration.
19540 Moreover, if you use a literate tool other than Noweb you may need to create
19541 a new set of document classes for it.
19544 \begin_layout Paragraph
19548 \begin_layout Standard
19549 LyX enables you to write code with a layout named
19557 \begin_layout Plain Layout
19558 The equivalent Noweb term is
19559 \begin_inset Quotes eld
19563 \begin_inset Quotes erd
19567 For historical reasons, I got used to the term
19568 \begin_inset Quotes eld
19572 \begin_inset Quotes erd
19575 introduced by other literate tool named Nuweb, which I used for many years
19576 before rendering myself to Noweb.
19581 Noweb delimits scraps like this:
19584 \begin_layout LyX-Code
19588 \begin_layout LyX-Code
19592 \begin_layout LyX-Code
19596 \begin_layout LyX-Code
19600 \begin_layout LyX-Code
19604 \begin_layout Standard
19605 The problem is that whatever is written in between the << and the
19609 must be taken literally, i.
19610 \begin_inset space \thinspace{}
19614 \begin_inset space \space{}
19617 LyX should be prevented from making any special interpretation of what has
19619 This is handled by a special layout named Scrap, that works like a normal
19620 paragraph but has a free spacing capability.
19623 \begin_layout Standard
19624 The down side of the Scrap paragraph layout is that consecutive paragraphs
19625 of code will be spaced with one empty line in the source code and also
19626 in the printed documentation.
19627 The work around is to enter each line of code within a single Scrap, with
19628 a newline (ctrl-return).
19629 The example above will look like this:
19633 \begin_layout Plain Layout
19634 If you have a printed version of this document you will not see any difference
19635 between the previous example and this one.
19643 \begin_layout LyX-Code
19645 \begin_inset Newline newline
19649 \begin_inset Newline newline
19653 \begin_inset Newline newline
19657 \begin_inset Newline newline
19663 \begin_layout Standard
19664 This layout works fine.
19665 The only real inconvenience is that you have to type ctrl-return instead
19670 \begin_layout Plain Layout
19671 It is in my list of
19672 \begin_inset Quotes eld
19676 \begin_inset Quotes erd
19687 \begin_layout Standard
19688 As a special note, you can also use the
19689 \begin_inset Quotes eld
19693 \begin_inset Quotes erd
19696 construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
19700 \begin_layout LyX-Code
19702 \begin_inset Newline newline
19705 def some_function(args):
19706 \begin_inset Newline newline
19709 "This is the doc string for this function."
19710 \begin_inset Newline newline
19713 print "My args: ", args
19716 \begin_layout LyX-Code
19717 @ %def some_function
19720 \begin_layout Standard
19721 For an example of this usage and the resulting cross-reference output, look
19722 at the Literate python program in
19724 LIBDIR/examples/listerrors.lyx
19726 which should make this all clear.
19729 \begin_layout Paragraph
19730 Generating the documentation
19733 \begin_layout Standard
19734 At this point you already have a new document file with a proper document
19735 class, and with some code and text on it.
19736 How do I print it? The answer is simple, you select
19738 View\SpecialChar \menuseparator
19742 Just like you would do for a plain document.
19743 No special procedure is required.
19746 \begin_layout Standard
19747 To help orientate you, I will now explain what happens inside LyX:
19750 \begin_layout Enumerate
19753 Update\SpecialChar \menuseparator
19756 menu option is chosen, a LaTeX file is generated.
19761 \begin_layout Standard
19762 If the document is of any literate class the generated file will be named
19763 with an extension name defined by the
19764 \begin_inset Quotes eld
19768 \begin_inset Quotes erd
19771 format (defined in the Preferences panel), otherwise the file will have
19780 \begin_layout Enumerate
19781 Note that the only difference so far is in the name of the file, no special
19782 processing is required by LyX.
19783 Given that you formatted the code using the Scrap layout that, by itself,
19784 takes care of the business.
19787 \begin_layout Enumerate
19788 If the document is of any literate class LyX will then use the internal
19789 LyX to Noweb converter, followed by the Noweb to LaTeX converter
19793 \begin_layout Plain Layout
19794 The converters are defined in the
19796 Tools\SpecialChar \menuseparator
19800 \begin_inset Quotes eld
19804 \begin_inset Quotes erd
19816 manual for general information about converters.
19821 to generate the LaTeX file.
19825 \begin_layout Standard
19826 Otherwise it will just skip this step.
19830 \begin_layout Enumerate
19831 Finally, LaTeX is invoked and the regular post processing continues as in
19835 \begin_layout Standard
19836 Independence from a particular
19837 \begin_inset Quotes eld
19841 \begin_inset Quotes erd
19844 is easily achieved by changing the commands that are run by the various
19848 \begin_layout Paragraph
19849 Generating the code
19852 \begin_layout Standard
19853 When the build menu option is chosen or the corresponding button in the
19854 toolbar is pressed, a LaTeX file is generated just like step 1 above.
19855 Next, LyX invokes the
19860 This converter needs to be defined by the user and is not installed by
19861 default, though the Program format is.
19862 This converter (like any other converter) will have two parts:
19865 \begin_layout Enumerate
19866 The converter program itself.
19867 This program performs the conversion from the one format to the other (in
19868 this case, from the Noweb format to the Program pseudo-format).
19871 \begin_layout Enumerate
19872 The error log parser.
19873 This is a program whose sole purpose is to rewrite error messages in a
19874 format that LyX understands.
19875 This makes it possible for LyX to place error boxes in the right places
19876 in the file buffer.
19879 \begin_layout Standard
19880 The first part, the
19881 \begin_inset Quotes eld
19885 \begin_inset Quotes erd
19888 setting, should be set to
19889 \begin_inset Quotes eld
19897 \begin_inset Quotes erd
19901 This basically means that LyX will call
19902 \begin_inset Quotes eld
19906 \begin_inset Quotes erd
19909 (a program or script) with the name of the Noweb file (normally a file
19910 in the LyX temp directory).
19914 \begin_layout Standard
19915 This is an implementation of
19916 \begin_inset Quotes eld
19920 \begin_inset Quotes erd
19923 that you can place in a directory on your path:
19926 \begin_layout LyX-Code
19930 \begin_layout LyX-Code
19934 \begin_layout LyX-Code
19935 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
19938 \begin_layout Standard
19939 The next part of the converter setting is the
19940 \begin_inset Quotes eld
19944 \begin_inset Quotes erd
19947 which is to be set to
19948 \begin_inset Quotes eld
19953 parselog=listerrors
19956 \begin_inset Quotes erd
19960 This will run any errors that are generated by the
19961 \begin_inset Quotes eld
19965 \begin_inset Quotes erd
19968 process through the
19969 \begin_inset Quotes eld
19973 \begin_inset Quotes erd
19979 \begin_layout Standard
19980 The converter code looks in
19988 then on the path for the
19989 \begin_inset Quotes eld
19993 \begin_inset Quotes erd
19999 \begin_layout Standard
20000 The build will normally take place in LyX's temporary directory, so the
20001 files produced by the conversion will be in that directory.
20002 LyX will copy out what it regards as the `main' file, but the
20006 conversion may produce several files, and so most of these would then be
20007 deleted when LyX was closed.
20008 The present solution is to use a `copier',
20012 \begin_layout Plain Layout
20021 manual for information on these.
20030 script in its default mode, so that the entire contents of the temporary
20031 directory is copied.
20032 More will get copied than is needed, to be sure, but nothing will be lost.
20033 If, however, you know what extensions the generated files will have, this
20034 can be improved by using the
20043 This option takes a comma-separated list of extensions to copy.
20044 So, for example, if the conversion will generate only files with the extensions
20053 , then the correct definition would be:
20056 \begin_layout LyX-Code
20057 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
20060 \begin_layout Standard
20061 The result will be that only files with these two extensions will be copied
20065 \begin_layout Paragraph
20066 Build instructions in the document
20069 \begin_layout Standard
20070 The last piece of the integration between LyX and noweb is the
20071 \begin_inset Quotes eld
20075 \begin_inset Quotes erd
20079 Generally, the instructions for building your program should be embedded
20080 in a scrap of its own.
20082 \begin_inset Quotes eld
20086 \begin_inset Quotes erd
20089 above uses the notangle command to look for this scrap (called
20090 \begin_inset Quotes eld
20094 \begin_inset Quotes erd
20097 ) and runs its contents through
20098 \begin_inset Quotes eld
20102 \begin_inset Quotes erd
20108 \begin_layout Standard
20109 Typically, such a scrap would look something like this:
20112 \begin_layout LyX-Code
20114 \begin_inset Newline newline
20118 \begin_inset Newline newline
20122 \begin_inset Newline newline
20125 if [ -z "${NOWEB_SOURCE}" ]
20126 \begin_inset Newline newline
20130 \begin_inset Newline newline
20133 NOWEB_SOURCE=myfile.nw
20134 \begin_inset Newline newline
20138 \begin_inset Newline newline
20142 code to extract files ...]
20143 \begin_inset Newline newline
20147 code to compile files ...]
20148 \begin_inset Newline newline
20154 \begin_layout Standard
20157 LIBDIR/examples/listerrors.lyx
20161 LIBDIR/examples/Literate.lyx
20163 which implement two versions of the
20164 \begin_inset Quotes eld
20168 \begin_inset Quotes erd
20171 program for some illustrations of how all of these pieces go together or
20174 LIBDIR/examples/noweb2lyx.lyx.
20177 Interestingly, these three files show off the language-indepence of the
20178 LyX literate programming support since they are written in Python, C and
20182 \begin_layout Subsubsection
20186 \begin_layout Standard
20187 All the Literate Programming support is configured by the
20189 Tools\SpecialChar \menuseparator
20193 \begin_inset Quotes eld
20197 \begin_inset Quotes erd
20201 The important parts are:
20204 \begin_layout Description
20206 \begin_inset space ~
20210 \begin_inset Quotes eld
20214 \begin_inset Quotes erd
20218 \begin_inset space ~
20221 format Set up via the Formats tab, this is where the Noweb-specific pieces
20231 , the file extension is set to
20236 This tells LyX to create a file with a
20240 extension in the first step of the conversion process.
20243 \begin_layout Description
20245 \begin_inset space ~
20253 \begin_inset space ~
20256 format This is an empty format whose sole purpose is to be the endpoint
20257 of a conversion (which then allows us to set up a converter for it).
20260 \begin_layout Description
20269 This converter performs the
20270 \begin_inset Quotes eld
20274 \begin_inset Quotes erd
20277 of the literate document.
20278 For Noweb, it is set to
20279 \begin_inset Quotes eld
20284 noweave -delay -index $$i > $$o
20287 \begin_inset Quotes erd
20293 \begin_layout Description
20303 \begin_inset Quotes eld
20307 \begin_inset Quotes erd
20311 As stated above, the Converter is set to
20312 \begin_inset Quotes eld
20320 \begin_inset Quotes erd
20323 , with Flags set to
20324 \begin_inset Quotes eld
20329 originaldir,parselog=listerrors
20332 \begin_inset Quotes erd
20338 \begin_layout Subsubsection
20342 \begin_layout Standard
20343 There is also a new function implemented in the LyX server, the
20344 \begin_inset Quotes eld
20347 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
20351 \begin_layout Standard
20352 When debugging code with ddd/gdb, it is possible to invoke a text editor
20353 at the current execution position with a single key stroke.
20354 The default ddd configuration for that is shift-ctrl-V.
20355 It happens that you can define the editor command line invocation in ddd
20358 Edit\SpecialChar \menuseparator
20359 Preferences\SpecialChar \menuseparator
20362 dialog and changing the "Edit Sources" entry.
20365 \begin_layout Standard
20366 I take advantage of the new created LyX server function and this ddd feature,
20368 \begin_inset Quotes eld
20372 \begin_inset Quotes erd
20378 \begin_layout LyX-Code
20379 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
20382 \begin_layout Standard
20383 With this, whenever you are using ddd and find a point in the program that
20384 you want to edit, you just press shift-ctrl-V (in the ddd window), and
20385 ddd you forward this information to LyX through the LyX server and then
20386 the LyX window will show the same file with the cursor at the same position
20387 ddd was pointing to.
20388 No more guessing or long scrolling to locate a point in the program back
20392 \begin_layout Standard
20393 Note however that you must enable the LyX server to get this feature working
20394 (it is disabled by default).
20395 You can enable it in
20407 ) by entering in the
20412 \begin_inset Quotes eld
20417 /home/<your-home-directory>/.lyx/lyxpipe
20420 \begin_inset Quotes erd
20426 \begin_layout Standard
20427 Read the LyX server documentation in the
20429 Customization Manual
20431 for further information.
20434 \begin_layout Subsubsection
20438 \begin_layout Standard
20439 There are six new buttons that can be added to your LyX toolbar.
20440 Five of these buttons are short cuts to layout styles:
20461 The last one is a short cut to the
20462 \begin_inset Quotes eld
20466 \begin_inset Quotes erd
20473 \begin_layout Standard
20474 LyX has a range of buttons that are available for tool bar customization.
20475 In my toolbar I like to combine the six short cuts above with two more:
20480 \SpecialChar \menuseparator
20485 \SpecialChar \menuseparator
20492 View\SpecialChar \menuseparator
20496 Here is how it looks like:
20499 \begin_layout LyX-Code
20503 \begin_layout LyX-Code
20507 \begin_layout LyX-Code
20508 Icon "layout Standard"
20511 \begin_layout LyX-Code
20512 Icon "layout Section"
20515 \begin_layout LyX-Code
20516 Icon "layout LaTeX"
20519 \begin_layout LyX-Code
20520 Icon "layout LyX-Code"
20523 \begin_layout LyX-Code
20524 Icon "layout Scrap"
20527 \begin_layout LyX-Code
20531 \begin_layout LyX-Code
20535 \begin_layout LyX-Code
20536 Icon "buffer-typeset"
20539 \begin_layout LyX-Code
20540 Icon "build-program"
20543 \begin_layout LyX-Code
20547 \begin_layout LyX-Code
20551 \begin_layout LyX-Code
20555 \begin_layout LyX-Code
20559 \begin_layout LyX-Code
20563 \begin_layout Subsubsection
20564 Colors customization
20567 \begin_layout Standard
20568 There are a number of colors in LyX that can be customized in
20573 One of the things that bothers people is the LaTeX font color.
20574 The default color is red, since the scraps uses LaTeX font, and there is
20575 a lot of scraps in literate documents, you may get tired of seeing everything
20577 You can change it by going to the tabs
20586 \begin_layout Standard
20587 The next thing is the visible presence of the newline character in the screen.
20588 You can choose the color of this particular character and make it blend
20590 I recommend you choosing a color that is close to the background but not
20591 equal, that way you still can see it is there, but it is not bothering
20596 \begin_layout Chapter
20597 Secrets of the LaTeX Masters
20598 \begin_inset CommandInset label
20607 \begin_layout Standard
20608 Though LyX is a powerful tool, it cannot hope to support everything that
20609 can be done with pure TeX/LaTeX.
20610 However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
20611 as long as you are not afraid to use that
20612 \begin_inset Quotes eld
20616 \begin_inset Quotes erd
20619 button on the toolbar or add things to the LaTeX preamble.
20620 This section lists some tips, tricks, and otherwise cool ideas to give
20621 your document that extra little flair.
20624 Do try this at home
20626 , just start with something a little smaller and less important than your
20630 \begin_layout Standard
20631 Most ideas in this section require less common files in your LaTeX installation.
20632 If you have a system like teTeX, most will already be available.
20633 A few, however, will need to be downloaded from one of the CTAN archives.
20634 Often, there are several ways to do something, or several LaTeX style files
20635 which do the same thing.
20636 We do not endorse one choice over another, we simply claim that we have
20637 done a particular task with a particular file.
20638 Put on your wizard hat, keep an eye out for dragons, and let us begin.
20641 \begin_layout Section
20645 \begin_layout Standard
20648 Lars Gullik Bjønnes
20651 \begin_layout Subsection
20655 \begin_layout Standard
20656 The aim for this chapter
20660 \begin_layout Plain Layout
20661 Editor's note: Lars' original chapter was a masterful description of how
20667 However, it was too long to flow smoothly in this document.
20668 I have therefore chosen to excerpt the most important sections here (sorry,
20669 Lars); you can read the original chapter (and more of the story!) in the
20672 examples/multicol.lyx
20680 is to show how the LaTeX package
20684 can be used in a LyX document.
20685 As LyX doesn't support the
20689 package natively yet, we have to use some small hacks.
20690 By reading this section it should be obvious how to do this.
20693 \begin_layout Subsection
20697 \begin_layout Standard
20702 package allows switching between one and multicolumn format on the same
20704 Footnotes are handled correctly (for the most part), but will be placed
20705 at the bottom of the page and not under each column.
20706 LaTeX's float mechanism, however, is partly disabled in the current implementat
20708 At the moment only page-wide floats can be used within the scope of the
20712 \begin_layout Subsection
20716 \begin_layout Subsubsection
20720 \begin_layout Standard
20721 If you want to have two columns in your text, you have use LaTeX mode to
20726 begin{multicols}{2}
20728 at the point where you want the two column layout to start, and then
20734 where you want it to end.
20738 \begin_layout Standard
20742 \begin_layout Plain Layout
20746 begin{multicols}{2}
20754 \begin_layout Standard
20759 The Adventure of the Empty House
20762 \begin_inset Newline newline
20767 Sir Arthur Conan Doyle
20770 \begin_layout Standard
20773 It was in the spring of the year 1894 that all London was interested, and
20774 the fashionable world dismayed, by the murder of the Honourable Ronald
20775 Adair under most unusual and inexplicable circumstances.
20776 The public has already learned those particulars of the crime which came
20777 out in the police investigation, but a good deal was suppressed upon that
20778 occasion, since the case for the prosecution was so overwhelmingly strong
20779 that it was not necessary to bring forward all the facts.
20780 Only now, at the end of nearly ten years, am I allowed to supply those
20781 missing links which make up the whole of that remarkable chain.
20782 The crime was of interest in itself, but that interest was as nothing to
20783 me compared to the inconceivable sequel, which afforded me the greatest
20784 shock and surprise of any event in my adventurous life.
20785 Even now, after this long interval, I find myself thrilling as I think
20786 of it, and feeling once more that sudden flood of joy, amazement, and increduli
20787 ty which utterly submerged my mind.
20788 Let me say to that public, which has shown some interest in those glimpses
20789 which I have occasionally given them of the thoughts and actions of a very
20790 remarkable man, that they are not to blame me if I have not shared my knowledge
20791 with them, for I should have considered it my first duty to do so, had
20792 I not been barred by a positive prohibition from his own lips, which was
20793 only withdrawn upon the third of last month.
20796 \begin_layout Standard
20800 \begin_layout Plain Layout
20812 \begin_layout Subsubsection
20816 \begin_layout Standard
20817 The same pattern is used when you want more than two columns:
20820 \begin_layout Standard
20824 \begin_layout Plain Layout
20828 begin{multicols}{3}
20836 \begin_layout Standard
20839 It can be imagined that my close intimacy with Sherlock Holmes had interested
20840 me deeply in crime, and that after his disappearance I never failed to
20841 read with care the various problems which came before the public.
20842 And I even attempted, more than once, for my own private satisfaction,
20843 to employ his methods in their solution, though with indifferent success.
20844 There was none, however, which appealed to me like this tragedy of Ronald
20846 As I read the evidence at the inquest, which led up to a verdict of willful
20847 murder against some person or persons unknown, I realized more clearly
20848 than I had ever done the loss which the community had sustained by the
20849 death of Sherlock Holmes.
20850 There were points about this strange business which would, I was sure,
20851 have specially appealed to him, and the efforts of the police would have
20852 been supplemented, or more probably anticipated, by the trained observation
20853 and the alert mind of the first criminal agent in Europe.
20854 All day, as I drove upon my round, I turned over the case in my mind and
20855 found no explanation which appeared to me to be adequate.
20856 At the risk of telling a twice-told tale, I will recapitulate the facts
20857 as they were known to the public at the conclusion of the inquest.
20860 \begin_layout Standard
20864 \begin_layout Plain Layout
20876 \begin_layout Standard
20877 You can have more than 3 columns if you want to, but that might not be very
20878 pleasant for the eye.
20881 \begin_layout Subsubsection
20882 Columns inside columns
20885 \begin_layout Standard
20886 You can even have columns inside columns:
20889 \begin_layout Standard
20893 \begin_layout Plain Layout
20897 begin{multicols}{2}
20905 \begin_layout Standard
20908 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
20909 at that time governor of one of the Australian colonies.
20910 Adair's mother had returned from Australia to undergo the operation for
20911 cataract, and she, her son Ronald, and her daughter Hilda were living together
20915 \begin_layout Standard
20919 \begin_layout Plain Layout
20923 begin{multicols}{2}
20931 \begin_layout Standard
20934 The youth moved in the best society–had, so far as was known, no enemies
20935 and no particular vices.
20936 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
20937 had been broken off by mutual consent some months before, and there was
20938 no sign that it had left any very profound feeling behind it.
20939 For the rest {sic} the man's life moved in a narrow and conventional circle,
20940 for his habits were quiet and his nature unemotional.
20941 Yet it was upon this easy-going young aristocrat that death came, in most
20942 strange and unexpected form, between the hours of ten and eleven-twenty
20943 on the night of March 30, 1894.
20946 \begin_layout Standard
20950 \begin_layout Plain Layout
20962 \begin_layout Standard
20965 Ronald Adair was fond of cards–playing continually, but never for such stakes
20967 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
20968 It was shown that, after dinner on the day of his death, he had played
20969 a rubber of whist at the latter club.
20970 He had also played there in the afternoon.
20975 The evidence of those who had played with him– Mr.
20976 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
20977 and that there was a fairly equal fall of the cards.
20978 Adair might have lost five pounds, but not more.
20979 His fortune was a considerable one, and such a loss could not in any way
20981 He had played nearly every day at one club or other, but he was a cautious
20982 player, and usually rose a winner.
20983 It came out in evidence that, in partnership with Colonel Moran, he had
20984 actually won as much as four hundred and twenty pounds in a sitting, some
20985 weeks before, from Godfrey Milner and Lord Balmoral.
20986 So much for his recent history as it came out at the inquest.
20989 \begin_layout Standard
20993 \begin_layout Plain Layout
21005 \begin_layout Standard
21006 Please do read the file
21008 examples/multicol.lyx
21010 for more advanced examples including column and header spacing, vertical
21011 separator lines, and more.
21014 \begin_layout Section
21019 Paragraph Environment
21020 \begin_inset OptArg
21023 \begin_layout Plain Layout
21024 Numbering in Enumerate
21032 \begin_layout Standard
21038 \begin_layout Standard
21039 \begin_inset VSpace bigskip
21045 \begin_layout Standard
21047 The default numbering for the
21051 paragraph environment begins with Arabic numbers and ends with uppercase
21053 Suppose, however, you wanted a different type of numbering scheme.
21054 Here's a quickie example of how to change the numbering scheme:
21057 \begin_layout LyX-Code
21067 \begin_layout LyX-Code
21077 \begin_layout LyX-Code
21087 \begin_layout LyX-Code
21097 \begin_layout Standard
21098 \SpecialChar \ldots{}
21099 which changes the numbering scheme to uppercase Roman numerals, uppercase
21100 letters, Arabic numbers, and lowercase letter.
21103 \begin_layout Standard
21104 Additionally, the previous example also adds a little bit extra to the numbering
21106 For example, the first level label actually looks like:
21107 \begin_inset Quotes eld
21111 \begin_inset Quotes erd
21115 For ease of reading, we'll describe what the numbering schemes look like
21116 using a notation something like this: <
21117 \begin_inset Quotes eld
21121 \begin_inset Quotes erd
21125 \begin_inset space ~
21129 \begin_inset Quotes erd
21133 \begin_inset Quotes erd
21137 \begin_inset space ~
21141 \begin_inset Quotes erd
21145 \begin_inset Quotes erd
21149 \begin_inset space ~
21153 \begin_inset Quotes eld
21157 \begin_inset Quotes erd
21164 \begin_layout Standard
21165 As you can see in the example, there is a label command for each nesting
21172 \SpecialChar \ldots{}
21179 , as well as a counter,
21183 \SpecialChar \ldots{}
21189 There are also five
21190 \begin_inset Quotes eld
21194 \begin_inset Quotes erd
21227 , each of which take one counter as an argument.
21228 You can add characters before or after these, but there's no need to add
21232 \begin_layout Standard
21233 You can get really fancy with these.
21237 \begin_layout LyX-Code
21251 \begin_layout LyX-Code
21263 \begin_layout LyX-Code
21273 \begin_layout LyX-Code
21283 \begin_layout Standard
21284 produces the somewhat out of hand numbering scheme: <
21285 \begin_inset Quotes eld
21289 \begin_inset Quotes erd
21293 \begin_inset space ~
21297 \begin_inset Quotes erd
21301 \begin_inset Quotes erd
21305 \begin_inset space ~
21309 \begin_inset Quotes erd
21313 \begin_inset Quotes erd
21317 \begin_inset space ~
21321 \begin_inset Quotes eld
21325 \begin_inset Quotes erd
21332 \begin_layout Standard
21336 \begin_layout Section
21340 \begin_layout Standard
21346 \begin_layout Standard
21347 \begin_inset VSpace bigskip
21353 \begin_layout Standard
21358 \begin_layout Plain Layout
21364 tmpfont}{cmr17 scaled 2500}{
21376 \begin_layout Standard
21381 \begin_layout Plain Layout
21392 hose of you who like the style of old books probably also like
21393 \begin_inset Quotes eld
21397 \begin_inset Quotes erd
21400 —those large capital letters which begin each new chapter or section.
21401 Implementing them with plain LyX/LaTeX is straightforward (assuming you
21402 know some plain TeX!) but does require a lot of work and many iterations,
21403 as you can see by all the ugly TeX-mode stuff at the beginning of this
21407 \begin_layout Standard
21411 \begin_layout Plain Layout
21417 bigdrop{-1em}{3}{ptmri}{T}+
21422 here is a much easier way of doing this, of course.
21431 ) package from CTAN allows a simple way to add such letters to your documents.
21432 Since this package is not a standard part of teTeX, I can't demonstrate
21433 it within this document, but if you copy this paragraph to a new document,
21435 \begin_inset Quotes eld
21445 \begin_inset Quotes erd
21448 and the pluses from the TeX code at the beginning of the paragraph, and
21453 usepackage{dropcaps}
21455 to your LaTeX preamble, you will get a nice Times Roman Italic
21456 \begin_inset Quotes eld
21460 \begin_inset Quotes erd
21463 , whose height is three lines of text and which protrudes 1 em into the
21465 (Make certain you have copied
21466 \begin_inset Quotes eld
21474 \begin_inset Quotes erd
21477 into a directory where TeX can see it.) The first argument is the amount
21478 of indentation; in this case the negative sign moves it into the margin.
21479 The second argument is the height of the letter in number of lines of text.
21480 The third argument is the font name: virtually anything which has a tfm
21481 file should work (wade through the
21483 .../texmf/fonts/tfm
21485 directory for possibilities).
21486 My personal favorite is
21487 \begin_inset Quotes eld
21495 \begin_inset Quotes erd
21498 , a fancy German font specifically designed for dropped capitals.
21499 The fourth argument is the letter (or letters) to be dropped.
21504 package also offers the
21510 command, as well as a slightly simplified
21519 \begin_layout Section
21520 Non-standard Paragraph Shapes
21523 \begin_layout Standard
21529 \begin_layout Standard
21530 \begin_inset VSpace bigskip
21536 \begin_layout Standard
21540 \begin_layout Plain Layout
21552 \begin_layout Standard
21556 \begin_layout Plain Layout
21565 \begin_layout Plain Layout
21579 \begin_layout Standard
21584 \begin_layout Plain Layout
21595 \begin_layout Plain Layout
21604 \begin_layout Plain Layout
21613 \begin_layout Plain Layout
21622 \begin_layout Plain Layout
21631 \begin_layout Plain Layout
21640 \begin_layout Plain Layout
21649 \begin_layout Plain Layout
21658 \begin_layout Plain Layout
21667 \begin_layout Plain Layout
21676 \begin_layout Plain Layout
21685 \begin_layout Plain Layout
21694 \begin_layout Plain Layout
21703 \begin_layout Plain Layout
21712 \begin_layout Plain Layout
21721 \begin_layout Plain Layout
21730 \begin_layout Plain Layout
21739 \begin_layout Plain Layout
21748 \begin_layout Plain Layout
21757 \begin_layout Plain Layout
21763 There are times when the tyranny of rectangular paragraphs must be overthrown.
21764 In such situations, a call to the delightful plain TeX command
21771 As you can see, completely arbitrary shapes can be laid out with a suitable
21772 set of linelength definitions.
21773 While this parshape may look a bit silly and useless, one could conceive
21774 of situations such as finely tuned dropped capitals, word wrapping around
21775 non-rectangular graphics, etc.
21776 which will benefit from such handcrafting.
21779 \begin_layout Standard
21780 \begin_inset VSpace bigskip
21786 \begin_layout Standard
21791 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
21798 is the number of lines of text which define the paragraph.
21799 If there turn out to be fewer lines, the shape is truncated; if there are
21800 more, the excess lines have the same dimensions as the last line of the
21810 entries specify the indentation of the line from the left margin, and the
21811 length of the line as measured from that point.
21812 The shape applies only to the current paragraph; everything is reset to
21813 normal for the next paragraph.
21816 \begin_layout Standard
21820 \begin_layout Plain Layout
21832 \begin_layout Section
21836 \begin_layout Standard
21837 As you can see, the examples in this section range from the useful to the
21839 While I don't expect that anyone will ever need the paragraph shape demonstrate
21840 d in the last section, the important point is that you can do almost anything
21841 you want in LyX if you are willing to figure out how to do it in TeX and
21843 TeX is a fantastically powerful typesetting system and all that power is
21844 available to you since LyX uses it as its backend.