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
128 \html_use_mathml true
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 Unfortunately, the formatting of bibliography entries, too, is at present
4524 not customizable, and it is fairly primitive, though this should change
4529 \begin_layout Standard
4530 The other significant defect is that cross-referenced information is printed
4531 with every entry with which it is associated.
4532 So you can see things like this:
4537 \begin_inset Quotes eld
4540 Context and Logical Form
4541 \begin_inset Quotes erd
4546 Language in Context: Selected Essays
4548 (Oxford: Oxford University Press, 2007), pp.
4554 \begin_inset Quotes eld
4557 Semantics in Context
4558 \begin_inset Quotes erd
4563 Language in Context: Selected Essays
4565 (Oxford: Oxford University Press, 2007), pp.
4569 \begin_layout Standard
4570 Again, this should be fixed before long.
4573 \begin_layout Standard
4574 There is no support at present for sectioned bibliographies.
4575 If you have multiple bibliographies, then LyX will print the same bibliography
4579 \begin_layout Section
4583 \begin_layout Standard
4584 LyX will happily export indexes as XHTML, but with certain limitations at
4588 \begin_layout Standard
4589 Index export will be most reliable when you do not attempt to use the fancy
4590 constructs that are described in the section on indexes in the
4598 \begin_layout Plain Layout
4599 The main issue here is that LyX itself does not really handle these.
4600 It just lets you enter what you would have to enter in raw LaTeX.
4605 We'll describe how they are handled using the subsection headings from
4609 \begin_layout Itemize
4610 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
4611 these, but the entries must be separated by
4612 \begin_inset Quotes eld
4616 \begin_inset Quotes erd
4619 , that is, there must be spaces around the exclamation point.
4620 This is because it is otherwise too difficult to check for escaped exclamation
4621 points, ones in math, and so forth.
4624 \begin_layout Itemize
4625 Page Ranges: There is no support at all for page ranges, since these make
4626 no sense with XHMTL.
4627 Instead, you will just get two index entries, one at either end.
4630 \begin_layout Itemize
4631 Cross-referencing: There is no support for cross-referencing.
4632 If LyX finds an entry containing the
4633 \begin_inset Quotes eld
4636 |see\SpecialChar \ldots{}
4638 \begin_inset Quotes erd
4641 construct, it is just dropped, and the rest is treated as an ordinary index
4645 \begin_layout Itemize
4646 Index Entry Order: LyX does support attempts to fix the sorting order.
4647 It will take what is before the first `@' it finds and use that for sorting,
4648 taking what follows the first `@' to be the actual entry.
4649 At present, LyX does not check for escaped `@', so do not try to index
4653 \begin_layout Itemize
4654 Index Entry Layout: You can format entries by using the text style dialog,
4655 or by using any other method available within LyX itself.
4656 There is no support for constructs like:
4657 \begin_inset Quotes eld
4661 \begin_inset Quotes erd
4665 Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
4666 and everything that follows it.
4669 \begin_layout Itemize
4670 Multiple Indexes: There is no support for multiple indexes.
4671 Rather, all index entries will be printed as one large index.
4672 To avoid our printing several versions of the index, we print only the
4673 main index, so make sure you have one.
4676 \begin_layout Section
4677 Nomenclature and Glossary
4680 \begin_layout Standard
4681 There is at present no support for glossaries.
4684 \begin_layout Chapter
4688 \begin_layout Section
4692 \begin_layout Standard
4693 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
4694 and retrieve information about the LyX internal state.
4695 This is only intended for advanced users, but they should find it useful.
4696 It is by writing to the LyX server, for example, that bibliography managers,
4697 such as JabRef, are able to
4698 \begin_inset Quotes eld
4702 \begin_inset Quotes erd
4708 \begin_layout Section
4709 Starting the LyX Server
4712 \begin_layout Standard
4713 The LyX server works through the use of a pair of named pipes.
4714 These are usually located in
4715 \begin_inset Flex CharStyle:Code
4718 \begin_layout Plain Layout
4724 , (except on Windows, where
4728 named pipes are special objects located in
4729 \begin_inset Flex CharStyle:Code
4732 \begin_layout Plain Layout
4744 ) and have the names
4745 \begin_inset Quotes eld
4749 \begin_inset Flex CharStyle:Code
4752 \begin_layout Plain Layout
4759 \begin_inset Quotes erd
4763 \begin_inset Quotes eld
4767 \begin_inset Flex CharStyle:Code
4770 \begin_layout Plain Layout
4777 \begin_inset Quotes erd
4781 External programs write into
4782 \begin_inset Flex CharStyle:Code
4785 \begin_layout Plain Layout
4791 and read back data from
4792 \begin_inset Flex CharStyle:Code
4795 \begin_layout Plain Layout
4802 The stem of the pipe names can be defined in the
4803 \begin_inset Flex CharStyle:MenuItem
4806 \begin_layout Plain Layout
4807 Tools\SpecialChar \menuseparator
4814 \begin_inset Flex CharStyle:Code
4817 \begin_layout Plain Layout
4818 "/home/myhome/lyxpipe"
4824 \begin_inset Flex CharStyle:Code
4827 \begin_layout Plain Layout
4846 configure this manually in order for the server to start.
4849 \begin_layout Standard
4851 \begin_inset Flex CharStyle:Code
4854 \begin_layout Plain Layout
4861 \begin_inset Flex CharStyle:Code
4864 \begin_layout Plain Layout
4870 ' to create the pipes.
4871 If one of the pipes already exists, LyX will assume that another LyX process
4872 is already running and will not start the server.
4873 On POSIX (Unix like) systems, if for some other reason, an unused
4874 \begin_inset Quotes eld
4878 \begin_inset Quotes erd
4881 pipe is left in existence when LyX closes, then LyX will try to delete
4883 If this fails for some reason, you will need to delete the pipes manually
4884 and then restart LyX.
4885 On Windows, pipes are deleted by the OS on program termination or crash,
4887 \begin_inset Quotes eld
4891 \begin_inset Quotes erd
4894 pipes should not be possible.
4897 \begin_layout Standard
4898 To have several LyX processes with servers at the same time, you have to
4899 use different configurations, perhaps by using separate user directories,
4901 \begin_inset Flex CharStyle:Code
4904 \begin_layout Plain Layout
4910 file, for each process.
4913 \begin_layout Standard
4914 If you are developing a client program, you might find it useful to enable
4915 debugging information from the LyX server.
4916 Do this by starting LyX as
4917 \begin_inset Flex CharStyle:Code
4920 \begin_layout Plain Layout
4929 \begin_layout Standard
4930 You can find a complete example client written in C in the source distribution
4932 \begin_inset Flex CharStyle:Code
4935 \begin_layout Plain Layout
4936 development/lyxserver/server_monitor.c
4944 \begin_layout Standard
4945 Another useful tool is command-line based client you will find in
4946 \begin_inset Flex CharStyle:Code
4949 \begin_layout Plain Layout
4950 src/client/lyxclient
4958 \begin_layout Section
4959 Normal communication
4962 \begin_layout Standard
4963 To issue a LyX call, the client writes a line of ASCII text into the input
4965 This line has the following format:
4982 \begin_layout Description
4983 clientname is a name that the client can choose arbitrarily.
4984 Its only use is that LyX will echo it if it sends an answer—so a client
4985 can dispatch results from different requesters.
4988 \begin_layout Description
4989 function is the function you want LyX to perform.
4990 It is the same as the commands you'd use in the minibuffer.
4993 \begin_layout Description
4994 argument is an optional argument which is meaningful only to some functions
4996 \begin_inset Quotes eld
5000 \begin_inset Quotes erd
5003 LFUN will insert the argument as text at the cursor position).
5006 \begin_layout Standard
5007 The answer from LyX will arrive in the output pipe and be of the form
5024 \begin_layout Standard
5033 are just echoed from the command request, while
5037 is more or less useful information filled according to how the command
5038 execution worked out.
5039 Some commands, such as
5040 \begin_inset Quotes eld
5044 \begin_inset Quotes erd
5047 , will return information about the internal state of LyX, while other will
5048 return an empty data-response.
5049 This means that the command execution went fine.
5052 \begin_layout Standard
5053 In case of errors, the response from LyX will have this form
5070 \begin_layout Standard
5075 should contain an explanation of why the command failed.
5078 \begin_layout Standard
5082 \begin_layout LyX-Code
5083 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5084 \begin_inset Newline newline
5087 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5088 \begin_inset Newline newline
5091 read a <~/.lyxpipe.out
5092 \begin_inset Newline newline
5098 \begin_layout Section
5102 \begin_layout Standard
5103 LyX can notify clients of events going on asynchronously.
5104 Currently it will only do this if the user binds a key sequence with the
5106 \begin_inset Quotes eld
5110 \begin_inset Quotes erd
5114 The format of the string LyX sends is as follows:
5118 \begin_inset Flex CharStyle:Code
5121 \begin_layout Plain Layout
5132 \begin_layout Standard
5137 is the printed representation of the key sequence that was actually typed
5141 \begin_layout Standard
5142 This mechanism can be used to extend LyX's command set and implement macros.
5143 Bind some key sequence to
5144 \begin_inset Quotes eld
5148 \begin_inset Quotes erd
5152 Then start a client that listens on the output pipe, dispatches the command
5153 according to the sequence, and starts a function that may use LyX calls
5154 and LyX requests to issue a command or a series of commands to LyX.
5157 \begin_layout Section
5158 The simple LyX Server Protocol
5161 \begin_layout Standard
5162 LyX implements a simple protocol that can be used for session management.
5163 All messages are of the form
5176 \begin_layout Standard
5182 \begin_inset Quotes eld
5186 \begin_inset Quotes erd
5190 \begin_inset Quotes eld
5194 \begin_inset Quotes erd
5199 \begin_inset Quotes eld
5203 \begin_inset Quotes erd
5206 is received from a client, LyX will report back to inform the client that
5207 it's listening to it's messages, while
5208 \begin_inset Quotes eld
5212 \begin_inset Quotes erd
5215 sent from LyX will inform clients that LyX is closing.
5218 \begin_layout Section
5219 Reverse DVI/PDF search
5222 \begin_layout Standard
5223 Some DVI/PDF viewers
5227 \begin_layout Plain Layout
5228 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5229 Skim on Mac OSX and SumatraPDF on Windows.
5238 facility (also called
5243 This means that you can tell LyX to put the cursor to a specific line in
5244 the document by clicking at the respective position in the DVI/PDF output.
5245 To achieve this, the viewer must be able to communicate with LyX.
5246 This is done via the LyX server either by using the named pipe (
5250 ), or the UNIX domain socket (
5254 ) that LyX creates in its temporary directory (this is the way the
5255 \begin_inset Flex CharStyle:Code
5258 \begin_layout Plain Layout
5264 program communicates with LyX).
5265 In some cases, you need a helper script that mediates between the viewer
5266 and LyX, in others, the viewer can communicate with LyX directly.
5267 This depends on the selected viewer and on your operating system.
5268 The same applies to the way viewers need to be configured and the way the
5269 reverse search is actually performed.
5270 In what follows, we will thus describe how to setup reverse search for
5272 Before we turn to this, though, we will explain what needs to be done generally
5273 to enable reverse search in the DVI/PDF output.
5276 \begin_layout Subsection
5277 Enabling reverse search
5280 \begin_layout Standard
5281 LaTeX provides several different methods for reverse search.
5282 Some are built-in in the
5283 \begin_inset Flex CharStyle:Code
5286 \begin_layout Plain Layout
5292 program, some are provided by external packages.
5293 Your choice depends on whether your LaTeX distribution already provides
5294 a given method (the built-in methods are rather new) and whether your viewer
5296 The available methods are described in the following.
5299 \begin_layout Subsubsection*
5300 Built-in DVI-search via src-specials (DVI only)
5303 \begin_layout Standard
5304 This method provides the DVI file with the necessary information for reverse
5306 It is available in LaTeX since quite some time (any somewhat recent LaTeX
5307 distribution should include it), and it works reliably.
5308 To enable it, change the
5309 \begin_inset Flex CharStyle:MenuItem
5312 \begin_layout Plain Layout
5317 \begin_layout Plain Layout
5330 \begin_inset Flex CharStyle:MenuItem
5333 \begin_layout Plain Layout
5338 \begin_layout Plain Layout
5345 eX (plain)->DraftDVI
5351 \begin_inset Flex CharStyle:MenuItem
5354 \begin_layout Plain Layout
5355 Preferences\SpecialChar \menuseparator
5356 File Handling\SpecialChar \menuseparator
5363 \begin_inset Flex CharStyle:Code
5366 \begin_layout Plain Layout
5367 latex -src-specials $$i
5373 If this doesn't work, check if your TeX engine needs different options
5374 (the syntax might differ in some distributions).
5377 \begin_layout Subsubsection*
5378 External Packages (PDFSync and scrltx)
5381 \begin_layout Standard
5390 provide reverse search facility for PDF output (via pdflatex) and DVI output,
5392 In order to enable it, load the packages in the LyX preamble:
5395 \begin_layout Itemize
5396 \begin_inset Flex CharStyle:Code
5399 \begin_layout Plain Layout
5407 for reverse PDF search,
5410 \begin_layout Itemize
5412 \begin_inset Flex CharStyle:Code
5415 \begin_layout Plain Layout
5418 usepackage[active]{srcltx}
5423 for reverse DVI search.
5426 \begin_layout Standard
5427 If you want to be able to perform both DVI and PDF reverse searches, you
5428 can also insert in the preamble the following lines
5431 \begin_layout LyX-Code
5435 \begin_inset Newline newline
5441 \begin_inset Newline newline
5447 \begin_inset Newline newline
5453 \begin_inset Newline newline
5458 usepackage[active]{srcltx}
5459 \begin_inset Newline newline
5467 \begin_layout Standard
5468 This way, you can preview the file as either DVI or PDF (pdflatex) and the
5469 right package will be used.
5472 \begin_layout Standard
5473 Note that PDFSync might affect the output layout of your document.
5474 It is therefore advised to disable PDFsync for final documents.
5477 \begin_layout Subsubsection*
5478 Built-in reverse search via SyncTeX (DVI and PDF)
5481 \begin_layout Standard
5483 \begin_inset Flex CharStyle:Code
5486 \begin_layout Plain Layout
5492 have built-in support for both PDF and DVI reverse search.
5497 facility is basically the result of the integration of the PDFSync package
5498 to the pdftex program and its merge with the
5503 You need at least TeXLive 2008 or a recent MikTeX distribution in order
5505 Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
5506 already provide SyncTeX support.
5509 \begin_layout Standard
5510 To enable SyncTeX for DVI output, change the
5511 \begin_inset Flex CharStyle:MenuItem
5514 \begin_layout Plain Layout
5519 \begin_layout Plain Layout
5532 \begin_inset Flex CharStyle:MenuItem
5535 \begin_layout Plain Layout
5540 \begin_layout Plain Layout
5547 eX (plain) -> DraftDVI
5553 \begin_inset Flex CharStyle:MenuItem
5556 \begin_layout Plain Layout
5557 Preferences\SpecialChar \menuseparator
5558 File Handling\SpecialChar \menuseparator
5565 \begin_inset Flex CharStyle:Code
5568 \begin_layout Plain Layout
5569 latex -synctex=1 $$i
5574 , and for PDF output, change the
5575 \begin_inset Flex CharStyle:MenuItem
5578 \begin_layout Plain Layout
5583 \begin_layout Plain Layout
5590 eX (pdflatex) -> PDF (pdflatex)
5596 \begin_inset Flex CharStyle:Code
5599 \begin_layout Plain Layout
5600 pdflatex -synctex=1 $$i
5606 Check the documentation of your viewer whether the viewer needs to be configure
5607 d for the use with SyncTeX.
5611 \begin_layout Plain Layout
5613 \begin_inset Flex CharStyle:Code
5616 \begin_layout Plain Layout
5622 option enables gzip compression.
5623 If your viewer does not support it, you should instead use
5624 \begin_inset Flex CharStyle:Code
5627 \begin_layout Plain Layout
5641 \begin_layout Subsection
5642 Configuring and using specific viewers
5645 \begin_layout Subsubsection*
5646 Xdvi (all platforms)
5649 \begin_layout Standard
5651 \begin_inset Flex CharStyle:Code
5654 \begin_layout Plain Layout
5660 , you don't need to do anything else for performing a reverse DVI search,
5661 as LyX already provides the necessary hooks for automatically using the
5663 \begin_inset Flex CharStyle:Code
5666 \begin_layout Plain Layout
5673 Just setup your document as described above (reverse search is triggered
5674 by Ctrl-click or Alt-click on Mac OSX, respectively).
5677 \begin_layout Standard
5678 However, if for whatever reason you want to use the named pipe instead of
5679 the socket for communicating with LyX, simply change the DVI viewer in
5681 \begin_inset Flex CharStyle:MenuItem
5684 \begin_layout Plain Layout
5685 Preferences\SpecialChar \menuseparator
5686 File Handling\SpecialChar \menuseparator
5696 \begin_layout Plain Layout
5697 On Mac OSX you have to use
5698 \begin_inset Flex CharStyle:Code
5701 \begin_layout Plain Layout
5702 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
5713 \begin_inset Flex CharStyle:Code
5716 \begin_layout Plain Layout
5717 xdvi -editor 'lyxeditor.sh %f %l'
5723 \begin_inset Flex CharStyle:Code
5726 \begin_layout Plain Layout
5732 is a suitable script.
5733 For example, a minimal shell script is the following one:
5736 \begin_layout LyX-Code
5738 \begin_inset Newline newline
5741 LYXPIPE="/path/to/lyxpipe"
5742 \begin_inset Newline newline
5745 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
5746 \begin_inset Newline newline
5749 echo "$COMMAND" > "${LYXPIPE}".in || exit
5750 \begin_inset Newline newline
5753 read < "${LYXPIPE}".out || exit
5756 \begin_layout Standard
5758 \begin_inset Flex CharStyle:Code
5761 \begin_layout Plain Layout
5771 \begin_layout Plain Layout
5778 XServer pipe path specified in
5779 \begin_inset Flex CharStyle:MenuItem
5782 \begin_layout Plain Layout
5783 Preferences\SpecialChar \menuseparator
5793 \begin_layout Plain Layout
5795 \begin_inset Flex CharStyle:Code
5798 \begin_layout Plain Layout
5804 folder of a source distribution you can find a
5805 \begin_inset Flex CharStyle:Code
5808 \begin_layout Plain Layout
5814 script which is able to locate the
5818 based on your preferences.
5826 \begin_layout Subsubsection*
5830 \begin_layout Standard
5832 \begin_inset Flex CharStyle:Code
5835 \begin_layout Plain Layout
5836 /Applications/MacDviX_Folder/calleditor.script
5841 , add the following lines:
5844 \begin_layout LyX-Code
5849 \begin_layout Plain Layout
5856 X.app/Contents/MacOS/lyxeditor "$2" $1
5857 \begin_inset Newline newline
5863 \begin_layout Standard
5864 Modify the lines accordingly if you install LyX somewhere else than in the
5865 Applications folder.
5868 \begin_layout Standard
5869 Reverse search is triggered by Alt-click (OPTION-click).
5872 \begin_layout Subsubsection*
5876 \begin_layout Standard
5878 \begin_inset Flex CharStyle:Code
5881 \begin_layout Plain Layout
5882 open -a Skim.app $$i
5887 to the viewer setting in
5888 \begin_inset Flex CharStyle:MenuItem
5891 \begin_layout Plain Layout
5892 Preferences\SpecialChar \menuseparator
5893 File Handling\SpecialChar \menuseparator
5894 File formats\SpecialChar \menuseparator
5901 \begin_inset Flex CharStyle:MenuItem
5904 \begin_layout Plain Layout
5905 Skim\SpecialChar \menuseparator
5906 Preferences\SpecialChar \menuseparator
5916 \begin_layout Plain Layout
5926 \begin_layout Standard
5927 Reverse search is triggered by COMMAND-SHIFT-click
5930 \begin_layout Subsubsection*
5934 \begin_layout Standard
5936 \begin_inset Flex CharStyle:MenuItem
5939 \begin_layout Plain Layout
5940 Settings\SpecialChar \menuseparator
5941 Configure Okular\SpecialChar \ldots{}
5942 \SpecialChar \menuseparator
5949 \begin_inset Quotes eld
5953 \begin_inset Quotes erd
5957 \begin_inset Flex CharStyle:Code
5960 \begin_layout Plain Layout
5969 \begin_layout Standard
5970 Reverse search is triggered by SHIFT-click.
5973 \begin_layout Subsubsection*
5977 \begin_layout Standard
5978 Launch yap, choose its
5979 \begin_inset Flex CharStyle:MenuItem
5982 \begin_layout Plain Layout
5983 View\SpecialChar \menuseparator
5990 \begin_inset Quotes eld
5994 \begin_inset Quotes erd
5999 \begin_inset Quotes eld
6002 New\SpecialChar \ldots{}
6004 \begin_inset Quotes erd
6007 button and, in the window that opens, enter
6008 \begin_inset Quotes eld
6012 \begin_inset Quotes erd
6015 (or any other name you like) in the
6016 \begin_inset Quotes eld
6020 \begin_inset Quotes erd
6024 Now click on the button labeled
6025 \begin_inset Quotes eld
6028 \SpecialChar \ldots{}
6030 \begin_inset Quotes erd
6033 to open a file dialog and navigate to the directory containing the batch
6035 \begin_inset Flex CharStyle:Code
6038 \begin_layout Plain Layout
6046 \begin_inset Flex CharStyle:Code
6049 \begin_layout Plain Layout
6055 and then specify the program arguments as
6056 \begin_inset Flex CharStyle:Code
6059 \begin_layout Plain Layout
6067 \begin_inset Flex CharStyle:Code
6070 \begin_layout Plain Layout
6076 wrapper is used for communicating with LyX through the
6083 \begin_layout LyX-Code
6085 \begin_inset Newline newline
6088 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
6097 \begin_inset Newline newline
6111 \begin_layout Standard
6112 Make sure that the LyXServer pipe path you specified in LyX is
6113 \begin_inset Flex CharStyle:Code
6116 \begin_layout Plain Layout
6130 , otherwise change the
6131 \begin_inset Flex CharStyle:Code
6134 \begin_layout Plain Layout
6140 wrapper accordingly.
6143 \begin_layout Standard
6144 In yap, reverse search is triggered by double-click.
6147 \begin_layout Subsubsection*
6148 SumatraPDF (Windows)
6151 \begin_layout Standard
6152 In order to use SumatraPDF for inverse search, enter
6153 \begin_inset Flex CharStyle:Code
6156 \begin_layout Plain Layout
6157 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6162 in the viewer setting in
6163 \begin_inset Flex CharStyle:MenuItem
6166 \begin_layout Plain Layout
6167 Preferences\SpecialChar \menuseparator
6168 File Handling\SpecialChar \menuseparator
6169 File formats\SpecialChar \menuseparator
6176 \begin_inset Flex CharStyle:Code
6179 \begin_layout Plain Layout
6185 is the previous wrapper.
6186 If SumatraPDF.exe is not in your command PATH, use its full file name.
6189 \begin_layout Standard
6190 Reverse search is triggered by double-click.
6193 \begin_layout Subsubsection*
6197 \begin_layout Standard
6198 First of all, make sure that yap is your default DVI viewer in the Windows
6199 environment, then launch it, choose its
6200 \begin_inset Flex CharStyle:MenuItem
6203 \begin_layout Plain Layout
6204 View\SpecialChar \menuseparator
6211 \begin_inset Quotes eld
6215 \begin_inset Quotes erd
6220 \begin_inset Quotes eld
6223 New\SpecialChar \ldots{}
6225 \begin_inset Quotes erd
6228 button and, in the window that opens, enter
6229 \begin_inset Quotes eld
6233 \begin_inset Quotes erd
6236 (or any other name you like) in the
6237 \begin_inset Quotes eld
6241 \begin_inset Quotes erd
6245 Now click on the button labeled
6246 \begin_inset Quotes eld
6249 \SpecialChar \ldots{}
6251 \begin_inset Quotes erd
6254 to open a file dialog and navigate to the directory containing the
6255 \begin_inset Flex CharStyle:Code
6258 \begin_layout Plain Layout
6264 program (which is installed by default on Cygwin along with the LyX executable).
6266 \begin_inset Flex CharStyle:Code
6269 \begin_layout Plain Layout
6275 and then specify the program arguments as
6276 \begin_inset Flex CharStyle:Code
6279 \begin_layout Plain Layout
6286 In this way, you will be using the
6290 for communicating with LyX.
6291 If, for whatever reason, you want to use the
6296 \begin_inset Flex CharStyle:Code
6299 \begin_layout Plain Layout
6305 option and be sure to specify the LyXServer pipe path in the LyX preferences.
6308 \begin_layout Standard
6309 In yap, reverse search is triggered by double-click.
6312 \begin_layout Subsubsection*
6316 \begin_layout Standard
6317 In order to use SumatraPDF for inverse search, enter
6318 \begin_inset Flex CharStyle:Code
6321 \begin_layout Plain Layout
6327 in the viewer setting in
6328 \begin_inset Flex CharStyle:MenuItem
6331 \begin_layout Plain Layout
6332 Preferences\SpecialChar \menuseparator
6333 File Handling\SpecialChar \menuseparator
6334 File formats\SpecialChar \menuseparator
6341 \begin_inset Flex CharStyle:Code
6344 \begin_layout Plain Layout
6350 is the following script (to be placed in your command PATH,
6351 \begin_inset Flex CharStyle:Code
6354 \begin_layout Plain Layout
6360 being the best choice):
6363 \begin_layout LyX-Code
6365 \begin_inset Newline newline
6369 \begin_inset Newline newline
6372 SumatraPDF -inverse-search "lyxeditor -g %f %l" $(basename $1)
6375 \begin_layout Standard
6376 This wrapper script is needed because SumatraPDF is a native Windows application
6377 and does not understand the posix paths used by the Cygwin version of LyX.
6378 If SumatraPDF.exe is not in your command PATH, use its full posix path in
6381 \begin_inset Flex CharStyle:Code
6384 \begin_layout Plain Layout
6390 enables communication via the
6396 \begin_inset Flex CharStyle:Code
6399 \begin_layout Plain Layout
6405 option if you want to use the
6409 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6412 \begin_layout Standard
6413 Reverse search is triggered by double-click.
6416 \begin_layout Chapter
6417 Special Document Classes
6420 \begin_layout Section
6424 \begin_layout Standard
6430 \begin_layout Subsection
6434 \begin_layout Standard
6435 This section describes how LyX can be used to write articles for submission
6436 to the scientific journal
6438 Astronomy and Astrophysics
6440 (www.edpsciences.fr/aa/
6441 \begin_inset Flex URL
6444 \begin_layout Plain Layout
6446 http://www.edpsciences.fr/aa/
6451 ) using Version 5.01 of the document class
6456 This package can be downloaded from the ftp site
6459 \begin_layout Standard
6460 \begin_inset VSpace medskip
6466 \begin_layout Standard
6468 \begin_inset Flex URL
6471 \begin_layout Plain Layout
6473 ftp://ftp.edpsciences.org/pub/aa/readme.html
6481 \begin_layout Standard
6482 \begin_inset VSpace medskip
6488 \begin_layout Standard
6489 A manual comes together with that package, and this text is not meant to
6490 replace the original manual but merely a short guide how to realize the
6491 correct form of your paper.
6495 \begin_layout Standard
6496 Please note that the publisher of the journal was changed from Springer
6497 to EDP Sciences starting January 1, 2001.
6498 That change implicated also some slight changes of the style files, namely
6499 the removal of the thesaurus command.
6500 The LyX class aa supports the newest version of these style files, V 5.01.
6501 If you have an older version installed, please upgrade.
6502 For compatibility, the old (version 4) layout has been kept as
6507 Please refer to the comments in
6509 LyXDir/layouts/aapaper.layout
6514 \begin_layout Subsection
6518 \begin_layout Standard
6519 It is recommended you start from the example template distributed with LyX.
6520 If you are not using a template, note the following settings:
6523 \begin_layout Itemize
6530 Document\SpecialChar \menuseparator
6533 dialog (OK, that one was obvious).
6536 \begin_layout Itemize
6537 Don't change the option
6540 \begin_inset space ~
6550 The whole layout is done by the macros, you shouldn't change anything.
6553 \begin_layout Subsection
6557 \begin_layout Standard
6558 First thing to enter is the header information.
6559 It consists of seven entries, of which some are optional.
6563 \begin_layout Itemize
6571 \begin_layout Itemize
6579 \begin_layout Itemize
6587 \begin_layout Itemize
6595 \begin_layout Itemize
6600 : [optional] if more than one author: whom to contact for offprint requests.
6603 \begin_layout Itemize
6608 : [optional] mail address for contacts.
6611 \begin_layout Itemize
6619 Received: <date>; Accepted <date>
6622 \begin_layout Standard
6623 There is no need to issue the
6629 command, this is done automatically by LyX when the header is finished.
6630 Although the order of the single header entries doesn't matter it is advised
6631 to keep the above sequence, just to get the best optics and meets the layout
6632 of the real document.
6635 \begin_layout Standard
6636 If you want to place footnotes in the header block, e.
6637 \begin_inset space \thinspace{}
6641 \begin_inset space \space{}
6644 to state your present address, just use the standard footnote via the menu
6647 Insert\SpecialChar \menuseparator
6651 LyX will automagically use the term
6660 \begin_layout Standard
6661 In addition to these topics, the macros use three additional LaTeX commands
6662 that have no counterpart in LyX:
6665 \begin_layout Itemize
6672 to separate different names for more than one author and institute, respectivel
6676 \begin_layout Itemize
6683 to mark corresponding author/institute pairs.
6684 The institutes are numbered sequentially as they appear in the
6688 field, so you have to put a marker to each author.
6691 \begin_layout Itemize
6698 to supply an email address for fast contact.
6701 \begin_layout Standard
6702 In all cases, the appropriate command has to be entered in LyX and marked
6708 \begin_layout Subsection
6712 \begin_layout Standard
6713 The abstract should immediately follow the header block.
6714 With version 5 the abstract environment was changed to a command, and there
6715 is now a resctriction to only one paragraph.
6716 In addition, it should contain an entry with the keywords.
6717 This is not yet implemented for LyX, therefore you have to enter the LaTeX
6724 by hand and mark it as LaTeX code.
6725 Refer to the example paper.
6728 \begin_layout Subsection
6729 Supported environments
6732 \begin_layout Standard
6733 The A&A paper layout supports the following environments for structuring
6737 \begin_layout Itemize
6743 \begin_layout Itemize
6749 \begin_layout Itemize
6755 \begin_layout Itemize
6761 \begin_layout Itemize
6767 \begin_layout Itemize
6773 \begin_layout Itemize
6779 \begin_layout Itemize
6785 \begin_layout Itemize
6791 \begin_layout Itemize
6797 \begin_layout Itemize
6803 \begin_layout Itemize
6809 \begin_layout Subsection
6810 Commands not supported by LyX
6813 \begin_layout Standard
6814 Some commands are not yet supported by the
6819 Some have already been mentioned.
6820 For the sake of completeness, they are listed all together here:
6823 \begin_layout Itemize
6831 \begin_layout Itemize
6839 \begin_layout Itemize
6847 \begin_layout Itemize
6855 \begin_layout Itemize
6863 \begin_layout Itemize
6871 \begin_layout Itemize
6879 \begin_layout Itemize
6887 \begin_layout Standard
6888 If you want to use any of these commands, you have to enter them yourself.
6891 Do not forget to mark them as LaTeX code!
6894 \begin_layout Subsection
6895 Figure and Table Floats
6898 \begin_layout Standard
6899 LyX provides support for the necessary float environments
6901 figure, figure*, table
6907 , therefore we won't tell much about it here.
6911 \begin_inset space ~
6917 Just remember that tables should be left-aligned.
6918 For that, select the table and change the alignment in
6920 Edit\SpecialChar \menuseparator
6922 \begin_inset space ~
6928 \begin_layout Standard
6929 There is only one special thing: the figures with caption besides the figure.
6930 To create such a figure, you have to do the following:
6933 \begin_layout Enumerate
6934 Create a wide figure float:
6936 Insert\SpecialChar \menuseparator
6937 Float\SpecialChar \menuseparator
6940 , then right click in the figure and select
6946 \begin_inset space ~
6954 \begin_layout Enumerate
6955 Enter your caption text.
6958 \begin_layout Enumerate
6963 to move the cursor above the caption.
6966 \begin_layout Enumerate
6970 \begin_layout Enumerate
6971 Position the cursor behind the figure and insert a horizontal fill:
6973 Insert\SpecialChar \menuseparator
6975 \begin_inset space ~
6978 Character\SpecialChar \menuseparator
6980 \begin_inset space ~
6988 \begin_layout Enumerate
6989 Switch to LaTeX mode:
6992 \begin_inset space ~
7000 \begin_layout Enumerate
7010 Do not close the brace!
7013 \begin_layout Enumerate
7014 Position the cursor behind the caption text, switch to LaTeX mode and insert
7018 \begin_inset space ~
7030 \begin_layout Standard
7031 Also, refer to the figures in the example paper.
7034 \begin_layout Subsection
7038 \begin_layout Standard
7039 For submission, the paper has to be formated in a special double-spacing
7041 For this purpose, you have to give the option
7045 to the documentclass.
7046 This must be done using the extra class options field in the
7048 Document\SpecialChar \menuseparator
7052 Just enter the string
7059 \begin_layout Subsection
7063 \begin_layout Standard
7068 directory contains an example paper written with LyX.
7069 It is the example paper from the original macro package, translated to
7071 Use it for inspiration, and compare the original LaTeX code with LyX way
7075 \begin_layout Section
7079 \begin_layout Standard
7085 \begin_layout Subsection
7089 \begin_layout Standard
7090 AASTeX is a set of macros produced by the American Astronomical Society
7091 to facilitate electronic manuscript submission to the three journals they
7092 publish: the Astrophysical Journal (including the Letters and Supplement),
7093 the Astronomical Journal, and the Publications of the Astronomical Society
7095 LyX has proven to be an excellent tool for generating these documents,
7096 especially given its equation, citation, and figure handling capabilities.
7097 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7098 is the version described here, or higher.
7099 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7100 incompatible with LyX.
7101 The AASTeX package may be downloaded from the AASTeX Web site
7104 \begin_layout Standard
7105 \begin_inset VSpace medskip
7111 \begin_layout Standard
7113 \begin_inset Flex URL
7116 \begin_layout Plain Layout
7118 http://www.journals.uchicago.edu/AAS/AASTeX
7126 \begin_layout Standard
7127 \begin_inset VSpace medskip
7133 \begin_layout Standard
7134 A complete user guide is contained in that package and you should familiarize
7135 yourself with it thoroughly before embarking on writing a paper in LyX.
7136 LyX will not reduce the need to figure out all the AASTeX commands, it
7137 will only reduce the drudgery of typing everything in.
7138 It is your responsibility to ensure that the final exported LaTeX document
7139 conforms completely to the requirements of the journal to which you are
7140 submitting your paper.
7143 \begin_layout Subsection
7144 Starting a New Paper
7147 \begin_layout Standard
7148 I strongly suggest that you start with the AASTeX template file.
7151 File\SpecialChar \menuseparator
7158 , enter the new file name, then choose the
7163 This will show the most common fields found in a manuscript.
7164 Simply overwrite the existing text (including the brackets,
7168 ) with the correct information.
7169 Many of the AASTeX commands and environments can be implemented directly
7170 in LyX, but some cannot: most noticeably
7182 , which should stick out like a sore thumb if you actually just opened the
7184 For commands such as these, the LaTeX code must be entered directly and
7186 Such commands are referred to as TeX code, or Evil Red Text.
7187 I tried to minimize the amount of TeX code needed in an AASTeX document,
7188 but there is still a bit more required than any of us would like.
7191 \begin_layout Subsection
7192 Finishing Your Paper
7195 \begin_layout Standard
7196 When the paper is finished to your satisfaction and previews/prints correctly,
7198 \begin_inset Quotes eld
7202 \begin_inset Quotes erd
7205 actions which need to be done before you submit it to the journals.
7209 \begin_layout Enumerate
7210 Export your paper as a LaTeX file (
7212 File\SpecialChar \menuseparator
7213 Export\SpecialChar \menuseparator
7220 \begin_layout Enumerate
7225 file with your favorite text editor
7229 \begin_layout Enumerate
7230 remove the comment lines before the
7239 \begin_layout Enumerate
7244 usepackage...{fontenc}
7246 line if it appears (usually just after
7261 \begin_layout Enumerate
7262 remove everything between (and including) the
7274 commands, except for any commands you specifically put into the LaTeX preamble
7275 (which should appear immediately after the
7276 \begin_inset Quotes eld
7279 User specified LaTeX commands
7280 \begin_inset Quotes erd
7291 \begin_layout Enumerate
7292 Run the resulting file through LaTeX to make sure it still processes correctly.
7295 \begin_layout Enumerate
7296 Reread the journal requirements to make sure your filenames and formats
7300 \begin_layout Enumerate
7304 \begin_layout Subsection
7305 Comments On Specific Commands
7308 \begin_layout Standard
7309 I will not describe the detailed usage of the individual AASTeX commands:
7310 the AASTeX User Guide (
7314 ) gives a good description of each.
7315 Thus it's probably easiest for me to go down the list as found in the guide
7316 and offer comments where necessary.
7317 So let's begin \SpecialChar \ldots{}
7321 \begin_layout Subsubsection
7322 Things that work as expected
7325 \begin_layout Standard
7329 \begin_layout Plain Layout
7341 \begin_layout Standard
7342 Because they work as you might expect, I simply list them and the section
7443 begin{thebibliography}
7451 (2.13.2), all the cite commands and their variations (2.13.2), the generic
7452 graphicx figure commands (2.14.1),
7476 (2.15.4, amongst other places),
7503 \begin_layout Standard
7504 The following style options also work correctly:
7525 Simply put them in the
7531 Layout\SpecialChar \menuseparator
7537 \begin_layout Standard
7541 \begin_layout Plain Layout
7553 \begin_layout Subsubsection
7554 Things that work, but require more comment
7557 \begin_layout Standard
7558 The following items work, but require a little more discussion:
7561 \begin_layout Itemize
7562 These items are reserved for use by the journal editors, but you can put
7563 them into the LaTeX preamble if you feel compelled to do so:
7596 \begin_layout Itemize
7597 These items may be placed in the LaTeX preamble, and are included as blanks
7598 in the template file:
7619 \begin_layout Itemize
7626 (2.3) – can only be used
7627 \begin_inset Quotes eld
7631 \begin_inset Quotes erd
7634 , not in the middle of a paragraph.
7635 Use TeX code if you need to embed it.
7638 \begin_layout Itemize
7645 (2.3) – will have extra {} after it.
7646 This should not cause an error.
7649 \begin_layout Itemize
7656 (2.6) – can only be used
7657 \begin_inset Quotes eld
7661 \begin_inset Quotes erd
7664 , not in the middle of a paragraph.
7665 Use TeX code if you need to embed it.
7668 \begin_layout Itemize
7675 (2.8) – can't insert a cross-reference tag, you must type the tag name by
7679 \begin_layout Itemize
7693 \begin_layout Itemize
7700 (2.9) – will have extra {} after it.
7701 This should not cause an error.
7704 \begin_layout Itemize
7711 (2.11) – will have extra {} after it.
7712 This should not cause an error.
7715 \begin_layout Itemize
7722 (2.14.2) – you can insert an optional filename argument by placing the cursor
7723 at the beginning of the text and selecting
7725 Insert\SpecialChar \menuseparator
7730 \begin_inset Quotes eld
7734 \begin_inset Quotes erd
7737 inserts an optional argument of the type needed by
7744 Hopefully it will be renamed someday.
7747 \begin_layout Itemize
7760 for the catalog ID optional parameter
7763 \begin_layout Itemize
7776 for the catalog ID optional parameter
7779 \begin_layout Subsubsection
7780 Things not implemented, use TeX code
7783 \begin_layout Standard
7787 \begin_layout Plain Layout
7799 \begin_layout Standard
7822 setcounter{equation}
7824 (2.12), Journal name abbreviations (2.13.4),
7860 (2.15.4, insert it as the first element in the lefthand cell after where
7862 Don't use any of LyX's rules in the table),
7874 (2.15.5), much of Misc (2.17, except
7925 \begin_layout Standard
7929 \begin_layout Plain Layout
7941 \begin_layout Subsubsection
7942 Things that cannot be implemented
7945 \begin_layout Standard
7946 \SpecialChar \ldots{}
7947 at least in any meaningful sort of way, so I suggest ignoring them.
7948 They are the references environment (2.13.3), and the deluxetable environment
7950 If you really, really need to use deluxetable, I suggest editing it in
7951 a separate file with a text editor, then using
7953 Insert\SpecialChar \menuseparator
7955 \begin_inset space ~
7960 to include it in your LyX document.
7965 file to see an example of this.
7968 \begin_layout Subsection
7969 FAQs, Tips, Tricks, and Other Ruminations
7972 \begin_layout Subsubsection
7973 Getting LyX and AASTeX to cooperate
7976 \begin_layout Standard
7977 It can be a bit tricky to get LyX to recognize a new layout and document
7979 When all else fails, do this:
7982 \begin_layout Enumerate
7983 Make certain that LaTeX can find AASTeX.
7984 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
7985 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
7992 \begin_layout Enumerate
8004 \begin_layout Enumerate
8007 Tools\SpecialChar \menuseparator
8010 in LyX, then restart LyX.
8013 \begin_layout Enumerate
8014 Open a regular new file, not from a template.
8015 Does AASTeX appear in the class list in
8017 Document\SpecialChar \menuseparator
8023 \begin_layout Standard
8024 If you get a warning from an existing AASTeX document about not being able
8025 to find the AASTeX layout or a message about
8026 \begin_inset Quotes eld
8029 You should not mix title layouts with normal ones
8030 \begin_inset Quotes erd
8033 , things haven't been installed correctly.
8036 \begin_layout Subsubsection
8037 LaTeX error processing a table
8040 \begin_layout Standard
8041 LyX, by default, attempts to center the table caption/title.
8042 This seems to produce a bad interaction in AASTeX so you should click somewhere
8043 in the caption/title, then select
8045 Edit\SpecialChar \menuseparator
8047 \begin_inset space ~
8061 This took care of it for me.
8064 \begin_layout Subsubsection
8068 \begin_layout Standard
8069 A couple of things: 1) I have noticed some funny spacing in the reference
8070 entries in the text.
8071 When you enter the bibliography item data, make sure their is
8075 space between the last author and the parenthesis setting off the year;
8079 \begin_inset space \thinspace{}
8083 \begin_inset space \space{}
8097 2) Entering the references at all is not obvious.
8098 The easiest thing is to start typing your first reference at the end of
8099 the document, then mark it as type
8104 That will put a small gray box in front of what you just typed.
8105 Click on the box to fill in the rest of the information.
8106 For new references, go to the end of an existing reference and press return.
8107 That will create a new line with its own box, etc.
8110 \begin_layout Subsubsection
8114 \begin_layout Standard
8115 Even though AASTeX provides its own figure commands (
8121 , for example), I much prefer LaTeX's standard figure commands (with the
8130 \begin_inset space ~
8133 commands as TeX code into a Figure Float box if you desire, but I never
8134 have much luck getting the layout right.
8135 With the standard graphics, LyX will insert a
8139 usepackage{graphicx}
8141 command into the LaTeX preamble and handle the figures in the standard
8142 LaTeX2e way, interspersing the figures in the text.
8143 I believe ApJ accepts figures exactly this way now; AJ might still use
8145 \begin_inset Quotes eld
8148 stack everything at the end
8149 \begin_inset Quotes erd
8155 \begin_layout Subsubsection
8156 Things I could have done, but didn't
8159 \begin_layout Standard
8161 \begin_inset Quotes eld
8165 \begin_inset Quotes erd
8168 things I could have implemented, but chose not to.
8169 For instance, I saw no point in double-spacing the text in the LyX window,
8170 even though it is double-spaced in the paper manuscript.
8171 Also, I chose not to make separate layouts for the preprint and preprint2
8173 Since I assume you will spend most of your time in the plain manuscript
8174 mode anyway, I decided not to chew up more disk space with this.
8178 \begin_layout Subsection
8182 \begin_layout Standard
8183 Your mileage may vary.
8184 I've now had papers published by both ApJ and AJ that have had 98% of the
8185 effort done in LyX; the last 2% was the LaTeX post-processing and a few
8187 I have had no trouble with the submission process, and I'm sure the journals
8188 were never aware that there might be a difference.
8189 So, go forth and publish!
8192 \begin_layout Section
8196 \begin_layout Standard
8199 David Johnson; updated by Richard Heck
8202 \begin_layout Standard
8203 \begin_inset VSpace bigskip
8209 \begin_layout Standard
8211 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8212 papers to be submitted to American Mathematical Society publications.
8213 The layouts are not tailored to a specific journal, but easily can be.
8214 You should refer to the AMS documentation for specific instructions for
8215 each journal (usually it will entail only changing a single line in the
8217 That documentation is available on the Web at
8218 \begin_inset Flex URL
8221 \begin_layout Plain Layout
8229 \begin_inset Flex URL
8232 \begin_layout Plain Layout
8234 ftp://ftp.ams.org/pub/tex/amslatex/
8240 These layouts are appropriate, and useful, for any mathematical writing.
8244 \begin_layout Standard
8245 There are two basic AMS LaTeX layouts:
8248 \begin_layout Itemize
8249 amsart: The standard AMS article format.
8252 \begin_layout Itemize
8253 amsbook: the standard AMS book (really, monograph) format.
8257 \begin_layout Standard
8258 The layouts themselves contain only the minimum necessary to use the AMS
8260 They do not, in particular, contain any of the `theorem' environments used
8261 for setting theorems, lemmas, and the like.
8262 These are contained, instead, in the
8263 \begin_inset Flex CharStyle:Code
8266 \begin_layout Plain Layout
8272 module, which is loaded by default when when you select one of the AMS
8274 (It can also be used with other classes and can be removed, if you would
8275 rather use something else.) Less commonly used environments are in the
8276 \begin_inset Flex CharStyle:Code
8279 \begin_layout Plain Layout
8280 Theorems (AMS-Extended)
8285 module, which must be loaded manually.
8288 \begin_layout Standard
8289 By default, theorems and the like are numbered consecutively throughout
8290 the document, but this may be modified by loading the module
8291 \begin_inset Flex CharStyle:Code
8294 \begin_layout Plain Layout
8295 Theorems (Order by Section)
8300 or, if you are using
8301 \begin_inset Flex CharStyle:Code
8304 \begin_layout Plain Layout
8311 \begin_inset Flex CharStyle:Code
8314 \begin_layout Plain Layout
8315 Theorems (Order by Chapter)
8321 These will number the results as
8322 \begin_inset Formula $n.m$
8325 , where the first number refers to the section (or chapter) and the second
8326 refers to the total number of results so far in that section (or chapter).
8327 Many environments are also available unnumbered.
8328 These are indicated by an asterisk at the end.
8329 If you happen to want
8333 unnumbered results, the the module
8334 \begin_inset Flex CharStyle:Code
8337 \begin_layout Plain Layout
8343 provides that option.
8346 \begin_layout Standard
8347 Note that these modules do not
8351 to be used with the AMS classes.
8352 It is perfectly possible to use the
8353 \begin_inset Flex CharStyle:Code
8356 \begin_layout Plain Layout
8362 module, and the others mentioned, with other classes, such as
8363 \begin_inset Flex CharStyle:Code
8366 \begin_layout Plain Layout
8373 \begin_inset Flex CharStyle:Code
8376 \begin_layout Plain Layout
8383 \begin_inset Flex CharStyle:Code
8386 \begin_layout Plain Layout
8395 \begin_layout Subsection
8396 What these layouts provide
8399 \begin_layout Standard
8400 There is a long list of included environments provided by these layouts.
8401 In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
8402 variety of `theorem' environments.
8403 However, the AMS recommends the environments that are available in LyX.
8407 \begin_layout Standard
8408 The following environments—as well as the standard environments, such as
8410 \begin_inset Flex CharStyle:Noun
8413 \begin_layout Plain Layout
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:Code
8463 \begin_layout Plain Layout
8470 \begin_inset Flex CharStyle:Code
8473 \begin_layout Plain Layout
8482 \begin_layout Description
8483 Address This should be the author's permanent address.
8486 \begin_layout Description
8488 \begin_inset space ~
8491 Address This should be the author's temporary address at the time of submission,
8492 if different from the Address.
8495 \begin_layout Description
8496 Email Author's e-mail address
8499 \begin_layout Description
8500 URL Author's Web address, if desired.
8503 \begin_layout Description
8504 Keywords Key words or phrases used to identify specific topics discussed
8508 \begin_layout Description
8509 Subjectclass These refer to the AMS Subject Classifications, published and
8512 Mathematical Reviews
8515 These are also available online at the AMS cites listed above.
8518 \begin_layout Description
8522 \begin_layout Description
8526 \begin_layout Description
8530 \begin_layout Standard
8531 The following environments are provided by both the
8532 \begin_inset Flex CharStyle:Code
8535 \begin_layout Plain Layout
8542 \begin_inset Flex CharStyle:Code
8545 \begin_layout Plain Layout
8551 modules, in the latter case in both starred (unnumbered) and unstarred
8552 (numbered) versions.
8553 These same environments are provided only in the starred versions by the
8555 \begin_inset Flex CharStyle:Code
8558 \begin_layout Plain Layout
8567 \begin_layout Theorem
8568 This is typically used for the statements of major results.
8572 \begin_layout Corollary*
8573 This is used for statements which follow fairly directly from previous statement
8575 Again, these can be major results.
8580 These are smaller results needed to prove other statements.
8583 \begin_layout Proposition
8584 These are less major results which (hopefully) add to the general theory
8588 \begin_layout Conjecture
8589 These are statements provided without justification, which the author does
8590 not know how to prove, but which seem to be true (to the author, at least).
8593 \begin_layout Definition*
8594 Guess what this is for.
8595 The font is different for this environment than for the previous ones.
8599 \begin_layout Example*
8600 Used for examples illustrating proven results.
8603 \begin_layout Problem
8604 It's not really known what this is for.
8605 You should figure it out.
8608 \begin_layout Exercise*
8609 Write a description for this one.
8612 \begin_layout Remark
8613 This environment is also a type of theorem, usually a lesser sort of observation.
8616 \begin_layout Claim*
8617 Often used in the course of giving a proof of a larger result.
8621 Generally, these are used to break up long arguments, using specific instances
8627 The numbering scheme for cases is on its own, not together with other numbered
8633 At the end of this environment, a QED symbol (usually a square, but it can
8634 vary with different styles) is placed.
8635 If you want to have other environments within this one—for example, Case
8636 environments—and have the QED symbol appear only after them, then the other
8637 environments need to be nested within the proof environment.
8640 Nesting Environments
8646 for information on nesting.
8649 \begin_layout Standard
8650 And these environments are provided by
8651 \begin_inset Flex CharStyle:Code
8654 \begin_layout Plain Layout
8655 Theorems (AMS-Extended)
8663 \begin_layout Criterion*
8664 A required condition.
8667 \begin_layout Algorithm*
8668 A general procedure to be used.
8671 \begin_layout Axiom*
8672 This is a property or statement taken as true within the system being discussed.
8675 \begin_layout Condition*
8676 Sometimes used to state a condition assumed within the present context of
8681 Similar to a Remark.
8684 \begin_layout Notation*
8685 Used for the explanation of, yes, notation.
8688 \begin_layout Summary
8689 Do we really need to tell you?
8692 \begin_layout Acknowledgement*
8696 \begin_layout Conclusion*
8697 Sometimes used at the end of a long train of argument.
8701 Used in a way similar to Proposition, though perhaps lower on the scale.
8704 \begin_layout Standard
8705 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
8707 They need to be available on your system in order to use these environments.
8710 \begin_layout Section
8718 \begin_layout Standard
8724 \begin_layout Subsection
8728 \begin_layout Standard
8729 These are the layout files for some of the journals of the American Geophysical
8731 It is assumed that you have both the AGU's own class files and AGUplus
8732 installed (everything to be found at
8733 \begin_inset Flex URL
8736 \begin_layout Plain Layout
8738 ftp://ftp.agu.org/journals/latex/journals
8746 \begin_layout Subsection
8750 \begin_layout Standard
8760 They are still called this in the LyX GUI, though their LaTeX equivalents
8761 in the AGU classes are
8772 \begin_layout Standard
8773 Newly defined styles are
8810 These are mostly manuscript attributes and defined in the AGU class documentati
8814 \begin_layout Standard
8815 I suspect this is still badly incomplete.
8818 \begin_layout Subsection
8822 \begin_layout Standard
8839 \begin_layout Subsection
8843 \begin_layout Itemize
8846 Journal of Geophysical Research
8855 \begin_layout Standard
8856 Add your own, it isn't so hard! Look at the
8867 \begin_layout Subsection
8868 Bugs and things to remember
8871 \begin_layout Standard
8872 In order to use the new layouts, you must remember to do the following for
8876 \begin_layout Enumerate
8882 This can be done in the
8884 Layout\SpecialChar \menuseparator
8889 Document\SpecialChar \menuseparator
8893 (AGU articles are always in English, right? So
8900 \begin_layout Enumerate
8910 (Yes, this is a bug.)
8913 \begin_layout Enumerate
8914 Make sure you use the
8918 bibliography style, by entering
8922 into the second field of the BibTeX inset.
8923 None of the standard styles will do.
8926 \begin_layout Section
8930 \begin_layout Standard
8936 \begin_layout Subsection
8940 \begin_layout Standard
8941 Broadway is for writing plays.
8942 The format is more decorative than Hollywood, and much less standardized.
8943 This format should be suitable for workshops.
8946 \begin_layout Subsection
8950 \begin_layout Standard
8951 The same as in Hollywood.
8954 \begin_layout Subsection
8958 \begin_layout Standard
8963 names as labels then cross-reference the label to insert the name.
8964 The cross-reference dialog will show the current cast of characters.
8967 \begin_layout Subsection
8968 Paper size and Margins
8971 \begin_layout Standard
8972 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
8975 \begin_layout Subsection
8979 \begin_layout Standard
8980 The following environments are available.
8981 You can use broadway.bind to get the bind keys shown at the right.
8984 \begin_layout Itemize
8988 \begin_inset Newline newline
8993 You should not have to use this, but it is here for anything that does not
8997 \begin_layout Itemize
9001 \begin_inset space \hfill{}
9005 \begin_inset Newline newline
9010 Used to describe stage setting and the action.
9011 First use of speaker names in all CAPs.
9014 \begin_layout Itemize
9018 \begin_inset space \hfill{}
9022 \begin_inset Newline newline
9027 Automatically numbered.
9028 On screen it will be arabic, but will print as Roman.
9031 \begin_layout Itemize
9035 \begin_inset space \hfill{}
9039 \begin_inset Newline newline
9049 It is just centered text.
9052 \begin_layout Itemize
9056 \begin_inset space \hfill{}
9060 \begin_inset Newline newline
9065 Not automatically numbered.
9066 You supply the number.
9067 This is because I couldn't figure out how.
9070 \begin_layout Itemize
9074 \begin_inset space \hfill{}
9078 \begin_inset Newline newline
9083 A special case of Narrative to describe the setting and action as the curtain
9087 \begin_layout Itemize
9091 \begin_inset space \hfill{}
9095 \begin_inset Newline newline
9100 The speaker's (actor's) title, centered in all CAPS.
9103 \begin_layout Itemize
9107 \begin_inset space \hfill{}
9111 \begin_inset Newline newline
9116 Instructions to the speaker.
9117 The parentheses are automatically inserted.
9118 The ( will appear on screen, but both will be in the printed play.
9119 This environment is only used within
9126 \begin_layout Itemize
9130 \begin_inset space \hfill{}
9134 \begin_inset Newline newline
9139 What the Speaker says.
9142 \begin_layout Itemize
9146 \begin_inset space \hfill{}
9150 \begin_inset Newline newline
9155 The curtain comes down.
9158 \begin_layout Itemize
9162 \begin_inset space \hfill{}
9168 \begin_layout Itemize
9172 \begin_inset space \hfill{}
9178 \begin_layout Itemize
9182 \begin_inset space \hfill{}
9188 \begin_layout Standard
9192 \begin_layout Section
9196 \begin_layout Standard
9201 can be used to type letters according to German conventions.
9202 A template file is included in
9204 .../lyx/share/templates
9206 for you to use as a starting point.
9209 \begin_layout Section
9217 \begin_layout Standard
9223 \begin_layout Subsection
9227 \begin_layout Standard
9228 This is the layout file for the European Geophysical Society journals.
9233 can be downloaded from the web site of the EGS under
9234 \begin_inset Flex URL
9237 \begin_layout Plain Layout
9247 \begin_layout Subsection
9251 \begin_layout Standard
9254 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9262 The current layout file is unfortunately very unmodular and would benefit
9263 from using the various
9270 \begin_layout Section
9274 \begin_layout Standard
9280 \begin_layout Standard
9281 Elsevier Science Publishers B.V.
9282 provides a standard LaTeX document class (
9286 ) for submitting articles to their various journals.
9287 The style file can be downloaded directly from their web site:
9288 \begin_inset Flex URL
9291 \begin_layout Plain Layout
9293 http://authors.elsevier.com/
9299 Instructions are supplied along with the class file, which details the
9300 requirements of the publishers.
9301 LyX includes package that allows for the use of this class, by a layout
9302 and a template file.
9303 Installation of the class file is the same as for any other LaTeX package;
9304 instructions are provided in the Elsevier documentation.
9307 \begin_layout Standard
9317 As the Elsevier class file is based mainly on the standard article class,
9318 most of the normal functionality is provided.
9319 The Elsevier class defines a number of mathematical environments, which
9320 are similar to the AMS environments.
9321 These commands are all described in the Elsevier documentation, and are
9325 \begin_layout Standard
9326 The easiest way to use the Elsevier style is to base documents on the included
9328 It is best not to use options such as fancy headings or the geometry package,
9329 as elements such as these are defined by Elsevier in their style file.
9330 Ideally, no extra packages except those mentioned in the Elsevier documentation
9332 Essentially, Elsevier require as
9333 \begin_inset Quotes eld
9337 \begin_inset Quotes erd
9340 a LaTeX file as possible, as their intention is to take the supplied file
9341 and replace the class file with one for the particular journal to which
9342 the paper has been submitted.
9343 This also means that not too much time should be spent on the formating
9345 When it comes to be published, this will change anyway.
9346 The rest of the usage for this layout is substantially the same as for
9347 the normal article class.
9348 For details of what Elsevier do and don't allow, refer to their documentation.
9351 \begin_layout Section
9357 \begin_inset CommandInset label
9366 \begin_layout Standard
9372 \begin_layout Subsection
9376 \begin_layout Standard
9377 This section describes how to use LyX to make slides for overhead projectors.
9378 There are two document classes that can do this: the default slides class
9384 This section documents the latter.
9387 \begin_layout Standard
9388 I'm going to say this again, nice and clear, so that there's no misunderstanding
9392 \begin_layout Standard
9393 \begin_inset VSpace bigskip
9399 \begin_layout Standard
9403 This section documents the class
9404 \begin_inset Quotes eld
9412 \begin_inset Quotes erd
9420 \begin_layout Standard
9421 \begin_inset VSpace bigskip
9427 \begin_layout Standard
9428 If you're looking for the documentation for
9429 \begin_inset Quotes eld
9437 \begin_inset Quotes erd
9441 \begin_inset space ~
9445 \begin_inset CommandInset ref
9447 reference "sec:slitex"
9452 If your machine doesn't have the
9457 \begin_inset Quotes eld
9465 \begin_inset Quotes erd
9468 ] installed, you'll probably have to use the default
9472 class, which isn't quite as good as
9477 \begin_layout Standard
9482 class is designed for use with version 2.1 of the
9486 LaTeX class file which is now an integral part of LaTeX2e.
9489 \begin_layout Subsection
9493 \begin_layout Standard
9494 Obviously, to use this document class, you need to select
9495 \begin_inset Quotes eld
9503 \begin_inset Quotes erd
9513 \begin_inset space ~
9519 There are some settings in the
9522 \begin_inset space ~
9527 dialog that you should know about that are specific to this class:
9530 \begin_layout Itemize
9531 Don't change the options
9542 \begin_inset space ~
9548 They're ignored by the
9555 \begin_layout Itemize
9556 The default font size is 20
9557 \begin_inset space \thinspace{}
9560 pt with the other options being 17
9561 \begin_inset space \thinspace{}
9565 \begin_inset space \thinspace{}
9569 \begin_inset space \thinspace{}
9575 \begin_layout Itemize
9584 but all math equations are still typeset in the usual roman font.
9587 \begin_layout Itemize
9592 supports A4 and Letter paper sizes as well as a special size for working
9594 \begin_inset space \thinspace{}
9598 It doesn't support A5, B5, legal or executive paper sizes.
9601 \begin_layout Itemize
9602 Don't bother changing the
9606 settings because they are ignored anyway.
9607 All floats appear where they are defined in the text.
9610 \begin_layout Itemize
9615 setting behaves a bit differently for this class.
9620 provides extensive footer and header capabilities including a user-defined
9623 \begin_inset space ~
9627 \begin_inset CommandInset ref
9629 reference "sec:foilfoot"
9634 The title page is treated differently to all other pages in the document
9643 has the logo centered at the bottom of the page (if one is defined).
9644 The possible page style choices and what they do are as follows:
9648 \begin_layout Labeling
9649 \labelwidthstring MMMMMMM
9656 The final output contains no page numbers, or other headers or footers
9657 (except footnotes of course).
9661 \begin_layout Labeling
9662 \labelwidthstring MMMMMMM
9669 The final output contains page numbers centered at the bottom of the page.
9670 No other headings or footers (other than footnotes).
9673 \begin_layout Labeling
9674 \labelwidthstring MMMMMMM
9679 Page numbers in lower right corner.
9680 Additional headers and footers are also shown.
9681 This is also the default.
9684 \begin_layout Labeling
9685 \labelwidthstring MMMMMMM
9690 Gives you access to the
9694 package although its use with
9698 is discouraged by the writer of the
9702 package because of some potential page layout clashes.
9706 \begin_layout Subsubsection
9710 \begin_layout Standard
9711 The following options may be used in the extra class options in the
9713 Document\SpecialChar \menuseparator
9719 \begin_layout Labeling
9720 \labelwidthstring MMMMMMx
9725 This sets up the page layout for 7.33
9726 \begin_inset space \thinspace{}
9730 \begin_inset space \thinspace{}
9733 in paper, which is about the same aspect ratio as a 35
9734 \begin_inset space \thinspace{}
9737 mm slide, making it a bit easier to work with this medium.
9740 \begin_layout Labeling
9741 \labelwidthstring MMMMMMx
9746 Places a rule across the page below the header on every page except the
9750 \begin_layout Labeling
9751 \labelwidthstring MMMMMMx
9756 Places a rule across the page above the footer on every page except the
9760 \begin_layout Labeling
9761 \labelwidthstring MMMMMMx
9766 This is automatically set each time you create a new
9775 to use the dvips driver to rotate those pages that are set as landscape
9779 \begin_layout Labeling
9780 \labelwidthstring MMMMMMx
9785 Simply changes the page dimensions to those of a landscape page but doesn't
9787 Thus if you use this option you need to use an external program to rotate
9788 each page or feed your paper through your printer as landscape.
9789 Note that this option effectively reverses the roles of the
9797 environments (don't worry these are described in the next section).
9800 \begin_layout Labeling
9801 \labelwidthstring MMMMMMx
9806 Equation numbers on the left.
9809 \begin_layout Labeling
9810 \labelwidthstring MMMMMMx
9815 Flush-left equations.
9818 \begin_layout Subsection
9819 Supported Environments
9822 \begin_layout Standard
9823 Most of the environments commonly supported in other classes are also supported
9829 There are several additional environments provided by
9833 as well as a couple added by LyX.
9834 The following environments are shared with other classes:
9837 \begin_layout Standard
9841 \begin_layout Plain Layout
9853 \begin_layout Itemize
9859 \begin_layout Itemize
9865 \begin_layout Itemize
9871 \begin_layout Itemize
9877 \begin_layout Itemize
9883 \begin_layout Itemize
9889 \begin_layout Itemize
9895 \begin_layout Itemize
9901 \begin_layout Itemize
9907 \begin_layout Itemize
9913 \begin_layout Itemize
9919 \begin_layout Itemize
9925 \begin_layout Itemize
9931 \begin_layout Itemize
9937 \begin_layout Itemize
9943 \begin_layout Itemize
9949 \begin_layout Itemize
9955 \begin_layout Itemize
9961 \begin_layout Standard
9965 \begin_layout Plain Layout
9977 \begin_layout Standard
9978 That is, all the major environments apart from the sectioning environments.
9979 Since foils are essentially self-contained sections, with a title and body,
9984 provides specific commands for starting new foils and these are:
9987 \begin_layout Itemize
9993 \begin_layout Itemize
9999 \begin_layout Standard
10000 LyX also provides slightly modified versions of these two environments called:
10003 \begin_layout Itemize
10009 \begin_layout Itemize
10012 ShortRotatefoilhead
10015 \begin_layout Standard
10016 and the differences will be explained in the next section.
10019 \begin_layout Standard
10020 Since foils are often used in presenting ideas or new theorems and such
10025 also provides a comprehensive box of goodies for presenting them:
10028 \begin_layout Standard
10032 \begin_layout Plain Layout
10036 begin{multicols}{2}
10044 \begin_layout Itemize
10050 \begin_layout Itemize
10056 \begin_layout Itemize
10062 \begin_layout Itemize
10068 \begin_layout Itemize
10074 \begin_layout Itemize
10080 \begin_layout Itemize
10086 \begin_layout Itemize
10092 \begin_layout Itemize
10098 \begin_layout Itemize
10104 \begin_layout Itemize
10110 \begin_layout Standard
10114 \begin_layout Plain Layout
10126 \begin_layout Standard
10127 The starred versions are unnumbered while the unstarred versions are numbered.
10128 There are also two list environments added by LyX and these are:
10131 \begin_layout Itemize
10137 \begin_layout Itemize
10143 \begin_layout Standard
10148 provides some powerful header and footer capabilities that are best set
10149 in the preamble although they may be set at any point in a document.
10150 If you want to change these settings in your document the best place to
10151 do so is at the very top of a foil, i.
10152 \begin_inset space \thinspace{}
10158 \begin_inset space \space{}
10163 straight after the foilhead.
10166 \begin_layout Standard
10167 For this purpose, the following command styles are provided [
10174 \begin_layout Standard
10178 \begin_layout Plain Layout
10182 begin{multicols}{2}
10190 \begin_layout Itemize
10194 \begin_inset space ~
10200 \begin_layout Itemize
10206 \begin_layout Itemize
10210 \begin_inset space ~
10216 \begin_layout Itemize
10220 \begin_inset space ~
10226 \begin_layout Itemize
10230 \begin_inset space ~
10237 \begin_layout Standard
10238 \begin_inset space ~
10245 \begin_layout Standard
10249 \begin_layout Plain Layout
10261 \begin_layout Standard
10262 There are also a few commands provided by
10266 that aren't directly supported by LyX but I'll tell you what they do and
10267 how to use them in section
10268 \begin_inset space ~
10272 \begin_inset CommandInset ref
10274 reference "sec:unsuppfoils"
10281 \begin_layout Subsection
10282 Building a Set of Foils
10285 \begin_layout Standard
10286 This section will give a simple introduction to using the different environments
10287 to build a set of foils.
10288 If you want to see an example set of foils, take a look at the
10292 file you find in LyX's
10299 \begin_layout Subsubsection
10300 Give It a Title Page
10303 \begin_layout Standard
10304 Unlike other classes that provide
10324 creates the title on a page of its own.
10325 If you leave out the
10329 environment LaTeX will substitute the current date (every time you regenerate
10333 \begin_layout Subsubsection
10337 \begin_layout Standard
10338 As I mentioned earlier, there are four ways of starting a new foil.
10339 For portrait foils you should use
10348 The difference between these two environments is the amount of space between
10349 the title of the foil (the foilhead) and the body of the foil.
10352 \begin_layout Standard
10353 Landscape foils are generated using the
10359 ShortRotatefoilhead
10362 Again the only difference is the spacing between foilhead and body.
10363 Both of the short versions have 0.5 inches less separation between the foilhead
10368 \begin_layout Standard
10369 One problem with the support for landscape foils is the requirement that
10370 you have to use the
10374 driver to generate the PostScript output otherwise the foils won't be rotated.
10375 It is possible to get landscape foils even if you haven't got the
10379 driver provided you can feed your foils sideways through your printer ;-)
10382 \begin_layout Subsubsection
10383 Theorems, Lemmas, Proofs and more
10386 \begin_layout Standard
10387 Due to a small bug in LyX you can't have two of the same type of these environme
10388 nts directly following each other.
10389 They must be separated by something.
10390 If you try, you will just be extending the previous environment as if you
10391 had merged the two environments together.
10392 So, how do you get around this problem? The simplest option is to insert
10393 some text between the two environments or add a
10397 environment between the two with just a
10398 \begin_inset Quotes eld
10406 \begin_inset Quotes erd
10410 This will force LyX to produce two separate environments and hence the
10411 correct LaTeX output.
10412 An example is provided in the example file included with the LyX distribution.
10413 Remember, this problem only occurs if you are trying to place two of the
10414 same type of theorem-like environments one directly after the other.
10417 \begin_layout Subsubsection
10421 \begin_layout Standard
10422 You get all the commonly supported list styles found in other classes as
10423 well as two new ones.
10424 I'll only describe the new ones here.
10425 If you want to find out more about the other list environments check out
10431 If you intend to use itemized lists you might also want to read about the
10435 \begin_inset space ~
10439 \begin_inset space ~
10444 dialog described above in section
10445 \begin_inset space ~
10449 \begin_inset CommandInset ref
10451 reference "sec:bullet"
10458 \begin_layout Standard
10459 The two new list styles,
10467 , are designed to make it easier for you to create lists of do's and don'ts
10468 or right and wrong by providing dedicated environments that use a tick
10469 or a cross as the label of the list.
10470 These lists are in fact dedicated variants of the
10475 They do however require that you have the
10479 packages installed.
10482 \begin_layout Subsubsection
10486 \begin_layout Standard
10491 redefines the floating tables and figures so that they appear exactly where
10492 they are in the text rather than pushing them to the top of the page or
10493 to some user specified location.
10494 In fact if you change the float placement settings they are simply ignored.
10497 \begin_layout Subsubsection
10498 Page Headers and Footers
10499 \begin_inset CommandInset label
10501 name "sec:foilfoot"
10508 \begin_layout Standard
10512 \begin_inset space ~
10521 are two commands used to control the left-footer text string.
10522 The first is meant to allow you to include a graphic logo on your foils
10524 \begin_inset Quotes eld
10532 \begin_inset Quotes erd
10536 While the second is meant to provide a classification for the audience,
10540 \begin_inset space \thinspace{}
10546 \begin_inset space \space{}
10550 It is empty by default.
10553 \begin_layout Standard
10554 The remaining page corners can be filled by
10557 \begin_inset space ~
10562 (which defaults to page numbers),
10565 \begin_inset space ~
10573 \begin_inset space ~
10581 \begin_layout Subsection
10587 \begin_inset CommandInset label
10589 name "sec:unsuppfoils"
10596 \begin_layout Standard
10597 All the commands mentioned below need to be set in a
10605 within another environment.
10608 \begin_layout Subsubsection
10612 \begin_layout Standard
10613 All lengths are adjusted using the
10636 should be replaced by the name given to the length you want to change and
10641 is the length value.
10642 All lengths should be specified in units of length such as inches (
10654 ) or relative to some document or font-based length such as
10664 \begin_layout Standard
10665 It's possible to change the spacing between a foilhead and the body of the
10666 foil by adjusting the length specified by
10673 For example, to make
10678 \begin_inset space \space{}
10681 in closer to their bodies put the following in the preamble:
10687 foilheadskip}{-0.5in}
10690 \begin_layout Standard
10691 The spacings around floats can be adjusted by setting these lengths:
10694 \begin_layout Labeling
10695 \labelwidthstring MMMMMMMMMMM
10702 Separation between the text and the top of the float
10705 \begin_layout Labeling
10706 \labelwidthstring MMMMMMMMMMM
10713 Separation between the float and the caption
10716 \begin_layout Labeling
10717 \labelwidthstring MMMMMMMMMMM
10724 Separation between the caption and the following text
10727 \begin_layout Labeling
10728 \labelwidthstring MMMMMMMMMMM
10735 You can make the captions narrower than the surrounding text by adjusting
10737 Best done relative to
10746 \begin_layout Standard
10747 There are also several title page related lengths that you may find useful
10748 if you have a long title or several authors:
10751 \begin_layout Labeling
10752 \labelwidthstring MMMMMMMMMMM
10759 Separation from headers to
10764 \begin_layout Labeling
10765 \labelwidthstring MMMMMMMMMMM
10783 \begin_layout Labeling
10784 \labelwidthstring MMMMMMMMMMM
10798 \begin_layout Labeling
10799 \labelwidthstring MMMMMMMMMMM
10815 \begin_layout Labeling
10816 \labelwidthstring MMMMMMMMMMM
10832 \begin_layout Standard
10833 The last length related command affects all the list environments.
10844 a list environment then all the vertical spacing between the list items
10846 Note that this is a command not a length so it doesn't require
10852 like the stuff mentioned above.
10855 \begin_layout Subsubsection
10856 Headers and Footers
10859 \begin_layout Standard
10872 commands control whether the logo in the
10876 definition appear on a given page.
10883 in the preamble then none of the foils will have the logo on them.
10884 If you don't want the logo on a particular page place the
10890 directly after the foilhead of that page and the
10896 directly after the next foilhead.
10899 \begin_layout Standard
10900 If you decide to use the
10904 page style setting in the
10907 \begin_inset space ~
10912 dialog you should probably add
10922 to your preamble so headers and footers on landscape pages are correctly
10923 placed when rotated.
10924 This is due to some clashes between the page layouts provided by the
10935 \begin_layout Section
10936 Hollywood (Hollywood spec scripts)
10939 \begin_layout Standard
10945 \begin_layout Subsection
10949 \begin_layout Standard
10950 Getting the format of a Hollywood script right is a
10951 \begin_inset Quotes eld
10955 \begin_inset Quotes erd
10958 It is designed to make the readers focus on content and to be easy and
10959 familiar for the actors to read.
10960 Each page of a script should be one minute of film.
10961 Nothing goes in a script that you cannot see or hear on screen.
10962 The courier 12 pt font should be used throughout.
10966 \begin_layout Subsection
10970 \begin_layout Standard
10971 Speakers' lines should NEVER break in mid-sentence.
10972 If a speaker's lines continue over a page break, repeat the
10976 title followed by (Cont'd).
10979 \begin_layout Subsection
10983 \begin_layout Standard
10988 names as labels then cross-reference the label to insert the name.
10989 The cross-reference dialog will show the current cast of characters.
10990 You can use this to insert the speaker name in narratives also.
10993 \begin_layout Subsection
10994 Paper size and Margins
10997 \begin_layout Standard
10998 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11001 \begin_layout Subsection
11005 \begin_layout Standard
11006 The following environments are available.
11007 You can use hollywood.bind to get the bind keys shown at the right.
11010 \begin_layout Itemize
11014 \begin_inset Newline newline
11019 Used where nothing else works.
11023 \begin_layout Itemize
11029 \begin_inset space \hfill{}
11037 \begin_inset Newline newline
11040 Usually followed by something like
11041 \begin_inset Quotes eld
11044 on Sally waking up.
11045 \begin_inset Quotes erd
11051 \begin_layout Itemize
11055 \begin_inset space \hfill{}
11059 \begin_inset Newline newline
11064 Introduces a new INTERIOR camera set-up.
11065 Always followed by DAY or NIGHT, or something similar to define the lighting
11067 Everthing on this line in CAPS.
11070 \begin_layout Itemize
11074 \begin_inset space \hfill{}
11078 \begin_inset Newline newline
11083 Introduces a new EXTERIOR camera set-up.
11084 Everthing on this line in CAPS.
11087 \begin_layout Itemize
11091 \begin_inset space \hfill{}
11095 \begin_inset Newline newline
11100 The character speaking.
11103 \begin_layout Itemize
11107 \begin_inset space \hfill{}
11111 \begin_inset Newline newline
11116 Instructions to the speaker.
11117 The () are automatically inserted, but only the ( will show in LyX.
11118 Both will be printed.
11121 \begin_layout Itemize
11125 \begin_inset space \hfill{}
11129 \begin_inset Newline newline
11141 \begin_layout Itemize
11145 \begin_inset space \hfill{}
11149 \begin_inset Newline newline
11154 Camera movement instruction.
11156 \begin_inset space \thinspace{}
11160 \begin_inset space \space{}
11166 \begin_layout Itemize
11170 \begin_inset space \hfill{}
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 Subsection
11210 \begin_layout Itemize
11214 \begin_layout Itemize
11218 \begin_layout Itemize
11220 \begin_inset space \thinspace{}
11227 \begin_layout Itemize
11232 \begin_layout Itemize
11233 PAN — camera movement
11236 \begin_layout Itemize
11237 INSERT — cut to close-up of
11240 \begin_layout Section
11244 \begin_layout Standard
11247 Panayotis Papasotiriou
11250 \begin_layout Subsection
11254 \begin_layout Standard
11255 The ijmpc package is a set of macros that facilitates electronic manuscript
11258 International Journal of Modern Physics C
11261 Similarly, the ijmpd package is for creating manuscripts to be submitted
11264 International Journal of Modern Physics D
11267 Both journals are published by World Scientific.
11268 The corresponding document classes are named
11277 These files, together with instructions for the authors, can be downloaded
11279 \begin_inset Flex URL
11282 \begin_layout Plain Layout
11284 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11290 \begin_inset Flex URL
11293 \begin_layout Plain Layout
11295 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11301 Both packages are modified versions of the standard
11302 \begin_inset Quotes eld
11306 \begin_inset Quotes erd
11309 package, and they are almost (but not exactly) identical.
11310 Most of their features are supported by LyX.
11311 I have used LyX successfully to write articles submitted to both journals
11312 without any problem.
11315 \begin_layout Subsection
11319 \begin_layout Standard
11320 As usual, the easiest way to write a paper is to start with a template.
11323 File\SpecialChar \menuseparator
11342 This will give an (almost) empty document that includes the most common
11343 fields found in a manuscript.
11344 Simply overwrite the existing text (including the brackets,
11349 You should keep in mind the following remarks.
11352 \begin_layout Enumerate
11353 LyX won't let you change the font size and the page style of the document,
11354 because such modifications are not allowed by both packages.
11357 \begin_layout Enumerate
11358 The language of the document should not be changed.
11359 Before previewing your paper, be sure that the babel package is not used.
11360 To do this, click on
11362 Tools\SpecialChar \menuseparator
11373 checkbox in the language settings, and click on
11381 , if you wish to make this change permanent).
11384 \begin_layout Enumerate
11386 \begin_inset Quotes eld
11390 \begin_inset Quotes erd
11393 style must be used to define keywords.
11396 \begin_layout Enumerate
11397 The ijmpc package provides a style named
11398 \begin_inset Quotes eld
11401 Classification Codes
11402 \begin_inset Quotes erd
11405 , which can be used to define classification codes, such as PACS numbers.
11406 Note that this facility is not supported by the ijmpd package.
11409 \begin_layout Enumerate
11410 Several new environments are available:
11411 \begin_inset Quotes eld
11415 \begin_inset Quotes erd
11419 \begin_inset Quotes eld
11423 \begin_inset Quotes erd
11427 \begin_inset Quotes eld
11431 \begin_inset Quotes erd
11435 \begin_inset Quotes eld
11439 \begin_inset Quotes erd
11443 \begin_inset Quotes eld
11447 \begin_inset Quotes erd
11451 \begin_inset Quotes eld
11455 \begin_inset Quotes erd
11459 \begin_inset Quotes eld
11463 \begin_inset Quotes erd
11467 \begin_inset Quotes eld
11471 \begin_inset Quotes erd
11475 \begin_inset Quotes eld
11479 \begin_inset Quotes erd
11483 \begin_inset Quotes eld
11487 \begin_inset Quotes erd
11491 \begin_inset Quotes eld
11495 \begin_inset Quotes erd
11499 \begin_inset Quotes eld
11503 \begin_inset Quotes erd
11507 \begin_inset Quotes eld
11511 \begin_inset Quotes erd
11515 \begin_inset Quotes eld
11519 \begin_inset Quotes erd
11523 Their use is more or less obvious.
11524 LyX supports all these environments; it will use the proper label, text
11525 style, and numbering scheme for each of them.
11528 \begin_layout Enumerate
11529 Both packages use basic citations; the natbib package should not be used.
11530 In LyX, citation references are shown as usual; in the output, citations
11531 are shown as superscripts.
11532 If you want to use a citation as normal text, you should use the
11537 \begin_inset space \thinspace{}
11541 \begin_inset space \space{}
11545 \begin_inset Quotes eld
11549 \begin_inset space \space{}
11559 \begin_inset Quotes erd
11565 \begin_layout Enumerate
11567 \begin_inset Quotes eld
11571 \begin_inset Quotes erd
11574 section in both packages.
11575 To put acknowledgments, just use the
11576 \begin_inset Quotes eld
11580 \begin_inset Quotes erd
11586 \begin_layout Enumerate
11587 Appendices may be added to the paper,
11591 the Acknowledgments and
11596 LyX provides a special environment, called
11597 \begin_inset Quotes eld
11601 \begin_inset Quotes erd
11604 which marks the beginning of the appendices.
11605 This environment should be left blank; it just sends a LaTeX command, but
11606 nothing is really printed.
11608 \begin_inset Quotes eld
11612 \begin_inset Quotes erd
11615 is printed with blue letters, as a signal that all sections after that
11616 point are appendices.
11617 To write an appendix, use the
11618 \begin_inset Quotes eld
11622 \begin_inset Quotes erd
11626 LyX will number each appendix with capital letters, as required by both
11629 \begin_inset Quotes eld
11633 \begin_inset Quotes erd
11640 be present before the first appendix; if not, all appendices will be numbered
11641 as normal sections in the output.
11644 \begin_layout Enumerate
11645 The ijmpc and the ijmpd packages use the
11649 command to implement table captions.
11650 As a result, a table created by LyX is printed correctly, but its caption
11652 However, you can use some TeX code to overpass this problem, so that captions
11653 are printed as expected.
11654 To do so, create a float table as usual, remove the caption, and replace
11655 it with the TeX code
11665 (sic); you must also the TeX code
11669 immediately after the tabular material.
11670 Study the example table included in the template files to see how this
11671 trick is implemented.
11672 Alternatively, If you need table captions, you should implement the whole
11677 file, then include this file to the LyX document (
11679 Insert\SpecialChar \menuseparator
11680 File\SpecialChar \menuseparator
11682 \begin_inset space ~
11688 Details on how to create a table float can be found in the files
11696 , included in the corresponding packages.
11699 \begin_layout Subsection
11700 Preparing a paper for submission
11703 \begin_layout Standard
11704 Before you submit your paper you must export the LyX document as a LaTeX
11707 File\SpecialChar \menuseparator
11708 Export\SpecialChar \menuseparator
11715 \begin_layout Plain Layout
11716 Actually you have the choice between LaTeX (plain) and pdflatex.
11717 If you intend to use pdflatex to prepare the paper, you should use the
11718 pdflatex option so that included graphics are converted to PDF format,
11719 ready for use by pdflatex.
11724 , then make the following changes to the resulting
11731 \begin_layout Enumerate
11732 Remove the comment lines before the
11741 \begin_layout Enumerate
11742 Remove everything between (and including) the
11754 commands, except for any commands you specifically put into the LaTeX preamble.
11757 \begin_layout Standard
11762 file should be saved and processed through LaTeX as many times as necessary.
11763 You may also want to check the resulting
11770 \begin_layout Subsection
11774 \begin_layout Standard
11775 The use of TeX code is reduced to two commands, which must be placed at
11776 the top of the document.
11777 If you started writing your paper by using the
11785 template, the TeX code needed is already in its place; you usually don't
11787 You may only modify the first TeX code to specify the information printed
11788 to the top of odd and even pages (authors' names and short paper's title,
11790 This TeX code must have the form
11794 markboth{Authors' Names}{Short Paper's Title}
11799 \begin_layout Section
11803 \begin_layout Standard
11809 \begin_layout Subsection
11813 \begin_layout Standard
11814 The iopart package provides a document class to create electronic manuscript
11815 submission to the journals published by the Institute of Physics.
11816 Instructions for the authors how to create a paper using the iopart class
11817 can be downloaded together with the iopart package from the site
11818 \begin_inset Flex URL
11821 \begin_layout Plain Layout
11823 ftp://ftp.iop.org/pub/journals/latex2e
11831 \begin_layout Subsection
11835 \begin_layout Standard
11836 The easiest way to write a paper is to start with the file
11840 that is available in LyX's examples files folder.
11841 Open this file, save it under a new name, and start writing.
11842 The example file explains how to use the special text environments.
11843 Here are the most important advices:
11846 \begin_layout Itemize
11847 To be able to compile your document to a PDF, PS, or DVI, assure that the
11850 Use AMS math package
11852 in the document settings under
11859 \begin_layout Itemize
11862 The title environment defines the kind of your paper.
11863 So use one of the following environments for the title:
11867 \begin_layout Itemize
11876 \begin_layout Itemize
11885 \begin_layout Itemize
11891 for a Topical review
11894 \begin_layout Itemize
11903 \begin_layout Itemize
11912 \begin_layout Itemize
11918 for a Paper (same as Title)
11921 \begin_layout Itemize
11927 for a Preliminary communication
11930 \begin_layout Itemize
11936 for a Rapid communication
11939 \begin_layout Itemize
11945 for a Letter to the editor
11949 \begin_layout Itemize
11952 All title environments except of
11956 can have an optional short title.
11959 \begin_layout Itemize
11960 There is a general title environment
11964 which is not directly supported by the LyX.
11965 This can be used as TeX code when your document doesn't fit into one of
11966 the other title types.
11969 \begin_layout Standard
11970 For more informations like hints for special table and formula formatting,
11971 look at the IOP author guidelines.
11974 \begin_layout Section
11978 \begin_layout Standard
11981 Panayotis Papasotiriou
11984 \begin_layout Subsection
11988 \begin_layout Standard
11989 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
11990 that facilitates electronic manuscript submission to the journals they
11992 Most known of them (at least in my domain of interest) are
11994 Astrophysics and Space Science
12000 , but there are many others (see a complete list at
12001 \begin_inset Flex URL
12004 \begin_layout Plain Layout
12006 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12012 The Kluwer package may be downloaded from the site
12013 \begin_inset Flex URL
12016 \begin_layout Plain Layout
12018 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12024 A complete user guide is contained in that package (but it can also be
12025 downloaded separately).
12028 \begin_layout Standard
12029 LyX supports many features of the package but not everything.
12030 However, the TeX code needed is reduced to some
12031 \begin_inset Quotes eld
12035 \begin_inset Quotes erd
12038 commands of the package (see
12039 \begin_inset space ~
12043 \begin_inset CommandInset ref
12045 reference "subsec:kluwer_peculiarities"
12050 I have recently used LyX to write an article submitted to the
12052 Astrophysics and Space Science
12054 without any problem.
12057 \begin_layout Subsection
12061 \begin_layout Standard
12062 The easiest way to write a paper is to start with the Kluwer template file.
12065 File\SpecialChar \menuseparator
12077 This will give an (almost) empty document that includes the most common
12078 fields found in a manuscript and a short description of their use.
12079 As in most templates, simply overwrite the existing text (including the
12084 ) with the correct information.
12087 \begin_layout Subsection
12088 Preparing a paper for submission
12091 \begin_layout Standard
12092 As in the AASTeX package, before you submit your paper to a journal you
12094 \begin_inset Quotes eld
12098 \begin_inset Quotes erd
12104 \begin_layout Enumerate
12105 Export your paper as a LaTeX file.
12106 To do this, click on
12108 File\SpecialChar \menuseparator
12109 Export\SpecialChar \menuseparator
12116 \begin_layout Enumerate
12121 file with a text editor and make the following changes
12125 \begin_layout Enumerate
12126 remove the comment lines before the
12135 \begin_layout Enumerate
12136 remove everything between (and including) the
12148 commands, except for any commands you specifically put into the LaTeX preamble.
12151 \begin_layout Standard
12160 \begin_layout Enumerate
12165 file through LaTeX as many times as necessary (usually up to three).
12168 \begin_layout Enumerate
12174 \begin_inset space \thinspace{}
12178 \begin_inset space \space{}
12185 , and check if everything is OK (it should, if you didn't make any mistake).
12188 \begin_layout Subsection
12189 \begin_inset Quotes eld
12193 \begin_inset Quotes erd
12196 of the Kluwer package
12197 \begin_inset CommandInset label
12199 name "subsec:kluwer_peculiarities"
12206 \begin_layout Standard
12207 The Kluwer package has the following
12208 \begin_inset Quotes eld
12212 \begin_inset Quotes erd
12218 \begin_layout Enumerate
12219 It is possible to write multiple articles in the same LaTeX file
12223 \begin_layout Plain Layout
12224 I can't imagine any good reason to do this.
12230 Each article must be included in the environment
12231 \begin_inset Quotes eld
12235 \begin_inset Quotes erd
12239 Unfortunately, this environment cannot be omitted, even if you write just
12241 Therefore, each article starts with the command
12247 and, obviously, ends with the command
12254 Although this can be implemented in LyX, I didn't included it, since it
12255 looks ugly and can confuse the novice user.
12256 Therefore, you need to enter them directly and mark them as LaTeX code
12258 \begin_inset Quotes eld
12262 \begin_inset Quotes erd
12268 \begin_layout Enumerate
12269 Information given at the beginning of the article (i.
12270 \begin_inset space \thinspace{}
12274 \begin_inset space \space{}
12277 title, subtitle, author, institution, running title, running author, abstract
12278 and keywords) must be included in an environment called
12279 \begin_inset Quotes eld
12283 \begin_inset Quotes erd
12287 This is not implemented in LyX, so you must enter title, subtitle etc.
12288 \begin_inset space ~
12291 between two TeX code lines (
12306 \begin_layout Enumerate
12307 According to the user manual, the label of each bibliography item must be
12331 \begin_layout Standard
12336 template takes care of all these
12337 \begin_inset Quotes eld
12341 \begin_inset Quotes erd
12345 If you start a new paper using this template you don't need to do anything
12350 \begin_layout Enumerate
12351 don't delete the TeX code included in the template, and
12354 \begin_layout Enumerate
12355 copy the example bibliography item included in the template and modify it
12356 as necessary to enter new bibliography items.
12359 \begin_layout Section
12363 \begin_layout Standard
12369 \begin_layout Subsection
12373 \begin_layout Standard
12374 The LyX document classes
12376 article (koma-script)
12380 report (koma-script)
12398 correspond to the LaTeX document classes
12415 \begin_inset space ~
12418 of the Koma-Script family.
12419 They are replacements for the standard document classes
12435 , resp., and fit better to European typography conventions in a number of
12439 \begin_layout Itemize
12440 Standard character size is 11pt in
12442 article (koma-script)
12446 report (koma-script)
12454 letter (koma-script)
12459 \begin_layout Itemize
12460 Headings, labels of the description environment, and a number of elements
12463 letter (koma-script)
12465 document class are set in a bold sans serif font.
12469 \begin_layout Plain Layout
12470 There is a big difference between the bold sans serif old cm fonts and new
12471 ec fonts, especially in the appearance of headings.
12472 In comparison, the ec bold sans serif fonts look a bit thin.
12473 Here the LaTeX package
12481 helps to produce the
12482 \begin_inset Quotes eld
12486 \begin_inset Quotes erd
12489 appearance when using the ec fonts.
12494 The numbering of chapter headings is made in the same way as the numbering
12495 of section headings, that is without the extra line
12496 \begin_inset Quotes eld
12499 Chapter\SpecialChar \ldots{}
12501 \begin_inset Quotes erd
12505 In addition, the appearance of the headings can be modified by using a
12506 number of options (in LyX to be entered in the field
12509 \begin_inset space ~
12516 Layout\SpecialChar \menuseparator
12520 A detailed German description of these options can be found in the Koma-Script
12528 \begin_layout Itemize
12529 The main means in the Koma-Script document classes to design the type area
12538 (in LyX to be entered in the extra class options field in the dialog
12540 Document\SpecialChar \menuseparator
12544 They make a clearer modification of page margins possible as do the options
12547 Document\SpecialChar \menuseparator
12551 A detailed German description of these and other type area options can
12552 be found in the Koma-Script documentation
12559 \begin_layout Itemize
12560 The LaTeX document classes of the Koma-Script family define a number of
12561 additional commands.
12562 Those part of it which makes sense in LyX is implemented in corresponding
12566 \begin_layout Standard
12567 A detailed German description of the LaTeX document classes of the Koma-Script
12568 family can be found in the Koma-Script documentation
12576 \begin_layout Plain Layout
12577 There is an English translation
12581 , but it is not a complete one.
12586 The following sections describe only those aspects, which are relevant
12590 \begin_layout Subsection
12591 article (koma-script), report (koma-script), and book (koma-script)
12594 \begin_layout Standard
12595 The document classes
12597 article (koma-script)
12601 report (koma-script)
12611 are implemented in the layout files
12624 They contain all the paragraph types of the corresponding standard document
12637 , resp., partly modified, with the exception of the LyX specific
12641 -type, which is replaced by the new
12645 -type having the same functionality.
12650 -Type there is a number of new paragraph types added.
12657 letter (koma-script)
12662 \begin_layout Itemize
12671 : are equivalents to
12679 , resp., additionally inserting an entry in the table of contents.
12688 are not contained in
12690 article (koma-script)
12695 \begin_layout Itemize
12704 : behave exactly as
12712 , resp., additionally clearing running heads.
12717 is not contained in
12719 article (koma-script)
12725 \begin_layout Plain Layout
12738 report (koma-script)
12740 , but since this is identical to
12744 , is has not been implemented in LyX.
12752 \begin_layout Itemize
12757 : generates a heading directly above the following paragraph in the standard
12758 character size without affecting the structure of the document.
12761 \begin_layout Itemize
12770 are special captions which respect the different space settings needed
12771 for captions placed above or below an element (if you follow strict typographic
12772 rules, you might want to place table captions always above the table).
12773 You can also use the class option
12777 , which will switch
12790 You need at least Koma-Script version 2.8q to use this.
12793 \begin_layout Itemize
12798 : can be used to set a bonmot, e.
12799 \begin_inset space \thinspace{}
12803 \begin_inset space \space{}
12806 at the beginning of a chapter.
12807 If you use the optional argument (
12809 Insert\SpecialChar \menuseparator
12811 \begin_inset space ~
12816 ), you can insert the dictum's author there.
12817 Dictum and author are separated by a line.
12818 You need at least Koma-Script version 2.8q to use this.
12823 is not contained in
12825 article (koma-script)
12830 \begin_layout Standard
12831 The following types, together with the standard types
12843 , form the title area of the document.
12844 They must be entered ahead of the first
12845 \begin_inset Quotes eld
12849 \begin_inset Quotes erd
12856 \begin_layout Plain Layout
12857 The corresponding LaTeX commands must appear before the
12868 When such a type is used more than once, the latter usage overwrites the
12869 former one, that means, for every type only the latest usage is valid.
12870 The order of the different types however has, like
12882 , no effect on the appearance of the produced document.
12885 \begin_layout Itemize
12890 : produces a centered paragraph above the ordinary title (
12902 ) for the subject of the document.
12905 \begin_layout Itemize
12910 : produces a centered paragraph below the ordinary title (
12922 ) for the publishers' name.
12925 \begin_layout Itemize
12932 report (koma-script)
12938 produces a centered paragraph on its own page behind the title page, or
12941 article (koma-script)
12943 produces a centered paragraph below the ordinary title (
12959 ) for a dedication.
12962 \begin_layout Itemize
12967 : produces a left aligned paragraph above the ordinary title (
12983 ) for a document`s head.
12986 \begin_layout Itemize
12991 : produces in a double-sided print in
12993 report (koma-script)
12999 a left-aligned paragraph at the top of the title page`s back or has no
13000 effect in a single-sided print or in
13002 article (koma-script)
13007 \begin_layout Itemize
13012 : produces in a double-sided print in
13014 report (koma-script)
13020 a left-aligned paragraph at the bottom of the title page`s back or has
13021 no effect in a single-sided print or in
13023 article (koma-script)
13028 \begin_layout Itemize
13033 : produces a special
13034 \begin_inset Quotes eld
13038 \begin_inset Quotes erd
13041 page ahead of the actual document containing a paragraph without special
13045 \begin_layout Standard
13046 The layout files for the document classes
13048 article (koma-script)
13052 report (koma-script)
13058 do include the file
13063 This is thought of as a place to define your own types.
13068 in your personal layout directory and edit the file!
13071 \begin_layout Subsection
13072 letter (koma-script)
13075 \begin_layout Standard
13079 \begin_layout Plain Layout
13091 \begin_layout Standard
13095 letter (koma-script)
13097 is implemented in the layout file
13102 It contains all the paragraph types of the corresponding standard document
13107 , partly modified, with the exception of the LyX specific types
13119 type, which is replaced by the new
13124 In addition, it contains, in contrast to the standard document class, the
13142 Furthermore, there are a number of new letter specific types.
13145 \begin_layout Standard
13149 \begin_layout Plain Layout
13161 \begin_layout Standard
13162 The appearance of the letter produced by this document class can be controlled
13163 by a number of LaTeX commands, which you can put in the LaTeX preamble.
13167 \begin_layout Plain Layout
13168 For example, the standard appearance of the letter`s heading, consisting
13169 of name and address, is quite self-willed.
13171 \begin_inset Quotes eld
13175 \begin_inset Quotes erd
13178 heading is produced by the following LaTeX commands in the preamble:
13181 \begin_layout LyX-Code
13191 \begin_layout LyX-Code
13207 \begin_layout LyX-Code
13217 \begin_layout LyX-Code
13237 A detailed German description of such LaTeX commands can be found in the
13238 Koma-Script documentation
13243 With it, the letter's author can produce his personal letter layout.
13246 \begin_layout Standard
13255 define the beginning of the letter and must be used in every letter.
13256 To emphasize them in the LyX document class, they are marked with the letter
13266 \begin_inset space ~
13269 in the left margin.
13270 It is possible to write any number of letters in one file.
13275 type produces a new letter using the same addressee and a
13279 type produces a new addressee.
13296 are ordinary paragraph types and can also be used several times in one
13297 and the same letter.
13300 \begin_layout Itemize
13305 : produces a paragraph for the addressee and implicitly defines the beginning
13309 \begin_layout Itemize
13314 : produces a paragraph for the form of address and implicitly produces a
13318 \begin_layout Itemize
13323 : produces a paragraph for a close.
13326 \begin_layout Itemize
13331 : produces a paragraph for a postscript.
13334 \begin_layout Itemize
13339 : produces a paragraph for a distribution list.
13342 \begin_layout Itemize
13347 : produces a paragraph for enclosures.
13350 \begin_layout Standard
13391 are input types provided with a label to enter information, which will
13392 be processed by the document class.
13396 \begin_layout Plain Layout
13397 It could be seen as a matter of inconsequence, that the types
13405 described above are not such input types as well.
13406 Because of the special meaning of those types, however, I have implemented
13407 them as ordinary paragraph types with a one letter mark in the left margin.
13408 Moreover, it would affect my feeling of symmetry, if the
13416 type had such a serious different appearance.
13421 The types must be used ahead of the corresponding
13428 \begin_layout Standard
13429 An implementation of these types in a WYSIWYG fashion does not seem to make
13430 sense, because the real appearance of the produced letter does not only
13431 depend on the usage of the particular type, but also on other factors.
13432 For example, a signature entered in the
13436 type will in the standard behavior appear in the produced letter only,
13437 when in the same letter also a
13442 The entered value of the
13446 type will in the standard behavior not appear in the produced letter at
13448 The possibility to design the letter`s heading freely is already indicated
13449 in a footnote above.
13452 \begin_layout Standard
13453 The input types can also be used as empty paragraphs.
13454 This makes sense e.
13455 \begin_inset space \thinspace{}
13459 \begin_inset space \space{}
13471 type is not used at all, in the standard behavior the value of the
13475 type is used as signature, whereas if an empty
13479 type is used, no signature value is defined.
13482 \begin_layout Standard
13483 By using the input types it is possible to write a letter template, containing
13484 filled input types with your personal dates (name, address, etc.) and empty
13485 input types for other dates you want to enter.
13488 \begin_layout Itemize
13493 : sender's name, in the standard behavior appears as a centered paragraph
13494 in small caps in the letter`s heading.
13497 \begin_layout Itemize
13502 : sender's signature, in the standard behavior appears below the
13511 type is used, the value of the
13515 type appears instead.
13518 \begin_layout Itemize
13523 : sender's address, in the standard behavior appears in a centered paragraph
13524 in the letter`s heading below the sender's name.
13527 \begin_layout Itemize
13532 : sender's telephone number, in the standard behavior only sets the LaTeX
13542 \begin_layout Itemize
13547 : place of the letter`s making.
13550 \begin_layout Itemize
13555 : date of the letter`s making.
13564 , in the standard behavior, produce the place and the date in a right-aligned
13565 line below the addressee's field.
13570 type is used, neither place nor date appear, independent of the value of
13580 type is used, the date of the letter `s production is used.
13583 \begin_layout Itemize
13588 : sender`s back address, in the standard behavior appears above the addressee's
13589 field in a small sans serif font.
13592 \begin_layout Itemize
13597 : special mail information, in the standard behavior appears underlined
13598 above the addressee's field below the back address.
13601 \begin_layout Itemize
13606 : additional information, in the standard behavior appears on right side
13607 below the addressee`s field.
13610 \begin_layout Itemize
13615 : the letter's title, in the standard behavior appears in a big, bold, sans
13616 serif font above the subject.
13619 \begin_layout Itemize
13624 : the letter's subject, in the standard behavior appears in a bold font
13632 \begin_layout Standard
13653 produce a business letter like line above the
13657 line containing the fields
13658 \begin_inset Quotes eld
13662 \begin_inset Quotes erd
13666 \begin_inset Quotes eld
13670 \begin_inset Quotes erd
13674 \begin_inset Quotes eld
13678 \begin_inset Quotes erd
13682 \begin_inset Quotes eld
13686 \begin_inset Quotes erd
13690 \begin_inset Quotes eld
13694 \begin_inset Quotes erd
13698 \begin_inset Quotes eld
13702 \begin_inset Quotes erd
13706 For the date field, the value of the
13712 \begin_inset Quotes eld
13715 business letter types
13716 \begin_inset Quotes erd
13719 is used, the value of the
13723 type however does not appear, but only the LaTeX variable
13730 The ordinary output of place and date in a right-aligned line below the
13731 addressee`s field is suppressed.
13732 The types are implemented as input types provided with a label and must
13733 be used ahead of the corresponding
13740 \begin_layout Itemize
13748 \begin_layout Itemize
13756 \begin_layout Itemize
13764 \begin_layout Itemize
13772 \begin_layout Itemize
13780 \begin_layout Subsection
13781 The new letter class: letter (koma-script v.2)
13784 \begin_layout Standard
13790 \begin_layout Standard
13791 \begin_inset VSpace medskip
13797 \begin_layout Standard
13799 Koma-Script version 2.8 has introduced a new letter class
13803 which supersedes the now unsupported
13808 It has — on the LaTeX side — a completely new interface and is not compatible
13809 with the old class.
13810 Therefore, LyX supports both, though it is recommended to use the new class.
13813 \begin_layout Standard
13814 This class covers the same functionality as
13816 letter (koma-script),
13819 The basic items are
13823 (receiver's address, same as
13827 in the old layout),
13840 will start a new letter (i.
13841 \begin_inset space \thinspace{}
13845 \begin_inset space \space{}
13848 you can write several letters per document).
13849 New elements are sender's
13865 and the possibility to use a
13871 Insert\SpecialChar \menuseparator
13877 \begin_layout Standard
13878 The biggest improvement is, though, that the letter's layout is configurable
13879 at almost any needs.
13880 This can be done via the preamble or with a special style file (Letter
13881 Class Option, extension
13885 ), that will be read in as a class option.
13889 \begin_layout Plain Layout
13890 The KOMA package comes with some default
13895 There is, for instance, a
13899 file that follows german typesetting rules, or a
13903 that provides the default layout of the old
13908 The latter can be loaded with the class option
13917 ayout\SpecialChar \menuseparator
13922 ocument\SpecialChar \menuseparator
13934 template that is included in LyX for examples.
13935 A detailed description is to be found in the Koma-Script documentation
13943 \begin_layout Subsection
13947 \begin_layout Standard
13948 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
13952 \begin_layout Itemize
13953 The chapter number of a
13957 type appears on a line of its own above the chapter heading instead of
13958 appearing in the same line ahead of it.
13959 The cause for that is the LyX internal behavior for the labeltype
13963 in the layout file.
13966 \begin_layout Itemize
13967 The headings of the types
13975 are only put in the
13976 \begin_inset Quotes eld
13980 \begin_inset Quotes erd
13983 LaTeX table of contents, but not in the LyX table of contents (
13985 Document\SpecialChar \menuseparator
13987 \begin_inset space ~
13991 \begin_inset space ~
13999 \begin_layout Itemize
14000 The paragraphs in a
14004 document class appear in a skip separation mode, not indented.
14005 This is the standard behavior, no special LaTeX commands are needed for
14009 Document\SpecialChar \menuseparator
14012 dialog the corresponding radio button indicates
14021 value always has the effect that extra LaTeX commands are inserted in the
14022 document to produce the gap, which is not what is wanted in this case.
14025 \begin_layout Section
14026 Latex8 (IEEE Conference Papers)
14029 \begin_layout Standard
14035 \begin_layout Subsection
14039 \begin_layout Standard
14040 Since this class is specifically for writing submissions to IEEE sponsored
14041 conferences I strongly recommend that you get a copy of their Authors Kit.
14046 package and associated bibliography style file is included in the kit.
14047 The Authors Kit is usually sent out by email once your initial submission
14049 There is a lot of useful information in the Authors Kit explaining formatting
14050 restrictions and so on and I will assume you have read this since that
14051 means I don't have to repeat it all here.
14054 \begin_layout Subsection
14058 \begin_layout Standard
14059 [AR\SpecialChar \@.
14063 \begin_layout Subsection
14064 Supported Environments
14067 \begin_layout Itemize
14073 \begin_layout Itemize
14079 \begin_layout Itemize
14085 \begin_layout Itemize
14091 \begin_layout Itemize
14097 \begin_layout Itemize
14103 \begin_layout Itemize
14109 \begin_layout Itemize
14115 \begin_layout Itemize
14121 \begin_layout Subsection
14122 Differences Between Screen and Paper
14125 \begin_layout Standard
14126 There are slight differences in appearance mainly with the presentation
14127 of section counters.
14128 On screen the trailing period of the section counter is missing but it
14129 will appear in the output so don't let this worry you.
14132 \begin_layout Section
14136 \begin_layout Standard
14142 \begin_layout Subsection
14146 \begin_layout Standard
14147 Memoir is a very powerful and constantly evolving class.
14148 It has been designed with regard to fictional and non-fictional literature.
14149 Its aim is to let the user have maximum control over the typesetting of
14151 Memoir is based on the standard book class, but it can also emulate the
14152 article class (see below).
14155 \begin_layout Standard
14156 Peter Wilson, the developer of Memoir, is known as the author of lots of
14157 useful packages in the LaTeX world.
14158 Most of them have been merged with Memoir.
14159 Therefore, it is much easier to layout the table of contents, appendices,
14160 chapter designs and such.
14161 LyX, though, does not support all of these goodies natively.
14162 Some of them might be added to forthcoming releases
14166 \begin_layout Plain Layout
14167 You are invited to send suggestions to
14168 \begin_inset Flex URL
14171 \begin_layout Plain Layout
14173 lyx-devel@lists.lyx.org
14183 , lots will probably never, due to the limitations of LyX's framework.
14184 Of course you can still use all features with the help of some native LaTeX
14189 \begin_layout Plain Layout
14194 \begin_layout Plain Layout
14204 \begin_inset space ~
14208 \begin_inset CommandInset ref
14210 reference "sec:Inserting-TeX-Code"
14220 In this section, we can only list those features which are natively supported
14222 For detailed descriptions (and for the rest of features) we are recommending
14223 to have a look at the detailed manual of the Memoir class
14227 \begin_layout Plain Layout
14232 \begin_layout Plain Layout
14242 \begin_inset Flex URL
14245 \begin_layout Plain Layout
14247 CTAN:/macros/latex/memoir/memman.pdf
14257 , which is not only a user guide for the class, but also both a comprehensive
14258 description on good typesetting and a superb example for good typesetting
14262 \begin_layout Subsection
14263 Basic features and restrictions
14266 \begin_layout Standard
14267 Memoir supports basically all features of the standard book classes.
14268 There are, however, some differences, as follows:
14271 \begin_layout Description
14273 \begin_inset space ~
14276 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14279 \begin_layout Description
14281 \begin_inset space ~
14284 style: The fancy page style is not supported, due to a command clash between
14285 Memoir and the fancyhdr package (they are both defining a command with
14286 the same name, which confuses LaTeX).
14287 Instead, Memoir comes with a bunch of own page styles (see
14289 Layout\SpecialChar \menuseparator
14290 Document\SpecialChar \menuseparator
14292 \begin_inset space ~
14298 If you want to use these for the chapter pages, you have to use the command
14305 in the main text or in preamble (e.
14306 \begin_inset space \thinspace{}
14310 \begin_inset space \space{}
14317 chapterstyle{companion}
14322 \begin_layout Description
14323 Sectioning: Sectionings (chapter, section, subsection etc.) are coming with
14324 an optional argument in the standard classes.
14325 With this, you can specify an alternative version of the title for the
14326 table of contents and the headers (for instance, if the title is too long).
14327 In LyX, you can do this via
14329 Insert\SpecialChar \menuseparator
14331 \begin_inset space ~
14336 at the beginning of a chapter/section.
14337 Memoir features a second optional argument and thus separates the table
14338 of contents from the header.
14339 You can define three variants of a title with this: one for the main text,
14340 one for the table of contents, and one for the headers.
14341 Simply insert two optional arguments if you need this feature, the first
14342 one containing the short title for the Table of Contents, the second one
14343 containing an alternative short title for the headers.
14346 \begin_layout Description
14347 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14348 of contents, the list of figures and the list of table start a new page
14350 Memoir does not follow this route.
14351 You have to insert a page break yourself, if you want to have one.
14354 \begin_layout Description
14355 Titlepage: For some unknown reason, Memoir uses pagination on the title
14356 page (in the standard classes, title pages are
14357 \begin_inset Quotes eld
14361 \begin_inset Quotes erd
14365 \begin_inset space \thinspace{}
14369 \begin_inset space \space{}
14373 If you want an empty title page, type
14377 aliaspagestyle{title}{empty}
14382 \begin_layout Description
14383 Article: With the class option
14389 Layout\SpecialChar \menuseparator
14390 Document\SpecialChar \menuseparator
14392 \begin_inset space ~
14397 ), you can emulate article style.
14398 That is, counters (footnotes, figures, tables etc.) will not be reset on
14399 new chapters, chapters don't start a new page (but are—in contrary to
14400 \begin_inset Quotes eld
14404 \begin_inset Quotes erd
14407 article classes—still allowed), parts, though, use their own page, as in
14411 \begin_layout Description
14412 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14413 font commands, which have been used in the old LaTeX version 2.09 (e.
14414 \begin_inset space \thinspace{}
14418 \begin_inset space \space{}
14434 It produces an error and stops LaTeX whenever such a command appears.
14439 reallows the commands and spits out warnings instead (which does at least
14441 Since a lot of packages and particularly BibTeX style files are still using
14442 those commands, we have decided to use this option by default.
14445 \begin_layout Subsection
14449 \begin_layout Standard
14450 We will only describe the features supported by LyX (which is not much currently
14452 Please consult the Memoir manual
14456 \begin_layout Plain Layout
14461 \begin_layout Plain Layout
14471 \begin_inset Flex URL
14474 \begin_layout Plain Layout
14476 CTAN:/macros/latex/memoir/memman.pdf
14489 \begin_layout Description
14490 Abstract: You may wonder why an abstract is an extra feature.
14491 Well, it is in book class.
14492 Usually books don't have abstracts.
14493 Memoir, however, has.
14494 You can use it wherever and how often you like.
14497 \begin_layout Description
14498 Chapterprecis: You may know this from belletristic: The contents of a chapter
14499 is shortly described below the title and also in the table of contents
14501 \begin_inset space \thinspace{}
14505 \begin_inset space \space{}
14510 Our hero arrives in Troia; he loses some friends; he finds others
14513 Chapterprecis does exactly this.
14514 It is therefore only sensible below a chapter.
14517 \begin_layout Description
14518 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14519 The epigraph environment provides an elegant way of typesetting such a
14521 The motto itself (text) and its author (source) are divided by a short
14523 Unfortunately, we have to fool LyX a bit here again, since the environment
14524 needs two arguments (text and source).
14525 In this case, we have to use curly brackets (in TeX mode) between the two
14536 <author of the slogan>.
14539 \begin_layout Description
14540 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14541 complex figurative poems).
14542 LyX can only support a few of them.
14543 One is poemtitle, which is a centered title for poems, which will also
14544 be added to the table of contents (verse is the standard environment for
14546 Memoir has some enhanced versions of verse, but you need to use TeX code,
14547 because they have to be nested inside regular verse environments, which
14548 is not possible with LyX).
14551 \begin_layout Description
14552 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14555 \begin_layout Section
14556 Article (mwart), book (mwbk) and report (mwrep)
14557 \begin_inset OptArg
14560 \begin_layout Plain Layout
14573 \begin_layout Standard
14579 \begin_layout Standard
14580 The LyX document classes
14596 correspond to the LaTeX document classes
14609 They are replacements for the standard document classes
14621 , resp., and fit better to Polish typography conventions in a number of points.
14625 \begin_layout Standard
14629 \begin_layout Itemize
14630 Unnumbered titles (with star, e.
14631 \begin_inset space \thinspace{}
14635 \begin_inset space \space{}
14642 ) are added into table of contents,
14645 \begin_layout Itemize
14646 Additional page styles:
14650 \begin_layout Description
14651 uheadings header with separated lines,
14654 \begin_layout Description
14655 myheadings custom header, contents headers via commands:
14670 \begin_layout Description
14671 myuheadings custom header with separated lines,
14674 \begin_layout Description
14675 outer page number is placed on outer side of page
14679 \begin_layout Itemize
14684 \begin_layout Description
14685 rmheadings serif titles — default,
14688 \begin_layout Description
14689 sfheadings sansserif titles,
14692 \begin_layout Description
14693 authortitle on title page first placed is author next title — default,
14696 \begin_layout Description
14697 titleauthor on title page first placed is title next author,
14700 \begin_layout Description
14701 withmarginpar reserve place on page for margins.
14705 \begin_layout Section
14709 \begin_layout Standard
14714 provides an alternative to the standard
14719 It provides similar functionality, but you might prefer this layout with
14720 sans serif sections, headings, and more.
14723 \begin_layout Section
14727 \begin_layout Standard
14733 \begin_layout Standard
14734 \begin_inset VSpace bigskip
14740 \begin_layout Standard
14745 \begin_inset space ~
14750 textclass works with the American Physical Sociey's RevTeX 4.0 (the
14751 \begin_inset Formula $\beta$
14754 release of May, 1999) class.
14757 \begin_layout Standard
14762 textclass, which works with RevTeX 3.1.
14763 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
14764 That means that it doesn't interact very well with LyX, which requires
14765 LaTeX2e, although it has been kludged to work.
14766 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
14770 \begin_inset space ~
14775 textclass should also be pretty easy to use.
14778 \begin_layout Standard
14779 These documents are supposed to be used in
14783 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
14784 macros, and assume you'll know what to put in the preamble if necessary.
14787 \begin_layout Subsection
14791 \begin_layout Standard
14792 All you need to do is install RevTeX 4, as described in the package's README
14794 The package can be found at The RevTeX 4 Web Site
14795 \begin_inset Flex URL
14798 \begin_layout Plain Layout
14800 http://publish.aps.org/revtex4/
14806 Install it somewhere that LaTeX can see it.
14807 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
14809 \begin_inset space \thinspace{}
14813 \begin_inset space \space{}
14816 not the directory where you installed the class file.) Then, if you reconfigure
14817 LyX, it will find the class file and let you use the RevTeX4 textclass.
14820 \begin_layout Standard
14821 Probably the easiest way to get started is either to import a RevTeX 4 document
14829 \begin_inset space ~
14834 template, found in the templates directory.
14837 \begin_layout Subsection
14841 \begin_layout Standard
14842 Optional arguments to
14849 \begin_inset Quotes eld
14853 \begin_inset Quotes erd
14857 \begin_inset Quotes eld
14861 \begin_inset Quotes erd
14871 \begin_inset space ~
14879 \begin_inset space ~
14885 Remember that in RevTeX, at least one optional argument is required!
14888 \begin_layout Standard
14889 Other preamble matter, like
14896 \begin_inset space ~
14902 \begin_inset space ~
14907 dialog, also as usual.
14910 \begin_layout Subsection
14914 \begin_layout Standard
14915 The layouts basically correspond to the commands in RevTeX4.0.
14916 For example, the Email layout corresponds to
14923 Note that (at least as of RevTeX 4.0 Beta), the
14931 layouts are exactly equivalent, so you shouldn't need to use both.
14935 \begin_layout Plain Layout
14936 In case you're curious, both were included so that
14940 would be able to translate both
14960 \begin_layout Subsection
14964 \begin_layout Standard
14965 There are a couple of important unique aspects of RevTeX 4 which might cause
14966 bugs that will be even more confusing in LyX.
14969 \begin_layout Standard
14987 The LyX equivalent is that there is a separate Thanks layout.
14992 write footnotes in the
14996 layout, or weird things may happen.
14997 See the RevTeX 4 documentation for more details.
15000 \begin_layout Standard
15004 \begin_inset space ~
15012 \begin_inset space ~
15021 layouts must be placed
15029 layout and the corresponding
15046 , the LaTeX won't compile.
15049 \begin_layout Subsection
15053 \begin_layout Standard
15054 The main problem with this layout is that you can't use the optional arguments
15055 to layouts like Email and Title.
15056 (The problem is not unique to this layout; you can't use optional arguments
15057 to the Section layouts either.) This means that after you export that file
15058 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15059 need to edit the LaTeX file with a text editor to add the optional arguments
15061 \begin_inset space \thinspace{}
15065 \begin_inset space \space{}
15068 the running title for the page headers.
15069 Lacking these layouts makes the
15075 (and the equivalent
15081 ) useless, so the corresponding layouts don't exist, and will have to be
15086 \begin_layout Plain Layout
15091 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15092 has not been updated yet to take advantage of it.
15100 \begin_layout Section
15101 Springer Journals (
15108 \begin_layout Standard
15114 \begin_layout Subsection
15118 \begin_layout Standard
15119 These are the layout files for some of the journal formats used by Springer
15120 Verlag and listed on
15121 \begin_inset Flex URL
15124 \begin_layout Plain Layout
15126 http://www.springer.de/author/tex/help-journals.html
15131 , where you should also go to fetch the class files (yes, these are LaTeX2e
15133 It is a modular system: the things common to all journals are implemented
15138 , which journal-specific layout files (such as, e.
15139 \begin_inset space \thinspace{}
15143 \begin_inset space \space{}
15150 for Journal of Geodesy) can include.
15153 \begin_layout Standard
15154 This means that implementing support for any other Springer journal on this
15155 list is as simple as writing your own
15163 file following the outline given in
15171 \begin_layout Standard
15172 It is reasonably well tested only for the Journal of Geodesy.
15181 come with the standard LyX distribution.
15182 Install the relevant class file (downloaded from Springer) in a proper
15183 directory, reconfigure LaTeX (in the teTeX case by running
15187 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15188 and it should work.
15191 \begin_layout Subsection
15195 \begin_layout Standard
15196 A large number of theorem-like styles —
15202 \SpecialChar \ldots{}
15208 \begin_layout Standard
15211 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15212 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15215 See the Springer class file documentation for details.
15218 \begin_layout Subsection
15222 \begin_layout Itemize
15234 \begin_layout Itemize
15237 Probability Theory and Related Fields
15243 — Jean-Marc Lasgouttes
15246 \begin_layout Standard
15247 Add your own, it isn't so hard!
15250 \begin_layout Subsection
15254 \begin_layout Standard
15255 These files are partly based on the older
15259 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15260 file from Springer.
15265 layout, are now defunct.
15266 Jean-Marc Lasgouttes helped out big in making me find my way around the
15267 LyX layout file mechanism.
15270 \begin_layout Subsection
15274 \begin_layout Standard
15276 But probably less than in the old hacked-LaTeX
15283 \begin_layout Standard
15285 \begin_inset space \thinspace{}
15288 g.: does not display the number for theorem-like layouts, just #.
15291 \begin_layout Section
15297 \begin_inset CommandInset label
15306 \begin_layout Standard
15314 \begin_layout Subsection
15318 \begin_layout Standard
15319 This section describes how to use LyX to make slides for overhead projectors.
15320 There are two document classes that can do this: the default slides class
15326 This section documents the former.
15329 \begin_layout Standard
15330 I'm going to say this again, nice and clear, so that there's no misunderstanding
15334 \begin_layout Standard
15335 \begin_inset VSpace bigskip
15341 \begin_layout Standard
15345 This section documents the class
15346 \begin_inset Quotes eld
15354 \begin_inset Quotes erd
15362 \begin_layout Standard
15363 \begin_inset VSpace bigskip
15369 \begin_layout Standard
15370 If you're looking for the documentation for
15371 \begin_inset Quotes eld
15379 \begin_inset Quotes erd
15382 , check out section
15383 \begin_inset space ~
15387 \begin_inset CommandInset ref
15389 reference "sec:foiltex"
15399 \begin_inset Quotes eld
15407 \begin_inset Quotes erd
15410 ] is actually somewhat better than the default
15418 \begin_layout Plain Layout
15419 \SpecialChar \ldots{}
15420 or so I've been told repeatedly by its advocates.
15421 Having never used it, I have no idea if this claim is true or not.
15426 which this section documents.
15429 \begin_layout Standard
15430 This class is the LaTeX2e improvement of the old
15435 Every LaTeX2e distribution includes this class [which I'll just refer to
15437 \begin_inset Quotes eld
15445 \begin_inset Quotes erd
15448 from now on], so you're bound to have it.
15449 As I noted earlier, there are other classes, such as
15453 , which also produce slides for overhead projectors and do a better job
15455 However, there are some things which
15459 can do which the others can't, such as generate overlays.
15460 Read on to learn more!
15463 \begin_layout Subsection
15465 \begin_inset CommandInset label
15467 name "sec:slidesetup"
15474 \begin_layout Standard
15475 Obviously, to use this document class, you need to select
15476 \begin_inset Quotes eld
15484 \begin_inset Quotes erd
15487 from the class list in the
15489 Document\SpecialChar \menuseparator
15493 There are some other special things you should know about this class:
15496 \begin_layout Itemize
15497 Don't bother changing the options
15502 They're not supported by the
15509 \begin_layout Itemize
15513 \begin_inset space ~
15518 behaves a bit differently for this class.
15519 The possible choices and what they do are as follows:
15523 \begin_layout Description
15528 The final output contains page numbers in the lower right corner.
15531 \begin_layout Description
15540 , but also prints out any time markers you've put in.
15541 This is the default.
15544 \begin_layout Description
15549 The final output contains no page numbers, time markers, or alignment markers.
15553 \begin_layout Itemize
15558 class has an extra option:
15564 \begin_inset Quotes eld
15572 \begin_inset Quotes erd
15575 in the extra class options.
15579 \begin_layout Standard
15580 Using this options allows you to add time markers to
15586 \begin_inset space ~
15590 \begin_inset CommandInset ref
15592 reference "sec:slideNote"
15600 \begin_layout Standard
15601 You can also use the template file
15602 \begin_inset Quotes eld
15610 \begin_inset Quotes erd
15613 to automatically set up a document to use the
15619 File\SpecialChar \menuseparator
15621 \begin_inset space ~
15625 \begin_inset space ~
15630 to open your new document].
15631 The template file also contains some examples of the special paragraph
15632 environments used by this class.
15633 I'll describe those next.
15636 \begin_layout Subsection
15637 Paragraph Environments
15640 \begin_layout Subsubsection
15641 Supported Environments
15644 \begin_layout Standard
15645 The first thing you'll notice when you start up a new
15649 document is the font size and type: it's the equivalent of the size
15650 \begin_inset Quotes eld
15658 \begin_inset Quotes erd
15664 \begin_inset space ~
15670 This is also what's used in the output.
15672 \begin_inset Quotes eld
15676 \begin_inset Quotes erd
15679 to remind you that this is a slide.
15680 Your final slides will use a larger font; ergo, you'll have less space.
15681 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
15684 \begin_layout Standard
15685 The next thing that becomes obvious is the changes to the paragraph environment
15686 pull-down box [at the far-left end of the toolbar].
15687 Most of the paragraph environments you're used to seeing are missing.
15688 There are also five new ones.
15693 class itself only supports certain paragraph environments:
15696 \begin_layout Itemize
15702 \begin_layout Itemize
15708 \begin_layout Itemize
15714 \begin_layout Itemize
15720 \begin_layout Itemize
15726 \begin_layout Itemize
15732 \begin_layout Itemize
15738 \begin_layout Itemize
15744 \begin_layout Itemize
15750 \begin_layout Itemize
15756 \begin_layout Itemize
15762 \begin_layout Standard
15763 All of the other standard environments, including the section-heading environmen
15764 ts, aren't used in the
15771 \begin_layout Standard
15772 On the other hand, you'll notice the following new environments:
15775 \begin_layout Itemize
15781 \begin_layout Itemize
15787 \begin_layout Itemize
15793 \begin_layout Itemize
15799 \begin_layout Itemize
15805 \begin_layout Standard
15806 These five are kind of quirky, due to a
15807 \begin_inset Quotes eld
15811 \begin_inset Quotes erd
15815 You see, LyX doesn't permit you to nest any other paragraph environment
15816 into an empty environment.
15817 Now, that's fine and dandy, but it means that you wouldn't be able to start
15818 a slide with anything except plain text.
15819 To deal with this, I've performed a little
15820 \begin_inset Quotes eld
15824 \begin_inset Quotes erd
15830 \begin_layout Subsubsection
15831 Quirks of the New Environments
15832 \begin_inset CommandInset label
15834 name "sec:slideQuirk"
15841 \begin_layout Standard
15842 All five of the new paragraph environments are somewhat quirky due to inherent
15843 limitiations in the current version of LyX.
15844 As I just mentioned, LyX forbids environments that begin with another environme
15846 To get around this, the
15850 environment isn't a paragraph environment as described in the
15858 \begin_layout Standard
15859 You should consider
15872 \begin_inset Quotes eld
15875 pseudo-environments.
15876 \begin_inset Quotes erd
15879 They look like a section heading or a
15880 \begin_inset Quotes eld
15888 \begin_inset Quotes erd
15891 but really begin a [and, if necessary, end the previous] paragraph environment.
15901 \begin_inset Quotes eld
15905 \begin_inset Quotes erd
15908 These two perform some action.
15911 \begin_layout Standard
15912 A common feature of all five environments,
15932 , is a rather long-ish label.
15933 The text following this label — ordinarily the contents of the paragraph
15934 environment — is utterly irrelevant for
15955 LyX completely ignores it.
15956 In fact, you can leave these five environments completely empty.
15960 \begin_layout Standard
15965 to put any text after the rather long-ish label, you might want to.
15966 This could be a short description of the contents of the
15971 In that case, enter in your descriptive comment and hit
15975 as you normally would.
15978 \begin_layout Standard
15979 If, on the other hand, you don't want to enter in any descriptive text,
15980 you'll hit another LyX quirk.
15981 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
15982 environment until you put something in the old one.
15986 \begin_layout Itemize
15987 Start entering the text that will
16015 \begin_layout Itemize
16016 Now move to the beginning of that paragraph.
16020 \begin_layout Itemize
16029 \begin_layout Itemize
16030 Finally, change this new, empty paragraph to a
16054 \begin_layout Standard
16055 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16059 \begin_layout Subsection
16060 Making a Presentation with
16073 \begin_layout Subsubsection
16081 \begin_layout Standard
16082 If you're expecting this section to teach you how to actually make a presentatio
16083 n, you'll be sorely disappointed.
16084 Naturally, I'll describe all of the ways the
16088 class can assist you in preparing the materials for a presentation.
16089 Filling in the contents, however, is up to you.
16094 the LyX philosophy.]
16097 \begin_layout Standard
16102 environment [in the manner described in section
16103 \begin_inset space ~
16107 \begin_inset CommandInset ref
16109 reference "sec:slideQuirk"
16113 ] tells LyX to begin a new slide [duh].
16114 The label for this environment/
16115 \begin_inset Quotes erd
16119 \begin_inset Quotes erd
16123 \begin_inset Quotes eld
16127 \begin_inset Quotes erd
16130 in cool blue, followed by the label,
16131 \begin_inset Quotes eld
16135 \begin_inset Quotes erd
16139 Any text or paragraph environments that follow this one go on the new slide.
16143 \begin_layout Standard
16144 Slides are probably the only time you'll need to forcibly end pages in LyX
16145 (this can be specified in the
16150 In fact, you'll want to, once you finish entering the contents of one slide.
16151 If you've entered more text than can physically fit on a slide, the extra
16152 overflows onto a new slide.
16153 I don't recommend doing this, however, since the overflow slide won't have
16154 any page number on it.
16155 Furthermore, it may interfere with any
16159 you've made to accompany the oversized
16166 \begin_layout Standard
16175 environments work the same way as the
16180 They both create an
16181 \begin_inset Quotes eld
16185 \begin_inset Quotes erd
16188 followed by a label [
16189 \begin_inset Quotes eld
16193 \begin_inset Quotes erd
16197 \begin_inset Quotes eld
16201 \begin_inset Quotes erd
16205 The color is a stunning magenta instead of blue, and the
16206 \begin_inset Quotes eld
16210 \begin_inset Quotes erd
16213 will look different, in style and in length.
16214 The label fonts of all three also differ from one another.
16217 \begin_layout Standard
16222 , if the contents of a
16230 exceed the physical size of a slide or sheet of paper, the extra will overflow
16232 Again, you should avoid this.
16233 It defeats the whole purpose of
16244 \begin_layout Subsubsection
16254 \begin_layout Standard
16259 is a slide that sits atop another slide.
16260 Perhaps you wish to discuss a figure on the main
16264 before displaying the text associated with it.
16265 One way to accomplish this is tape a flap of dark paper over the part of
16270 you want to display later.
16271 This method fails, however, if you wish to overlap one graph with another,
16273 You would then have to fumble while speaking to align the two separate,
16278 s to align the two graphs.
16283 environment in both cases makes life much easier.
16286 \begin_layout Standard
16291 receives the page number of its
16292 \begin_inset Quotes eld
16296 \begin_inset Quotes erd
16304 \begin_inset Quotes eld
16312 \begin_inset Quotes erd
16319 \begin_layout Plain Layout
16320 Presumably, mutliple
16325 \begin_inset Quotes eld
16333 \begin_inset Quotes erd
16337 \begin_inset Quotes eld
16345 \begin_inset Quotes erd
16349 \begin_inset Quotes eld
16357 \begin_inset Quotes erd
16361 \begin_inset space ~
16364 appended to the page number of the parent
16374 Clearly, you want the contents of both the
16382 to each fit on a single physical slide! You should probably consider an
16388 \begin_inset Quotes eld
16392 \begin_inset Quotes erd
16404 class provides a visual cue for this: the label at the start of an
16408 is shorter than that at the start of a
16413 Lastly, when you generate printable output, you'll find alignment markers
16414 in all four corners of both the
16418 page and its parent
16423 These will assist you in lining up the two physical slides.
16426 \begin_layout Standard
16427 The major problem in overlaying two slides is aligning the contents of the
16428 two transparencies.
16429 How much space should you leave for that graph on the second slide? Worse
16430 still, what if you want a graph and a sentence on second slide, but there
16431 is text on the main transparency that goes in between them? You could try
16432 and insert vertical space of the right size.
16433 The better way is to use
16444 \begin_layout Standard
16445 As their names imply,
16453 are two command-like paragraph environments that make all subsequent text
16454 invisible and visible, respectively.
16456 \begin_inset space ~
16460 \begin_inset CommandInset ref
16462 reference "sec:slideQuirk"
16466 that you don't place anything
16470 these two environments, however.
16475 , it inserts a centered, sky-blue label into the page reading
16476 \begin_inset Quotes eld
16479 <Invisible Text Follows>
16480 \begin_inset Quotes erd
16484 For paragraphs following this label, the parts of the
16492 ; it doesn't matter which] where they would be contain instead blank space.
16496 \begin_layout Standard
16501 , the corresponding centered label is
16502 \begin_inset Quotes eld
16505 <Visible Text Follows>
16506 \begin_inset Quotes erd
16510 Paragraphs following this label behave normally.
16511 Note that the beginning of a new
16523 automatically shuts off an
16528 It's therefore not necessary to use
16539 \begin_layout Standard
16540 By now, it should be obvious how to create overlay transparencies using
16541 the proper combination of
16560 \begin_layout Enumerate
16565 , including everything that will appear on it, whether on the main slide
16573 \begin_layout Enumerate
16574 Before each figure or paragraph that will appear only on the
16583 If necessary, insert a
16587 environment after the
16594 \begin_layout Enumerate
16599 immediately following the
16606 \begin_layout Enumerate
16607 Copy the contents of this
16618 \begin_layout Enumerate
16623 , change all of the
16634 \begin_layout Standard
16636 You've just made an
16643 \begin_layout Standard
16644 There's one problem with the way I've designed the LyX
16648 class: you can't make text in the middle of a paragraph invisible, nor
16649 make text in the middle of an invisible paragraph visible again.
16650 To accomplish this feat, you'll need to use some inlined LaTeX codes.
16654 \begin_layout Plain Layout
16655 The commands of interest are:
16658 \begin_layout Itemize
16663 invisible \SpecialChar \ldots{}
16667 \begin_layout Itemize
16672 visible \SpecialChar \ldots{}
16676 \begin_layout Plain Layout
16677 \SpecialChar \ldots{}
16678 and need to be marked as TeX.
16680 \begin_inset Quotes eld
16684 \begin_inset Quotes erd
16687 you wish to change goes in between the brackets [and after the
16700 If you don't know how to mark text as TeX, see the appropriate section
16713 \begin_layout Subsubsection
16723 \begin_inset CommandInset label
16725 name "sec:slideNote"
16732 \begin_layout Standard
16741 is associated with a
16742 \begin_inset Quotes eld
16746 \begin_inset Quotes erd
16758 class provides visual cues.
16763 is shorter than that of a
16767 [yet longer than that of an
16771 ] and, like the label of an
16775 is shockingly magenta.
16776 Additionally, the printed
16780 has the page number of its
16781 \begin_inset Quotes eld
16785 \begin_inset Quotes erd
16793 \begin_inset Quotes eld
16801 \begin_inset Quotes erd
16805 \begin_inset Quotes eld
16813 \begin_inset Quotes erd
16817 \begin_inset Quotes eld
16825 \begin_inset Quotes erd
16829 You can have multiple
16833 s associated with a single
16845 , you'll probably want to break up long
16849 s so that they fit on a single sheet of paper.
16852 \begin_layout Standard
16857 is obvious: it contains anything additional you might want to say about
16863 It could also be used as a sheet of reminders for a particular
16868 In the case of the latter, you might want to make use of time markers.
16874 \begin_inset Quotes eld
16878 \begin_inset Quotes erd
16881 support for time markers, a
16886 So, you'll have to resort to using the LaTeX codes.
16889 \begin_layout Standard
16890 To use time markers, you'll need to specify the extra class option
16891 \begin_inset Quotes eld
16899 \begin_inset Quotes erd
16903 \begin_inset space ~
16907 \begin_inset CommandInset ref
16909 reference "sec:slidesetup"
16914 This option turns on timing marks, which will appear in the lower-left-hand
16920 To set what appears in the time marker, you use the LaTeX commands
16921 \begin_inset Quotes eld
16931 \begin_inset Quotes erd
16935 \begin_inset Quotes eld
16945 \begin_inset Quotes erd
16949 The arguments of both commands are time measured in seconds.
16951 \begin_inset Quotes eld
16961 \begin_inset Quotes erd
16964 sets the time marker to a given time.
16966 \begin_inset Quotes eld
16976 \begin_inset Quotes erd
16979 increments the time marker by the specified amount.
16980 Using time markers and
16984 s in this fashion, you can remind yourself how much time to spend on a particula
16992 \begin_layout Standard
16993 There's one last feature to describe.
16994 Clearly, you'd like to print out all of your
17002 s on transparencies while printing all of your
17019 with which it is associated.
17020 What's a person to do?
17023 \begin_layout Standard
17024 Luckily, there are two LaTeX commands that allow you to select what to print
17026 Both must be placed into the preamble of your document.
17028 \begin_inset Quotes eld
17040 \begin_inset Quotes erd
17043 will cause the output to contain only the
17052 Correspondingly, the command
17053 \begin_inset Quotes eld
17065 \begin_inset Quotes erd
17068 prevents the output of anything but
17073 I'd advise placing both commands in the preamble and initially comment
17075 You can then preview your entire presentation as you write.
17076 When you're done writing, you can then uncomment one of the two to select
17077 what you want to print.
17078 I like to uncomment
17079 \begin_inset Quotes eld
17091 \begin_inset Quotes erd
17094 , print to a file with
17095 \begin_inset Quotes eld
17103 \begin_inset Quotes erd
17106 in its name, comment it back out, then uncomment
17107 \begin_inset Quotes eld
17119 \begin_inset Quotes erd
17123 \begin_inset Quotes eld
17131 \begin_inset Quotes erd
17135 I can then send either file to a printer, loading transparencies or plain
17136 paper as appropriate.
17139 \begin_layout Standard
17140 You can also provide other arguments to the
17141 \begin_inset Quotes eld
17151 \begin_inset Quotes erd
17155 \begin_inset Quotes eld
17165 \begin_inset Quotes erd
17169 See a good LaTeX book for details.
17172 \begin_layout Subsection
17177 Class Template File
17180 \begin_layout Standard
17181 I have also provided a template file,
17182 \begin_inset Quotes eld
17190 \begin_inset Quotes erd
17198 To use it, begin your new presentation with
17203 ile\SpecialChar \menuseparator
17205 \begin_inset space ~
17209 \begin_inset space ~
17219 Your new LyX presentation file will contain an example
17240 additionally contain an example of the use of
17249 Lastly, the preamble will contain:
17252 \begin_layout LyX-Code
17253 % Uncomment to print out only slides and overlays
17256 \begin_layout LyX-Code
17260 \begin_layout LyX-Code
17266 \begin_inset Newline newline
17272 \begin_layout LyX-Code
17273 % Uncomment to print out only notes
17276 \begin_layout LyX-Code
17280 \begin_layout LyX-Code
17288 \begin_layout Standard
17289 One final thing: I created this class to support the LaTeX2e
17290 \begin_inset Quotes eld
17298 \begin_inset Quotes erd
17301 class, one of the built-in LaTeX2e classes.
17302 Neither I nor the rest of the LyX Team endorse or oppose the use of this
17303 built-in slide class.
17304 It's here if you want it or need it.
17305 There exist other LaTeX2e classes for creating presentations, such as the
17311 \begin_inset space ~
17315 \begin_inset CommandInset ref
17317 reference "sec:foiltex"
17322 \begin_inset Quotes eld
17330 \begin_inset Quotes erd
17333 package [present on some TeX distributions].
17334 The latter is not yet supported under LyX.
17338 \begin_layout Plain Layout
17339 Perhaps you can take on the task\SpecialChar \ldots{}
17345 I know nothing about these other classes.
17346 Try them out to see what sort of alternative they provide.
17349 \begin_layout Chapter
17350 LyX Features needing Extra Software
17353 \begin_layout Section
17357 \begin_layout Standard
17363 \begin_layout Subsection
17367 \begin_layout Standard
17376 \begin_layout Plain Layout
17381 is not yet available when you are using the LaTeX distribution MiKTeX.
17386 , you'll find in the
17393 \begin_inset space ~
17404 \begin_inset CommandInset href
17406 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17413 \begin_layout Standard
17418 package is a program that was written by
17419 \begin_inset Flex CharStyle:Noun
17422 \begin_layout Plain Layout
17424 \begin_inset space ~
17432 in frustration because some constructs in LaTeX are sometimes non-intuitive,
17433 and easy to forget.
17434 The program runs over your LaTeX file, checks the integrity of the file,
17435 and flags some common errors.
17436 In other technical words, it is
17443 \begin_layout Standard
17444 Well, what is a syntax checker doing in LyX which is supposed to produce
17445 correct LaTeX anyways? The answer is simple: Just as
17449 not only checks the
17453 of C programs, but also does
17457 checks for type-errors,
17461 catches some common
17465 errors, in addition to the syntactical ones.
17470 is capable of detecting several common errors, such as
17473 \begin_layout Itemize
17474 Ellipsis detection:
17475 \begin_inset Newline newline
17478 Use \SpecialChar \ldots{}
17482 \begin_layout Itemize
17483 No space in front of/after parenthesis:
17484 \begin_inset Newline newline
17490 \begin_layout Itemize
17491 Enforcement of normal space after common abbreviations:
17492 \begin_inset Newline newline
17496 \begin_inset space \thinspace{}
17500 \begin_inset space \space{}
17503 is too wide spacing.
17506 \begin_layout Itemize
17507 Enforcement of end-of-sentence space when the last sentence ends with a
17509 \begin_inset Newline newline
17513 And this is wrong spacing.
17516 \begin_layout Itemize
17517 Space in front of labels and similar commands:
17518 \begin_inset Newline newline
17521 The label should stick right up to the text to avoid falling to a wrong
17524 \begin_inset CommandInset label
17534 \begin_layout Plain Layout
17535 This footnote is in danger of falling off to a wrong page
17540 The label is separated too much.
17543 \begin_layout Itemize
17544 Space in front of references, instead of hard spaces:
17545 \begin_inset Newline newline
17548 In you are in bad luck, the text will break right between the referenced
17549 text and reference number, and that's a pity.
17551 \begin_inset CommandInset ref
17553 reference "sec:chktex"
17560 \begin_layout Itemize
17562 \begin_inset Quotes eld
17566 \begin_inset Quotes erd
17570 \begin_inset Formula $\times$
17574 \begin_inset Newline newline
17577 2x2 looks cheap compared to
17578 \begin_inset Formula $2\times2$
17584 \begin_layout Standard
17585 and more \SpecialChar \ldots{}
17586 It is an invaluable tool when you are
17587 \begin_inset Quotes eld
17591 \begin_inset Quotes erd
17594 your document before printing, and you should run it right after the obligatory
17595 spelling check, and before you go fine tuning the typesetting.
17598 \begin_layout Subsection
17602 \begin_layout Standard
17603 If you have the program installed, usage is as simple as choosing
17605 Tools\SpecialChar \menuseparator
17607 \begin_inset space ~
17613 This will make LyX generate a LaTeX file of your document, start
17617 to check it, and then make LyX insert
17618 \begin_inset Quotes eld
17622 \begin_inset Quotes erd
17625 with the warnings from
17629 , if there were any.
17630 The warnings will be placed close to the point of the mistake, and you
17631 can quickly find them by using the
17633 Navigate\SpecialChar \menuseparator
17636 menu item, or the shortcut key
17645 Open the error boxes by clicking on them with the mouse, or use the shortcut
17654 bindings, or the corresponding
17663 Read the warning and correct the mistake, if it is a mistake.
17664 If you have trouble understanding what the warning is about, you can safely
17666 Remember that there is a hidden layer between the document on screen and
17667 the technical details in invoking
17671 , and this gap can make some warnings seem arcane or just right down plain
17675 \begin_layout Standard
17676 This document is an excellent testing bed for the feature, and it should
17677 provide quite a few warnings for you to fiddle with.
17678 Since computers are only so smart, expect most of the warnings to be false
17682 \begin_layout Subsection
17683 How to fine tune it
17686 \begin_layout Standard
17687 Sometimes, you'll find that
17691 makes more noise than suits your mood.
17692 Then you can choose not to use it, wait until your mood changes, or try
17697 to get better along with you.
17698 Another choice in the most desperate situations is to use
17700 View\SpecialChar \menuseparator
17702 \begin_inset space ~
17706 \begin_inset space ~
17710 \begin_inset space ~
17715 , which will get rid of all warnings instantly.
17718 \begin_layout Standard
17727 very configurable and extensible, you shouldn't expect to solve all problems
17733 Since LyX has to generate a somewhat special LaTeX file to be able to match
17734 the line numbers from the
17742 \begin_layout Plain Layout
17743 You can inspect the specific output from
17749 Edit\SpecialChar \menuseparator
17751 \begin_inset space ~
17755 \begin_inset space ~
17769 to the internal document structure, some of the warnings will not seen
17770 to appear correctly.
17771 There are two things you can do about this:
17774 \begin_layout Itemize
17779 invocation command line in
17795 installation configuration file (usually with the file
17800 See below to learn what warnings can be enabled and disabled on the command
17805 \begin_layout Itemize
17806 Export your document as a raw LaTeX file using
17808 File\SpecialChar \menuseparator
17809 Export\SpecialChar \menuseparator
17817 Invoked in this way, it can be a hassle to find the corresponding place
17818 in the document inside LyX, but with a little patience, you should be able
17822 \begin_layout Standard
17823 Here follows the warning messages that can be enabled and disabled in
17832 to disable a warning, and
17836 to enable a warning.
17837 The emphasized entries are disabled by default, because the default is
17840 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
17845 \begin_layout Standard
17846 Notice that you should only use the options that enable and disable warnings,
17847 because LyX relies on some of the other command line parameters to be set
17848 in a specific way to have a chance to communicate with
17855 \begin_layout Enumerate
17859 Command terminated with space.
17862 \begin_layout Enumerate
17865 Non-breaking space (
17866 \begin_inset Quotes eld
17874 \begin_inset Quotes erd
17877 ) should have been used.
17880 \begin_layout Enumerate
17884 You should enclose the previous parenthesis with
17885 \begin_inset Quotes eld
17893 \begin_inset Quotes erd
17899 \begin_layout Enumerate
17902 Italic correction (
17903 \begin_inset Quotes eld
17913 \begin_inset Quotes erd
17916 ) found in non-italic buffer.
17919 \begin_layout Enumerate
17922 Italic correction (
17923 \begin_inset Quotes eld
17933 \begin_inset Quotes erd
17936 ) found more than once.
17939 \begin_layout Enumerate
17943 No italic correction (
17944 \begin_inset Quotes eld
17954 \begin_inset Quotes erd
17960 \begin_layout Enumerate
17964 \begin_inset Quotes eld
17972 \begin_inset Quotes erd
17976 \begin_inset Quotes eld
17984 \begin_inset Quotes erd
17990 \begin_layout Enumerate
17993 Wrong length of dash may have been used.
17996 \begin_layout Enumerate
18000 \begin_inset Quotes eld
18008 \begin_inset Quotes erd
18012 \begin_inset Quotes eld
18020 \begin_inset Quotes erd
18026 \begin_layout Enumerate
18030 \begin_inset Quotes eld
18038 \begin_inset Quotes erd
18044 \begin_layout Enumerate
18048 \begin_inset Quotes eld
18056 \begin_inset Quotes erd
18059 to achieve an ellipsis.
18062 \begin_layout Enumerate
18065 Inter-word spacing (
18066 \begin_inset Quotes eld
18076 \begin_inset Quotes eld
18079 ) should perhaps be used.
18082 \begin_layout Enumerate
18085 Inter-sentence spacing (
18086 \begin_inset Quotes eld
18096 \begin_inset Quotes erd
18099 ) should perhaps be used.
18102 \begin_layout Enumerate
18105 Could not find argument for command.
18108 \begin_layout Enumerate
18112 \begin_inset Quotes eld
18120 \begin_inset Quotes erd
18126 \begin_layout Enumerate
18129 Math mode still on at end of LaTeX file.
18132 \begin_layout Enumerate
18136 \begin_inset Quotes eld
18144 \begin_inset Quotes erd
18147 doesn't match the number of
18148 \begin_inset Quotes eld
18156 \begin_inset Quotes erd
18162 \begin_layout Enumerate
18165 You should use either
18168 \begin_inset Quotes eld
18176 \begin_inset Quotes erd
18181 as an alternative to
18182 \begin_inset Quotes eld
18190 \begin_inset Quotes erd
18196 \begin_layout Enumerate
18203 " (ASCII 39) instead of "
18210 \begin_layout Enumerate
18213 User-specified pattern found.
18216 \begin_layout Enumerate
18219 This command might not be intended.
18222 \begin_layout Enumerate
18229 \begin_layout Enumerate
18247 \begin_layout Enumerate
18250 Delete this space to maintain correct page references.
18253 \begin_layout Enumerate
18257 You might wish to put this between a pair of
18258 \begin_inset Quotes eld
18266 \begin_inset Quotes erd
18272 \begin_layout Enumerate
18275 You ought to remove spaces in front of punctuation.
18278 \begin_layout Enumerate
18281 Could not execute LaTeX command.
18284 \begin_layout Enumerate
18293 in front of small punctuation.
18296 \begin_layout Enumerate
18304 may look prettier here.
18307 \begin_layout Enumerate
18311 Multiple spaces detected in output.
18314 \begin_layout Enumerate
18317 This text may be ignored.
18320 \begin_layout Enumerate
18326 \begin_inset Quotes eld
18331 to begin quotation, not
18338 \begin_layout Enumerate
18345 to end quotation, not
18348 \begin_inset Quotes eld
18356 \begin_layout Enumerate
18362 \begin_layout Enumerate
18365 You should perhaps use
18366 \begin_inset Quotes eld
18374 \begin_inset Quotes erd
18380 \begin_layout Enumerate
18383 You should put a space in front of/after parenthesis.
18386 \begin_layout Enumerate
18389 You should avoid spaces in front of/after parenthesis.
18392 \begin_layout Enumerate
18396 You should not use punctuation in front of/after quotes.
18399 \begin_layout Enumerate
18402 Double space found.
18405 \begin_layout Enumerate
18408 You should put punctuation outside inner/inside display math mode.
18411 \begin_layout Enumerate
18414 You ought to not use primitive TeX in LaTeX code.
18417 \begin_layout Enumerate
18420 You should remove spaces in front of
18421 \begin_inset Quotes eld
18429 \begin_inset Quotes erd
18435 \begin_layout Enumerate
18438 \begin_inset Quotes eld
18446 \begin_inset Quotes erd
18449 is normally not followed by
18450 \begin_inset Quotes eld
18458 \begin_inset Quotes erd
18464 \begin_layout Standard
18465 In later versions of LyX, we hope to provide a more complete interface to
18466 this tool (and it's smaller cousin
18470 ) to exploit the full power of it.
18471 But it's not exactly useless as it is now: go try it on one of your existing
18472 documents of a certain length and be surprised.
18475 \begin_layout Section
18476 Version Control in LyX
18479 \begin_layout Standard
18482 Lars Gullik Bjønnes
18489 \begin_layout Subsection
18493 \begin_layout Standard
18494 A friend of mine wanted to try LyX for a group project.
18495 When he didn't find support for version control or file locking, he dropped
18497 This angered me a bit, so I thought that I should at least make support
18498 for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
18499 This has now been done.
18500 LyX now supports some of the most basic RCS commands.
18501 If you need to something a bit more sophisticated you will have to do that
18502 manually in a terminal.
18505 \begin_layout Standard
18506 Before you begin to use the version control features in LyX, you should
18508 \begin_inset Quotes eld
18512 \begin_inset Quotes erd
18515 (a man file, read it with
18520 This file describes all the basic features of RCS.
18521 You should especially notice the comment about a RCS directory, and the
18522 notion of a master RCS file (the file ending in
18529 \begin_layout Standard
18530 Later basic CVS/SVN support was added.
18531 You should be familiar with CVS/SVN usage before start using it under LyX.
18532 Most of the log messages are not currently displayed after operations -
18533 you can check them in Messages pane if unsure.
18536 \begin_layout Standard
18537 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18538 package—no guarantees are made for older versions.
18541 \begin_layout Standard
18542 For introducing your own external commands consult vc-command in the manual
18546 \begin_layout Subsection
18547 RCS commands in LyX
18550 \begin_layout Standard
18551 The following sections describe the RCS commands supported by LyX.
18552 You can find them in the
18554 File\SpecialChar \menuseparator
18556 \begin_inset space ~
18562 LyX was tested against RCS 5.7.
18565 \begin_layout Subsubsection
18571 \begin_layout Standard
18572 If your document is not under revision control, this is the only item shown
18574 And if it is under revision control, the
18578 item is not visible.
18582 \begin_layout Standard
18583 This command registers your document with RCS (unless you are under the
18584 directory managed by CVS)\SpecialChar \@.
18585 You are asked interactively to supply an initial
18586 description of the document.
18587 The document is now set in Read-Only mode and you have to
18590 \begin_inset space ~
18594 \begin_inset space ~
18598 \begin_inset space ~
18603 , before making any changes to it.
18604 A document under revision control has a
18605 \begin_inset Quotes eld
18608 [RCS:<version> <locker>]
18609 \begin_inset Quotes erd
18612 item tagged to the filename in the minibuffer.
18615 \begin_layout Standard
18616 RCS command that is run:
18618 ci -q -u -i -t-"<initial description>" <file-name>
18621 \begin_layout Standard
18626 to understand the switches.
18630 \begin_layout Subsubsection
18636 \begin_layout Standard
18637 When you are finished editing a file, you check in your changes.
18638 When you do this, you are asked for a description of the changes.
18639 This is stored in the history log.
18640 The version number is bumped, your changes are applied to the master RCS
18641 file, the document is unlocked and set to Read-Only mode.
18645 \begin_layout Standard
18648 ci -q -u -m"<description>" <file-name>
18651 \begin_layout Subsubsection
18657 \begin_layout Standard
18658 By doing this you lock the document so that only you can edit it.
18659 This will also make the document Read-Write only for you.
18660 You will usually continue editing for a while and when you are finished
18661 you check in your changes.
18662 The status line is changed to reflect that you have locked the file.
18666 \begin_layout Standard
18669 co -q -l <file-name>
18672 \begin_layout Subsubsection
18675 Revert To Repository Version
18678 \begin_layout Standard
18679 This will discard all changes made to the document since the last check
18681 You get a warning before changes are discarded.
18684 \begin_layout Standard
18687 co -f -u<version> <file-name>
18690 \begin_layout Subsubsection
18696 \begin_layout Standard
18697 This makes as if the last check in never happened.
18698 No changes are made to the document loaded into LyX, but the last version
18699 is removed from the master RCS file.
18703 \begin_layout Standard
18706 rcs -o<version> <file-name>
18709 \begin_layout Subsubsection
18715 \begin_layout Standard
18716 This show the complete history of the RCS document.
18721 is shown in a browser.
18729 \begin_layout Subsubsection
18733 \begin_layout Standard
18734 LyX supports RCS version number information (only), see
18735 \begin_inset CommandInset ref
18737 reference "sub:VCS-Revision-Information"
18744 \begin_layout Subsection
18745 CVS commands in LyX
18748 \begin_layout Standard
18749 CVS is now partially supported by LyX.
18750 You can find the commands in the
18752 File\SpecialChar \menuseparator
18754 \begin_inset space ~
18760 Focus of the development moved to SVN support, so please use it instead
18761 of CVS if possible.
18764 \begin_layout Subsubsection
18770 \begin_layout Standard
18771 If your document is not under revision control, this is the only item shown
18773 And if it is under revision control, the
18780 item is not visible.
18784 \begin_layout Standard
18785 This command registers in CVS your document ONLY in case you have already
18786 the documents directory under CVS control (in particular
18791 This means you have to checkout the archive by yourself.
18795 \begin_layout Standard
18796 Then you are asked interactively to supply an initial description of the
18798 Don't forget that registered file is not yet commited.
18801 \begin_layout Standard
18802 CVS command that is run:
18805 \begin_inset Quotes erd
18809 \begin_inset Quotes eld
18813 \begin_inset Quotes erd
18819 \begin_layout Standard
18824 to understand the switches.
18828 \begin_layout Subsubsection
18834 \begin_layout Standard
18835 When you are finished editing a file, you commit your changes.
18836 When you do this, you are asked for a description of the changes.
18837 After that changes are commited.
18840 \begin_layout Standard
18843 cvs -q commit -m"<description>" "<file-name>"
18846 \begin_layout Subsubsection
18849 Revert To Repository Version
18852 \begin_layout Standard
18853 This will discard all changes made to the document since the last check
18855 You get a warning before changes are discarded.
18856 Firstly the file is deleted, secondly CVS update command is run.
18859 \begin_layout Standard
18863 \begin_inset Quotes eld
18867 \begin_inset Quotes erd
18873 \begin_layout Subsubsection
18879 \begin_layout Standard
18880 This show the complete history of the CVS document.
18884 \begin_inset Quotes eld
18888 \begin_inset Quotes erd
18893 is shown in a browser.
18896 \begin_layout Subsection
18897 SVN commands in LyX
18900 \begin_layout Standard
18901 SVN is now partially supported by LyX.
18902 You can find the commands in the
18904 File\SpecialChar \menuseparator
18906 \begin_inset space ~
18912 Please note that if you use password protected access to repository via
18913 ssh, you will be asked in terminal window.
18914 LyX was tested against SVN 1.5 and 1.6
18918 \begin_layout Plain Layout
18919 Most of the commands will work with 1.4 too, see
18920 \begin_inset CommandInset ref
18922 reference "sub:SVN-Repo-Update"
18934 \begin_layout Subsubsection
18940 \begin_layout Standard
18941 If your document is not under revision control, this is the only item shown
18943 And if it is under revision control, the
18950 item is not visible.
18954 \begin_layout Standard
18955 This command registers in SVN your document ONLY in case you have already
18956 the documents directory under SVN control (in particular
18961 This means you have to checkout the archive by yourself.
18965 \begin_layout Standard
18966 Then you are asked interactively to supply an initial description of the
18968 Don't forget that registered file is not yet commited.
18971 \begin_layout Standard
18972 SVN command that is run:
18975 \begin_inset Quotes eld
18979 \begin_inset Quotes erd
18985 \begin_layout Standard
18990 to understand the switches.
18994 \begin_layout Subsubsection
19000 \begin_layout Standard
19001 When you are finished editing a file, you commit your changes.
19002 When you do this, you are asked for a description of the changes.
19003 After that changes are commited.
19006 \begin_layout Standard
19011 \begin_layout Plain Layout
19012 In case locking is not enabled.
19014 \begin_inset CommandInset ref
19016 reference "subsec:SVN-File-Locking"
19027 svn commit -q -m"<description>" <file-name>
19030 \begin_layout Subsubsection
19036 \begin_layout Standard
19037 Updates the changes of this file from the repository.
19038 Be sure you understand SVN merging and conflicts resolving before using
19039 this function, because all conflicts has to be resolved manually by you!
19042 \begin_layout Standard
19047 \begin_layout Plain Layout
19055 svn update --non-interactive
19056 \begin_inset Quotes eld
19060 \begin_inset Quotes erd
19066 \begin_layout Subsubsection
19069 Revert To Repository Version
19072 \begin_layout Standard
19073 This will discard all changes made to the document since the last check
19075 You get a warning before changes are discarded.
19079 \begin_layout Standard
19083 \begin_inset Quotes eld
19087 \begin_inset Quotes erd
19093 \begin_layout Subsubsection
19094 \begin_inset CommandInset label
19096 name "sub:SVN-Repo-Update"
19100 Update of the local directory checkout from repository
19104 \begin_layout Plain Layout
19105 Note that this command will work only with subversion
19106 \begin_inset Formula $\geqq1.5$
19117 \begin_layout Standard
19118 All the commands above have one shortcomming - they deal with the current
19120 Once your document contains pictures, includes external
19121 \begin_inset Flex CharStyle:Code
19124 \begin_layout Plain Layout
19130 files and so on administration becomes more complicated.
19131 LyX now supports updating the whole tree in which resides the document
19135 \begin_layout Plain Layout
19136 One need to organize the files structure so that all external files are
19137 in the same directory or subdirectories of the document.
19144 This become especially useful once you cooperate with people which neither
19145 know about subversion management nor they have ambition to commit additional
19146 material to the repository.
19150 \begin_layout Standard
19151 \begin_inset Flex CharStyle:Code
19154 \begin_layout Plain Layout
19155 Update local directory from repository
19160 command updates the whole directory and in case of merge conflicts local
19161 version of the files are left, so no unintended data loss occurs.
19162 If local changes are detected user is warned before update starts.
19165 \begin_layout Labeling
19166 \labelwidthstring 00.00.0000
19168 \begin_inset space ~
19172 \begin_inset space ~
19176 \begin_inset Newline newline
19180 \begin_inset Flex CharStyle:Code
19183 \begin_layout Plain Layout
19189 (Ask if changes are detected.)
19190 \begin_inset Newline newline
19194 \begin_inset Flex CharStyle:Code
19197 \begin_layout Plain Layout
19198 svn update --accept mine-full $path
19206 \begin_layout Standard
19208 \begin_inset Flex CharStyle:Code
19211 \begin_layout Plain Layout
19217 stands for the path to the document.
19220 \begin_layout Subsubsection
19226 \begin_layout Standard
19227 This show the complete history of the SVN document.
19231 \begin_inset Quotes eld
19235 \begin_inset Quotes erd
19240 is shown in a browser.
19243 \begin_layout Subsubsection
19245 \begin_inset CommandInset label
19247 name "subsec:SVN-File-Locking"
19254 \begin_layout Standard
19255 The file exchange through various revision control systems brings the problem
19256 of merge conflicts in case two different users try to edit the same (parts
19258 When such conflict happens it needs manual resolving and one reasonable
19259 alternative is to provide some kind of locking mechanism, which guarantees
19260 that only one user is allowed to edit file at the given time.
19263 \begin_layout Standard
19264 SVN has two mechanisms to provide such kind of mutual exclusivity for file
19265 access - locks and automatical setting of write permissions (see sec.
19267 \begin_inset CommandInset ref
19269 reference "subsec:Automatical-Locking-Property"
19274 \begin_inset Flex CharStyle:Code
19277 \begin_layout Plain Layout
19287 \begin_layout Plain Layout
19288 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
19294 In a case this property is detected for a given document LyX starts to
19295 use SVN locks for document editing automatically and the whole check-in/out
19296 mechanism switches to the same regimen as for RCS.
19297 This in particular means there are two different modes how file is used
19301 \begin_layout Itemize
19303 The loaded file is in the read-only mode.
19304 For editation on needs to check-out.
19309 consists of update from repository and gaining write lock.
19310 If the lock is not possible to obtain, we remain in unlocked state.
19313 \begin_layout Itemize
19315 The loaded file is in the 'normal' edit mode.
19316 No other user is allowed to edit the file.
19321 consists of commiting changes and releasing write-lock.
19322 If no changes have been made to the document, no commit will be produced
19326 \begin_layout Plain Layout
19327 Don't be puzzled by the fact that you will be asked for commit message anyway.
19332 and only the write-lock will be released.
19335 \begin_layout Standard
19339 \begin_layout Labeling
19340 \labelwidthstring 00.00.0000
19343 svn commit -q -m"<description>" "<file-name>"
19344 \begin_inset Newline newline
19347 svn unlock "<file-name>"
19350 \begin_layout Labeling
19351 \labelwidthstring 00.00.0000
19354 svn update "<file-name>"
19355 \begin_inset Newline newline
19358 svn lock "<file-name>"
19361 \begin_layout Subsubsection
19364 \begin_inset CommandInset label
19366 name "subsec:Automatical-Locking-Property"
19372 Automatical Locking Property
19375 \begin_layout Standard
19376 The above mentioned automatical setting of write permissions of the .lyx
19377 file can be set through
19382 ile\SpecialChar \menuseparator
19388 \begin_inset space ~
19391 Control\SpecialChar \menuseparator
19396 oggle locking property
19399 This command is active only when the file is not locked on the svn server
19401 you need to check-out before proceeding).
19404 \begin_layout Labeling
19405 \labelwidthstring 00.00.0000
19407 \begin_inset space ~
19413 \begin_layout Labeling
19414 \labelwidthstring 00.00.0000
19417 svn propset svn:needs-lock ON "<file-name>"
19420 \begin_layout Labeling
19421 \labelwidthstring 00.00.0000
19424 svn propdel svn:needs-lock "<file-name>"
19427 \begin_layout Subsubsection
19428 \begin_inset CommandInset label
19430 name "sub:VCS-Revision-Information"
19434 Revision Information in Documents
19437 \begin_layout Standard
19438 There are more possibilities how to activate revision information in our
19442 \begin_layout Itemize
19443 LyX supports directly:
19447 \begin_layout Itemize
19448 tree revision information (
19449 \begin_inset Flex CharStyle:Code
19452 \begin_layout Plain Layout
19459 The result is the output of the
19460 \begin_inset Flex CharStyle:Code
19463 \begin_layout Plain Layout
19469 command, the following table gives you an idea, how to read the results.
19472 \begin_layout Standard
19474 \begin_inset Tabular
19475 <lyxtabular version="3" rows="6" columns="2">
19476 <features tabularvalignment="middle">
19477 <column alignment="center" valignment="top" width="0">
19478 <column alignment="center" valignment="top" width="0">
19480 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
19483 \begin_layout Plain Layout
19489 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
19492 \begin_layout Plain Layout
19500 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19503 \begin_layout Plain Layout
19509 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19512 \begin_layout Plain Layout
19513 mixed revision working copy
19520 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19523 \begin_layout Plain Layout
19529 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19532 \begin_layout Plain Layout
19533 modified working copy
19540 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19543 \begin_layout Plain Layout
19549 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19552 \begin_layout Plain Layout
19553 switched working copy
19560 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19563 \begin_layout Plain Layout
19569 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19572 \begin_layout Plain Layout
19573 partial working copy, from a sparse checkout
19580 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
19583 \begin_layout Plain Layout
19589 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
19592 \begin_layout Plain Layout
19593 mixed revision, modified, switched working copy
19606 \begin_layout Itemize
19607 file revision information.
19608 The result comes from parsing the output of
19609 \begin_inset Flex CharStyle:Code
19612 \begin_layout Plain Layout
19614 \begin_inset space ~
19618 \begin_inset space ~
19622 \begin_inset space ~
19631 Supported flags are:
19635 \begin_layout Itemize
19636 version number of the last commit (
19637 \begin_inset Flex CharStyle:Code
19640 \begin_layout Plain Layout
19649 \begin_layout Itemize
19650 author of the last commit (
19651 \begin_inset Flex CharStyle:Code
19654 \begin_layout Plain Layout
19663 \begin_layout Itemize
19664 date of the last commit (
19665 \begin_inset Flex CharStyle:Code
19668 \begin_layout Plain Layout
19677 \begin_layout Itemize
19678 time of the last commit (
19679 \begin_inset Flex CharStyle:Code
19682 \begin_layout Plain Layout
19692 \begin_layout Standard
19693 You can obtain this info via InsetInfo (e.g.
19695 \begin_inset Flex CharStyle:Code
19698 \begin_layout Plain Layout
19699 info-insert buffer vcs-date
19705 The information will be available only when you have the file stored under
19706 svn managment (i.e.
19708 \begin_inset Flex CharStyle:Code
19711 \begin_layout Plain Layout
19717 directory is available with your document).
19721 \begin_layout Itemize
19722 Another---a hacking one---possibility is to use svn keywords
19726 \begin_layout Plain Layout
19727 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
19733 In short -- you set file keywords property (e.g.
19736 svn propset svn:keywords 'Rev' file.lyx
19738 ) and then paste keyword ERT
19742 \begin_layout Plain Layout
19743 This is an easy way how to ensure that LyX won't break the line in the middle
19749 tag in your document (e.g.
19754 \begin_layout Plain Layout
19762 This way svn client will automatically substitute revision number (e.g.
19767 \begin_layout Plain Layout
19774 ) after each update and commit.
19775 There are more problems with this approach.
19776 Firstly, the '$' character is used in TeX world for math equations, so
19777 any occurence of math formula
19778 \begin_inset Formula $Rev$
19782 \begin_inset Formula $Rev:59$
19785 in your LyX document.
19786 Similarly for other keywords like Id, Date, Author, etc.
19787 Secondly svn output is dependent on your locales, so its very easy that
19788 svn would produce some problematic strings once Date is used.
19789 Thirdly you get the whole 'Rev: 59' string in your document instead of
19791 Until subversion implements user's custom keywords it will be hard to use
19792 this approach reliably or let LyX to support it directly.
19795 \begin_layout Subsection
19796 SVN and Windows Environment
19799 \begin_layout Quote
19800 My inclination is to say that if the user cannot figure out the command
19801 line operations on their own fairly quickly, they would be well advised
19802 to use TortoiseSVN.
19808 \begin_layout Subsubsection
19812 \begin_layout Standard
19813 In addition to installing LyX, and having access to a Subversion repository,
19814 the user will need to install the Subversion client program.
19815 A Windows installer for the client program is available from
19816 \begin_inset CommandInset href
19819 target "http://www.collab.net/nonav/downloads/subversion/"
19824 The user may also want to install
19825 \begin_inset CommandInset href
19828 target "http://tortoisesvn.tigris.org/"
19832 , which integrates Subversion operations into the context (rightclick) menu
19833 of Windows Explorer.
19834 Operations done outside LyX will typically be more convenient using the
19835 Explorer context menu.
19836 Note that TortoiseSVN is not a replacement for the client program, which
19837 is what LyX itself will use.
19840 \begin_layout Subsubsection
19841 Bringing a document under Subversion control
19844 \begin_layout Standard
19845 Before a LyX document can be brought under version control in Subversion,
19846 its parent directory needs to be under version control.
19847 If the document is being added to a project already in the repository,
19848 this is accomplished by checking the project out to the directory where
19849 the new document will be placed.
19850 If the project itself is not yet under version control (for instance, if
19851 this document starts a new project), the directory must be imported into
19853 This is done outside LyX.
19854 Both import and checkout are easily accomplished from the Explorer context
19855 menu using TortoiseSVN, or alternatively can be done using the command
19856 line client at a DOS prompt.
19857 The procedure for importing the project using TortoiseSVN is described
19858 below, assuming an existing repository and a new project being started
19866 For information on using the Subversion client program, run
19873 \begin_layout Enumerate
19880 in Windows Explorer, right click it, and select
19882 TortoiseSVN > Repo-browser
19885 If necessary, adjust the URL for the repository, then click OK.
19888 \begin_layout Enumerate
19889 Right click the level of the repository under which you want to place the
19890 new project folder (typically the top level) and click
19892 Create folder\SpecialChar \ldots{}
19895 Supply a name for the project folder and click OK.
19896 Add a message for the log file if desired, then click OK again.
19897 The new project folder should appear in the repository.
19898 Finally, click OK again to exit the repository browser.
19901 \begin_layout Enumerate
19902 Once again right click
19908 , this time selecting SVN Checkout\SpecialChar \ldots{}
19909 Select the URL of the project folder
19910 you just created in the repository, and set the checkout directory to
19918 You will be warned about a non-empty folder; click OK to proceed.
19919 You should now have a
19930 \begin_layout Enumerate
19931 Create or open your document in LyX and click
19936 ile\SpecialChar \menuseparator
19942 \begin_inset space ~
19945 Control\SpecialChar \menuseparator
19953 Add a log message and click OK to commit the document to version control.
19956 \begin_layout Standard
19957 From this point onward, you should have full functionality in the
19962 ile\SpecialChar \menuseparator
19968 \begin_inset space ~
19974 You also have the option of checking the document in and out, viewing its
19976 using the TortoiseSVN context menu in Windows Explorer or the Subversion
19977 client program from a command prompt.
19980 \begin_layout Subsubsection
19981 SSH tunel used with SVN under Windows
19984 \begin_layout Standard
19985 Compared to linux setting svn client to communicate over ssh under Windows
19986 is rather troublesome task.
19987 We will at least make some hints how to setup client side but former knowledge
19988 about ssh and Windows command line is needed, also be prepared for a great
19989 deal of frustration...
19992 \begin_layout Enumerate
19993 Get svn client for windows, as described in previous sections.
19994 When it is fresh install run some svn command (e.g.
19996 \begin_inset Flex CharStyle:Code
19999 \begin_layout Plain Layout
20005 ) to have created config files, which you will need to change later on.
20008 \begin_layout Enumerate
20009 Choose ssh client for Windows.
20010 There are more possibilities, we will use the one from Putty tools
20014 \begin_layout Plain Layout
20015 \begin_inset Flex URL
20018 \begin_layout Plain Layout
20020 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20031 You will need to automatize connection, so client doesn't ask for any password
20033 To keep things easy we will use only keys without any additional password
20038 \begin_layout Enumerate
20040 \begin_inset Flex CharStyle:Code
20043 \begin_layout Plain Layout
20050 Save your private .ppk key file and put the public one on the server side.
20051 In case the SVN server runs on linux, note that the format of the public
20052 key is not compatible with linux openssh and you will need to direcly copy-past
20053 e the key from the “
20055 Public key for pasting into OpenSSH authorized_keys file
20057 :” edit field into the server's
20058 \begin_inset Flex CharStyle:Code
20061 \begin_layout Plain Layout
20062 ~/.ssh/authorized_keys
20068 \begin_inset Flex CharStyle:Code
20071 \begin_layout Plain Layout
20080 \begin_layout Enumerate
20082 \begin_inset Flex CharStyle:Code
20085 \begin_layout Plain Layout
20092 In the SVN config file
20096 \begin_layout Plain Layout
20097 Exact path depends on Windows version, usually somewhere around
20098 \begin_inset Flex CharStyle:Code
20101 \begin_layout Plain Layout
20104 Documents and Settings
20118 \begin_inset Flex CharStyle:Code
20121 \begin_layout Plain Layout
20136 , section [tunnels], setup ssh command, e.g.
20138 \begin_inset Flex CharStyle:Code
20141 \begin_layout Plain Layout
20142 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20151 \begin_layout Plain Layout
20152 It will usually take a lot of time to get exact command right and it depends
20154 For example do not have some remote server saved as a default session in
20156 If things fail, try to connect via plink without SVN first.
20165 \begin_layout Enumerate
20166 Checkout the SVN archive, e.g.
20168 \begin_inset Flex CharStyle:Code
20171 \begin_layout Plain Layout
20172 svn co svn+ssh://user@server/repository_path
20180 \begin_layout Subsection
20184 \begin_layout Standard
20185 With the recent addition of the vc-command function LyX power users are
20186 allowed to create their own commands for revision control.
20189 \begin_layout Standard
20190 As an example you can see how two TortoiseSVN commands could be integrated
20194 \begin_layout Description
20196 \begin_inset Flex CharStyle:Code
20199 \begin_layout Plain Layout
20200 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
20208 \begin_layout Description
20210 \begin_inset Flex CharStyle:Code
20213 \begin_layout Plain Layout
20214 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
20222 \begin_layout Section
20223 Literate Programming
20226 \begin_layout Standard
20231 (kayvan@sylvan.com)
20235 original documentation written by
20237 Edmar Wienskoski Jr.
20240 (edmar-w-jr@technologist.com)
20243 \begin_layout Subsection
20247 \begin_layout Standard
20248 The main purpose of this documentation is to show you how to use LyX for
20249 literate programming.
20250 Where it is assumed that you are familiar with this programming technique,
20252 \begin_inset Quotes eld
20256 \begin_inset Quotes erd
20260 \begin_inset Quotes eld
20264 \begin_inset Quotes erd
20268 If that is not the case, please follow the web links provided in the following
20270 There is a lot of good documentation out there covering old development
20271 history to the latest tools tips.
20274 \begin_layout Standard
20275 It is also assumed that you are familiar with LyX itself to a point that
20276 you are comfortable changing your LyX preferences, and X resources file.
20277 If that is not the case please refer to other LyX documentation to cover
20278 your specific needs.
20281 \begin_layout Subsection
20282 Literate Programming
20285 \begin_layout Standard
20286 From the Literate Programming FAQ:
20289 \begin_layout Quotation
20290 Literate programming is the combination of documentation and source together
20291 in a fashion suited for reading by human beings.
20292 In fact, literate programs should be enjoyable reading, even inviting!
20293 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
20294 and documentation in a single file.
20295 Literate programming tools then parse the file to produce either readable
20296 documentation or compilable source.
20297 The WEB style of literate programming was created by D.
20298 \begin_inset space \thinspace{}
20302 Knuth during the development of his TeX typesetting software.
20306 \begin_layout Standard
20307 Another excerpt says:
20310 \begin_layout Quotation
20313 How is literate programming different from verbose commenting?
20316 \begin_layout Quotation
20317 There are three distinguishing characteristics.
20318 In order of importance, they are:
20322 \begin_layout Itemize
20323 flexible order of elaboration
20326 \begin_layout Itemize
20327 automatic support for browsing
20330 \begin_layout Itemize
20331 typeset documentation, especially diagrams and mathematics
20335 \begin_layout Standard
20336 Now that I sparked your curiosity, take a look in the references.
20339 \begin_layout Subsubsection
20343 \begin_layout Standard
20344 The complete Literate Programming FAQ can be found at:
20347 \begin_layout Quote
20348 Literate Programming FAQ
20349 \begin_inset Flex URL
20352 \begin_layout Plain Layout
20354 http://shelob.ce.ttu.edu/daves/lpfaq/faq.html
20362 \begin_layout Standard
20363 The FAQ lists 23 (twenty three!) different literate programming tools.
20364 Where some are specialized or
20365 \begin_inset Quotes eld
20369 \begin_inset Quotes erd
20372 for particular programming languages, while other have general scope.
20377 for my own use for several reasons:
20380 \begin_layout Itemize
20381 It can generate the documentation either in LaTeX or HTML.
20384 \begin_layout Itemize
20385 It has a open architecture, i.
20386 \begin_inset space \thinspace{}
20390 \begin_inset space \space{}
20393 it is easy to plug in new filters and to perform special processing that
20398 \begin_layout Itemize
20399 There is a good selection of filters available already (the HTML is one
20403 \begin_layout Itemize
20407 \begin_layout Standard
20408 The Noweb web page can be found at:
20411 \begin_layout Quote
20413 \begin_inset Flex URL
20416 \begin_layout Plain Layout
20418 http://www.cs.virginia.edu/~nr/noweb/
20426 \begin_layout Standard
20427 Starting from there you can reach many other interesting links and even
20428 some literate program examples.
20431 \begin_layout Subsection
20432 LyX and Literate Programming
20435 \begin_layout Standard
20436 The LyX support for Literate Programming is provided by using the generic
20437 LyX converters mechanism.
20438 This support is provided in a
20439 \begin_inset Quotes eld
20443 \begin_inset Quotes erd
20447 \begin_inset space \thinspace{}
20451 \begin_inset space \space{}
20454 you will be able to use this new LyX feature with some other literate programmin
20455 g tool of your choice by just changing your LyX preferences.
20458 \begin_layout Subsubsection
20459 Generating documents and code (weaving and tangling)
20462 \begin_layout Paragraph
20463 Selecting the document class
20466 \begin_layout Standard
20467 If you have installed Noweb and LyX successfully, whenever you open a new
20468 document or try to change the document class of an existing one, you will
20469 find that there are three new document classes available:
20472 \begin_layout Itemize
20476 \begin_layout Itemize
20480 \begin_layout Itemize
20484 \begin_layout Standard
20485 You must select one of them to create your literate documents from.
20489 \begin_layout Standard
20490 Note that literate documents are not limited to these three classes.
20491 New classes can be generated from other styles like letter or in combination
20492 with other class variations like Article (AMS).
20493 If you have special needs that cannot be covered by one of the existing
20494 classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
20495 will arrange to insert a new entry, or teach you how to do it.
20499 \begin_layout Plain Layout
20500 It is very simple, it involves the creation of a file with four lines, and
20501 re-running of the auto configuration.
20506 Moreover, if you use a literate tool other than Noweb you may need to create
20507 a new set of document classes for it.
20510 \begin_layout Paragraph
20514 \begin_layout Standard
20515 LyX enables you to write code with a layout named
20523 \begin_layout Plain Layout
20524 The equivalent Noweb term is
20525 \begin_inset Quotes eld
20529 \begin_inset Quotes erd
20533 For historical reasons, I got used to the term
20534 \begin_inset Quotes eld
20538 \begin_inset Quotes erd
20541 introduced by other literate tool named Nuweb, which I used for many years
20542 before rendering myself to Noweb.
20547 Noweb delimits scraps like this:
20550 \begin_layout LyX-Code
20554 \begin_layout LyX-Code
20558 \begin_layout LyX-Code
20562 \begin_layout LyX-Code
20566 \begin_layout LyX-Code
20570 \begin_layout Standard
20571 The problem is that whatever is written in between the << and the
20575 must be taken literally, i.
20576 \begin_inset space \thinspace{}
20580 \begin_inset space \space{}
20583 LyX should be prevented from making any special interpretation of what has
20585 This is handled by a special layout named Scrap, that works like a normal
20586 paragraph but has a free spacing capability.
20589 \begin_layout Standard
20590 The down side of the Scrap paragraph layout is that consecutive paragraphs
20591 of code will be spaced with one empty line in the source code and also
20592 in the printed documentation.
20593 The work around is to enter each line of code within a single Scrap, with
20594 a newline (ctrl-return).
20595 The example above will look like this:
20599 \begin_layout Plain Layout
20600 If you have a printed version of this document you will not see any difference
20601 between the previous example and this one.
20609 \begin_layout LyX-Code
20611 \begin_inset Newline newline
20615 \begin_inset Newline newline
20619 \begin_inset Newline newline
20623 \begin_inset Newline newline
20629 \begin_layout Standard
20630 This layout works fine.
20631 The only real inconvenience is that you have to type ctrl-return instead
20636 \begin_layout Plain Layout
20637 It is in my list of
20638 \begin_inset Quotes eld
20642 \begin_inset Quotes erd
20653 \begin_layout Standard
20654 As a special note, you can also use the
20655 \begin_inset Quotes eld
20659 \begin_inset Quotes erd
20662 construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
20666 \begin_layout LyX-Code
20668 \begin_inset Newline newline
20671 def some_function(args):
20672 \begin_inset Newline newline
20675 "This is the doc string for this function."
20676 \begin_inset Newline newline
20679 print "My args: ", args
20682 \begin_layout LyX-Code
20683 @ %def some_function
20686 \begin_layout Standard
20687 For an example of this usage and the resulting cross-reference output, look
20688 at the Literate python program in
20690 LIBDIR/examples/listerrors.lyx
20692 which should make this all clear.
20695 \begin_layout Paragraph
20696 Generating the documentation
20699 \begin_layout Standard
20700 At this point you already have a new document file with a proper document
20701 class, and with some code and text on it.
20702 How do I print it? The answer is simple, you select
20704 View\SpecialChar \menuseparator
20708 Just like you would do for a plain document.
20709 No special procedure is required.
20712 \begin_layout Standard
20713 To help orientate you, I will now explain what happens inside LyX:
20716 \begin_layout Enumerate
20719 Update\SpecialChar \menuseparator
20722 menu option is chosen, a LaTeX file is generated.
20727 \begin_layout Standard
20728 If the document is of any literate class the generated file will be named
20729 with an extension name defined by the
20730 \begin_inset Quotes eld
20734 \begin_inset Quotes erd
20737 format (defined in the Preferences panel), otherwise the file will have
20746 \begin_layout Enumerate
20747 Note that the only difference so far is in the name of the file, no special
20748 processing is required by LyX.
20749 Given that you formatted the code using the Scrap layout that, by itself,
20750 takes care of the business.
20753 \begin_layout Enumerate
20754 If the document is of any literate class LyX will then use the internal
20755 LyX to Noweb converter, followed by the Noweb to LaTeX converter
20759 \begin_layout Plain Layout
20760 The converters are defined in the
20762 Tools\SpecialChar \menuseparator
20766 \begin_inset Quotes eld
20770 \begin_inset Quotes erd
20782 manual for general information about converters.
20787 to generate the LaTeX file.
20791 \begin_layout Standard
20792 Otherwise it will just skip this step.
20796 \begin_layout Enumerate
20797 Finally, LaTeX is invoked and the regular post processing continues as in
20801 \begin_layout Standard
20802 Independence from a particular
20803 \begin_inset Quotes eld
20807 \begin_inset Quotes erd
20810 is easily achieved by changing the commands that are run by the various
20814 \begin_layout Paragraph
20815 Generating the code
20818 \begin_layout Standard
20819 When the build menu option is chosen or the corresponding button in the
20820 toolbar is pressed, a LaTeX file is generated just like step 1 above.
20821 Next, LyX invokes the
20826 This converter needs to be defined by the user and is not installed by
20827 default, though the Program format is.
20828 This converter (like any other converter) will have two parts:
20831 \begin_layout Enumerate
20832 The converter program itself.
20833 This program performs the conversion from the one format to the other (in
20834 this case, from the Noweb format to the Program pseudo-format).
20837 \begin_layout Enumerate
20838 The error log parser.
20839 This is a program whose sole purpose is to rewrite error messages in a
20840 format that LyX understands.
20841 This makes it possible for LyX to place error boxes in the right places
20842 in the file buffer.
20845 \begin_layout Standard
20846 The first part, the
20847 \begin_inset Quotes eld
20851 \begin_inset Quotes erd
20854 setting, should be set to
20855 \begin_inset Quotes eld
20863 \begin_inset Quotes erd
20867 This basically means that LyX will call
20868 \begin_inset Quotes eld
20872 \begin_inset Quotes erd
20875 (a program or script) with the name of the Noweb file (normally a file
20876 in the LyX temp directory).
20880 \begin_layout Standard
20881 This is an implementation of
20882 \begin_inset Quotes eld
20886 \begin_inset Quotes erd
20889 that you can place in a directory on your path:
20892 \begin_layout LyX-Code
20896 \begin_layout LyX-Code
20900 \begin_layout LyX-Code
20901 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
20904 \begin_layout Standard
20905 The next part of the converter setting is the
20906 \begin_inset Quotes eld
20910 \begin_inset Quotes erd
20913 which is to be set to
20914 \begin_inset Quotes eld
20919 parselog=listerrors
20922 \begin_inset Quotes erd
20926 This will run any errors that are generated by the
20927 \begin_inset Quotes eld
20931 \begin_inset Quotes erd
20934 process through the
20935 \begin_inset Quotes eld
20939 \begin_inset Quotes erd
20945 \begin_layout Standard
20946 The converter code looks in
20954 then on the path for the
20955 \begin_inset Quotes eld
20959 \begin_inset Quotes erd
20965 \begin_layout Standard
20966 The build will normally take place in LyX's temporary directory, so the
20967 files produced by the conversion will be in that directory.
20968 LyX will copy out what it regards as the `main' file, but the
20972 conversion may produce several files, and so most of these would then be
20973 deleted when LyX was closed.
20974 The present solution is to use a `copier',
20978 \begin_layout Plain Layout
20987 manual for information on these.
20996 script in its default mode, so that the entire contents of the temporary
20997 directory is copied.
20998 More will get copied than is needed, to be sure, but nothing will be lost.
20999 If, however, you know what extensions the generated files will have, this
21000 can be improved by using the
21009 This option takes a comma-separated list of extensions to copy.
21010 So, for example, if the conversion will generate only files with the extensions
21019 , then the correct definition would be:
21022 \begin_layout LyX-Code
21023 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
21026 \begin_layout Standard
21027 The result will be that only files with these two extensions will be copied
21031 \begin_layout Paragraph
21032 Build instructions in the document
21035 \begin_layout Standard
21036 The last piece of the integration between LyX and noweb is the
21037 \begin_inset Quotes eld
21041 \begin_inset Quotes erd
21045 Generally, the instructions for building your program should be embedded
21046 in a scrap of its own.
21048 \begin_inset Quotes eld
21052 \begin_inset Quotes erd
21055 above uses the notangle command to look for this scrap (called
21056 \begin_inset Quotes eld
21060 \begin_inset Quotes erd
21063 ) and runs its contents through
21064 \begin_inset Quotes eld
21068 \begin_inset Quotes erd
21074 \begin_layout Standard
21075 Typically, such a scrap would look something like this:
21078 \begin_layout LyX-Code
21080 \begin_inset Newline newline
21084 \begin_inset Newline newline
21088 \begin_inset Newline newline
21091 if [ -z "${NOWEB_SOURCE}" ]
21092 \begin_inset Newline newline
21096 \begin_inset Newline newline
21099 NOWEB_SOURCE=myfile.nw
21100 \begin_inset Newline newline
21104 \begin_inset Newline newline
21108 code to extract files ...]
21109 \begin_inset Newline newline
21113 code to compile files ...]
21114 \begin_inset Newline newline
21120 \begin_layout Standard
21123 LIBDIR/examples/listerrors.lyx
21127 LIBDIR/examples/Literate.lyx
21129 which implement two versions of the
21130 \begin_inset Quotes eld
21134 \begin_inset Quotes erd
21137 program for some illustrations of how all of these pieces go together or
21140 LIBDIR/examples/noweb2lyx.lyx.
21143 Interestingly, these three files show off the language-indepence of the
21144 LyX literate programming support since they are written in Python, C and
21148 \begin_layout Subsubsection
21152 \begin_layout Standard
21153 All the Literate Programming support is configured by the
21155 Tools\SpecialChar \menuseparator
21159 \begin_inset Quotes eld
21163 \begin_inset Quotes erd
21167 The important parts are:
21170 \begin_layout Description
21172 \begin_inset space ~
21176 \begin_inset Quotes eld
21180 \begin_inset Quotes erd
21184 \begin_inset space ~
21187 format Set up via the Formats tab, this is where the Noweb-specific pieces
21197 , the file extension is set to
21202 This tells LyX to create a file with a
21206 extension in the first step of the conversion process.
21209 \begin_layout Description
21211 \begin_inset space ~
21219 \begin_inset space ~
21222 format This is an empty format whose sole purpose is to be the endpoint
21223 of a conversion (which then allows us to set up a converter for it).
21226 \begin_layout Description
21235 This converter performs the
21236 \begin_inset Quotes eld
21240 \begin_inset Quotes erd
21243 of the literate document.
21244 For Noweb, it is set to
21245 \begin_inset Quotes eld
21250 noweave -delay -index $$i > $$o
21253 \begin_inset Quotes erd
21259 \begin_layout Description
21269 \begin_inset Quotes eld
21273 \begin_inset Quotes erd
21277 As stated above, the Converter is set to
21278 \begin_inset Quotes eld
21286 \begin_inset Quotes erd
21289 , with Flags set to
21290 \begin_inset Quotes eld
21295 originaldir,parselog=listerrors
21298 \begin_inset Quotes erd
21304 \begin_layout Subsubsection
21308 \begin_layout Standard
21309 There is also a new function implemented in the LyX server, the
21310 \begin_inset Quotes eld
21313 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
21317 \begin_layout Standard
21318 When debugging code with ddd/gdb, it is possible to invoke a text editor
21319 at the current execution position with a single key stroke.
21320 The default ddd configuration for that is shift-ctrl-V.
21321 It happens that you can define the editor command line invocation in ddd
21324 Edit\SpecialChar \menuseparator
21325 Preferences\SpecialChar \menuseparator
21328 dialog and changing the "Edit Sources" entry.
21331 \begin_layout Standard
21332 I take advantage of the new created LyX server function and this ddd feature,
21334 \begin_inset Quotes eld
21338 \begin_inset Quotes erd
21344 \begin_layout LyX-Code
21345 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
21348 \begin_layout Standard
21349 With this, whenever you are using ddd and find a point in the program that
21350 you want to edit, you just press shift-ctrl-V (in the ddd window), and
21351 ddd you forward this information to LyX through the LyX server and then
21352 the LyX window will show the same file with the cursor at the same position
21353 ddd was pointing to.
21354 No more guessing or long scrolling to locate a point in the program back
21358 \begin_layout Standard
21359 Note however that you must enable the LyX server to get this feature working
21360 (it is disabled by default).
21361 You can enable it in
21373 ) by entering in the
21378 \begin_inset Quotes eld
21383 /home/<your-home-directory>/.lyx/lyxpipe
21386 \begin_inset Quotes erd
21392 \begin_layout Standard
21393 Read the LyX server documentation in the
21395 Customization Manual
21397 for further information.
21400 \begin_layout Subsubsection
21404 \begin_layout Standard
21405 There are six new buttons that can be added to your LyX toolbar.
21406 Five of these buttons are short cuts to layout styles:
21427 The last one is a short cut to the
21428 \begin_inset Quotes eld
21432 \begin_inset Quotes erd
21439 \begin_layout Standard
21440 LyX has a range of buttons that are available for tool bar customization.
21441 In my toolbar I like to combine the six short cuts above with two more:
21446 \SpecialChar \menuseparator
21451 \SpecialChar \menuseparator
21458 View\SpecialChar \menuseparator
21462 Here is how it looks like:
21465 \begin_layout LyX-Code
21469 \begin_layout LyX-Code
21473 \begin_layout LyX-Code
21474 Icon "layout Standard"
21477 \begin_layout LyX-Code
21478 Icon "layout Section"
21481 \begin_layout LyX-Code
21482 Icon "layout LaTeX"
21485 \begin_layout LyX-Code
21486 Icon "layout LyX-Code"
21489 \begin_layout LyX-Code
21490 Icon "layout Scrap"
21493 \begin_layout LyX-Code
21497 \begin_layout LyX-Code
21501 \begin_layout LyX-Code
21502 Icon "buffer-typeset"
21505 \begin_layout LyX-Code
21506 Icon "build-program"
21509 \begin_layout LyX-Code
21513 \begin_layout LyX-Code
21517 \begin_layout LyX-Code
21521 \begin_layout LyX-Code
21525 \begin_layout LyX-Code
21529 \begin_layout Subsubsection
21530 Colors customization
21533 \begin_layout Standard
21534 There are a number of colors in LyX that can be customized in
21539 One of the things that bothers people is the LaTeX font color.
21540 The default color is red, since the scraps uses LaTeX font, and there is
21541 a lot of scraps in literate documents, you may get tired of seeing everything
21543 You can change it by going to the tabs
21552 \begin_layout Standard
21553 The next thing is the visible presence of the newline character in the screen.
21554 You can choose the color of this particular character and make it blend
21556 I recommend you choosing a color that is close to the background but not
21557 equal, that way you still can see it is there, but it is not bothering
21562 \begin_layout Chapter
21563 Secrets of the LaTeX Masters
21564 \begin_inset CommandInset label
21573 \begin_layout Standard
21574 Though LyX is a powerful tool, it cannot hope to support everything that
21575 can be done with pure TeX/LaTeX.
21576 However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
21577 as long as you are not afraid to use that
21578 \begin_inset Quotes eld
21582 \begin_inset Quotes erd
21585 button on the toolbar or add things to the LaTeX preamble.
21586 This section lists some tips, tricks, and otherwise cool ideas to give
21587 your document that extra little flair.
21590 Do try this at home
21592 , just start with something a little smaller and less important than your
21596 \begin_layout Standard
21597 Most ideas in this section require less common files in your LaTeX installation.
21598 If you have a system like teTeX, most will already be available.
21599 A few, however, will need to be downloaded from one of the CTAN archives.
21600 Often, there are several ways to do something, or several LaTeX style files
21601 which do the same thing.
21602 We do not endorse one choice over another, we simply claim that we have
21603 done a particular task with a particular file.
21604 Put on your wizard hat, keep an eye out for dragons, and let us begin.
21607 \begin_layout Section
21611 \begin_layout Standard
21614 Lars Gullik Bjønnes
21617 \begin_layout Subsection
21621 \begin_layout Standard
21622 The aim for this chapter
21626 \begin_layout Plain Layout
21627 Editor's note: Lars' original chapter was a masterful description of how
21633 However, it was too long to flow smoothly in this document.
21634 I have therefore chosen to excerpt the most important sections here (sorry,
21635 Lars); you can read the original chapter (and more of the story!) in the
21638 examples/multicol.lyx
21646 is to show how the LaTeX package
21650 can be used in a LyX document.
21651 As LyX doesn't support the
21655 package natively yet, we have to use some small hacks.
21656 By reading this section it should be obvious how to do this.
21659 \begin_layout Subsection
21663 \begin_layout Standard
21668 package allows switching between one and multicolumn format on the same
21670 Footnotes are handled correctly (for the most part), but will be placed
21671 at the bottom of the page and not under each column.
21672 LaTeX's float mechanism, however, is partly disabled in the current implementat
21674 At the moment only page-wide floats can be used within the scope of the
21678 \begin_layout Subsection
21682 \begin_layout Subsubsection
21686 \begin_layout Standard
21687 If you want to have two columns in your text, you have use LaTeX mode to
21692 begin{multicols}{2}
21694 at the point where you want the two column layout to start, and then
21700 where you want it to end.
21704 \begin_layout Standard
21708 \begin_layout Plain Layout
21712 begin{multicols}{2}
21720 \begin_layout Standard
21725 The Adventure of the Empty House
21728 \begin_inset Newline newline
21733 Sir Arthur Conan Doyle
21736 \begin_layout Standard
21739 It was in the spring of the year 1894 that all London was interested, and
21740 the fashionable world dismayed, by the murder of the Honourable Ronald
21741 Adair under most unusual and inexplicable circumstances.
21742 The public has already learned those particulars of the crime which came
21743 out in the police investigation, but a good deal was suppressed upon that
21744 occasion, since the case for the prosecution was so overwhelmingly strong
21745 that it was not necessary to bring forward all the facts.
21746 Only now, at the end of nearly ten years, am I allowed to supply those
21747 missing links which make up the whole of that remarkable chain.
21748 The crime was of interest in itself, but that interest was as nothing to
21749 me compared to the inconceivable sequel, which afforded me the greatest
21750 shock and surprise of any event in my adventurous life.
21751 Even now, after this long interval, I find myself thrilling as I think
21752 of it, and feeling once more that sudden flood of joy, amazement, and increduli
21753 ty which utterly submerged my mind.
21754 Let me say to that public, which has shown some interest in those glimpses
21755 which I have occasionally given them of the thoughts and actions of a very
21756 remarkable man, that they are not to blame me if I have not shared my knowledge
21757 with them, for I should have considered it my first duty to do so, had
21758 I not been barred by a positive prohibition from his own lips, which was
21759 only withdrawn upon the third of last month.
21762 \begin_layout Standard
21766 \begin_layout Plain Layout
21778 \begin_layout Subsubsection
21782 \begin_layout Standard
21783 The same pattern is used when you want more than two columns:
21786 \begin_layout Standard
21790 \begin_layout Plain Layout
21794 begin{multicols}{3}
21802 \begin_layout Standard
21805 It can be imagined that my close intimacy with Sherlock Holmes had interested
21806 me deeply in crime, and that after his disappearance I never failed to
21807 read with care the various problems which came before the public.
21808 And I even attempted, more than once, for my own private satisfaction,
21809 to employ his methods in their solution, though with indifferent success.
21810 There was none, however, which appealed to me like this tragedy of Ronald
21812 As I read the evidence at the inquest, which led up to a verdict of willful
21813 murder against some person or persons unknown, I realized more clearly
21814 than I had ever done the loss which the community had sustained by the
21815 death of Sherlock Holmes.
21816 There were points about this strange business which would, I was sure,
21817 have specially appealed to him, and the efforts of the police would have
21818 been supplemented, or more probably anticipated, by the trained observation
21819 and the alert mind of the first criminal agent in Europe.
21820 All day, as I drove upon my round, I turned over the case in my mind and
21821 found no explanation which appeared to me to be adequate.
21822 At the risk of telling a twice-told tale, I will recapitulate the facts
21823 as they were known to the public at the conclusion of the inquest.
21826 \begin_layout Standard
21830 \begin_layout Plain Layout
21842 \begin_layout Standard
21843 You can have more than 3 columns if you want to, but that might not be very
21844 pleasant for the eye.
21847 \begin_layout Subsubsection
21848 Columns inside columns
21851 \begin_layout Standard
21852 You can even have columns inside columns:
21855 \begin_layout Standard
21859 \begin_layout Plain Layout
21863 begin{multicols}{2}
21871 \begin_layout Standard
21874 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
21875 at that time governor of one of the Australian colonies.
21876 Adair's mother had returned from Australia to undergo the operation for
21877 cataract, and she, her son Ronald, and her daughter Hilda were living together
21881 \begin_layout Standard
21885 \begin_layout Plain Layout
21889 begin{multicols}{2}
21897 \begin_layout Standard
21900 The youth moved in the best society–had, so far as was known, no enemies
21901 and no particular vices.
21902 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
21903 had been broken off by mutual consent some months before, and there was
21904 no sign that it had left any very profound feeling behind it.
21905 For the rest {sic} the man's life moved in a narrow and conventional circle,
21906 for his habits were quiet and his nature unemotional.
21907 Yet it was upon this easy-going young aristocrat that death came, in most
21908 strange and unexpected form, between the hours of ten and eleven-twenty
21909 on the night of March 30, 1894.
21912 \begin_layout Standard
21916 \begin_layout Plain Layout
21928 \begin_layout Standard
21931 Ronald Adair was fond of cards–playing continually, but never for such stakes
21933 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
21934 It was shown that, after dinner on the day of his death, he had played
21935 a rubber of whist at the latter club.
21936 He had also played there in the afternoon.
21941 The evidence of those who had played with him– Mr.
21942 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
21943 and that there was a fairly equal fall of the cards.
21944 Adair might have lost five pounds, but not more.
21945 His fortune was a considerable one, and such a loss could not in any way
21947 He had played nearly every day at one club or other, but he was a cautious
21948 player, and usually rose a winner.
21949 It came out in evidence that, in partnership with Colonel Moran, he had
21950 actually won as much as four hundred and twenty pounds in a sitting, some
21951 weeks before, from Godfrey Milner and Lord Balmoral.
21952 So much for his recent history as it came out at the inquest.
21955 \begin_layout Standard
21959 \begin_layout Plain Layout
21971 \begin_layout Standard
21972 Please do read the file
21974 examples/multicol.lyx
21976 for more advanced examples including column and header spacing, vertical
21977 separator lines, and more.
21980 \begin_layout Section
21985 Paragraph Environment
21986 \begin_inset OptArg
21989 \begin_layout Plain Layout
21990 Numbering in Enumerate
21998 \begin_layout Standard
22004 \begin_layout Standard
22005 \begin_inset VSpace bigskip
22011 \begin_layout Standard
22013 The default numbering for the
22017 paragraph environment begins with Arabic numbers and ends with uppercase
22019 Suppose, however, you wanted a different type of numbering scheme.
22020 Here's a quickie example of how to change the numbering scheme:
22023 \begin_layout LyX-Code
22033 \begin_layout LyX-Code
22043 \begin_layout LyX-Code
22053 \begin_layout LyX-Code
22063 \begin_layout Standard
22064 \SpecialChar \ldots{}
22065 which changes the numbering scheme to uppercase Roman numerals, uppercase
22066 letters, Arabic numbers, and lowercase letter.
22069 \begin_layout Standard
22070 Additionally, the previous example also adds a little bit extra to the numbering
22072 For example, the first level label actually looks like:
22073 \begin_inset Quotes eld
22077 \begin_inset Quotes erd
22081 For ease of reading, we'll describe what the numbering schemes look like
22082 using a notation something like this: <
22083 \begin_inset Quotes eld
22087 \begin_inset Quotes erd
22091 \begin_inset space ~
22095 \begin_inset Quotes erd
22099 \begin_inset Quotes erd
22103 \begin_inset space ~
22107 \begin_inset Quotes erd
22111 \begin_inset Quotes erd
22115 \begin_inset space ~
22119 \begin_inset Quotes eld
22123 \begin_inset Quotes erd
22130 \begin_layout Standard
22131 As you can see in the example, there is a label command for each nesting
22138 \SpecialChar \ldots{}
22145 , as well as a counter,
22149 \SpecialChar \ldots{}
22155 There are also five
22156 \begin_inset Quotes eld
22160 \begin_inset Quotes erd
22193 , each of which take one counter as an argument.
22194 You can add characters before or after these, but there's no need to add
22198 \begin_layout Standard
22199 You can get really fancy with these.
22203 \begin_layout LyX-Code
22217 \begin_layout LyX-Code
22229 \begin_layout LyX-Code
22239 \begin_layout LyX-Code
22249 \begin_layout Standard
22250 produces the somewhat out of hand numbering scheme: <
22251 \begin_inset Quotes eld
22255 \begin_inset Quotes erd
22259 \begin_inset space ~
22263 \begin_inset Quotes erd
22267 \begin_inset Quotes erd
22271 \begin_inset space ~
22275 \begin_inset Quotes erd
22279 \begin_inset Quotes erd
22283 \begin_inset space ~
22287 \begin_inset Quotes eld
22291 \begin_inset Quotes erd
22298 \begin_layout Standard
22302 \begin_layout Section
22306 \begin_layout Standard
22312 \begin_layout Standard
22313 \begin_inset VSpace bigskip
22319 \begin_layout Standard
22324 \begin_layout Plain Layout
22330 tmpfont}{cmr17 scaled 2500}{
22342 \begin_layout Standard
22347 \begin_layout Plain Layout
22358 hose of you who like the style of old books probably also like
22359 \begin_inset Quotes eld
22363 \begin_inset Quotes erd
22366 —those large capital letters which begin each new chapter or section.
22367 Implementing them with plain LyX/LaTeX is straightforward (assuming you
22368 know some plain TeX!) but does require a lot of work and many iterations,
22369 as you can see by all the ugly TeX-mode stuff at the beginning of this
22373 \begin_layout Standard
22377 \begin_layout Plain Layout
22383 bigdrop{-1em}{3}{ptmri}{T}+
22388 here is a much easier way of doing this, of course.
22397 ) package from CTAN allows a simple way to add such letters to your documents.
22398 Since this package is not a standard part of teTeX, I can't demonstrate
22399 it within this document, but if you copy this paragraph to a new document,
22401 \begin_inset Quotes eld
22411 \begin_inset Quotes erd
22414 and the pluses from the TeX code at the beginning of the paragraph, and
22419 usepackage{dropcaps}
22421 to your LaTeX preamble, you will get a nice Times Roman Italic
22422 \begin_inset Quotes eld
22426 \begin_inset Quotes erd
22429 , whose height is three lines of text and which protrudes 1 em into the
22431 (Make certain you have copied
22432 \begin_inset Quotes eld
22440 \begin_inset Quotes erd
22443 into a directory where TeX can see it.) The first argument is the amount
22444 of indentation; in this case the negative sign moves it into the margin.
22445 The second argument is the height of the letter in number of lines of text.
22446 The third argument is the font name: virtually anything which has a tfm
22447 file should work (wade through the
22449 .../texmf/fonts/tfm
22451 directory for possibilities).
22452 My personal favorite is
22453 \begin_inset Quotes eld
22461 \begin_inset Quotes erd
22464 , a fancy German font specifically designed for dropped capitals.
22465 The fourth argument is the letter (or letters) to be dropped.
22470 package also offers the
22476 command, as well as a slightly simplified
22485 \begin_layout Section
22486 Non-standard Paragraph Shapes
22489 \begin_layout Standard
22495 \begin_layout Standard
22496 \begin_inset VSpace bigskip
22502 \begin_layout Standard
22506 \begin_layout Plain Layout
22518 \begin_layout Standard
22522 \begin_layout Plain Layout
22531 \begin_layout Plain Layout
22545 \begin_layout Standard
22550 \begin_layout Plain Layout
22561 \begin_layout Plain Layout
22570 \begin_layout Plain Layout
22579 \begin_layout Plain Layout
22588 \begin_layout Plain Layout
22597 \begin_layout Plain Layout
22606 \begin_layout Plain Layout
22615 \begin_layout Plain Layout
22624 \begin_layout Plain Layout
22633 \begin_layout Plain Layout
22642 \begin_layout Plain Layout
22651 \begin_layout Plain Layout
22660 \begin_layout Plain Layout
22669 \begin_layout Plain Layout
22678 \begin_layout Plain Layout
22687 \begin_layout Plain Layout
22696 \begin_layout Plain Layout
22705 \begin_layout Plain Layout
22714 \begin_layout Plain Layout
22723 \begin_layout Plain Layout
22729 There are times when the tyranny of rectangular paragraphs must be overthrown.
22730 In such situations, a call to the delightful plain TeX command
22737 As you can see, completely arbitrary shapes can be laid out with a suitable
22738 set of linelength definitions.
22739 While this parshape may look a bit silly and useless, one could conceive
22740 of situations such as finely tuned dropped capitals, word wrapping around
22741 non-rectangular graphics, etc.
22742 which will benefit from such handcrafting.
22745 \begin_layout Standard
22746 \begin_inset VSpace bigskip
22752 \begin_layout Standard
22757 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
22764 is the number of lines of text which define the paragraph.
22765 If there turn out to be fewer lines, the shape is truncated; if there are
22766 more, the excess lines have the same dimensions as the last line of the
22776 entries specify the indentation of the line from the left margin, and the
22777 length of the line as measured from that point.
22778 The shape applies only to the current paragraph; everything is reset to
22779 normal for the next paragraph.
22782 \begin_layout Standard
22786 \begin_layout Plain Layout
22798 \begin_layout Section
22802 \begin_layout Standard
22803 As you can see, the examples in this section range from the useful to the
22805 While I don't expect that anyone will ever need the paragraph shape demonstrate
22806 d in the last section, the important point is that you can do almost anything
22807 you want in LyX if you are willing to figure out how to do it in TeX and
22809 TeX is a fantastically powerful typesetting system and all that power is
22810 available to you since LyX uses it as its backend.