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
54 \maintain_unincluded_children false
57 InsetLayout CharStyle:MenuItem
66 \newcommand*{\menuitem}[1]{{\sffamily #1}}
75 \font_typewriter default
76 \font_default_family default
84 \default_output_format default
85 \bibtex_command default
86 \index_command default
90 \pdf_title "LyX's Additional Features manual"
91 \pdf_author "LyX Team"
92 \pdf_subject "LyX's additional features documentation"
93 \pdf_keywords "LyX, Documentation, Additional"
95 \pdf_bookmarksnumbered true
96 \pdf_bookmarksopen false
97 \pdf_bookmarksopenlevel 1
102 \pdf_pdfusetitle false
103 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false, pdfpagelabels"
112 \paperorientation portrait
120 \paragraph_separation indent
121 \paragraph_indentation default
122 \quotes_language english
125 \paperpagestyle headings
126 \tracking_changes false
127 \output_changes false
135 Additional LyX Features
143 \begin_layout Plain Layout
145 Principal maintainer of this file is
150 If you have comments or error corrections, please send them to the LyX
151 Documentation mailing list,
152 \begin_inset Flex CharStyle:Code
155 \begin_layout Plain Layout
157 <lyx-docs@lists.lyx.org>
170 \begin_layout Standard
171 \begin_inset CommandInset toc
172 LatexCommand tableofcontents
179 \begin_layout Chapter
183 \begin_layout Standard
184 This manual is essentially Part II of the
186 User's Guide\SpecialChar \@.
189 The reason for separating this document out is simple: the
193 is already quite lengthy, and it contains information on all of the basic
194 features one needs to know in order to prepare most documents.
195 However, the LyX Team has worked to make LyX extensible through various
196 configuration files and external packages.
197 That means that if you want to support the Fizzwizzle LaTeX package, you
198 can create a layout file (or module) for it without having to alter LyX
200 We've already had contributions of several new features this way, and some
201 of them are documented here.
202 There are also some more `advanced' features, such as how to control the
203 presentation of bibliographies and how to work with multi-part documents,
204 that are not covered in the
208 and are discussed here.
211 \begin_layout Standard
212 This manual also documents some special features, like fax support, version
213 control, and SGML support, which require additional software to work properly.
214 There is also a chapter on LyX's support for HTML.
215 And lastly, there's a chapter of LaTeX tools and tips, things you can use
216 to spruce up your documents by directly using the powerful features of
222 only WYSIWYM and will only ever interface to some, not all, LaTeX features.
225 \begin_layout Standard
226 If you haven't read the
230 yet, you are definitely in the wrong manual.
235 is the first place to go, since it describes the notation and format of
237 You should also be thoroughly familiar with the
241 and all of the basic features of LyX before attempting to read this one.
244 \begin_layout Standard
245 Since many of the topics in this manual depend heavily on LyX's interaction
246 with LaTeX, this first chapter covers the inner workings of LyX and how
247 to direct LyX to generate exactly the LaTeX code you want.
248 It is obviously for more seasoned LyX users.
251 \begin_layout Chapter
255 \begin_layout Section
259 \begin_layout Standard
260 This chapter is for both TeX-nicians and the LaTeX-curious.
261 In it, we'll explain how LyX and LaTeX work together to produce printable
263 This is the only place in any of the manuals where we assume you know something
267 \begin_layout Standard
268 At one time, LyX was called a
269 \begin_inset Quotes eld
272 WYSIWYM frontend to LaTeX,
273 \begin_inset Quotes erd
276 but that's no longer true.
277 There are frontends to LaTeX out there.
281 \begin_layout Plain Layout
282 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
283 There are also the LaTeX modes for vi and emacs, of course.
288 These are basically text editors with the ability to run LaTeX and mark
289 any errors in the file you're editing.
298 run LaTeX, and it also indicates errors in the file, it also does much,
300 For one thing, you don't need to know LaTeX to use LyX effectively.
301 And LyX has added its own extensions to LaTeX.
302 Try the following sometime: select
303 \begin_inset Flex CharStyle:MenuItem
306 \begin_layout Plain Layout
307 Export\SpecialChar \menuseparator
314 \begin_inset Flex CharStyle:MenuItem
317 \begin_layout Plain Layout
324 \begin_inset Flex CharStyle:MenuItem
327 \begin_layout Plain Layout
328 View\SpecialChar \menuseparator
334 ), then look at the preamble of the resulting
335 \begin_inset Flex CharStyle:Code
338 \begin_layout Plain Layout
345 You'll notice a variety of new macros defined specifically by LyX.
346 These macros are defined automatically, according to the features you use
350 \begin_layout Standard
351 There are several commands that automatically invoke LaTeX.
355 \begin_layout Itemize
356 \begin_inset Flex CharStyle:MenuItem
359 \begin_layout Plain Layout
360 View\SpecialChar \menuseparator
369 \begin_layout Itemize
370 \begin_inset Flex CharStyle:MenuItem
373 \begin_layout Plain Layout
374 View\SpecialChar \menuseparator
375 Update\SpecialChar \menuseparator
384 \begin_layout Itemize
385 \begin_inset Flex CharStyle:MenuItem
388 \begin_layout Plain Layout
389 File\SpecialChar \menuseparator
398 \begin_layout Itemize
399 \begin_inset Flex CharStyle:MenuItem
402 \begin_layout Plain Layout
403 File\SpecialChar \menuseparator
412 \begin_layout Standard
413 They will only invoke LaTeX if the file has changed since the last time
418 \begin_layout Standard
419 When LyX runs LaTeX on the file you're editing, it performs these steps:
422 \begin_layout Enumerate
423 Convert the document to LaTeX and save to a file with the extension
424 \begin_inset Flex CharStyle:Code
427 \begin_layout Plain Layout
434 \begin_inset Flex CharStyle:Code
437 \begin_layout Plain Layout
446 \begin_layout Enumerate
448 \begin_inset Flex CharStyle:Code
451 \begin_layout Plain Layout
457 file (maybe several times), and run any other commands (such as
458 \begin_inset Flex CharStyle:Code
461 \begin_layout Plain Layout
468 \begin_inset Flex CharStyle:Code
471 \begin_layout Plain Layout
477 ) needed to compile the LaTeX file.
480 \begin_layout Enumerate
481 If there are any errors, show the error log.
484 \begin_layout Standard
485 If you've run LaTeX using
486 \begin_inset Flex CharStyle:MenuItem
489 \begin_layout Plain Layout
492 \SpecialChar \menuseparator
500 , LyX then runs a DVI viewer to display the DVI-file.
502 \begin_inset Flex CharStyle:MenuItem
505 \begin_layout Plain Layout
508 \SpecialChar \menuseparator
516 , LyX performs further steps:
519 \begin_layout Itemize
521 \begin_inset Flex CharStyle:Code
524 \begin_layout Plain Layout
530 to convert the DVI file to PostScript.
533 \begin_layout Itemize
534 Run a PostScript viewer, such as
535 \begin_inset Flex CharStyle:Code
538 \begin_layout Plain Layout
544 , to display the PostScript file.
547 \begin_layout Standard
548 LyX does similar things when viewing, or exporting, other formats.
551 \begin_layout Section
552 Translating LaTeX files into LyX
555 \begin_layout Standard
556 You can import a LaTeX file into LyX by using the
557 \begin_inset Flex CharStyle:MenuItem
560 \begin_layout Plain Layout
561 File\SpecialChar \menuseparator
562 Import\SpecialChar \menuseparator
569 This will call a program named
570 \begin_inset Flex CharStyle:Code
573 \begin_layout Plain Layout
579 which will create a file
580 \begin_inset Flex CharStyle:Code
583 \begin_layout Plain Layout
590 \begin_inset Flex CharStyle:Code
593 \begin_layout Plain Layout
600 LyX will then open that file.
604 \begin_layout Plain Layout
605 \begin_inset Flex CharStyle:Code
608 \begin_layout Plain Layout
614 can also be run from the command line, of course.
622 \begin_layout Standard
623 \begin_inset Flex CharStyle:Code
626 \begin_layout Plain Layout
632 will translate most legal LaTeX, but not everything.
633 It will put things it doesn't understand into TeX code, so after translating
635 \begin_inset Flex CharStyle:Code
638 \begin_layout Plain Layout
644 , you can look for TeX code and hand-edit it until it looks right.
647 \begin_layout Standard
648 If you don't know what TeX code is, read the next section.
651 \begin_layout Section
652 \begin_inset CommandInset label
654 name "sec:Inserting-TeX-Code"
658 Inserting TeX Code into LyX Documents
661 \begin_layout Standard
662 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
663 You can always insert TeX code into any LyX document.
664 LyX cannot, and will never be able to, display every possible LaTeX construct.
665 If ever you need to insert LaTeX commands into your LyX document, you can
667 \begin_inset Flex CharStyle:Code
670 \begin_layout Plain Layout
676 box, which you can insert into your document with
677 \begin_inset Flex CharStyle:MenuItem
680 \begin_layout Plain Layout
681 Insert\SpecialChar \menuseparator
690 \begin_layout Standard
691 Here's an example of inserting LaTeX commands in a LyX document.
692 The code looks like this:
695 \begin_layout LyX-Code
699 \begin_inset Newline newline
705 \begin_inset Newline newline
708 This is an example for a minipage environment.
710 \begin_inset Newline newline
713 can put nearly everything in it, even (non-floating)
714 \begin_inset Newline newline
719 \begin_inset Newline newline
725 \begin_inset Newline newline
729 \begin_inset Newline newline
735 \begin_inset Newline newline
741 \begin_inset Newline newline
747 \begin_inset Newline newline
752 \begin_inset Newline newline
758 \begin_inset Newline newline
764 \begin_inset Newline newline
770 \begin_inset Newline newline
778 \begin_layout LyX-Code
782 \begin_layout Standard
784 \begin_inset Flex CharStyle:Code
787 \begin_layout Plain Layout
793 box containing this text is directly after this paragraph.
794 Those of you reading the manual in LyX will only see the TeX code inset.
795 Those reading a printed version of the manuals will see the actual results:
798 \begin_layout Standard
802 \begin_layout Plain Layout
809 \begin_layout Plain Layout
816 \begin_layout Plain Layout
818 This is an example for a minipage environment.
819 You can put nearly everything in it, even (non-floating) figures and tables.
823 \begin_layout Plain Layout
830 \begin_layout Plain Layout
835 \begin_layout Plain Layout
842 \begin_layout Plain Layout
849 \begin_layout Plain Layout
856 \begin_layout Plain Layout
862 \begin_layout Plain Layout
869 \begin_layout Plain Layout
876 \begin_layout Plain Layout
883 \begin_layout Plain Layout
895 \begin_layout Standard
896 In addition to using TeX code, you can also create a separate file containing
897 some complex LaTeX structure and then use
898 \begin_inset Flex CharStyle:MenuItem
901 \begin_layout Plain Layout
902 Insert\SpecialChar \menuseparator
912 to include your file (you should select the type
913 \begin_inset Flex CharStyle:Code
916 \begin_layout Plain Layout
923 We recommend that you only do this if you have a
924 \begin_inset Flex CharStyle:Code
927 \begin_layout Plain Layout
938 Otherwise, you'll have a big job tracking down LaTeX errors.
941 \begin_layout Standard
942 There are a few last points to emphasize:
945 \begin_layout Itemize
950 check if your LaTeX code is correct.
953 \begin_layout Itemize
954 Beware reinventing the wheel.
957 \begin_layout Standard
958 On that last point, LyX does have quite a few features tucked into it, and
960 Be sure to check the manuals to make sure that LyX doesn't have such-and-such
961 feature before you decide you have to do it by hand.
962 Moreover, there are numerous LaTeX packages out there to do all sorts of
963 things, from labels to envelopes to fancy multipage tables.
965 \begin_inset CommandInset href
968 target "http://www.ctan.org/"
972 for details, and see chapter
973 \begin_inset CommandInset ref
975 reference "cha:secrets"
982 \begin_layout Standard
983 If you do need to do some wild and fancy things within your document, be
984 sure to check out a good LaTeX book for assistance.
985 There are a number of them listed in the bibliography of the
992 \begin_layout Section
993 LyX and the LaTeX Preamble
996 \begin_layout Subsection
997 About the LaTeX Preamble
1000 \begin_layout Standard
1001 If you already know LaTeX, there is no need to explain here what the preamble
1003 If you don't, the following will give you some ideas—we recommend again
1004 that you consult a LaTeX book for further information.
1005 In any case, you should read the points below, because they explain what
1006 you can do and what you don't need to do in the LaTeX preamble of a LyX
1010 \begin_layout Standard
1011 The LaTeX preamble comes at the very beginning of a document,
1019 \begin_layout Itemize
1020 Declare the document class.
1022 \begin_inset Newline newline
1025 LyX already does this for you.
1026 If you're a seasoned LaTeX-nician, and you have a custom document class
1027 you want to use, check out the
1029 Customization Manual
1031 for information on how to make LyX interface to it.
1034 \begin_layout Itemize
1035 Declare the usage of packages.
1037 \begin_inset Newline newline
1040 LaTeX packages provide special commands, which are only available within
1041 a document when the package has been declared in the preamble.
1042 For example, the package
1043 \begin_inset Flex CharStyle:Code
1046 \begin_layout Plain Layout
1052 forces all paragraphs to be indented.
1053 There are other packages for labels, envelopes, margins, etc.
1057 \begin_layout Itemize
1058 Set counters, variables, lengths and widths.
1060 \begin_inset Newline newline
1063 There are several LaTeX counters and variables which
1067 be set globally from within the preamble in order to have the desired effect.
1068 (There are variables which you can set and reset inside the document, too.)
1069 Margins are a good example of something which must be set in the preamble.
1070 Another example is the label format for lists.
1071 You can actually set these just about anywhere, but it's best to do it
1072 just once, inside the preamble.
1075 \begin_layout Itemize
1076 Declare user defined commands (with
1077 \begin_inset Flex CharStyle:Code
1080 \begin_layout Plain Layout
1089 \begin_inset Flex CharStyle:Code
1092 \begin_layout Plain Layout
1101 \begin_inset Newline newline
1104 These are abbreviations for LaTeX commands which appear very often inside
1106 Although the preamble is a good place to declare such commands, they
1110 be declared anywhere (before they are used for the first time, of course).
1111 This can be useful if there is a lot of raw LaTeX code in your document,
1112 which normally should not be the case.
1115 \begin_layout Standard
1116 LyX adds its own set of definitions to the preamble of the
1117 \begin_inset Flex CharStyle:Code
1120 \begin_layout Plain Layout
1127 This makes LaTeX files generated by LyX portable.
1130 \begin_layout Subsection
1131 Changing the Preamble
1134 \begin_layout Standard
1135 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1136 can't change them without patching LyX itself.
1137 You can, however, add your own stuff to the preamble by selecting
1138 \begin_inset Flex CharStyle:MenuItem
1141 \begin_layout Plain Layout
1143 \begin_inset space ~
1152 \begin_inset Flex CharStyle:MenuItem
1155 \begin_layout Plain Layout
1156 Document\SpecialChar \menuseparator
1163 LyX adds anything in the
1164 \begin_inset Flex CharStyle:MenuItem
1167 \begin_layout Plain Layout
1173 dialog to its own built-in preamble.
1174 Before adding your own declarations in the preamble, you should make sure
1175 that LyX doesn't already support what you want to do.
1176 (Remember what we said about reinventing the wheel?) Also,
1178 make sure your preamble code is correct
1181 LyX doesn't check it for you.
1182 If there is an error, you're likely to get an error like
1183 \begin_inset Quotes eld
1187 \begin_inset Flex CharStyle:Code
1190 \begin_layout Plain Layout
1199 \begin_inset Quotes erd
1203 If you see this error, check your preamble.
1206 \begin_layout Subsection
1210 \begin_layout Standard
1211 Here are some examples of what you can add to a preamble, and what they
1215 \begin_layout Subsubsection
1219 \begin_layout Standard
1220 There are two variables under LaTeX that control page position:
1221 \begin_inset Flex CharStyle:Code
1224 \begin_layout Plain Layout
1233 \begin_inset Flex CharStyle:Code
1236 \begin_layout Plain Layout
1245 Their names should be self-explanatory.
1246 These variables are useful if you think for a moment about computer labels.
1247 Sometimes, the size of a print medium and the area of the medium that you
1248 can actually print on aren't the same.
1250 \begin_inset Flex CharStyle:Code
1253 \begin_layout Plain Layout
1262 \begin_inset Flex CharStyle:Code
1265 \begin_layout Plain Layout
1276 \begin_layout Standard
1277 The default values for
1278 \begin_inset Flex CharStyle:Code
1281 \begin_layout Plain Layout
1290 \begin_inset Flex CharStyle:Code
1293 \begin_layout Plain Layout
1302 \begin_inset space \thinspace{}
1306 \begin_inset space \thinspace{}
1310 \begin_inset space \space{}
1313 the page isn't shifted.
1314 Unfortunately, some DVI drivers always seem to shift the page.
1315 We have no idea why, or why the sysadmin hasn't fixed such behavior.
1316 If you're using LyX on a system that you don't personally maintain, and
1317 your sysadmin is a doofus,
1318 \begin_inset Flex CharStyle:Code
1321 \begin_layout Plain Layout
1330 \begin_inset Flex CharStyle:Code
1333 \begin_layout Plain Layout
1342 Suppose you're left and top margins are always 0.5
1343 \begin_inset space \thinspace{}
1347 You can add this to the preamble:
1350 \begin_layout LyX-Code
1358 \begin_layout LyX-Code
1366 \begin_layout Standard
1367 and your margins should now be correct.
1370 \begin_layout Subsubsection
1374 \begin_layout Standard
1375 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1376 There's a rather nice package, available at your nearest CTAN archive,
1377 for printing sheets of labels:
1378 \begin_inset Flex CharStyle:Code
1381 \begin_layout Plain Layout
1388 Now, your system may not have this package installed by default.
1389 We leave that up to you to check.
1390 You'll also want to read the documentation for it; we're not going to do
1392 Since this is an example, however, we'll give you an example of how you
1396 \begin_layout Standard
1397 First, make sure you're using the
1398 \begin_inset Flex CharStyle:Code
1401 \begin_layout Plain Layout
1408 Next, you need to put the following in your preamble:
1411 \begin_layout LyX-Code
1417 \begin_layout LyX-Code
1423 \begin_layout LyX-Code
1429 \begin_layout LyX-Code
1435 \begin_layout LyX-Code
1441 \begin_layout LyX-Code
1447 \begin_layout LyX-Code
1453 \begin_layout Standard
1454 This sets things up for Avery label sheets, stock #5360.
1455 You're now ready to print labels, but you'll need to insert LaTeX code,
1456 placing the commands
1457 \begin_inset Flex CharStyle:Code
1460 \begin_layout Plain Layout
1469 \begin_inset Flex CharStyle:Code
1472 \begin_layout Plain Layout
1480 around each label text.
1481 This and other special features of
1482 \begin_inset Flex CharStyle:Code
1485 \begin_layout Plain Layout
1491 are explained in its documentation.
1494 \begin_layout Standard
1495 Someday, someone may write a LyX layout file to support this package directly.
1496 Maybe that someone is you.
1499 \begin_layout Subsubsection
1500 Example #3: Paragraph Indentation
1503 \begin_layout Standard
1504 Americans are trained to indent the first line of
1509 As with all of their other weird quirks, most Americans will whine and
1510 moan until they can have their way and indent the first line of all paragraphs.
1519 \begin_layout Standard
1520 Of course, this behavior isn't standard typography.
1521 In books, you typically only indent the first line of a paragraph
1525 it follows another one.
1526 The idea behind indenting the first line of a paragraph is to distinguish
1527 neighboring paragraphs from one another.
1528 If there is no previous paragraph—for example, if it follows a figure or
1529 is the first paragraph in a section—then there is no need for indentation.
1533 \begin_layout Standard
1534 If you're a typical American (we're still joking!), though, you don't care
1535 about such esoteric things; you want your indentation! Add this to the
1539 \begin_layout LyX-Code
1542 usepackage{indentfirst}
1545 \begin_layout Standard
1546 If your TeX distribution isn't braindead, you'll have this package, and
1547 all of your paragraphs will get the indentation the Founding Fathers intended
1551 \begin_layout Subsubsection
1552 Example #4: This Document
1555 \begin_layout Standard
1556 You can also check out the preamble of this document to get an idea of some
1557 of the advanced things you can do.
1558 Also, there are more examples and an assortment of LaTeX
1559 \begin_inset Quotes eld
1563 \begin_inset Quotes erd
1567 \begin_inset space ~
1571 \begin_inset CommandInset ref
1573 reference "cha:secrets"
1581 \begin_layout Section
1582 LyX and LaTeX Errors
1585 \begin_layout Standard
1586 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1588 It then uses the logfile from the LaTeX run to do a post-mortem.
1589 After analyzing the logfile,LyX displays a dialog listing the errors.
1590 Clicking on any one of them will take you to the position in your LyX file
1591 where the error occurred.
1595 \begin_layout Plain Layout
1597 Analyzing the logfile is a tough job, and LyX doesn't always go to the
1599 There are also cases where LaTeX reports the error on one line, but the
1600 actual error is earlier.
1601 This is not unlike forgetting a closing brace in a program: You'll get
1602 an error, but only later.
1610 \begin_layout Standard
1611 Some folks also like to look at the log file directly: It is available from
1613 \begin_inset Flex CharStyle:MenuItem
1616 \begin_layout Plain Layout
1619 \SpecialChar \menuseparator
1623 \begin_inset space ~
1632 There are some fairly common error messages and warnings.
1633 We'll cover those here.
1634 You should look at a good LaTeX book for a complete listing.
1637 \begin_layout Itemize
1638 \begin_inset Flex CharStyle:Code
1641 \begin_layout Plain Layout
1648 \begin_inset Newline newline
1651 Anything beginning with these words is a warning message for the purpose
1653 \begin_inset Quotes eld
1657 \begin_inset Quotes erd
1660 the LaTeX code itself.
1661 You'll get messages like this if you added or changed cross-references
1662 or bibliography entries, in which case, LaTeX is trying to tell you that
1663 you need to make another run.
1664 You can by-and-large ignore these.
1667 \begin_layout Itemize
1668 \begin_inset Flex CharStyle:Code
1671 \begin_layout Plain Layout
1678 \begin_inset Newline newline
1681 Another warning message, this time about fonts which LaTeX couldn't find.
1682 The rest of the message will often say something about a replacement font
1684 You can safely ignore these, too.
1687 \begin_layout Itemize
1688 \begin_inset Flex CharStyle:Code
1691 \begin_layout Plain Layout
1700 \begin_inset Newline newline
1708 They are warnings about lines that were too long and run past the right
1710 Almost always, this is unnoticeable in the final output.
1711 (It can be just a point or two.) Or, only one or two characters extend past
1713 LaTeX seems to generate at least one of these messages for just about any
1715 \begin_inset Newline newline
1718 You can ignore these messages.
1719 Your eyes will tell you if there's a problem with something that's too
1720 wide; just look at the output.
1724 \begin_layout Plain Layout
1725 You can also enable the `draft' option in
1726 \begin_inset Flex CharStyle:MenuItem
1729 \begin_layout Plain Layout
1732 \SpecialChar \menuseparator
1740 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1748 \begin_layout Itemize
1749 \begin_inset Flex CharStyle:Code
1752 \begin_layout Plain Layout
1761 \begin_inset Newline newline
1764 Not quite as common as its cousin.
1765 LaTeX seems to like to print lines that are a bit too wide as opposed to
1766 ones that are a bit too narrow.
1767 We have no idea why.
1770 \begin_layout Itemize
1771 \begin_inset Flex CharStyle:Code
1774 \begin_layout Plain Layout
1783 \begin_inset Flex CharStyle:Code
1786 \begin_layout Plain Layout
1795 \begin_inset Newline newline
1798 Warnings about troubles breaking the page.
1799 Once again, just look at the output.
1800 Your eyes will tell you where something has gone wrong.
1803 \begin_layout Itemize
1804 \begin_inset Flex CharStyle:Code
1807 \begin_layout Plain Layout
1809 \begin_inset Quotes els
1813 \begin_inset Quotes ers
1822 \begin_inset Newline newline
1826 \begin_inset Quotes eld
1830 \begin_inset Quotes erd
1833 isn't installed on this system.
1834 This usually appears because some package your document needs isn't installed.
1835 If you didn't touch the preamble or didn't use the
1836 \begin_inset Flex CharStyle:Code
1839 \begin_layout Plain Layout
1847 command, then one of the packages LyX tried to load is missing.
1849 \begin_inset Flex CharStyle:MenuItem
1852 \begin_layout Plain Layout
1853 Help\SpecialChar \menuseparator
1859 to get a list of packages that LyX knows about.
1860 This file is updated whenever you reconfigure LyX (using
1861 \begin_inset Flex CharStyle:MenuItem
1864 \begin_layout Plain Layout
1865 Tools\SpecialChar \menuseparator
1871 ) and tells you which packages have been detected and what they do.
1872 \begin_inset Newline newline
1876 \begin_inset Flex CharStyle:Code
1879 \begin_layout Plain Layout
1887 command and the package in question isn't installed, then you'll need to
1888 install it yourself.
1891 \begin_layout Itemize
1892 \begin_inset Flex CharStyle:Code
1895 \begin_layout Plain Layout
1896 LaTeX Error: Unknown option
1902 \begin_inset Newline newline
1905 Error messages beginning with this are trying to tell you that you specified
1906 a bad or undefined option to a package.
1907 Check the package's documentation.
1910 \begin_layout Itemize
1911 \begin_inset Flex CharStyle:Code
1914 \begin_layout Plain Layout
1915 Undefined control sequence
1921 \begin_inset Newline newline
1924 If you've inserted LaTeX code into your document, but made a typo, you'll
1926 You may have forgotten to load a package.
1927 In any case, this error message usually means that you used an undefined
1932 \begin_layout Standard
1933 There are other error and warning messages.
1934 Some are self-explanatory.
1935 These are usually LaTeX messages.
1936 Others are downright cryptic.
1937 These are usually TeX error messages, and we really have
1941 what they mean or how to decipher them.
1945 \begin_layout Standard
1946 There's a general sequence you should follow if you get error messages:
1949 \begin_layout Enumerate
1950 Look at the LaTeX code you inserted for typos.
1953 \begin_layout Enumerate
1954 If there are no typos, check that you used the command(s) correctly.
1957 \begin_layout Enumerate
1958 If you get a bunch of error boxes piled up at the very top of the document—and
1959 especially if you see a
1960 \begin_inset Quotes eld
1964 \begin_inset Flex CharStyle:Code
1967 \begin_layout Plain Layout
1976 \begin_inset Quotes erd
1979 error—it means that there are errors in the preamble.
1980 Start debugging your preamble.
1983 \begin_layout Enumerate
1984 If you didn't add anything to the preamble and didn't add any LaTeX code
1985 to the document, the first suspect is your LaTeX distribution itself.
1986 Check for missing packages and install them.
1989 \begin_layout Enumerate
1990 Okay, so there are no missing packages.
1991 Did you use any of the fine-tuning options in LyX? Specifically, did you
1996 any of them, like trying to manually insert lots of
1997 \begin_inset Flex CharStyle:Code
2000 \begin_layout Plain Layout
2002 \begin_inset space ~
2011 \begin_inset Flex CharStyle:Code
2014 \begin_layout Plain Layout
2021 \begin_inset Flex CharStyle:Code
2024 \begin_layout Plain Layout
2030 ? Did you try to kludge something together with these instead of using the
2031 appropriate paragraph environment?
2034 \begin_layout Enumerate
2035 All right, you didn't use any of the fine-tuning options, you played by
2037 Did you try to pull a fancy maneuver? Did you do something funky inside
2038 a table or an equation, like inserting a graphic into a table cell?
2041 \begin_layout Enumerate
2042 Do you have long sections of text where LaTeX cannot find a place to break
2043 a line? By default, LaTeX is rather strict about how much extra inter-word
2044 spacing it will add in order to break a line.
2045 Preferably, you should rework the paragraph to avoid the problem.
2046 If this isn't an option, you can wrap your text in
2047 \begin_inset Flex CharStyle:Code
2050 \begin_layout Plain Layout
2058 to make LaTeX's line breaking more, well, sloppy.
2061 \begin_layout Enumerate
2062 Did you go overboard with the nesting? LyX (currently) doesn't check to
2063 make sure you're in the limits for nesting environments.
2064 If you nested a bunch of environments to the
2065 \begin_inset Formula $17^{\mathrm{th}}$
2068 level, that's the problem.
2069 (The limit in LaTeX is five.)
2072 \begin_layout Enumerate
2073 Okay, you didn't get any error messages, but your output looks awful.
2074 If you have a table or figure that's too wide or long for the page, you
2079 \begin_layout Enumerate
2080 rescale the figure so it fits.
2083 \begin_layout Enumerate
2084 trim down the table so it fits.
2088 \begin_layout Enumerate
2089 If something else is wrong with the output, and you didn't try to pull anything
2090 fancy or kludge the fine-tuning options, we're not sure what's wrong.
2093 \begin_layout Standard
2094 If all this doesn't help—well, then
2098 you might have found a bug in LyX\SpecialChar \ldots{}
2102 \begin_layout Chapter
2106 \begin_layout Section
2107 Customizing Bibliographies with BibTeX
2110 \begin_layout Standard
2111 The most basic information about how to use BibTeX with LyX is contained
2114 Bibliography databases (BibTeX)
2121 The following subsections explain special bibliography features supported
2125 \begin_layout Subsection
2126 Alternative Citation Styles
2129 \begin_layout Standard
2130 Standard BibTeX uses numbers (e.
2131 \begin_inset space \thinspace{}
2135 \begin_inset space \space{}
2139 \begin_inset Quotes eld
2143 \begin_inset Quotes erd
2146 ) to refer to a cited work.
2147 However, in many scientific disciplines, other citation styles are in use.
2148 The most common one is the author-year style (e.
2149 \begin_inset space \thinspace{}
2153 \begin_inset space \space{}
2157 \begin_inset Quotes eld
2161 \begin_inset Quotes erd
2165 LyX supports two packages that provide this style,
2166 \begin_inset Flex CharStyle:Code
2169 \begin_layout Plain Layout
2176 \begin_inset Flex CharStyle:Code
2179 \begin_layout Plain Layout
2186 Both packages have their pros and cons, which cannot be listed in detail.
2187 If you only want to have simple author-year (or author-numerical) style,
2188 or if you want to use one of the countless style files for
2189 \begin_inset Flex CharStyle:Code
2192 \begin_layout Plain Layout
2198 , than the established
2199 \begin_inset Flex CharStyle:Code
2202 \begin_layout Plain Layout
2208 package is probably your choice.
2209 If you need special features like short title references, ibidem etc., you
2211 \begin_inset Flex CharStyle:Code
2214 \begin_layout Plain Layout
2223 \begin_layout Standard
2224 The handling of both packages in LyX is basically the same.
2226 \begin_inset Flex CharStyle:MenuItem
2229 \begin_layout Plain Layout
2230 Document\SpecialChar \menuseparator
2237 \begin_inset Flex CharStyle:MenuItem
2240 \begin_layout Plain Layout
2247 \begin_inset Flex CharStyle:MenuItem
2250 \begin_layout Plain Layout
2257 \begin_inset Flex CharStyle:MenuItem
2260 \begin_layout Plain Layout
2267 With both packages, you will get some extra features in the citation dialog
2268 and you can select the style of the reference (
2269 \begin_inset Quotes eld
2273 \begin_inset Quotes erd
2277 \begin_inset Quotes eld
2281 \begin_inset Quotes erd
2285 \begin_inset Quotes eld
2289 \begin_inset Quotes erd
2293 \begin_inset Quotes eld
2297 \begin_inset Quotes erd
2301 Note that both packages need specifically designed style files.
2302 They both ship their own, but there are lots of additional style files,
2303 and there is even an interactive style file builder
2307 \begin_layout Plain Layout
2309 \begin_inset Flex URL
2312 \begin_layout Plain Layout
2314 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2325 \begin_inset Flex CharStyle:Code
2328 \begin_layout Plain Layout
2337 \begin_layout Subsection
2338 Sectioned Bibliographies
2341 \begin_layout Standard
2342 Sometimes you might need to divide your bibliography into several sections.
2343 If you are for instance a historian, the possibility to separate sources
2344 and scientific works is most likely a
2345 \begin_inset Quotes eld
2349 \begin_inset Quotes erd
2353 Unfortunately, BibTeX itself does not allow you to do this.
2354 But with the help of some LaTeX packages, BibTeX can be extended to fit
2358 \begin_layout Standard
2359 LyX provides native support for one of these packages,
2367 \begin_layout Plain Layout
2369 \begin_inset Flex URL
2372 \begin_layout Plain Layout
2374 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2384 The advantage of this package (compared to other packages like
2388 ) is that you don't need to define new citation commands.
2389 Instead, you need to prepare different bibliographic databases which include
2390 the entries for the different sections of the bibliography.
2391 For example: If you want to divide your bibliography into the sections
2393 \begin_inset Quotes eld
2397 \begin_inset Quotes erd
2401 \begin_inset Quotes eld
2405 \begin_inset Quotes erd
2408 , you first need to create two bibliographic databases, e.
2409 \begin_inset space \thinspace{}
2413 \begin_inset space \space{}
2417 \begin_inset Flex CharStyle:Code
2420 \begin_layout Plain Layout
2427 \begin_inset Flex CharStyle:Code
2430 \begin_layout Plain Layout
2440 \begin_layout Standard
2442 \begin_inset Flex CharStyle:MenuItem
2445 \begin_layout Plain Layout
2446 Document\SpecialChar \menuseparator
2453 \begin_inset Flex CharStyle:MenuItem
2456 \begin_layout Plain Layout
2463 \begin_inset Flex CharStyle:MenuItem
2466 \begin_layout Plain Layout
2467 Sectioned bibliography
2473 Now you can insert multiple BibTeX bibliographies, one for each section
2474 of your bibliography.
2475 Returning to our example: Insert the BibTeX bibliography
2476 \begin_inset Flex CharStyle:Code
2479 \begin_layout Plain Layout
2485 and a second one for the database
2486 \begin_inset Flex CharStyle:Code
2489 \begin_layout Plain Layout
2496 You are free to use the same or different styles for each section.
2497 Additionally, you can chose if the bibliography section should contain
2499 \begin_inset Quotes eld
2502 all cited references
2503 \begin_inset Quotes erd
2506 of the specified database(s) (which is the default),
2507 \begin_inset Quotes eld
2510 all uncited references
2511 \begin_inset Quotes erd
2515 \begin_inset Quotes eld
2519 \begin_inset Quotes erd
2523 This might be useful if you would like to separate your bibliography into
2525 \begin_inset Quotes eld
2529 \begin_inset Quotes erd
2533 \begin_inset Quotes eld
2537 \begin_inset Quotes erd
2541 \begin_inset Quotes eld
2545 \begin_inset Quotes erd
2549 The titles for the sections can be added as ordinary sections or subsections.
2551 \begin_inset Flex CharStyle:Code
2554 \begin_layout Plain Layout
2560 removes the bibliography title, you have manually re-add that, too (as
2561 a chapter* or section*, for instance).
2564 \begin_layout Subsection
2565 Multiple Bibliographies
2568 \begin_layout Standard
2569 Multiple bibliographies, e.
2570 \begin_inset space \thinspace{}
2574 \begin_inset space \space{}
2577 a bibliography for each section or chapter of the document, are not supported
2580 \begin_inset Flex CharStyle:Code
2583 \begin_layout Plain Layout
2589 package, which is used for the creation of sectioned bibliographies in
2590 LyX (see the previous section), provides an easy way to solve this task,
2591 if you are willing to use some
2592 \begin_inset Flex CharStyle:MenuItem
2595 \begin_layout Plain Layout
2602 \begin_inset space ~
2606 \begin_inset CommandInset ref
2608 reference "sec:Inserting-TeX-Code"
2616 \begin_layout Plain Layout
2617 An alternative approach is to use the
2618 \begin_inset Flex CharStyle:Code
2621 \begin_layout Plain Layout
2628 \begin_inset Flex CharStyle:Code
2631 \begin_layout Plain Layout
2637 package, respectively.
2645 \begin_layout Standard
2647 \begin_inset Flex CharStyle:MenuItem
2650 \begin_layout Plain Layout
2651 Document\SpecialChar \menuseparator
2658 \begin_inset Flex CharStyle:MenuItem
2661 \begin_layout Plain Layout
2668 \begin_inset Flex CharStyle:MenuItem
2671 \begin_layout Plain Layout
2672 Sectioned bibliography
2678 In the document, you have to enclose the sections, which shall contain
2679 their own bibliography (including the BibTeX bibliography itself), between
2681 \begin_inset Flex CharStyle:Code
2684 \begin_layout Plain Layout
2693 \begin_inset Flex CharStyle:Code
2696 \begin_layout Plain Layout
2704 (those commands have to be inserted as TeX code).
2705 The bibliography will contain all references which have been cited in the
2707 \begin_inset Flex CharStyle:Code
2710 \begin_layout Plain Layout
2721 If you are using this approach, then every citation reference has to be
2723 \begin_inset Flex CharStyle:Code
2726 \begin_layout Plain Layout
2734 \begin_inset Flex CharStyle:Code
2737 \begin_layout Plain Layout
2746 \begin_layout Section
2750 \begin_layout Subsection
2754 \begin_layout Standard
2755 When you are working on a large file with many sections, it is often convenient
2756 to break up the document into several files, or perhaps you have something
2757 where a table may change from time to time, but the preceding text does
2759 In these cases, you should seriously consider using multipart documents.
2760 For example, scientific papers often have five major sections: the introduction
2761 , observations, results, discussion, and conclusion.
2762 Each of these could be its own separate LyX file, with one
2763 \begin_inset Quotes eld
2767 \begin_inset Quotes erd
2770 file which contains the title, authors, abstract, references, etc., plus
2771 the five included files.
2772 It is important to note that each of these files is a full LyX file which
2773 can be formatted and printed on its own, as well as included in a master
2775 Each of these files must have the same document class, however—don't attempt
2776 to mix book classes with article classes.
2777 You may also include LaTeX files; however, these files must not have their
2779 \begin_inset space \thinspace{}
2783 \begin_inset space \space{}
2786 everything up to and including the
2787 \begin_inset Flex CharStyle:Code
2790 \begin_layout Plain Layout
2799 \begin_inset Flex CharStyle:Code
2802 \begin_layout Plain Layout
2810 line must be deleted) or else errors will be generated when you try to
2814 \begin_layout Standard
2815 LyX allows you to include files quite easily with
2816 \begin_inset Flex CharStyle:MenuItem
2819 \begin_layout Plain Layout
2820 Insert\SpecialChar \menuseparator
2822 \begin_inset space ~
2831 When you click on this selection a small box is inserted into the file
2832 at the current cursor location.
2833 Clicking on the box raises a dialog which allows you to select the file
2834 to be included, and the method of its inclusion.
2838 \begin_layout Standard
2839 The file selection box should by now be obvious.
2840 The three inclusion methods are
2841 \begin_inset Quotes eld
2845 \begin_inset Quotes erd
2849 \begin_inset Quotes eld
2853 \begin_inset Quotes erd
2857 \begin_inset Quotes eld
2861 \begin_inset Quotes erd
2865 The difference between
2866 \begin_inset Quotes eld
2870 \begin_inset Quotes erd
2874 \begin_inset Quotes eld
2878 \begin_inset Quotes erd
2881 is really only meaningful to LaTeXperts, but the practical difference is
2882 that files which are
2883 \begin_inset Quotes eld
2887 \begin_inset Quotes erd
2890 are typeset beginning on a new page, while files which are
2891 \begin_inset Quotes eld
2895 \begin_inset Quotes erd
2898 are typeset starting on the current page.
2901 \begin_layout Standard
2902 Generally, the master file is converted into a full LaTeX file before typesettin
2903 g, while the included files are converted to LaTeX files which do not have
2904 all the preamble information.
2907 \begin_layout Standard
2909 \begin_inset Quotes eld
2913 \begin_inset Quotes erd
2916 included file allows you to include a file typeset exactly as it appears
2918 \begin_inset space \thinspace{}
2922 \begin_inset space \space{}
2926 \begin_inset Flex CharStyle:Code
2929 \begin_layout Plain Layout
2935 mode, with the characters set in a fixed-width typewriter font.
2936 Normally, spaces in this file are invisible, though two consecutive spaces
2937 are conserved, unlike LyX's normal treatment of spaces.
2938 However, setting the
2939 \begin_inset Flex CharStyle:MenuItem
2942 \begin_layout Plain Layout
2944 \begin_inset space ~
2948 \begin_inset space ~
2952 \begin_inset space ~
2960 checkbox typesets a mark to unambiguously define the presence of a space.
2964 \begin_layout Subsection
2965 Cross-References Between Files
2968 \begin_layout Standard
2969 \begin_inset Box Shadowbox
2978 height_special "totalheight"
2981 \begin_layout Plain Layout
2982 This section is somewhat out of date.
2983 Need to describe default master documents and how children are opened when
2993 \begin_layout Standard
2994 It is possible to set up cross-references between the different files.
2995 First, open all the files in question: let's call them A and B in a two
2996 file example, where B is included in A.
2997 Let's say you insert a label in A, then want to reference it in B.
2998 Open the cross-reference dialog in whilst in document B, and you can select
3000 \begin_inset Quotes eld
3004 \begin_inset Quotes erd
3010 \begin_layout Subsection
3011 Bibliography Lists in all Subdocuments
3014 \begin_layout Standard
3015 \begin_inset Box Frameless
3024 height_special "totalheight"
3027 \begin_layout Plain Layout
3028 This section also needs updating.
3029 There is now material about this on the wiki, and it could be copied here.
3037 \begin_layout Standard
3038 Copy the bibliography list with all entries to all subdocuments and transform
3040 This way LyX will find the
3041 \begin_inset Flex CharStyle:Code
3044 \begin_layout Plain Layout
3050 -files and you can easily insert references without making the bibliography
3054 \begin_layout Standard
3055 As the bibliography list is in a comment, LaTeX won't use use it and the
3056 references will look like this: [?], instead of like this: [1].
3057 One solution is to use the LaTeX-package
3058 \begin_inset Flex CharStyle:Code
3061 \begin_layout Plain Layout
3067 that will only include comments by processing the files separately.
3068 To do this, add in the LaTeX preamble of every subdocument the following:
3071 \begin_layout LyX-Code
3077 \begin_layout LyX-Code
3080 includecomment{comment}
3083 \begin_layout Standard
3085 \begin_inset Flex URL
3088 \begin_layout Plain Layout
3090 http://wiki.lyx.org/FAQ/Unsorted#toc31
3098 \begin_layout Section
3099 Fancy Headers and Footers
3102 \begin_layout Standard
3103 The default page layout is rather plain; for an
3104 \begin_inset Flex CharStyle:Code
3107 \begin_layout Plain Layout
3113 document class, all you get is a centered page number at the bottom of
3115 This document uses KOMA-script's book class, so it appears to be a bit
3117 But to really put on a show, you need to set the document page style to
3119 \begin_inset Quotes eld
3123 \begin_inset Quotes erd
3126 , as mentioned in the
3131 This section describes the LaTeX code you need to insert in your LaTeX
3132 preamble in order to get the desired effects.
3135 \begin_layout Standard
3136 For more information on fancy headers, see the
3137 \begin_inset Flex CharStyle:Code
3140 \begin_layout Plain Layout
3146 package documentation.
3147 This can be found in the file
3148 \begin_inset Flex CharStyle:Code
3151 \begin_layout Plain Layout
3157 , which should have been installed with your LaTeX distribution, or
3158 \begin_inset CommandInset href
3161 target "http://www.ctan.org/tex-archive/macros/latex/contrib/fancyhdr/"
3168 \begin_layout Standard
3169 The page header is divided into three fields, not surprisingly labeled
3170 \begin_inset Quotes eld
3174 \begin_inset Quotes erd
3178 \begin_inset Quotes eld
3182 \begin_inset Quotes erd
3186 \begin_inset Quotes eld
3190 \begin_inset Quotes erd
3194 The footer is also divided into these three fields.
3195 The LaTeX commands to set these fields in the simplest manner are
3196 \begin_inset Flex CharStyle:Code
3199 \begin_layout Plain Layout
3208 \begin_inset Flex CharStyle:Code
3211 \begin_layout Plain Layout
3220 \begin_inset Flex CharStyle:Code
3223 \begin_layout Plain Layout
3232 \begin_inset Flex CharStyle:Code
3235 \begin_layout Plain Layout
3244 Suppose you wish to put your name in the upper left hand corner of each
3246 Simply insert the following command in the preamble:
3249 \begin_layout Standard
3258 \begin_layout Standard
3259 You will now see your name in the upper left.
3260 If a field has a default entry that you would like to get rid of (often
3261 the page number appears in the central footer, simply include a command
3262 with a blank argument, e.
3263 \begin_inset space \thinspace{}
3269 \begin_layout Standard
3277 \begin_layout Standard
3278 Let's get really fancy: lets put the section number with the word
3279 \begin_inset Quotes eld
3283 \begin_inset Quotes erd
3287 \begin_inset space \thinspace{}
3291 \begin_inset space \space{}
3294 Section 3) in the upper left, the page number (e.
3295 \begin_inset space \thinspace{}
3299 \begin_inset space \space{}
3302 Page 4) in the upper right, your name in the lower left, and the date in
3304 The following commands should now appear in the preamble:
3307 \begin_layout Standard
3317 \begin_layout Standard
3325 \begin_layout Standard
3335 \begin_layout Standard
3344 \begin_layout Standard
3352 \begin_layout Standard
3362 \begin_layout Standard
3364 \begin_inset Flex CharStyle:Code
3367 \begin_layout Plain Layout
3376 \begin_inset Flex CharStyle:Code
3379 \begin_layout Plain Layout
3387 access LaTeX's section and page counters, and so print out the current
3388 section and page numbers.
3390 \begin_inset Flex CharStyle:Code
3393 \begin_layout Plain Layout
3401 simply prints out today's date.
3404 \begin_layout Standard
3405 The thicknesses of the horizontal rules drawn beneath the header and above
3406 the footer can also be modified.
3407 If you don't want one of the rules, set its thickness to 0.
3408 The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3414 \begin_inset Flex CharStyle:Code
3417 \begin_layout Plain Layout
3422 headrulewidth}{0.4pt}
3428 \begin_inset Flex CharStyle:Code
3431 \begin_layout Plain Layout
3436 footrulewidth}{0.4pt}
3441 to set the thicknesses.
3444 \begin_layout Standard
3445 You can switch the header/footer settings on and off for individual pages
3447 \begin_inset Flex CharStyle:Code
3450 \begin_layout Plain Layout
3453 thispagestyle{empty}
3459 \begin_inset Flex CharStyle:Code
3462 \begin_layout Plain Layout
3465 thispagestyle{plain}
3471 \begin_inset Flex CharStyle:Code
3474 \begin_layout Plain Layout
3477 thispagestyle{fancy}
3483 Simply insert them in the text on the page you want changed and mark them
3485 In fact, title pages are marked as plain by default, while following pages
3486 are marked fancy when using the global fancy setting.
3489 \begin_layout Standard
3490 As a final example, it is possible to include an image in the header or
3492 Suppose you want to put a company logo in the upper lefthand corner.
3493 You might try something like
3496 \begin_layout Standard
3505 includegraphics{logo.eps}}}
3508 \begin_layout Standard
3510 (you may need to preface this with
3511 \begin_inset Flex CharStyle:Code
3514 \begin_layout Plain Layout
3518 usepackage{graphics}
3523 if you don't include graphics elsewhere in your document).
3526 \begin_layout Section
3527 Itemize Bullet Selection
3528 \begin_inset CommandInset label
3537 \begin_layout Standard
3543 \begin_layout Subsection
3547 \begin_layout Standard
3548 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3549 Using this dialog you can easily specify what bullet shape to use at each
3550 level of an itemized list.
3551 These settings are document-wide so you won't be able to specify different
3552 sets of bullets for different paragraphs.
3556 \begin_layout Plain Layout
3557 Well, actually you can but you'll have to do it by hand.
3565 \begin_layout Subsection
3569 \begin_layout Standard
3570 Open the dialog by selecting the
3571 \begin_inset Flex CharStyle:MenuItem
3574 \begin_layout Plain Layout
3575 Document\SpecialChar \menuseparator
3581 menu item and then select the
3582 \begin_inset Flex CharStyle:MenuItem
3585 \begin_layout Plain Layout
3594 \begin_layout Standard
3595 The dialog provides you with a table of bullet shapes.
3596 A column of buttons on the left of the table provides access to the six
3597 different panels of bullet shapes.
3598 The row of buttons across the top is used to select which bullet depth
3600 A text entry under the table shows the currently selected bullet shape's
3601 LaTeX equivalent and this can be edited if desired.
3602 If you do modify the text you will also need to specify any needed packages
3603 in the LaTeX preamble.
3606 \begin_layout Standard
3607 The six panels are divided up by the packages they require.
3608 The following table shows the mappings from button name to LaTeX packages.
3611 \begin_layout Standard
3613 \begin_inset Tabular
3614 <lyxtabular version="3" rows="7" columns="2">
3615 <features tabularvalignment="middle">
3616 <column alignment="center" valignment="top" width="0pt">
3617 <column alignment="center" valignment="top" width="0pt">
3619 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3622 \begin_layout Plain Layout
3637 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3640 \begin_layout Plain Layout
3657 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3660 \begin_layout Plain Layout
3675 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3678 \begin_layout Plain Layout
3694 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3697 \begin_layout Plain Layout
3712 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3715 \begin_layout Plain Layout
3732 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3735 \begin_layout Plain Layout
3750 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3753 \begin_layout Plain Layout
3770 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3773 \begin_layout Plain Layout
3788 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3791 \begin_layout Plain Layout
3808 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3811 \begin_layout Plain Layout
3826 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3829 \begin_layout Plain Layout
3846 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3849 \begin_layout Plain Layout
3864 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3867 \begin_layout Plain Layout
3890 \begin_layout Standard
3891 LyX doesn't stop you using bullets from packages you don't have.
3892 If you get errors from LaTeX when you try to view or print the file, then
3893 it is likely you are missing a package.
3897 \begin_layout Plain Layout
3898 LyX doesn't restrict your use since you may be editing locally and exporting
3907 \begin_layout Subsection
3911 \begin_layout Standard
3912 Select which bullet depth you want to change then select the bullet shape
3914 Any changes will not be visible in LyX, but are visible when viewing the
3918 \begin_layout Standard
3919 You can reset a bullet shape to the default simply by clicking your right
3920 mouse button on the appropriate bullet depth button.
3924 \begin_layout Plain Layout
3929 want to have multiple sets of paragraphs with different sets of bullets
3930 in each, then you're going to have to get your hands dirty with TeX code.
3931 The bullet selection dialog can help though because it provides you with
3932 the LaTeX code for a wide range of bullet shapes.
3933 To make your own custom paragraphs you have the following options:
3936 \begin_layout Plain Layout
3940 \begin_layout Plain Layout
3956 \begin_layout Plain Layout
3960 \begin_layout Plain Layout
3982 \begin_layout Itemize
3983 Use the LaTeX command
3984 \begin_inset Flex CharStyle:Code
3987 \begin_layout Plain Layout
3995 to specify a new bullet shape for a given depth.
3996 You'll also need to save the current bullet shape so you can restore it
3998 In this itemized list the following LaTeX code was used to change the bullet
3999 used for the first depth.
4003 \begin_layout LyX-Code
4013 \begin_layout LyX-Code
4030 \begin_layout Itemize
4031 Note that the itemize depth is specified in Roman numerals as part of the
4041 \begin_layout Itemize
4045 \begin_layout Plain Layout
4058 Specify each individual entry by starting each item with the bullet shape
4059 enclosed in square brackets and set as
4060 \begin_inset Flex CharStyle:MenuItem
4063 \begin_layout Plain Layout
4070 For example, this item was started with
4071 \begin_inset Flex CharStyle:Code
4074 \begin_layout Plain Layout
4089 \begin_layout Plain Layout
4093 \begin_layout Plain Layout
4109 \begin_layout Plain Layout
4110 You'll also need to revert the labelitem back to its previous setting for
4111 the global bullet shape settings to remain in effect.
4112 The way used here was:
4115 \begin_layout LyX-Code
4130 \begin_layout Chapter
4131 LyX and the World Wide Web
4134 \begin_layout Standard
4135 LyX has long supported the export of documents to various web-friendly formats,
4137 Before verson 1.7, however, HTML export was always accomplished by the use
4138 of external converters.
4142 \begin_layout Plain Layout
4143 For details on the use of external converters with LyX, see the
4148 section of the Customization manual.
4153 These fall into two large groups: there are converters that use LaTeX as
4154 an intermediate format, such as
4155 \begin_inset Flex CharStyle:Code
4158 \begin_layout Plain Layout
4165 \begin_inset Flex CharStyle:Code
4168 \begin_layout Plain Layout
4175 \begin_inset Flex CharStyle:Code
4178 \begin_layout Plain Layout
4184 , relying upon LyX to produce the LaTeX; and there is a converter that works
4185 directly on LyX files,
4186 \begin_inset Flex CharStyle:Code
4189 \begin_layout Plain Layout
4196 All of these have different advantages and disadvantages.
4200 \begin_layout Standard
4201 The LaTeX-based converters have the advantage that, in principle, they know
4202 everything about the exported document that LaTeX does.
4203 Such converters do not care, for example, if a certain block of code was
4204 produced by LyX or was Evil Red Text.
4206 \begin_inset Flex CharStyle:Code
4209 \begin_layout Plain Layout
4215 files, counters, and references, and can often make use of the
4216 \begin_inset Flex CharStyle:Code
4219 \begin_layout Plain Layout
4225 files generated by BibTeX.
4226 On the other hand, LaTeX is a very hard language to parse---it is sometimes
4227 said that only TeX itself understands TeX---and LaTeX-based converters
4228 will often choke on what seem to be quite simple constructs; complex ones
4229 can throw them completely, and as of this writing, for example, the
4233 manual will not export with
4234 \begin_inset Flex CharStyle:Code
4237 \begin_layout Plain Layout
4243 , though the others will.
4244 The other issue concerns how math is handled.
4245 These converters typically convert the formulae into little pictures that
4246 are then linked from the HTML document.
4247 Since these are actually generated by LaTeX, they are accurate.
4248 But they do not scale well, and just getting them to look as if they are
4249 actually meant to be in your document---so that the font sizes seem to
4250 be roughly the same---can be a challenge.
4253 \begin_layout Standard
4255 \begin_inset Flex CharStyle:Code
4258 \begin_layout Plain Layout
4264 solves some of these problems.
4265 In particular, its rendering of math tends to look better than
4266 \begin_inset Flex CharStyle:Code
4269 \begin_layout Plain Layout
4275 's, at least in simpler cases, since it renders math using a neat combination
4276 of HTML and CSS rather than converting the formulae to images.
4277 But more complex formula tend to be rendered less well than with
4278 \begin_inset Flex CharStyle:Code
4281 \begin_layout Plain Layout
4287 , since there is no reasonable way of scaling parentheses in HTML, for example.
4288 More importantly (as of version 0.39, at least),
4289 \begin_inset Flex CharStyle:Code
4292 \begin_layout Plain Layout
4298 has no support for math macros, for user-defined paragraph or character
4299 styles, or for tables of contents and figures.
4300 These limitations make
4301 \begin_inset Flex CharStyle:Code
4304 \begin_layout Plain Layout
4310 unsuitable for many of the documents more advanced LyX users would produce.
4311 In principle, of course, all of these problems could be solved, but the
4312 LyX developers have decided to follow a different path and made LyX itself
4313 capable of writing XHTML, just as it is capable of writing LaTeX, DocBook,
4317 \begin_layout Standard
4318 As of this writing, XHTML output remains under development and should probably
4320 \begin_inset Quotes eld
4324 \begin_inset Quotes erd
4331 \begin_layout Plain Layout
4333 \begin_inset Flex CharStyle:Code
4336 \begin_layout Plain Layout
4337 development/HTML.notes
4342 , which can be found in the LyX source tree or
4343 \begin_inset CommandInset href
4345 name "accessed online"
4346 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4350 , usually contains up-to-date information about the state of XHTML output.
4355 Still, the developers have chosen this approach because it has several
4356 potential advantages over the other two.
4359 \begin_layout Standard
4360 These advantages are primarily due to the fact that the XHTML output routines,
4361 since they are part of LyX, know everything LyX knows about the document
4366 \begin_layout Plain Layout
4367 Another advantege is that, since these routines are internal to LyX, they
4368 are immune to changes in LyX's file format, or to changes in the semantics
4374 So they know about the table of contents (as displayed in the Outline),
4375 about the counters associated with different paragraph styles, and about
4376 user-defined styles.
4377 The XHTML output routines know what LyX knows about internationalization,
4378 too, so they will output
4379 \begin_inset Quotes eld
4383 \begin_inset Quotes erd
4387 \begin_inset Quotes eld
4395 \begin_inset Quotes erd
4398 , depending upon the language in effect at the time.
4402 \begin_layout Standard
4403 Quite generally, the output routines know everything LyX knows about document
4404 layout, that is, about the document is to be rendered on screen.
4405 We can use this information when we output the document as XHTML.
4410 generates CSS style information corresponding to the layout information
4411 it uses to render the document on screen: if section headings are supposed
4412 to be sans-serif and bold as seen in LyX, then (by default) they will be
4413 sans-serif and bold when viewed in a web browser, too.
4414 And this is true not just for pre-defined styles, like Section, but for
4415 any style, including user-defined styles.
4416 Indeed, the XHTML output routines make no distinction between user-defined
4417 paragraph and character styles and LyX's own pre-defined styles: in each
4418 case, everything LyX knows about the styles is contained in the layout
4420 And much the same is true as regards pre-defined textual insets, such as
4421 footnotes, and custom versions.
4425 \begin_layout Standard
4426 The result is that XHTML output can be customized and extended in
4430 the same way LaTeX output can be customized and extended: through layout
4432 See chapter five of the
4436 manual for the details.
4439 \begin_layout Standard
4440 As for math, LyX renders math using MathML.
4441 This has advantages and disadvantages.
4442 The advantage is that MathML is a dialect of XML designed specifically
4443 for mathematics on the web, and it typically renders very well in browsers
4445 The first disadvantage is that not all browsers support MathML, and support
4446 is not complete even in the Gecko-based browsers, such as Firefox.
4447 A second disadvantage, as compared to rendering math by images, is that
4448 LyX can only output MathML for LaTeX constructs that it knows about, which
4449 means that the use of ERT in math---e.g., the command
4450 \begin_inset Flex CharStyle:Code
4453 \begin_layout Plain Layout
4462 \begin_inset Flex CharStyle:Code
4465 \begin_layout Plain Layout
4471 package---will produce nothing helpful.
4472 Eventually, therefore, LyX will offer the user the option to use MathML
4473 or images, and it will offer this choice on a case by case basis.
4476 \begin_layout Standard
4477 The remainder of this chapter contains more detailed information on XHTML
4478 output, its limitations, and ways around those limitations.
4481 \begin_layout Standard
4482 \begin_inset Note Note
4485 \begin_layout Plain Layout
4486 This is very incomplete at this point!
4494 \begin_layout Section
4495 Bibliography and Citations
4498 \begin_layout Standard
4499 XHTML output fully supports bibliographies and citations.
4503 \begin_layout Standard
4504 Citation labels are generated by exactly the same machinery that generates
4505 LyX's on-screen labels, so the labels will look in the output much as they
4506 do in LyX, though better.
4507 If you are using numerical citations, then LyX will output numerical labels,
4508 such as [1] or [17], rather than simply showing the citation key in square
4509 brackets, as it does on-screen.
4510 If you are using author-year citations, then LyX will add lowercase letters
4511 to the years, just as BibTeX does, if it finds more than one citation for
4512 a given author-year combination.
4513 The labels will be printed with the bibliography entries.
4514 Note that there is, at present, no way to customize the appearance of the
4515 labels, for example, to choose between square brackets and parentheses.
4518 \begin_layout Standard
4519 Bibliography output is handled by the same machinery that handles the presentati
4520 on of reference information in the citation dialog, so you will see in the
4521 XHTML output pretty much what you would see if you were to look at a given
4522 entry in the citation dialog.
4523 The formatting can be customized in your layout file or, preferably, in
4526 \begin_inset CommandInset ref
4528 reference "sub:Citation-format-description"
4536 manual for the details.
4539 \begin_layout Standard
4540 The other significant defect is that cross-referenced information is printed
4541 with every entry with which it is associated.
4542 So you can see things like this:
4547 \begin_inset Quotes eld
4550 Context and Logical Form
4551 \begin_inset Quotes erd
4556 Language in Context: Selected Essays
4558 (Oxford: Oxford University Press, 2007), pp.
4564 \begin_inset Quotes eld
4567 Semantics in Context
4568 \begin_inset Quotes erd
4573 Language in Context: Selected Essays
4575 (Oxford: Oxford University Press, 2007), pp.
4579 \begin_layout Standard
4580 This should be fixed before long.
4583 \begin_layout Standard
4584 There is no support at present for sectioned bibliographies.
4585 If you have multiple bibliographies, then LyX will print the same bibliography
4589 \begin_layout Section
4593 \begin_layout Standard
4594 LyX will happily export indexes as XHTML, but with certain limitations at
4598 \begin_layout Standard
4599 Index export will be most reliable when you do not attempt to use the fancy
4600 constructs that are described in the section on indexes in the
4608 \begin_layout Plain Layout
4609 The main issue here is that LyX itself does not really handle these.
4610 It just lets you enter what you would have to enter in raw LaTeX.
4615 We'll describe how they are handled using the subsection headings from
4619 \begin_layout Itemize
4620 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
4621 these, but the entries must be separated by
4622 \begin_inset Quotes eld
4626 \begin_inset Quotes erd
4629 , that is, there must be spaces around the exclamation point.
4630 This is because it is otherwise too difficult to check for escaped exclamation
4631 points, ones in math, and so forth.
4634 \begin_layout Itemize
4635 Page Ranges: There is no support at all for page ranges, since these make
4636 no sense with XHMTL.
4637 Instead, you will just get two index entries, one at either end.
4640 \begin_layout Itemize
4641 Cross-referencing: There is no support for cross-referencing.
4642 If LyX finds an entry containing the
4643 \begin_inset Quotes eld
4646 |see\SpecialChar \ldots{}
4648 \begin_inset Quotes erd
4651 construct, it is just dropped, and the rest is treated as an ordinary index
4655 \begin_layout Itemize
4656 Index Entry Order: LyX does support attempts to fix the sorting order.
4657 It will take what is before the first `@' it finds and use that for sorting,
4658 taking what follows the first `@' to be the actual entry.
4659 At present, LyX does not check for escaped `@', so do not try to index
4663 \begin_layout Itemize
4664 Index Entry Layout: You can format entries by using the text style dialog,
4665 or by using any other method available within LyX itself.
4666 There is no support for constructs like:
4667 \begin_inset Quotes eld
4671 \begin_inset Quotes erd
4675 Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
4676 and everything that follows it.
4679 \begin_layout Itemize
4680 Multiple Indexes: There is no support for multiple indexes.
4681 Rather, all index entries will be printed as one large index.
4682 To avoid our printing several versions of the index, we print only the
4683 main index, so make sure you have one.
4686 \begin_layout Section
4687 Nomenclature and Glossary
4690 \begin_layout Standard
4691 There is at present no support for glossaries.
4694 \begin_layout Chapter
4698 \begin_layout Section
4702 \begin_layout Standard
4703 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
4704 and retrieve information about the LyX internal state.
4705 This is only intended for advanced users, but they should find it useful.
4706 It is by writing to the LyX server, for example, that bibliography managers,
4707 such as JabRef, are able to
4708 \begin_inset Quotes eld
4712 \begin_inset Quotes erd
4718 \begin_layout Section
4719 Starting the LyX Server
4722 \begin_layout Standard
4723 The LyX server works through the use of a pair of named pipes.
4724 These are usually located in
4725 \begin_inset Flex CharStyle:Code
4728 \begin_layout Plain Layout
4734 , (except on Windows, where
4738 named pipes are special objects located in
4739 \begin_inset Flex CharStyle:Code
4742 \begin_layout Plain Layout
4754 ) and have the names
4755 \begin_inset Quotes eld
4759 \begin_inset Flex CharStyle:Code
4762 \begin_layout Plain Layout
4769 \begin_inset Quotes erd
4773 \begin_inset Quotes eld
4777 \begin_inset Flex CharStyle:Code
4780 \begin_layout Plain Layout
4787 \begin_inset Quotes erd
4791 External programs write into
4792 \begin_inset Flex CharStyle:Code
4795 \begin_layout Plain Layout
4801 and read back data from
4802 \begin_inset Flex CharStyle:Code
4805 \begin_layout Plain Layout
4812 The stem of the pipe names can be defined in the
4813 \begin_inset Flex CharStyle:MenuItem
4816 \begin_layout Plain Layout
4817 Tools\SpecialChar \menuseparator
4824 \begin_inset Flex CharStyle:Code
4827 \begin_layout Plain Layout
4828 "/home/myhome/lyxpipe"
4834 \begin_inset Flex CharStyle:Code
4837 \begin_layout Plain Layout
4856 configure this manually in order for the server to start.
4859 \begin_layout Standard
4861 \begin_inset Flex CharStyle:Code
4864 \begin_layout Plain Layout
4871 \begin_inset Flex CharStyle:Code
4874 \begin_layout Plain Layout
4880 ' to create the pipes.
4881 If one of the pipes already exists, LyX will assume that another LyX process
4882 is already running and will not start the server.
4883 On POSIX (Unix like) systems, if for some other reason, an unused
4884 \begin_inset Quotes eld
4888 \begin_inset Quotes erd
4891 pipe is left in existence when LyX closes, then LyX will try to delete
4893 If this fails for some reason, you will need to delete the pipes manually
4894 and then restart LyX.
4895 On Windows, pipes are deleted by the OS on program termination or crash,
4897 \begin_inset Quotes eld
4901 \begin_inset Quotes erd
4904 pipes should not be possible.
4907 \begin_layout Standard
4908 To have several LyX processes with servers at the same time, you have to
4909 use different configurations, perhaps by using separate user directories,
4911 \begin_inset Flex CharStyle:Code
4914 \begin_layout Plain Layout
4920 file, for each process.
4923 \begin_layout Standard
4924 If you are developing a client program, you might find it useful to enable
4925 debugging information from the LyX server.
4926 Do this by starting LyX as
4927 \begin_inset Flex CharStyle:Code
4930 \begin_layout Plain Layout
4939 \begin_layout Standard
4940 You can find a complete example client written in C in the source distribution
4942 \begin_inset Flex CharStyle:Code
4945 \begin_layout Plain Layout
4946 development/lyxserver/server_monitor.c
4954 \begin_layout Standard
4955 Another useful tool is command-line based client you will find in
4956 \begin_inset Flex CharStyle:Code
4959 \begin_layout Plain Layout
4960 src/client/lyxclient
4968 \begin_layout Section
4969 Normal communication
4972 \begin_layout Standard
4973 To issue a LyX call, the client writes a line of ASCII text into the input
4975 This line has the following format:
4992 \begin_layout Description
4993 clientname is a name that the client can choose arbitrarily.
4994 Its only use is that LyX will echo it if it sends an answer—so a client
4995 can dispatch results from different requesters.
4998 \begin_layout Description
4999 function is the function you want LyX to perform.
5000 It is the same as the commands you'd use in the minibuffer.
5003 \begin_layout Description
5004 argument is an optional argument which is meaningful only to some functions
5006 \begin_inset Quotes eld
5010 \begin_inset Quotes erd
5013 LFUN will insert the argument as text at the cursor position).
5016 \begin_layout Standard
5017 The answer from LyX will arrive in the output pipe and be of the form
5034 \begin_layout Standard
5043 are just echoed from the command request, while
5047 is more or less useful information filled according to how the command
5048 execution worked out.
5049 Some commands, such as
5050 \begin_inset Quotes eld
5054 \begin_inset Quotes erd
5057 , will return information about the internal state of LyX, while other will
5058 return an empty data-response.
5059 This means that the command execution went fine.
5062 \begin_layout Standard
5063 In case of errors, the response from LyX will have this form
5080 \begin_layout Standard
5085 should contain an explanation of why the command failed.
5088 \begin_layout Standard
5092 \begin_layout LyX-Code
5093 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5094 \begin_inset Newline newline
5097 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5098 \begin_inset Newline newline
5101 read a <~/.lyxpipe.out
5102 \begin_inset Newline newline
5108 \begin_layout Section
5112 \begin_layout Standard
5113 LyX can notify clients of events going on asynchronously.
5114 Currently it will only do this if the user binds a key sequence with the
5116 \begin_inset Quotes eld
5120 \begin_inset Quotes erd
5124 The format of the string LyX sends is as follows:
5128 \begin_inset Flex CharStyle:Code
5131 \begin_layout Plain Layout
5142 \begin_layout Standard
5147 is the printed representation of the key sequence that was actually typed
5151 \begin_layout Standard
5152 This mechanism can be used to extend LyX's command set and implement macros.
5153 Bind some key sequence to
5154 \begin_inset Quotes eld
5158 \begin_inset Quotes erd
5162 Then start a client that listens on the output pipe, dispatches the command
5163 according to the sequence, and starts a function that may use LyX calls
5164 and LyX requests to issue a command or a series of commands to LyX.
5167 \begin_layout Section
5168 The simple LyX Server Protocol
5171 \begin_layout Standard
5172 LyX implements a simple protocol that can be used for session management.
5173 All messages are of the form
5186 \begin_layout Standard
5192 \begin_inset Quotes eld
5196 \begin_inset Quotes erd
5200 \begin_inset Quotes eld
5204 \begin_inset Quotes erd
5209 \begin_inset Quotes eld
5213 \begin_inset Quotes erd
5216 is received from a client, LyX will report back to inform the client that
5217 it's listening to it's messages, while
5218 \begin_inset Quotes eld
5222 \begin_inset Quotes erd
5225 sent from LyX will inform clients that LyX is closing.
5228 \begin_layout Section
5229 Reverse DVI/PDF search
5232 \begin_layout Standard
5233 Some DVI/PDF viewers
5237 \begin_layout Plain Layout
5238 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5239 Skim on Mac OSX and SumatraPDF on Windows.
5248 facility (also called
5253 This means that you can tell LyX to put the cursor to a specific line in
5254 the document by clicking at the respective position in the DVI/PDF output.
5255 To achieve this, the viewer must be able to communicate with LyX.
5256 This is done via the LyX server either by using the named pipe (
5260 ), or the UNIX domain socket (
5264 ) that LyX creates in its temporary directory (this is the way the
5265 \begin_inset Flex CharStyle:Code
5268 \begin_layout Plain Layout
5274 program communicates with LyX).
5275 In some cases, you need a helper script that mediates between the viewer
5276 and LyX, in others, the viewer can communicate with LyX directly.
5277 This depends on the selected viewer and on your operating system.
5278 The same applies to the way viewers need to be configured and the way the
5279 reverse search is actually performed.
5280 In what follows, we will thus describe how to setup reverse search for
5282 Before we turn to this, though, we will explain what needs to be done generally
5283 to enable reverse search in the DVI/PDF output.
5286 \begin_layout Subsection
5287 Enabling reverse search
5290 \begin_layout Standard
5291 LaTeX provides several different methods for reverse search.
5292 Some are built-in in the
5293 \begin_inset Flex CharStyle:Code
5296 \begin_layout Plain Layout
5302 program, some are provided by external packages.
5303 Your choice depends on whether your LaTeX distribution already provides
5304 a given method (the built-in methods are rather new) and whether your viewer
5306 The available methods are described in the following.
5309 \begin_layout Subsubsection*
5310 Built-in DVI-search via src-specials (DVI only)
5313 \begin_layout Standard
5314 This method provides the DVI file with the necessary information for reverse
5316 It is available in LaTeX since quite some time (any somewhat recent LaTeX
5317 distribution should include it), and it works reliably.
5318 To enable it, change the
5319 \begin_inset Flex CharStyle:MenuItem
5322 \begin_layout Plain Layout
5327 \begin_layout Plain Layout
5340 \begin_inset Flex CharStyle:MenuItem
5343 \begin_layout Plain Layout
5348 \begin_layout Plain Layout
5355 eX (plain)->DraftDVI
5361 \begin_inset Flex CharStyle:MenuItem
5364 \begin_layout Plain Layout
5365 Preferences\SpecialChar \menuseparator
5366 File Handling\SpecialChar \menuseparator
5373 \begin_inset Flex CharStyle:Code
5376 \begin_layout Plain Layout
5377 latex -src-specials $$i
5383 If this doesn't work, check if your TeX engine needs different options
5384 (the syntax might differ in some distributions).
5387 \begin_layout Subsubsection*
5388 External Packages (PDFSync and scrltx)
5391 \begin_layout Standard
5400 provide reverse search facility for PDF output (via pdflatex) and DVI output,
5402 In order to enable it, load the packages in the LyX preamble:
5405 \begin_layout Itemize
5406 \begin_inset Flex CharStyle:Code
5409 \begin_layout Plain Layout
5417 for reverse PDF search,
5420 \begin_layout Itemize
5422 \begin_inset Flex CharStyle:Code
5425 \begin_layout Plain Layout
5428 usepackage[active]{srcltx}
5433 for reverse DVI search.
5436 \begin_layout Standard
5437 If you want to be able to perform both DVI and PDF reverse searches, you
5438 can also insert in the preamble the following lines
5441 \begin_layout LyX-Code
5445 \begin_inset Newline newline
5451 \begin_inset Newline newline
5457 \begin_inset Newline newline
5463 \begin_inset Newline newline
5468 usepackage[active]{srcltx}
5469 \begin_inset Newline newline
5477 \begin_layout Standard
5478 This way, you can preview the file as either DVI or PDF (pdflatex) and the
5479 right package will be used.
5482 \begin_layout Standard
5483 Note that PDFSync might affect the output layout of your document.
5484 It is therefore advised to disable PDFsync for final documents.
5487 \begin_layout Subsubsection*
5488 Built-in reverse search via SyncTeX (DVI and PDF)
5491 \begin_layout Standard
5493 \begin_inset Flex CharStyle:Code
5496 \begin_layout Plain Layout
5502 have built-in support for both PDF and DVI reverse search.
5507 facility is basically the result of the integration of the PDFSync package
5508 to the pdftex program and its merge with the
5513 You need at least TeXLive 2008 or a recent MikTeX distribution in order
5515 Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
5516 already provide SyncTeX support.
5519 \begin_layout Standard
5520 To enable SyncTeX for DVI output, change the
5521 \begin_inset Flex CharStyle:MenuItem
5524 \begin_layout Plain Layout
5529 \begin_layout Plain Layout
5542 \begin_inset Flex CharStyle:MenuItem
5545 \begin_layout Plain Layout
5550 \begin_layout Plain Layout
5557 eX (plain) -> DraftDVI
5563 \begin_inset Flex CharStyle:MenuItem
5566 \begin_layout Plain Layout
5567 Preferences\SpecialChar \menuseparator
5568 File Handling\SpecialChar \menuseparator
5575 \begin_inset Flex CharStyle:Code
5578 \begin_layout Plain Layout
5579 latex -synctex=1 $$i
5584 , and for PDF output, change the
5585 \begin_inset Flex CharStyle:MenuItem
5588 \begin_layout Plain Layout
5593 \begin_layout Plain Layout
5600 eX (pdflatex) -> PDF (pdflatex)
5606 \begin_inset Flex CharStyle:Code
5609 \begin_layout Plain Layout
5610 pdflatex -synctex=1 $$i
5616 Check the documentation of your viewer whether the viewer needs to be configure
5617 d for the use with SyncTeX.
5621 \begin_layout Plain Layout
5623 \begin_inset Flex CharStyle:Code
5626 \begin_layout Plain Layout
5632 option enables gzip compression.
5633 If your viewer does not support it, you should instead use
5634 \begin_inset Flex CharStyle:Code
5637 \begin_layout Plain Layout
5651 \begin_layout Subsection
5652 Configuring and using specific viewers
5655 \begin_layout Subsubsection*
5656 Xdvi (all platforms)
5659 \begin_layout Standard
5661 \begin_inset Flex CharStyle:Code
5664 \begin_layout Plain Layout
5670 , you don't need to do anything else for performing a reverse DVI search,
5671 as LyX already provides the necessary hooks for automatically using the
5673 \begin_inset Flex CharStyle:Code
5676 \begin_layout Plain Layout
5683 Just setup your document as described above (reverse search is triggered
5684 by Ctrl-click or Alt-click on Mac OSX, respectively).
5687 \begin_layout Standard
5688 However, if for whatever reason you want to use the named pipe instead of
5689 the socket for communicating with LyX, simply change the DVI viewer in
5691 \begin_inset Flex CharStyle:MenuItem
5694 \begin_layout Plain Layout
5695 Preferences\SpecialChar \menuseparator
5696 File Handling\SpecialChar \menuseparator
5706 \begin_layout Plain Layout
5707 On Mac OSX you have to use
5708 \begin_inset Flex CharStyle:Code
5711 \begin_layout Plain Layout
5712 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
5723 \begin_inset Flex CharStyle:Code
5726 \begin_layout Plain Layout
5727 xdvi -editor 'lyxeditor.sh %f %l'
5733 \begin_inset Flex CharStyle:Code
5736 \begin_layout Plain Layout
5742 is a suitable script.
5743 For example, a minimal shell script is the following one:
5746 \begin_layout LyX-Code
5748 \begin_inset Newline newline
5751 LYXPIPE="/path/to/lyxpipe"
5752 \begin_inset Newline newline
5755 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
5756 \begin_inset Newline newline
5759 echo "$COMMAND" > "${LYXPIPE}".in || exit
5760 \begin_inset Newline newline
5763 read < "${LYXPIPE}".out || exit
5766 \begin_layout Standard
5768 \begin_inset Flex CharStyle:Code
5771 \begin_layout Plain Layout
5781 \begin_layout Plain Layout
5788 XServer pipe path specified in
5789 \begin_inset Flex CharStyle:MenuItem
5792 \begin_layout Plain Layout
5793 Preferences\SpecialChar \menuseparator
5803 \begin_layout Plain Layout
5805 \begin_inset Flex CharStyle:Code
5808 \begin_layout Plain Layout
5814 folder of a source distribution you can find a
5815 \begin_inset Flex CharStyle:Code
5818 \begin_layout Plain Layout
5824 script which is able to locate the
5828 based on your preferences.
5836 \begin_layout Subsubsection*
5840 \begin_layout Standard
5842 \begin_inset Flex CharStyle:Code
5845 \begin_layout Plain Layout
5846 /Applications/MacDviX_Folder/calleditor.script
5851 , add the following lines:
5854 \begin_layout LyX-Code
5859 \begin_layout Plain Layout
5866 X.app/Contents/MacOS/lyxeditor "$2" $1
5867 \begin_inset Newline newline
5873 \begin_layout Standard
5874 Modify the lines accordingly if you install LyX somewhere else than in the
5875 Applications folder.
5878 \begin_layout Standard
5879 Reverse search is triggered by Alt-click (OPTION-click).
5882 \begin_layout Subsubsection*
5886 \begin_layout Standard
5888 \begin_inset Flex CharStyle:Code
5891 \begin_layout Plain Layout
5892 open -a Skim.app $$i
5897 to the viewer setting in
5898 \begin_inset Flex CharStyle:MenuItem
5901 \begin_layout Plain Layout
5902 Preferences\SpecialChar \menuseparator
5903 File Handling\SpecialChar \menuseparator
5904 File formats\SpecialChar \menuseparator
5911 \begin_inset Flex CharStyle:MenuItem
5914 \begin_layout Plain Layout
5915 Skim\SpecialChar \menuseparator
5916 Preferences\SpecialChar \menuseparator
5926 \begin_layout Plain Layout
5936 \begin_layout Standard
5937 Reverse search is triggered by COMMAND-SHIFT-click
5940 \begin_layout Subsubsection*
5944 \begin_layout Standard
5946 \begin_inset Flex CharStyle:MenuItem
5949 \begin_layout Plain Layout
5950 Settings\SpecialChar \menuseparator
5951 Configure Okular\SpecialChar \ldots{}
5952 \SpecialChar \menuseparator
5959 \begin_inset Quotes eld
5963 \begin_inset Quotes erd
5967 \begin_inset Flex CharStyle:Code
5970 \begin_layout Plain Layout
5979 \begin_layout Standard
5980 Reverse search is triggered by SHIFT-click.
5983 \begin_layout Subsubsection*
5987 \begin_layout Standard
5988 Launch yap, choose its
5989 \begin_inset Flex CharStyle:MenuItem
5992 \begin_layout Plain Layout
5993 View\SpecialChar \menuseparator
6000 \begin_inset Quotes eld
6004 \begin_inset Quotes erd
6009 \begin_inset Quotes eld
6012 New\SpecialChar \ldots{}
6014 \begin_inset Quotes erd
6017 button and, in the window that opens, enter
6018 \begin_inset Quotes eld
6022 \begin_inset Quotes erd
6025 (or any other name you like) in the
6026 \begin_inset Quotes eld
6030 \begin_inset Quotes erd
6034 Now click on the button labeled
6035 \begin_inset Quotes eld
6038 \SpecialChar \ldots{}
6040 \begin_inset Quotes erd
6043 to open a file dialog and navigate to the directory containing the batch
6045 \begin_inset Flex CharStyle:Code
6048 \begin_layout Plain Layout
6056 \begin_inset Flex CharStyle:Code
6059 \begin_layout Plain Layout
6065 and then specify the program arguments as
6066 \begin_inset Flex CharStyle:Code
6069 \begin_layout Plain Layout
6077 \begin_inset Flex CharStyle:Code
6080 \begin_layout Plain Layout
6086 wrapper is used for communicating with LyX through the
6093 \begin_layout LyX-Code
6095 \begin_inset Newline newline
6098 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
6107 \begin_inset Newline newline
6121 \begin_layout Standard
6122 Make sure that the LyXServer pipe path you specified in LyX is
6123 \begin_inset Flex CharStyle:Code
6126 \begin_layout Plain Layout
6140 , otherwise change the
6141 \begin_inset Flex CharStyle:Code
6144 \begin_layout Plain Layout
6150 wrapper accordingly.
6153 \begin_layout Standard
6154 In yap, reverse search is triggered by double-click.
6157 \begin_layout Subsubsection*
6158 SumatraPDF (Windows)
6161 \begin_layout Standard
6162 In order to use SumatraPDF for inverse search, enter
6163 \begin_inset Flex CharStyle:Code
6166 \begin_layout Plain Layout
6167 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6172 in the viewer setting in
6173 \begin_inset Flex CharStyle:MenuItem
6176 \begin_layout Plain Layout
6177 Preferences\SpecialChar \menuseparator
6178 File Handling\SpecialChar \menuseparator
6179 File formats\SpecialChar \menuseparator
6186 \begin_inset Flex CharStyle:Code
6189 \begin_layout Plain Layout
6195 is the previous wrapper.
6196 If SumatraPDF.exe is not in your command PATH, use its full file name.
6199 \begin_layout Standard
6200 Reverse search is triggered by double-click.
6203 \begin_layout Subsubsection*
6207 \begin_layout Standard
6208 First of all, make sure that yap is your default DVI viewer in the Windows
6209 environment, then launch it, choose its
6210 \begin_inset Flex CharStyle:MenuItem
6213 \begin_layout Plain Layout
6214 View\SpecialChar \menuseparator
6221 \begin_inset Quotes eld
6225 \begin_inset Quotes erd
6230 \begin_inset Quotes eld
6233 New\SpecialChar \ldots{}
6235 \begin_inset Quotes erd
6238 button and, in the window that opens, enter
6239 \begin_inset Quotes eld
6243 \begin_inset Quotes erd
6246 (or any other name you like) in the
6247 \begin_inset Quotes eld
6251 \begin_inset Quotes erd
6255 Now click on the button labeled
6256 \begin_inset Quotes eld
6259 \SpecialChar \ldots{}
6261 \begin_inset Quotes erd
6264 to open a file dialog and navigate to the directory containing the
6265 \begin_inset Flex CharStyle:Code
6268 \begin_layout Plain Layout
6274 program (which is installed by default on Cygwin along with the LyX executable).
6276 \begin_inset Flex CharStyle:Code
6279 \begin_layout Plain Layout
6285 and then specify the program arguments as
6286 \begin_inset Flex CharStyle:Code
6289 \begin_layout Plain Layout
6296 In this way, you will be using the
6300 for communicating with LyX.
6301 If, for whatever reason, you want to use the
6306 \begin_inset Flex CharStyle:Code
6309 \begin_layout Plain Layout
6315 option and be sure to specify the LyXServer pipe path in the LyX preferences.
6318 \begin_layout Standard
6319 In yap, reverse search is triggered by double-click.
6322 \begin_layout Subsubsection*
6326 \begin_layout Standard
6327 In order to use SumatraPDF for inverse search, enter
6328 \begin_inset Flex CharStyle:Code
6331 \begin_layout Plain Layout
6337 in the viewer setting in
6338 \begin_inset Flex CharStyle:MenuItem
6341 \begin_layout Plain Layout
6342 Preferences\SpecialChar \menuseparator
6343 File Handling\SpecialChar \menuseparator
6344 File formats\SpecialChar \menuseparator
6351 \begin_inset Flex CharStyle:Code
6354 \begin_layout Plain Layout
6360 is the following script (to be placed in your command PATH,
6361 \begin_inset Flex CharStyle:Code
6364 \begin_layout Plain Layout
6370 being the best choice):
6373 \begin_layout LyX-Code
6375 \begin_inset Newline newline
6379 \begin_inset Newline newline
6382 SumatraPDF -inverse-search "lyxeditor -g %f %l" $(basename $1)
6385 \begin_layout Standard
6386 This wrapper script is needed because SumatraPDF is a native Windows application
6387 and does not understand the posix paths used by the Cygwin version of LyX.
6388 If SumatraPDF.exe is not in your command PATH, use its full posix path in
6391 \begin_inset Flex CharStyle:Code
6394 \begin_layout Plain Layout
6400 enables communication via the
6406 \begin_inset Flex CharStyle:Code
6409 \begin_layout Plain Layout
6415 option if you want to use the
6419 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6422 \begin_layout Standard
6423 Reverse search is triggered by double-click.
6426 \begin_layout Chapter
6427 Special Document Classes
6430 \begin_layout Section
6434 \begin_layout Standard
6440 \begin_layout Subsection
6444 \begin_layout Standard
6445 This section describes how LyX can be used to write articles for submission
6446 to the scientific journal
6448 Astronomy and Astrophysics
6450 (www.edpsciences.fr/aa/
6451 \begin_inset Flex URL
6454 \begin_layout Plain Layout
6456 http://www.edpsciences.fr/aa/
6461 ) using Version 5.01 of the document class
6466 This package can be downloaded from the ftp site
6469 \begin_layout Standard
6470 \begin_inset VSpace medskip
6476 \begin_layout Standard
6478 \begin_inset Flex URL
6481 \begin_layout Plain Layout
6483 ftp://ftp.edpsciences.org/pub/aa/readme.html
6491 \begin_layout Standard
6492 \begin_inset VSpace medskip
6498 \begin_layout Standard
6499 A manual comes together with that package, and this text is not meant to
6500 replace the original manual but merely a short guide how to realize the
6501 correct form of your paper.
6505 \begin_layout Standard
6506 Please note that the publisher of the journal was changed from Springer
6507 to EDP Sciences starting January 1, 2001.
6508 That change implicated also some slight changes of the style files, namely
6509 the removal of the thesaurus command.
6510 The LyX class aa supports the newest version of these style files, V 5.01.
6511 If you have an older version installed, please upgrade.
6512 For compatibility, the old (version 4) layout has been kept as
6517 Please refer to the comments in
6519 LyXDir/layouts/aapaper.layout
6524 \begin_layout Subsection
6528 \begin_layout Standard
6529 It is recommended you start from the example template distributed with LyX.
6530 If you are not using a template, note the following settings:
6533 \begin_layout Itemize
6540 Document\SpecialChar \menuseparator
6543 dialog (OK, that one was obvious).
6546 \begin_layout Itemize
6547 Don't change the option
6550 \begin_inset space ~
6560 The whole layout is done by the macros, you shouldn't change anything.
6563 \begin_layout Subsection
6567 \begin_layout Standard
6568 First thing to enter is the header information.
6569 It consists of seven entries, of which some are optional.
6573 \begin_layout Itemize
6581 \begin_layout Itemize
6589 \begin_layout Itemize
6597 \begin_layout Itemize
6605 \begin_layout Itemize
6610 : [optional] if more than one author: whom to contact for offprint requests.
6613 \begin_layout Itemize
6618 : [optional] mail address for contacts.
6621 \begin_layout Itemize
6629 Received: <date>; Accepted <date>
6632 \begin_layout Standard
6633 There is no need to issue the
6639 command, this is done automatically by LyX when the header is finished.
6640 Although the order of the single header entries doesn't matter it is advised
6641 to keep the above sequence, just to get the best optics and meets the layout
6642 of the real document.
6645 \begin_layout Standard
6646 If you want to place footnotes in the header block, e.
6647 \begin_inset space \thinspace{}
6651 \begin_inset space \space{}
6654 to state your present address, just use the standard footnote via the menu
6657 Insert\SpecialChar \menuseparator
6661 LyX will automagically use the term
6670 \begin_layout Standard
6671 In addition to these topics, the macros use three additional LaTeX commands
6672 that have no counterpart in LyX:
6675 \begin_layout Itemize
6682 to separate different names for more than one author and institute, respectivel
6686 \begin_layout Itemize
6693 to mark corresponding author/institute pairs.
6694 The institutes are numbered sequentially as they appear in the
6698 field, so you have to put a marker to each author.
6701 \begin_layout Itemize
6708 to supply an email address for fast contact.
6711 \begin_layout Standard
6712 In all cases, the appropriate command has to be entered in LyX and marked
6718 \begin_layout Subsection
6722 \begin_layout Standard
6723 The abstract should immediately follow the header block.
6724 With version 5 the abstract environment was changed to a command, and there
6725 is now a resctriction to only one paragraph.
6726 In addition, it should contain an entry with the keywords.
6727 This is not yet implemented for LyX, therefore you have to enter the LaTeX
6734 by hand and mark it as LaTeX code.
6735 Refer to the example paper.
6738 \begin_layout Subsection
6739 Supported environments
6742 \begin_layout Standard
6743 The A&A paper layout supports the following environments for structuring
6747 \begin_layout Itemize
6753 \begin_layout Itemize
6759 \begin_layout Itemize
6765 \begin_layout Itemize
6771 \begin_layout Itemize
6777 \begin_layout Itemize
6783 \begin_layout Itemize
6789 \begin_layout Itemize
6795 \begin_layout Itemize
6801 \begin_layout Itemize
6807 \begin_layout Itemize
6813 \begin_layout Itemize
6819 \begin_layout Subsection
6820 Commands not supported by LyX
6823 \begin_layout Standard
6824 Some commands are not yet supported by the
6829 Some have already been mentioned.
6830 For the sake of completeness, they are listed all together here:
6833 \begin_layout Itemize
6841 \begin_layout Itemize
6849 \begin_layout Itemize
6857 \begin_layout Itemize
6865 \begin_layout Itemize
6873 \begin_layout Itemize
6881 \begin_layout Itemize
6889 \begin_layout Itemize
6897 \begin_layout Standard
6898 If you want to use any of these commands, you have to enter them yourself.
6901 Do not forget to mark them as LaTeX code!
6904 \begin_layout Subsection
6905 Figure and Table Floats
6908 \begin_layout Standard
6909 LyX provides support for the necessary float environments
6911 figure, figure*, table
6917 , therefore we won't tell much about it here.
6921 \begin_inset space ~
6927 Just remember that tables should be left-aligned.
6928 For that, select the table and change the alignment in
6930 Edit\SpecialChar \menuseparator
6932 \begin_inset space ~
6938 \begin_layout Standard
6939 There is only one special thing: the figures with caption besides the figure.
6940 To create such a figure, you have to do the following:
6943 \begin_layout Enumerate
6944 Create a wide figure float:
6946 Insert\SpecialChar \menuseparator
6947 Float\SpecialChar \menuseparator
6950 , then right click in the figure and select
6956 \begin_inset space ~
6964 \begin_layout Enumerate
6965 Enter your caption text.
6968 \begin_layout Enumerate
6973 to move the cursor above the caption.
6976 \begin_layout Enumerate
6980 \begin_layout Enumerate
6981 Position the cursor behind the figure and insert a horizontal fill:
6983 Insert\SpecialChar \menuseparator
6985 \begin_inset space ~
6988 Character\SpecialChar \menuseparator
6990 \begin_inset space ~
6998 \begin_layout Enumerate
6999 Switch to LaTeX mode:
7002 \begin_inset space ~
7010 \begin_layout Enumerate
7020 Do not close the brace!
7023 \begin_layout Enumerate
7024 Position the cursor behind the caption text, switch to LaTeX mode and insert
7028 \begin_inset space ~
7040 \begin_layout Standard
7041 Also, refer to the figures in the example paper.
7044 \begin_layout Subsection
7048 \begin_layout Standard
7049 For submission, the paper has to be formated in a special double-spacing
7051 For this purpose, you have to give the option
7055 to the documentclass.
7056 This must be done using the extra class options field in the
7058 Document\SpecialChar \menuseparator
7062 Just enter the string
7069 \begin_layout Subsection
7073 \begin_layout Standard
7078 directory contains an example paper written with LyX.
7079 It is the example paper from the original macro package, translated to
7081 Use it for inspiration, and compare the original LaTeX code with LyX way
7085 \begin_layout Section
7089 \begin_layout Standard
7095 \begin_layout Subsection
7099 \begin_layout Standard
7100 AASTeX is a set of macros produced by the American Astronomical Society
7101 to facilitate electronic manuscript submission to the three journals they
7102 publish: the Astrophysical Journal (including the Letters and Supplement),
7103 the Astronomical Journal, and the Publications of the Astronomical Society
7105 LyX has proven to be an excellent tool for generating these documents,
7106 especially given its equation, citation, and figure handling capabilities.
7107 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7108 is the version described here, or higher.
7109 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7110 incompatible with LyX.
7111 The AASTeX package may be downloaded from the AASTeX Web site
7114 \begin_layout Standard
7115 \begin_inset VSpace medskip
7121 \begin_layout Standard
7123 \begin_inset Flex URL
7126 \begin_layout Plain Layout
7128 http://www.journals.uchicago.edu/AAS/AASTeX
7136 \begin_layout Standard
7137 \begin_inset VSpace medskip
7143 \begin_layout Standard
7144 A complete user guide is contained in that package and you should familiarize
7145 yourself with it thoroughly before embarking on writing a paper in LyX.
7146 LyX will not reduce the need to figure out all the AASTeX commands, it
7147 will only reduce the drudgery of typing everything in.
7148 It is your responsibility to ensure that the final exported LaTeX document
7149 conforms completely to the requirements of the journal to which you are
7150 submitting your paper.
7153 \begin_layout Subsection
7154 Starting a New Paper
7157 \begin_layout Standard
7158 I strongly suggest that you start with the AASTeX template file.
7161 File\SpecialChar \menuseparator
7168 , enter the new file name, then choose the
7173 This will show the most common fields found in a manuscript.
7174 Simply overwrite the existing text (including the brackets,
7178 ) with the correct information.
7179 Many of the AASTeX commands and environments can be implemented directly
7180 in LyX, but some cannot: most noticeably
7192 , which should stick out like a sore thumb if you actually just opened the
7194 For commands such as these, the LaTeX code must be entered directly and
7196 Such commands are referred to as TeX code, or Evil Red Text.
7197 I tried to minimize the amount of TeX code needed in an AASTeX document,
7198 but there is still a bit more required than any of us would like.
7201 \begin_layout Subsection
7202 Finishing Your Paper
7205 \begin_layout Standard
7206 When the paper is finished to your satisfaction and previews/prints correctly,
7208 \begin_inset Quotes eld
7212 \begin_inset Quotes erd
7215 actions which need to be done before you submit it to the journals.
7219 \begin_layout Enumerate
7220 Export your paper as a LaTeX file (
7222 File\SpecialChar \menuseparator
7223 Export\SpecialChar \menuseparator
7230 \begin_layout Enumerate
7235 file with your favorite text editor
7239 \begin_layout Enumerate
7240 remove the comment lines before the
7249 \begin_layout Enumerate
7254 usepackage...{fontenc}
7256 line if it appears (usually just after
7271 \begin_layout Enumerate
7272 remove everything between (and including) the
7284 commands, except for any commands you specifically put into the LaTeX preamble
7285 (which should appear immediately after the
7286 \begin_inset Quotes eld
7289 User specified LaTeX commands
7290 \begin_inset Quotes erd
7301 \begin_layout Enumerate
7302 Run the resulting file through LaTeX to make sure it still processes correctly.
7305 \begin_layout Enumerate
7306 Reread the journal requirements to make sure your filenames and formats
7310 \begin_layout Enumerate
7314 \begin_layout Subsection
7315 Comments On Specific Commands
7318 \begin_layout Standard
7319 I will not describe the detailed usage of the individual AASTeX commands:
7320 the AASTeX User Guide (
7324 ) gives a good description of each.
7325 Thus it's probably easiest for me to go down the list as found in the guide
7326 and offer comments where necessary.
7327 So let's begin \SpecialChar \ldots{}
7331 \begin_layout Subsubsection
7332 Things that work as expected
7335 \begin_layout Standard
7339 \begin_layout Plain Layout
7351 \begin_layout Standard
7352 Because they work as you might expect, I simply list them and the section
7453 begin{thebibliography}
7461 (2.13.2), all the cite commands and their variations (2.13.2), the generic
7462 graphicx figure commands (2.14.1),
7486 (2.15.4, amongst other places),
7513 \begin_layout Standard
7514 The following style options also work correctly:
7535 Simply put them in the
7541 Layout\SpecialChar \menuseparator
7547 \begin_layout Standard
7551 \begin_layout Plain Layout
7563 \begin_layout Subsubsection
7564 Things that work, but require more comment
7567 \begin_layout Standard
7568 The following items work, but require a little more discussion:
7571 \begin_layout Itemize
7572 These items are reserved for use by the journal editors, but you can put
7573 them into the LaTeX preamble if you feel compelled to do so:
7606 \begin_layout Itemize
7607 These items may be placed in the LaTeX preamble, and are included as blanks
7608 in the template file:
7629 \begin_layout Itemize
7636 (2.3) – can only be used
7637 \begin_inset Quotes eld
7641 \begin_inset Quotes erd
7644 , not in the middle of a paragraph.
7645 Use TeX code if you need to embed it.
7648 \begin_layout Itemize
7655 (2.3) – will have extra {} after it.
7656 This should not cause an error.
7659 \begin_layout Itemize
7666 (2.6) – can only be used
7667 \begin_inset Quotes eld
7671 \begin_inset Quotes erd
7674 , not in the middle of a paragraph.
7675 Use TeX code if you need to embed it.
7678 \begin_layout Itemize
7685 (2.8) – can't insert a cross-reference tag, you must type the tag name by
7689 \begin_layout Itemize
7703 \begin_layout Itemize
7710 (2.9) – will have extra {} after it.
7711 This should not cause an error.
7714 \begin_layout Itemize
7721 (2.11) – will have extra {} after it.
7722 This should not cause an error.
7725 \begin_layout Itemize
7732 (2.14.2) – you can insert an optional filename argument by placing the cursor
7733 at the beginning of the text and selecting
7735 Insert\SpecialChar \menuseparator
7740 \begin_inset Quotes eld
7744 \begin_inset Quotes erd
7747 inserts an optional argument of the type needed by
7754 Hopefully it will be renamed someday.
7757 \begin_layout Itemize
7770 for the catalog ID optional parameter
7773 \begin_layout Itemize
7786 for the catalog ID optional parameter
7789 \begin_layout Subsubsection
7790 Things not implemented, use TeX code
7793 \begin_layout Standard
7797 \begin_layout Plain Layout
7809 \begin_layout Standard
7832 setcounter{equation}
7834 (2.12), Journal name abbreviations (2.13.4),
7870 (2.15.4, insert it as the first element in the lefthand cell after where
7872 Don't use any of LyX's rules in the table),
7884 (2.15.5), much of Misc (2.17, except
7935 \begin_layout Standard
7939 \begin_layout Plain Layout
7951 \begin_layout Subsubsection
7952 Things that cannot be implemented
7955 \begin_layout Standard
7956 \SpecialChar \ldots{}
7957 at least in any meaningful sort of way, so I suggest ignoring them.
7958 They are the references environment (2.13.3), and the deluxetable environment
7960 If you really, really need to use deluxetable, I suggest editing it in
7961 a separate file with a text editor, then using
7963 Insert\SpecialChar \menuseparator
7965 \begin_inset space ~
7970 to include it in your LyX document.
7975 file to see an example of this.
7978 \begin_layout Subsection
7979 FAQs, Tips, Tricks, and Other Ruminations
7982 \begin_layout Subsubsection
7983 Getting LyX and AASTeX to cooperate
7986 \begin_layout Standard
7987 It can be a bit tricky to get LyX to recognize a new layout and document
7989 When all else fails, do this:
7992 \begin_layout Enumerate
7993 Make certain that LaTeX can find AASTeX.
7994 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
7995 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
8002 \begin_layout Enumerate
8014 \begin_layout Enumerate
8017 Tools\SpecialChar \menuseparator
8020 in LyX, then restart LyX.
8023 \begin_layout Enumerate
8024 Open a regular new file, not from a template.
8025 Does AASTeX appear in the class list in
8027 Document\SpecialChar \menuseparator
8033 \begin_layout Standard
8034 If you get a warning from an existing AASTeX document about not being able
8035 to find the AASTeX layout or a message about
8036 \begin_inset Quotes eld
8039 You should not mix title layouts with normal ones
8040 \begin_inset Quotes erd
8043 , things haven't been installed correctly.
8046 \begin_layout Subsubsection
8047 LaTeX error processing a table
8050 \begin_layout Standard
8051 LyX, by default, attempts to center the table caption/title.
8052 This seems to produce a bad interaction in AASTeX so you should click somewhere
8053 in the caption/title, then select
8055 Edit\SpecialChar \menuseparator
8057 \begin_inset space ~
8071 This took care of it for me.
8074 \begin_layout Subsubsection
8078 \begin_layout Standard
8079 A couple of things: 1) I have noticed some funny spacing in the reference
8080 entries in the text.
8081 When you enter the bibliography item data, make sure their is
8085 space between the last author and the parenthesis setting off the year;
8089 \begin_inset space \thinspace{}
8093 \begin_inset space \space{}
8107 2) Entering the references at all is not obvious.
8108 The easiest thing is to start typing your first reference at the end of
8109 the document, then mark it as type
8114 That will put a small gray box in front of what you just typed.
8115 Click on the box to fill in the rest of the information.
8116 For new references, go to the end of an existing reference and press return.
8117 That will create a new line with its own box, etc.
8120 \begin_layout Subsubsection
8124 \begin_layout Standard
8125 Even though AASTeX provides its own figure commands (
8131 , for example), I much prefer LaTeX's standard figure commands (with the
8140 \begin_inset space ~
8143 commands as TeX code into a Figure Float box if you desire, but I never
8144 have much luck getting the layout right.
8145 With the standard graphics, LyX will insert a
8149 usepackage{graphicx}
8151 command into the LaTeX preamble and handle the figures in the standard
8152 LaTeX2e way, interspersing the figures in the text.
8153 I believe ApJ accepts figures exactly this way now; AJ might still use
8155 \begin_inset Quotes eld
8158 stack everything at the end
8159 \begin_inset Quotes erd
8165 \begin_layout Subsubsection
8166 Things I could have done, but didn't
8169 \begin_layout Standard
8171 \begin_inset Quotes eld
8175 \begin_inset Quotes erd
8178 things I could have implemented, but chose not to.
8179 For instance, I saw no point in double-spacing the text in the LyX window,
8180 even though it is double-spaced in the paper manuscript.
8181 Also, I chose not to make separate layouts for the preprint and preprint2
8183 Since I assume you will spend most of your time in the plain manuscript
8184 mode anyway, I decided not to chew up more disk space with this.
8188 \begin_layout Subsection
8192 \begin_layout Standard
8193 Your mileage may vary.
8194 I've now had papers published by both ApJ and AJ that have had 98% of the
8195 effort done in LyX; the last 2% was the LaTeX post-processing and a few
8197 I have had no trouble with the submission process, and I'm sure the journals
8198 were never aware that there might be a difference.
8199 So, go forth and publish!
8202 \begin_layout Section
8206 \begin_layout Standard
8209 David Johnson; updated by Richard Heck
8212 \begin_layout Standard
8213 \begin_inset VSpace bigskip
8219 \begin_layout Standard
8221 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8222 papers to be submitted to American Mathematical Society publications.
8223 The layouts are not tailored to a specific journal, but easily can be.
8224 You should refer to the AMS documentation for specific instructions for
8225 each journal (usually it will entail only changing a single line in the
8227 That documentation is available on the Web at
8228 \begin_inset Flex URL
8231 \begin_layout Plain Layout
8239 \begin_inset Flex URL
8242 \begin_layout Plain Layout
8244 ftp://ftp.ams.org/pub/tex/amslatex/
8250 These layouts are appropriate, and useful, for any mathematical writing.
8254 \begin_layout Standard
8255 There are two basic AMS LaTeX layouts:
8258 \begin_layout Itemize
8259 amsart: The standard AMS article format.
8262 \begin_layout Itemize
8263 amsbook: the standard AMS book (really, monograph) format.
8267 \begin_layout Standard
8268 The layouts themselves contain only the minimum necessary to use the AMS
8270 They do not, in particular, contain any of the `theorem' environments used
8271 for setting theorems, lemmas, and the like.
8272 These are contained, instead, in the
8273 \begin_inset Flex CharStyle:Code
8276 \begin_layout Plain Layout
8282 module, which is loaded by default when when you select one of the AMS
8284 (It can also be used with other classes and can be removed, if you would
8285 rather use something else.) Less commonly used environments are in the
8286 \begin_inset Flex CharStyle:Code
8289 \begin_layout Plain Layout
8290 Theorems (AMS-Extended)
8295 module, which must be loaded manually.
8298 \begin_layout Standard
8299 By default, theorems and the like are numbered consecutively throughout
8300 the document, but this may be modified by loading the module
8301 \begin_inset Flex CharStyle:Code
8304 \begin_layout Plain Layout
8305 Theorems (Order by Section)
8310 or, if you are using
8311 \begin_inset Flex CharStyle:Code
8314 \begin_layout Plain Layout
8321 \begin_inset Flex CharStyle:Code
8324 \begin_layout Plain Layout
8325 Theorems (Order by Chapter)
8331 These will number the results as
8332 \begin_inset Formula $n.m$
8335 , where the first number refers to the section (or chapter) and the second
8336 refers to the total number of results so far in that section (or chapter).
8337 Many environments are also available unnumbered.
8338 These are indicated by an asterisk at the end.
8339 If you happen to want
8343 unnumbered results, the the module
8344 \begin_inset Flex CharStyle:Code
8347 \begin_layout Plain Layout
8353 provides that option.
8356 \begin_layout Standard
8357 Note that these modules do not
8361 to be used with the AMS classes.
8362 It is perfectly possible to use the
8363 \begin_inset Flex CharStyle:Code
8366 \begin_layout Plain Layout
8372 module, and the others mentioned, with other classes, such as
8373 \begin_inset Flex CharStyle:Code
8376 \begin_layout Plain Layout
8383 \begin_inset Flex CharStyle:Code
8386 \begin_layout Plain Layout
8393 \begin_inset Flex CharStyle:Code
8396 \begin_layout Plain Layout
8405 \begin_layout Subsection
8406 What these layouts provide
8409 \begin_layout Standard
8410 There is a long list of included environments provided by these layouts.
8411 In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
8412 variety of `theorem' environments.
8413 However, the AMS recommends the environments that are available in LyX.
8417 \begin_layout Standard
8418 The following environments—as well as the standard environments, such as
8420 \begin_inset Flex CharStyle:Noun
8423 \begin_layout Plain Layout
8430 \begin_inset Flex CharStyle:Noun
8433 \begin_layout Plain Layout
8440 \begin_inset Flex CharStyle:Noun
8443 \begin_layout Plain Layout
8450 \begin_inset Flex CharStyle:Noun
8453 \begin_layout Plain Layout
8460 \begin_inset Flex CharStyle:Noun
8463 \begin_layout Plain Layout
8470 \begin_inset Flex CharStyle:Code
8473 \begin_layout Plain Layout
8480 \begin_inset Flex CharStyle:Code
8483 \begin_layout Plain Layout
8492 \begin_layout Description
8493 Address This should be the author's permanent address.
8496 \begin_layout Description
8498 \begin_inset space ~
8501 Address This should be the author's temporary address at the time of submission,
8502 if different from the Address.
8505 \begin_layout Description
8506 Email Author's e-mail address
8509 \begin_layout Description
8510 URL Author's Web address, if desired.
8513 \begin_layout Description
8514 Keywords Key words or phrases used to identify specific topics discussed
8518 \begin_layout Description
8519 Subjectclass These refer to the AMS Subject Classifications, published and
8522 Mathematical Reviews
8525 These are also available online at the AMS cites listed above.
8528 \begin_layout Description
8532 \begin_layout Description
8536 \begin_layout Description
8540 \begin_layout Standard
8541 The following environments are provided by both the
8542 \begin_inset Flex CharStyle:Code
8545 \begin_layout Plain Layout
8552 \begin_inset Flex CharStyle:Code
8555 \begin_layout Plain Layout
8561 modules, in the latter case in both starred (unnumbered) and unstarred
8562 (numbered) versions.
8563 These same environments are provided only in the starred versions by the
8565 \begin_inset Flex CharStyle:Code
8568 \begin_layout Plain Layout
8577 \begin_layout Theorem
8578 This is typically used for the statements of major results.
8582 \begin_layout Corollary*
8583 This is used for statements which follow fairly directly from previous statement
8585 Again, these can be major results.
8590 These are smaller results needed to prove other statements.
8593 \begin_layout Proposition
8594 These are less major results which (hopefully) add to the general theory
8598 \begin_layout Conjecture
8599 These are statements provided without justification, which the author does
8600 not know how to prove, but which seem to be true (to the author, at least).
8603 \begin_layout Definition*
8604 Guess what this is for.
8605 The font is different for this environment than for the previous ones.
8609 \begin_layout Example*
8610 Used for examples illustrating proven results.
8613 \begin_layout Problem
8614 It's not really known what this is for.
8615 You should figure it out.
8618 \begin_layout Exercise*
8619 Write a description for this one.
8622 \begin_layout Remark
8623 This environment is also a type of theorem, usually a lesser sort of observation.
8626 \begin_layout Claim*
8627 Often used in the course of giving a proof of a larger result.
8631 Generally, these are used to break up long arguments, using specific instances
8637 The numbering scheme for cases is on its own, not together with other numbered
8643 At the end of this environment, a QED symbol (usually a square, but it can
8644 vary with different styles) is placed.
8645 If you want to have other environments within this one—for example, Case
8646 environments—and have the QED symbol appear only after them, then the other
8647 environments need to be nested within the proof environment.
8650 Nesting Environments
8656 for information on nesting.
8659 \begin_layout Standard
8660 And these environments are provided by
8661 \begin_inset Flex CharStyle:Code
8664 \begin_layout Plain Layout
8665 Theorems (AMS-Extended)
8673 \begin_layout Criterion*
8674 A required condition.
8677 \begin_layout Algorithm*
8678 A general procedure to be used.
8681 \begin_layout Axiom*
8682 This is a property or statement taken as true within the system being discussed.
8685 \begin_layout Condition*
8686 Sometimes used to state a condition assumed within the present context of
8691 Similar to a Remark.
8694 \begin_layout Notation*
8695 Used for the explanation of, yes, notation.
8698 \begin_layout Summary
8699 Do we really need to tell you?
8702 \begin_layout Acknowledgement*
8706 \begin_layout Conclusion*
8707 Sometimes used at the end of a long train of argument.
8711 Used in a way similar to Proposition, though perhaps lower on the scale.
8714 \begin_layout Standard
8715 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
8717 They need to be available on your system in order to use these environments.
8720 \begin_layout Section
8728 \begin_layout Standard
8734 \begin_layout Subsection
8738 \begin_layout Standard
8739 These are the layout files for some of the journals of the American Geophysical
8741 It is assumed that you have both the AGU's own class files and AGUplus
8742 installed (everything to be found at
8743 \begin_inset Flex URL
8746 \begin_layout Plain Layout
8748 ftp://ftp.agu.org/journals/latex/journals
8756 \begin_layout Subsection
8760 \begin_layout Standard
8770 They are still called this in the LyX GUI, though their LaTeX equivalents
8771 in the AGU classes are
8782 \begin_layout Standard
8783 Newly defined styles are
8820 These are mostly manuscript attributes and defined in the AGU class documentati
8824 \begin_layout Standard
8825 I suspect this is still badly incomplete.
8828 \begin_layout Subsection
8832 \begin_layout Standard
8849 \begin_layout Subsection
8853 \begin_layout Itemize
8856 Journal of Geophysical Research
8865 \begin_layout Standard
8866 Add your own, it isn't so hard! Look at the
8877 \begin_layout Subsection
8878 Bugs and things to remember
8881 \begin_layout Standard
8882 In order to use the new layouts, you must remember to do the following for
8886 \begin_layout Enumerate
8892 This can be done in the
8894 Layout\SpecialChar \menuseparator
8899 Document\SpecialChar \menuseparator
8903 (AGU articles are always in English, right? So
8910 \begin_layout Enumerate
8920 (Yes, this is a bug.)
8923 \begin_layout Enumerate
8924 Make sure you use the
8928 bibliography style, by entering
8932 into the second field of the BibTeX inset.
8933 None of the standard styles will do.
8936 \begin_layout Section
8940 \begin_layout Standard
8946 \begin_layout Subsection
8950 \begin_layout Standard
8951 Broadway is for writing plays.
8952 The format is more decorative than Hollywood, and much less standardized.
8953 This format should be suitable for workshops.
8956 \begin_layout Subsection
8960 \begin_layout Standard
8961 The same as in Hollywood.
8964 \begin_layout Subsection
8968 \begin_layout Standard
8973 names as labels then cross-reference the label to insert the name.
8974 The cross-reference dialog will show the current cast of characters.
8977 \begin_layout Subsection
8978 Paper size and Margins
8981 \begin_layout Standard
8982 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
8985 \begin_layout Subsection
8989 \begin_layout Standard
8990 The following environments are available.
8991 You can use broadway.bind to get the bind keys shown at the right.
8994 \begin_layout Itemize
8998 \begin_inset Newline newline
9003 You should not have to use this, but it is here for anything that does not
9007 \begin_layout Itemize
9011 \begin_inset space \hfill{}
9015 \begin_inset Newline newline
9020 Used to describe stage setting and the action.
9021 First use of speaker names in all CAPs.
9024 \begin_layout Itemize
9028 \begin_inset space \hfill{}
9032 \begin_inset Newline newline
9037 Automatically numbered.
9038 On screen it will be arabic, but will print as Roman.
9041 \begin_layout Itemize
9045 \begin_inset space \hfill{}
9049 \begin_inset Newline newline
9059 It is just centered text.
9062 \begin_layout Itemize
9066 \begin_inset space \hfill{}
9070 \begin_inset Newline newline
9075 Not automatically numbered.
9076 You supply the number.
9077 This is because I couldn't figure out how.
9080 \begin_layout Itemize
9084 \begin_inset space \hfill{}
9088 \begin_inset Newline newline
9093 A special case of Narrative to describe the setting and action as the curtain
9097 \begin_layout Itemize
9101 \begin_inset space \hfill{}
9105 \begin_inset Newline newline
9110 The speaker's (actor's) title, centered in all CAPS.
9113 \begin_layout Itemize
9117 \begin_inset space \hfill{}
9121 \begin_inset Newline newline
9126 Instructions to the speaker.
9127 The parentheses are automatically inserted.
9128 The ( will appear on screen, but both will be in the printed play.
9129 This environment is only used within
9136 \begin_layout Itemize
9140 \begin_inset space \hfill{}
9144 \begin_inset Newline newline
9149 What the Speaker says.
9152 \begin_layout Itemize
9156 \begin_inset space \hfill{}
9160 \begin_inset Newline newline
9165 The curtain comes down.
9168 \begin_layout Itemize
9172 \begin_inset space \hfill{}
9178 \begin_layout Itemize
9182 \begin_inset space \hfill{}
9188 \begin_layout Itemize
9192 \begin_inset space \hfill{}
9198 \begin_layout Standard
9202 \begin_layout Section
9206 \begin_layout Standard
9211 can be used to type letters according to German conventions.
9212 A template file is included in
9214 .../lyx/share/templates
9216 for you to use as a starting point.
9219 \begin_layout Section
9227 \begin_layout Standard
9233 \begin_layout Subsection
9237 \begin_layout Standard
9238 This is the layout file for the European Geophysical Society journals.
9243 can be downloaded from the web site of the EGS under
9244 \begin_inset Flex URL
9247 \begin_layout Plain Layout
9257 \begin_layout Subsection
9261 \begin_layout Standard
9264 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9272 The current layout file is unfortunately very unmodular and would benefit
9273 from using the various
9280 \begin_layout Section
9284 \begin_layout Standard
9290 \begin_layout Standard
9291 Elsevier Science Publishers B.V.
9292 provides a standard LaTeX document class (
9296 ) for submitting articles to their various journals.
9297 The style file can be downloaded directly from their web site:
9298 \begin_inset Flex URL
9301 \begin_layout Plain Layout
9303 http://authors.elsevier.com/
9309 Instructions are supplied along with the class file, which details the
9310 requirements of the publishers.
9311 LyX includes package that allows for the use of this class, by a layout
9312 and a template file.
9313 Installation of the class file is the same as for any other LaTeX package;
9314 instructions are provided in the Elsevier documentation.
9317 \begin_layout Standard
9327 As the Elsevier class file is based mainly on the standard article class,
9328 most of the normal functionality is provided.
9329 The Elsevier class defines a number of mathematical environments, which
9330 are similar to the AMS environments.
9331 These commands are all described in the Elsevier documentation, and are
9335 \begin_layout Standard
9336 The easiest way to use the Elsevier style is to base documents on the included
9338 It is best not to use options such as fancy headings or the geometry package,
9339 as elements such as these are defined by Elsevier in their style file.
9340 Ideally, no extra packages except those mentioned in the Elsevier documentation
9342 Essentially, Elsevier require as
9343 \begin_inset Quotes eld
9347 \begin_inset Quotes erd
9350 a LaTeX file as possible, as their intention is to take the supplied file
9351 and replace the class file with one for the particular journal to which
9352 the paper has been submitted.
9353 This also means that not too much time should be spent on the formating
9355 When it comes to be published, this will change anyway.
9356 The rest of the usage for this layout is substantially the same as for
9357 the normal article class.
9358 For details of what Elsevier do and don't allow, refer to their documentation.
9361 \begin_layout Section
9367 \begin_inset CommandInset label
9376 \begin_layout Standard
9382 \begin_layout Subsection
9386 \begin_layout Standard
9387 This section describes how to use LyX to make slides for overhead projectors.
9388 There are two document classes that can do this: the default slides class
9394 This section documents the latter.
9397 \begin_layout Standard
9398 I'm going to say this again, nice and clear, so that there's no misunderstanding
9402 \begin_layout Standard
9403 \begin_inset VSpace bigskip
9409 \begin_layout Standard
9413 This section documents the class
9414 \begin_inset Quotes eld
9422 \begin_inset Quotes erd
9430 \begin_layout Standard
9431 \begin_inset VSpace bigskip
9437 \begin_layout Standard
9438 If you're looking for the documentation for
9439 \begin_inset Quotes eld
9447 \begin_inset Quotes erd
9451 \begin_inset space ~
9455 \begin_inset CommandInset ref
9457 reference "sec:slitex"
9462 If your machine doesn't have the
9467 \begin_inset Quotes eld
9475 \begin_inset Quotes erd
9478 ] installed, you'll probably have to use the default
9482 class, which isn't quite as good as
9487 \begin_layout Standard
9492 class is designed for use with version 2.1 of the
9496 LaTeX class file which is now an integral part of LaTeX2e.
9499 \begin_layout Subsection
9503 \begin_layout Standard
9504 Obviously, to use this document class, you need to select
9505 \begin_inset Quotes eld
9513 \begin_inset Quotes erd
9523 \begin_inset space ~
9529 There are some settings in the
9532 \begin_inset space ~
9537 dialog that you should know about that are specific to this class:
9540 \begin_layout Itemize
9541 Don't change the options
9552 \begin_inset space ~
9558 They're ignored by the
9565 \begin_layout Itemize
9566 The default font size is 20
9567 \begin_inset space \thinspace{}
9570 pt with the other options being 17
9571 \begin_inset space \thinspace{}
9575 \begin_inset space \thinspace{}
9579 \begin_inset space \thinspace{}
9585 \begin_layout Itemize
9594 but all math equations are still typeset in the usual roman font.
9597 \begin_layout Itemize
9602 supports A4 and Letter paper sizes as well as a special size for working
9604 \begin_inset space \thinspace{}
9608 It doesn't support A5, B5, legal or executive paper sizes.
9611 \begin_layout Itemize
9612 Don't bother changing the
9616 settings because they are ignored anyway.
9617 All floats appear where they are defined in the text.
9620 \begin_layout Itemize
9625 setting behaves a bit differently for this class.
9630 provides extensive footer and header capabilities including a user-defined
9633 \begin_inset space ~
9637 \begin_inset CommandInset ref
9639 reference "sec:foilfoot"
9644 The title page is treated differently to all other pages in the document
9653 has the logo centered at the bottom of the page (if one is defined).
9654 The possible page style choices and what they do are as follows:
9658 \begin_layout Labeling
9659 \labelwidthstring MMMMMMM
9666 The final output contains no page numbers, or other headers or footers
9667 (except footnotes of course).
9671 \begin_layout Labeling
9672 \labelwidthstring MMMMMMM
9679 The final output contains page numbers centered at the bottom of the page.
9680 No other headings or footers (other than footnotes).
9683 \begin_layout Labeling
9684 \labelwidthstring MMMMMMM
9689 Page numbers in lower right corner.
9690 Additional headers and footers are also shown.
9691 This is also the default.
9694 \begin_layout Labeling
9695 \labelwidthstring MMMMMMM
9700 Gives you access to the
9704 package although its use with
9708 is discouraged by the writer of the
9712 package because of some potential page layout clashes.
9716 \begin_layout Subsubsection
9720 \begin_layout Standard
9721 The following options may be used in the extra class options in the
9723 Document\SpecialChar \menuseparator
9729 \begin_layout Labeling
9730 \labelwidthstring MMMMMMx
9735 This sets up the page layout for 7.33
9736 \begin_inset space \thinspace{}
9740 \begin_inset space \thinspace{}
9743 in paper, which is about the same aspect ratio as a 35
9744 \begin_inset space \thinspace{}
9747 mm slide, making it a bit easier to work with this medium.
9750 \begin_layout Labeling
9751 \labelwidthstring MMMMMMx
9756 Places a rule across the page below the header on every page except the
9760 \begin_layout Labeling
9761 \labelwidthstring MMMMMMx
9766 Places a rule across the page above the footer on every page except the
9770 \begin_layout Labeling
9771 \labelwidthstring MMMMMMx
9776 This is automatically set each time you create a new
9785 to use the dvips driver to rotate those pages that are set as landscape
9789 \begin_layout Labeling
9790 \labelwidthstring MMMMMMx
9795 Simply changes the page dimensions to those of a landscape page but doesn't
9797 Thus if you use this option you need to use an external program to rotate
9798 each page or feed your paper through your printer as landscape.
9799 Note that this option effectively reverses the roles of the
9807 environments (don't worry these are described in the next section).
9810 \begin_layout Labeling
9811 \labelwidthstring MMMMMMx
9816 Equation numbers on the left.
9819 \begin_layout Labeling
9820 \labelwidthstring MMMMMMx
9825 Flush-left equations.
9828 \begin_layout Subsection
9829 Supported Environments
9832 \begin_layout Standard
9833 Most of the environments commonly supported in other classes are also supported
9839 There are several additional environments provided by
9843 as well as a couple added by LyX.
9844 The following environments are shared with other classes:
9847 \begin_layout Standard
9851 \begin_layout Plain Layout
9863 \begin_layout Itemize
9869 \begin_layout Itemize
9875 \begin_layout Itemize
9881 \begin_layout Itemize
9887 \begin_layout Itemize
9893 \begin_layout Itemize
9899 \begin_layout Itemize
9905 \begin_layout Itemize
9911 \begin_layout Itemize
9917 \begin_layout Itemize
9923 \begin_layout Itemize
9929 \begin_layout Itemize
9935 \begin_layout Itemize
9941 \begin_layout Itemize
9947 \begin_layout Itemize
9953 \begin_layout Itemize
9959 \begin_layout Itemize
9965 \begin_layout Itemize
9971 \begin_layout Standard
9975 \begin_layout Plain Layout
9987 \begin_layout Standard
9988 That is, all the major environments apart from the sectioning environments.
9989 Since foils are essentially self-contained sections, with a title and body,
9994 provides specific commands for starting new foils and these are:
9997 \begin_layout Itemize
10003 \begin_layout Itemize
10009 \begin_layout Standard
10010 LyX also provides slightly modified versions of these two environments called:
10013 \begin_layout Itemize
10019 \begin_layout Itemize
10022 ShortRotatefoilhead
10025 \begin_layout Standard
10026 and the differences will be explained in the next section.
10029 \begin_layout Standard
10030 Since foils are often used in presenting ideas or new theorems and such
10035 also provides a comprehensive box of goodies for presenting them:
10038 \begin_layout Standard
10042 \begin_layout Plain Layout
10046 begin{multicols}{2}
10054 \begin_layout Itemize
10060 \begin_layout Itemize
10066 \begin_layout Itemize
10072 \begin_layout Itemize
10078 \begin_layout Itemize
10084 \begin_layout Itemize
10090 \begin_layout Itemize
10096 \begin_layout Itemize
10102 \begin_layout Itemize
10108 \begin_layout Itemize
10114 \begin_layout Itemize
10120 \begin_layout Standard
10124 \begin_layout Plain Layout
10136 \begin_layout Standard
10137 The starred versions are unnumbered while the unstarred versions are numbered.
10138 There are also two list environments added by LyX and these are:
10141 \begin_layout Itemize
10147 \begin_layout Itemize
10153 \begin_layout Standard
10158 provides some powerful header and footer capabilities that are best set
10159 in the preamble although they may be set at any point in a document.
10160 If you want to change these settings in your document the best place to
10161 do so is at the very top of a foil, i.
10162 \begin_inset space \thinspace{}
10168 \begin_inset space \space{}
10173 straight after the foilhead.
10176 \begin_layout Standard
10177 For this purpose, the following command styles are provided [
10184 \begin_layout Standard
10188 \begin_layout Plain Layout
10192 begin{multicols}{2}
10200 \begin_layout Itemize
10204 \begin_inset space ~
10210 \begin_layout Itemize
10216 \begin_layout Itemize
10220 \begin_inset space ~
10226 \begin_layout Itemize
10230 \begin_inset space ~
10236 \begin_layout Itemize
10240 \begin_inset space ~
10247 \begin_layout Standard
10248 \begin_inset space ~
10255 \begin_layout Standard
10259 \begin_layout Plain Layout
10271 \begin_layout Standard
10272 There are also a few commands provided by
10276 that aren't directly supported by LyX but I'll tell you what they do and
10277 how to use them in section
10278 \begin_inset space ~
10282 \begin_inset CommandInset ref
10284 reference "sec:unsuppfoils"
10291 \begin_layout Subsection
10292 Building a Set of Foils
10295 \begin_layout Standard
10296 This section will give a simple introduction to using the different environments
10297 to build a set of foils.
10298 If you want to see an example set of foils, take a look at the
10302 file you find in LyX's
10309 \begin_layout Subsubsection
10310 Give It a Title Page
10313 \begin_layout Standard
10314 Unlike other classes that provide
10334 creates the title on a page of its own.
10335 If you leave out the
10339 environment LaTeX will substitute the current date (every time you regenerate
10343 \begin_layout Subsubsection
10347 \begin_layout Standard
10348 As I mentioned earlier, there are four ways of starting a new foil.
10349 For portrait foils you should use
10358 The difference between these two environments is the amount of space between
10359 the title of the foil (the foilhead) and the body of the foil.
10362 \begin_layout Standard
10363 Landscape foils are generated using the
10369 ShortRotatefoilhead
10372 Again the only difference is the spacing between foilhead and body.
10373 Both of the short versions have 0.5 inches less separation between the foilhead
10378 \begin_layout Standard
10379 One problem with the support for landscape foils is the requirement that
10380 you have to use the
10384 driver to generate the PostScript output otherwise the foils won't be rotated.
10385 It is possible to get landscape foils even if you haven't got the
10389 driver provided you can feed your foils sideways through your printer ;-)
10392 \begin_layout Subsubsection
10393 Theorems, Lemmas, Proofs and more
10396 \begin_layout Standard
10397 Due to a small bug in LyX you can't have two of the same type of these environme
10398 nts directly following each other.
10399 They must be separated by something.
10400 If you try, you will just be extending the previous environment as if you
10401 had merged the two environments together.
10402 So, how do you get around this problem? The simplest option is to insert
10403 some text between the two environments or add a
10407 environment between the two with just a
10408 \begin_inset Quotes eld
10416 \begin_inset Quotes erd
10420 This will force LyX to produce two separate environments and hence the
10421 correct LaTeX output.
10422 An example is provided in the example file included with the LyX distribution.
10423 Remember, this problem only occurs if you are trying to place two of the
10424 same type of theorem-like environments one directly after the other.
10427 \begin_layout Subsubsection
10431 \begin_layout Standard
10432 You get all the commonly supported list styles found in other classes as
10433 well as two new ones.
10434 I'll only describe the new ones here.
10435 If you want to find out more about the other list environments check out
10441 If you intend to use itemized lists you might also want to read about the
10445 \begin_inset space ~
10449 \begin_inset space ~
10454 dialog described above in section
10455 \begin_inset space ~
10459 \begin_inset CommandInset ref
10461 reference "sec:bullet"
10468 \begin_layout Standard
10469 The two new list styles,
10477 , are designed to make it easier for you to create lists of do's and don'ts
10478 or right and wrong by providing dedicated environments that use a tick
10479 or a cross as the label of the list.
10480 These lists are in fact dedicated variants of the
10485 They do however require that you have the
10489 packages installed.
10492 \begin_layout Subsubsection
10496 \begin_layout Standard
10501 redefines the floating tables and figures so that they appear exactly where
10502 they are in the text rather than pushing them to the top of the page or
10503 to some user specified location.
10504 In fact if you change the float placement settings they are simply ignored.
10507 \begin_layout Subsubsection
10508 Page Headers and Footers
10509 \begin_inset CommandInset label
10511 name "sec:foilfoot"
10518 \begin_layout Standard
10522 \begin_inset space ~
10531 are two commands used to control the left-footer text string.
10532 The first is meant to allow you to include a graphic logo on your foils
10534 \begin_inset Quotes eld
10542 \begin_inset Quotes erd
10546 While the second is meant to provide a classification for the audience,
10550 \begin_inset space \thinspace{}
10556 \begin_inset space \space{}
10560 It is empty by default.
10563 \begin_layout Standard
10564 The remaining page corners can be filled by
10567 \begin_inset space ~
10572 (which defaults to page numbers),
10575 \begin_inset space ~
10583 \begin_inset space ~
10591 \begin_layout Subsection
10597 \begin_inset CommandInset label
10599 name "sec:unsuppfoils"
10606 \begin_layout Standard
10607 All the commands mentioned below need to be set in a
10615 within another environment.
10618 \begin_layout Subsubsection
10622 \begin_layout Standard
10623 All lengths are adjusted using the
10646 should be replaced by the name given to the length you want to change and
10651 is the length value.
10652 All lengths should be specified in units of length such as inches (
10664 ) or relative to some document or font-based length such as
10674 \begin_layout Standard
10675 It's possible to change the spacing between a foilhead and the body of the
10676 foil by adjusting the length specified by
10683 For example, to make
10688 \begin_inset space \space{}
10691 in closer to their bodies put the following in the preamble:
10697 foilheadskip}{-0.5in}
10700 \begin_layout Standard
10701 The spacings around floats can be adjusted by setting these lengths:
10704 \begin_layout Labeling
10705 \labelwidthstring MMMMMMMMMMM
10712 Separation between the text and the top of the float
10715 \begin_layout Labeling
10716 \labelwidthstring MMMMMMMMMMM
10723 Separation between the float and the caption
10726 \begin_layout Labeling
10727 \labelwidthstring MMMMMMMMMMM
10734 Separation between the caption and the following text
10737 \begin_layout Labeling
10738 \labelwidthstring MMMMMMMMMMM
10745 You can make the captions narrower than the surrounding text by adjusting
10747 Best done relative to
10756 \begin_layout Standard
10757 There are also several title page related lengths that you may find useful
10758 if you have a long title or several authors:
10761 \begin_layout Labeling
10762 \labelwidthstring MMMMMMMMMMM
10769 Separation from headers to
10774 \begin_layout Labeling
10775 \labelwidthstring MMMMMMMMMMM
10793 \begin_layout Labeling
10794 \labelwidthstring MMMMMMMMMMM
10808 \begin_layout Labeling
10809 \labelwidthstring MMMMMMMMMMM
10825 \begin_layout Labeling
10826 \labelwidthstring MMMMMMMMMMM
10842 \begin_layout Standard
10843 The last length related command affects all the list environments.
10854 a list environment then all the vertical spacing between the list items
10856 Note that this is a command not a length so it doesn't require
10862 like the stuff mentioned above.
10865 \begin_layout Subsubsection
10866 Headers and Footers
10869 \begin_layout Standard
10882 commands control whether the logo in the
10886 definition appear on a given page.
10893 in the preamble then none of the foils will have the logo on them.
10894 If you don't want the logo on a particular page place the
10900 directly after the foilhead of that page and the
10906 directly after the next foilhead.
10909 \begin_layout Standard
10910 If you decide to use the
10914 page style setting in the
10917 \begin_inset space ~
10922 dialog you should probably add
10932 to your preamble so headers and footers on landscape pages are correctly
10933 placed when rotated.
10934 This is due to some clashes between the page layouts provided by the
10945 \begin_layout Section
10946 Hollywood (Hollywood spec scripts)
10949 \begin_layout Standard
10955 \begin_layout Subsection
10959 \begin_layout Standard
10960 Getting the format of a Hollywood script right is a
10961 \begin_inset Quotes eld
10965 \begin_inset Quotes erd
10968 It is designed to make the readers focus on content and to be easy and
10969 familiar for the actors to read.
10970 Each page of a script should be one minute of film.
10971 Nothing goes in a script that you cannot see or hear on screen.
10972 The courier 12 pt font should be used throughout.
10976 \begin_layout Subsection
10980 \begin_layout Standard
10981 Speakers' lines should NEVER break in mid-sentence.
10982 If a speaker's lines continue over a page break, repeat the
10986 title followed by (Cont'd).
10989 \begin_layout Subsection
10993 \begin_layout Standard
10998 names as labels then cross-reference the label to insert the name.
10999 The cross-reference dialog will show the current cast of characters.
11000 You can use this to insert the speaker name in narratives also.
11003 \begin_layout Subsection
11004 Paper size and Margins
11007 \begin_layout Standard
11008 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11011 \begin_layout Subsection
11015 \begin_layout Standard
11016 The following environments are available.
11017 You can use hollywood.bind to get the bind keys shown at the right.
11020 \begin_layout Itemize
11024 \begin_inset Newline newline
11029 Used where nothing else works.
11033 \begin_layout Itemize
11039 \begin_inset space \hfill{}
11047 \begin_inset Newline newline
11050 Usually followed by something like
11051 \begin_inset Quotes eld
11054 on Sally waking up.
11055 \begin_inset Quotes erd
11061 \begin_layout Itemize
11065 \begin_inset space \hfill{}
11069 \begin_inset Newline newline
11074 Introduces a new INTERIOR camera set-up.
11075 Always followed by DAY or NIGHT, or something similar to define the lighting
11077 Everthing on this line in CAPS.
11080 \begin_layout Itemize
11084 \begin_inset space \hfill{}
11088 \begin_inset Newline newline
11093 Introduces a new EXTERIOR camera set-up.
11094 Everthing on this line in CAPS.
11097 \begin_layout Itemize
11101 \begin_inset space \hfill{}
11105 \begin_inset Newline newline
11110 The character speaking.
11113 \begin_layout Itemize
11117 \begin_inset space \hfill{}
11121 \begin_inset Newline newline
11126 Instructions to the speaker.
11127 The () are automatically inserted, but only the ( will show in LyX.
11128 Both will be printed.
11131 \begin_layout Itemize
11135 \begin_inset space \hfill{}
11139 \begin_inset Newline newline
11151 \begin_layout Itemize
11155 \begin_inset space \hfill{}
11159 \begin_inset Newline newline
11164 Camera movement instruction.
11166 \begin_inset space \thinspace{}
11170 \begin_inset space \space{}
11176 \begin_layout Itemize
11180 \begin_inset space \hfill{}
11186 \begin_layout Itemize
11190 \begin_inset space \hfill{}
11196 \begin_layout Itemize
11200 \begin_inset space \hfill{}
11206 \begin_layout Itemize
11210 \begin_inset space \hfill{}
11216 \begin_layout Subsection
11220 \begin_layout Itemize
11224 \begin_layout Itemize
11228 \begin_layout Itemize
11230 \begin_inset space \thinspace{}
11237 \begin_layout Itemize
11242 \begin_layout Itemize
11243 PAN — camera movement
11246 \begin_layout Itemize
11247 INSERT — cut to close-up of
11250 \begin_layout Section
11254 \begin_layout Standard
11257 Panayotis Papasotiriou
11260 \begin_layout Subsection
11264 \begin_layout Standard
11265 The ijmpc package is a set of macros that facilitates electronic manuscript
11268 International Journal of Modern Physics C
11271 Similarly, the ijmpd package is for creating manuscripts to be submitted
11274 International Journal of Modern Physics D
11277 Both journals are published by World Scientific.
11278 The corresponding document classes are named
11287 These files, together with instructions for the authors, can be downloaded
11289 \begin_inset Flex URL
11292 \begin_layout Plain Layout
11294 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11300 \begin_inset Flex URL
11303 \begin_layout Plain Layout
11305 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11311 Both packages are modified versions of the standard
11312 \begin_inset Quotes eld
11316 \begin_inset Quotes erd
11319 package, and they are almost (but not exactly) identical.
11320 Most of their features are supported by LyX.
11321 I have used LyX successfully to write articles submitted to both journals
11322 without any problem.
11325 \begin_layout Subsection
11329 \begin_layout Standard
11330 As usual, the easiest way to write a paper is to start with a template.
11333 File\SpecialChar \menuseparator
11352 This will give an (almost) empty document that includes the most common
11353 fields found in a manuscript.
11354 Simply overwrite the existing text (including the brackets,
11359 You should keep in mind the following remarks.
11362 \begin_layout Enumerate
11363 LyX won't let you change the font size and the page style of the document,
11364 because such modifications are not allowed by both packages.
11367 \begin_layout Enumerate
11368 The language of the document should not be changed.
11369 Before previewing your paper, be sure that the babel package is not used.
11370 To do this, click on
11372 Tools\SpecialChar \menuseparator
11383 checkbox in the language settings, and click on
11391 , if you wish to make this change permanent).
11394 \begin_layout Enumerate
11396 \begin_inset Quotes eld
11400 \begin_inset Quotes erd
11403 style must be used to define keywords.
11406 \begin_layout Enumerate
11407 The ijmpc package provides a style named
11408 \begin_inset Quotes eld
11411 Classification Codes
11412 \begin_inset Quotes erd
11415 , which can be used to define classification codes, such as PACS numbers.
11416 Note that this facility is not supported by the ijmpd package.
11419 \begin_layout Enumerate
11420 Several new environments are available:
11421 \begin_inset Quotes eld
11425 \begin_inset Quotes erd
11429 \begin_inset Quotes eld
11433 \begin_inset Quotes erd
11437 \begin_inset Quotes eld
11441 \begin_inset Quotes erd
11445 \begin_inset Quotes eld
11449 \begin_inset Quotes erd
11453 \begin_inset Quotes eld
11457 \begin_inset Quotes erd
11461 \begin_inset Quotes eld
11465 \begin_inset Quotes erd
11469 \begin_inset Quotes eld
11473 \begin_inset Quotes erd
11477 \begin_inset Quotes eld
11481 \begin_inset Quotes erd
11485 \begin_inset Quotes eld
11489 \begin_inset Quotes erd
11493 \begin_inset Quotes eld
11497 \begin_inset Quotes erd
11501 \begin_inset Quotes eld
11505 \begin_inset Quotes erd
11509 \begin_inset Quotes eld
11513 \begin_inset Quotes erd
11517 \begin_inset Quotes eld
11521 \begin_inset Quotes erd
11525 \begin_inset Quotes eld
11529 \begin_inset Quotes erd
11533 Their use is more or less obvious.
11534 LyX supports all these environments; it will use the proper label, text
11535 style, and numbering scheme for each of them.
11538 \begin_layout Enumerate
11539 Both packages use basic citations; the natbib package should not be used.
11540 In LyX, citation references are shown as usual; in the output, citations
11541 are shown as superscripts.
11542 If you want to use a citation as normal text, you should use the
11547 \begin_inset space \thinspace{}
11551 \begin_inset space \space{}
11555 \begin_inset Quotes eld
11559 \begin_inset space \space{}
11569 \begin_inset Quotes erd
11575 \begin_layout Enumerate
11577 \begin_inset Quotes eld
11581 \begin_inset Quotes erd
11584 section in both packages.
11585 To put acknowledgments, just use the
11586 \begin_inset Quotes eld
11590 \begin_inset Quotes erd
11596 \begin_layout Enumerate
11597 Appendices may be added to the paper,
11601 the Acknowledgments and
11606 LyX provides a special environment, called
11607 \begin_inset Quotes eld
11611 \begin_inset Quotes erd
11614 which marks the beginning of the appendices.
11615 This environment should be left blank; it just sends a LaTeX command, but
11616 nothing is really printed.
11618 \begin_inset Quotes eld
11622 \begin_inset Quotes erd
11625 is printed with blue letters, as a signal that all sections after that
11626 point are appendices.
11627 To write an appendix, use the
11628 \begin_inset Quotes eld
11632 \begin_inset Quotes erd
11636 LyX will number each appendix with capital letters, as required by both
11639 \begin_inset Quotes eld
11643 \begin_inset Quotes erd
11650 be present before the first appendix; if not, all appendices will be numbered
11651 as normal sections in the output.
11654 \begin_layout Enumerate
11655 The ijmpc and the ijmpd packages use the
11659 command to implement table captions.
11660 As a result, a table created by LyX is printed correctly, but its caption
11662 However, you can use some TeX code to overpass this problem, so that captions
11663 are printed as expected.
11664 To do so, create a float table as usual, remove the caption, and replace
11665 it with the TeX code
11675 (sic); you must also the TeX code
11679 immediately after the tabular material.
11680 Study the example table included in the template files to see how this
11681 trick is implemented.
11682 Alternatively, If you need table captions, you should implement the whole
11687 file, then include this file to the LyX document (
11689 Insert\SpecialChar \menuseparator
11690 File\SpecialChar \menuseparator
11692 \begin_inset space ~
11698 Details on how to create a table float can be found in the files
11706 , included in the corresponding packages.
11709 \begin_layout Subsection
11710 Preparing a paper for submission
11713 \begin_layout Standard
11714 Before you submit your paper you must export the LyX document as a LaTeX
11717 File\SpecialChar \menuseparator
11718 Export\SpecialChar \menuseparator
11725 \begin_layout Plain Layout
11726 Actually you have the choice between LaTeX (plain) and pdflatex.
11727 If you intend to use pdflatex to prepare the paper, you should use the
11728 pdflatex option so that included graphics are converted to PDF format,
11729 ready for use by pdflatex.
11734 , then make the following changes to the resulting
11741 \begin_layout Enumerate
11742 Remove the comment lines before the
11751 \begin_layout Enumerate
11752 Remove everything between (and including) the
11764 commands, except for any commands you specifically put into the LaTeX preamble.
11767 \begin_layout Standard
11772 file should be saved and processed through LaTeX as many times as necessary.
11773 You may also want to check the resulting
11780 \begin_layout Subsection
11784 \begin_layout Standard
11785 The use of TeX code is reduced to two commands, which must be placed at
11786 the top of the document.
11787 If you started writing your paper by using the
11795 template, the TeX code needed is already in its place; you usually don't
11797 You may only modify the first TeX code to specify the information printed
11798 to the top of odd and even pages (authors' names and short paper's title,
11800 This TeX code must have the form
11804 markboth{Authors' Names}{Short Paper's Title}
11809 \begin_layout Section
11813 \begin_layout Standard
11819 \begin_layout Subsection
11823 \begin_layout Standard
11824 The iopart package provides a document class to create electronic manuscript
11825 submission to the journals published by the Institute of Physics.
11826 Instructions for the authors how to create a paper using the iopart class
11827 can be downloaded together with the iopart package from the site
11828 \begin_inset Flex URL
11831 \begin_layout Plain Layout
11833 ftp://ftp.iop.org/pub/journals/latex2e
11841 \begin_layout Subsection
11845 \begin_layout Standard
11846 The easiest way to write a paper is to start with the file
11850 that is available in LyX's examples files folder.
11851 Open this file, save it under a new name, and start writing.
11852 The example file explains how to use the special text environments.
11853 Here are the most important advices:
11856 \begin_layout Itemize
11857 To be able to compile your document to a PDF, PS, or DVI, assure that the
11860 Use AMS math package
11862 in the document settings under
11869 \begin_layout Itemize
11872 The title environment defines the kind of your paper.
11873 So use one of the following environments for the title:
11877 \begin_layout Itemize
11886 \begin_layout Itemize
11895 \begin_layout Itemize
11901 for a Topical review
11904 \begin_layout Itemize
11913 \begin_layout Itemize
11922 \begin_layout Itemize
11928 for a Paper (same as Title)
11931 \begin_layout Itemize
11937 for a Preliminary communication
11940 \begin_layout Itemize
11946 for a Rapid communication
11949 \begin_layout Itemize
11955 for a Letter to the editor
11959 \begin_layout Itemize
11962 All title environments except of
11966 can have an optional short title.
11969 \begin_layout Itemize
11970 There is a general title environment
11974 which is not directly supported by the LyX.
11975 This can be used as TeX code when your document doesn't fit into one of
11976 the other title types.
11979 \begin_layout Standard
11980 For more informations like hints for special table and formula formatting,
11981 look at the IOP author guidelines.
11984 \begin_layout Section
11988 \begin_layout Standard
11991 Panayotis Papasotiriou
11994 \begin_layout Subsection
11998 \begin_layout Standard
11999 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12000 that facilitates electronic manuscript submission to the journals they
12002 Most known of them (at least in my domain of interest) are
12004 Astrophysics and Space Science
12010 , but there are many others (see a complete list at
12011 \begin_inset Flex URL
12014 \begin_layout Plain Layout
12016 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12022 The Kluwer package may be downloaded from the site
12023 \begin_inset Flex URL
12026 \begin_layout Plain Layout
12028 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12034 A complete user guide is contained in that package (but it can also be
12035 downloaded separately).
12038 \begin_layout Standard
12039 LyX supports many features of the package but not everything.
12040 However, the TeX code needed is reduced to some
12041 \begin_inset Quotes eld
12045 \begin_inset Quotes erd
12048 commands of the package (see
12049 \begin_inset space ~
12053 \begin_inset CommandInset ref
12055 reference "subsec:kluwer_peculiarities"
12060 I have recently used LyX to write an article submitted to the
12062 Astrophysics and Space Science
12064 without any problem.
12067 \begin_layout Subsection
12071 \begin_layout Standard
12072 The easiest way to write a paper is to start with the Kluwer template file.
12075 File\SpecialChar \menuseparator
12087 This will give an (almost) empty document that includes the most common
12088 fields found in a manuscript and a short description of their use.
12089 As in most templates, simply overwrite the existing text (including the
12094 ) with the correct information.
12097 \begin_layout Subsection
12098 Preparing a paper for submission
12101 \begin_layout Standard
12102 As in the AASTeX package, before you submit your paper to a journal you
12104 \begin_inset Quotes eld
12108 \begin_inset Quotes erd
12114 \begin_layout Enumerate
12115 Export your paper as a LaTeX file.
12116 To do this, click on
12118 File\SpecialChar \menuseparator
12119 Export\SpecialChar \menuseparator
12126 \begin_layout Enumerate
12131 file with a text editor and make the following changes
12135 \begin_layout Enumerate
12136 remove the comment lines before the
12145 \begin_layout Enumerate
12146 remove everything between (and including) the
12158 commands, except for any commands you specifically put into the LaTeX preamble.
12161 \begin_layout Standard
12170 \begin_layout Enumerate
12175 file through LaTeX as many times as necessary (usually up to three).
12178 \begin_layout Enumerate
12184 \begin_inset space \thinspace{}
12188 \begin_inset space \space{}
12195 , and check if everything is OK (it should, if you didn't make any mistake).
12198 \begin_layout Subsection
12199 \begin_inset Quotes eld
12203 \begin_inset Quotes erd
12206 of the Kluwer package
12207 \begin_inset CommandInset label
12209 name "subsec:kluwer_peculiarities"
12216 \begin_layout Standard
12217 The Kluwer package has the following
12218 \begin_inset Quotes eld
12222 \begin_inset Quotes erd
12228 \begin_layout Enumerate
12229 It is possible to write multiple articles in the same LaTeX file
12233 \begin_layout Plain Layout
12234 I can't imagine any good reason to do this.
12240 Each article must be included in the environment
12241 \begin_inset Quotes eld
12245 \begin_inset Quotes erd
12249 Unfortunately, this environment cannot be omitted, even if you write just
12251 Therefore, each article starts with the command
12257 and, obviously, ends with the command
12264 Although this can be implemented in LyX, I didn't included it, since it
12265 looks ugly and can confuse the novice user.
12266 Therefore, you need to enter them directly and mark them as LaTeX code
12268 \begin_inset Quotes eld
12272 \begin_inset Quotes erd
12278 \begin_layout Enumerate
12279 Information given at the beginning of the article (i.
12280 \begin_inset space \thinspace{}
12284 \begin_inset space \space{}
12287 title, subtitle, author, institution, running title, running author, abstract
12288 and keywords) must be included in an environment called
12289 \begin_inset Quotes eld
12293 \begin_inset Quotes erd
12297 This is not implemented in LyX, so you must enter title, subtitle etc.
12298 \begin_inset space ~
12301 between two TeX code lines (
12316 \begin_layout Enumerate
12317 According to the user manual, the label of each bibliography item must be
12341 \begin_layout Standard
12346 template takes care of all these
12347 \begin_inset Quotes eld
12351 \begin_inset Quotes erd
12355 If you start a new paper using this template you don't need to do anything
12360 \begin_layout Enumerate
12361 don't delete the TeX code included in the template, and
12364 \begin_layout Enumerate
12365 copy the example bibliography item included in the template and modify it
12366 as necessary to enter new bibliography items.
12369 \begin_layout Section
12373 \begin_layout Standard
12379 \begin_layout Subsection
12383 \begin_layout Standard
12384 The LyX document classes
12386 article (koma-script)
12390 report (koma-script)
12408 correspond to the LaTeX document classes
12425 \begin_inset space ~
12428 of the Koma-Script family.
12429 They are replacements for the standard document classes
12445 , resp., and fit better to European typography conventions in a number of
12449 \begin_layout Itemize
12450 Standard character size is 11pt in
12452 article (koma-script)
12456 report (koma-script)
12464 letter (koma-script)
12469 \begin_layout Itemize
12470 Headings, labels of the description environment, and a number of elements
12473 letter (koma-script)
12475 document class are set in a bold sans serif font.
12479 \begin_layout Plain Layout
12480 There is a big difference between the bold sans serif old cm fonts and new
12481 ec fonts, especially in the appearance of headings.
12482 In comparison, the ec bold sans serif fonts look a bit thin.
12483 Here the LaTeX package
12491 helps to produce the
12492 \begin_inset Quotes eld
12496 \begin_inset Quotes erd
12499 appearance when using the ec fonts.
12504 The numbering of chapter headings is made in the same way as the numbering
12505 of section headings, that is without the extra line
12506 \begin_inset Quotes eld
12509 Chapter\SpecialChar \ldots{}
12511 \begin_inset Quotes erd
12515 In addition, the appearance of the headings can be modified by using a
12516 number of options (in LyX to be entered in the field
12519 \begin_inset space ~
12526 Layout\SpecialChar \menuseparator
12530 A detailed German description of these options can be found in the Koma-Script
12538 \begin_layout Itemize
12539 The main means in the Koma-Script document classes to design the type area
12548 (in LyX to be entered in the extra class options field in the dialog
12550 Document\SpecialChar \menuseparator
12554 They make a clearer modification of page margins possible as do the options
12557 Document\SpecialChar \menuseparator
12561 A detailed German description of these and other type area options can
12562 be found in the Koma-Script documentation
12569 \begin_layout Itemize
12570 The LaTeX document classes of the Koma-Script family define a number of
12571 additional commands.
12572 Those part of it which makes sense in LyX is implemented in corresponding
12576 \begin_layout Standard
12577 A detailed German description of the LaTeX document classes of the Koma-Script
12578 family can be found in the Koma-Script documentation
12586 \begin_layout Plain Layout
12587 There is an English translation
12591 , but it is not a complete one.
12596 The following sections describe only those aspects, which are relevant
12600 \begin_layout Subsection
12601 article (koma-script), report (koma-script), and book (koma-script)
12604 \begin_layout Standard
12605 The document classes
12607 article (koma-script)
12611 report (koma-script)
12621 are implemented in the layout files
12634 They contain all the paragraph types of the corresponding standard document
12647 , resp., partly modified, with the exception of the LyX specific
12651 -type, which is replaced by the new
12655 -type having the same functionality.
12660 -Type there is a number of new paragraph types added.
12667 letter (koma-script)
12672 \begin_layout Itemize
12681 : are equivalents to
12689 , resp., additionally inserting an entry in the table of contents.
12698 are not contained in
12700 article (koma-script)
12705 \begin_layout Itemize
12714 : behave exactly as
12722 , resp., additionally clearing running heads.
12727 is not contained in
12729 article (koma-script)
12735 \begin_layout Plain Layout
12748 report (koma-script)
12750 , but since this is identical to
12754 , is has not been implemented in LyX.
12762 \begin_layout Itemize
12767 : generates a heading directly above the following paragraph in the standard
12768 character size without affecting the structure of the document.
12771 \begin_layout Itemize
12780 are special captions which respect the different space settings needed
12781 for captions placed above or below an element (if you follow strict typographic
12782 rules, you might want to place table captions always above the table).
12783 You can also use the class option
12787 , which will switch
12800 You need at least Koma-Script version 2.8q to use this.
12803 \begin_layout Itemize
12808 : can be used to set a bonmot, e.
12809 \begin_inset space \thinspace{}
12813 \begin_inset space \space{}
12816 at the beginning of a chapter.
12817 If you use the optional argument (
12819 Insert\SpecialChar \menuseparator
12821 \begin_inset space ~
12826 ), you can insert the dictum's author there.
12827 Dictum and author are separated by a line.
12828 You need at least Koma-Script version 2.8q to use this.
12833 is not contained in
12835 article (koma-script)
12840 \begin_layout Standard
12841 The following types, together with the standard types
12853 , form the title area of the document.
12854 They must be entered ahead of the first
12855 \begin_inset Quotes eld
12859 \begin_inset Quotes erd
12866 \begin_layout Plain Layout
12867 The corresponding LaTeX commands must appear before the
12878 When such a type is used more than once, the latter usage overwrites the
12879 former one, that means, for every type only the latest usage is valid.
12880 The order of the different types however has, like
12892 , no effect on the appearance of the produced document.
12895 \begin_layout Itemize
12900 : produces a centered paragraph above the ordinary title (
12912 ) for the subject of the document.
12915 \begin_layout Itemize
12920 : produces a centered paragraph below the ordinary title (
12932 ) for the publishers' name.
12935 \begin_layout Itemize
12942 report (koma-script)
12948 produces a centered paragraph on its own page behind the title page, or
12951 article (koma-script)
12953 produces a centered paragraph below the ordinary title (
12969 ) for a dedication.
12972 \begin_layout Itemize
12977 : produces a left aligned paragraph above the ordinary title (
12993 ) for a document`s head.
12996 \begin_layout Itemize
13001 : produces in a double-sided print in
13003 report (koma-script)
13009 a left-aligned paragraph at the top of the title page`s back or has no
13010 effect in a single-sided print or in
13012 article (koma-script)
13017 \begin_layout Itemize
13022 : produces in a double-sided print in
13024 report (koma-script)
13030 a left-aligned paragraph at the bottom of the title page`s back or has
13031 no effect in a single-sided print or in
13033 article (koma-script)
13038 \begin_layout Itemize
13043 : produces a special
13044 \begin_inset Quotes eld
13048 \begin_inset Quotes erd
13051 page ahead of the actual document containing a paragraph without special
13055 \begin_layout Standard
13056 The layout files for the document classes
13058 article (koma-script)
13062 report (koma-script)
13068 do include the file
13073 This is thought of as a place to define your own types.
13078 in your personal layout directory and edit the file!
13081 \begin_layout Subsection
13082 letter (koma-script)
13085 \begin_layout Standard
13089 \begin_layout Plain Layout
13101 \begin_layout Standard
13105 letter (koma-script)
13107 is implemented in the layout file
13112 It contains all the paragraph types of the corresponding standard document
13117 , partly modified, with the exception of the LyX specific types
13129 type, which is replaced by the new
13134 In addition, it contains, in contrast to the standard document class, the
13152 Furthermore, there are a number of new letter specific types.
13155 \begin_layout Standard
13159 \begin_layout Plain Layout
13171 \begin_layout Standard
13172 The appearance of the letter produced by this document class can be controlled
13173 by a number of LaTeX commands, which you can put in the LaTeX preamble.
13177 \begin_layout Plain Layout
13178 For example, the standard appearance of the letter`s heading, consisting
13179 of name and address, is quite self-willed.
13181 \begin_inset Quotes eld
13185 \begin_inset Quotes erd
13188 heading is produced by the following LaTeX commands in the preamble:
13191 \begin_layout LyX-Code
13201 \begin_layout LyX-Code
13217 \begin_layout LyX-Code
13227 \begin_layout LyX-Code
13247 A detailed German description of such LaTeX commands can be found in the
13248 Koma-Script documentation
13253 With it, the letter's author can produce his personal letter layout.
13256 \begin_layout Standard
13265 define the beginning of the letter and must be used in every letter.
13266 To emphasize them in the LyX document class, they are marked with the letter
13276 \begin_inset space ~
13279 in the left margin.
13280 It is possible to write any number of letters in one file.
13285 type produces a new letter using the same addressee and a
13289 type produces a new addressee.
13306 are ordinary paragraph types and can also be used several times in one
13307 and the same letter.
13310 \begin_layout Itemize
13315 : produces a paragraph for the addressee and implicitly defines the beginning
13319 \begin_layout Itemize
13324 : produces a paragraph for the form of address and implicitly produces a
13328 \begin_layout Itemize
13333 : produces a paragraph for a close.
13336 \begin_layout Itemize
13341 : produces a paragraph for a postscript.
13344 \begin_layout Itemize
13349 : produces a paragraph for a distribution list.
13352 \begin_layout Itemize
13357 : produces a paragraph for enclosures.
13360 \begin_layout Standard
13401 are input types provided with a label to enter information, which will
13402 be processed by the document class.
13406 \begin_layout Plain Layout
13407 It could be seen as a matter of inconsequence, that the types
13415 described above are not such input types as well.
13416 Because of the special meaning of those types, however, I have implemented
13417 them as ordinary paragraph types with a one letter mark in the left margin.
13418 Moreover, it would affect my feeling of symmetry, if the
13426 type had such a serious different appearance.
13431 The types must be used ahead of the corresponding
13438 \begin_layout Standard
13439 An implementation of these types in a WYSIWYG fashion does not seem to make
13440 sense, because the real appearance of the produced letter does not only
13441 depend on the usage of the particular type, but also on other factors.
13442 For example, a signature entered in the
13446 type will in the standard behavior appear in the produced letter only,
13447 when in the same letter also a
13452 The entered value of the
13456 type will in the standard behavior not appear in the produced letter at
13458 The possibility to design the letter`s heading freely is already indicated
13459 in a footnote above.
13462 \begin_layout Standard
13463 The input types can also be used as empty paragraphs.
13464 This makes sense e.
13465 \begin_inset space \thinspace{}
13469 \begin_inset space \space{}
13481 type is not used at all, in the standard behavior the value of the
13485 type is used as signature, whereas if an empty
13489 type is used, no signature value is defined.
13492 \begin_layout Standard
13493 By using the input types it is possible to write a letter template, containing
13494 filled input types with your personal dates (name, address, etc.) and empty
13495 input types for other dates you want to enter.
13498 \begin_layout Itemize
13503 : sender's name, in the standard behavior appears as a centered paragraph
13504 in small caps in the letter`s heading.
13507 \begin_layout Itemize
13512 : sender's signature, in the standard behavior appears below the
13521 type is used, the value of the
13525 type appears instead.
13528 \begin_layout Itemize
13533 : sender's address, in the standard behavior appears in a centered paragraph
13534 in the letter`s heading below the sender's name.
13537 \begin_layout Itemize
13542 : sender's telephone number, in the standard behavior only sets the LaTeX
13552 \begin_layout Itemize
13557 : place of the letter`s making.
13560 \begin_layout Itemize
13565 : date of the letter`s making.
13574 , in the standard behavior, produce the place and the date in a right-aligned
13575 line below the addressee's field.
13580 type is used, neither place nor date appear, independent of the value of
13590 type is used, the date of the letter `s production is used.
13593 \begin_layout Itemize
13598 : sender`s back address, in the standard behavior appears above the addressee's
13599 field in a small sans serif font.
13602 \begin_layout Itemize
13607 : special mail information, in the standard behavior appears underlined
13608 above the addressee's field below the back address.
13611 \begin_layout Itemize
13616 : additional information, in the standard behavior appears on right side
13617 below the addressee`s field.
13620 \begin_layout Itemize
13625 : the letter's title, in the standard behavior appears in a big, bold, sans
13626 serif font above the subject.
13629 \begin_layout Itemize
13634 : the letter's subject, in the standard behavior appears in a bold font
13642 \begin_layout Standard
13663 produce a business letter like line above the
13667 line containing the fields
13668 \begin_inset Quotes eld
13672 \begin_inset Quotes erd
13676 \begin_inset Quotes eld
13680 \begin_inset Quotes erd
13684 \begin_inset Quotes eld
13688 \begin_inset Quotes erd
13692 \begin_inset Quotes eld
13696 \begin_inset Quotes erd
13700 \begin_inset Quotes eld
13704 \begin_inset Quotes erd
13708 \begin_inset Quotes eld
13712 \begin_inset Quotes erd
13716 For the date field, the value of the
13722 \begin_inset Quotes eld
13725 business letter types
13726 \begin_inset Quotes erd
13729 is used, the value of the
13733 type however does not appear, but only the LaTeX variable
13740 The ordinary output of place and date in a right-aligned line below the
13741 addressee`s field is suppressed.
13742 The types are implemented as input types provided with a label and must
13743 be used ahead of the corresponding
13750 \begin_layout Itemize
13758 \begin_layout Itemize
13766 \begin_layout Itemize
13774 \begin_layout Itemize
13782 \begin_layout Itemize
13790 \begin_layout Subsection
13791 The new letter class: letter (koma-script v.2)
13794 \begin_layout Standard
13800 \begin_layout Standard
13801 \begin_inset VSpace medskip
13807 \begin_layout Standard
13809 Koma-Script version 2.8 has introduced a new letter class
13813 which supersedes the now unsupported
13818 It has — on the LaTeX side — a completely new interface and is not compatible
13819 with the old class.
13820 Therefore, LyX supports both, though it is recommended to use the new class.
13823 \begin_layout Standard
13824 This class covers the same functionality as
13826 letter (koma-script),
13829 The basic items are
13833 (receiver's address, same as
13837 in the old layout),
13850 will start a new letter (i.
13851 \begin_inset space \thinspace{}
13855 \begin_inset space \space{}
13858 you can write several letters per document).
13859 New elements are sender's
13875 and the possibility to use a
13881 Insert\SpecialChar \menuseparator
13887 \begin_layout Standard
13888 The biggest improvement is, though, that the letter's layout is configurable
13889 at almost any needs.
13890 This can be done via the preamble or with a special style file (Letter
13891 Class Option, extension
13895 ), that will be read in as a class option.
13899 \begin_layout Plain Layout
13900 The KOMA package comes with some default
13905 There is, for instance, a
13909 file that follows german typesetting rules, or a
13913 that provides the default layout of the old
13918 The latter can be loaded with the class option
13927 ayout\SpecialChar \menuseparator
13932 ocument\SpecialChar \menuseparator
13944 template that is included in LyX for examples.
13945 A detailed description is to be found in the Koma-Script documentation
13953 \begin_layout Subsection
13957 \begin_layout Standard
13958 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
13962 \begin_layout Itemize
13963 The chapter number of a
13967 type appears on a line of its own above the chapter heading instead of
13968 appearing in the same line ahead of it.
13969 The cause for that is the LyX internal behavior for the labeltype
13973 in the layout file.
13976 \begin_layout Itemize
13977 The headings of the types
13985 are only put in the
13986 \begin_inset Quotes eld
13990 \begin_inset Quotes erd
13993 LaTeX table of contents, but not in the LyX table of contents (
13995 Document\SpecialChar \menuseparator
13997 \begin_inset space ~
14001 \begin_inset space ~
14009 \begin_layout Itemize
14010 The paragraphs in a
14014 document class appear in a skip separation mode, not indented.
14015 This is the standard behavior, no special LaTeX commands are needed for
14019 Document\SpecialChar \menuseparator
14022 dialog the corresponding radio button indicates
14031 value always has the effect that extra LaTeX commands are inserted in the
14032 document to produce the gap, which is not what is wanted in this case.
14035 \begin_layout Section
14036 Latex8 (IEEE Conference Papers)
14039 \begin_layout Standard
14045 \begin_layout Subsection
14049 \begin_layout Standard
14050 Since this class is specifically for writing submissions to IEEE sponsored
14051 conferences I strongly recommend that you get a copy of their Authors Kit.
14056 package and associated bibliography style file is included in the kit.
14057 The Authors Kit is usually sent out by email once your initial submission
14059 There is a lot of useful information in the Authors Kit explaining formatting
14060 restrictions and so on and I will assume you have read this since that
14061 means I don't have to repeat it all here.
14064 \begin_layout Subsection
14068 \begin_layout Standard
14069 [AR\SpecialChar \@.
14073 \begin_layout Subsection
14074 Supported Environments
14077 \begin_layout Itemize
14083 \begin_layout Itemize
14089 \begin_layout Itemize
14095 \begin_layout Itemize
14101 \begin_layout Itemize
14107 \begin_layout Itemize
14113 \begin_layout Itemize
14119 \begin_layout Itemize
14125 \begin_layout Itemize
14131 \begin_layout Subsection
14132 Differences Between Screen and Paper
14135 \begin_layout Standard
14136 There are slight differences in appearance mainly with the presentation
14137 of section counters.
14138 On screen the trailing period of the section counter is missing but it
14139 will appear in the output so don't let this worry you.
14142 \begin_layout Section
14146 \begin_layout Standard
14152 \begin_layout Subsection
14156 \begin_layout Standard
14157 Memoir is a very powerful and constantly evolving class.
14158 It has been designed with regard to fictional and non-fictional literature.
14159 Its aim is to let the user have maximum control over the typesetting of
14161 Memoir is based on the standard book class, but it can also emulate the
14162 article class (see below).
14165 \begin_layout Standard
14166 Peter Wilson, the developer of Memoir, is known as the author of lots of
14167 useful packages in the LaTeX world.
14168 Most of them have been merged with Memoir.
14169 Therefore, it is much easier to layout the table of contents, appendices,
14170 chapter designs and such.
14171 LyX, though, does not support all of these goodies natively.
14172 Some of them might be added to forthcoming releases
14176 \begin_layout Plain Layout
14177 You are invited to send suggestions to
14178 \begin_inset Flex URL
14181 \begin_layout Plain Layout
14183 lyx-devel@lists.lyx.org
14193 , lots will probably never, due to the limitations of LyX's framework.
14194 Of course you can still use all features with the help of some native LaTeX
14199 \begin_layout Plain Layout
14204 \begin_layout Plain Layout
14214 \begin_inset space ~
14218 \begin_inset CommandInset ref
14220 reference "sec:Inserting-TeX-Code"
14230 In this section, we can only list those features which are natively supported
14232 For detailed descriptions (and for the rest of features) we are recommending
14233 to have a look at the detailed manual of the Memoir class
14237 \begin_layout Plain Layout
14242 \begin_layout Plain Layout
14252 \begin_inset Flex URL
14255 \begin_layout Plain Layout
14257 CTAN:/macros/latex/memoir/memman.pdf
14267 , which is not only a user guide for the class, but also both a comprehensive
14268 description on good typesetting and a superb example for good typesetting
14272 \begin_layout Subsection
14273 Basic features and restrictions
14276 \begin_layout Standard
14277 Memoir supports basically all features of the standard book classes.
14278 There are, however, some differences, as follows:
14281 \begin_layout Description
14283 \begin_inset space ~
14286 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14289 \begin_layout Description
14291 \begin_inset space ~
14294 style: The fancy page style is not supported, due to a command clash between
14295 Memoir and the fancyhdr package (they are both defining a command with
14296 the same name, which confuses LaTeX).
14297 Instead, Memoir comes with a bunch of own page styles (see
14299 Layout\SpecialChar \menuseparator
14300 Document\SpecialChar \menuseparator
14302 \begin_inset space ~
14308 If you want to use these for the chapter pages, you have to use the command
14315 in the main text or in preamble (e.
14316 \begin_inset space \thinspace{}
14320 \begin_inset space \space{}
14327 chapterstyle{companion}
14332 \begin_layout Description
14333 Sectioning: Sectionings (chapter, section, subsection etc.) are coming with
14334 an optional argument in the standard classes.
14335 With this, you can specify an alternative version of the title for the
14336 table of contents and the headers (for instance, if the title is too long).
14337 In LyX, you can do this via
14339 Insert\SpecialChar \menuseparator
14341 \begin_inset space ~
14346 at the beginning of a chapter/section.
14347 Memoir features a second optional argument and thus separates the table
14348 of contents from the header.
14349 You can define three variants of a title with this: one for the main text,
14350 one for the table of contents, and one for the headers.
14351 Simply insert two optional arguments if you need this feature, the first
14352 one containing the short title for the Table of Contents, the second one
14353 containing an alternative short title for the headers.
14356 \begin_layout Description
14357 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14358 of contents, the list of figures and the list of table start a new page
14360 Memoir does not follow this route.
14361 You have to insert a page break yourself, if you want to have one.
14364 \begin_layout Description
14365 Titlepage: For some unknown reason, Memoir uses pagination on the title
14366 page (in the standard classes, title pages are
14367 \begin_inset Quotes eld
14371 \begin_inset Quotes erd
14375 \begin_inset space \thinspace{}
14379 \begin_inset space \space{}
14383 If you want an empty title page, type
14387 aliaspagestyle{title}{empty}
14392 \begin_layout Description
14393 Article: With the class option
14399 Layout\SpecialChar \menuseparator
14400 Document\SpecialChar \menuseparator
14402 \begin_inset space ~
14407 ), you can emulate article style.
14408 That is, counters (footnotes, figures, tables etc.) will not be reset on
14409 new chapters, chapters don't start a new page (but are—in contrary to
14410 \begin_inset Quotes eld
14414 \begin_inset Quotes erd
14417 article classes—still allowed), parts, though, use their own page, as in
14421 \begin_layout Description
14422 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14423 font commands, which have been used in the old LaTeX version 2.09 (e.
14424 \begin_inset space \thinspace{}
14428 \begin_inset space \space{}
14444 It produces an error and stops LaTeX whenever such a command appears.
14449 reallows the commands and spits out warnings instead (which does at least
14451 Since a lot of packages and particularly BibTeX style files are still using
14452 those commands, we have decided to use this option by default.
14455 \begin_layout Subsection
14459 \begin_layout Standard
14460 We will only describe the features supported by LyX (which is not much currently
14462 Please consult the Memoir manual
14466 \begin_layout Plain Layout
14471 \begin_layout Plain Layout
14481 \begin_inset Flex URL
14484 \begin_layout Plain Layout
14486 CTAN:/macros/latex/memoir/memman.pdf
14499 \begin_layout Description
14500 Abstract: You may wonder why an abstract is an extra feature.
14501 Well, it is in book class.
14502 Usually books don't have abstracts.
14503 Memoir, however, has.
14504 You can use it wherever and how often you like.
14507 \begin_layout Description
14508 Chapterprecis: You may know this from belletristic: The contents of a chapter
14509 is shortly described below the title and also in the table of contents
14511 \begin_inset space \thinspace{}
14515 \begin_inset space \space{}
14520 Our hero arrives in Troia; he loses some friends; he finds others
14523 Chapterprecis does exactly this.
14524 It is therefore only sensible below a chapter.
14527 \begin_layout Description
14528 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14529 The epigraph environment provides an elegant way of typesetting such a
14531 The motto itself (text) and its author (source) are divided by a short
14533 Unfortunately, we have to fool LyX a bit here again, since the environment
14534 needs two arguments (text and source).
14535 In this case, we have to use curly brackets (in TeX mode) between the two
14546 <author of the slogan>.
14549 \begin_layout Description
14550 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14551 complex figurative poems).
14552 LyX can only support a few of them.
14553 One is poemtitle, which is a centered title for poems, which will also
14554 be added to the table of contents (verse is the standard environment for
14556 Memoir has some enhanced versions of verse, but you need to use TeX code,
14557 because they have to be nested inside regular verse environments, which
14558 is not possible with LyX).
14561 \begin_layout Description
14562 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14565 \begin_layout Section
14566 Article (mwart), book (mwbk) and report (mwrep)
14567 \begin_inset OptArg
14570 \begin_layout Plain Layout
14583 \begin_layout Standard
14589 \begin_layout Standard
14590 The LyX document classes
14606 correspond to the LaTeX document classes
14619 They are replacements for the standard document classes
14631 , resp., and fit better to Polish typography conventions in a number of points.
14635 \begin_layout Standard
14639 \begin_layout Itemize
14640 Unnumbered titles (with star, e.
14641 \begin_inset space \thinspace{}
14645 \begin_inset space \space{}
14652 ) are added into table of contents,
14655 \begin_layout Itemize
14656 Additional page styles:
14660 \begin_layout Description
14661 uheadings header with separated lines,
14664 \begin_layout Description
14665 myheadings custom header, contents headers via commands:
14680 \begin_layout Description
14681 myuheadings custom header with separated lines,
14684 \begin_layout Description
14685 outer page number is placed on outer side of page
14689 \begin_layout Itemize
14694 \begin_layout Description
14695 rmheadings serif titles — default,
14698 \begin_layout Description
14699 sfheadings sansserif titles,
14702 \begin_layout Description
14703 authortitle on title page first placed is author next title — default,
14706 \begin_layout Description
14707 titleauthor on title page first placed is title next author,
14710 \begin_layout Description
14711 withmarginpar reserve place on page for margins.
14715 \begin_layout Section
14719 \begin_layout Standard
14724 provides an alternative to the standard
14729 It provides similar functionality, but you might prefer this layout with
14730 sans serif sections, headings, and more.
14733 \begin_layout Section
14737 \begin_layout Standard
14743 \begin_layout Standard
14744 \begin_inset VSpace bigskip
14750 \begin_layout Standard
14755 \begin_inset space ~
14760 textclass works with the American Physical Sociey's RevTeX 4.0 (the
14761 \begin_inset Formula $\beta$
14764 release of May, 1999) class.
14767 \begin_layout Standard
14772 textclass, which works with RevTeX 3.1.
14773 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
14774 That means that it doesn't interact very well with LyX, which requires
14775 LaTeX2e, although it has been kludged to work.
14776 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
14780 \begin_inset space ~
14785 textclass should also be pretty easy to use.
14788 \begin_layout Standard
14789 These documents are supposed to be used in
14793 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
14794 macros, and assume you'll know what to put in the preamble if necessary.
14797 \begin_layout Subsection
14801 \begin_layout Standard
14802 All you need to do is install RevTeX 4, as described in the package's README
14804 The package can be found at The RevTeX 4 Web Site
14805 \begin_inset Flex URL
14808 \begin_layout Plain Layout
14810 http://publish.aps.org/revtex4/
14816 Install it somewhere that LaTeX can see it.
14817 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
14819 \begin_inset space \thinspace{}
14823 \begin_inset space \space{}
14826 not the directory where you installed the class file.) Then, if you reconfigure
14827 LyX, it will find the class file and let you use the RevTeX4 textclass.
14830 \begin_layout Standard
14831 Probably the easiest way to get started is either to import a RevTeX 4 document
14839 \begin_inset space ~
14844 template, found in the templates directory.
14847 \begin_layout Subsection
14851 \begin_layout Standard
14852 Optional arguments to
14859 \begin_inset Quotes eld
14863 \begin_inset Quotes erd
14867 \begin_inset Quotes eld
14871 \begin_inset Quotes erd
14881 \begin_inset space ~
14889 \begin_inset space ~
14895 Remember that in RevTeX, at least one optional argument is required!
14898 \begin_layout Standard
14899 Other preamble matter, like
14906 \begin_inset space ~
14912 \begin_inset space ~
14917 dialog, also as usual.
14920 \begin_layout Subsection
14924 \begin_layout Standard
14925 The layouts basically correspond to the commands in RevTeX4.0.
14926 For example, the Email layout corresponds to
14933 Note that (at least as of RevTeX 4.0 Beta), the
14941 layouts are exactly equivalent, so you shouldn't need to use both.
14945 \begin_layout Plain Layout
14946 In case you're curious, both were included so that
14950 would be able to translate both
14970 \begin_layout Subsection
14974 \begin_layout Standard
14975 There are a couple of important unique aspects of RevTeX 4 which might cause
14976 bugs that will be even more confusing in LyX.
14979 \begin_layout Standard
14997 The LyX equivalent is that there is a separate Thanks layout.
15002 write footnotes in the
15006 layout, or weird things may happen.
15007 See the RevTeX 4 documentation for more details.
15010 \begin_layout Standard
15014 \begin_inset space ~
15022 \begin_inset space ~
15031 layouts must be placed
15039 layout and the corresponding
15056 , the LaTeX won't compile.
15059 \begin_layout Subsection
15063 \begin_layout Standard
15064 The main problem with this layout is that you can't use the optional arguments
15065 to layouts like Email and Title.
15066 (The problem is not unique to this layout; you can't use optional arguments
15067 to the Section layouts either.) This means that after you export that file
15068 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15069 need to edit the LaTeX file with a text editor to add the optional arguments
15071 \begin_inset space \thinspace{}
15075 \begin_inset space \space{}
15078 the running title for the page headers.
15079 Lacking these layouts makes the
15085 (and the equivalent
15091 ) useless, so the corresponding layouts don't exist, and will have to be
15096 \begin_layout Plain Layout
15101 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15102 has not been updated yet to take advantage of it.
15110 \begin_layout Section
15111 Springer Journals (
15118 \begin_layout Standard
15124 \begin_layout Subsection
15128 \begin_layout Standard
15129 These are the layout files for some of the journal formats used by Springer
15130 Verlag and listed on
15131 \begin_inset Flex URL
15134 \begin_layout Plain Layout
15136 http://www.springer.de/author/tex/help-journals.html
15141 , where you should also go to fetch the class files (yes, these are LaTeX2e
15143 It is a modular system: the things common to all journals are implemented
15148 , which journal-specific layout files (such as, e.
15149 \begin_inset space \thinspace{}
15153 \begin_inset space \space{}
15160 for Journal of Geodesy) can include.
15163 \begin_layout Standard
15164 This means that implementing support for any other Springer journal on this
15165 list is as simple as writing your own
15173 file following the outline given in
15181 \begin_layout Standard
15182 It is reasonably well tested only for the Journal of Geodesy.
15191 come with the standard LyX distribution.
15192 Install the relevant class file (downloaded from Springer) in a proper
15193 directory, reconfigure LaTeX (in the teTeX case by running
15197 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15198 and it should work.
15201 \begin_layout Subsection
15205 \begin_layout Standard
15206 A large number of theorem-like styles —
15212 \SpecialChar \ldots{}
15218 \begin_layout Standard
15221 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15222 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15225 See the Springer class file documentation for details.
15228 \begin_layout Subsection
15232 \begin_layout Itemize
15244 \begin_layout Itemize
15247 Probability Theory and Related Fields
15253 — Jean-Marc Lasgouttes
15256 \begin_layout Standard
15257 Add your own, it isn't so hard!
15260 \begin_layout Subsection
15264 \begin_layout Standard
15265 These files are partly based on the older
15269 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15270 file from Springer.
15275 layout, are now defunct.
15276 Jean-Marc Lasgouttes helped out big in making me find my way around the
15277 LyX layout file mechanism.
15280 \begin_layout Subsection
15284 \begin_layout Standard
15286 But probably less than in the old hacked-LaTeX
15293 \begin_layout Standard
15295 \begin_inset space \thinspace{}
15298 g.: does not display the number for theorem-like layouts, just #.
15301 \begin_layout Section
15307 \begin_inset CommandInset label
15316 \begin_layout Standard
15324 \begin_layout Subsection
15328 \begin_layout Standard
15329 This section describes how to use LyX to make slides for overhead projectors.
15330 There are two document classes that can do this: the default slides class
15336 This section documents the former.
15339 \begin_layout Standard
15340 I'm going to say this again, nice and clear, so that there's no misunderstanding
15344 \begin_layout Standard
15345 \begin_inset VSpace bigskip
15351 \begin_layout Standard
15355 This section documents the class
15356 \begin_inset Quotes eld
15364 \begin_inset Quotes erd
15372 \begin_layout Standard
15373 \begin_inset VSpace bigskip
15379 \begin_layout Standard
15380 If you're looking for the documentation for
15381 \begin_inset Quotes eld
15389 \begin_inset Quotes erd
15392 , check out section
15393 \begin_inset space ~
15397 \begin_inset CommandInset ref
15399 reference "sec:foiltex"
15409 \begin_inset Quotes eld
15417 \begin_inset Quotes erd
15420 ] is actually somewhat better than the default
15428 \begin_layout Plain Layout
15429 \SpecialChar \ldots{}
15430 or so I've been told repeatedly by its advocates.
15431 Having never used it, I have no idea if this claim is true or not.
15436 which this section documents.
15439 \begin_layout Standard
15440 This class is the LaTeX2e improvement of the old
15445 Every LaTeX2e distribution includes this class [which I'll just refer to
15447 \begin_inset Quotes eld
15455 \begin_inset Quotes erd
15458 from now on], so you're bound to have it.
15459 As I noted earlier, there are other classes, such as
15463 , which also produce slides for overhead projectors and do a better job
15465 However, there are some things which
15469 can do which the others can't, such as generate overlays.
15470 Read on to learn more!
15473 \begin_layout Subsection
15475 \begin_inset CommandInset label
15477 name "sec:slidesetup"
15484 \begin_layout Standard
15485 Obviously, to use this document class, you need to select
15486 \begin_inset Quotes eld
15494 \begin_inset Quotes erd
15497 from the class list in the
15499 Document\SpecialChar \menuseparator
15503 There are some other special things you should know about this class:
15506 \begin_layout Itemize
15507 Don't bother changing the options
15512 They're not supported by the
15519 \begin_layout Itemize
15523 \begin_inset space ~
15528 behaves a bit differently for this class.
15529 The possible choices and what they do are as follows:
15533 \begin_layout Description
15538 The final output contains page numbers in the lower right corner.
15541 \begin_layout Description
15550 , but also prints out any time markers you've put in.
15551 This is the default.
15554 \begin_layout Description
15559 The final output contains no page numbers, time markers, or alignment markers.
15563 \begin_layout Itemize
15568 class has an extra option:
15574 \begin_inset Quotes eld
15582 \begin_inset Quotes erd
15585 in the extra class options.
15589 \begin_layout Standard
15590 Using this options allows you to add time markers to
15596 \begin_inset space ~
15600 \begin_inset CommandInset ref
15602 reference "sec:slideNote"
15610 \begin_layout Standard
15611 You can also use the template file
15612 \begin_inset Quotes eld
15620 \begin_inset Quotes erd
15623 to automatically set up a document to use the
15629 File\SpecialChar \menuseparator
15631 \begin_inset space ~
15635 \begin_inset space ~
15640 to open your new document].
15641 The template file also contains some examples of the special paragraph
15642 environments used by this class.
15643 I'll describe those next.
15646 \begin_layout Subsection
15647 Paragraph Environments
15650 \begin_layout Subsubsection
15651 Supported Environments
15654 \begin_layout Standard
15655 The first thing you'll notice when you start up a new
15659 document is the font size and type: it's the equivalent of the size
15660 \begin_inset Quotes eld
15668 \begin_inset Quotes erd
15674 \begin_inset space ~
15680 This is also what's used in the output.
15682 \begin_inset Quotes eld
15686 \begin_inset Quotes erd
15689 to remind you that this is a slide.
15690 Your final slides will use a larger font; ergo, you'll have less space.
15691 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
15694 \begin_layout Standard
15695 The next thing that becomes obvious is the changes to the paragraph environment
15696 pull-down box [at the far-left end of the toolbar].
15697 Most of the paragraph environments you're used to seeing are missing.
15698 There are also five new ones.
15703 class itself only supports certain paragraph environments:
15706 \begin_layout Itemize
15712 \begin_layout Itemize
15718 \begin_layout Itemize
15724 \begin_layout Itemize
15730 \begin_layout Itemize
15736 \begin_layout Itemize
15742 \begin_layout Itemize
15748 \begin_layout Itemize
15754 \begin_layout Itemize
15760 \begin_layout Itemize
15766 \begin_layout Itemize
15772 \begin_layout Standard
15773 All of the other standard environments, including the section-heading environmen
15774 ts, aren't used in the
15781 \begin_layout Standard
15782 On the other hand, you'll notice the following new environments:
15785 \begin_layout Itemize
15791 \begin_layout Itemize
15797 \begin_layout Itemize
15803 \begin_layout Itemize
15809 \begin_layout Itemize
15815 \begin_layout Standard
15816 These five are kind of quirky, due to a
15817 \begin_inset Quotes eld
15821 \begin_inset Quotes erd
15825 You see, LyX doesn't permit you to nest any other paragraph environment
15826 into an empty environment.
15827 Now, that's fine and dandy, but it means that you wouldn't be able to start
15828 a slide with anything except plain text.
15829 To deal with this, I've performed a little
15830 \begin_inset Quotes eld
15834 \begin_inset Quotes erd
15840 \begin_layout Subsubsection
15841 Quirks of the New Environments
15842 \begin_inset CommandInset label
15844 name "sec:slideQuirk"
15851 \begin_layout Standard
15852 All five of the new paragraph environments are somewhat quirky due to inherent
15853 limitiations in the current version of LyX.
15854 As I just mentioned, LyX forbids environments that begin with another environme
15856 To get around this, the
15860 environment isn't a paragraph environment as described in the
15868 \begin_layout Standard
15869 You should consider
15882 \begin_inset Quotes eld
15885 pseudo-environments.
15886 \begin_inset Quotes erd
15889 They look like a section heading or a
15890 \begin_inset Quotes eld
15898 \begin_inset Quotes erd
15901 but really begin a [and, if necessary, end the previous] paragraph environment.
15911 \begin_inset Quotes eld
15915 \begin_inset Quotes erd
15918 These two perform some action.
15921 \begin_layout Standard
15922 A common feature of all five environments,
15942 , is a rather long-ish label.
15943 The text following this label — ordinarily the contents of the paragraph
15944 environment — is utterly irrelevant for
15965 LyX completely ignores it.
15966 In fact, you can leave these five environments completely empty.
15970 \begin_layout Standard
15975 to put any text after the rather long-ish label, you might want to.
15976 This could be a short description of the contents of the
15981 In that case, enter in your descriptive comment and hit
15985 as you normally would.
15988 \begin_layout Standard
15989 If, on the other hand, you don't want to enter in any descriptive text,
15990 you'll hit another LyX quirk.
15991 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
15992 environment until you put something in the old one.
15996 \begin_layout Itemize
15997 Start entering the text that will
16025 \begin_layout Itemize
16026 Now move to the beginning of that paragraph.
16030 \begin_layout Itemize
16039 \begin_layout Itemize
16040 Finally, change this new, empty paragraph to a
16064 \begin_layout Standard
16065 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16069 \begin_layout Subsection
16070 Making a Presentation with
16083 \begin_layout Subsubsection
16091 \begin_layout Standard
16092 If you're expecting this section to teach you how to actually make a presentatio
16093 n, you'll be sorely disappointed.
16094 Naturally, I'll describe all of the ways the
16098 class can assist you in preparing the materials for a presentation.
16099 Filling in the contents, however, is up to you.
16104 the LyX philosophy.]
16107 \begin_layout Standard
16112 environment [in the manner described in section
16113 \begin_inset space ~
16117 \begin_inset CommandInset ref
16119 reference "sec:slideQuirk"
16123 ] tells LyX to begin a new slide [duh].
16124 The label for this environment/
16125 \begin_inset Quotes erd
16129 \begin_inset Quotes erd
16133 \begin_inset Quotes eld
16137 \begin_inset Quotes erd
16140 in cool blue, followed by the label,
16141 \begin_inset Quotes eld
16145 \begin_inset Quotes erd
16149 Any text or paragraph environments that follow this one go on the new slide.
16153 \begin_layout Standard
16154 Slides are probably the only time you'll need to forcibly end pages in LyX
16155 (this can be specified in the
16160 In fact, you'll want to, once you finish entering the contents of one slide.
16161 If you've entered more text than can physically fit on a slide, the extra
16162 overflows onto a new slide.
16163 I don't recommend doing this, however, since the overflow slide won't have
16164 any page number on it.
16165 Furthermore, it may interfere with any
16169 you've made to accompany the oversized
16176 \begin_layout Standard
16185 environments work the same way as the
16190 They both create an
16191 \begin_inset Quotes eld
16195 \begin_inset Quotes erd
16198 followed by a label [
16199 \begin_inset Quotes eld
16203 \begin_inset Quotes erd
16207 \begin_inset Quotes eld
16211 \begin_inset Quotes erd
16215 The color is a stunning magenta instead of blue, and the
16216 \begin_inset Quotes eld
16220 \begin_inset Quotes erd
16223 will look different, in style and in length.
16224 The label fonts of all three also differ from one another.
16227 \begin_layout Standard
16232 , if the contents of a
16240 exceed the physical size of a slide or sheet of paper, the extra will overflow
16242 Again, you should avoid this.
16243 It defeats the whole purpose of
16254 \begin_layout Subsubsection
16264 \begin_layout Standard
16269 is a slide that sits atop another slide.
16270 Perhaps you wish to discuss a figure on the main
16274 before displaying the text associated with it.
16275 One way to accomplish this is tape a flap of dark paper over the part of
16280 you want to display later.
16281 This method fails, however, if you wish to overlap one graph with another,
16283 You would then have to fumble while speaking to align the two separate,
16288 s to align the two graphs.
16293 environment in both cases makes life much easier.
16296 \begin_layout Standard
16301 receives the page number of its
16302 \begin_inset Quotes eld
16306 \begin_inset Quotes erd
16314 \begin_inset Quotes eld
16322 \begin_inset Quotes erd
16329 \begin_layout Plain Layout
16330 Presumably, mutliple
16335 \begin_inset Quotes eld
16343 \begin_inset Quotes erd
16347 \begin_inset Quotes eld
16355 \begin_inset Quotes erd
16359 \begin_inset Quotes eld
16367 \begin_inset Quotes erd
16371 \begin_inset space ~
16374 appended to the page number of the parent
16384 Clearly, you want the contents of both the
16392 to each fit on a single physical slide! You should probably consider an
16398 \begin_inset Quotes eld
16402 \begin_inset Quotes erd
16414 class provides a visual cue for this: the label at the start of an
16418 is shorter than that at the start of a
16423 Lastly, when you generate printable output, you'll find alignment markers
16424 in all four corners of both the
16428 page and its parent
16433 These will assist you in lining up the two physical slides.
16436 \begin_layout Standard
16437 The major problem in overlaying two slides is aligning the contents of the
16438 two transparencies.
16439 How much space should you leave for that graph on the second slide? Worse
16440 still, what if you want a graph and a sentence on second slide, but there
16441 is text on the main transparency that goes in between them? You could try
16442 and insert vertical space of the right size.
16443 The better way is to use
16454 \begin_layout Standard
16455 As their names imply,
16463 are two command-like paragraph environments that make all subsequent text
16464 invisible and visible, respectively.
16466 \begin_inset space ~
16470 \begin_inset CommandInset ref
16472 reference "sec:slideQuirk"
16476 that you don't place anything
16480 these two environments, however.
16485 , it inserts a centered, sky-blue label into the page reading
16486 \begin_inset Quotes eld
16489 <Invisible Text Follows>
16490 \begin_inset Quotes erd
16494 For paragraphs following this label, the parts of the
16502 ; it doesn't matter which] where they would be contain instead blank space.
16506 \begin_layout Standard
16511 , the corresponding centered label is
16512 \begin_inset Quotes eld
16515 <Visible Text Follows>
16516 \begin_inset Quotes erd
16520 Paragraphs following this label behave normally.
16521 Note that the beginning of a new
16533 automatically shuts off an
16538 It's therefore not necessary to use
16549 \begin_layout Standard
16550 By now, it should be obvious how to create overlay transparencies using
16551 the proper combination of
16570 \begin_layout Enumerate
16575 , including everything that will appear on it, whether on the main slide
16583 \begin_layout Enumerate
16584 Before each figure or paragraph that will appear only on the
16593 If necessary, insert a
16597 environment after the
16604 \begin_layout Enumerate
16609 immediately following the
16616 \begin_layout Enumerate
16617 Copy the contents of this
16628 \begin_layout Enumerate
16633 , change all of the
16644 \begin_layout Standard
16646 You've just made an
16653 \begin_layout Standard
16654 There's one problem with the way I've designed the LyX
16658 class: you can't make text in the middle of a paragraph invisible, nor
16659 make text in the middle of an invisible paragraph visible again.
16660 To accomplish this feat, you'll need to use some inlined LaTeX codes.
16664 \begin_layout Plain Layout
16665 The commands of interest are:
16668 \begin_layout Itemize
16673 invisible \SpecialChar \ldots{}
16677 \begin_layout Itemize
16682 visible \SpecialChar \ldots{}
16686 \begin_layout Plain Layout
16687 \SpecialChar \ldots{}
16688 and need to be marked as TeX.
16690 \begin_inset Quotes eld
16694 \begin_inset Quotes erd
16697 you wish to change goes in between the brackets [and after the
16710 If you don't know how to mark text as TeX, see the appropriate section
16723 \begin_layout Subsubsection
16733 \begin_inset CommandInset label
16735 name "sec:slideNote"
16742 \begin_layout Standard
16751 is associated with a
16752 \begin_inset Quotes eld
16756 \begin_inset Quotes erd
16768 class provides visual cues.
16773 is shorter than that of a
16777 [yet longer than that of an
16781 ] and, like the label of an
16785 is shockingly magenta.
16786 Additionally, the printed
16790 has the page number of its
16791 \begin_inset Quotes eld
16795 \begin_inset Quotes erd
16803 \begin_inset Quotes eld
16811 \begin_inset Quotes erd
16815 \begin_inset Quotes eld
16823 \begin_inset Quotes erd
16827 \begin_inset Quotes eld
16835 \begin_inset Quotes erd
16839 You can have multiple
16843 s associated with a single
16855 , you'll probably want to break up long
16859 s so that they fit on a single sheet of paper.
16862 \begin_layout Standard
16867 is obvious: it contains anything additional you might want to say about
16873 It could also be used as a sheet of reminders for a particular
16878 In the case of the latter, you might want to make use of time markers.
16884 \begin_inset Quotes eld
16888 \begin_inset Quotes erd
16891 support for time markers, a
16896 So, you'll have to resort to using the LaTeX codes.
16899 \begin_layout Standard
16900 To use time markers, you'll need to specify the extra class option
16901 \begin_inset Quotes eld
16909 \begin_inset Quotes erd
16913 \begin_inset space ~
16917 \begin_inset CommandInset ref
16919 reference "sec:slidesetup"
16924 This option turns on timing marks, which will appear in the lower-left-hand
16930 To set what appears in the time marker, you use the LaTeX commands
16931 \begin_inset Quotes eld
16941 \begin_inset Quotes erd
16945 \begin_inset Quotes eld
16955 \begin_inset Quotes erd
16959 The arguments of both commands are time measured in seconds.
16961 \begin_inset Quotes eld
16971 \begin_inset Quotes erd
16974 sets the time marker to a given time.
16976 \begin_inset Quotes eld
16986 \begin_inset Quotes erd
16989 increments the time marker by the specified amount.
16990 Using time markers and
16994 s in this fashion, you can remind yourself how much time to spend on a particula
17002 \begin_layout Standard
17003 There's one last feature to describe.
17004 Clearly, you'd like to print out all of your
17012 s on transparencies while printing all of your
17029 with which it is associated.
17030 What's a person to do?
17033 \begin_layout Standard
17034 Luckily, there are two LaTeX commands that allow you to select what to print
17036 Both must be placed into the preamble of your document.
17038 \begin_inset Quotes eld
17050 \begin_inset Quotes erd
17053 will cause the output to contain only the
17062 Correspondingly, the command
17063 \begin_inset Quotes eld
17075 \begin_inset Quotes erd
17078 prevents the output of anything but
17083 I'd advise placing both commands in the preamble and initially comment
17085 You can then preview your entire presentation as you write.
17086 When you're done writing, you can then uncomment one of the two to select
17087 what you want to print.
17088 I like to uncomment
17089 \begin_inset Quotes eld
17101 \begin_inset Quotes erd
17104 , print to a file with
17105 \begin_inset Quotes eld
17113 \begin_inset Quotes erd
17116 in its name, comment it back out, then uncomment
17117 \begin_inset Quotes eld
17129 \begin_inset Quotes erd
17133 \begin_inset Quotes eld
17141 \begin_inset Quotes erd
17145 I can then send either file to a printer, loading transparencies or plain
17146 paper as appropriate.
17149 \begin_layout Standard
17150 You can also provide other arguments to the
17151 \begin_inset Quotes eld
17161 \begin_inset Quotes erd
17165 \begin_inset Quotes eld
17175 \begin_inset Quotes erd
17179 See a good LaTeX book for details.
17182 \begin_layout Subsection
17187 Class Template File
17190 \begin_layout Standard
17191 I have also provided a template file,
17192 \begin_inset Quotes eld
17200 \begin_inset Quotes erd
17208 To use it, begin your new presentation with
17213 ile\SpecialChar \menuseparator
17215 \begin_inset space ~
17219 \begin_inset space ~
17229 Your new LyX presentation file will contain an example
17250 additionally contain an example of the use of
17259 Lastly, the preamble will contain:
17262 \begin_layout LyX-Code
17263 % Uncomment to print out only slides and overlays
17266 \begin_layout LyX-Code
17270 \begin_layout LyX-Code
17276 \begin_inset Newline newline
17282 \begin_layout LyX-Code
17283 % Uncomment to print out only notes
17286 \begin_layout LyX-Code
17290 \begin_layout LyX-Code
17298 \begin_layout Standard
17299 One final thing: I created this class to support the LaTeX2e
17300 \begin_inset Quotes eld
17308 \begin_inset Quotes erd
17311 class, one of the built-in LaTeX2e classes.
17312 Neither I nor the rest of the LyX Team endorse or oppose the use of this
17313 built-in slide class.
17314 It's here if you want it or need it.
17315 There exist other LaTeX2e classes for creating presentations, such as the
17321 \begin_inset space ~
17325 \begin_inset CommandInset ref
17327 reference "sec:foiltex"
17332 \begin_inset Quotes eld
17340 \begin_inset Quotes erd
17343 package [present on some TeX distributions].
17344 The latter is not yet supported under LyX.
17348 \begin_layout Plain Layout
17349 Perhaps you can take on the task\SpecialChar \ldots{}
17355 I know nothing about these other classes.
17356 Try them out to see what sort of alternative they provide.
17359 \begin_layout Chapter
17360 LyX Features needing Extra Software
17363 \begin_layout Section
17367 \begin_layout Standard
17373 \begin_layout Subsection
17377 \begin_layout Standard
17386 \begin_layout Plain Layout
17391 is not yet available when you are using the LaTeX distribution MiKTeX.
17396 , you'll find in the
17403 \begin_inset space ~
17414 \begin_inset CommandInset href
17416 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17423 \begin_layout Standard
17428 package is a program that was written by
17429 \begin_inset Flex CharStyle:Noun
17432 \begin_layout Plain Layout
17434 \begin_inset space ~
17442 in frustration because some constructs in LaTeX are sometimes non-intuitive,
17443 and easy to forget.
17444 The program runs over your LaTeX file, checks the integrity of the file,
17445 and flags some common errors.
17446 In other technical words, it is
17453 \begin_layout Standard
17454 Well, what is a syntax checker doing in LyX which is supposed to produce
17455 correct LaTeX anyways? The answer is simple: Just as
17459 not only checks the
17463 of C programs, but also does
17467 checks for type-errors,
17471 catches some common
17475 errors, in addition to the syntactical ones.
17480 is capable of detecting several common errors, such as
17483 \begin_layout Itemize
17484 Ellipsis detection:
17485 \begin_inset Newline newline
17488 Use \SpecialChar \ldots{}
17492 \begin_layout Itemize
17493 No space in front of/after parenthesis:
17494 \begin_inset Newline newline
17500 \begin_layout Itemize
17501 Enforcement of normal space after common abbreviations:
17502 \begin_inset Newline newline
17506 \begin_inset space \thinspace{}
17510 \begin_inset space \space{}
17513 is too wide spacing.
17516 \begin_layout Itemize
17517 Enforcement of end-of-sentence space when the last sentence ends with a
17519 \begin_inset Newline newline
17523 And this is wrong spacing.
17526 \begin_layout Itemize
17527 Space in front of labels and similar commands:
17528 \begin_inset Newline newline
17531 The label should stick right up to the text to avoid falling to a wrong
17534 \begin_inset CommandInset label
17544 \begin_layout Plain Layout
17545 This footnote is in danger of falling off to a wrong page
17550 The label is separated too much.
17553 \begin_layout Itemize
17554 Space in front of references, instead of hard spaces:
17555 \begin_inset Newline newline
17558 In you are in bad luck, the text will break right between the referenced
17559 text and reference number, and that's a pity.
17561 \begin_inset CommandInset ref
17563 reference "sec:chktex"
17570 \begin_layout Itemize
17572 \begin_inset Quotes eld
17576 \begin_inset Quotes erd
17580 \begin_inset Formula $\times$
17584 \begin_inset Newline newline
17587 2x2 looks cheap compared to
17588 \begin_inset Formula $2\times2$
17594 \begin_layout Standard
17595 and more \SpecialChar \ldots{}
17596 It is an invaluable tool when you are
17597 \begin_inset Quotes eld
17601 \begin_inset Quotes erd
17604 your document before printing, and you should run it right after the obligatory
17605 spelling check, and before you go fine tuning the typesetting.
17608 \begin_layout Subsection
17612 \begin_layout Standard
17613 If you have the program installed, usage is as simple as choosing
17615 Tools\SpecialChar \menuseparator
17617 \begin_inset space ~
17623 This will make LyX generate a LaTeX file of your document, start
17627 to check it, and then make LyX insert
17628 \begin_inset Quotes eld
17632 \begin_inset Quotes erd
17635 with the warnings from
17639 , if there were any.
17640 The warnings will be placed close to the point of the mistake, and you
17641 can quickly find them by using the
17643 Navigate\SpecialChar \menuseparator
17646 menu item, or the shortcut key
17655 Open the error boxes by clicking on them with the mouse, or use the shortcut
17664 bindings, or the corresponding
17673 Read the warning and correct the mistake, if it is a mistake.
17674 If you have trouble understanding what the warning is about, you can safely
17676 Remember that there is a hidden layer between the document on screen and
17677 the technical details in invoking
17681 , and this gap can make some warnings seem arcane or just right down plain
17685 \begin_layout Standard
17686 This document is an excellent testing bed for the feature, and it should
17687 provide quite a few warnings for you to fiddle with.
17688 Since computers are only so smart, expect most of the warnings to be false
17692 \begin_layout Subsection
17693 How to fine tune it
17696 \begin_layout Standard
17697 Sometimes, you'll find that
17701 makes more noise than suits your mood.
17702 Then you can choose not to use it, wait until your mood changes, or try
17707 to get better along with you.
17708 Another choice in the most desperate situations is to use
17710 View\SpecialChar \menuseparator
17712 \begin_inset space ~
17716 \begin_inset space ~
17720 \begin_inset space ~
17725 , which will get rid of all warnings instantly.
17728 \begin_layout Standard
17737 very configurable and extensible, you shouldn't expect to solve all problems
17743 Since LyX has to generate a somewhat special LaTeX file to be able to match
17744 the line numbers from the
17752 \begin_layout Plain Layout
17753 You can inspect the specific output from
17759 Edit\SpecialChar \menuseparator
17761 \begin_inset space ~
17765 \begin_inset space ~
17779 to the internal document structure, some of the warnings will not seen
17780 to appear correctly.
17781 There are two things you can do about this:
17784 \begin_layout Itemize
17789 invocation command line in
17805 installation configuration file (usually with the file
17810 See below to learn what warnings can be enabled and disabled on the command
17815 \begin_layout Itemize
17816 Export your document as a raw LaTeX file using
17818 File\SpecialChar \menuseparator
17819 Export\SpecialChar \menuseparator
17827 Invoked in this way, it can be a hassle to find the corresponding place
17828 in the document inside LyX, but with a little patience, you should be able
17832 \begin_layout Standard
17833 Here follows the warning messages that can be enabled and disabled in
17842 to disable a warning, and
17846 to enable a warning.
17847 The emphasized entries are disabled by default, because the default is
17850 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
17855 \begin_layout Standard
17856 Notice that you should only use the options that enable and disable warnings,
17857 because LyX relies on some of the other command line parameters to be set
17858 in a specific way to have a chance to communicate with
17865 \begin_layout Enumerate
17869 Command terminated with space.
17872 \begin_layout Enumerate
17875 Non-breaking space (
17876 \begin_inset Quotes eld
17884 \begin_inset Quotes erd
17887 ) should have been used.
17890 \begin_layout Enumerate
17894 You should enclose the previous parenthesis with
17895 \begin_inset Quotes eld
17903 \begin_inset Quotes erd
17909 \begin_layout Enumerate
17912 Italic correction (
17913 \begin_inset Quotes eld
17923 \begin_inset Quotes erd
17926 ) found in non-italic buffer.
17929 \begin_layout Enumerate
17932 Italic correction (
17933 \begin_inset Quotes eld
17943 \begin_inset Quotes erd
17946 ) found more than once.
17949 \begin_layout Enumerate
17953 No italic correction (
17954 \begin_inset Quotes eld
17964 \begin_inset Quotes erd
17970 \begin_layout Enumerate
17974 \begin_inset Quotes eld
17982 \begin_inset Quotes erd
17986 \begin_inset Quotes eld
17994 \begin_inset Quotes erd
18000 \begin_layout Enumerate
18003 Wrong length of dash may have been used.
18006 \begin_layout Enumerate
18010 \begin_inset Quotes eld
18018 \begin_inset Quotes erd
18022 \begin_inset Quotes eld
18030 \begin_inset Quotes erd
18036 \begin_layout Enumerate
18040 \begin_inset Quotes eld
18048 \begin_inset Quotes erd
18054 \begin_layout Enumerate
18058 \begin_inset Quotes eld
18066 \begin_inset Quotes erd
18069 to achieve an ellipsis.
18072 \begin_layout Enumerate
18075 Inter-word spacing (
18076 \begin_inset Quotes eld
18086 \begin_inset Quotes eld
18089 ) should perhaps be used.
18092 \begin_layout Enumerate
18095 Inter-sentence spacing (
18096 \begin_inset Quotes eld
18106 \begin_inset Quotes erd
18109 ) should perhaps be used.
18112 \begin_layout Enumerate
18115 Could not find argument for command.
18118 \begin_layout Enumerate
18122 \begin_inset Quotes eld
18130 \begin_inset Quotes erd
18136 \begin_layout Enumerate
18139 Math mode still on at end of LaTeX file.
18142 \begin_layout Enumerate
18146 \begin_inset Quotes eld
18154 \begin_inset Quotes erd
18157 doesn't match the number of
18158 \begin_inset Quotes eld
18166 \begin_inset Quotes erd
18172 \begin_layout Enumerate
18175 You should use either
18178 \begin_inset Quotes eld
18186 \begin_inset Quotes erd
18191 as an alternative to
18192 \begin_inset Quotes eld
18200 \begin_inset Quotes erd
18206 \begin_layout Enumerate
18213 " (ASCII 39) instead of "
18220 \begin_layout Enumerate
18223 User-specified pattern found.
18226 \begin_layout Enumerate
18229 This command might not be intended.
18232 \begin_layout Enumerate
18239 \begin_layout Enumerate
18257 \begin_layout Enumerate
18260 Delete this space to maintain correct page references.
18263 \begin_layout Enumerate
18267 You might wish to put this between a pair of
18268 \begin_inset Quotes eld
18276 \begin_inset Quotes erd
18282 \begin_layout Enumerate
18285 You ought to remove spaces in front of punctuation.
18288 \begin_layout Enumerate
18291 Could not execute LaTeX command.
18294 \begin_layout Enumerate
18303 in front of small punctuation.
18306 \begin_layout Enumerate
18314 may look prettier here.
18317 \begin_layout Enumerate
18321 Multiple spaces detected in output.
18324 \begin_layout Enumerate
18327 This text may be ignored.
18330 \begin_layout Enumerate
18336 \begin_inset Quotes eld
18341 to begin quotation, not
18348 \begin_layout Enumerate
18355 to end quotation, not
18358 \begin_inset Quotes eld
18366 \begin_layout Enumerate
18372 \begin_layout Enumerate
18375 You should perhaps use
18376 \begin_inset Quotes eld
18384 \begin_inset Quotes erd
18390 \begin_layout Enumerate
18393 You should put a space in front of/after parenthesis.
18396 \begin_layout Enumerate
18399 You should avoid spaces in front of/after parenthesis.
18402 \begin_layout Enumerate
18406 You should not use punctuation in front of/after quotes.
18409 \begin_layout Enumerate
18412 Double space found.
18415 \begin_layout Enumerate
18418 You should put punctuation outside inner/inside display math mode.
18421 \begin_layout Enumerate
18424 You ought to not use primitive TeX in LaTeX code.
18427 \begin_layout Enumerate
18430 You should remove spaces in front of
18431 \begin_inset Quotes eld
18439 \begin_inset Quotes erd
18445 \begin_layout Enumerate
18448 \begin_inset Quotes eld
18456 \begin_inset Quotes erd
18459 is normally not followed by
18460 \begin_inset Quotes eld
18468 \begin_inset Quotes erd
18474 \begin_layout Standard
18475 In later versions of LyX, we hope to provide a more complete interface to
18476 this tool (and it's smaller cousin
18480 ) to exploit the full power of it.
18481 But it's not exactly useless as it is now: go try it on one of your existing
18482 documents of a certain length and be surprised.
18485 \begin_layout Section
18486 Version Control in LyX
18489 \begin_layout Standard
18492 Lars Gullik Bjønnes
18499 \begin_layout Subsection
18503 \begin_layout Standard
18504 A friend of mine wanted to try LyX for a group project.
18505 When he didn't find support for version control or file locking, he dropped
18507 This angered me a bit, so I thought that I should at least make support
18508 for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
18509 This has now been done.
18510 LyX now supports some of the most basic RCS commands.
18511 If you need to something a bit more sophisticated you will have to do that
18512 manually in a terminal.
18515 \begin_layout Standard
18516 Before you begin to use the version control features in LyX, you should
18518 \begin_inset Quotes eld
18522 \begin_inset Quotes erd
18525 (a man file, read it with
18530 This file describes all the basic features of RCS.
18531 You should especially notice the comment about a RCS directory, and the
18532 notion of a master RCS file (the file ending in
18539 \begin_layout Standard
18540 Later basic CVS/SVN support was added.
18541 You should be familiar with CVS/SVN usage before start using it under LyX.
18542 Most of the log messages are not currently displayed after operations -
18543 you can check them in Messages pane if unsure.
18546 \begin_layout Standard
18547 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18548 package—no guarantees are made for older versions.
18551 \begin_layout Standard
18552 For introducing your own external commands consult vc-command in the manual
18556 \begin_layout Subsection
18557 RCS commands in LyX
18560 \begin_layout Standard
18561 The following sections describe the RCS commands supported by LyX.
18562 You can find them in the
18564 File\SpecialChar \menuseparator
18566 \begin_inset space ~
18572 LyX was tested against RCS 5.7.
18575 \begin_layout Subsubsection
18581 \begin_layout Standard
18582 If your document is not under revision control, this is the only item shown
18584 And if it is under revision control, the
18588 item is not visible.
18592 \begin_layout Standard
18593 This command registers your document with RCS (unless you are under the
18594 directory managed by CVS)\SpecialChar \@.
18595 You are asked interactively to supply an initial
18596 description of the document.
18597 The document is now set in Read-Only mode and you have to
18600 \begin_inset space ~
18604 \begin_inset space ~
18608 \begin_inset space ~
18613 , before making any changes to it.
18614 A document under revision control has a
18615 \begin_inset Quotes eld
18618 [RCS:<version> <locker>]
18619 \begin_inset Quotes erd
18622 item tagged to the filename in the minibuffer.
18625 \begin_layout Standard
18626 RCS command that is run:
18628 ci -q -u -i -t-"<initial description>" <file-name>
18631 \begin_layout Standard
18636 to understand the switches.
18640 \begin_layout Subsubsection
18646 \begin_layout Standard
18647 When you are finished editing a file, you check in your changes.
18648 When you do this, you are asked for a description of the changes.
18649 This is stored in the history log.
18650 The version number is bumped, your changes are applied to the master RCS
18651 file, the document is unlocked and set to Read-Only mode.
18655 \begin_layout Standard
18658 ci -q -u -m"<description>" <file-name>
18661 \begin_layout Subsubsection
18667 \begin_layout Standard
18668 By doing this you lock the document so that only you can edit it.
18669 This will also make the document Read-Write only for you.
18670 You will usually continue editing for a while and when you are finished
18671 you check in your changes.
18672 The status line is changed to reflect that you have locked the file.
18676 \begin_layout Standard
18679 co -q -l <file-name>
18682 \begin_layout Subsubsection
18685 Revert To Repository Version
18688 \begin_layout Standard
18689 This will discard all changes made to the document since the last check
18691 You get a warning before changes are discarded.
18694 \begin_layout Standard
18697 co -f -u<version> <file-name>
18700 \begin_layout Subsubsection
18706 \begin_layout Standard
18707 This makes as if the last check in never happened.
18708 No changes are made to the document loaded into LyX, but the last version
18709 is removed from the master RCS file.
18713 \begin_layout Standard
18716 rcs -o<version> <file-name>
18719 \begin_layout Subsubsection
18725 \begin_layout Standard
18726 This show the complete history of the RCS document.
18731 is shown in a browser.
18739 \begin_layout Subsubsection
18743 \begin_layout Standard
18744 LyX supports RCS version number information (only), see
18745 \begin_inset CommandInset ref
18747 reference "sub:VCS-Revision-Information"
18754 \begin_layout Subsection
18755 CVS commands in LyX
18758 \begin_layout Standard
18759 CVS is now partially supported by LyX.
18760 You can find the commands in the
18762 File\SpecialChar \menuseparator
18764 \begin_inset space ~
18770 Focus of the development moved to SVN support, so please use it instead
18771 of CVS if possible.
18774 \begin_layout Subsubsection
18780 \begin_layout Standard
18781 If your document is not under revision control, this is the only item shown
18783 And if it is under revision control, the
18790 item is not visible.
18794 \begin_layout Standard
18795 This command registers in CVS your document ONLY in case you have already
18796 the documents directory under CVS control (in particular
18801 This means you have to checkout the archive by yourself.
18805 \begin_layout Standard
18806 Then you are asked interactively to supply an initial description of the
18808 Don't forget that registered file is not yet commited.
18811 \begin_layout Standard
18812 CVS command that is run:
18815 \begin_inset Quotes erd
18819 \begin_inset Quotes eld
18823 \begin_inset Quotes erd
18829 \begin_layout Standard
18834 to understand the switches.
18838 \begin_layout Subsubsection
18844 \begin_layout Standard
18845 When you are finished editing a file, you commit your changes.
18846 When you do this, you are asked for a description of the changes.
18847 After that changes are commited.
18850 \begin_layout Standard
18853 cvs -q commit -m"<description>" "<file-name>"
18856 \begin_layout Subsubsection
18859 Revert To Repository Version
18862 \begin_layout Standard
18863 This will discard all changes made to the document since the last check
18865 You get a warning before changes are discarded.
18866 Firstly the file is deleted, secondly CVS update command is run.
18869 \begin_layout Standard
18873 \begin_inset Quotes eld
18877 \begin_inset Quotes erd
18883 \begin_layout Subsubsection
18889 \begin_layout Standard
18890 This show the complete history of the CVS document.
18894 \begin_inset Quotes eld
18898 \begin_inset Quotes erd
18903 is shown in a browser.
18906 \begin_layout Subsection
18907 SVN commands in LyX
18910 \begin_layout Standard
18911 SVN is now partially supported by LyX.
18912 You can find the commands in the
18914 File\SpecialChar \menuseparator
18916 \begin_inset space ~
18922 Please note that if you use password protected access to repository via
18923 ssh, you will be asked in terminal window.
18924 LyX was tested against SVN 1.5 and 1.6
18928 \begin_layout Plain Layout
18929 Most of the commands will work with 1.4 too, see
18930 \begin_inset CommandInset ref
18932 reference "sub:SVN-Repo-Update"
18944 \begin_layout Subsubsection
18950 \begin_layout Standard
18951 If your document is not under revision control, this is the only item shown
18953 And if it is under revision control, the
18960 item is not visible.
18964 \begin_layout Standard
18965 This command registers in SVN your document ONLY in case you have already
18966 the documents directory under SVN control (in particular
18971 This means you have to checkout the archive by yourself.
18975 \begin_layout Standard
18976 Then you are asked interactively to supply an initial description of the
18978 Don't forget that registered file is not yet commited.
18981 \begin_layout Standard
18982 SVN command that is run:
18985 \begin_inset Quotes eld
18989 \begin_inset Quotes erd
18995 \begin_layout Standard
19000 to understand the switches.
19004 \begin_layout Subsubsection
19010 \begin_layout Standard
19011 When you are finished editing a file, you commit your changes.
19012 When you do this, you are asked for a description of the changes.
19013 After that changes are commited.
19016 \begin_layout Standard
19021 \begin_layout Plain Layout
19022 In case locking is not enabled.
19024 \begin_inset CommandInset ref
19026 reference "subsec:SVN-File-Locking"
19037 svn commit -q -m"<description>" <file-name>
19040 \begin_layout Subsubsection
19046 \begin_layout Standard
19047 Updates the changes of this file from the repository.
19048 Be sure you understand SVN merging and conflicts resolving before using
19049 this function, because all conflicts has to be resolved manually by you!
19052 \begin_layout Standard
19057 \begin_layout Plain Layout
19065 svn update --non-interactive
19066 \begin_inset Quotes eld
19070 \begin_inset Quotes erd
19076 \begin_layout Subsubsection
19079 Revert To Repository Version
19082 \begin_layout Standard
19083 This will discard all changes made to the document since the last check
19085 You get a warning before changes are discarded.
19089 \begin_layout Standard
19093 \begin_inset Quotes eld
19097 \begin_inset Quotes erd
19103 \begin_layout Subsubsection
19104 \begin_inset CommandInset label
19106 name "sub:SVN-Repo-Update"
19110 Update of the local directory checkout from repository
19114 \begin_layout Plain Layout
19115 Note that this command will work only with subversion
19116 \begin_inset Formula $\geqq1.5$
19127 \begin_layout Standard
19128 All the commands above have one shortcomming - they deal with the current
19130 Once your document contains pictures, includes external
19131 \begin_inset Flex CharStyle:Code
19134 \begin_layout Plain Layout
19140 files and so on administration becomes more complicated.
19141 LyX now supports updating the whole tree in which resides the document
19145 \begin_layout Plain Layout
19146 One need to organize the files structure so that all external files are
19147 in the same directory or subdirectories of the document.
19154 This become especially useful once you cooperate with people which neither
19155 know about subversion management nor they have ambition to commit additional
19156 material to the repository.
19160 \begin_layout Standard
19161 \begin_inset Flex CharStyle:Code
19164 \begin_layout Plain Layout
19165 Update local directory from repository
19170 command updates the whole directory and in case of merge conflicts local
19171 version of the files are left, so no unintended data loss occurs.
19172 If local changes are detected user is warned before update starts.
19175 \begin_layout Labeling
19176 \labelwidthstring 00.00.0000
19178 \begin_inset space ~
19182 \begin_inset space ~
19186 \begin_inset Newline newline
19190 \begin_inset Flex CharStyle:Code
19193 \begin_layout Plain Layout
19199 (Ask if changes are detected.)
19200 \begin_inset Newline newline
19204 \begin_inset Flex CharStyle:Code
19207 \begin_layout Plain Layout
19208 svn update --accept mine-full $path
19216 \begin_layout Standard
19218 \begin_inset Flex CharStyle:Code
19221 \begin_layout Plain Layout
19227 stands for the path to the document.
19230 \begin_layout Subsubsection
19236 \begin_layout Standard
19237 This show the complete history of the SVN document.
19241 \begin_inset Quotes eld
19245 \begin_inset Quotes erd
19250 is shown in a browser.
19253 \begin_layout Subsubsection
19255 \begin_inset CommandInset label
19257 name "subsec:SVN-File-Locking"
19264 \begin_layout Standard
19265 The file exchange through various revision control systems brings the problem
19266 of merge conflicts in case two different users try to edit the same (parts
19268 When such conflict happens it needs manual resolving and one reasonable
19269 alternative is to provide some kind of locking mechanism, which guarantees
19270 that only one user is allowed to edit file at the given time.
19273 \begin_layout Standard
19274 SVN has two mechanisms to provide such kind of mutual exclusivity for file
19275 access - locks and automatical setting of write permissions (see sec.
19277 \begin_inset CommandInset ref
19279 reference "subsec:Automatical-Locking-Property"
19284 \begin_inset Flex CharStyle:Code
19287 \begin_layout Plain Layout
19297 \begin_layout Plain Layout
19298 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
19304 In a case this property is detected for a given document LyX starts to
19305 use SVN locks for document editing automatically and the whole check-in/out
19306 mechanism switches to the same regimen as for RCS.
19307 This in particular means there are two different modes how file is used
19311 \begin_layout Itemize
19313 The loaded file is in the read-only mode.
19314 For editation on needs to check-out.
19319 consists of update from repository and gaining write lock.
19320 If the lock is not possible to obtain, we remain in unlocked state.
19323 \begin_layout Itemize
19325 The loaded file is in the 'normal' edit mode.
19326 No other user is allowed to edit the file.
19331 consists of commiting changes and releasing write-lock.
19332 If no changes have been made to the document, no commit will be produced
19336 \begin_layout Plain Layout
19337 Don't be puzzled by the fact that you will be asked for commit message anyway.
19342 and only the write-lock will be released.
19345 \begin_layout Standard
19349 \begin_layout Labeling
19350 \labelwidthstring 00.00.0000
19353 svn commit -q -m"<description>" "<file-name>"
19354 \begin_inset Newline newline
19357 svn unlock "<file-name>"
19360 \begin_layout Labeling
19361 \labelwidthstring 00.00.0000
19364 svn update "<file-name>"
19365 \begin_inset Newline newline
19368 svn lock "<file-name>"
19371 \begin_layout Subsubsection
19374 \begin_inset CommandInset label
19376 name "subsec:Automatical-Locking-Property"
19382 Automatical Locking Property
19385 \begin_layout Standard
19386 The above mentioned automatical setting of write permissions of the .lyx
19387 file can be set through
19392 ile\SpecialChar \menuseparator
19398 \begin_inset space ~
19401 Control\SpecialChar \menuseparator
19406 oggle locking property
19409 This command is active only when the file is not locked on the svn server
19411 you need to check-out before proceeding).
19414 \begin_layout Labeling
19415 \labelwidthstring 00.00.0000
19417 \begin_inset space ~
19423 \begin_layout Labeling
19424 \labelwidthstring 00.00.0000
19427 svn propset svn:needs-lock ON "<file-name>"
19430 \begin_layout Labeling
19431 \labelwidthstring 00.00.0000
19434 svn propdel svn:needs-lock "<file-name>"
19437 \begin_layout Subsubsection
19438 \begin_inset CommandInset label
19440 name "sub:VCS-Revision-Information"
19444 Revision Information in Documents
19447 \begin_layout Standard
19448 There are more possibilities how to activate revision information in our
19452 \begin_layout Itemize
19453 LyX supports directly:
19457 \begin_layout Itemize
19458 tree revision information (
19459 \begin_inset Flex CharStyle:Code
19462 \begin_layout Plain Layout
19469 The result is the output of the
19470 \begin_inset Flex CharStyle:Code
19473 \begin_layout Plain Layout
19479 command, the following table gives you an idea, how to read the results.
19482 \begin_layout Standard
19484 \begin_inset Tabular
19485 <lyxtabular version="3" rows="6" columns="2">
19486 <features tabularvalignment="middle">
19487 <column alignment="center" valignment="top" width="0">
19488 <column alignment="center" valignment="top" width="0">
19490 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
19493 \begin_layout Plain Layout
19499 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
19502 \begin_layout Plain Layout
19510 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19513 \begin_layout Plain Layout
19519 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19522 \begin_layout Plain Layout
19523 mixed revision working copy
19530 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19533 \begin_layout Plain Layout
19539 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19542 \begin_layout Plain Layout
19543 modified working copy
19550 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19553 \begin_layout Plain Layout
19559 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19562 \begin_layout Plain Layout
19563 switched working copy
19570 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19573 \begin_layout Plain Layout
19579 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19582 \begin_layout Plain Layout
19583 partial working copy, from a sparse checkout
19590 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
19593 \begin_layout Plain Layout
19599 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
19602 \begin_layout Plain Layout
19603 mixed revision, modified, switched working copy
19616 \begin_layout Itemize
19617 file revision information.
19618 The result comes from parsing the output of
19619 \begin_inset Flex CharStyle:Code
19622 \begin_layout Plain Layout
19624 \begin_inset space ~
19628 \begin_inset space ~
19632 \begin_inset space ~
19641 Supported flags are:
19645 \begin_layout Itemize
19646 version number of the last commit (
19647 \begin_inset Flex CharStyle:Code
19650 \begin_layout Plain Layout
19659 \begin_layout Itemize
19660 author of the last commit (
19661 \begin_inset Flex CharStyle:Code
19664 \begin_layout Plain Layout
19673 \begin_layout Itemize
19674 date of the last commit (
19675 \begin_inset Flex CharStyle:Code
19678 \begin_layout Plain Layout
19687 \begin_layout Itemize
19688 time of the last commit (
19689 \begin_inset Flex CharStyle:Code
19692 \begin_layout Plain Layout
19702 \begin_layout Standard
19703 You can obtain this info via InsetInfo (e.g.
19705 \begin_inset Flex CharStyle:Code
19708 \begin_layout Plain Layout
19709 info-insert buffer vcs-date
19715 The information will be available only when you have the file stored under
19716 svn managment (i.e.
19718 \begin_inset Flex CharStyle:Code
19721 \begin_layout Plain Layout
19727 directory is available with your document).
19731 \begin_layout Itemize
19732 Another---a hacking one---possibility is to use svn keywords
19736 \begin_layout Plain Layout
19737 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
19743 In short -- you set file keywords property (e.g.
19746 svn propset svn:keywords 'Rev' file.lyx
19748 ) and then paste keyword ERT
19752 \begin_layout Plain Layout
19753 This is an easy way how to ensure that LyX won't break the line in the middle
19759 tag in your document (e.g.
19764 \begin_layout Plain Layout
19772 This way svn client will automatically substitute revision number (e.g.
19777 \begin_layout Plain Layout
19784 ) after each update and commit.
19785 There are more problems with this approach.
19786 Firstly, the '$' character is used in TeX world for math equations, so
19787 any occurence of math formula
19788 \begin_inset Formula $Rev$
19792 \begin_inset Formula $Rev:59$
19795 in your LyX document.
19796 Similarly for other keywords like Id, Date, Author, etc.
19797 Secondly svn output is dependent on your locales, so its very easy that
19798 svn would produce some problematic strings once Date is used.
19799 Thirdly you get the whole 'Rev: 59' string in your document instead of
19801 Until subversion implements user's custom keywords it will be hard to use
19802 this approach reliably or let LyX to support it directly.
19805 \begin_layout Subsection
19806 SVN and Windows Environment
19809 \begin_layout Quote
19810 My inclination is to say that if the user cannot figure out the command
19811 line operations on their own fairly quickly, they would be well advised
19812 to use TortoiseSVN.
19818 \begin_layout Subsubsection
19822 \begin_layout Standard
19823 In addition to installing LyX, and having access to a Subversion repository,
19824 the user will need to install the Subversion client program.
19825 A Windows installer for the client program is available from
19826 \begin_inset CommandInset href
19829 target "http://www.collab.net/nonav/downloads/subversion/"
19834 The user may also want to install
19835 \begin_inset CommandInset href
19838 target "http://tortoisesvn.tigris.org/"
19842 , which integrates Subversion operations into the context (rightclick) menu
19843 of Windows Explorer.
19844 Operations done outside LyX will typically be more convenient using the
19845 Explorer context menu.
19846 Note that TortoiseSVN is not a replacement for the client program, which
19847 is what LyX itself will use.
19850 \begin_layout Subsubsection
19851 Bringing a document under Subversion control
19854 \begin_layout Standard
19855 Before a LyX document can be brought under version control in Subversion,
19856 its parent directory needs to be under version control.
19857 If the document is being added to a project already in the repository,
19858 this is accomplished by checking the project out to the directory where
19859 the new document will be placed.
19860 If the project itself is not yet under version control (for instance, if
19861 this document starts a new project), the directory must be imported into
19863 This is done outside LyX.
19864 Both import and checkout are easily accomplished from the Explorer context
19865 menu using TortoiseSVN, or alternatively can be done using the command
19866 line client at a DOS prompt.
19867 The procedure for importing the project using TortoiseSVN is described
19868 below, assuming an existing repository and a new project being started
19876 For information on using the Subversion client program, run
19883 \begin_layout Enumerate
19890 in Windows Explorer, right click it, and select
19892 TortoiseSVN > Repo-browser
19895 If necessary, adjust the URL for the repository, then click OK.
19898 \begin_layout Enumerate
19899 Right click the level of the repository under which you want to place the
19900 new project folder (typically the top level) and click
19902 Create folder\SpecialChar \ldots{}
19905 Supply a name for the project folder and click OK.
19906 Add a message for the log file if desired, then click OK again.
19907 The new project folder should appear in the repository.
19908 Finally, click OK again to exit the repository browser.
19911 \begin_layout Enumerate
19912 Once again right click
19918 , this time selecting SVN Checkout\SpecialChar \ldots{}
19919 Select the URL of the project folder
19920 you just created in the repository, and set the checkout directory to
19928 You will be warned about a non-empty folder; click OK to proceed.
19929 You should now have a
19940 \begin_layout Enumerate
19941 Create or open your document in LyX and click
19946 ile\SpecialChar \menuseparator
19952 \begin_inset space ~
19955 Control\SpecialChar \menuseparator
19963 Add a log message and click OK to commit the document to version control.
19966 \begin_layout Standard
19967 From this point onward, you should have full functionality in the
19972 ile\SpecialChar \menuseparator
19978 \begin_inset space ~
19984 You also have the option of checking the document in and out, viewing its
19986 using the TortoiseSVN context menu in Windows Explorer or the Subversion
19987 client program from a command prompt.
19990 \begin_layout Subsubsection
19991 SSH tunel used with SVN under Windows
19994 \begin_layout Standard
19995 Compared to linux setting svn client to communicate over ssh under Windows
19996 is rather troublesome task.
19997 We will at least make some hints how to setup client side but former knowledge
19998 about ssh and Windows command line is needed, also be prepared for a great
19999 deal of frustration...
20002 \begin_layout Enumerate
20003 Get svn client for windows, as described in previous sections.
20004 When it is fresh install run some svn command (e.g.
20006 \begin_inset Flex CharStyle:Code
20009 \begin_layout Plain Layout
20015 ) to have created config files, which you will need to change later on.
20018 \begin_layout Enumerate
20019 Choose ssh client for Windows.
20020 There are more possibilities, we will use the one from Putty tools
20024 \begin_layout Plain Layout
20025 \begin_inset Flex URL
20028 \begin_layout Plain Layout
20030 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20041 You will need to automatize connection, so client doesn't ask for any password
20043 To keep things easy we will use only keys without any additional password
20048 \begin_layout Enumerate
20050 \begin_inset Flex CharStyle:Code
20053 \begin_layout Plain Layout
20060 Save your private .ppk key file and put the public one on the server side.
20061 In case the SVN server runs on linux, note that the format of the public
20062 key is not compatible with linux openssh and you will need to direcly copy-past
20063 e the key from the “
20065 Public key for pasting into OpenSSH authorized_keys file
20067 :” edit field into the server's
20068 \begin_inset Flex CharStyle:Code
20071 \begin_layout Plain Layout
20072 ~/.ssh/authorized_keys
20078 \begin_inset Flex CharStyle:Code
20081 \begin_layout Plain Layout
20090 \begin_layout Enumerate
20092 \begin_inset Flex CharStyle:Code
20095 \begin_layout Plain Layout
20102 In the SVN config file
20106 \begin_layout Plain Layout
20107 Exact path depends on Windows version, usually somewhere around
20108 \begin_inset Flex CharStyle:Code
20111 \begin_layout Plain Layout
20114 Documents and Settings
20128 \begin_inset Flex CharStyle:Code
20131 \begin_layout Plain Layout
20146 , section [tunnels], setup ssh command, e.g.
20148 \begin_inset Flex CharStyle:Code
20151 \begin_layout Plain Layout
20152 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20161 \begin_layout Plain Layout
20162 It will usually take a lot of time to get exact command right and it depends
20164 For example do not have some remote server saved as a default session in
20166 If things fail, try to connect via plink without SVN first.
20175 \begin_layout Enumerate
20176 Checkout the SVN archive, e.g.
20178 \begin_inset Flex CharStyle:Code
20181 \begin_layout Plain Layout
20182 svn co svn+ssh://user@server/repository_path
20190 \begin_layout Subsection
20194 \begin_layout Standard
20195 With the recent addition of the vc-command function LyX power users are
20196 allowed to create their own commands for revision control.
20199 \begin_layout Standard
20200 As an example you can see how two TortoiseSVN commands could be integrated
20204 \begin_layout Description
20206 \begin_inset Flex CharStyle:Code
20209 \begin_layout Plain Layout
20210 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
20218 \begin_layout Description
20220 \begin_inset Flex CharStyle:Code
20223 \begin_layout Plain Layout
20224 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
20232 \begin_layout Section
20233 Literate Programming
20236 \begin_layout Standard
20241 (kayvan@sylvan.com)
20245 original documentation written by
20247 Edmar Wienskoski Jr.
20250 (edmar-w-jr@technologist.com)
20253 \begin_layout Subsection
20257 \begin_layout Standard
20258 The main purpose of this documentation is to show you how to use LyX for
20259 literate programming.
20260 Where it is assumed that you are familiar with this programming technique,
20262 \begin_inset Quotes eld
20266 \begin_inset Quotes erd
20270 \begin_inset Quotes eld
20274 \begin_inset Quotes erd
20278 If that is not the case, please follow the web links provided in the following
20280 There is a lot of good documentation out there covering old development
20281 history to the latest tools tips.
20284 \begin_layout Standard
20285 It is also assumed that you are familiar with LyX itself to a point that
20286 you are comfortable changing your LyX preferences, and X resources file.
20287 If that is not the case please refer to other LyX documentation to cover
20288 your specific needs.
20291 \begin_layout Subsection
20292 Literate Programming
20295 \begin_layout Standard
20296 From the Literate Programming FAQ:
20299 \begin_layout Quotation
20300 Literate programming is the combination of documentation and source together
20301 in a fashion suited for reading by human beings.
20302 In fact, literate programs should be enjoyable reading, even inviting!
20303 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
20304 and documentation in a single file.
20305 Literate programming tools then parse the file to produce either readable
20306 documentation or compilable source.
20307 The WEB style of literate programming was created by D.
20308 \begin_inset space \thinspace{}
20312 Knuth during the development of his TeX typesetting software.
20316 \begin_layout Standard
20317 Another excerpt says:
20320 \begin_layout Quotation
20323 How is literate programming different from verbose commenting?
20326 \begin_layout Quotation
20327 There are three distinguishing characteristics.
20328 In order of importance, they are:
20332 \begin_layout Itemize
20333 flexible order of elaboration
20336 \begin_layout Itemize
20337 automatic support for browsing
20340 \begin_layout Itemize
20341 typeset documentation, especially diagrams and mathematics
20345 \begin_layout Standard
20346 Now that I sparked your curiosity, take a look in the references.
20349 \begin_layout Subsubsection
20353 \begin_layout Standard
20354 The complete Literate Programming FAQ can be found at:
20357 \begin_layout Quote
20358 Literate Programming FAQ
20359 \begin_inset Flex URL
20362 \begin_layout Plain Layout
20364 http://shelob.ce.ttu.edu/daves/lpfaq/faq.html
20372 \begin_layout Standard
20373 The FAQ lists 23 (twenty three!) different literate programming tools.
20374 Where some are specialized or
20375 \begin_inset Quotes eld
20379 \begin_inset Quotes erd
20382 for particular programming languages, while other have general scope.
20387 for my own use for several reasons:
20390 \begin_layout Itemize
20391 It can generate the documentation either in LaTeX or HTML.
20394 \begin_layout Itemize
20395 It has a open architecture, i.
20396 \begin_inset space \thinspace{}
20400 \begin_inset space \space{}
20403 it is easy to plug in new filters and to perform special processing that
20408 \begin_layout Itemize
20409 There is a good selection of filters available already (the HTML is one
20413 \begin_layout Itemize
20417 \begin_layout Standard
20418 The Noweb web page can be found at:
20421 \begin_layout Quote
20423 \begin_inset Flex URL
20426 \begin_layout Plain Layout
20428 http://www.cs.virginia.edu/~nr/noweb/
20436 \begin_layout Standard
20437 Starting from there you can reach many other interesting links and even
20438 some literate program examples.
20441 \begin_layout Subsection
20442 LyX and Literate Programming
20445 \begin_layout Standard
20446 The LyX support for Literate Programming is provided by using the generic
20447 LyX converters mechanism.
20448 This support is provided in a
20449 \begin_inset Quotes eld
20453 \begin_inset Quotes erd
20457 \begin_inset space \thinspace{}
20461 \begin_inset space \space{}
20464 you will be able to use this new LyX feature with some other literate programmin
20465 g tool of your choice by just changing your LyX preferences.
20468 \begin_layout Subsubsection
20469 Generating documents and code (weaving and tangling)
20472 \begin_layout Paragraph
20473 Selecting the document class
20476 \begin_layout Standard
20477 If you have installed Noweb and LyX successfully, whenever you open a new
20478 document or try to change the document class of an existing one, you will
20479 find that there are three new document classes available:
20482 \begin_layout Itemize
20486 \begin_layout Itemize
20490 \begin_layout Itemize
20494 \begin_layout Standard
20495 You must select one of them to create your literate documents from.
20499 \begin_layout Standard
20500 Note that literate documents are not limited to these three classes.
20501 New classes can be generated from other styles like letter or in combination
20502 with other class variations like Article (AMS).
20503 If you have special needs that cannot be covered by one of the existing
20504 classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
20505 will arrange to insert a new entry, or teach you how to do it.
20509 \begin_layout Plain Layout
20510 It is very simple, it involves the creation of a file with four lines, and
20511 re-running of the auto configuration.
20516 Moreover, if you use a literate tool other than Noweb you may need to create
20517 a new set of document classes for it.
20520 \begin_layout Paragraph
20524 \begin_layout Standard
20525 LyX enables you to write code with a layout named
20533 \begin_layout Plain Layout
20534 The equivalent Noweb term is
20535 \begin_inset Quotes eld
20539 \begin_inset Quotes erd
20543 For historical reasons, I got used to the term
20544 \begin_inset Quotes eld
20548 \begin_inset Quotes erd
20551 introduced by other literate tool named Nuweb, which I used for many years
20552 before rendering myself to Noweb.
20557 Noweb delimits scraps like this:
20560 \begin_layout LyX-Code
20564 \begin_layout LyX-Code
20568 \begin_layout LyX-Code
20572 \begin_layout LyX-Code
20576 \begin_layout LyX-Code
20580 \begin_layout Standard
20581 The problem is that whatever is written in between the << and the
20585 must be taken literally, i.
20586 \begin_inset space \thinspace{}
20590 \begin_inset space \space{}
20593 LyX should be prevented from making any special interpretation of what has
20595 This is handled by a special layout named Scrap, that works like a normal
20596 paragraph but has a free spacing capability.
20599 \begin_layout Standard
20600 The down side of the Scrap paragraph layout is that consecutive paragraphs
20601 of code will be spaced with one empty line in the source code and also
20602 in the printed documentation.
20603 The work around is to enter each line of code within a single Scrap, with
20604 a newline (ctrl-return).
20605 The example above will look like this:
20609 \begin_layout Plain Layout
20610 If you have a printed version of this document you will not see any difference
20611 between the previous example and this one.
20619 \begin_layout LyX-Code
20621 \begin_inset Newline newline
20625 \begin_inset Newline newline
20629 \begin_inset Newline newline
20633 \begin_inset Newline newline
20639 \begin_layout Standard
20640 This layout works fine.
20641 The only real inconvenience is that you have to type ctrl-return instead
20646 \begin_layout Plain Layout
20647 It is in my list of
20648 \begin_inset Quotes eld
20652 \begin_inset Quotes erd
20663 \begin_layout Standard
20664 As a special note, you can also use the
20665 \begin_inset Quotes eld
20669 \begin_inset Quotes erd
20672 construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
20676 \begin_layout LyX-Code
20678 \begin_inset Newline newline
20681 def some_function(args):
20682 \begin_inset Newline newline
20685 "This is the doc string for this function."
20686 \begin_inset Newline newline
20689 print "My args: ", args
20692 \begin_layout LyX-Code
20693 @ %def some_function
20696 \begin_layout Standard
20697 For an example of this usage and the resulting cross-reference output, look
20698 at the Literate python program in
20700 LIBDIR/examples/listerrors.lyx
20702 which should make this all clear.
20705 \begin_layout Paragraph
20706 Generating the documentation
20709 \begin_layout Standard
20710 At this point you already have a new document file with a proper document
20711 class, and with some code and text on it.
20712 How do I print it? The answer is simple, you select
20714 View\SpecialChar \menuseparator
20718 Just like you would do for a plain document.
20719 No special procedure is required.
20722 \begin_layout Standard
20723 To help orientate you, I will now explain what happens inside LyX:
20726 \begin_layout Enumerate
20729 Update\SpecialChar \menuseparator
20732 menu option is chosen, a LaTeX file is generated.
20737 \begin_layout Standard
20738 If the document is of any literate class the generated file will be named
20739 with an extension name defined by the
20740 \begin_inset Quotes eld
20744 \begin_inset Quotes erd
20747 format (defined in the Preferences panel), otherwise the file will have
20756 \begin_layout Enumerate
20757 Note that the only difference so far is in the name of the file, no special
20758 processing is required by LyX.
20759 Given that you formatted the code using the Scrap layout that, by itself,
20760 takes care of the business.
20763 \begin_layout Enumerate
20764 If the document is of any literate class LyX will then use the internal
20765 LyX to Noweb converter, followed by the Noweb to LaTeX converter
20769 \begin_layout Plain Layout
20770 The converters are defined in the
20772 Tools\SpecialChar \menuseparator
20776 \begin_inset Quotes eld
20780 \begin_inset Quotes erd
20792 manual for general information about converters.
20797 to generate the LaTeX file.
20801 \begin_layout Standard
20802 Otherwise it will just skip this step.
20806 \begin_layout Enumerate
20807 Finally, LaTeX is invoked and the regular post processing continues as in
20811 \begin_layout Standard
20812 Independence from a particular
20813 \begin_inset Quotes eld
20817 \begin_inset Quotes erd
20820 is easily achieved by changing the commands that are run by the various
20824 \begin_layout Paragraph
20825 Generating the code
20828 \begin_layout Standard
20829 When the build menu option is chosen or the corresponding button in the
20830 toolbar is pressed, a LaTeX file is generated just like step 1 above.
20831 Next, LyX invokes the
20836 This converter needs to be defined by the user and is not installed by
20837 default, though the Program format is.
20838 This converter (like any other converter) will have two parts:
20841 \begin_layout Enumerate
20842 The converter program itself.
20843 This program performs the conversion from the one format to the other (in
20844 this case, from the Noweb format to the Program pseudo-format).
20847 \begin_layout Enumerate
20848 The error log parser.
20849 This is a program whose sole purpose is to rewrite error messages in a
20850 format that LyX understands.
20851 This makes it possible for LyX to place error boxes in the right places
20852 in the file buffer.
20855 \begin_layout Standard
20856 The first part, the
20857 \begin_inset Quotes eld
20861 \begin_inset Quotes erd
20864 setting, should be set to
20865 \begin_inset Quotes eld
20873 \begin_inset Quotes erd
20877 This basically means that LyX will call
20878 \begin_inset Quotes eld
20882 \begin_inset Quotes erd
20885 (a program or script) with the name of the Noweb file (normally a file
20886 in the LyX temp directory).
20890 \begin_layout Standard
20891 This is an implementation of
20892 \begin_inset Quotes eld
20896 \begin_inset Quotes erd
20899 that you can place in a directory on your path:
20902 \begin_layout LyX-Code
20906 \begin_layout LyX-Code
20910 \begin_layout LyX-Code
20911 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
20914 \begin_layout Standard
20915 The next part of the converter setting is the
20916 \begin_inset Quotes eld
20920 \begin_inset Quotes erd
20923 which is to be set to
20924 \begin_inset Quotes eld
20929 parselog=listerrors
20932 \begin_inset Quotes erd
20936 This will run any errors that are generated by the
20937 \begin_inset Quotes eld
20941 \begin_inset Quotes erd
20944 process through the
20945 \begin_inset Quotes eld
20949 \begin_inset Quotes erd
20955 \begin_layout Standard
20956 The converter code looks in
20964 then on the path for the
20965 \begin_inset Quotes eld
20969 \begin_inset Quotes erd
20975 \begin_layout Standard
20976 The build will normally take place in LyX's temporary directory, so the
20977 files produced by the conversion will be in that directory.
20978 LyX will copy out what it regards as the `main' file, but the
20982 conversion may produce several files, and so most of these would then be
20983 deleted when LyX was closed.
20984 The present solution is to use a `copier',
20988 \begin_layout Plain Layout
20997 manual for information on these.
21006 script in its default mode, so that the entire contents of the temporary
21007 directory is copied.
21008 More will get copied than is needed, to be sure, but nothing will be lost.
21009 If, however, you know what extensions the generated files will have, this
21010 can be improved by using the
21019 This option takes a comma-separated list of extensions to copy.
21020 So, for example, if the conversion will generate only files with the extensions
21029 , then the correct definition would be:
21032 \begin_layout LyX-Code
21033 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
21036 \begin_layout Standard
21037 The result will be that only files with these two extensions will be copied
21041 \begin_layout Paragraph
21042 Build instructions in the document
21045 \begin_layout Standard
21046 The last piece of the integration between LyX and noweb is the
21047 \begin_inset Quotes eld
21051 \begin_inset Quotes erd
21055 Generally, the instructions for building your program should be embedded
21056 in a scrap of its own.
21058 \begin_inset Quotes eld
21062 \begin_inset Quotes erd
21065 above uses the notangle command to look for this scrap (called
21066 \begin_inset Quotes eld
21070 \begin_inset Quotes erd
21073 ) and runs its contents through
21074 \begin_inset Quotes eld
21078 \begin_inset Quotes erd
21084 \begin_layout Standard
21085 Typically, such a scrap would look something like this:
21088 \begin_layout LyX-Code
21090 \begin_inset Newline newline
21094 \begin_inset Newline newline
21098 \begin_inset Newline newline
21101 if [ -z "${NOWEB_SOURCE}" ]
21102 \begin_inset Newline newline
21106 \begin_inset Newline newline
21109 NOWEB_SOURCE=myfile.nw
21110 \begin_inset Newline newline
21114 \begin_inset Newline newline
21118 code to extract files ...]
21119 \begin_inset Newline newline
21123 code to compile files ...]
21124 \begin_inset Newline newline
21130 \begin_layout Standard
21133 LIBDIR/examples/listerrors.lyx
21137 LIBDIR/examples/Literate.lyx
21139 which implement two versions of the
21140 \begin_inset Quotes eld
21144 \begin_inset Quotes erd
21147 program for some illustrations of how all of these pieces go together or
21150 LIBDIR/examples/noweb2lyx.lyx.
21153 Interestingly, these three files show off the language-indepence of the
21154 LyX literate programming support since they are written in Python, C and
21158 \begin_layout Subsubsection
21162 \begin_layout Standard
21163 All the Literate Programming support is configured by the
21165 Tools\SpecialChar \menuseparator
21169 \begin_inset Quotes eld
21173 \begin_inset Quotes erd
21177 The important parts are:
21180 \begin_layout Description
21182 \begin_inset space ~
21186 \begin_inset Quotes eld
21190 \begin_inset Quotes erd
21194 \begin_inset space ~
21197 format Set up via the Formats tab, this is where the Noweb-specific pieces
21207 , the file extension is set to
21212 This tells LyX to create a file with a
21216 extension in the first step of the conversion process.
21219 \begin_layout Description
21221 \begin_inset space ~
21229 \begin_inset space ~
21232 format This is an empty format whose sole purpose is to be the endpoint
21233 of a conversion (which then allows us to set up a converter for it).
21236 \begin_layout Description
21245 This converter performs the
21246 \begin_inset Quotes eld
21250 \begin_inset Quotes erd
21253 of the literate document.
21254 For Noweb, it is set to
21255 \begin_inset Quotes eld
21260 noweave -delay -index $$i > $$o
21263 \begin_inset Quotes erd
21269 \begin_layout Description
21279 \begin_inset Quotes eld
21283 \begin_inset Quotes erd
21287 As stated above, the Converter is set to
21288 \begin_inset Quotes eld
21296 \begin_inset Quotes erd
21299 , with Flags set to
21300 \begin_inset Quotes eld
21305 originaldir,parselog=listerrors
21308 \begin_inset Quotes erd
21314 \begin_layout Subsubsection
21318 \begin_layout Standard
21319 There is also a new function implemented in the LyX server, the
21320 \begin_inset Quotes eld
21323 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
21327 \begin_layout Standard
21328 When debugging code with ddd/gdb, it is possible to invoke a text editor
21329 at the current execution position with a single key stroke.
21330 The default ddd configuration for that is shift-ctrl-V.
21331 It happens that you can define the editor command line invocation in ddd
21334 Edit\SpecialChar \menuseparator
21335 Preferences\SpecialChar \menuseparator
21338 dialog and changing the "Edit Sources" entry.
21341 \begin_layout Standard
21342 I take advantage of the new created LyX server function and this ddd feature,
21344 \begin_inset Quotes eld
21348 \begin_inset Quotes erd
21354 \begin_layout LyX-Code
21355 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
21358 \begin_layout Standard
21359 With this, whenever you are using ddd and find a point in the program that
21360 you want to edit, you just press shift-ctrl-V (in the ddd window), and
21361 ddd you forward this information to LyX through the LyX server and then
21362 the LyX window will show the same file with the cursor at the same position
21363 ddd was pointing to.
21364 No more guessing or long scrolling to locate a point in the program back
21368 \begin_layout Standard
21369 Note however that you must enable the LyX server to get this feature working
21370 (it is disabled by default).
21371 You can enable it in
21383 ) by entering in the
21388 \begin_inset Quotes eld
21393 /home/<your-home-directory>/.lyx/lyxpipe
21396 \begin_inset Quotes erd
21402 \begin_layout Standard
21403 Read the LyX server documentation in the
21405 Customization Manual
21407 for further information.
21410 \begin_layout Subsubsection
21414 \begin_layout Standard
21415 There are six new buttons that can be added to your LyX toolbar.
21416 Five of these buttons are short cuts to layout styles:
21437 The last one is a short cut to the
21438 \begin_inset Quotes eld
21442 \begin_inset Quotes erd
21449 \begin_layout Standard
21450 LyX has a range of buttons that are available for tool bar customization.
21451 In my toolbar I like to combine the six short cuts above with two more:
21456 \SpecialChar \menuseparator
21461 \SpecialChar \menuseparator
21468 View\SpecialChar \menuseparator
21472 Here is how it looks like:
21475 \begin_layout LyX-Code
21479 \begin_layout LyX-Code
21483 \begin_layout LyX-Code
21484 Icon "layout Standard"
21487 \begin_layout LyX-Code
21488 Icon "layout Section"
21491 \begin_layout LyX-Code
21492 Icon "layout LaTeX"
21495 \begin_layout LyX-Code
21496 Icon "layout LyX-Code"
21499 \begin_layout LyX-Code
21500 Icon "layout Scrap"
21503 \begin_layout LyX-Code
21507 \begin_layout LyX-Code
21511 \begin_layout LyX-Code
21512 Icon "buffer-typeset"
21515 \begin_layout LyX-Code
21516 Icon "build-program"
21519 \begin_layout LyX-Code
21523 \begin_layout LyX-Code
21527 \begin_layout LyX-Code
21531 \begin_layout LyX-Code
21535 \begin_layout LyX-Code
21539 \begin_layout Subsubsection
21540 Colors customization
21543 \begin_layout Standard
21544 There are a number of colors in LyX that can be customized in
21549 One of the things that bothers people is the LaTeX font color.
21550 The default color is red, since the scraps uses LaTeX font, and there is
21551 a lot of scraps in literate documents, you may get tired of seeing everything
21553 You can change it by going to the tabs
21562 \begin_layout Standard
21563 The next thing is the visible presence of the newline character in the screen.
21564 You can choose the color of this particular character and make it blend
21566 I recommend you choosing a color that is close to the background but not
21567 equal, that way you still can see it is there, but it is not bothering
21572 \begin_layout Chapter
21573 Secrets of the LaTeX Masters
21574 \begin_inset CommandInset label
21583 \begin_layout Standard
21584 Though LyX is a powerful tool, it cannot hope to support everything that
21585 can be done with pure TeX/LaTeX.
21586 However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
21587 as long as you are not afraid to use that
21588 \begin_inset Quotes eld
21592 \begin_inset Quotes erd
21595 button on the toolbar or add things to the LaTeX preamble.
21596 This section lists some tips, tricks, and otherwise cool ideas to give
21597 your document that extra little flair.
21600 Do try this at home
21602 , just start with something a little smaller and less important than your
21606 \begin_layout Standard
21607 Most ideas in this section require less common files in your LaTeX installation.
21608 If you have a system like teTeX, most will already be available.
21609 A few, however, will need to be downloaded from one of the CTAN archives.
21610 Often, there are several ways to do something, or several LaTeX style files
21611 which do the same thing.
21612 We do not endorse one choice over another, we simply claim that we have
21613 done a particular task with a particular file.
21614 Put on your wizard hat, keep an eye out for dragons, and let us begin.
21617 \begin_layout Section
21621 \begin_layout Standard
21624 Lars Gullik Bjønnes
21627 \begin_layout Subsection
21631 \begin_layout Standard
21632 The aim for this chapter
21636 \begin_layout Plain Layout
21637 Editor's note: Lars' original chapter was a masterful description of how
21643 However, it was too long to flow smoothly in this document.
21644 I have therefore chosen to excerpt the most important sections here (sorry,
21645 Lars); you can read the original chapter (and more of the story!) in the
21648 examples/multicol.lyx
21656 is to show how the LaTeX package
21660 can be used in a LyX document.
21661 As LyX doesn't support the
21665 package natively yet, we have to use some small hacks.
21666 By reading this section it should be obvious how to do this.
21669 \begin_layout Subsection
21673 \begin_layout Standard
21678 package allows switching between one and multicolumn format on the same
21680 Footnotes are handled correctly (for the most part), but will be placed
21681 at the bottom of the page and not under each column.
21682 LaTeX's float mechanism, however, is partly disabled in the current implementat
21684 At the moment only page-wide floats can be used within the scope of the
21688 \begin_layout Subsection
21692 \begin_layout Subsubsection
21696 \begin_layout Standard
21697 If you want to have two columns in your text, you have use LaTeX mode to
21702 begin{multicols}{2}
21704 at the point where you want the two column layout to start, and then
21710 where you want it to end.
21714 \begin_layout Standard
21718 \begin_layout Plain Layout
21722 begin{multicols}{2}
21730 \begin_layout Standard
21735 The Adventure of the Empty House
21738 \begin_inset Newline newline
21743 Sir Arthur Conan Doyle
21746 \begin_layout Standard
21749 It was in the spring of the year 1894 that all London was interested, and
21750 the fashionable world dismayed, by the murder of the Honourable Ronald
21751 Adair under most unusual and inexplicable circumstances.
21752 The public has already learned those particulars of the crime which came
21753 out in the police investigation, but a good deal was suppressed upon that
21754 occasion, since the case for the prosecution was so overwhelmingly strong
21755 that it was not necessary to bring forward all the facts.
21756 Only now, at the end of nearly ten years, am I allowed to supply those
21757 missing links which make up the whole of that remarkable chain.
21758 The crime was of interest in itself, but that interest was as nothing to
21759 me compared to the inconceivable sequel, which afforded me the greatest
21760 shock and surprise of any event in my adventurous life.
21761 Even now, after this long interval, I find myself thrilling as I think
21762 of it, and feeling once more that sudden flood of joy, amazement, and increduli
21763 ty which utterly submerged my mind.
21764 Let me say to that public, which has shown some interest in those glimpses
21765 which I have occasionally given them of the thoughts and actions of a very
21766 remarkable man, that they are not to blame me if I have not shared my knowledge
21767 with them, for I should have considered it my first duty to do so, had
21768 I not been barred by a positive prohibition from his own lips, which was
21769 only withdrawn upon the third of last month.
21772 \begin_layout Standard
21776 \begin_layout Plain Layout
21788 \begin_layout Subsubsection
21792 \begin_layout Standard
21793 The same pattern is used when you want more than two columns:
21796 \begin_layout Standard
21800 \begin_layout Plain Layout
21804 begin{multicols}{3}
21812 \begin_layout Standard
21815 It can be imagined that my close intimacy with Sherlock Holmes had interested
21816 me deeply in crime, and that after his disappearance I never failed to
21817 read with care the various problems which came before the public.
21818 And I even attempted, more than once, for my own private satisfaction,
21819 to employ his methods in their solution, though with indifferent success.
21820 There was none, however, which appealed to me like this tragedy of Ronald
21822 As I read the evidence at the inquest, which led up to a verdict of willful
21823 murder against some person or persons unknown, I realized more clearly
21824 than I had ever done the loss which the community had sustained by the
21825 death of Sherlock Holmes.
21826 There were points about this strange business which would, I was sure,
21827 have specially appealed to him, and the efforts of the police would have
21828 been supplemented, or more probably anticipated, by the trained observation
21829 and the alert mind of the first criminal agent in Europe.
21830 All day, as I drove upon my round, I turned over the case in my mind and
21831 found no explanation which appeared to me to be adequate.
21832 At the risk of telling a twice-told tale, I will recapitulate the facts
21833 as they were known to the public at the conclusion of the inquest.
21836 \begin_layout Standard
21840 \begin_layout Plain Layout
21852 \begin_layout Standard
21853 You can have more than 3 columns if you want to, but that might not be very
21854 pleasant for the eye.
21857 \begin_layout Subsubsection
21858 Columns inside columns
21861 \begin_layout Standard
21862 You can even have columns inside columns:
21865 \begin_layout Standard
21869 \begin_layout Plain Layout
21873 begin{multicols}{2}
21881 \begin_layout Standard
21884 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
21885 at that time governor of one of the Australian colonies.
21886 Adair's mother had returned from Australia to undergo the operation for
21887 cataract, and she, her son Ronald, and her daughter Hilda were living together
21891 \begin_layout Standard
21895 \begin_layout Plain Layout
21899 begin{multicols}{2}
21907 \begin_layout Standard
21910 The youth moved in the best society–had, so far as was known, no enemies
21911 and no particular vices.
21912 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
21913 had been broken off by mutual consent some months before, and there was
21914 no sign that it had left any very profound feeling behind it.
21915 For the rest {sic} the man's life moved in a narrow and conventional circle,
21916 for his habits were quiet and his nature unemotional.
21917 Yet it was upon this easy-going young aristocrat that death came, in most
21918 strange and unexpected form, between the hours of ten and eleven-twenty
21919 on the night of March 30, 1894.
21922 \begin_layout Standard
21926 \begin_layout Plain Layout
21938 \begin_layout Standard
21941 Ronald Adair was fond of cards–playing continually, but never for such stakes
21943 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
21944 It was shown that, after dinner on the day of his death, he had played
21945 a rubber of whist at the latter club.
21946 He had also played there in the afternoon.
21951 The evidence of those who had played with him– Mr.
21952 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
21953 and that there was a fairly equal fall of the cards.
21954 Adair might have lost five pounds, but not more.
21955 His fortune was a considerable one, and such a loss could not in any way
21957 He had played nearly every day at one club or other, but he was a cautious
21958 player, and usually rose a winner.
21959 It came out in evidence that, in partnership with Colonel Moran, he had
21960 actually won as much as four hundred and twenty pounds in a sitting, some
21961 weeks before, from Godfrey Milner and Lord Balmoral.
21962 So much for his recent history as it came out at the inquest.
21965 \begin_layout Standard
21969 \begin_layout Plain Layout
21981 \begin_layout Standard
21982 Please do read the file
21984 examples/multicol.lyx
21986 for more advanced examples including column and header spacing, vertical
21987 separator lines, and more.
21990 \begin_layout Section
21995 Paragraph Environment
21996 \begin_inset OptArg
21999 \begin_layout Plain Layout
22000 Numbering in Enumerate
22008 \begin_layout Standard
22014 \begin_layout Standard
22015 \begin_inset VSpace bigskip
22021 \begin_layout Standard
22023 The default numbering for the
22027 paragraph environment begins with Arabic numbers and ends with uppercase
22029 Suppose, however, you wanted a different type of numbering scheme.
22030 Here's a quickie example of how to change the numbering scheme:
22033 \begin_layout LyX-Code
22043 \begin_layout LyX-Code
22053 \begin_layout LyX-Code
22063 \begin_layout LyX-Code
22073 \begin_layout Standard
22074 \SpecialChar \ldots{}
22075 which changes the numbering scheme to uppercase Roman numerals, uppercase
22076 letters, Arabic numbers, and lowercase letter.
22079 \begin_layout Standard
22080 Additionally, the previous example also adds a little bit extra to the numbering
22082 For example, the first level label actually looks like:
22083 \begin_inset Quotes eld
22087 \begin_inset Quotes erd
22091 For ease of reading, we'll describe what the numbering schemes look like
22092 using a notation something like this: <
22093 \begin_inset Quotes eld
22097 \begin_inset Quotes erd
22101 \begin_inset space ~
22105 \begin_inset Quotes erd
22109 \begin_inset Quotes erd
22113 \begin_inset space ~
22117 \begin_inset Quotes erd
22121 \begin_inset Quotes erd
22125 \begin_inset space ~
22129 \begin_inset Quotes eld
22133 \begin_inset Quotes erd
22140 \begin_layout Standard
22141 As you can see in the example, there is a label command for each nesting
22148 \SpecialChar \ldots{}
22155 , as well as a counter,
22159 \SpecialChar \ldots{}
22165 There are also five
22166 \begin_inset Quotes eld
22170 \begin_inset Quotes erd
22203 , each of which take one counter as an argument.
22204 You can add characters before or after these, but there's no need to add
22208 \begin_layout Standard
22209 You can get really fancy with these.
22213 \begin_layout LyX-Code
22227 \begin_layout LyX-Code
22239 \begin_layout LyX-Code
22249 \begin_layout LyX-Code
22259 \begin_layout Standard
22260 produces the somewhat out of hand numbering scheme: <
22261 \begin_inset Quotes eld
22265 \begin_inset Quotes erd
22269 \begin_inset space ~
22273 \begin_inset Quotes erd
22277 \begin_inset Quotes erd
22281 \begin_inset space ~
22285 \begin_inset Quotes erd
22289 \begin_inset Quotes erd
22293 \begin_inset space ~
22297 \begin_inset Quotes eld
22301 \begin_inset Quotes erd
22308 \begin_layout Standard
22312 \begin_layout Section
22316 \begin_layout Standard
22322 \begin_layout Standard
22323 \begin_inset VSpace bigskip
22329 \begin_layout Standard
22334 \begin_layout Plain Layout
22340 tmpfont}{cmr17 scaled 2500}{
22352 \begin_layout Standard
22357 \begin_layout Plain Layout
22368 hose of you who like the style of old books probably also like
22369 \begin_inset Quotes eld
22373 \begin_inset Quotes erd
22376 —those large capital letters which begin each new chapter or section.
22377 Implementing them with plain LyX/LaTeX is straightforward (assuming you
22378 know some plain TeX!) but does require a lot of work and many iterations,
22379 as you can see by all the ugly TeX-mode stuff at the beginning of this
22383 \begin_layout Standard
22387 \begin_layout Plain Layout
22393 bigdrop{-1em}{3}{ptmri}{T}+
22398 here is a much easier way of doing this, of course.
22407 ) package from CTAN allows a simple way to add such letters to your documents.
22408 Since this package is not a standard part of teTeX, I can't demonstrate
22409 it within this document, but if you copy this paragraph to a new document,
22411 \begin_inset Quotes eld
22421 \begin_inset Quotes erd
22424 and the pluses from the TeX code at the beginning of the paragraph, and
22429 usepackage{dropcaps}
22431 to your LaTeX preamble, you will get a nice Times Roman Italic
22432 \begin_inset Quotes eld
22436 \begin_inset Quotes erd
22439 , whose height is three lines of text and which protrudes 1 em into the
22441 (Make certain you have copied
22442 \begin_inset Quotes eld
22450 \begin_inset Quotes erd
22453 into a directory where TeX can see it.) The first argument is the amount
22454 of indentation; in this case the negative sign moves it into the margin.
22455 The second argument is the height of the letter in number of lines of text.
22456 The third argument is the font name: virtually anything which has a tfm
22457 file should work (wade through the
22459 .../texmf/fonts/tfm
22461 directory for possibilities).
22462 My personal favorite is
22463 \begin_inset Quotes eld
22471 \begin_inset Quotes erd
22474 , a fancy German font specifically designed for dropped capitals.
22475 The fourth argument is the letter (or letters) to be dropped.
22480 package also offers the
22486 command, as well as a slightly simplified
22495 \begin_layout Section
22496 Non-standard Paragraph Shapes
22499 \begin_layout Standard
22505 \begin_layout Standard
22506 \begin_inset VSpace bigskip
22512 \begin_layout Standard
22516 \begin_layout Plain Layout
22528 \begin_layout Standard
22532 \begin_layout Plain Layout
22541 \begin_layout Plain Layout
22555 \begin_layout Standard
22560 \begin_layout Plain Layout
22571 \begin_layout Plain Layout
22580 \begin_layout Plain Layout
22589 \begin_layout Plain Layout
22598 \begin_layout Plain Layout
22607 \begin_layout Plain Layout
22616 \begin_layout Plain Layout
22625 \begin_layout Plain Layout
22634 \begin_layout Plain Layout
22643 \begin_layout Plain Layout
22652 \begin_layout Plain Layout
22661 \begin_layout Plain Layout
22670 \begin_layout Plain Layout
22679 \begin_layout Plain Layout
22688 \begin_layout Plain Layout
22697 \begin_layout Plain Layout
22706 \begin_layout Plain Layout
22715 \begin_layout Plain Layout
22724 \begin_layout Plain Layout
22733 \begin_layout Plain Layout
22739 There are times when the tyranny of rectangular paragraphs must be overthrown.
22740 In such situations, a call to the delightful plain TeX command
22747 As you can see, completely arbitrary shapes can be laid out with a suitable
22748 set of linelength definitions.
22749 While this parshape may look a bit silly and useless, one could conceive
22750 of situations such as finely tuned dropped capitals, word wrapping around
22751 non-rectangular graphics, etc.
22752 which will benefit from such handcrafting.
22755 \begin_layout Standard
22756 \begin_inset VSpace bigskip
22762 \begin_layout Standard
22767 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
22774 is the number of lines of text which define the paragraph.
22775 If there turn out to be fewer lines, the shape is truncated; if there are
22776 more, the excess lines have the same dimensions as the last line of the
22786 entries specify the indentation of the line from the left margin, and the
22787 length of the line as measured from that point.
22788 The shape applies only to the current paragraph; everything is reset to
22789 normal for the next paragraph.
22792 \begin_layout Standard
22796 \begin_layout Plain Layout
22808 \begin_layout Section
22812 \begin_layout Standard
22813 As you can see, the examples in this section range from the useful to the
22815 While I don't expect that anyone will ever need the paragraph shape demonstrate
22816 d in the last section, the important point is that you can do almost anything
22817 you want in LyX if you are willing to figure out how to do it in TeX and
22819 TeX is a fantastically powerful typesetting system and all that power is
22820 available to you since LyX uses it as its backend.