1 #LyX 2.0.0svn created this file. For more info see http://www.lyx.org/
7 % DO NOT ALTER THIS PREAMBLE!!!
9 % This preamble is designed to ensure that the manual prints
10 % out as advertised. If you mess with this preamble,
11 % parts of the manual may not print out as expected. If you
12 % have problems LaTeXing this file, please contact
13 % the documentation team
14 % email: lyx-docs@lists.lyx.org
20 % set fonts for nicer pdf view
21 \IfFileExists{lmodern.sty}
22 {\usepackage{lmodern}}{}
24 \fi % end if pdflatex is used
26 % the pages of the TOC are numbered roman
27 % and a PDF-bookmark for the TOC is added
29 \let\myTOC\tableofcontents
30 \renewcommand{\tableofcontents}{%
31 \pdfbookmark[1]{\contentsname}{}
34 \pagenumbering{arabic}}
36 % redefine the \LyX macro for PDF bookmarks
37 \def\LyX{\texorpdfstring{%
38 L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}
41 % used for multi-column text
44 % extra space for tables
45 \newcommand{\extratablespace}[1]{\noalign{\vskip#1}}
47 \options fleqn,liststotoc,bibtotoc,idxtotoc,BCOR7.5mm,titlepage,tablecaptionabove
48 \use_default_options false
54 \maintain_unincluded_children false
57 InsetLayout CharStyle:MenuItem
66 \newcommand*{\menuitem}[1]{{\sffamily #1}}
75 \font_typewriter default
76 \font_default_family default
84 \default_output_format default
85 \bibtex_command default
86 \index_command default
90 \pdf_title "LyX's Additional Features manual"
91 \pdf_author "LyX Team"
92 \pdf_subject "LyX's additional features documentation"
93 \pdf_keywords "LyX, Documentation, Additional"
95 \pdf_bookmarksnumbered true
96 \pdf_bookmarksopen false
97 \pdf_bookmarksopenlevel 1
102 \pdf_pdfusetitle false
103 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false, pdfpagelabels"
112 \paperorientation portrait
120 \paragraph_separation indent
121 \paragraph_indentation default
122 \quotes_language english
125 \paperpagestyle headings
126 \tracking_changes false
127 \output_changes false
135 Additional LyX Features
143 \begin_layout Plain Layout
145 Principal maintainer of this file is
150 If you have comments or error corrections, please send them to the LyX
151 Documentation mailing list,
152 \begin_inset Flex CharStyle:Code
155 \begin_layout Plain Layout
157 <lyx-docs@lists.lyx.org>
170 \begin_layout Standard
171 \begin_inset CommandInset toc
172 LatexCommand tableofcontents
179 \begin_layout Chapter
183 \begin_layout Standard
184 This manual is essentially Part II of the
186 User's Guide\SpecialChar \@.
189 The reason for separating this document out is simple: the
193 is already quite lengthy, and it contains information on all of the basic
194 features one needs to know in order to prepare most documents.
195 However, the LyX Team has worked to make LyX extensible through various
196 configuration files and external packages.
197 That means that if you want to support the Fizzwizzle LaTeX package, you
198 can create a layout file (or module) for it without having to alter LyX
200 We've already had contributions of several new features this way, and some
201 of them are documented here.
202 There are also some more `advanced' features, such as how to control the
203 presentation of bibliographies and how to work with multi-part documents,
204 that are not covered in the
208 and are discussed here.
211 \begin_layout Standard
212 This manual also documents some special features, like fax support, version
213 control, and SGML support, which require additional software to work properly.
214 There is also a chapter on LyX's support for HTML.
215 And lastly, there's a chapter of LaTeX tools and tips, things you can use
216 to spruce up your documents by directly using the powerful features of
222 only WYSIWYM and will only ever interface to some, not all, LaTeX features.
225 \begin_layout Standard
226 If you haven't read the
230 yet, you are definitely in the wrong manual.
235 is the first place to go, since it describes the notation and format of
237 You should also be thoroughly familiar with the
241 and all of the basic features of LyX before attempting to read this one.
244 \begin_layout Standard
245 Since many of the topics in this manual depend heavily on LyX's interaction
246 with LaTeX, this first chapter covers the inner workings of LyX and how
247 to direct LyX to generate exactly the LaTeX code you want.
248 It is obviously for more seasoned LyX users.
251 \begin_layout Chapter
255 \begin_layout Section
259 \begin_layout Standard
260 This chapter is for both TeX-nicians and the LaTeX-curious.
261 In it, we'll explain how LyX and LaTeX work together to produce printable
263 This is the only place in any of the manuals where we assume you know something
267 \begin_layout Standard
268 At one time, LyX was called a
269 \begin_inset Quotes eld
272 WYSIWYM frontend to LaTeX,
273 \begin_inset Quotes erd
276 but that's no longer true.
277 There are frontends to LaTeX out there.
281 \begin_layout Plain Layout
282 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
283 There are also the LaTeX modes for vi and emacs, of course.
288 These are basically text editors with the ability to run LaTeX and mark
289 any errors in the file you're editing.
298 run LaTeX, and it also indicates errors in the file, it also does much,
300 For one thing, you don't need to know LaTeX to use LyX effectively.
301 And LyX has added its own extensions to LaTeX.
302 Try the following sometime: select
303 \begin_inset Flex CharStyle:MenuItem
306 \begin_layout Plain Layout
307 Export\SpecialChar \menuseparator
314 \begin_inset Flex CharStyle:MenuItem
317 \begin_layout Plain Layout
324 \begin_inset Flex CharStyle:MenuItem
327 \begin_layout Plain Layout
328 View\SpecialChar \menuseparator
334 ), then look at the preamble of the resulting
335 \begin_inset Flex CharStyle:Code
338 \begin_layout Plain Layout
345 You'll notice a variety of new macros defined specifically by LyX.
346 These macros are defined automatically, according to the features you use
350 \begin_layout Standard
351 There are several commands that automatically invoke LaTeX.
355 \begin_layout Itemize
356 \begin_inset Flex CharStyle:MenuItem
359 \begin_layout Plain Layout
360 View\SpecialChar \menuseparator
369 \begin_layout Itemize
370 \begin_inset Flex CharStyle:MenuItem
373 \begin_layout Plain Layout
374 View\SpecialChar \menuseparator
375 Update\SpecialChar \menuseparator
384 \begin_layout Itemize
385 \begin_inset Flex CharStyle:MenuItem
388 \begin_layout Plain Layout
389 File\SpecialChar \menuseparator
398 \begin_layout Itemize
399 \begin_inset Flex CharStyle:MenuItem
402 \begin_layout Plain Layout
403 File\SpecialChar \menuseparator
412 \begin_layout Standard
413 They will only invoke LaTeX if the file has changed since the last time
418 \begin_layout Standard
419 When LyX runs LaTeX on the file you're editing, it performs these steps:
422 \begin_layout Enumerate
423 Convert the document to LaTeX and save to a file with the extension
424 \begin_inset Flex CharStyle:Code
427 \begin_layout Plain Layout
434 \begin_inset Flex CharStyle:Code
437 \begin_layout Plain Layout
446 \begin_layout Enumerate
448 \begin_inset Flex CharStyle:Code
451 \begin_layout Plain Layout
457 file (maybe several times), and run any other commands (such as
458 \begin_inset Flex CharStyle:Code
461 \begin_layout Plain Layout
468 \begin_inset Flex CharStyle:Code
471 \begin_layout Plain Layout
477 ) needed to compile the LaTeX file.
480 \begin_layout Enumerate
481 If there are any errors, show the error log.
484 \begin_layout Standard
485 If you've run LaTeX using
486 \begin_inset Flex CharStyle:MenuItem
489 \begin_layout Plain Layout
492 \SpecialChar \menuseparator
500 , LyX then runs a DVI viewer to display the DVI-file.
502 \begin_inset Flex CharStyle:MenuItem
505 \begin_layout Plain Layout
508 \SpecialChar \menuseparator
516 , LyX performs further steps:
519 \begin_layout Itemize
521 \begin_inset Flex CharStyle:Code
524 \begin_layout Plain Layout
530 to convert the DVI file to PostScript.
533 \begin_layout Itemize
534 Run a PostScript viewer, such as
535 \begin_inset Flex CharStyle:Code
538 \begin_layout Plain Layout
544 , to display the PostScript file.
547 \begin_layout Standard
548 LyX does similar things when viewing, or exporting, other formats.
551 \begin_layout Section
552 Translating LaTeX files into LyX
555 \begin_layout Standard
556 You can import a LaTeX file into LyX by using the
557 \begin_inset Flex CharStyle:MenuItem
560 \begin_layout Plain Layout
561 File\SpecialChar \menuseparator
562 Import\SpecialChar \menuseparator
569 This will call a program named
570 \begin_inset Flex CharStyle:Code
573 \begin_layout Plain Layout
579 which will create a file
580 \begin_inset Flex CharStyle:Code
583 \begin_layout Plain Layout
590 \begin_inset Flex CharStyle:Code
593 \begin_layout Plain Layout
600 LyX will then open that file.
604 \begin_layout Plain Layout
605 \begin_inset Flex CharStyle:Code
608 \begin_layout Plain Layout
614 can also be run from the command line, of course.
622 \begin_layout Standard
623 \begin_inset Flex CharStyle:Code
626 \begin_layout Plain Layout
632 will translate most legal LaTeX, but not everything.
633 It will put things it doesn't understand into TeX code, so after translating
635 \begin_inset Flex CharStyle:Code
638 \begin_layout Plain Layout
644 , you can look for TeX code and hand-edit it until it looks right.
647 \begin_layout Standard
648 If you don't know what TeX code is, read the next section.
651 \begin_layout Section
652 \begin_inset CommandInset label
654 name "sec:Inserting-TeX-Code"
658 Inserting TeX Code into LyX Documents
661 \begin_layout Standard
662 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
663 You can always insert TeX code into any LyX document.
664 LyX cannot, and will never be able to, display every possible LaTeX construct.
665 If ever you need to insert LaTeX commands into your LyX document, you can
667 \begin_inset Flex CharStyle:Code
670 \begin_layout Plain Layout
676 box, which you can insert into your document with
677 \begin_inset Flex CharStyle:MenuItem
680 \begin_layout Plain Layout
681 Insert\SpecialChar \menuseparator
690 \begin_layout Standard
691 Here's an example of inserting LaTeX commands in a LyX document.
692 The code looks like this:
695 \begin_layout LyX-Code
699 \begin_inset Newline newline
705 \begin_inset Newline newline
708 This is an example for a minipage environment.
710 \begin_inset Newline newline
713 can put nearly everything in it, even (non-floating)
714 \begin_inset Newline newline
719 \begin_inset Newline newline
725 \begin_inset Newline newline
729 \begin_inset Newline newline
735 \begin_inset Newline newline
741 \begin_inset Newline newline
747 \begin_inset Newline newline
752 \begin_inset Newline newline
758 \begin_inset Newline newline
764 \begin_inset Newline newline
770 \begin_inset Newline newline
778 \begin_layout LyX-Code
782 \begin_layout Standard
784 \begin_inset Flex CharStyle:Code
787 \begin_layout Plain Layout
793 box containing this text is directly after this paragraph.
794 Those of you reading the manual in LyX will only see the TeX code inset.
795 Those reading a printed version of the manuals will see the actual results:
798 \begin_layout Standard
802 \begin_layout Plain Layout
809 \begin_layout Plain Layout
816 \begin_layout Plain Layout
818 This is an example for a minipage environment.
819 You can put nearly everything in it, even (non-floating) figures and tables.
823 \begin_layout Plain Layout
830 \begin_layout Plain Layout
835 \begin_layout Plain Layout
842 \begin_layout Plain Layout
849 \begin_layout Plain Layout
856 \begin_layout Plain Layout
862 \begin_layout Plain Layout
869 \begin_layout Plain Layout
876 \begin_layout Plain Layout
883 \begin_layout Plain Layout
895 \begin_layout Standard
896 In addition to using TeX code, you can also create a separate file containing
897 some complex LaTeX structure and then use
898 \begin_inset Flex CharStyle:MenuItem
901 \begin_layout Plain Layout
902 Insert\SpecialChar \menuseparator
912 to include your file (you should select the type
913 \begin_inset Flex CharStyle:Code
916 \begin_layout Plain Layout
923 We recommend that you only do this if you have a
924 \begin_inset Flex CharStyle:Code
927 \begin_layout Plain Layout
938 Otherwise, you'll have a big job tracking down LaTeX errors.
941 \begin_layout Standard
942 There are a few last points to emphasize:
945 \begin_layout Itemize
950 check if your LaTeX code is correct.
953 \begin_layout Itemize
954 Beware reinventing the wheel.
957 \begin_layout Standard
958 On that last point, LyX does have quite a few features tucked into it, and
960 Be sure to check the manuals to make sure that LyX doesn't have such-and-such
961 feature before you decide you have to do it by hand.
962 Moreover, there are numerous LaTeX packages out there to do all sorts of
963 things, from labels to envelopes to fancy multipage tables.
965 \begin_inset CommandInset href
968 target "http://www.ctan.org/"
972 for details, and see chapter
973 \begin_inset CommandInset ref
975 reference "cha:secrets"
982 \begin_layout Standard
983 If you do need to do some wild and fancy things within your document, be
984 sure to check out a good LaTeX book for assistance.
985 There are a number of them listed in the bibliography of the
992 \begin_layout Section
993 LyX and the LaTeX Preamble
996 \begin_layout Subsection
997 About the LaTeX Preamble
1000 \begin_layout Standard
1001 If you already know LaTeX, there is no need to explain here what the preamble
1003 If you don't, the following will give you some ideas—we recommend again
1004 that you consult a LaTeX book for further information.
1005 In any case, you should read the points below, because they explain what
1006 you can do and what you don't need to do in the LaTeX preamble of a LyX
1010 \begin_layout Standard
1011 The LaTeX preamble comes at the very beginning of a document,
1019 \begin_layout Itemize
1020 Declare the document class.
1022 \begin_inset Newline newline
1025 LyX already does this for you.
1026 If you're a seasoned LaTeX-nician, and you have a custom document class
1027 you want to use, check out the
1029 Customization Manual
1031 for information on how to make LyX interface to it.
1034 \begin_layout Itemize
1035 Declare the usage of packages.
1037 \begin_inset Newline newline
1040 LaTeX packages provide special commands, which are only available within
1041 a document when the package has been declared in the preamble.
1042 For example, the package
1043 \begin_inset Flex CharStyle:Code
1046 \begin_layout Plain Layout
1052 forces all paragraphs to be indented.
1053 There are other packages for labels, envelopes, margins, etc.
1057 \begin_layout Itemize
1058 Set counters, variables, lengths and widths.
1060 \begin_inset Newline newline
1063 There are several LaTeX counters and variables which
1067 be set globally from within the preamble in order to have the desired effect.
1068 (There are variables which you can set and reset inside the document, too.)
1069 Margins are a good example of something which must be set in the preamble.
1070 Another example is the label format for lists.
1071 You can actually set these just about anywhere, but it's best to do it
1072 just once, inside the preamble.
1075 \begin_layout Itemize
1076 Declare user defined commands (with
1077 \begin_inset Flex CharStyle:Code
1080 \begin_layout Plain Layout
1089 \begin_inset Flex CharStyle:Code
1092 \begin_layout Plain Layout
1101 \begin_inset Newline newline
1104 These are abbreviations for LaTeX commands which appear very often inside
1106 Although the preamble is a good place to declare such commands, they
1110 be declared anywhere (before they are used for the first time, of course).
1111 This can be useful if there is a lot of raw LaTeX code in your document,
1112 which normally should not be the case.
1115 \begin_layout Standard
1116 LyX adds its own set of definitions to the preamble of the
1117 \begin_inset Flex CharStyle:Code
1120 \begin_layout Plain Layout
1127 This makes LaTeX files generated by LyX portable.
1130 \begin_layout Subsection
1131 Changing the Preamble
1134 \begin_layout Standard
1135 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1136 can't change them without patching LyX itself.
1137 You can, however, add your own stuff to the preamble by selecting
1138 \begin_inset Flex CharStyle:MenuItem
1141 \begin_layout Plain Layout
1143 \begin_inset space ~
1152 \begin_inset Flex CharStyle:MenuItem
1155 \begin_layout Plain Layout
1156 Document\SpecialChar \menuseparator
1163 LyX adds anything in the
1164 \begin_inset Flex CharStyle:MenuItem
1167 \begin_layout Plain Layout
1173 dialog to its own built-in preamble.
1174 Before adding your own declarations in the preamble, you should make sure
1175 that LyX doesn't already support what you want to do.
1176 (Remember what we said about reinventing the wheel?) Also,
1178 make sure your preamble code is correct
1181 LyX doesn't check it for you.
1182 If there is an error, you're likely to get an error like
1183 \begin_inset Quotes eld
1187 \begin_inset Flex CharStyle:Code
1190 \begin_layout Plain Layout
1199 \begin_inset Quotes erd
1203 If you see this error, check your preamble.
1206 \begin_layout Subsection
1210 \begin_layout Standard
1211 Here are some examples of what you can add to a preamble, and what they
1215 \begin_layout Subsubsection
1219 \begin_layout Standard
1220 There are two variables under LaTeX that control page position:
1221 \begin_inset Flex CharStyle:Code
1224 \begin_layout Plain Layout
1233 \begin_inset Flex CharStyle:Code
1236 \begin_layout Plain Layout
1245 Their names should be self-explanatory.
1246 These variables are useful if you think for a moment about computer labels.
1247 Sometimes, the size of a print medium and the area of the medium that you
1248 can actually print on aren't the same.
1250 \begin_inset Flex CharStyle:Code
1253 \begin_layout Plain Layout
1262 \begin_inset Flex CharStyle:Code
1265 \begin_layout Plain Layout
1276 \begin_layout Standard
1277 The default values for
1278 \begin_inset Flex CharStyle:Code
1281 \begin_layout Plain Layout
1290 \begin_inset Flex CharStyle:Code
1293 \begin_layout Plain Layout
1302 \begin_inset space \thinspace{}
1306 \begin_inset space \thinspace{}
1310 \begin_inset space \space{}
1313 the page isn't shifted.
1314 Unfortunately, some DVI drivers always seem to shift the page.
1315 We have no idea why, or why the sysadmin hasn't fixed such behavior.
1316 If you're using LyX on a system that you don't personally maintain, and
1317 your sysadmin is a doofus,
1318 \begin_inset Flex CharStyle:Code
1321 \begin_layout Plain Layout
1330 \begin_inset Flex CharStyle:Code
1333 \begin_layout Plain Layout
1342 Suppose you're left and top margins are always 0.5
1343 \begin_inset space \thinspace{}
1347 You can add this to the preamble:
1350 \begin_layout LyX-Code
1358 \begin_layout LyX-Code
1366 \begin_layout Standard
1367 and your margins should now be correct.
1370 \begin_layout Subsubsection
1374 \begin_layout Standard
1375 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1376 There's a rather nice package, available at your nearest CTAN archive,
1377 for printing sheets of labels:
1378 \begin_inset Flex CharStyle:Code
1381 \begin_layout Plain Layout
1388 Now, your system may not have this package installed by default.
1389 We leave that up to you to check.
1390 You'll also want to read the documentation for it; we're not going to do
1392 Since this is an example, however, we'll give you an example of how you
1396 \begin_layout Standard
1397 First, make sure you're using the
1398 \begin_inset Flex CharStyle:Code
1401 \begin_layout Plain Layout
1408 Next, you need to put the following in your preamble:
1411 \begin_layout LyX-Code
1417 \begin_layout LyX-Code
1423 \begin_layout LyX-Code
1429 \begin_layout LyX-Code
1435 \begin_layout LyX-Code
1441 \begin_layout LyX-Code
1447 \begin_layout LyX-Code
1453 \begin_layout Standard
1454 This sets things up for Avery label sheets, stock #5360.
1455 You're now ready to print labels, but you'll need to insert LaTeX code,
1456 placing the commands
1457 \begin_inset Flex CharStyle:Code
1460 \begin_layout Plain Layout
1469 \begin_inset Flex CharStyle:Code
1472 \begin_layout Plain Layout
1480 around each label text.
1481 This and other special features of
1482 \begin_inset Flex CharStyle:Code
1485 \begin_layout Plain Layout
1491 are explained in its documentation.
1494 \begin_layout Standard
1495 Someday, someone may write a LyX layout file to support this package directly.
1496 Maybe that someone is you.
1499 \begin_layout Subsubsection
1500 Example #3: Paragraph Indentation
1503 \begin_layout Standard
1504 Americans are trained to indent the first line of
1509 As with all of their other weird quirks, most Americans will whine and
1510 moan until they can have their way and indent the first line of all paragraphs.
1519 \begin_layout Standard
1520 Of course, this behavior isn't standard typography.
1521 In books, you typically only indent the first line of a paragraph
1525 it follows another one.
1526 The idea behind indenting the first line of a paragraph is to distinguish
1527 neighboring paragraphs from one another.
1528 If there is no previous paragraph—for example, if it follows a figure or
1529 is the first paragraph in a section—then there is no need for indentation.
1533 \begin_layout Standard
1534 If you're a typical American (we're still joking!), though, you don't care
1535 about such esoteric things; you want your indentation! Add this to the
1539 \begin_layout LyX-Code
1542 usepackage{indentfirst}
1545 \begin_layout Standard
1546 If your TeX distribution isn't braindead, you'll have this package, and
1547 all of your paragraphs will get the indentation the Founding Fathers intended
1551 \begin_layout Subsubsection
1552 Example #4: This Document
1555 \begin_layout Standard
1556 You can also check out the preamble of this document to get an idea of some
1557 of the advanced things you can do.
1558 Also, there are more examples and an assortment of LaTeX
1559 \begin_inset Quotes eld
1563 \begin_inset Quotes erd
1567 \begin_inset space ~
1571 \begin_inset CommandInset ref
1573 reference "cha:secrets"
1581 \begin_layout Section
1582 LyX and LaTeX Errors
1585 \begin_layout Standard
1586 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1588 It then uses the logfile from the LaTeX run to do a post-mortem.
1589 After analyzing the logfile,LyX displays a dialog listing the errors.
1590 Clicking on any one of them will take you to the position in your LyX file
1591 where the error occurred.
1595 \begin_layout Plain Layout
1597 Analyzing the logfile is a tough job, and LyX doesn't always go to the
1599 There are also cases where LaTeX reports the error on one line, but the
1600 actual error is earlier.
1601 This is not unlike forgetting a closing brace in a program: You'll get
1602 an error, but only later.
1610 \begin_layout Standard
1611 Some folks also like to look at the log file directly: It is available from
1613 \begin_inset Flex CharStyle:MenuItem
1616 \begin_layout Plain Layout
1619 \SpecialChar \menuseparator
1623 \begin_inset space ~
1632 There are some fairly common error messages and warnings.
1633 We'll cover those here.
1634 You should look at a good LaTeX book for a complete listing.
1637 \begin_layout Itemize
1638 \begin_inset Flex CharStyle:Code
1641 \begin_layout Plain Layout
1648 \begin_inset Newline newline
1651 Anything beginning with these words is a warning message for the purpose
1653 \begin_inset Quotes eld
1657 \begin_inset Quotes erd
1660 the LaTeX code itself.
1661 You'll get messages like this if you added or changed cross-references
1662 or bibliography entries, in which case, LaTeX is trying to tell you that
1663 you need to make another run.
1664 You can by-and-large ignore these.
1667 \begin_layout Itemize
1668 \begin_inset Flex CharStyle:Code
1671 \begin_layout Plain Layout
1678 \begin_inset Newline newline
1681 Another warning message, this time about fonts which LaTeX couldn't find.
1682 The rest of the message will often say something about a replacement font
1684 You can safely ignore these, too.
1687 \begin_layout Itemize
1688 \begin_inset Flex CharStyle:Code
1691 \begin_layout Plain Layout
1700 \begin_inset Newline newline
1708 They are warnings about lines that were too long and run past the right
1710 Almost always, this is unnoticeable in the final output.
1711 (It can be just a point or two.) Or, only one or two characters extend past
1713 LaTeX seems to generate at least one of these messages for just about any
1715 \begin_inset Newline newline
1718 You can ignore these messages.
1719 Your eyes will tell you if there's a problem with something that's too
1720 wide; just look at the output.
1724 \begin_layout Plain Layout
1725 You can also enable the `draft' option in
1726 \begin_inset Flex CharStyle:MenuItem
1729 \begin_layout Plain Layout
1732 \SpecialChar \menuseparator
1740 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1748 \begin_layout Itemize
1749 \begin_inset Flex CharStyle:Code
1752 \begin_layout Plain Layout
1761 \begin_inset Newline newline
1764 Not quite as common as its cousin.
1765 LaTeX seems to like to print lines that are a bit too wide as opposed to
1766 ones that are a bit too narrow.
1767 We have no idea why.
1770 \begin_layout Itemize
1771 \begin_inset Flex CharStyle:Code
1774 \begin_layout Plain Layout
1783 \begin_inset Flex CharStyle:Code
1786 \begin_layout Plain Layout
1795 \begin_inset Newline newline
1798 Warnings about troubles breaking the page.
1799 Once again, just look at the output.
1800 Your eyes will tell you where something has gone wrong.
1803 \begin_layout Itemize
1804 \begin_inset Flex CharStyle:Code
1807 \begin_layout Plain Layout
1809 \begin_inset Quotes els
1813 \begin_inset Quotes ers
1822 \begin_inset Newline newline
1826 \begin_inset Quotes eld
1830 \begin_inset Quotes erd
1833 isn't installed on this system.
1834 This usually appears because some package your document needs isn't installed.
1835 If you didn't touch the preamble or didn't use the
1836 \begin_inset Flex CharStyle:Code
1839 \begin_layout Plain Layout
1847 command, then one of the packages LyX tried to load is missing.
1849 \begin_inset Flex CharStyle:MenuItem
1852 \begin_layout Plain Layout
1853 Help\SpecialChar \menuseparator
1859 to get a list of packages that LyX knows about.
1860 This file is updated whenever you reconfigure LyX (using
1861 \begin_inset Flex CharStyle:MenuItem
1864 \begin_layout Plain Layout
1865 Tools\SpecialChar \menuseparator
1871 ) and tells you which packages have been detected and what they do.
1872 \begin_inset Newline newline
1876 \begin_inset Flex CharStyle:Code
1879 \begin_layout Plain Layout
1887 command and the package in question isn't installed, then you'll need to
1888 install it yourself.
1891 \begin_layout Itemize
1892 \begin_inset Flex CharStyle:Code
1895 \begin_layout Plain Layout
1896 LaTeX Error: Unknown option
1902 \begin_inset Newline newline
1905 Error messages beginning with this are trying to tell you that you specified
1906 a bad or undefined option to a package.
1907 Check the package's documentation.
1910 \begin_layout Itemize
1911 \begin_inset Flex CharStyle:Code
1914 \begin_layout Plain Layout
1915 Undefined control sequence
1921 \begin_inset Newline newline
1924 If you've inserted LaTeX code into your document, but made a typo, you'll
1926 You may have forgotten to load a package.
1927 In any case, this error message usually means that you used an undefined
1932 \begin_layout Standard
1933 There are other error and warning messages.
1934 Some are self-explanatory.
1935 These are usually LaTeX messages.
1936 Others are downright cryptic.
1937 These are usually TeX error messages, and we really have
1941 what they mean or how to decipher them.
1945 \begin_layout Standard
1946 There's a general sequence you should follow if you get error messages:
1949 \begin_layout Enumerate
1950 Look at the LaTeX code you inserted for typos.
1953 \begin_layout Enumerate
1954 If there are no typos, check that you used the command(s) correctly.
1957 \begin_layout Enumerate
1958 If you get a bunch of error boxes piled up at the very top of the document—and
1959 especially if you see a
1960 \begin_inset Quotes eld
1964 \begin_inset Flex CharStyle:Code
1967 \begin_layout Plain Layout
1976 \begin_inset Quotes erd
1979 error—it means that there are errors in the preamble.
1980 Start debugging your preamble.
1983 \begin_layout Enumerate
1984 If you didn't add anything to the preamble and didn't add any LaTeX code
1985 to the document, the first suspect is your LaTeX distribution itself.
1986 Check for missing packages and install them.
1989 \begin_layout Enumerate
1990 Okay, so there are no missing packages.
1991 Did you use any of the fine-tuning options in LyX? Specifically, did you
1996 any of them, like trying to manually insert lots of
1997 \begin_inset Flex CharStyle:Code
2000 \begin_layout Plain Layout
2002 \begin_inset space ~
2011 \begin_inset Flex CharStyle:Code
2014 \begin_layout Plain Layout
2021 \begin_inset Flex CharStyle:Code
2024 \begin_layout Plain Layout
2030 ? Did you try to kludge something together with these instead of using the
2031 appropriate paragraph environment?
2034 \begin_layout Enumerate
2035 All right, you didn't use any of the fine-tuning options, you played by
2037 Did you try to pull a fancy maneuver? Did you do something funky inside
2038 a table or an equation, like inserting a graphic into a table cell?
2041 \begin_layout Enumerate
2042 Do you have long sections of text where LaTeX cannot find a place to break
2043 a line? By default, LaTeX is rather strict about how much extra inter-word
2044 spacing it will add in order to break a line.
2045 Preferably, you should rework the paragraph to avoid the problem.
2046 If this isn't an option, you can wrap your text in
2047 \begin_inset Flex CharStyle:Code
2050 \begin_layout Plain Layout
2058 to make LaTeX's line breaking more, well, sloppy.
2061 \begin_layout Enumerate
2062 Did you go overboard with the nesting? LyX (currently) doesn't check to
2063 make sure you're in the limits for nesting environments.
2064 If you nested a bunch of environments to the
2065 \begin_inset Formula $17^{\mathrm{th}}$
2068 level, that's the problem.
2069 (The limit in LaTeX is five.)
2072 \begin_layout Enumerate
2073 Okay, you didn't get any error messages, but your output looks awful.
2074 If you have a table or figure that's too wide or long for the page, you
2079 \begin_layout Enumerate
2080 rescale the figure so it fits.
2083 \begin_layout Enumerate
2084 trim down the table so it fits.
2088 \begin_layout Enumerate
2089 If something else is wrong with the output, and you didn't try to pull anything
2090 fancy or kludge the fine-tuning options, we're not sure what's wrong.
2093 \begin_layout Standard
2094 If all this doesn't help—well, then
2098 you might have found a bug in LyX\SpecialChar \ldots{}
2102 \begin_layout Chapter
2106 \begin_layout Section
2107 Customizing Bibliographies with BibTeX
2110 \begin_layout Standard
2111 The most basic information about how to use BibTeX with LyX is contained
2114 Bibliography databases (BibTeX)
2121 The following subsections explain special bibliography features supported
2125 \begin_layout Subsection
2126 Alternative Citation Styles
2129 \begin_layout Standard
2130 Standard BibTeX uses numbers (e.
2131 \begin_inset space \thinspace{}
2135 \begin_inset space \space{}
2139 \begin_inset Quotes eld
2143 \begin_inset Quotes erd
2146 ) to refer to a cited work.
2147 However, in many scientific disciplines, other citation styles are in use.
2148 The most common one is the author-year style (e.
2149 \begin_inset space \thinspace{}
2153 \begin_inset space \space{}
2157 \begin_inset Quotes eld
2161 \begin_inset Quotes erd
2165 LyX supports two packages that provide this style,
2166 \begin_inset Flex CharStyle:Code
2169 \begin_layout Plain Layout
2176 \begin_inset Flex CharStyle:Code
2179 \begin_layout Plain Layout
2186 Both packages have their pros and cons, which cannot be listed in detail.
2187 If you only want to have simple author-year (or author-numerical) style,
2188 or if you want to use one of the countless style files for
2189 \begin_inset Flex CharStyle:Code
2192 \begin_layout Plain Layout
2198 , than the established
2199 \begin_inset Flex CharStyle:Code
2202 \begin_layout Plain Layout
2208 package is probably your choice.
2209 If you need special features like short title references, ibidem etc., you
2211 \begin_inset Flex CharStyle:Code
2214 \begin_layout Plain Layout
2223 \begin_layout Standard
2224 The handling of both packages in LyX is basically the same.
2226 \begin_inset Flex CharStyle:MenuItem
2229 \begin_layout Plain Layout
2230 Document\SpecialChar \menuseparator
2237 \begin_inset Flex CharStyle:MenuItem
2240 \begin_layout Plain Layout
2247 \begin_inset Flex CharStyle:MenuItem
2250 \begin_layout Plain Layout
2257 \begin_inset Flex CharStyle:MenuItem
2260 \begin_layout Plain Layout
2267 With both packages, you will get some extra features in the citation dialog
2268 and you can select the style of the reference (
2269 \begin_inset Quotes eld
2273 \begin_inset Quotes erd
2277 \begin_inset Quotes eld
2281 \begin_inset Quotes erd
2285 \begin_inset Quotes eld
2289 \begin_inset Quotes erd
2293 \begin_inset Quotes eld
2297 \begin_inset Quotes erd
2301 Note that both packages need specifically designed style files.
2302 They both ship their own, but there are lots of additional style files,
2303 and there is even an interactive style file builder
2307 \begin_layout Plain Layout
2309 \begin_inset Flex URL
2312 \begin_layout Plain Layout
2314 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2325 \begin_inset Flex CharStyle:Code
2328 \begin_layout Plain Layout
2337 \begin_layout Subsection
2338 Sectioned Bibliographies
2341 \begin_layout Standard
2342 Sometimes you might need to divide your bibliography into several sections.
2343 If you are for instance a historian, the possibility to separate sources
2344 and scientific works is most likely a
2345 \begin_inset Quotes eld
2349 \begin_inset Quotes erd
2353 Unfortunately, BibTeX itself does not allow you to do this.
2354 But with the help of some LaTeX packages, BibTeX can be extended to fit
2358 \begin_layout Standard
2359 LyX provides native support for one of these packages,
2367 \begin_layout Plain Layout
2369 \begin_inset Flex URL
2372 \begin_layout Plain Layout
2374 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2384 The advantage of this package (compared to other packages like
2388 ) is that you don't need to define new citation commands.
2389 Instead, you need to prepare different bibliographic databases which include
2390 the entries for the different sections of the bibliography.
2391 For example: If you want to divide your bibliography into the sections
2393 \begin_inset Quotes eld
2397 \begin_inset Quotes erd
2401 \begin_inset Quotes eld
2405 \begin_inset Quotes erd
2408 , you first need to create two bibliographic databases, e.
2409 \begin_inset space \thinspace{}
2413 \begin_inset space \space{}
2417 \begin_inset Flex CharStyle:Code
2420 \begin_layout Plain Layout
2427 \begin_inset Flex CharStyle:Code
2430 \begin_layout Plain Layout
2440 \begin_layout Standard
2442 \begin_inset Flex CharStyle:MenuItem
2445 \begin_layout Plain Layout
2446 Document\SpecialChar \menuseparator
2453 \begin_inset Flex CharStyle:MenuItem
2456 \begin_layout Plain Layout
2463 \begin_inset Flex CharStyle:MenuItem
2466 \begin_layout Plain Layout
2467 Sectioned bibliography
2473 Now you can insert multiple BibTeX bibliographies, one for each section
2474 of your bibliography.
2475 Returning to our example: Insert the BibTeX bibliography
2476 \begin_inset Flex CharStyle:Code
2479 \begin_layout Plain Layout
2485 and a second one for the database
2486 \begin_inset Flex CharStyle:Code
2489 \begin_layout Plain Layout
2496 You are free to use the same or different styles for each section.
2497 Additionally, you can chose if the bibliography section should contain
2499 \begin_inset Quotes eld
2502 all cited references
2503 \begin_inset Quotes erd
2506 of the specified database(s) (which is the default),
2507 \begin_inset Quotes eld
2510 all uncited references
2511 \begin_inset Quotes erd
2515 \begin_inset Quotes eld
2519 \begin_inset Quotes erd
2523 This might be useful if you would like to separate your bibliography into
2525 \begin_inset Quotes eld
2529 \begin_inset Quotes erd
2533 \begin_inset Quotes eld
2537 \begin_inset Quotes erd
2541 \begin_inset Quotes eld
2545 \begin_inset Quotes erd
2549 The titles for the sections can be added as ordinary sections or subsections.
2551 \begin_inset Flex CharStyle:Code
2554 \begin_layout Plain Layout
2560 removes the bibliography title, you have manually re-add that, too (as
2561 a chapter* or section*, for instance).
2564 \begin_layout Subsection
2565 Multiple Bibliographies
2568 \begin_layout Standard
2569 Multiple bibliographies, e.
2570 \begin_inset space \thinspace{}
2574 \begin_inset space \space{}
2577 a bibliography for each section or chapter of the document, are not supported
2580 \begin_inset Flex CharStyle:Code
2583 \begin_layout Plain Layout
2589 package, which is used for the creation of sectioned bibliographies in
2590 LyX (see the previous section), provides an easy way to solve this task,
2591 if you are willing to use some
2592 \begin_inset Flex CharStyle:MenuItem
2595 \begin_layout Plain Layout
2602 \begin_inset space ~
2606 \begin_inset CommandInset ref
2608 reference "sec:Inserting-TeX-Code"
2616 \begin_layout Plain Layout
2617 An alternative approach is to use the
2618 \begin_inset Flex CharStyle:Code
2621 \begin_layout Plain Layout
2628 \begin_inset Flex CharStyle:Code
2631 \begin_layout Plain Layout
2637 package, respectively.
2645 \begin_layout Standard
2647 \begin_inset Flex CharStyle:MenuItem
2650 \begin_layout Plain Layout
2651 Document\SpecialChar \menuseparator
2658 \begin_inset Flex CharStyle:MenuItem
2661 \begin_layout Plain Layout
2668 \begin_inset Flex CharStyle:MenuItem
2671 \begin_layout Plain Layout
2672 Sectioned bibliography
2678 In the document, you have to enclose the sections, which shall contain
2679 their own bibliography (including the BibTeX bibliography itself), between
2681 \begin_inset Flex CharStyle:Code
2684 \begin_layout Plain Layout
2693 \begin_inset Flex CharStyle:Code
2696 \begin_layout Plain Layout
2704 (those commands have to be inserted as TeX code).
2705 The bibliography will contain all references which have been cited in the
2707 \begin_inset Flex CharStyle:Code
2710 \begin_layout Plain Layout
2721 If you are using this approach, then every citation reference has to be
2723 \begin_inset Flex CharStyle:Code
2726 \begin_layout Plain Layout
2734 \begin_inset Flex CharStyle:Code
2737 \begin_layout Plain Layout
2746 \begin_layout Section
2750 \begin_layout Subsection
2754 \begin_layout Standard
2755 When you are working on a large file with many sections, it is often convenient
2756 to break up the document into several files, or perhaps you have something
2757 where a table may change from time to time, but the preceding text does
2759 In these cases, you should seriously consider using multipart documents.
2760 For example, scientific papers often have five major sections: the introduction
2761 , observations, results, discussion, and conclusion.
2762 Each of these could be its own separate LyX file, with one
2763 \begin_inset Quotes eld
2767 \begin_inset Quotes erd
2770 file which contains the title, authors, abstract, references, etc., plus
2771 the five included files.
2772 It is important to note that each of these files is a full LyX file which
2773 can be formatted and printed on its own, as well as included in a master
2775 Each of these files must have the same document class, however—don't attempt
2776 to mix book classes with article classes.
2777 You may also include LaTeX files; however, these files must not have their
2779 \begin_inset space \thinspace{}
2783 \begin_inset space \space{}
2786 everything up to and including the
2787 \begin_inset Flex CharStyle:Code
2790 \begin_layout Plain Layout
2799 \begin_inset Flex CharStyle:Code
2802 \begin_layout Plain Layout
2810 line must be deleted) or else errors will be generated when you try to
2814 \begin_layout Standard
2815 LyX allows you to include files quite easily with
2816 \begin_inset Flex CharStyle:MenuItem
2819 \begin_layout Plain Layout
2820 Insert\SpecialChar \menuseparator
2822 \begin_inset space ~
2831 When you click on this selection a small box is inserted into the file
2832 at the current cursor location.
2833 Clicking on the box raises a dialog which allows you to select the file
2834 to be included, and the method of its inclusion.
2838 \begin_layout Standard
2839 The file selection box should by now be obvious.
2840 The three inclusion methods are
2841 \begin_inset Quotes eld
2845 \begin_inset Quotes erd
2849 \begin_inset Quotes eld
2853 \begin_inset Quotes erd
2857 \begin_inset Quotes eld
2861 \begin_inset Quotes erd
2865 The difference between
2866 \begin_inset Quotes eld
2870 \begin_inset Quotes erd
2874 \begin_inset Quotes eld
2878 \begin_inset Quotes erd
2881 is really only meaningful to LaTeXperts, but the practical difference is
2882 that files which are
2883 \begin_inset Quotes eld
2887 \begin_inset Quotes erd
2890 are typeset beginning on a new page, while files which are
2891 \begin_inset Quotes eld
2895 \begin_inset Quotes erd
2898 are typeset starting on the current page.
2901 \begin_layout Standard
2902 Generally, the master file is converted into a full LaTeX file before typesettin
2903 g, while the included files are converted to LaTeX files which do not have
2904 all the preamble information.
2907 \begin_layout Standard
2909 \begin_inset Quotes eld
2913 \begin_inset Quotes erd
2916 included file allows you to include a file typeset exactly as it appears
2918 \begin_inset space \thinspace{}
2922 \begin_inset space \space{}
2926 \begin_inset Flex CharStyle:Code
2929 \begin_layout Plain Layout
2935 mode, with the characters set in a fixed-width typewriter font.
2936 Normally, spaces in this file are invisible, though two consecutive spaces
2937 are conserved, unlike LyX's normal treatment of spaces.
2938 However, setting the
2939 \begin_inset Flex CharStyle:MenuItem
2942 \begin_layout Plain Layout
2944 \begin_inset space ~
2948 \begin_inset space ~
2952 \begin_inset space ~
2960 checkbox typesets a mark to unambiguously define the presence of a space.
2964 \begin_layout Subsection
2965 Cross-References Between Files
2968 \begin_layout Standard
2969 \begin_inset Box Shadowbox
2978 height_special "totalheight"
2981 \begin_layout Plain Layout
2982 This section is somewhat out of date.
2983 Need to describe default master documents and how children are opened when
2993 \begin_layout Standard
2994 It is possible to set up cross-references between the different files.
2995 First, open all the files in question: let's call them A and B in a two
2996 file example, where B is included in A.
2997 Let's say you insert a label in A, then want to reference it in B.
2998 Open the cross-reference dialog in whilst in document B, and you can select
3000 \begin_inset Quotes eld
3004 \begin_inset Quotes erd
3010 \begin_layout Subsection
3011 Bibliography Lists in all Subdocuments
3014 \begin_layout Standard
3015 \begin_inset Box Frameless
3024 height_special "totalheight"
3027 \begin_layout Plain Layout
3028 This section also needs updating.
3029 There is now material about this on the wiki, and it could be copied here.
3037 \begin_layout Standard
3038 Copy the bibliography list with all entries to all subdocuments and transform
3040 This way LyX will find the
3041 \begin_inset Flex CharStyle:Code
3044 \begin_layout Plain Layout
3050 -files and you can easily insert references without making the bibliography
3054 \begin_layout Standard
3055 As the bibliography list is in a comment, LaTeX won't use use it and the
3056 references will look like this: [?], instead of like this: [1].
3057 One solution is to use the LaTeX-package
3058 \begin_inset Flex CharStyle:Code
3061 \begin_layout Plain Layout
3067 that will only include comments by processing the files separately.
3068 To do this, add in the LaTeX preamble of every subdocument the following:
3071 \begin_layout LyX-Code
3077 \begin_layout LyX-Code
3080 includecomment{comment}
3083 \begin_layout Standard
3085 \begin_inset Flex URL
3088 \begin_layout Plain Layout
3090 http://wiki.lyx.org/FAQ/Unsorted#toc31
3098 \begin_layout Section
3099 Fancy Headers and Footers
3102 \begin_layout Standard
3103 The default page layout is rather plain; for an
3104 \begin_inset Flex CharStyle:Code
3107 \begin_layout Plain Layout
3113 document class, all you get is a centered page number at the bottom of
3115 This document uses KOMA-script's book class, so it appears to be a bit
3117 But to really put on a show, you need to set the document page style to
3119 \begin_inset Quotes eld
3123 \begin_inset Quotes erd
3126 , as mentioned in the
3131 This section describes the LaTeX code you need to insert in your LaTeX
3132 preamble in order to get the desired effects.
3135 \begin_layout Standard
3136 For more information on fancy headers, see the
3137 \begin_inset Flex CharStyle:Code
3140 \begin_layout Plain Layout
3146 package documentation.
3148 \begin_inset Flex URL
3151 \begin_layout Plain Layout
3153 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3161 \begin_layout Standard
3162 The page header is divided into three fields, not surprisingly labeled
3163 \begin_inset Quotes eld
3167 \begin_inset Quotes erd
3171 \begin_inset Quotes eld
3175 \begin_inset Quotes erd
3179 \begin_inset Quotes eld
3183 \begin_inset Quotes erd
3187 The footer is also divided into these three fields.
3188 The LaTeX commands to set these fields in the simplest manner are
3189 \begin_inset Flex CharStyle:Code
3192 \begin_layout Plain Layout
3201 \begin_inset Flex CharStyle:Code
3204 \begin_layout Plain Layout
3213 \begin_inset Flex CharStyle:Code
3216 \begin_layout Plain Layout
3225 \begin_inset Flex CharStyle:Code
3228 \begin_layout Plain Layout
3237 Suppose you wish to put your name in the upper left hand corner of each
3239 Simply insert the following command in the preamble:
3242 \begin_layout Standard
3251 \begin_layout Standard
3252 You will now see your name in the upper left.
3253 If a field has a default entry that you would like to get rid of (often
3254 the page number appears in the central footer, simply include a command
3255 with a blank argument, e.
3256 \begin_inset space \thinspace{}
3262 \begin_layout Standard
3270 \begin_layout Standard
3271 Let's get really fancy: lets put the section number with the word
3272 \begin_inset Quotes eld
3276 \begin_inset Quotes erd
3280 \begin_inset space \thinspace{}
3284 \begin_inset space \space{}
3287 Section 3) in the upper left, the page number (e.
3288 \begin_inset space \thinspace{}
3292 \begin_inset space \space{}
3295 Page 4) in the upper right, your name in the lower left, and the date in
3297 The following commands should now appear in the preamble:
3300 \begin_layout Standard
3310 \begin_layout Standard
3318 \begin_layout Standard
3328 \begin_layout Standard
3337 \begin_layout Standard
3345 \begin_layout Standard
3355 \begin_layout Standard
3357 \begin_inset Flex CharStyle:Code
3360 \begin_layout Plain Layout
3369 \begin_inset Flex CharStyle:Code
3372 \begin_layout Plain Layout
3380 access LaTeX's section and page counters, and so print out the current
3381 section and page numbers.
3383 \begin_inset Flex CharStyle:Code
3386 \begin_layout Plain Layout
3394 simply prints out today's date.
3397 \begin_layout Standard
3398 The thicknesses of the horizontal rules drawn beneath the header and above
3399 the footer can also be modified.
3400 If you don't want one of the rules, set its thickness to 0.
3401 The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3407 \begin_inset Flex CharStyle:Code
3410 \begin_layout Plain Layout
3415 headrulewidth}{0.4pt}
3421 \begin_inset Flex CharStyle:Code
3424 \begin_layout Plain Layout
3429 footrulewidth}{0.4pt}
3434 to set the thicknesses.
3437 \begin_layout Standard
3438 You can switch the header/footer settings on and off for individual pages
3440 \begin_inset Flex CharStyle:Code
3443 \begin_layout Plain Layout
3446 thispagestyle{empty}
3452 \begin_inset Flex CharStyle:Code
3455 \begin_layout Plain Layout
3458 thispagestyle{plain}
3464 \begin_inset Flex CharStyle:Code
3467 \begin_layout Plain Layout
3470 thispagestyle{fancy}
3476 Simply insert them in the text on the page you want changed and mark them
3478 In fact, title pages are marked as plain by default, while following pages
3479 are marked fancy when using the global fancy setting.
3482 \begin_layout Standard
3483 As a final example, it is possible to include an image in the header or
3485 Suppose you want to put a company logo in the upper lefthand corner.
3486 You might try something like
3489 \begin_layout Standard
3498 includegraphics{logo.eps}}}
3501 \begin_layout Standard
3503 (you may need to preface this with
3504 \begin_inset Flex CharStyle:Code
3507 \begin_layout Plain Layout
3511 usepackage{graphics}
3516 if you don't include graphics elsewhere in your document).
3519 \begin_layout Section
3520 Itemize Bullet Selection
3521 \begin_inset CommandInset label
3530 \begin_layout Standard
3536 \begin_layout Subsection
3540 \begin_layout Standard
3541 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3542 Using this dialog you can easily specify what bullet shape to use at each
3543 level of an itemized list.
3544 These settings are document-wide so you won't be able to specify different
3545 sets of bullets for different paragraphs.
3549 \begin_layout Plain Layout
3550 Well, actually you can but you'll have to do it by hand.
3558 \begin_layout Subsection
3562 \begin_layout Standard
3563 Open the dialog by selecting the
3564 \begin_inset Flex CharStyle:MenuItem
3567 \begin_layout Plain Layout
3568 Document\SpecialChar \menuseparator
3574 menu item and then select the
3575 \begin_inset Flex CharStyle:MenuItem
3578 \begin_layout Plain Layout
3587 \begin_layout Standard
3588 The dialog provides you with a table of bullet shapes.
3589 A column of buttons on the left of the table provides access to the six
3590 different panels of bullet shapes.
3591 The row of buttons across the top is used to select which bullet depth
3593 A text entry under the table shows the currently selected bullet shape's
3594 LaTeX equivalent and this can be edited if desired.
3595 If you do modify the text you will also need to specify any needed packages
3596 in the LaTeX preamble.
3599 \begin_layout Standard
3600 The six panels are divided up by the packages they require.
3601 The following table shows the mappings from button name to LaTeX packages.
3604 \begin_layout Standard
3606 \begin_inset Tabular
3607 <lyxtabular version="3" rows="7" columns="2">
3608 <features tabularvalignment="middle">
3609 <column alignment="center" valignment="top" width="0pt">
3610 <column alignment="center" valignment="top" width="0pt">
3612 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3615 \begin_layout Plain Layout
3630 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3633 \begin_layout Plain Layout
3650 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3653 \begin_layout Plain Layout
3668 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3671 \begin_layout Plain Layout
3687 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3690 \begin_layout Plain Layout
3705 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3708 \begin_layout Plain Layout
3725 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3728 \begin_layout Plain Layout
3743 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3746 \begin_layout Plain Layout
3763 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3766 \begin_layout Plain Layout
3781 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3784 \begin_layout Plain Layout
3801 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3804 \begin_layout Plain Layout
3819 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3822 \begin_layout Plain Layout
3839 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3842 \begin_layout Plain Layout
3857 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3860 \begin_layout Plain Layout
3883 \begin_layout Standard
3884 LyX doesn't stop you using bullets from packages you don't have.
3885 If you get errors from LaTeX when you try to view or print the file, then
3886 it is likely you are missing a package.
3890 \begin_layout Plain Layout
3891 LyX doesn't restrict your use since you may be editing locally and exporting
3900 \begin_layout Subsection
3904 \begin_layout Standard
3905 Select which bullet depth you want to change then select the bullet shape
3907 Any changes will not be visible in LyX, but are visible when viewing the
3911 \begin_layout Standard
3912 You can reset a bullet shape to the default simply by clicking your right
3913 mouse button on the appropriate bullet depth button.
3917 \begin_layout Plain Layout
3922 want to have multiple sets of paragraphs with different sets of bullets
3923 in each, then you're going to have to get your hands dirty with TeX code.
3924 The bullet selection dialog can help though because it provides you with
3925 the LaTeX code for a wide range of bullet shapes.
3926 To make your own custom paragraphs you have the following options:
3929 \begin_layout Plain Layout
3933 \begin_layout Plain Layout
3949 \begin_layout Plain Layout
3953 \begin_layout Plain Layout
3975 \begin_layout Itemize
3976 Use the LaTeX command
3977 \begin_inset Flex CharStyle:Code
3980 \begin_layout Plain Layout
3988 to specify a new bullet shape for a given depth.
3989 You'll also need to save the current bullet shape so you can restore it
3991 In this itemized list the following LaTeX code was used to change the bullet
3992 used for the first depth.
3996 \begin_layout LyX-Code
4006 \begin_layout LyX-Code
4023 \begin_layout Itemize
4024 Note that the itemize depth is specified in Roman numerals as part of the
4034 \begin_layout Itemize
4038 \begin_layout Plain Layout
4051 Specify each individual entry by starting each item with the bullet shape
4052 enclosed in square brackets and set as
4053 \begin_inset Flex CharStyle:MenuItem
4056 \begin_layout Plain Layout
4063 For example, this item was started with
4064 \begin_inset Flex CharStyle:Code
4067 \begin_layout Plain Layout
4082 \begin_layout Plain Layout
4086 \begin_layout Plain Layout
4102 \begin_layout Plain Layout
4103 You'll also need to revert the labelitem back to its previous setting for
4104 the global bullet shape settings to remain in effect.
4105 The way used here was:
4108 \begin_layout LyX-Code
4123 \begin_layout Chapter
4124 LyX and the World Wide Web
4127 \begin_layout Standard
4128 LyX has long supported the export of documents to various web-friendly formats,
4130 Before verson 1.7, however, HTML export was always accomplished by the use
4131 of external converters.
4135 \begin_layout Plain Layout
4136 For details on the use of external converters with LyX, see the
4141 section of the Customization manual.
4146 These fall into two large groups: there are converters that use LaTeX as
4147 an intermediate format, such as
4148 \begin_inset Flex CharStyle:Code
4151 \begin_layout Plain Layout
4158 \begin_inset Flex CharStyle:Code
4161 \begin_layout Plain Layout
4168 \begin_inset Flex CharStyle:Code
4171 \begin_layout Plain Layout
4177 , relying upon LyX to produce the LaTeX; and there is a converter that works
4178 directly on LyX files,
4179 \begin_inset Flex CharStyle:Code
4182 \begin_layout Plain Layout
4189 All of these have different advantages and disadvantages.
4193 \begin_layout Standard
4194 The LaTeX-based converters have the advantage that, in principle, they know
4195 everything about the exported document that LaTeX does.
4196 Such converters do not care, for example, if a certain block of code was
4197 produced by LyX or was Evil Red Text.
4199 \begin_inset Flex CharStyle:Code
4202 \begin_layout Plain Layout
4208 files, counters, and references, and can often make use of the
4209 \begin_inset Flex CharStyle:Code
4212 \begin_layout Plain Layout
4218 files generated by BibTeX.
4219 On the other hand, LaTeX is a very hard language to parse---it is sometimes
4220 said that only TeX itself understands TeX---and LaTeX-based converters
4221 will often choke on what seem to be quite simple constructs; complex ones
4222 can throw them completely, and as of this writing, for example, the
4226 manual will not export with
4227 \begin_inset Flex CharStyle:Code
4230 \begin_layout Plain Layout
4236 , though the others will.
4237 The other issue concerns how math is handled.
4238 These converters typically convert the formulae into little pictures that
4239 are then linked from the HTML document.
4240 Since these are actually generated by LaTeX, they are accurate.
4241 But they do not scale well, and just getting them to look as if they are
4242 actually meant to be in your document---so that the font sizes seem to
4243 be roughly the same---can be a challenge.
4246 \begin_layout Standard
4248 \begin_inset Flex CharStyle:Code
4251 \begin_layout Plain Layout
4257 solves some of these problems.
4258 In particular, its rendering of math tends to look better than
4259 \begin_inset Flex CharStyle:Code
4262 \begin_layout Plain Layout
4268 's, at least in simpler cases, since it renders math using a neat combination
4269 of HTML and CSS rather than converting the formulae to images.
4270 But more complex formula tend to be rendered less well than with
4271 \begin_inset Flex CharStyle:Code
4274 \begin_layout Plain Layout
4280 , since there is no reasonable way of scaling parentheses in HTML, for example.
4281 More importantly (as of version 0.39, at least),
4282 \begin_inset Flex CharStyle:Code
4285 \begin_layout Plain Layout
4291 has no support for math macros, for user-defined paragraph or character
4292 styles, or for tables of contents and figures.
4293 These limitations make
4294 \begin_inset Flex CharStyle:Code
4297 \begin_layout Plain Layout
4303 unsuitable for many of the documents more advanced LyX users would produce.
4304 In principle, of course, all of these problems could be solved, but the
4305 LyX developers have decided to follow a different path and made LyX itself
4306 capable of writing XHTML, just as it is capable of writing LaTeX, DocBook,
4310 \begin_layout Standard
4311 As of this writing, XHTML output remains under development and should probably
4313 \begin_inset Quotes eld
4317 \begin_inset Quotes erd
4324 \begin_layout Plain Layout
4326 \begin_inset Flex CharStyle:Code
4329 \begin_layout Plain Layout
4330 development/HTML.notes
4335 , which can be found in the LyX source tree or
4336 \begin_inset CommandInset href
4338 name "accessed online"
4339 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4343 , usually contains up-to-date information about the state of XHTML output.
4348 Still, the developers have chosen this approach because it has several
4349 potential advantages over the other two.
4352 \begin_layout Standard
4353 These advantages are primarily due to the fact that the XHTML output routines,
4354 since they are part of LyX, know everything LyX knows about the document
4359 \begin_layout Plain Layout
4360 Another advantege is that, since these routines are internal to LyX, they
4361 are immune to changes in LyX's file format, or to changes in the semantics
4367 So they know about the table of contents (as displayed in the Outline),
4368 about the counters associated with different paragraph styles, and about
4369 user-defined styles.
4370 The XHTML output routines know what LyX knows about internationalization,
4371 too, so they will output
4372 \begin_inset Quotes eld
4376 \begin_inset Quotes erd
4380 \begin_inset Quotes eld
4388 \begin_inset Quotes erd
4391 , depending upon the language in effect at the time.
4395 \begin_layout Standard
4396 Quite generally, the output routines know everything LyX knows about document
4397 layout, that is, about the document is to be rendered on screen.
4398 We can use this information when we output the document as XHTML.
4403 generates CSS style information corresponding to the layout information
4404 it uses to render the document on screen: if section headings are supposed
4405 to be sans-serif and bold as seen in LyX, then (by default) they will be
4406 sans-serif and bold when viewed in a web browser, too.
4407 And this is true not just for pre-defined styles, like Section, but for
4408 any style, including user-defined styles.
4409 Indeed, the XHTML output routines make no distinction between user-defined
4410 paragraph and character styles and LyX's own pre-defined styles: in each
4411 case, everything LyX knows about the styles is contained in the layout
4413 And much the same is true as regards pre-defined textual insets, such as
4414 footnotes, and custom versions.
4418 \begin_layout Standard
4419 The result is that XHTML output can be customized and extended in
4423 the same way LaTeX output can be customized and extended: through layout
4425 See chapter five of the
4429 manual for the details.
4432 \begin_layout Standard
4433 As for math, LyX renders math using MathML.
4434 This has advantages and disadvantages.
4435 The advantage is that MathML is a dialect of XML designed specifically
4436 for mathematics on the web, and it typically renders very well in browsers
4438 The first disadvantage is that not all browsers support MathML, and support
4439 is not complete even in the Gecko-based browsers, such as Firefox.
4440 A second disadvantage, as compared to rendering math by images, is that
4441 LyX can only output MathML for LaTeX constructs that it knows about, which
4442 means that the use of ERT in math---e.g., the command
4443 \begin_inset Flex CharStyle:Code
4446 \begin_layout Plain Layout
4455 \begin_inset Flex CharStyle:Code
4458 \begin_layout Plain Layout
4464 package---will produce nothing helpful.
4465 Eventually, therefore, LyX will offer the user the option to use MathML
4466 or images, and it will offer this choice on a case by case basis.
4469 \begin_layout Standard
4470 The remainder of this chapter contains more detailed information on XHTML
4471 output, its limitations, and ways around those limitations.
4474 \begin_layout Standard
4475 \begin_inset Note Note
4478 \begin_layout Plain Layout
4479 This is very incomplete at this point!
4487 \begin_layout Section
4488 Bibliography and Citations
4491 \begin_layout Standard
4492 XHTML output fully supports bibliographies and citations.
4496 \begin_layout Standard
4497 Citation labels are generated by exactly the same machinery that generates
4498 LyX's on-screen labels, so the labels will look in the output much as they
4499 do in LyX, though better.
4500 If you are using numerical citations, then LyX will output numerical labels,
4501 such as [1] or [17], rather than simply showing the citation key in square
4502 brackets, as it does on-screen.
4503 If you are using author-year citations, then LyX will add lowercase letters
4504 to the years, just as BibTeX does, if it finds more than one citation for
4505 a given author-year combination.
4506 The labels will be printed with the bibliography entries.
4507 Note that there is, at present, no way to customize the appearance of the
4508 labels, for example, to choose between square brackets and parentheses.
4511 \begin_layout Standard
4512 Bibliography output is handled by the same machinery that handles the presentati
4513 on of reference information in the citation dialog, so you will see in the
4514 XHTML output pretty much what you would see if you were to look at a given
4515 entry in the citation dialog.
4516 The formatting can be customized in your layout file or, preferably, in
4519 \begin_inset CommandInset ref
4521 reference "sub:Citation-format-description"
4529 manual for the details.
4532 \begin_layout Standard
4533 The other significant defect is that cross-referenced information is printed
4534 with every entry with which it is associated.
4535 So you can see things like this:
4540 \begin_inset Quotes eld
4543 Context and Logical Form
4544 \begin_inset Quotes erd
4549 Language in Context: Selected Essays
4551 (Oxford: Oxford University Press, 2007), pp.
4557 \begin_inset Quotes eld
4560 Semantics in Context
4561 \begin_inset Quotes erd
4566 Language in Context: Selected Essays
4568 (Oxford: Oxford University Press, 2007), pp.
4572 \begin_layout Standard
4573 This should be fixed before long.
4576 \begin_layout Standard
4577 There is no support at present for sectioned bibliographies.
4578 If you have multiple bibliographies, then LyX will print the same bibliography
4582 \begin_layout Section
4586 \begin_layout Standard
4587 LyX will happily export indexes as XHTML, but with certain limitations at
4591 \begin_layout Standard
4592 Index export will be most reliable when you do not attempt to use the fancy
4593 constructs that are described in the section on indexes in the
4601 \begin_layout Plain Layout
4602 The main issue here is that LyX itself does not really handle these.
4603 It just lets you enter what you would have to enter in raw LaTeX.
4608 We'll describe how they are handled using the subsection headings from
4612 \begin_layout Itemize
4613 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
4614 these, but the entries must be separated by
4615 \begin_inset Quotes eld
4619 \begin_inset Quotes erd
4622 , that is, there must be spaces around the exclamation point.
4623 This is because it is otherwise too difficult to check for escaped exclamation
4624 points, ones in math, and so forth.
4627 \begin_layout Itemize
4628 Page Ranges: There is no support at all for page ranges, since these make
4629 no sense with XHMTL.
4630 Instead, you will just get two index entries, one at either end.
4633 \begin_layout Itemize
4634 Cross-referencing: There is no support for cross-referencing.
4635 If LyX finds an entry containing the
4636 \begin_inset Quotes eld
4639 |see\SpecialChar \ldots{}
4641 \begin_inset Quotes erd
4644 construct, it is just dropped, and the rest is treated as an ordinary index
4648 \begin_layout Itemize
4649 Index Entry Order: LyX does support attempts to fix the sorting order.
4650 It will take what is before the first `@' it finds and use that for sorting,
4651 taking what follows the first `@' to be the actual entry.
4652 At present, LyX does not check for escaped `@', so do not try to index
4656 \begin_layout Itemize
4657 Index Entry Layout: You can format entries by using the text style dialog,
4658 or by using any other method available within LyX itself.
4659 There is no support for constructs like:
4660 \begin_inset Quotes eld
4664 \begin_inset Quotes erd
4668 Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
4669 and everything that follows it.
4672 \begin_layout Itemize
4673 Multiple Indexes: There is no support for multiple indexes.
4674 Rather, all index entries will be printed as one large index.
4675 To avoid our printing several versions of the index, we print only the
4676 main index, so make sure you have one.
4679 \begin_layout Section
4680 Nomenclature and Glossary
4683 \begin_layout Standard
4684 There is at present no support for glossaries.
4687 \begin_layout Chapter
4691 \begin_layout Section
4695 \begin_layout Standard
4696 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
4697 and retrieve information about the LyX internal state.
4698 This is only intended for advanced users, but they should find it useful.
4699 It is by writing to the LyX server, for example, that bibliography managers,
4700 such as JabRef, are able to
4701 \begin_inset Quotes eld
4705 \begin_inset Quotes erd
4711 \begin_layout Section
4712 Starting the LyX Server
4715 \begin_layout Standard
4716 The LyX server works through the use of a pair of named pipes.
4717 These are usually located in
4718 \begin_inset Flex CharStyle:Code
4721 \begin_layout Plain Layout
4727 , (except on Windows, where
4731 named pipes are special objects located in
4732 \begin_inset Flex CharStyle:Code
4735 \begin_layout Plain Layout
4747 ) and have the names
4748 \begin_inset Quotes eld
4752 \begin_inset Flex CharStyle:Code
4755 \begin_layout Plain Layout
4762 \begin_inset Quotes erd
4766 \begin_inset Quotes eld
4770 \begin_inset Flex CharStyle:Code
4773 \begin_layout Plain Layout
4780 \begin_inset Quotes erd
4784 External programs write into
4785 \begin_inset Flex CharStyle:Code
4788 \begin_layout Plain Layout
4794 and read back data from
4795 \begin_inset Flex CharStyle:Code
4798 \begin_layout Plain Layout
4805 The stem of the pipe names can be defined in the
4806 \begin_inset Flex CharStyle:MenuItem
4809 \begin_layout Plain Layout
4810 Tools\SpecialChar \menuseparator
4817 \begin_inset Flex CharStyle:Code
4820 \begin_layout Plain Layout
4821 "/home/myhome/lyxpipe"
4827 \begin_inset Flex CharStyle:Code
4830 \begin_layout Plain Layout
4849 configure this manually in order for the server to start.
4852 \begin_layout Standard
4854 \begin_inset Flex CharStyle:Code
4857 \begin_layout Plain Layout
4864 \begin_inset Flex CharStyle:Code
4867 \begin_layout Plain Layout
4873 ' to create the pipes.
4874 If one of the pipes already exists, LyX will assume that another LyX process
4875 is already running and will not start the server.
4876 On POSIX (Unix like) systems, if for some other reason, an unused
4877 \begin_inset Quotes eld
4881 \begin_inset Quotes erd
4884 pipe is left in existence when LyX closes, then LyX will try to delete
4886 If this fails for some reason, you will need to delete the pipes manually
4887 and then restart LyX.
4888 On Windows, pipes are deleted by the OS on program termination or crash,
4890 \begin_inset Quotes eld
4894 \begin_inset Quotes erd
4897 pipes should not be possible.
4900 \begin_layout Standard
4901 To have several LyX processes with servers at the same time, you have to
4902 use different configurations, perhaps by using separate user directories,
4904 \begin_inset Flex CharStyle:Code
4907 \begin_layout Plain Layout
4913 file, for each process.
4916 \begin_layout Standard
4917 If you are developing a client program, you might find it useful to enable
4918 debugging information from the LyX server.
4919 Do this by starting LyX as
4920 \begin_inset Flex CharStyle:Code
4923 \begin_layout Plain Layout
4932 \begin_layout Standard
4933 You can find a complete example client written in C in the source distribution
4935 \begin_inset Flex CharStyle:Code
4938 \begin_layout Plain Layout
4939 development/lyxserver/server_monitor.c
4947 \begin_layout Standard
4948 Another useful tool is command-line based client you will find in
4949 \begin_inset Flex CharStyle:Code
4952 \begin_layout Plain Layout
4953 src/client/lyxclient
4961 \begin_layout Section
4962 Normal communication
4965 \begin_layout Standard
4966 To issue a LyX call, the client writes a line of ASCII text into the input
4968 This line has the following format:
4985 \begin_layout Description
4986 clientname is a name that the client can choose arbitrarily.
4987 Its only use is that LyX will echo it if it sends an answer—so a client
4988 can dispatch results from different requesters.
4991 \begin_layout Description
4992 function is the function you want LyX to perform.
4993 It is the same as the commands you'd use in the minibuffer.
4996 \begin_layout Description
4997 argument is an optional argument which is meaningful only to some functions
4999 \begin_inset Quotes eld
5003 \begin_inset Quotes erd
5006 LFUN will insert the argument as text at the cursor position).
5009 \begin_layout Standard
5010 The answer from LyX will arrive in the output pipe and be of the form
5027 \begin_layout Standard
5036 are just echoed from the command request, while
5040 is more or less useful information filled according to how the command
5041 execution worked out.
5042 Some commands, such as
5043 \begin_inset Quotes eld
5047 \begin_inset Quotes erd
5050 , will return information about the internal state of LyX, while other will
5051 return an empty data-response.
5052 This means that the command execution went fine.
5055 \begin_layout Standard
5056 In case of errors, the response from LyX will have this form
5073 \begin_layout Standard
5078 should contain an explanation of why the command failed.
5081 \begin_layout Standard
5085 \begin_layout LyX-Code
5086 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5087 \begin_inset Newline newline
5090 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5091 \begin_inset Newline newline
5094 read a <~/.lyxpipe.out
5095 \begin_inset Newline newline
5101 \begin_layout Section
5105 \begin_layout Standard
5106 LyX can notify clients of events going on asynchronously.
5107 Currently it will only do this if the user binds a key sequence with the
5109 \begin_inset Quotes eld
5113 \begin_inset Quotes erd
5117 The format of the string LyX sends is as follows:
5121 \begin_inset Flex CharStyle:Code
5124 \begin_layout Plain Layout
5135 \begin_layout Standard
5140 is the printed representation of the key sequence that was actually typed
5144 \begin_layout Standard
5145 This mechanism can be used to extend LyX's command set and implement macros.
5146 Bind some key sequence to
5147 \begin_inset Quotes eld
5151 \begin_inset Quotes erd
5155 Then start a client that listens on the output pipe, dispatches the command
5156 according to the sequence, and starts a function that may use LyX calls
5157 and LyX requests to issue a command or a series of commands to LyX.
5160 \begin_layout Section
5161 The simple LyX Server Protocol
5164 \begin_layout Standard
5165 LyX implements a simple protocol that can be used for session management.
5166 All messages are of the form
5179 \begin_layout Standard
5185 \begin_inset Quotes eld
5189 \begin_inset Quotes erd
5193 \begin_inset Quotes eld
5197 \begin_inset Quotes erd
5202 \begin_inset Quotes eld
5206 \begin_inset Quotes erd
5209 is received from a client, LyX will report back to inform the client that
5210 it's listening to it's messages, while
5211 \begin_inset Quotes eld
5215 \begin_inset Quotes erd
5218 sent from LyX will inform clients that LyX is closing.
5221 \begin_layout Section
5222 Reverse DVI/PDF search
5225 \begin_layout Standard
5226 Some DVI/PDF viewers
5230 \begin_layout Plain Layout
5231 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5232 Skim on Mac OSX and SumatraPDF on Windows.
5241 facility (also called
5246 This means that you can tell LyX to put the cursor to a specific line in
5247 the document by clicking at the respective position in the DVI/PDF output.
5248 To achieve this, the viewer must be able to communicate with LyX.
5249 This is done via the LyX server either by using the named pipe (
5253 ), or the UNIX domain socket (
5257 ) that LyX creates in its temporary directory (this is the way the
5258 \begin_inset Flex CharStyle:Code
5261 \begin_layout Plain Layout
5267 program communicates with LyX).
5268 In some cases, you need a helper script that mediates between the viewer
5269 and LyX, in others, the viewer can communicate with LyX directly.
5270 This depends on the selected viewer and on your operating system.
5271 The same applies to the way viewers need to be configured and the way the
5272 reverse search is actually performed.
5273 In what follows, we will thus describe how to setup reverse search for
5275 Before we turn to this, though, we will explain what needs to be done generally
5276 to enable reverse search in the DVI/PDF output.
5279 \begin_layout Subsection
5280 Enabling reverse search
5283 \begin_layout Standard
5284 LaTeX provides several different methods for reverse search.
5285 Some are built-in in the
5286 \begin_inset Flex CharStyle:Code
5289 \begin_layout Plain Layout
5295 program, some are provided by external packages.
5296 Your choice depends on whether your LaTeX distribution already provides
5297 a given method (the built-in methods are rather new) and whether your viewer
5299 The available methods are described in the following.
5302 \begin_layout Subsubsection*
5303 Built-in DVI-search via src-specials (DVI only)
5306 \begin_layout Standard
5307 This method provides the DVI file with the necessary information for reverse
5309 It is available in LaTeX since quite some time (any somewhat recent LaTeX
5310 distribution should include it), and it works reliably.
5311 To enable it, change the
5312 \begin_inset Flex CharStyle:MenuItem
5315 \begin_layout Plain Layout
5320 \begin_layout Plain Layout
5333 \begin_inset Flex CharStyle:MenuItem
5336 \begin_layout Plain Layout
5341 \begin_layout Plain Layout
5348 eX (plain)->DraftDVI
5354 \begin_inset Flex CharStyle:MenuItem
5357 \begin_layout Plain Layout
5358 Preferences\SpecialChar \menuseparator
5359 File Handling\SpecialChar \menuseparator
5366 \begin_inset Flex CharStyle:Code
5369 \begin_layout Plain Layout
5370 latex -src-specials $$i
5376 If this doesn't work, check if your TeX engine needs different options
5377 (the syntax might differ in some distributions).
5380 \begin_layout Subsubsection*
5381 External Packages (PDFSync and scrltx)
5384 \begin_layout Standard
5393 provide reverse search facility for PDF output (via pdflatex) and DVI output,
5395 In order to enable it, load the packages in the LyX preamble:
5398 \begin_layout Itemize
5399 \begin_inset Flex CharStyle:Code
5402 \begin_layout Plain Layout
5410 for reverse PDF search,
5413 \begin_layout Itemize
5415 \begin_inset Flex CharStyle:Code
5418 \begin_layout Plain Layout
5421 usepackage[active]{srcltx}
5426 for reverse DVI search.
5429 \begin_layout Standard
5430 If you want to be able to perform both DVI and PDF reverse searches, you
5431 can also insert in the preamble the following lines
5434 \begin_layout LyX-Code
5438 \begin_inset Newline newline
5444 \begin_inset Newline newline
5450 \begin_inset Newline newline
5456 \begin_inset Newline newline
5461 usepackage[active]{srcltx}
5462 \begin_inset Newline newline
5470 \begin_layout Standard
5471 This way, you can preview the file as either DVI or PDF (pdflatex) and the
5472 right package will be used.
5475 \begin_layout Standard
5476 Note that PDFSync might affect the output layout of your document.
5477 It is therefore advised to disable PDFsync for final documents.
5480 \begin_layout Subsubsection*
5481 Built-in reverse search via SyncTeX (DVI and PDF)
5484 \begin_layout Standard
5486 \begin_inset Flex CharStyle:Code
5489 \begin_layout Plain Layout
5495 have built-in support for both PDF and DVI reverse search.
5500 facility is basically the result of the integration of the PDFSync package
5501 to the pdftex program and its merge with the
5506 You need at least TeXLive 2008 or a recent MikTeX distribution in order
5508 Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
5509 already provide SyncTeX support.
5512 \begin_layout Standard
5513 To enable SyncTeX for DVI output, change the
5514 \begin_inset Flex CharStyle:MenuItem
5517 \begin_layout Plain Layout
5522 \begin_layout Plain Layout
5535 \begin_inset Flex CharStyle:MenuItem
5538 \begin_layout Plain Layout
5543 \begin_layout Plain Layout
5550 eX (plain) -> DraftDVI
5556 \begin_inset Flex CharStyle:MenuItem
5559 \begin_layout Plain Layout
5560 Preferences\SpecialChar \menuseparator
5561 File Handling\SpecialChar \menuseparator
5568 \begin_inset Flex CharStyle:Code
5571 \begin_layout Plain Layout
5572 latex -synctex=1 $$i
5577 , and for PDF output, change the
5578 \begin_inset Flex CharStyle:MenuItem
5581 \begin_layout Plain Layout
5586 \begin_layout Plain Layout
5593 eX (pdflatex) -> PDF (pdflatex)
5599 \begin_inset Flex CharStyle:Code
5602 \begin_layout Plain Layout
5603 pdflatex -synctex=1 $$i
5609 Check the documentation of your viewer whether the viewer needs to be configure
5610 d for the use with SyncTeX.
5614 \begin_layout Plain Layout
5616 \begin_inset Flex CharStyle:Code
5619 \begin_layout Plain Layout
5625 option enables gzip compression.
5626 If your viewer does not support it, you should instead use
5627 \begin_inset Flex CharStyle:Code
5630 \begin_layout Plain Layout
5644 \begin_layout Subsection
5645 Configuring and using specific viewers
5648 \begin_layout Subsubsection*
5649 Xdvi (all platforms)
5652 \begin_layout Standard
5654 \begin_inset Flex CharStyle:Code
5657 \begin_layout Plain Layout
5663 , you don't need to do anything else for performing a reverse DVI search,
5664 as LyX already provides the necessary hooks for automatically using the
5666 \begin_inset Flex CharStyle:Code
5669 \begin_layout Plain Layout
5676 Just setup your document as described above (reverse search is triggered
5677 by Ctrl-click or Alt-click on Mac OSX, respectively).
5680 \begin_layout Standard
5681 However, if for whatever reason you want to use the named pipe instead of
5682 the socket for communicating with LyX, simply change the DVI viewer in
5684 \begin_inset Flex CharStyle:MenuItem
5687 \begin_layout Plain Layout
5688 Preferences\SpecialChar \menuseparator
5689 File Handling\SpecialChar \menuseparator
5699 \begin_layout Plain Layout
5700 On Mac OSX you have to use
5701 \begin_inset Flex CharStyle:Code
5704 \begin_layout Plain Layout
5705 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
5716 \begin_inset Flex CharStyle:Code
5719 \begin_layout Plain Layout
5720 xdvi -editor 'lyxeditor.sh %f %l'
5726 \begin_inset Flex CharStyle:Code
5729 \begin_layout Plain Layout
5735 is a suitable script.
5736 For example, a minimal shell script is the following one:
5739 \begin_layout LyX-Code
5741 \begin_inset Newline newline
5744 LYXPIPE="/path/to/lyxpipe"
5745 \begin_inset Newline newline
5748 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
5749 \begin_inset Newline newline
5752 echo "$COMMAND" > "${LYXPIPE}".in || exit
5753 \begin_inset Newline newline
5756 read < "${LYXPIPE}".out || exit
5759 \begin_layout Standard
5761 \begin_inset Flex CharStyle:Code
5764 \begin_layout Plain Layout
5774 \begin_layout Plain Layout
5781 XServer pipe path specified in
5782 \begin_inset Flex CharStyle:MenuItem
5785 \begin_layout Plain Layout
5786 Preferences\SpecialChar \menuseparator
5796 \begin_layout Plain Layout
5798 \begin_inset Flex CharStyle:Code
5801 \begin_layout Plain Layout
5807 folder of a source distribution you can find a
5808 \begin_inset Flex CharStyle:Code
5811 \begin_layout Plain Layout
5817 script which is able to locate the
5821 based on your preferences.
5829 \begin_layout Subsubsection*
5833 \begin_layout Standard
5835 \begin_inset Flex CharStyle:Code
5838 \begin_layout Plain Layout
5839 /Applications/MacDviX_Folder/calleditor.script
5844 , add the following lines:
5847 \begin_layout LyX-Code
5852 \begin_layout Plain Layout
5859 X.app/Contents/MacOS/lyxeditor "$2" $1
5860 \begin_inset Newline newline
5866 \begin_layout Standard
5867 Modify the lines accordingly if you install LyX somewhere else than in the
5868 Applications folder.
5871 \begin_layout Standard
5872 Reverse search is triggered by Alt-click (OPTION-click).
5875 \begin_layout Subsubsection*
5879 \begin_layout Standard
5881 \begin_inset Flex CharStyle:Code
5884 \begin_layout Plain Layout
5885 open -a Skim.app $$i
5890 to the viewer setting in
5891 \begin_inset Flex CharStyle:MenuItem
5894 \begin_layout Plain Layout
5895 Preferences\SpecialChar \menuseparator
5896 File Handling\SpecialChar \menuseparator
5897 File formats\SpecialChar \menuseparator
5904 \begin_inset Flex CharStyle:MenuItem
5907 \begin_layout Plain Layout
5908 Skim\SpecialChar \menuseparator
5909 Preferences\SpecialChar \menuseparator
5919 \begin_layout Plain Layout
5929 \begin_layout Standard
5930 Reverse search is triggered by COMMAND-SHIFT-click
5933 \begin_layout Subsubsection*
5937 \begin_layout Standard
5939 \begin_inset Flex CharStyle:MenuItem
5942 \begin_layout Plain Layout
5943 Settings\SpecialChar \menuseparator
5944 Configure Okular\SpecialChar \ldots{}
5945 \SpecialChar \menuseparator
5952 \begin_inset Quotes eld
5956 \begin_inset Quotes erd
5960 \begin_inset Flex CharStyle:Code
5963 \begin_layout Plain Layout
5972 \begin_layout Standard
5973 Reverse search is triggered by SHIFT-click.
5976 \begin_layout Subsubsection*
5980 \begin_layout Standard
5981 Launch yap, choose its
5982 \begin_inset Flex CharStyle:MenuItem
5985 \begin_layout Plain Layout
5986 View\SpecialChar \menuseparator
5993 \begin_inset Quotes eld
5997 \begin_inset Quotes erd
6002 \begin_inset Quotes eld
6005 New\SpecialChar \ldots{}
6007 \begin_inset Quotes erd
6010 button and, in the window that opens, enter
6011 \begin_inset Quotes eld
6015 \begin_inset Quotes erd
6018 (or any other name you like) in the
6019 \begin_inset Quotes eld
6023 \begin_inset Quotes erd
6027 Now click on the button labeled
6028 \begin_inset Quotes eld
6031 \SpecialChar \ldots{}
6033 \begin_inset Quotes erd
6036 to open a file dialog and navigate to the directory containing the batch
6038 \begin_inset Flex CharStyle:Code
6041 \begin_layout Plain Layout
6049 \begin_inset Flex CharStyle:Code
6052 \begin_layout Plain Layout
6058 and then specify the program arguments as
6059 \begin_inset Flex CharStyle:Code
6062 \begin_layout Plain Layout
6070 \begin_inset Flex CharStyle:Code
6073 \begin_layout Plain Layout
6079 wrapper is used for communicating with LyX through the
6086 \begin_layout LyX-Code
6088 \begin_inset Newline newline
6091 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
6100 \begin_inset Newline newline
6114 \begin_layout Standard
6115 Make sure that the LyXServer pipe path you specified in LyX is
6116 \begin_inset Flex CharStyle:Code
6119 \begin_layout Plain Layout
6133 , otherwise change the
6134 \begin_inset Flex CharStyle:Code
6137 \begin_layout Plain Layout
6143 wrapper accordingly.
6146 \begin_layout Standard
6147 In yap, reverse search is triggered by double-click.
6150 \begin_layout Subsubsection*
6151 SumatraPDF (Windows)
6154 \begin_layout Standard
6155 In order to use SumatraPDF for inverse search, enter
6156 \begin_inset Flex CharStyle:Code
6159 \begin_layout Plain Layout
6160 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6165 in the viewer setting in
6166 \begin_inset Flex CharStyle:MenuItem
6169 \begin_layout Plain Layout
6170 Preferences\SpecialChar \menuseparator
6171 File Handling\SpecialChar \menuseparator
6172 File formats\SpecialChar \menuseparator
6179 \begin_inset Flex CharStyle:Code
6182 \begin_layout Plain Layout
6188 is the previous wrapper.
6189 If SumatraPDF.exe is not in your command PATH, use its full file name.
6192 \begin_layout Standard
6193 Reverse search is triggered by double-click.
6196 \begin_layout Subsubsection*
6200 \begin_layout Standard
6201 First of all, make sure that yap is your default DVI viewer in the Windows
6202 environment, then launch it, choose its
6203 \begin_inset Flex CharStyle:MenuItem
6206 \begin_layout Plain Layout
6207 View\SpecialChar \menuseparator
6214 \begin_inset Quotes eld
6218 \begin_inset Quotes erd
6223 \begin_inset Quotes eld
6226 New\SpecialChar \ldots{}
6228 \begin_inset Quotes erd
6231 button and, in the window that opens, enter
6232 \begin_inset Quotes eld
6236 \begin_inset Quotes erd
6239 (or any other name you like) in the
6240 \begin_inset Quotes eld
6244 \begin_inset Quotes erd
6248 Now click on the button labeled
6249 \begin_inset Quotes eld
6252 \SpecialChar \ldots{}
6254 \begin_inset Quotes erd
6257 to open a file dialog and navigate to the directory containing the
6258 \begin_inset Flex CharStyle:Code
6261 \begin_layout Plain Layout
6267 program (which is installed by default on Cygwin along with the LyX executable).
6269 \begin_inset Flex CharStyle:Code
6272 \begin_layout Plain Layout
6278 and then specify the program arguments as
6279 \begin_inset Flex CharStyle:Code
6282 \begin_layout Plain Layout
6289 In this way, you will be using the
6293 for communicating with LyX.
6294 If, for whatever reason, you want to use the
6299 \begin_inset Flex CharStyle:Code
6302 \begin_layout Plain Layout
6308 option and be sure to specify the LyXServer pipe path in the LyX preferences.
6311 \begin_layout Standard
6312 In yap, reverse search is triggered by double-click.
6315 \begin_layout Subsubsection*
6319 \begin_layout Standard
6320 In order to use SumatraPDF for inverse search, enter
6321 \begin_inset Flex CharStyle:Code
6324 \begin_layout Plain Layout
6330 in the viewer setting in
6331 \begin_inset Flex CharStyle:MenuItem
6334 \begin_layout Plain Layout
6335 Preferences\SpecialChar \menuseparator
6336 File Handling\SpecialChar \menuseparator
6337 File formats\SpecialChar \menuseparator
6344 \begin_inset Flex CharStyle:Code
6347 \begin_layout Plain Layout
6353 is the following script (to be placed in your command PATH,
6354 \begin_inset Flex CharStyle:Code
6357 \begin_layout Plain Layout
6363 being the best choice):
6366 \begin_layout LyX-Code
6368 \begin_inset Newline newline
6372 \begin_inset Newline newline
6375 SumatraPDF -inverse-search "lyxeditor -g %f %l" $(basename $1)
6378 \begin_layout Standard
6379 This wrapper script is needed because SumatraPDF is a native Windows application
6380 and does not understand the posix paths used by the Cygwin version of LyX.
6381 If SumatraPDF.exe is not in your command PATH, use its full posix path in
6384 \begin_inset Flex CharStyle:Code
6387 \begin_layout Plain Layout
6393 enables communication via the
6399 \begin_inset Flex CharStyle:Code
6402 \begin_layout Plain Layout
6408 option if you want to use the
6412 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6415 \begin_layout Standard
6416 Reverse search is triggered by double-click.
6419 \begin_layout Chapter
6420 Special Document Classes
6423 \begin_layout Section
6427 \begin_layout Standard
6433 \begin_layout Subsection
6437 \begin_layout Standard
6438 This section describes how LyX can be used to write articles for submission
6439 to the scientific journal
6441 Astronomy and Astrophysics
6443 (www.edpsciences.fr/aa/
6444 \begin_inset Flex URL
6447 \begin_layout Plain Layout
6449 http://www.edpsciences.fr/aa/
6454 ) using Version 5.01 of the document class
6459 This package can be downloaded from the ftp site
6462 \begin_layout Standard
6463 \begin_inset VSpace medskip
6469 \begin_layout Standard
6471 \begin_inset Flex URL
6474 \begin_layout Plain Layout
6476 ftp://ftp.edpsciences.org/pub/aa/readme.html
6484 \begin_layout Standard
6485 \begin_inset VSpace medskip
6491 \begin_layout Standard
6492 A manual comes together with that package, and this text is not meant to
6493 replace the original manual but merely a short guide how to realize the
6494 correct form of your paper.
6498 \begin_layout Standard
6499 Please note that the publisher of the journal was changed from Springer
6500 to EDP Sciences starting January 1, 2001.
6501 That change implicated also some slight changes of the style files, namely
6502 the removal of the thesaurus command.
6503 The LyX class aa supports the newest version of these style files, V 5.01.
6504 If you have an older version installed, please upgrade.
6505 For compatibility, the old (version 4) layout has been kept as
6510 Please refer to the comments in
6512 LyXDir/layouts/aapaper.layout
6517 \begin_layout Subsection
6521 \begin_layout Standard
6522 It is recommended you start from the example template distributed with LyX.
6523 If you are not using a template, note the following settings:
6526 \begin_layout Itemize
6533 Document\SpecialChar \menuseparator
6536 dialog (OK, that one was obvious).
6539 \begin_layout Itemize
6540 Don't change the option
6543 \begin_inset space ~
6553 The whole layout is done by the macros, you shouldn't change anything.
6556 \begin_layout Subsection
6560 \begin_layout Standard
6561 First thing to enter is the header information.
6562 It consists of seven entries, of which some are optional.
6566 \begin_layout Itemize
6574 \begin_layout Itemize
6582 \begin_layout Itemize
6590 \begin_layout Itemize
6598 \begin_layout Itemize
6603 : [optional] if more than one author: whom to contact for offprint requests.
6606 \begin_layout Itemize
6611 : [optional] mail address for contacts.
6614 \begin_layout Itemize
6622 Received: <date>; Accepted <date>
6625 \begin_layout Standard
6626 There is no need to issue the
6632 command, this is done automatically by LyX when the header is finished.
6633 Although the order of the single header entries doesn't matter it is advised
6634 to keep the above sequence, just to get the best optics and meets the layout
6635 of the real document.
6638 \begin_layout Standard
6639 If you want to place footnotes in the header block, e.
6640 \begin_inset space \thinspace{}
6644 \begin_inset space \space{}
6647 to state your present address, just use the standard footnote via the menu
6650 Insert\SpecialChar \menuseparator
6654 LyX will automagically use the term
6663 \begin_layout Standard
6664 In addition to these topics, the macros use three additional LaTeX commands
6665 that have no counterpart in LyX:
6668 \begin_layout Itemize
6675 to separate different names for more than one author and institute, respectivel
6679 \begin_layout Itemize
6686 to mark corresponding author/institute pairs.
6687 The institutes are numbered sequentially as they appear in the
6691 field, so you have to put a marker to each author.
6694 \begin_layout Itemize
6701 to supply an email address for fast contact.
6704 \begin_layout Standard
6705 In all cases, the appropriate command has to be entered in LyX and marked
6711 \begin_layout Subsection
6715 \begin_layout Standard
6716 The abstract should immediately follow the header block.
6717 With version 5 the abstract environment was changed to a command, and there
6718 is now a resctriction to only one paragraph.
6719 In addition, it should contain an entry with the keywords.
6720 This is not yet implemented for LyX, therefore you have to enter the LaTeX
6727 by hand and mark it as LaTeX code.
6728 Refer to the example paper.
6731 \begin_layout Subsection
6732 Supported environments
6735 \begin_layout Standard
6736 The A&A paper layout supports the following environments for structuring
6740 \begin_layout Itemize
6746 \begin_layout Itemize
6752 \begin_layout Itemize
6758 \begin_layout Itemize
6764 \begin_layout Itemize
6770 \begin_layout Itemize
6776 \begin_layout Itemize
6782 \begin_layout Itemize
6788 \begin_layout Itemize
6794 \begin_layout Itemize
6800 \begin_layout Itemize
6806 \begin_layout Itemize
6812 \begin_layout Subsection
6813 Commands not supported by LyX
6816 \begin_layout Standard
6817 Some commands are not yet supported by the
6822 Some have already been mentioned.
6823 For the sake of completeness, they are listed all together here:
6826 \begin_layout Itemize
6834 \begin_layout Itemize
6842 \begin_layout Itemize
6850 \begin_layout Itemize
6858 \begin_layout Itemize
6866 \begin_layout Itemize
6874 \begin_layout Itemize
6882 \begin_layout Itemize
6890 \begin_layout Standard
6891 If you want to use any of these commands, you have to enter them yourself.
6894 Do not forget to mark them as LaTeX code!
6897 \begin_layout Subsection
6898 Figure and Table Floats
6901 \begin_layout Standard
6902 LyX provides support for the necessary float environments
6904 figure, figure*, table
6910 , therefore we won't tell much about it here.
6914 \begin_inset space ~
6920 Just remember that tables should be left-aligned.
6921 For that, select the table and change the alignment in
6923 Edit\SpecialChar \menuseparator
6925 \begin_inset space ~
6931 \begin_layout Standard
6932 There is only one special thing: the figures with caption besides the figure.
6933 To create such a figure, you have to do the following:
6936 \begin_layout Enumerate
6937 Create a wide figure float:
6939 Insert\SpecialChar \menuseparator
6940 Float\SpecialChar \menuseparator
6943 , then right click in the figure and select
6949 \begin_inset space ~
6957 \begin_layout Enumerate
6958 Enter your caption text.
6961 \begin_layout Enumerate
6966 to move the cursor above the caption.
6969 \begin_layout Enumerate
6973 \begin_layout Enumerate
6974 Position the cursor behind the figure and insert a horizontal fill:
6976 Insert\SpecialChar \menuseparator
6978 \begin_inset space ~
6981 Character\SpecialChar \menuseparator
6983 \begin_inset space ~
6991 \begin_layout Enumerate
6992 Switch to LaTeX mode:
6995 \begin_inset space ~
7003 \begin_layout Enumerate
7013 Do not close the brace!
7016 \begin_layout Enumerate
7017 Position the cursor behind the caption text, switch to LaTeX mode and insert
7021 \begin_inset space ~
7033 \begin_layout Standard
7034 Also, refer to the figures in the example paper.
7037 \begin_layout Subsection
7041 \begin_layout Standard
7042 For submission, the paper has to be formated in a special double-spacing
7044 For this purpose, you have to give the option
7048 to the documentclass.
7049 This must be done using the extra class options field in the
7051 Document\SpecialChar \menuseparator
7055 Just enter the string
7062 \begin_layout Subsection
7066 \begin_layout Standard
7071 directory contains an example paper written with LyX.
7072 It is the example paper from the original macro package, translated to
7074 Use it for inspiration, and compare the original LaTeX code with LyX way
7078 \begin_layout Section
7082 \begin_layout Standard
7088 \begin_layout Subsection
7092 \begin_layout Standard
7093 AASTeX is a set of macros produced by the American Astronomical Society
7094 to facilitate electronic manuscript submission to the three journals they
7095 publish: the Astrophysical Journal (including the Letters and Supplement),
7096 the Astronomical Journal, and the Publications of the Astronomical Society
7098 LyX has proven to be an excellent tool for generating these documents,
7099 especially given its equation, citation, and figure handling capabilities.
7100 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7101 is the version described here, or higher.
7102 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7103 incompatible with LyX.
7104 The AASTeX package may be downloaded from the AASTeX Web site
7107 \begin_layout Standard
7108 \begin_inset VSpace medskip
7114 \begin_layout Standard
7116 \begin_inset Flex URL
7119 \begin_layout Plain Layout
7121 http://www.journals.uchicago.edu/AAS/AASTeX
7129 \begin_layout Standard
7130 \begin_inset VSpace medskip
7136 \begin_layout Standard
7137 A complete user guide is contained in that package and you should familiarize
7138 yourself with it thoroughly before embarking on writing a paper in LyX.
7139 LyX will not reduce the need to figure out all the AASTeX commands, it
7140 will only reduce the drudgery of typing everything in.
7141 It is your responsibility to ensure that the final exported LaTeX document
7142 conforms completely to the requirements of the journal to which you are
7143 submitting your paper.
7146 \begin_layout Subsection
7147 Starting a New Paper
7150 \begin_layout Standard
7151 I strongly suggest that you start with the AASTeX template file.
7154 File\SpecialChar \menuseparator
7161 , enter the new file name, then choose the
7166 This will show the most common fields found in a manuscript.
7167 Simply overwrite the existing text (including the brackets,
7171 ) with the correct information.
7172 Many of the AASTeX commands and environments can be implemented directly
7173 in LyX, but some cannot: most noticeably
7185 , which should stick out like a sore thumb if you actually just opened the
7187 For commands such as these, the LaTeX code must be entered directly and
7189 Such commands are referred to as TeX code, or Evil Red Text.
7190 I tried to minimize the amount of TeX code needed in an AASTeX document,
7191 but there is still a bit more required than any of us would like.
7194 \begin_layout Subsection
7195 Finishing Your Paper
7198 \begin_layout Standard
7199 When the paper is finished to your satisfaction and previews/prints correctly,
7201 \begin_inset Quotes eld
7205 \begin_inset Quotes erd
7208 actions which need to be done before you submit it to the journals.
7212 \begin_layout Enumerate
7213 Export your paper as a LaTeX file (
7215 File\SpecialChar \menuseparator
7216 Export\SpecialChar \menuseparator
7223 \begin_layout Enumerate
7228 file with your favorite text editor
7232 \begin_layout Enumerate
7233 remove the comment lines before the
7242 \begin_layout Enumerate
7247 usepackage...{fontenc}
7249 line if it appears (usually just after
7264 \begin_layout Enumerate
7265 remove everything between (and including) the
7277 commands, except for any commands you specifically put into the LaTeX preamble
7278 (which should appear immediately after the
7279 \begin_inset Quotes eld
7282 User specified LaTeX commands
7283 \begin_inset Quotes erd
7294 \begin_layout Enumerate
7295 Run the resulting file through LaTeX to make sure it still processes correctly.
7298 \begin_layout Enumerate
7299 Reread the journal requirements to make sure your filenames and formats
7303 \begin_layout Enumerate
7307 \begin_layout Subsection
7308 Comments On Specific Commands
7311 \begin_layout Standard
7312 I will not describe the detailed usage of the individual AASTeX commands:
7313 the AASTeX User Guide (
7317 ) gives a good description of each.
7318 Thus it's probably easiest for me to go down the list as found in the guide
7319 and offer comments where necessary.
7320 So let's begin \SpecialChar \ldots{}
7324 \begin_layout Subsubsection
7325 Things that work as expected
7328 \begin_layout Standard
7332 \begin_layout Plain Layout
7344 \begin_layout Standard
7345 Because they work as you might expect, I simply list them and the section
7446 begin{thebibliography}
7454 (2.13.2), all the cite commands and their variations (2.13.2), the generic
7455 graphicx figure commands (2.14.1),
7479 (2.15.4, amongst other places),
7506 \begin_layout Standard
7507 The following style options also work correctly:
7528 Simply put them in the
7534 Layout\SpecialChar \menuseparator
7540 \begin_layout Standard
7544 \begin_layout Plain Layout
7556 \begin_layout Subsubsection
7557 Things that work, but require more comment
7560 \begin_layout Standard
7561 The following items work, but require a little more discussion:
7564 \begin_layout Itemize
7565 These items are reserved for use by the journal editors, but you can put
7566 them into the LaTeX preamble if you feel compelled to do so:
7599 \begin_layout Itemize
7600 These items may be placed in the LaTeX preamble, and are included as blanks
7601 in the template file:
7622 \begin_layout Itemize
7629 (2.3) – can only be used
7630 \begin_inset Quotes eld
7634 \begin_inset Quotes erd
7637 , not in the middle of a paragraph.
7638 Use TeX code if you need to embed it.
7641 \begin_layout Itemize
7648 (2.3) – will have extra {} after it.
7649 This should not cause an error.
7652 \begin_layout Itemize
7659 (2.6) – can only be used
7660 \begin_inset Quotes eld
7664 \begin_inset Quotes erd
7667 , not in the middle of a paragraph.
7668 Use TeX code if you need to embed it.
7671 \begin_layout Itemize
7678 (2.8) – can't insert a cross-reference tag, you must type the tag name by
7682 \begin_layout Itemize
7696 \begin_layout Itemize
7703 (2.9) – will have extra {} after it.
7704 This should not cause an error.
7707 \begin_layout Itemize
7714 (2.11) – will have extra {} after it.
7715 This should not cause an error.
7718 \begin_layout Itemize
7725 (2.14.2) – you can insert an optional filename argument by placing the cursor
7726 at the beginning of the text and selecting
7728 Insert\SpecialChar \menuseparator
7733 \begin_inset Quotes eld
7737 \begin_inset Quotes erd
7740 inserts an optional argument of the type needed by
7747 Hopefully it will be renamed someday.
7750 \begin_layout Itemize
7763 for the catalog ID optional parameter
7766 \begin_layout Itemize
7779 for the catalog ID optional parameter
7782 \begin_layout Subsubsection
7783 Things not implemented, use TeX code
7786 \begin_layout Standard
7790 \begin_layout Plain Layout
7802 \begin_layout Standard
7825 setcounter{equation}
7827 (2.12), Journal name abbreviations (2.13.4),
7863 (2.15.4, insert it as the first element in the lefthand cell after where
7865 Don't use any of LyX's rules in the table),
7877 (2.15.5), much of Misc (2.17, except
7928 \begin_layout Standard
7932 \begin_layout Plain Layout
7944 \begin_layout Subsubsection
7945 Things that cannot be implemented
7948 \begin_layout Standard
7949 \SpecialChar \ldots{}
7950 at least in any meaningful sort of way, so I suggest ignoring them.
7951 They are the references environment (2.13.3), and the deluxetable environment
7953 If you really, really need to use deluxetable, I suggest editing it in
7954 a separate file with a text editor, then using
7956 Insert\SpecialChar \menuseparator
7958 \begin_inset space ~
7963 to include it in your LyX document.
7968 file to see an example of this.
7971 \begin_layout Subsection
7972 FAQs, Tips, Tricks, and Other Ruminations
7975 \begin_layout Subsubsection
7976 Getting LyX and AASTeX to cooperate
7979 \begin_layout Standard
7980 It can be a bit tricky to get LyX to recognize a new layout and document
7982 When all else fails, do this:
7985 \begin_layout Enumerate
7986 Make certain that LaTeX can find AASTeX.
7987 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
7988 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
7995 \begin_layout Enumerate
8007 \begin_layout Enumerate
8010 Tools\SpecialChar \menuseparator
8013 in LyX, then restart LyX.
8016 \begin_layout Enumerate
8017 Open a regular new file, not from a template.
8018 Does AASTeX appear in the class list in
8020 Document\SpecialChar \menuseparator
8026 \begin_layout Standard
8027 If you get a warning from an existing AASTeX document about not being able
8028 to find the AASTeX layout or a message about
8029 \begin_inset Quotes eld
8032 You should not mix title layouts with normal ones
8033 \begin_inset Quotes erd
8036 , things haven't been installed correctly.
8039 \begin_layout Subsubsection
8040 LaTeX error processing a table
8043 \begin_layout Standard
8044 LyX, by default, attempts to center the table caption/title.
8045 This seems to produce a bad interaction in AASTeX so you should click somewhere
8046 in the caption/title, then select
8048 Edit\SpecialChar \menuseparator
8050 \begin_inset space ~
8064 This took care of it for me.
8067 \begin_layout Subsubsection
8071 \begin_layout Standard
8072 A couple of things: 1) I have noticed some funny spacing in the reference
8073 entries in the text.
8074 When you enter the bibliography item data, make sure their is
8078 space between the last author and the parenthesis setting off the year;
8082 \begin_inset space \thinspace{}
8086 \begin_inset space \space{}
8100 2) Entering the references at all is not obvious.
8101 The easiest thing is to start typing your first reference at the end of
8102 the document, then mark it as type
8107 That will put a small gray box in front of what you just typed.
8108 Click on the box to fill in the rest of the information.
8109 For new references, go to the end of an existing reference and press return.
8110 That will create a new line with its own box, etc.
8113 \begin_layout Subsubsection
8117 \begin_layout Standard
8118 Even though AASTeX provides its own figure commands (
8124 , for example), I much prefer LaTeX's standard figure commands (with the
8133 \begin_inset space ~
8136 commands as TeX code into a Figure Float box if you desire, but I never
8137 have much luck getting the layout right.
8138 With the standard graphics, LyX will insert a
8142 usepackage{graphicx}
8144 command into the LaTeX preamble and handle the figures in the standard
8145 LaTeX2e way, interspersing the figures in the text.
8146 I believe ApJ accepts figures exactly this way now; AJ might still use
8148 \begin_inset Quotes eld
8151 stack everything at the end
8152 \begin_inset Quotes erd
8158 \begin_layout Subsubsection
8159 Things I could have done, but didn't
8162 \begin_layout Standard
8164 \begin_inset Quotes eld
8168 \begin_inset Quotes erd
8171 things I could have implemented, but chose not to.
8172 For instance, I saw no point in double-spacing the text in the LyX window,
8173 even though it is double-spaced in the paper manuscript.
8174 Also, I chose not to make separate layouts for the preprint and preprint2
8176 Since I assume you will spend most of your time in the plain manuscript
8177 mode anyway, I decided not to chew up more disk space with this.
8181 \begin_layout Subsection
8185 \begin_layout Standard
8186 Your mileage may vary.
8187 I've now had papers published by both ApJ and AJ that have had 98% of the
8188 effort done in LyX; the last 2% was the LaTeX post-processing and a few
8190 I have had no trouble with the submission process, and I'm sure the journals
8191 were never aware that there might be a difference.
8192 So, go forth and publish!
8195 \begin_layout Section
8199 \begin_layout Standard
8202 David Johnson; updated by Richard Heck
8205 \begin_layout Standard
8206 \begin_inset VSpace bigskip
8212 \begin_layout Standard
8214 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8215 papers to be submitted to American Mathematical Society publications.
8216 The layouts are not tailored to a specific journal, but easily can be.
8217 You should refer to the AMS documentation for specific instructions for
8218 each journal (usually it will entail only changing a single line in the
8220 That documentation is available on the Web at
8221 \begin_inset Flex URL
8224 \begin_layout Plain Layout
8232 \begin_inset Flex URL
8235 \begin_layout Plain Layout
8237 ftp://ftp.ams.org/pub/tex/amslatex/
8243 These layouts are appropriate, and useful, for any mathematical writing.
8247 \begin_layout Standard
8248 There are two basic AMS LaTeX layouts:
8251 \begin_layout Itemize
8252 amsart: The standard AMS article format.
8255 \begin_layout Itemize
8256 amsbook: the standard AMS book (really, monograph) format.
8260 \begin_layout Standard
8261 The layouts themselves contain only the minimum necessary to use the AMS
8263 They do not, in particular, contain any of the `theorem' environments used
8264 for setting theorems, lemmas, and the like.
8265 These are contained, instead, in the
8266 \begin_inset Flex CharStyle:Code
8269 \begin_layout Plain Layout
8275 module, which is loaded by default when when you select one of the AMS
8277 (It can also be used with other classes and can be removed, if you would
8278 rather use something else.) Less commonly used environments are in the
8279 \begin_inset Flex CharStyle:Code
8282 \begin_layout Plain Layout
8283 Theorems (AMS-Extended)
8288 module, which must be loaded manually.
8291 \begin_layout Standard
8292 By default, theorems and the like are numbered consecutively throughout
8293 the document, but this may be modified by loading the module
8294 \begin_inset Flex CharStyle:Code
8297 \begin_layout Plain Layout
8298 Theorems (Order by Section)
8303 or, if you are using
8304 \begin_inset Flex CharStyle:Code
8307 \begin_layout Plain Layout
8314 \begin_inset Flex CharStyle:Code
8317 \begin_layout Plain Layout
8318 Theorems (Order by Chapter)
8324 These will number the results as
8325 \begin_inset Formula $n.m$
8328 , where the first number refers to the section (or chapter) and the second
8329 refers to the total number of results so far in that section (or chapter).
8330 Many environments are also available unnumbered.
8331 These are indicated by an asterisk at the end.
8332 If you happen to want
8336 unnumbered results, the the module
8337 \begin_inset Flex CharStyle:Code
8340 \begin_layout Plain Layout
8346 provides that option.
8349 \begin_layout Standard
8350 Note that these modules do not
8354 to be used with the AMS classes.
8355 It is perfectly possible to use the
8356 \begin_inset Flex CharStyle:Code
8359 \begin_layout Plain Layout
8365 module, and the others mentioned, with other classes, such as
8366 \begin_inset Flex CharStyle:Code
8369 \begin_layout Plain Layout
8376 \begin_inset Flex CharStyle:Code
8379 \begin_layout Plain Layout
8386 \begin_inset Flex CharStyle:Code
8389 \begin_layout Plain Layout
8398 \begin_layout Subsection
8399 What these layouts provide
8402 \begin_layout Standard
8403 There is a long list of included environments provided by these layouts.
8404 In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
8405 variety of `theorem' environments.
8406 However, the AMS recommends the environments that are available in LyX.
8410 \begin_layout Standard
8411 The following environments—as well as the standard environments, such as
8413 \begin_inset Flex CharStyle:Noun
8416 \begin_layout Plain Layout
8423 \begin_inset Flex CharStyle:Noun
8426 \begin_layout Plain Layout
8433 \begin_inset Flex CharStyle:Noun
8436 \begin_layout Plain Layout
8443 \begin_inset Flex CharStyle:Noun
8446 \begin_layout Plain Layout
8453 \begin_inset Flex CharStyle:Noun
8456 \begin_layout Plain Layout
8463 \begin_inset Flex CharStyle:Code
8466 \begin_layout Plain Layout
8473 \begin_inset Flex CharStyle:Code
8476 \begin_layout Plain Layout
8485 \begin_layout Description
8486 Address This should be the author's permanent address.
8489 \begin_layout Description
8491 \begin_inset space ~
8494 Address This should be the author's temporary address at the time of submission,
8495 if different from the Address.
8498 \begin_layout Description
8499 Email Author's e-mail address
8502 \begin_layout Description
8503 URL Author's Web address, if desired.
8506 \begin_layout Description
8507 Keywords Key words or phrases used to identify specific topics discussed
8511 \begin_layout Description
8512 Subjectclass These refer to the AMS Subject Classifications, published and
8515 Mathematical Reviews
8518 These are also available online at the AMS cites listed above.
8521 \begin_layout Description
8525 \begin_layout Description
8529 \begin_layout Description
8533 \begin_layout Standard
8534 The following environments are provided by both the
8535 \begin_inset Flex CharStyle:Code
8538 \begin_layout Plain Layout
8545 \begin_inset Flex CharStyle:Code
8548 \begin_layout Plain Layout
8554 modules, in the latter case in both starred (unnumbered) and unstarred
8555 (numbered) versions.
8556 These same environments are provided only in the starred versions by the
8558 \begin_inset Flex CharStyle:Code
8561 \begin_layout Plain Layout
8570 \begin_layout Theorem
8571 This is typically used for the statements of major results.
8575 \begin_layout Corollary*
8576 This is used for statements which follow fairly directly from previous statement
8578 Again, these can be major results.
8583 These are smaller results needed to prove other statements.
8586 \begin_layout Proposition
8587 These are less major results which (hopefully) add to the general theory
8591 \begin_layout Conjecture
8592 These are statements provided without justification, which the author does
8593 not know how to prove, but which seem to be true (to the author, at least).
8596 \begin_layout Definition*
8597 Guess what this is for.
8598 The font is different for this environment than for the previous ones.
8602 \begin_layout Example*
8603 Used for examples illustrating proven results.
8606 \begin_layout Problem
8607 It's not really known what this is for.
8608 You should figure it out.
8611 \begin_layout Exercise*
8612 Write a description for this one.
8615 \begin_layout Remark
8616 This environment is also a type of theorem, usually a lesser sort of observation.
8619 \begin_layout Claim*
8620 Often used in the course of giving a proof of a larger result.
8624 Generally, these are used to break up long arguments, using specific instances
8630 The numbering scheme for cases is on its own, not together with other numbered
8636 At the end of this environment, a QED symbol (usually a square, but it can
8637 vary with different styles) is placed.
8638 If you want to have other environments within this one—for example, Case
8639 environments—and have the QED symbol appear only after them, then the other
8640 environments need to be nested within the proof environment.
8643 Nesting Environments
8649 for information on nesting.
8652 \begin_layout Standard
8653 And these environments are provided by
8654 \begin_inset Flex CharStyle:Code
8657 \begin_layout Plain Layout
8658 Theorems (AMS-Extended)
8666 \begin_layout Criterion*
8667 A required condition.
8670 \begin_layout Algorithm*
8671 A general procedure to be used.
8674 \begin_layout Axiom*
8675 This is a property or statement taken as true within the system being discussed.
8678 \begin_layout Condition*
8679 Sometimes used to state a condition assumed within the present context of
8684 Similar to a Remark.
8687 \begin_layout Notation*
8688 Used for the explanation of, yes, notation.
8691 \begin_layout Summary
8692 Do we really need to tell you?
8695 \begin_layout Acknowledgement*
8699 \begin_layout Conclusion*
8700 Sometimes used at the end of a long train of argument.
8704 Used in a way similar to Proposition, though perhaps lower on the scale.
8707 \begin_layout Standard
8708 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
8710 They need to be available on your system in order to use these environments.
8713 \begin_layout Section
8721 \begin_layout Standard
8727 \begin_layout Subsection
8731 \begin_layout Standard
8732 These are the layout files for some of the journals of the American Geophysical
8734 It is assumed that you have both the AGU's own class files and AGUplus
8735 installed (everything to be found at
8736 \begin_inset Flex URL
8739 \begin_layout Plain Layout
8741 ftp://ftp.agu.org/journals/latex/journals
8749 \begin_layout Subsection
8753 \begin_layout Standard
8763 They are still called this in the LyX GUI, though their LaTeX equivalents
8764 in the AGU classes are
8775 \begin_layout Standard
8776 Newly defined styles are
8813 These are mostly manuscript attributes and defined in the AGU class documentati
8817 \begin_layout Standard
8818 I suspect this is still badly incomplete.
8821 \begin_layout Subsection
8825 \begin_layout Standard
8842 \begin_layout Subsection
8846 \begin_layout Itemize
8849 Journal of Geophysical Research
8858 \begin_layout Standard
8859 Add your own, it isn't so hard! Look at the
8870 \begin_layout Subsection
8871 Bugs and things to remember
8874 \begin_layout Standard
8875 In order to use the new layouts, you must remember to do the following for
8879 \begin_layout Enumerate
8885 This can be done in the
8887 Layout\SpecialChar \menuseparator
8892 Document\SpecialChar \menuseparator
8896 (AGU articles are always in English, right? So
8903 \begin_layout Enumerate
8913 (Yes, this is a bug.)
8916 \begin_layout Enumerate
8917 Make sure you use the
8921 bibliography style, by entering
8925 into the second field of the BibTeX inset.
8926 None of the standard styles will do.
8929 \begin_layout Section
8933 \begin_layout Standard
8939 \begin_layout Subsection
8943 \begin_layout Standard
8944 Broadway is for writing plays.
8945 The format is more decorative than Hollywood, and much less standardized.
8946 This format should be suitable for workshops.
8949 \begin_layout Subsection
8953 \begin_layout Standard
8954 The same as in Hollywood.
8957 \begin_layout Subsection
8961 \begin_layout Standard
8966 names as labels then cross-reference the label to insert the name.
8967 The cross-reference dialog will show the current cast of characters.
8970 \begin_layout Subsection
8971 Paper size and Margins
8974 \begin_layout Standard
8975 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
8978 \begin_layout Subsection
8982 \begin_layout Standard
8983 The following environments are available.
8984 You can use broadway.bind to get the bind keys shown at the right.
8987 \begin_layout Itemize
8991 \begin_inset Newline newline
8996 You should not have to use this, but it is here for anything that does not
9000 \begin_layout Itemize
9004 \begin_inset space \hfill{}
9008 \begin_inset Newline newline
9013 Used to describe stage setting and the action.
9014 First use of speaker names in all CAPs.
9017 \begin_layout Itemize
9021 \begin_inset space \hfill{}
9025 \begin_inset Newline newline
9030 Automatically numbered.
9031 On screen it will be arabic, but will print as Roman.
9034 \begin_layout Itemize
9038 \begin_inset space \hfill{}
9042 \begin_inset Newline newline
9052 It is just centered text.
9055 \begin_layout Itemize
9059 \begin_inset space \hfill{}
9063 \begin_inset Newline newline
9068 Not automatically numbered.
9069 You supply the number.
9070 This is because I couldn't figure out how.
9073 \begin_layout Itemize
9077 \begin_inset space \hfill{}
9081 \begin_inset Newline newline
9086 A special case of Narrative to describe the setting and action as the curtain
9090 \begin_layout Itemize
9094 \begin_inset space \hfill{}
9098 \begin_inset Newline newline
9103 The speaker's (actor's) title, centered in all CAPS.
9106 \begin_layout Itemize
9110 \begin_inset space \hfill{}
9114 \begin_inset Newline newline
9119 Instructions to the speaker.
9120 The parentheses are automatically inserted.
9121 The ( will appear on screen, but both will be in the printed play.
9122 This environment is only used within
9129 \begin_layout Itemize
9133 \begin_inset space \hfill{}
9137 \begin_inset Newline newline
9142 What the Speaker says.
9145 \begin_layout Itemize
9149 \begin_inset space \hfill{}
9153 \begin_inset Newline newline
9158 The curtain comes down.
9161 \begin_layout Itemize
9165 \begin_inset space \hfill{}
9171 \begin_layout Itemize
9175 \begin_inset space \hfill{}
9181 \begin_layout Itemize
9185 \begin_inset space \hfill{}
9191 \begin_layout Standard
9195 \begin_layout Section
9199 \begin_layout Standard
9204 can be used to type letters according to German conventions.
9205 A template file is included in
9207 .../lyx/share/templates
9209 for you to use as a starting point.
9212 \begin_layout Section
9220 \begin_layout Standard
9226 \begin_layout Subsection
9230 \begin_layout Standard
9231 This is the layout file for the European Geophysical Society journals.
9236 can be downloaded from the web site of the EGS under
9237 \begin_inset Flex URL
9240 \begin_layout Plain Layout
9250 \begin_layout Subsection
9254 \begin_layout Standard
9257 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9265 The current layout file is unfortunately very unmodular and would benefit
9266 from using the various
9273 \begin_layout Section
9277 \begin_layout Standard
9283 \begin_layout Standard
9284 Elsevier Science Publishers B.V.
9285 provides a standard LaTeX document class (
9289 ) for submitting articles to their various journals.
9290 The style file can be downloaded directly from their web site:
9291 \begin_inset Flex URL
9294 \begin_layout Plain Layout
9296 http://authors.elsevier.com/
9302 Instructions are supplied along with the class file, which details the
9303 requirements of the publishers.
9304 LyX includes package that allows for the use of this class, by a layout
9305 and a template file.
9306 Installation of the class file is the same as for any other LaTeX package;
9307 instructions are provided in the Elsevier documentation.
9310 \begin_layout Standard
9320 As the Elsevier class file is based mainly on the standard article class,
9321 most of the normal functionality is provided.
9322 The Elsevier class defines a number of mathematical environments, which
9323 are similar to the AMS environments.
9324 These commands are all described in the Elsevier documentation, and are
9328 \begin_layout Standard
9329 The easiest way to use the Elsevier style is to base documents on the included
9331 It is best not to use options such as fancy headings or the geometry package,
9332 as elements such as these are defined by Elsevier in their style file.
9333 Ideally, no extra packages except those mentioned in the Elsevier documentation
9335 Essentially, Elsevier require as
9336 \begin_inset Quotes eld
9340 \begin_inset Quotes erd
9343 a LaTeX file as possible, as their intention is to take the supplied file
9344 and replace the class file with one for the particular journal to which
9345 the paper has been submitted.
9346 This also means that not too much time should be spent on the formating
9348 When it comes to be published, this will change anyway.
9349 The rest of the usage for this layout is substantially the same as for
9350 the normal article class.
9351 For details of what Elsevier do and don't allow, refer to their documentation.
9354 \begin_layout Section
9360 \begin_inset CommandInset label
9369 \begin_layout Standard
9375 \begin_layout Subsection
9379 \begin_layout Standard
9380 This section describes how to use LyX to make slides for overhead projectors.
9381 There are two document classes that can do this: the default slides class
9387 This section documents the latter.
9390 \begin_layout Standard
9391 I'm going to say this again, nice and clear, so that there's no misunderstanding
9395 \begin_layout Standard
9396 \begin_inset VSpace bigskip
9402 \begin_layout Standard
9406 This section documents the class
9407 \begin_inset Quotes eld
9415 \begin_inset Quotes erd
9423 \begin_layout Standard
9424 \begin_inset VSpace bigskip
9430 \begin_layout Standard
9431 If you're looking for the documentation for
9432 \begin_inset Quotes eld
9440 \begin_inset Quotes erd
9444 \begin_inset space ~
9448 \begin_inset CommandInset ref
9450 reference "sec:slitex"
9455 If your machine doesn't have the
9460 \begin_inset Quotes eld
9468 \begin_inset Quotes erd
9471 ] installed, you'll probably have to use the default
9475 class, which isn't quite as good as
9480 \begin_layout Standard
9485 class is designed for use with version 2.1 of the
9489 LaTeX class file which is now an integral part of LaTeX2e.
9492 \begin_layout Subsection
9496 \begin_layout Standard
9497 Obviously, to use this document class, you need to select
9498 \begin_inset Quotes eld
9506 \begin_inset Quotes erd
9516 \begin_inset space ~
9522 There are some settings in the
9525 \begin_inset space ~
9530 dialog that you should know about that are specific to this class:
9533 \begin_layout Itemize
9534 Don't change the options
9545 \begin_inset space ~
9551 They're ignored by the
9558 \begin_layout Itemize
9559 The default font size is 20
9560 \begin_inset space \thinspace{}
9563 pt with the other options being 17
9564 \begin_inset space \thinspace{}
9568 \begin_inset space \thinspace{}
9572 \begin_inset space \thinspace{}
9578 \begin_layout Itemize
9587 but all math equations are still typeset in the usual roman font.
9590 \begin_layout Itemize
9595 supports A4 and Letter paper sizes as well as a special size for working
9597 \begin_inset space \thinspace{}
9601 It doesn't support A5, B5, legal or executive paper sizes.
9604 \begin_layout Itemize
9605 Don't bother changing the
9609 settings because they are ignored anyway.
9610 All floats appear where they are defined in the text.
9613 \begin_layout Itemize
9618 setting behaves a bit differently for this class.
9623 provides extensive footer and header capabilities including a user-defined
9626 \begin_inset space ~
9630 \begin_inset CommandInset ref
9632 reference "sec:foilfoot"
9637 The title page is treated differently to all other pages in the document
9646 has the logo centered at the bottom of the page (if one is defined).
9647 The possible page style choices and what they do are as follows:
9651 \begin_layout Labeling
9652 \labelwidthstring MMMMMMM
9659 The final output contains no page numbers, or other headers or footers
9660 (except footnotes of course).
9664 \begin_layout Labeling
9665 \labelwidthstring MMMMMMM
9672 The final output contains page numbers centered at the bottom of the page.
9673 No other headings or footers (other than footnotes).
9676 \begin_layout Labeling
9677 \labelwidthstring MMMMMMM
9682 Page numbers in lower right corner.
9683 Additional headers and footers are also shown.
9684 This is also the default.
9687 \begin_layout Labeling
9688 \labelwidthstring MMMMMMM
9693 Gives you access to the
9697 package although its use with
9701 is discouraged by the writer of the
9705 package because of some potential page layout clashes.
9709 \begin_layout Subsubsection
9713 \begin_layout Standard
9714 The following options may be used in the extra class options in the
9716 Document\SpecialChar \menuseparator
9722 \begin_layout Labeling
9723 \labelwidthstring MMMMMMx
9728 This sets up the page layout for 7.33
9729 \begin_inset space \thinspace{}
9733 \begin_inset space \thinspace{}
9736 in paper, which is about the same aspect ratio as a 35
9737 \begin_inset space \thinspace{}
9740 mm slide, making it a bit easier to work with this medium.
9743 \begin_layout Labeling
9744 \labelwidthstring MMMMMMx
9749 Places a rule across the page below the header on every page except the
9753 \begin_layout Labeling
9754 \labelwidthstring MMMMMMx
9759 Places a rule across the page above the footer on every page except the
9763 \begin_layout Labeling
9764 \labelwidthstring MMMMMMx
9769 This is automatically set each time you create a new
9778 to use the dvips driver to rotate those pages that are set as landscape
9782 \begin_layout Labeling
9783 \labelwidthstring MMMMMMx
9788 Simply changes the page dimensions to those of a landscape page but doesn't
9790 Thus if you use this option you need to use an external program to rotate
9791 each page or feed your paper through your printer as landscape.
9792 Note that this option effectively reverses the roles of the
9800 environments (don't worry these are described in the next section).
9803 \begin_layout Labeling
9804 \labelwidthstring MMMMMMx
9809 Equation numbers on the left.
9812 \begin_layout Labeling
9813 \labelwidthstring MMMMMMx
9818 Flush-left equations.
9821 \begin_layout Subsection
9822 Supported Environments
9825 \begin_layout Standard
9826 Most of the environments commonly supported in other classes are also supported
9832 There are several additional environments provided by
9836 as well as a couple added by LyX.
9837 The following environments are shared with other classes:
9840 \begin_layout Standard
9844 \begin_layout Plain Layout
9856 \begin_layout Itemize
9862 \begin_layout Itemize
9868 \begin_layout Itemize
9874 \begin_layout Itemize
9880 \begin_layout Itemize
9886 \begin_layout Itemize
9892 \begin_layout Itemize
9898 \begin_layout Itemize
9904 \begin_layout Itemize
9910 \begin_layout Itemize
9916 \begin_layout Itemize
9922 \begin_layout Itemize
9928 \begin_layout Itemize
9934 \begin_layout Itemize
9940 \begin_layout Itemize
9946 \begin_layout Itemize
9952 \begin_layout Itemize
9958 \begin_layout Itemize
9964 \begin_layout Standard
9968 \begin_layout Plain Layout
9980 \begin_layout Standard
9981 That is, all the major environments apart from the sectioning environments.
9982 Since foils are essentially self-contained sections, with a title and body,
9987 provides specific commands for starting new foils and these are:
9990 \begin_layout Itemize
9996 \begin_layout Itemize
10002 \begin_layout Standard
10003 LyX also provides slightly modified versions of these two environments called:
10006 \begin_layout Itemize
10012 \begin_layout Itemize
10015 ShortRotatefoilhead
10018 \begin_layout Standard
10019 and the differences will be explained in the next section.
10022 \begin_layout Standard
10023 Since foils are often used in presenting ideas or new theorems and such
10028 also provides a comprehensive box of goodies for presenting them:
10031 \begin_layout Standard
10035 \begin_layout Plain Layout
10039 begin{multicols}{2}
10047 \begin_layout Itemize
10053 \begin_layout Itemize
10059 \begin_layout Itemize
10065 \begin_layout Itemize
10071 \begin_layout Itemize
10077 \begin_layout Itemize
10083 \begin_layout Itemize
10089 \begin_layout Itemize
10095 \begin_layout Itemize
10101 \begin_layout Itemize
10107 \begin_layout Itemize
10113 \begin_layout Standard
10117 \begin_layout Plain Layout
10129 \begin_layout Standard
10130 The starred versions are unnumbered while the unstarred versions are numbered.
10131 There are also two list environments added by LyX and these are:
10134 \begin_layout Itemize
10140 \begin_layout Itemize
10146 \begin_layout Standard
10151 provides some powerful header and footer capabilities that are best set
10152 in the preamble although they may be set at any point in a document.
10153 If you want to change these settings in your document the best place to
10154 do so is at the very top of a foil, i.
10155 \begin_inset space \thinspace{}
10161 \begin_inset space \space{}
10166 straight after the foilhead.
10169 \begin_layout Standard
10170 For this purpose, the following command styles are provided [
10177 \begin_layout Standard
10181 \begin_layout Plain Layout
10185 begin{multicols}{2}
10193 \begin_layout Itemize
10197 \begin_inset space ~
10203 \begin_layout Itemize
10209 \begin_layout Itemize
10213 \begin_inset space ~
10219 \begin_layout Itemize
10223 \begin_inset space ~
10229 \begin_layout Itemize
10233 \begin_inset space ~
10240 \begin_layout Standard
10241 \begin_inset space ~
10248 \begin_layout Standard
10252 \begin_layout Plain Layout
10264 \begin_layout Standard
10265 There are also a few commands provided by
10269 that aren't directly supported by LyX but I'll tell you what they do and
10270 how to use them in section
10271 \begin_inset space ~
10275 \begin_inset CommandInset ref
10277 reference "sec:unsuppfoils"
10284 \begin_layout Subsection
10285 Building a Set of Foils
10288 \begin_layout Standard
10289 This section will give a simple introduction to using the different environments
10290 to build a set of foils.
10291 If you want to see an example set of foils, take a look at the
10295 file you find in LyX's
10302 \begin_layout Subsubsection
10303 Give It a Title Page
10306 \begin_layout Standard
10307 Unlike other classes that provide
10327 creates the title on a page of its own.
10328 If you leave out the
10332 environment LaTeX will substitute the current date (every time you regenerate
10336 \begin_layout Subsubsection
10340 \begin_layout Standard
10341 As I mentioned earlier, there are four ways of starting a new foil.
10342 For portrait foils you should use
10351 The difference between these two environments is the amount of space between
10352 the title of the foil (the foilhead) and the body of the foil.
10355 \begin_layout Standard
10356 Landscape foils are generated using the
10362 ShortRotatefoilhead
10365 Again the only difference is the spacing between foilhead and body.
10366 Both of the short versions have 0.5 inches less separation between the foilhead
10371 \begin_layout Standard
10372 One problem with the support for landscape foils is the requirement that
10373 you have to use the
10377 driver to generate the PostScript output otherwise the foils won't be rotated.
10378 It is possible to get landscape foils even if you haven't got the
10382 driver provided you can feed your foils sideways through your printer ;-)
10385 \begin_layout Subsubsection
10386 Theorems, Lemmas, Proofs and more
10389 \begin_layout Standard
10390 Due to a small bug in LyX you can't have two of the same type of these environme
10391 nts directly following each other.
10392 They must be separated by something.
10393 If you try, you will just be extending the previous environment as if you
10394 had merged the two environments together.
10395 So, how do you get around this problem? The simplest option is to insert
10396 some text between the two environments or add a
10400 environment between the two with just a
10401 \begin_inset Quotes eld
10409 \begin_inset Quotes erd
10413 This will force LyX to produce two separate environments and hence the
10414 correct LaTeX output.
10415 An example is provided in the example file included with the LyX distribution.
10416 Remember, this problem only occurs if you are trying to place two of the
10417 same type of theorem-like environments one directly after the other.
10420 \begin_layout Subsubsection
10424 \begin_layout Standard
10425 You get all the commonly supported list styles found in other classes as
10426 well as two new ones.
10427 I'll only describe the new ones here.
10428 If you want to find out more about the other list environments check out
10434 If you intend to use itemized lists you might also want to read about the
10438 \begin_inset space ~
10442 \begin_inset space ~
10447 dialog described above in section
10448 \begin_inset space ~
10452 \begin_inset CommandInset ref
10454 reference "sec:bullet"
10461 \begin_layout Standard
10462 The two new list styles,
10470 , are designed to make it easier for you to create lists of do's and don'ts
10471 or right and wrong by providing dedicated environments that use a tick
10472 or a cross as the label of the list.
10473 These lists are in fact dedicated variants of the
10478 They do however require that you have the
10482 packages installed.
10485 \begin_layout Subsubsection
10489 \begin_layout Standard
10494 redefines the floating tables and figures so that they appear exactly where
10495 they are in the text rather than pushing them to the top of the page or
10496 to some user specified location.
10497 In fact if you change the float placement settings they are simply ignored.
10500 \begin_layout Subsubsection
10501 Page Headers and Footers
10502 \begin_inset CommandInset label
10504 name "sec:foilfoot"
10511 \begin_layout Standard
10515 \begin_inset space ~
10524 are two commands used to control the left-footer text string.
10525 The first is meant to allow you to include a graphic logo on your foils
10527 \begin_inset Quotes eld
10535 \begin_inset Quotes erd
10539 While the second is meant to provide a classification for the audience,
10543 \begin_inset space \thinspace{}
10549 \begin_inset space \space{}
10553 It is empty by default.
10556 \begin_layout Standard
10557 The remaining page corners can be filled by
10560 \begin_inset space ~
10565 (which defaults to page numbers),
10568 \begin_inset space ~
10576 \begin_inset space ~
10584 \begin_layout Subsection
10590 \begin_inset CommandInset label
10592 name "sec:unsuppfoils"
10599 \begin_layout Standard
10600 All the commands mentioned below need to be set in a
10608 within another environment.
10611 \begin_layout Subsubsection
10615 \begin_layout Standard
10616 All lengths are adjusted using the
10639 should be replaced by the name given to the length you want to change and
10644 is the length value.
10645 All lengths should be specified in units of length such as inches (
10657 ) or relative to some document or font-based length such as
10667 \begin_layout Standard
10668 It's possible to change the spacing between a foilhead and the body of the
10669 foil by adjusting the length specified by
10676 For example, to make
10681 \begin_inset space \space{}
10684 in closer to their bodies put the following in the preamble:
10690 foilheadskip}{-0.5in}
10693 \begin_layout Standard
10694 The spacings around floats can be adjusted by setting these lengths:
10697 \begin_layout Labeling
10698 \labelwidthstring MMMMMMMMMMM
10705 Separation between the text and the top of the float
10708 \begin_layout Labeling
10709 \labelwidthstring MMMMMMMMMMM
10716 Separation between the float and the caption
10719 \begin_layout Labeling
10720 \labelwidthstring MMMMMMMMMMM
10727 Separation between the caption and the following text
10730 \begin_layout Labeling
10731 \labelwidthstring MMMMMMMMMMM
10738 You can make the captions narrower than the surrounding text by adjusting
10740 Best done relative to
10749 \begin_layout Standard
10750 There are also several title page related lengths that you may find useful
10751 if you have a long title or several authors:
10754 \begin_layout Labeling
10755 \labelwidthstring MMMMMMMMMMM
10762 Separation from headers to
10767 \begin_layout Labeling
10768 \labelwidthstring MMMMMMMMMMM
10786 \begin_layout Labeling
10787 \labelwidthstring MMMMMMMMMMM
10801 \begin_layout Labeling
10802 \labelwidthstring MMMMMMMMMMM
10818 \begin_layout Labeling
10819 \labelwidthstring MMMMMMMMMMM
10835 \begin_layout Standard
10836 The last length related command affects all the list environments.
10847 a list environment then all the vertical spacing between the list items
10849 Note that this is a command not a length so it doesn't require
10855 like the stuff mentioned above.
10858 \begin_layout Subsubsection
10859 Headers and Footers
10862 \begin_layout Standard
10875 commands control whether the logo in the
10879 definition appear on a given page.
10886 in the preamble then none of the foils will have the logo on them.
10887 If you don't want the logo on a particular page place the
10893 directly after the foilhead of that page and the
10899 directly after the next foilhead.
10902 \begin_layout Standard
10903 If you decide to use the
10907 page style setting in the
10910 \begin_inset space ~
10915 dialog you should probably add
10925 to your preamble so headers and footers on landscape pages are correctly
10926 placed when rotated.
10927 This is due to some clashes between the page layouts provided by the
10938 \begin_layout Section
10939 Hollywood (Hollywood spec scripts)
10942 \begin_layout Standard
10948 \begin_layout Subsection
10952 \begin_layout Standard
10953 Getting the format of a Hollywood script right is a
10954 \begin_inset Quotes eld
10958 \begin_inset Quotes erd
10961 It is designed to make the readers focus on content and to be easy and
10962 familiar for the actors to read.
10963 Each page of a script should be one minute of film.
10964 Nothing goes in a script that you cannot see or hear on screen.
10965 The courier 12 pt font should be used throughout.
10969 \begin_layout Subsection
10973 \begin_layout Standard
10974 Speakers' lines should NEVER break in mid-sentence.
10975 If a speaker's lines continue over a page break, repeat the
10979 title followed by (Cont'd).
10982 \begin_layout Subsection
10986 \begin_layout Standard
10991 names as labels then cross-reference the label to insert the name.
10992 The cross-reference dialog will show the current cast of characters.
10993 You can use this to insert the speaker name in narratives also.
10996 \begin_layout Subsection
10997 Paper size and Margins
11000 \begin_layout Standard
11001 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11004 \begin_layout Subsection
11008 \begin_layout Standard
11009 The following environments are available.
11010 You can use hollywood.bind to get the bind keys shown at the right.
11013 \begin_layout Itemize
11017 \begin_inset Newline newline
11022 Used where nothing else works.
11026 \begin_layout Itemize
11032 \begin_inset space \hfill{}
11040 \begin_inset Newline newline
11043 Usually followed by something like
11044 \begin_inset Quotes eld
11047 on Sally waking up.
11048 \begin_inset Quotes erd
11054 \begin_layout Itemize
11058 \begin_inset space \hfill{}
11062 \begin_inset Newline newline
11067 Introduces a new INTERIOR camera set-up.
11068 Always followed by DAY or NIGHT, or something similar to define the lighting
11070 Everthing on this line in CAPS.
11073 \begin_layout Itemize
11077 \begin_inset space \hfill{}
11081 \begin_inset Newline newline
11086 Introduces a new EXTERIOR camera set-up.
11087 Everthing on this line in CAPS.
11090 \begin_layout Itemize
11094 \begin_inset space \hfill{}
11098 \begin_inset Newline newline
11103 The character speaking.
11106 \begin_layout Itemize
11110 \begin_inset space \hfill{}
11114 \begin_inset Newline newline
11119 Instructions to the speaker.
11120 The () are automatically inserted, but only the ( will show in LyX.
11121 Both will be printed.
11124 \begin_layout Itemize
11128 \begin_inset space \hfill{}
11132 \begin_inset Newline newline
11144 \begin_layout Itemize
11148 \begin_inset space \hfill{}
11152 \begin_inset Newline newline
11157 Camera movement instruction.
11159 \begin_inset space \thinspace{}
11163 \begin_inset space \space{}
11169 \begin_layout Itemize
11173 \begin_inset space \hfill{}
11179 \begin_layout Itemize
11183 \begin_inset space \hfill{}
11189 \begin_layout Itemize
11193 \begin_inset space \hfill{}
11199 \begin_layout Itemize
11203 \begin_inset space \hfill{}
11209 \begin_layout Subsection
11213 \begin_layout Itemize
11217 \begin_layout Itemize
11221 \begin_layout Itemize
11223 \begin_inset space \thinspace{}
11230 \begin_layout Itemize
11235 \begin_layout Itemize
11236 PAN — camera movement
11239 \begin_layout Itemize
11240 INSERT — cut to close-up of
11243 \begin_layout Section
11247 \begin_layout Standard
11250 Panayotis Papasotiriou
11253 \begin_layout Subsection
11257 \begin_layout Standard
11258 The ijmpc package is a set of macros that facilitates electronic manuscript
11261 International Journal of Modern Physics C
11264 Similarly, the ijmpd package is for creating manuscripts to be submitted
11267 International Journal of Modern Physics D
11270 Both journals are published by World Scientific.
11271 The corresponding document classes are named
11280 These files, together with instructions for the authors, can be downloaded
11282 \begin_inset Flex URL
11285 \begin_layout Plain Layout
11287 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11293 \begin_inset Flex URL
11296 \begin_layout Plain Layout
11298 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11304 Both packages are modified versions of the standard
11305 \begin_inset Quotes eld
11309 \begin_inset Quotes erd
11312 package, and they are almost (but not exactly) identical.
11313 Most of their features are supported by LyX.
11314 I have used LyX successfully to write articles submitted to both journals
11315 without any problem.
11318 \begin_layout Subsection
11322 \begin_layout Standard
11323 As usual, the easiest way to write a paper is to start with a template.
11326 File\SpecialChar \menuseparator
11345 This will give an (almost) empty document that includes the most common
11346 fields found in a manuscript.
11347 Simply overwrite the existing text (including the brackets,
11352 You should keep in mind the following remarks.
11355 \begin_layout Enumerate
11356 LyX won't let you change the font size and the page style of the document,
11357 because such modifications are not allowed by both packages.
11360 \begin_layout Enumerate
11361 The language of the document should not be changed.
11362 Before previewing your paper, be sure that the babel package is not used.
11363 To do this, click on
11365 Tools\SpecialChar \menuseparator
11376 checkbox in the language settings, and click on
11384 , if you wish to make this change permanent).
11387 \begin_layout Enumerate
11389 \begin_inset Quotes eld
11393 \begin_inset Quotes erd
11396 style must be used to define keywords.
11399 \begin_layout Enumerate
11400 The ijmpc package provides a style named
11401 \begin_inset Quotes eld
11404 Classification Codes
11405 \begin_inset Quotes erd
11408 , which can be used to define classification codes, such as PACS numbers.
11409 Note that this facility is not supported by the ijmpd package.
11412 \begin_layout Enumerate
11413 Several new environments are available:
11414 \begin_inset Quotes eld
11418 \begin_inset Quotes erd
11422 \begin_inset Quotes eld
11426 \begin_inset Quotes erd
11430 \begin_inset Quotes eld
11434 \begin_inset Quotes erd
11438 \begin_inset Quotes eld
11442 \begin_inset Quotes erd
11446 \begin_inset Quotes eld
11450 \begin_inset Quotes erd
11454 \begin_inset Quotes eld
11458 \begin_inset Quotes erd
11462 \begin_inset Quotes eld
11466 \begin_inset Quotes erd
11470 \begin_inset Quotes eld
11474 \begin_inset Quotes erd
11478 \begin_inset Quotes eld
11482 \begin_inset Quotes erd
11486 \begin_inset Quotes eld
11490 \begin_inset Quotes erd
11494 \begin_inset Quotes eld
11498 \begin_inset Quotes erd
11502 \begin_inset Quotes eld
11506 \begin_inset Quotes erd
11510 \begin_inset Quotes eld
11514 \begin_inset Quotes erd
11518 \begin_inset Quotes eld
11522 \begin_inset Quotes erd
11526 Their use is more or less obvious.
11527 LyX supports all these environments; it will use the proper label, text
11528 style, and numbering scheme for each of them.
11531 \begin_layout Enumerate
11532 Both packages use basic citations; the natbib package should not be used.
11533 In LyX, citation references are shown as usual; in the output, citations
11534 are shown as superscripts.
11535 If you want to use a citation as normal text, you should use the
11540 \begin_inset space \thinspace{}
11544 \begin_inset space \space{}
11548 \begin_inset Quotes eld
11552 \begin_inset space \space{}
11562 \begin_inset Quotes erd
11568 \begin_layout Enumerate
11570 \begin_inset Quotes eld
11574 \begin_inset Quotes erd
11577 section in both packages.
11578 To put acknowledgments, just use the
11579 \begin_inset Quotes eld
11583 \begin_inset Quotes erd
11589 \begin_layout Enumerate
11590 Appendices may be added to the paper,
11594 the Acknowledgments and
11599 LyX provides a special environment, called
11600 \begin_inset Quotes eld
11604 \begin_inset Quotes erd
11607 which marks the beginning of the appendices.
11608 This environment should be left blank; it just sends a LaTeX command, but
11609 nothing is really printed.
11611 \begin_inset Quotes eld
11615 \begin_inset Quotes erd
11618 is printed with blue letters, as a signal that all sections after that
11619 point are appendices.
11620 To write an appendix, use the
11621 \begin_inset Quotes eld
11625 \begin_inset Quotes erd
11629 LyX will number each appendix with capital letters, as required by both
11632 \begin_inset Quotes eld
11636 \begin_inset Quotes erd
11643 be present before the first appendix; if not, all appendices will be numbered
11644 as normal sections in the output.
11647 \begin_layout Enumerate
11648 The ijmpc and the ijmpd packages use the
11652 command to implement table captions.
11653 As a result, a table created by LyX is printed correctly, but its caption
11655 However, you can use some TeX code to overpass this problem, so that captions
11656 are printed as expected.
11657 To do so, create a float table as usual, remove the caption, and replace
11658 it with the TeX code
11668 (sic); you must also the TeX code
11672 immediately after the tabular material.
11673 Study the example table included in the template files to see how this
11674 trick is implemented.
11675 Alternatively, If you need table captions, you should implement the whole
11680 file, then include this file to the LyX document (
11682 Insert\SpecialChar \menuseparator
11683 File\SpecialChar \menuseparator
11685 \begin_inset space ~
11691 Details on how to create a table float can be found in the files
11699 , included in the corresponding packages.
11702 \begin_layout Subsection
11703 Preparing a paper for submission
11706 \begin_layout Standard
11707 Before you submit your paper you must export the LyX document as a LaTeX
11710 File\SpecialChar \menuseparator
11711 Export\SpecialChar \menuseparator
11718 \begin_layout Plain Layout
11719 Actually you have the choice between LaTeX (plain) and pdflatex.
11720 If you intend to use pdflatex to prepare the paper, you should use the
11721 pdflatex option so that included graphics are converted to PDF format,
11722 ready for use by pdflatex.
11727 , then make the following changes to the resulting
11734 \begin_layout Enumerate
11735 Remove the comment lines before the
11744 \begin_layout Enumerate
11745 Remove everything between (and including) the
11757 commands, except for any commands you specifically put into the LaTeX preamble.
11760 \begin_layout Standard
11765 file should be saved and processed through LaTeX as many times as necessary.
11766 You may also want to check the resulting
11773 \begin_layout Subsection
11777 \begin_layout Standard
11778 The use of TeX code is reduced to two commands, which must be placed at
11779 the top of the document.
11780 If you started writing your paper by using the
11788 template, the TeX code needed is already in its place; you usually don't
11790 You may only modify the first TeX code to specify the information printed
11791 to the top of odd and even pages (authors' names and short paper's title,
11793 This TeX code must have the form
11797 markboth{Authors' Names}{Short Paper's Title}
11802 \begin_layout Section
11806 \begin_layout Standard
11812 \begin_layout Subsection
11816 \begin_layout Standard
11817 The iopart package provides a document class to create electronic manuscript
11818 submission to the journals published by the Institute of Physics.
11819 Instructions for the authors how to create a paper using the iopart class
11820 can be downloaded together with the iopart package from the site
11821 \begin_inset Flex URL
11824 \begin_layout Plain Layout
11826 ftp://ftp.iop.org/pub/journals/latex2e
11834 \begin_layout Subsection
11838 \begin_layout Standard
11839 The easiest way to write a paper is to start with the file
11843 that is available in LyX's examples files folder.
11844 Open this file, save it under a new name, and start writing.
11845 The example file explains how to use the special text environments.
11846 Here are the most important advices:
11849 \begin_layout Itemize
11850 To be able to compile your document to a PDF, PS, or DVI, assure that the
11853 Use AMS math package
11855 in the document settings under
11862 \begin_layout Itemize
11865 The title environment defines the kind of your paper.
11866 So use one of the following environments for the title:
11870 \begin_layout Itemize
11879 \begin_layout Itemize
11888 \begin_layout Itemize
11894 for a Topical review
11897 \begin_layout Itemize
11906 \begin_layout Itemize
11915 \begin_layout Itemize
11921 for a Paper (same as Title)
11924 \begin_layout Itemize
11930 for a Preliminary communication
11933 \begin_layout Itemize
11939 for a Rapid communication
11942 \begin_layout Itemize
11948 for a Letter to the editor
11952 \begin_layout Itemize
11955 All title environments except of
11959 can have an optional short title.
11962 \begin_layout Itemize
11963 There is a general title environment
11967 which is not directly supported by the LyX.
11968 This can be used as TeX code when your document doesn't fit into one of
11969 the other title types.
11972 \begin_layout Standard
11973 For more informations like hints for special table and formula formatting,
11974 look at the IOP author guidelines.
11977 \begin_layout Section
11981 \begin_layout Standard
11984 Panayotis Papasotiriou
11987 \begin_layout Subsection
11991 \begin_layout Standard
11992 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
11993 that facilitates electronic manuscript submission to the journals they
11995 Most known of them (at least in my domain of interest) are
11997 Astrophysics and Space Science
12003 , but there are many others (see a complete list at
12004 \begin_inset Flex URL
12007 \begin_layout Plain Layout
12009 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12015 The Kluwer package may be downloaded from the site
12016 \begin_inset Flex URL
12019 \begin_layout Plain Layout
12021 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12027 A complete user guide is contained in that package (but it can also be
12028 downloaded separately).
12031 \begin_layout Standard
12032 LyX supports many features of the package but not everything.
12033 However, the TeX code needed is reduced to some
12034 \begin_inset Quotes eld
12038 \begin_inset Quotes erd
12041 commands of the package (see
12042 \begin_inset space ~
12046 \begin_inset CommandInset ref
12048 reference "subsec:kluwer_peculiarities"
12053 I have recently used LyX to write an article submitted to the
12055 Astrophysics and Space Science
12057 without any problem.
12060 \begin_layout Subsection
12064 \begin_layout Standard
12065 The easiest way to write a paper is to start with the Kluwer template file.
12068 File\SpecialChar \menuseparator
12080 This will give an (almost) empty document that includes the most common
12081 fields found in a manuscript and a short description of their use.
12082 As in most templates, simply overwrite the existing text (including the
12087 ) with the correct information.
12090 \begin_layout Subsection
12091 Preparing a paper for submission
12094 \begin_layout Standard
12095 As in the AASTeX package, before you submit your paper to a journal you
12097 \begin_inset Quotes eld
12101 \begin_inset Quotes erd
12107 \begin_layout Enumerate
12108 Export your paper as a LaTeX file.
12109 To do this, click on
12111 File\SpecialChar \menuseparator
12112 Export\SpecialChar \menuseparator
12119 \begin_layout Enumerate
12124 file with a text editor and make the following changes
12128 \begin_layout Enumerate
12129 remove the comment lines before the
12138 \begin_layout Enumerate
12139 remove everything between (and including) the
12151 commands, except for any commands you specifically put into the LaTeX preamble.
12154 \begin_layout Standard
12163 \begin_layout Enumerate
12168 file through LaTeX as many times as necessary (usually up to three).
12171 \begin_layout Enumerate
12177 \begin_inset space \thinspace{}
12181 \begin_inset space \space{}
12188 , and check if everything is OK (it should, if you didn't make any mistake).
12191 \begin_layout Subsection
12192 \begin_inset Quotes eld
12196 \begin_inset Quotes erd
12199 of the Kluwer package
12200 \begin_inset CommandInset label
12202 name "subsec:kluwer_peculiarities"
12209 \begin_layout Standard
12210 The Kluwer package has the following
12211 \begin_inset Quotes eld
12215 \begin_inset Quotes erd
12221 \begin_layout Enumerate
12222 It is possible to write multiple articles in the same LaTeX file
12226 \begin_layout Plain Layout
12227 I can't imagine any good reason to do this.
12233 Each article must be included in the environment
12234 \begin_inset Quotes eld
12238 \begin_inset Quotes erd
12242 Unfortunately, this environment cannot be omitted, even if you write just
12244 Therefore, each article starts with the command
12250 and, obviously, ends with the command
12257 Although this can be implemented in LyX, I didn't included it, since it
12258 looks ugly and can confuse the novice user.
12259 Therefore, you need to enter them directly and mark them as LaTeX code
12261 \begin_inset Quotes eld
12265 \begin_inset Quotes erd
12271 \begin_layout Enumerate
12272 Information given at the beginning of the article (i.
12273 \begin_inset space \thinspace{}
12277 \begin_inset space \space{}
12280 title, subtitle, author, institution, running title, running author, abstract
12281 and keywords) must be included in an environment called
12282 \begin_inset Quotes eld
12286 \begin_inset Quotes erd
12290 This is not implemented in LyX, so you must enter title, subtitle etc.
12291 \begin_inset space ~
12294 between two TeX code lines (
12309 \begin_layout Enumerate
12310 According to the user manual, the label of each bibliography item must be
12334 \begin_layout Standard
12339 template takes care of all these
12340 \begin_inset Quotes eld
12344 \begin_inset Quotes erd
12348 If you start a new paper using this template you don't need to do anything
12353 \begin_layout Enumerate
12354 don't delete the TeX code included in the template, and
12357 \begin_layout Enumerate
12358 copy the example bibliography item included in the template and modify it
12359 as necessary to enter new bibliography items.
12362 \begin_layout Section
12366 \begin_layout Standard
12372 \begin_layout Subsection
12376 \begin_layout Standard
12377 The LyX document classes
12379 article (koma-script)
12383 report (koma-script)
12401 correspond to the LaTeX document classes
12418 \begin_inset space ~
12421 of the Koma-Script family.
12422 They are replacements for the standard document classes
12438 , resp., and fit better to European typography conventions in a number of
12442 \begin_layout Itemize
12443 Standard character size is 11pt in
12445 article (koma-script)
12449 report (koma-script)
12457 letter (koma-script)
12462 \begin_layout Itemize
12463 Headings, labels of the description environment, and a number of elements
12466 letter (koma-script)
12468 document class are set in a bold sans serif font.
12472 \begin_layout Plain Layout
12473 There is a big difference between the bold sans serif old cm fonts and new
12474 ec fonts, especially in the appearance of headings.
12475 In comparison, the ec bold sans serif fonts look a bit thin.
12476 Here the LaTeX package
12484 helps to produce the
12485 \begin_inset Quotes eld
12489 \begin_inset Quotes erd
12492 appearance when using the ec fonts.
12497 The numbering of chapter headings is made in the same way as the numbering
12498 of section headings, that is without the extra line
12499 \begin_inset Quotes eld
12502 Chapter\SpecialChar \ldots{}
12504 \begin_inset Quotes erd
12508 In addition, the appearance of the headings can be modified by using a
12509 number of options (in LyX to be entered in the field
12512 \begin_inset space ~
12519 Layout\SpecialChar \menuseparator
12523 A detailed German description of these options can be found in the Koma-Script
12531 \begin_layout Itemize
12532 The main means in the Koma-Script document classes to design the type area
12541 (in LyX to be entered in the extra class options field in the dialog
12543 Document\SpecialChar \menuseparator
12547 They make a clearer modification of page margins possible as do the options
12550 Document\SpecialChar \menuseparator
12554 A detailed German description of these and other type area options can
12555 be found in the Koma-Script documentation
12562 \begin_layout Itemize
12563 The LaTeX document classes of the Koma-Script family define a number of
12564 additional commands.
12565 Those part of it which makes sense in LyX is implemented in corresponding
12569 \begin_layout Standard
12570 A detailed German description of the LaTeX document classes of the Koma-Script
12571 family can be found in the Koma-Script documentation
12579 \begin_layout Plain Layout
12580 There is an English translation
12584 , but it is not a complete one.
12589 The following sections describe only those aspects, which are relevant
12593 \begin_layout Subsection
12594 article (koma-script), report (koma-script), and book (koma-script)
12597 \begin_layout Standard
12598 The document classes
12600 article (koma-script)
12604 report (koma-script)
12614 are implemented in the layout files
12627 They contain all the paragraph types of the corresponding standard document
12640 , resp., partly modified, with the exception of the LyX specific
12644 -type, which is replaced by the new
12648 -type having the same functionality.
12653 -Type there is a number of new paragraph types added.
12660 letter (koma-script)
12665 \begin_layout Itemize
12674 : are equivalents to
12682 , resp., additionally inserting an entry in the table of contents.
12691 are not contained in
12693 article (koma-script)
12698 \begin_layout Itemize
12707 : behave exactly as
12715 , resp., additionally clearing running heads.
12720 is not contained in
12722 article (koma-script)
12728 \begin_layout Plain Layout
12741 report (koma-script)
12743 , but since this is identical to
12747 , is has not been implemented in LyX.
12755 \begin_layout Itemize
12760 : generates a heading directly above the following paragraph in the standard
12761 character size without affecting the structure of the document.
12764 \begin_layout Itemize
12773 are special captions which respect the different space settings needed
12774 for captions placed above or below an element (if you follow strict typographic
12775 rules, you might want to place table captions always above the table).
12776 You can also use the class option
12780 , which will switch
12793 You need at least Koma-Script version 2.8q to use this.
12796 \begin_layout Itemize
12801 : can be used to set a bonmot, e.
12802 \begin_inset space \thinspace{}
12806 \begin_inset space \space{}
12809 at the beginning of a chapter.
12810 If you use the optional argument (
12812 Insert\SpecialChar \menuseparator
12814 \begin_inset space ~
12819 ), you can insert the dictum's author there.
12820 Dictum and author are separated by a line.
12821 You need at least Koma-Script version 2.8q to use this.
12826 is not contained in
12828 article (koma-script)
12833 \begin_layout Standard
12834 The following types, together with the standard types
12846 , form the title area of the document.
12847 They must be entered ahead of the first
12848 \begin_inset Quotes eld
12852 \begin_inset Quotes erd
12859 \begin_layout Plain Layout
12860 The corresponding LaTeX commands must appear before the
12871 When such a type is used more than once, the latter usage overwrites the
12872 former one, that means, for every type only the latest usage is valid.
12873 The order of the different types however has, like
12885 , no effect on the appearance of the produced document.
12888 \begin_layout Itemize
12893 : produces a centered paragraph above the ordinary title (
12905 ) for the subject of the document.
12908 \begin_layout Itemize
12913 : produces a centered paragraph below the ordinary title (
12925 ) for the publishers' name.
12928 \begin_layout Itemize
12935 report (koma-script)
12941 produces a centered paragraph on its own page behind the title page, or
12944 article (koma-script)
12946 produces a centered paragraph below the ordinary title (
12962 ) for a dedication.
12965 \begin_layout Itemize
12970 : produces a left aligned paragraph above the ordinary title (
12986 ) for a document`s head.
12989 \begin_layout Itemize
12994 : produces in a double-sided print in
12996 report (koma-script)
13002 a left-aligned paragraph at the top of the title page`s back or has no
13003 effect in a single-sided print or in
13005 article (koma-script)
13010 \begin_layout Itemize
13015 : produces in a double-sided print in
13017 report (koma-script)
13023 a left-aligned paragraph at the bottom of the title page`s back or has
13024 no effect in a single-sided print or in
13026 article (koma-script)
13031 \begin_layout Itemize
13036 : produces a special
13037 \begin_inset Quotes eld
13041 \begin_inset Quotes erd
13044 page ahead of the actual document containing a paragraph without special
13048 \begin_layout Standard
13049 The layout files for the document classes
13051 article (koma-script)
13055 report (koma-script)
13061 do include the file
13066 This is thought of as a place to define your own types.
13071 in your personal layout directory and edit the file!
13074 \begin_layout Subsection
13075 letter (koma-script)
13078 \begin_layout Standard
13082 \begin_layout Plain Layout
13094 \begin_layout Standard
13098 letter (koma-script)
13100 is implemented in the layout file
13105 It contains all the paragraph types of the corresponding standard document
13110 , partly modified, with the exception of the LyX specific types
13122 type, which is replaced by the new
13127 In addition, it contains, in contrast to the standard document class, the
13145 Furthermore, there are a number of new letter specific types.
13148 \begin_layout Standard
13152 \begin_layout Plain Layout
13164 \begin_layout Standard
13165 The appearance of the letter produced by this document class can be controlled
13166 by a number of LaTeX commands, which you can put in the LaTeX preamble.
13170 \begin_layout Plain Layout
13171 For example, the standard appearance of the letter`s heading, consisting
13172 of name and address, is quite self-willed.
13174 \begin_inset Quotes eld
13178 \begin_inset Quotes erd
13181 heading is produced by the following LaTeX commands in the preamble:
13184 \begin_layout LyX-Code
13194 \begin_layout LyX-Code
13210 \begin_layout LyX-Code
13220 \begin_layout LyX-Code
13240 A detailed German description of such LaTeX commands can be found in the
13241 Koma-Script documentation
13246 With it, the letter's author can produce his personal letter layout.
13249 \begin_layout Standard
13258 define the beginning of the letter and must be used in every letter.
13259 To emphasize them in the LyX document class, they are marked with the letter
13269 \begin_inset space ~
13272 in the left margin.
13273 It is possible to write any number of letters in one file.
13278 type produces a new letter using the same addressee and a
13282 type produces a new addressee.
13299 are ordinary paragraph types and can also be used several times in one
13300 and the same letter.
13303 \begin_layout Itemize
13308 : produces a paragraph for the addressee and implicitly defines the beginning
13312 \begin_layout Itemize
13317 : produces a paragraph for the form of address and implicitly produces a
13321 \begin_layout Itemize
13326 : produces a paragraph for a close.
13329 \begin_layout Itemize
13334 : produces a paragraph for a postscript.
13337 \begin_layout Itemize
13342 : produces a paragraph for a distribution list.
13345 \begin_layout Itemize
13350 : produces a paragraph for enclosures.
13353 \begin_layout Standard
13394 are input types provided with a label to enter information, which will
13395 be processed by the document class.
13399 \begin_layout Plain Layout
13400 It could be seen as a matter of inconsequence, that the types
13408 described above are not such input types as well.
13409 Because of the special meaning of those types, however, I have implemented
13410 them as ordinary paragraph types with a one letter mark in the left margin.
13411 Moreover, it would affect my feeling of symmetry, if the
13419 type had such a serious different appearance.
13424 The types must be used ahead of the corresponding
13431 \begin_layout Standard
13432 An implementation of these types in a WYSIWYG fashion does not seem to make
13433 sense, because the real appearance of the produced letter does not only
13434 depend on the usage of the particular type, but also on other factors.
13435 For example, a signature entered in the
13439 type will in the standard behavior appear in the produced letter only,
13440 when in the same letter also a
13445 The entered value of the
13449 type will in the standard behavior not appear in the produced letter at
13451 The possibility to design the letter`s heading freely is already indicated
13452 in a footnote above.
13455 \begin_layout Standard
13456 The input types can also be used as empty paragraphs.
13457 This makes sense e.
13458 \begin_inset space \thinspace{}
13462 \begin_inset space \space{}
13474 type is not used at all, in the standard behavior the value of the
13478 type is used as signature, whereas if an empty
13482 type is used, no signature value is defined.
13485 \begin_layout Standard
13486 By using the input types it is possible to write a letter template, containing
13487 filled input types with your personal dates (name, address, etc.) and empty
13488 input types for other dates you want to enter.
13491 \begin_layout Itemize
13496 : sender's name, in the standard behavior appears as a centered paragraph
13497 in small caps in the letter`s heading.
13500 \begin_layout Itemize
13505 : sender's signature, in the standard behavior appears below the
13514 type is used, the value of the
13518 type appears instead.
13521 \begin_layout Itemize
13526 : sender's address, in the standard behavior appears in a centered paragraph
13527 in the letter`s heading below the sender's name.
13530 \begin_layout Itemize
13535 : sender's telephone number, in the standard behavior only sets the LaTeX
13545 \begin_layout Itemize
13550 : place of the letter`s making.
13553 \begin_layout Itemize
13558 : date of the letter`s making.
13567 , in the standard behavior, produce the place and the date in a right-aligned
13568 line below the addressee's field.
13573 type is used, neither place nor date appear, independent of the value of
13583 type is used, the date of the letter `s production is used.
13586 \begin_layout Itemize
13591 : sender`s back address, in the standard behavior appears above the addressee's
13592 field in a small sans serif font.
13595 \begin_layout Itemize
13600 : special mail information, in the standard behavior appears underlined
13601 above the addressee's field below the back address.
13604 \begin_layout Itemize
13609 : additional information, in the standard behavior appears on right side
13610 below the addressee`s field.
13613 \begin_layout Itemize
13618 : the letter's title, in the standard behavior appears in a big, bold, sans
13619 serif font above the subject.
13622 \begin_layout Itemize
13627 : the letter's subject, in the standard behavior appears in a bold font
13635 \begin_layout Standard
13656 produce a business letter like line above the
13660 line containing the fields
13661 \begin_inset Quotes eld
13665 \begin_inset Quotes erd
13669 \begin_inset Quotes eld
13673 \begin_inset Quotes erd
13677 \begin_inset Quotes eld
13681 \begin_inset Quotes erd
13685 \begin_inset Quotes eld
13689 \begin_inset Quotes erd
13693 \begin_inset Quotes eld
13697 \begin_inset Quotes erd
13701 \begin_inset Quotes eld
13705 \begin_inset Quotes erd
13709 For the date field, the value of the
13715 \begin_inset Quotes eld
13718 business letter types
13719 \begin_inset Quotes erd
13722 is used, the value of the
13726 type however does not appear, but only the LaTeX variable
13733 The ordinary output of place and date in a right-aligned line below the
13734 addressee`s field is suppressed.
13735 The types are implemented as input types provided with a label and must
13736 be used ahead of the corresponding
13743 \begin_layout Itemize
13751 \begin_layout Itemize
13759 \begin_layout Itemize
13767 \begin_layout Itemize
13775 \begin_layout Itemize
13783 \begin_layout Subsection
13784 The new letter class: letter (koma-script v.2)
13787 \begin_layout Standard
13793 \begin_layout Standard
13794 \begin_inset VSpace medskip
13800 \begin_layout Standard
13802 Koma-Script version 2.8 has introduced a new letter class
13806 which supersedes the now unsupported
13811 It has — on the LaTeX side — a completely new interface and is not compatible
13812 with the old class.
13813 Therefore, LyX supports both, though it is recommended to use the new class.
13816 \begin_layout Standard
13817 This class covers the same functionality as
13819 letter (koma-script),
13822 The basic items are
13826 (receiver's address, same as
13830 in the old layout),
13843 will start a new letter (i.
13844 \begin_inset space \thinspace{}
13848 \begin_inset space \space{}
13851 you can write several letters per document).
13852 New elements are sender's
13868 and the possibility to use a
13874 Insert\SpecialChar \menuseparator
13880 \begin_layout Standard
13881 The biggest improvement is, though, that the letter's layout is configurable
13882 at almost any needs.
13883 This can be done via the preamble or with a special style file (Letter
13884 Class Option, extension
13888 ), that will be read in as a class option.
13892 \begin_layout Plain Layout
13893 The KOMA package comes with some default
13898 There is, for instance, a
13902 file that follows german typesetting rules, or a
13906 that provides the default layout of the old
13911 The latter can be loaded with the class option
13920 ayout\SpecialChar \menuseparator
13925 ocument\SpecialChar \menuseparator
13937 template that is included in LyX for examples.
13938 A detailed description is to be found in the Koma-Script documentation
13946 \begin_layout Subsection
13950 \begin_layout Standard
13951 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
13955 \begin_layout Itemize
13956 The chapter number of a
13960 type appears on a line of its own above the chapter heading instead of
13961 appearing in the same line ahead of it.
13962 The cause for that is the LyX internal behavior for the labeltype
13966 in the layout file.
13969 \begin_layout Itemize
13970 The headings of the types
13978 are only put in the
13979 \begin_inset Quotes eld
13983 \begin_inset Quotes erd
13986 LaTeX table of contents, but not in the LyX table of contents (
13988 Document\SpecialChar \menuseparator
13990 \begin_inset space ~
13994 \begin_inset space ~
14002 \begin_layout Itemize
14003 The paragraphs in a
14007 document class appear in a skip separation mode, not indented.
14008 This is the standard behavior, no special LaTeX commands are needed for
14012 Document\SpecialChar \menuseparator
14015 dialog the corresponding radio button indicates
14024 value always has the effect that extra LaTeX commands are inserted in the
14025 document to produce the gap, which is not what is wanted in this case.
14028 \begin_layout Section
14029 Latex8 (IEEE Conference Papers)
14032 \begin_layout Standard
14038 \begin_layout Subsection
14042 \begin_layout Standard
14043 Since this class is specifically for writing submissions to IEEE sponsored
14044 conferences I strongly recommend that you get a copy of their Authors Kit.
14049 package and associated bibliography style file is included in the kit.
14050 The Authors Kit is usually sent out by email once your initial submission
14052 There is a lot of useful information in the Authors Kit explaining formatting
14053 restrictions and so on and I will assume you have read this since that
14054 means I don't have to repeat it all here.
14057 \begin_layout Subsection
14061 \begin_layout Standard
14062 [AR\SpecialChar \@.
14066 \begin_layout Subsection
14067 Supported Environments
14070 \begin_layout Itemize
14076 \begin_layout Itemize
14082 \begin_layout Itemize
14088 \begin_layout Itemize
14094 \begin_layout Itemize
14100 \begin_layout Itemize
14106 \begin_layout Itemize
14112 \begin_layout Itemize
14118 \begin_layout Itemize
14124 \begin_layout Subsection
14125 Differences Between Screen and Paper
14128 \begin_layout Standard
14129 There are slight differences in appearance mainly with the presentation
14130 of section counters.
14131 On screen the trailing period of the section counter is missing but it
14132 will appear in the output so don't let this worry you.
14135 \begin_layout Section
14139 \begin_layout Standard
14145 \begin_layout Subsection
14149 \begin_layout Standard
14150 Memoir is a very powerful and constantly evolving class.
14151 It has been designed with regard to fictional and non-fictional literature.
14152 Its aim is to let the user have maximum control over the typesetting of
14154 Memoir is based on the standard book class, but it can also emulate the
14155 article class (see below).
14158 \begin_layout Standard
14159 Peter Wilson, the developer of Memoir, is known as the author of lots of
14160 useful packages in the LaTeX world.
14161 Most of them have been merged with Memoir.
14162 Therefore, it is much easier to layout the table of contents, appendices,
14163 chapter designs and such.
14164 LyX, though, does not support all of these goodies natively.
14165 Some of them might be added to forthcoming releases
14169 \begin_layout Plain Layout
14170 You are invited to send suggestions to
14171 \begin_inset Flex URL
14174 \begin_layout Plain Layout
14176 lyx-devel@lists.lyx.org
14186 , lots will probably never, due to the limitations of LyX's framework.
14187 Of course you can still use all features with the help of some native LaTeX
14192 \begin_layout Plain Layout
14197 \begin_layout Plain Layout
14207 \begin_inset space ~
14211 \begin_inset CommandInset ref
14213 reference "sec:Inserting-TeX-Code"
14223 In this section, we can only list those features which are natively supported
14225 For detailed descriptions (and for the rest of features) we are recommending
14226 to have a look at the detailed manual of the Memoir class
14230 \begin_layout Plain Layout
14235 \begin_layout Plain Layout
14245 \begin_inset Flex URL
14248 \begin_layout Plain Layout
14250 CTAN:/macros/latex/memoir/memman.pdf
14260 , which is not only a user guide for the class, but also both a comprehensive
14261 description on good typesetting and a superb example for good typesetting
14265 \begin_layout Subsection
14266 Basic features and restrictions
14269 \begin_layout Standard
14270 Memoir supports basically all features of the standard book classes.
14271 There are, however, some differences, as follows:
14274 \begin_layout Description
14276 \begin_inset space ~
14279 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14282 \begin_layout Description
14284 \begin_inset space ~
14287 style: The fancy page style is not supported, due to a command clash between
14288 Memoir and the fancyhdr package (they are both defining a command with
14289 the same name, which confuses LaTeX).
14290 Instead, Memoir comes with a bunch of own page styles (see
14292 Layout\SpecialChar \menuseparator
14293 Document\SpecialChar \menuseparator
14295 \begin_inset space ~
14301 If you want to use these for the chapter pages, you have to use the command
14308 in the main text or in preamble (e.
14309 \begin_inset space \thinspace{}
14313 \begin_inset space \space{}
14320 chapterstyle{companion}
14325 \begin_layout Description
14326 Sectioning: Sectionings (chapter, section, subsection etc.) are coming with
14327 an optional argument in the standard classes.
14328 With this, you can specify an alternative version of the title for the
14329 table of contents and the headers (for instance, if the title is too long).
14330 In LyX, you can do this via
14332 Insert\SpecialChar \menuseparator
14334 \begin_inset space ~
14339 at the beginning of a chapter/section.
14340 Memoir features a second optional argument and thus separates the table
14341 of contents from the header.
14342 You can define three variants of a title with this: one for the main text,
14343 one for the table of contents, and one for the headers.
14344 Simply insert two optional arguments if you need this feature, the first
14345 one containing the short title for the Table of Contents, the second one
14346 containing an alternative short title for the headers.
14349 \begin_layout Description
14350 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14351 of contents, the list of figures and the list of table start a new page
14353 Memoir does not follow this route.
14354 You have to insert a page break yourself, if you want to have one.
14357 \begin_layout Description
14358 Titlepage: For some unknown reason, Memoir uses pagination on the title
14359 page (in the standard classes, title pages are
14360 \begin_inset Quotes eld
14364 \begin_inset Quotes erd
14368 \begin_inset space \thinspace{}
14372 \begin_inset space \space{}
14376 If you want an empty title page, type
14380 aliaspagestyle{title}{empty}
14385 \begin_layout Description
14386 Article: With the class option
14392 Layout\SpecialChar \menuseparator
14393 Document\SpecialChar \menuseparator
14395 \begin_inset space ~
14400 ), you can emulate article style.
14401 That is, counters (footnotes, figures, tables etc.) will not be reset on
14402 new chapters, chapters don't start a new page (but are—in contrary to
14403 \begin_inset Quotes eld
14407 \begin_inset Quotes erd
14410 article classes—still allowed), parts, though, use their own page, as in
14414 \begin_layout Description
14415 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14416 font commands, which have been used in the old LaTeX version 2.09 (e.
14417 \begin_inset space \thinspace{}
14421 \begin_inset space \space{}
14437 It produces an error and stops LaTeX whenever such a command appears.
14442 reallows the commands and spits out warnings instead (which does at least
14444 Since a lot of packages and particularly BibTeX style files are still using
14445 those commands, we have decided to use this option by default.
14448 \begin_layout Subsection
14452 \begin_layout Standard
14453 We will only describe the features supported by LyX (which is not much currently
14455 Please consult the Memoir manual
14459 \begin_layout Plain Layout
14464 \begin_layout Plain Layout
14474 \begin_inset Flex URL
14477 \begin_layout Plain Layout
14479 CTAN:/macros/latex/memoir/memman.pdf
14492 \begin_layout Description
14493 Abstract: You may wonder why an abstract is an extra feature.
14494 Well, it is in book class.
14495 Usually books don't have abstracts.
14496 Memoir, however, has.
14497 You can use it wherever and how often you like.
14500 \begin_layout Description
14501 Chapterprecis: You may know this from belletristic: The contents of a chapter
14502 is shortly described below the title and also in the table of contents
14504 \begin_inset space \thinspace{}
14508 \begin_inset space \space{}
14513 Our hero arrives in Troia; he loses some friends; he finds others
14516 Chapterprecis does exactly this.
14517 It is therefore only sensible below a chapter.
14520 \begin_layout Description
14521 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14522 The epigraph environment provides an elegant way of typesetting such a
14524 The motto itself (text) and its author (source) are divided by a short
14526 Unfortunately, we have to fool LyX a bit here again, since the environment
14527 needs two arguments (text and source).
14528 In this case, we have to use curly brackets (in TeX mode) between the two
14539 <author of the slogan>.
14542 \begin_layout Description
14543 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14544 complex figurative poems).
14545 LyX can only support a few of them.
14546 One is poemtitle, which is a centered title for poems, which will also
14547 be added to the table of contents (verse is the standard environment for
14549 Memoir has some enhanced versions of verse, but you need to use TeX code,
14550 because they have to be nested inside regular verse environments, which
14551 is not possible with LyX).
14554 \begin_layout Description
14555 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14558 \begin_layout Section
14559 Article (mwart), book (mwbk) and report (mwrep)
14560 \begin_inset OptArg
14563 \begin_layout Plain Layout
14576 \begin_layout Standard
14582 \begin_layout Standard
14583 The LyX document classes
14599 correspond to the LaTeX document classes
14612 They are replacements for the standard document classes
14624 , resp., and fit better to Polish typography conventions in a number of points.
14628 \begin_layout Standard
14632 \begin_layout Itemize
14633 Unnumbered titles (with star, e.
14634 \begin_inset space \thinspace{}
14638 \begin_inset space \space{}
14645 ) are added into table of contents,
14648 \begin_layout Itemize
14649 Additional page styles:
14653 \begin_layout Description
14654 uheadings header with separated lines,
14657 \begin_layout Description
14658 myheadings custom header, contents headers via commands:
14673 \begin_layout Description
14674 myuheadings custom header with separated lines,
14677 \begin_layout Description
14678 outer page number is placed on outer side of page
14682 \begin_layout Itemize
14687 \begin_layout Description
14688 rmheadings serif titles — default,
14691 \begin_layout Description
14692 sfheadings sansserif titles,
14695 \begin_layout Description
14696 authortitle on title page first placed is author next title — default,
14699 \begin_layout Description
14700 titleauthor on title page first placed is title next author,
14703 \begin_layout Description
14704 withmarginpar reserve place on page for margins.
14708 \begin_layout Section
14712 \begin_layout Standard
14717 provides an alternative to the standard
14722 It provides similar functionality, but you might prefer this layout with
14723 sans serif sections, headings, and more.
14726 \begin_layout Section
14730 \begin_layout Standard
14736 \begin_layout Standard
14737 \begin_inset VSpace bigskip
14743 \begin_layout Standard
14748 \begin_inset space ~
14753 textclass works with the American Physical Sociey's RevTeX 4.0 (the
14754 \begin_inset Formula $\beta$
14757 release of May, 1999) class.
14760 \begin_layout Standard
14765 textclass, which works with RevTeX 3.1.
14766 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
14767 That means that it doesn't interact very well with LyX, which requires
14768 LaTeX2e, although it has been kludged to work.
14769 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
14773 \begin_inset space ~
14778 textclass should also be pretty easy to use.
14781 \begin_layout Standard
14782 These documents are supposed to be used in
14786 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
14787 macros, and assume you'll know what to put in the preamble if necessary.
14790 \begin_layout Subsection
14794 \begin_layout Standard
14795 All you need to do is install RevTeX 4, as described in the package's README
14797 The package can be found at The RevTeX 4 Web Site
14798 \begin_inset Flex URL
14801 \begin_layout Plain Layout
14803 http://publish.aps.org/revtex4/
14809 Install it somewhere that LaTeX can see it.
14810 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
14812 \begin_inset space \thinspace{}
14816 \begin_inset space \space{}
14819 not the directory where you installed the class file.) Then, if you reconfigure
14820 LyX, it will find the class file and let you use the RevTeX4 textclass.
14823 \begin_layout Standard
14824 Probably the easiest way to get started is either to import a RevTeX 4 document
14832 \begin_inset space ~
14837 template, found in the templates directory.
14840 \begin_layout Subsection
14844 \begin_layout Standard
14845 Optional arguments to
14852 \begin_inset Quotes eld
14856 \begin_inset Quotes erd
14860 \begin_inset Quotes eld
14864 \begin_inset Quotes erd
14874 \begin_inset space ~
14882 \begin_inset space ~
14888 Remember that in RevTeX, at least one optional argument is required!
14891 \begin_layout Standard
14892 Other preamble matter, like
14899 \begin_inset space ~
14905 \begin_inset space ~
14910 dialog, also as usual.
14913 \begin_layout Subsection
14917 \begin_layout Standard
14918 The layouts basically correspond to the commands in RevTeX4.0.
14919 For example, the Email layout corresponds to
14926 Note that (at least as of RevTeX 4.0 Beta), the
14934 layouts are exactly equivalent, so you shouldn't need to use both.
14938 \begin_layout Plain Layout
14939 In case you're curious, both were included so that
14943 would be able to translate both
14963 \begin_layout Subsection
14967 \begin_layout Standard
14968 There are a couple of important unique aspects of RevTeX 4 which might cause
14969 bugs that will be even more confusing in LyX.
14972 \begin_layout Standard
14990 The LyX equivalent is that there is a separate Thanks layout.
14995 write footnotes in the
14999 layout, or weird things may happen.
15000 See the RevTeX 4 documentation for more details.
15003 \begin_layout Standard
15007 \begin_inset space ~
15015 \begin_inset space ~
15024 layouts must be placed
15032 layout and the corresponding
15049 , the LaTeX won't compile.
15052 \begin_layout Subsection
15056 \begin_layout Standard
15057 The main problem with this layout is that you can't use the optional arguments
15058 to layouts like Email and Title.
15059 (The problem is not unique to this layout; you can't use optional arguments
15060 to the Section layouts either.) This means that after you export that file
15061 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15062 need to edit the LaTeX file with a text editor to add the optional arguments
15064 \begin_inset space \thinspace{}
15068 \begin_inset space \space{}
15071 the running title for the page headers.
15072 Lacking these layouts makes the
15078 (and the equivalent
15084 ) useless, so the corresponding layouts don't exist, and will have to be
15089 \begin_layout Plain Layout
15094 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15095 has not been updated yet to take advantage of it.
15103 \begin_layout Section
15104 Springer Journals (
15111 \begin_layout Standard
15117 \begin_layout Subsection
15121 \begin_layout Standard
15122 These are the layout files for some of the journal formats used by Springer
15123 Verlag and listed on
15124 \begin_inset Flex URL
15127 \begin_layout Plain Layout
15129 http://www.springer.de/author/tex/help-journals.html
15134 , where you should also go to fetch the class files (yes, these are LaTeX2e
15136 It is a modular system: the things common to all journals are implemented
15141 , which journal-specific layout files (such as, e.
15142 \begin_inset space \thinspace{}
15146 \begin_inset space \space{}
15153 for Journal of Geodesy) can include.
15156 \begin_layout Standard
15157 This means that implementing support for any other Springer journal on this
15158 list is as simple as writing your own
15166 file following the outline given in
15174 \begin_layout Standard
15175 It is reasonably well tested only for the Journal of Geodesy.
15184 come with the standard LyX distribution.
15185 Install the relevant class file (downloaded from Springer) in a proper
15186 directory, reconfigure LaTeX (in the teTeX case by running
15190 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15191 and it should work.
15194 \begin_layout Subsection
15198 \begin_layout Standard
15199 A large number of theorem-like styles —
15205 \SpecialChar \ldots{}
15211 \begin_layout Standard
15214 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15215 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15218 See the Springer class file documentation for details.
15221 \begin_layout Subsection
15225 \begin_layout Itemize
15237 \begin_layout Itemize
15240 Probability Theory and Related Fields
15246 — Jean-Marc Lasgouttes
15249 \begin_layout Standard
15250 Add your own, it isn't so hard!
15253 \begin_layout Subsection
15257 \begin_layout Standard
15258 These files are partly based on the older
15262 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15263 file from Springer.
15268 layout, are now defunct.
15269 Jean-Marc Lasgouttes helped out big in making me find my way around the
15270 LyX layout file mechanism.
15273 \begin_layout Subsection
15277 \begin_layout Standard
15279 But probably less than in the old hacked-LaTeX
15286 \begin_layout Standard
15288 \begin_inset space \thinspace{}
15291 g.: does not display the number for theorem-like layouts, just #.
15294 \begin_layout Section
15300 \begin_inset CommandInset label
15309 \begin_layout Standard
15317 \begin_layout Subsection
15321 \begin_layout Standard
15322 This section describes how to use LyX to make slides for overhead projectors.
15323 There are two document classes that can do this: the default slides class
15329 This section documents the former.
15332 \begin_layout Standard
15333 I'm going to say this again, nice and clear, so that there's no misunderstanding
15337 \begin_layout Standard
15338 \begin_inset VSpace bigskip
15344 \begin_layout Standard
15348 This section documents the class
15349 \begin_inset Quotes eld
15357 \begin_inset Quotes erd
15365 \begin_layout Standard
15366 \begin_inset VSpace bigskip
15372 \begin_layout Standard
15373 If you're looking for the documentation for
15374 \begin_inset Quotes eld
15382 \begin_inset Quotes erd
15385 , check out section
15386 \begin_inset space ~
15390 \begin_inset CommandInset ref
15392 reference "sec:foiltex"
15402 \begin_inset Quotes eld
15410 \begin_inset Quotes erd
15413 ] is actually somewhat better than the default
15421 \begin_layout Plain Layout
15422 \SpecialChar \ldots{}
15423 or so I've been told repeatedly by its advocates.
15424 Having never used it, I have no idea if this claim is true or not.
15429 which this section documents.
15432 \begin_layout Standard
15433 This class is the LaTeX2e improvement of the old
15438 Every LaTeX2e distribution includes this class [which I'll just refer to
15440 \begin_inset Quotes eld
15448 \begin_inset Quotes erd
15451 from now on], so you're bound to have it.
15452 As I noted earlier, there are other classes, such as
15456 , which also produce slides for overhead projectors and do a better job
15458 However, there are some things which
15462 can do which the others can't, such as generate overlays.
15463 Read on to learn more!
15466 \begin_layout Subsection
15468 \begin_inset CommandInset label
15470 name "sec:slidesetup"
15477 \begin_layout Standard
15478 Obviously, to use this document class, you need to select
15479 \begin_inset Quotes eld
15487 \begin_inset Quotes erd
15490 from the class list in the
15492 Document\SpecialChar \menuseparator
15496 There are some other special things you should know about this class:
15499 \begin_layout Itemize
15500 Don't bother changing the options
15505 They're not supported by the
15512 \begin_layout Itemize
15516 \begin_inset space ~
15521 behaves a bit differently for this class.
15522 The possible choices and what they do are as follows:
15526 \begin_layout Description
15531 The final output contains page numbers in the lower right corner.
15534 \begin_layout Description
15543 , but also prints out any time markers you've put in.
15544 This is the default.
15547 \begin_layout Description
15552 The final output contains no page numbers, time markers, or alignment markers.
15556 \begin_layout Itemize
15561 class has an extra option:
15567 \begin_inset Quotes eld
15575 \begin_inset Quotes erd
15578 in the extra class options.
15582 \begin_layout Standard
15583 Using this options allows you to add time markers to
15589 \begin_inset space ~
15593 \begin_inset CommandInset ref
15595 reference "sec:slideNote"
15603 \begin_layout Standard
15604 You can also use the template file
15605 \begin_inset Quotes eld
15613 \begin_inset Quotes erd
15616 to automatically set up a document to use the
15622 File\SpecialChar \menuseparator
15624 \begin_inset space ~
15628 \begin_inset space ~
15633 to open your new document].
15634 The template file also contains some examples of the special paragraph
15635 environments used by this class.
15636 I'll describe those next.
15639 \begin_layout Subsection
15640 Paragraph Environments
15643 \begin_layout Subsubsection
15644 Supported Environments
15647 \begin_layout Standard
15648 The first thing you'll notice when you start up a new
15652 document is the font size and type: it's the equivalent of the size
15653 \begin_inset Quotes eld
15661 \begin_inset Quotes erd
15667 \begin_inset space ~
15673 This is also what's used in the output.
15675 \begin_inset Quotes eld
15679 \begin_inset Quotes erd
15682 to remind you that this is a slide.
15683 Your final slides will use a larger font; ergo, you'll have less space.
15684 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
15687 \begin_layout Standard
15688 The next thing that becomes obvious is the changes to the paragraph environment
15689 pull-down box [at the far-left end of the toolbar].
15690 Most of the paragraph environments you're used to seeing are missing.
15691 There are also five new ones.
15696 class itself only supports certain paragraph environments:
15699 \begin_layout Itemize
15705 \begin_layout Itemize
15711 \begin_layout Itemize
15717 \begin_layout Itemize
15723 \begin_layout Itemize
15729 \begin_layout Itemize
15735 \begin_layout Itemize
15741 \begin_layout Itemize
15747 \begin_layout Itemize
15753 \begin_layout Itemize
15759 \begin_layout Itemize
15765 \begin_layout Standard
15766 All of the other standard environments, including the section-heading environmen
15767 ts, aren't used in the
15774 \begin_layout Standard
15775 On the other hand, you'll notice the following new environments:
15778 \begin_layout Itemize
15784 \begin_layout Itemize
15790 \begin_layout Itemize
15796 \begin_layout Itemize
15802 \begin_layout Itemize
15808 \begin_layout Standard
15809 These five are kind of quirky, due to a
15810 \begin_inset Quotes eld
15814 \begin_inset Quotes erd
15818 You see, LyX doesn't permit you to nest any other paragraph environment
15819 into an empty environment.
15820 Now, that's fine and dandy, but it means that you wouldn't be able to start
15821 a slide with anything except plain text.
15822 To deal with this, I've performed a little
15823 \begin_inset Quotes eld
15827 \begin_inset Quotes erd
15833 \begin_layout Subsubsection
15834 Quirks of the New Environments
15835 \begin_inset CommandInset label
15837 name "sec:slideQuirk"
15844 \begin_layout Standard
15845 All five of the new paragraph environments are somewhat quirky due to inherent
15846 limitiations in the current version of LyX.
15847 As I just mentioned, LyX forbids environments that begin with another environme
15849 To get around this, the
15853 environment isn't a paragraph environment as described in the
15861 \begin_layout Standard
15862 You should consider
15875 \begin_inset Quotes eld
15878 pseudo-environments.
15879 \begin_inset Quotes erd
15882 They look like a section heading or a
15883 \begin_inset Quotes eld
15891 \begin_inset Quotes erd
15894 but really begin a [and, if necessary, end the previous] paragraph environment.
15904 \begin_inset Quotes eld
15908 \begin_inset Quotes erd
15911 These two perform some action.
15914 \begin_layout Standard
15915 A common feature of all five environments,
15935 , is a rather long-ish label.
15936 The text following this label — ordinarily the contents of the paragraph
15937 environment — is utterly irrelevant for
15958 LyX completely ignores it.
15959 In fact, you can leave these five environments completely empty.
15963 \begin_layout Standard
15968 to put any text after the rather long-ish label, you might want to.
15969 This could be a short description of the contents of the
15974 In that case, enter in your descriptive comment and hit
15978 as you normally would.
15981 \begin_layout Standard
15982 If, on the other hand, you don't want to enter in any descriptive text,
15983 you'll hit another LyX quirk.
15984 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
15985 environment until you put something in the old one.
15989 \begin_layout Itemize
15990 Start entering the text that will
16018 \begin_layout Itemize
16019 Now move to the beginning of that paragraph.
16023 \begin_layout Itemize
16032 \begin_layout Itemize
16033 Finally, change this new, empty paragraph to a
16057 \begin_layout Standard
16058 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16062 \begin_layout Subsection
16063 Making a Presentation with
16076 \begin_layout Subsubsection
16084 \begin_layout Standard
16085 If you're expecting this section to teach you how to actually make a presentatio
16086 n, you'll be sorely disappointed.
16087 Naturally, I'll describe all of the ways the
16091 class can assist you in preparing the materials for a presentation.
16092 Filling in the contents, however, is up to you.
16097 the LyX philosophy.]
16100 \begin_layout Standard
16105 environment [in the manner described in section
16106 \begin_inset space ~
16110 \begin_inset CommandInset ref
16112 reference "sec:slideQuirk"
16116 ] tells LyX to begin a new slide [duh].
16117 The label for this environment/
16118 \begin_inset Quotes erd
16122 \begin_inset Quotes erd
16126 \begin_inset Quotes eld
16130 \begin_inset Quotes erd
16133 in cool blue, followed by the label,
16134 \begin_inset Quotes eld
16138 \begin_inset Quotes erd
16142 Any text or paragraph environments that follow this one go on the new slide.
16146 \begin_layout Standard
16147 Slides are probably the only time you'll need to forcibly end pages in LyX
16148 (this can be specified in the
16153 In fact, you'll want to, once you finish entering the contents of one slide.
16154 If you've entered more text than can physically fit on a slide, the extra
16155 overflows onto a new slide.
16156 I don't recommend doing this, however, since the overflow slide won't have
16157 any page number on it.
16158 Furthermore, it may interfere with any
16162 you've made to accompany the oversized
16169 \begin_layout Standard
16178 environments work the same way as the
16183 They both create an
16184 \begin_inset Quotes eld
16188 \begin_inset Quotes erd
16191 followed by a label [
16192 \begin_inset Quotes eld
16196 \begin_inset Quotes erd
16200 \begin_inset Quotes eld
16204 \begin_inset Quotes erd
16208 The color is a stunning magenta instead of blue, and the
16209 \begin_inset Quotes eld
16213 \begin_inset Quotes erd
16216 will look different, in style and in length.
16217 The label fonts of all three also differ from one another.
16220 \begin_layout Standard
16225 , if the contents of a
16233 exceed the physical size of a slide or sheet of paper, the extra will overflow
16235 Again, you should avoid this.
16236 It defeats the whole purpose of
16247 \begin_layout Subsubsection
16257 \begin_layout Standard
16262 is a slide that sits atop another slide.
16263 Perhaps you wish to discuss a figure on the main
16267 before displaying the text associated with it.
16268 One way to accomplish this is tape a flap of dark paper over the part of
16273 you want to display later.
16274 This method fails, however, if you wish to overlap one graph with another,
16276 You would then have to fumble while speaking to align the two separate,
16281 s to align the two graphs.
16286 environment in both cases makes life much easier.
16289 \begin_layout Standard
16294 receives the page number of its
16295 \begin_inset Quotes eld
16299 \begin_inset Quotes erd
16307 \begin_inset Quotes eld
16315 \begin_inset Quotes erd
16322 \begin_layout Plain Layout
16323 Presumably, mutliple
16328 \begin_inset Quotes eld
16336 \begin_inset Quotes erd
16340 \begin_inset Quotes eld
16348 \begin_inset Quotes erd
16352 \begin_inset Quotes eld
16360 \begin_inset Quotes erd
16364 \begin_inset space ~
16367 appended to the page number of the parent
16377 Clearly, you want the contents of both the
16385 to each fit on a single physical slide! You should probably consider an
16391 \begin_inset Quotes eld
16395 \begin_inset Quotes erd
16407 class provides a visual cue for this: the label at the start of an
16411 is shorter than that at the start of a
16416 Lastly, when you generate printable output, you'll find alignment markers
16417 in all four corners of both the
16421 page and its parent
16426 These will assist you in lining up the two physical slides.
16429 \begin_layout Standard
16430 The major problem in overlaying two slides is aligning the contents of the
16431 two transparencies.
16432 How much space should you leave for that graph on the second slide? Worse
16433 still, what if you want a graph and a sentence on second slide, but there
16434 is text on the main transparency that goes in between them? You could try
16435 and insert vertical space of the right size.
16436 The better way is to use
16447 \begin_layout Standard
16448 As their names imply,
16456 are two command-like paragraph environments that make all subsequent text
16457 invisible and visible, respectively.
16459 \begin_inset space ~
16463 \begin_inset CommandInset ref
16465 reference "sec:slideQuirk"
16469 that you don't place anything
16473 these two environments, however.
16478 , it inserts a centered, sky-blue label into the page reading
16479 \begin_inset Quotes eld
16482 <Invisible Text Follows>
16483 \begin_inset Quotes erd
16487 For paragraphs following this label, the parts of the
16495 ; it doesn't matter which] where they would be contain instead blank space.
16499 \begin_layout Standard
16504 , the corresponding centered label is
16505 \begin_inset Quotes eld
16508 <Visible Text Follows>
16509 \begin_inset Quotes erd
16513 Paragraphs following this label behave normally.
16514 Note that the beginning of a new
16526 automatically shuts off an
16531 It's therefore not necessary to use
16542 \begin_layout Standard
16543 By now, it should be obvious how to create overlay transparencies using
16544 the proper combination of
16563 \begin_layout Enumerate
16568 , including everything that will appear on it, whether on the main slide
16576 \begin_layout Enumerate
16577 Before each figure or paragraph that will appear only on the
16586 If necessary, insert a
16590 environment after the
16597 \begin_layout Enumerate
16602 immediately following the
16609 \begin_layout Enumerate
16610 Copy the contents of this
16621 \begin_layout Enumerate
16626 , change all of the
16637 \begin_layout Standard
16639 You've just made an
16646 \begin_layout Standard
16647 There's one problem with the way I've designed the LyX
16651 class: you can't make text in the middle of a paragraph invisible, nor
16652 make text in the middle of an invisible paragraph visible again.
16653 To accomplish this feat, you'll need to use some inlined LaTeX codes.
16657 \begin_layout Plain Layout
16658 The commands of interest are:
16661 \begin_layout Itemize
16666 invisible \SpecialChar \ldots{}
16670 \begin_layout Itemize
16675 visible \SpecialChar \ldots{}
16679 \begin_layout Plain Layout
16680 \SpecialChar \ldots{}
16681 and need to be marked as TeX.
16683 \begin_inset Quotes eld
16687 \begin_inset Quotes erd
16690 you wish to change goes in between the brackets [and after the
16703 If you don't know how to mark text as TeX, see the appropriate section
16716 \begin_layout Subsubsection
16726 \begin_inset CommandInset label
16728 name "sec:slideNote"
16735 \begin_layout Standard
16744 is associated with a
16745 \begin_inset Quotes eld
16749 \begin_inset Quotes erd
16761 class provides visual cues.
16766 is shorter than that of a
16770 [yet longer than that of an
16774 ] and, like the label of an
16778 is shockingly magenta.
16779 Additionally, the printed
16783 has the page number of its
16784 \begin_inset Quotes eld
16788 \begin_inset Quotes erd
16796 \begin_inset Quotes eld
16804 \begin_inset Quotes erd
16808 \begin_inset Quotes eld
16816 \begin_inset Quotes erd
16820 \begin_inset Quotes eld
16828 \begin_inset Quotes erd
16832 You can have multiple
16836 s associated with a single
16848 , you'll probably want to break up long
16852 s so that they fit on a single sheet of paper.
16855 \begin_layout Standard
16860 is obvious: it contains anything additional you might want to say about
16866 It could also be used as a sheet of reminders for a particular
16871 In the case of the latter, you might want to make use of time markers.
16877 \begin_inset Quotes eld
16881 \begin_inset Quotes erd
16884 support for time markers, a
16889 So, you'll have to resort to using the LaTeX codes.
16892 \begin_layout Standard
16893 To use time markers, you'll need to specify the extra class option
16894 \begin_inset Quotes eld
16902 \begin_inset Quotes erd
16906 \begin_inset space ~
16910 \begin_inset CommandInset ref
16912 reference "sec:slidesetup"
16917 This option turns on timing marks, which will appear in the lower-left-hand
16923 To set what appears in the time marker, you use the LaTeX commands
16924 \begin_inset Quotes eld
16934 \begin_inset Quotes erd
16938 \begin_inset Quotes eld
16948 \begin_inset Quotes erd
16952 The arguments of both commands are time measured in seconds.
16954 \begin_inset Quotes eld
16964 \begin_inset Quotes erd
16967 sets the time marker to a given time.
16969 \begin_inset Quotes eld
16979 \begin_inset Quotes erd
16982 increments the time marker by the specified amount.
16983 Using time markers and
16987 s in this fashion, you can remind yourself how much time to spend on a particula
16995 \begin_layout Standard
16996 There's one last feature to describe.
16997 Clearly, you'd like to print out all of your
17005 s on transparencies while printing all of your
17022 with which it is associated.
17023 What's a person to do?
17026 \begin_layout Standard
17027 Luckily, there are two LaTeX commands that allow you to select what to print
17029 Both must be placed into the preamble of your document.
17031 \begin_inset Quotes eld
17043 \begin_inset Quotes erd
17046 will cause the output to contain only the
17055 Correspondingly, the command
17056 \begin_inset Quotes eld
17068 \begin_inset Quotes erd
17071 prevents the output of anything but
17076 I'd advise placing both commands in the preamble and initially comment
17078 You can then preview your entire presentation as you write.
17079 When you're done writing, you can then uncomment one of the two to select
17080 what you want to print.
17081 I like to uncomment
17082 \begin_inset Quotes eld
17094 \begin_inset Quotes erd
17097 , print to a file with
17098 \begin_inset Quotes eld
17106 \begin_inset Quotes erd
17109 in its name, comment it back out, then uncomment
17110 \begin_inset Quotes eld
17122 \begin_inset Quotes erd
17126 \begin_inset Quotes eld
17134 \begin_inset Quotes erd
17138 I can then send either file to a printer, loading transparencies or plain
17139 paper as appropriate.
17142 \begin_layout Standard
17143 You can also provide other arguments to the
17144 \begin_inset Quotes eld
17154 \begin_inset Quotes erd
17158 \begin_inset Quotes eld
17168 \begin_inset Quotes erd
17172 See a good LaTeX book for details.
17175 \begin_layout Subsection
17180 Class Template File
17183 \begin_layout Standard
17184 I have also provided a template file,
17185 \begin_inset Quotes eld
17193 \begin_inset Quotes erd
17201 To use it, begin your new presentation with
17206 ile\SpecialChar \menuseparator
17208 \begin_inset space ~
17212 \begin_inset space ~
17222 Your new LyX presentation file will contain an example
17243 additionally contain an example of the use of
17252 Lastly, the preamble will contain:
17255 \begin_layout LyX-Code
17256 % Uncomment to print out only slides and overlays
17259 \begin_layout LyX-Code
17263 \begin_layout LyX-Code
17269 \begin_inset Newline newline
17275 \begin_layout LyX-Code
17276 % Uncomment to print out only notes
17279 \begin_layout LyX-Code
17283 \begin_layout LyX-Code
17291 \begin_layout Standard
17292 One final thing: I created this class to support the LaTeX2e
17293 \begin_inset Quotes eld
17301 \begin_inset Quotes erd
17304 class, one of the built-in LaTeX2e classes.
17305 Neither I nor the rest of the LyX Team endorse or oppose the use of this
17306 built-in slide class.
17307 It's here if you want it or need it.
17308 There exist other LaTeX2e classes for creating presentations, such as the
17314 \begin_inset space ~
17318 \begin_inset CommandInset ref
17320 reference "sec:foiltex"
17325 \begin_inset Quotes eld
17333 \begin_inset Quotes erd
17336 package [present on some TeX distributions].
17337 The latter is not yet supported under LyX.
17341 \begin_layout Plain Layout
17342 Perhaps you can take on the task\SpecialChar \ldots{}
17348 I know nothing about these other classes.
17349 Try them out to see what sort of alternative they provide.
17352 \begin_layout Chapter
17353 LyX Features needing Extra Software
17356 \begin_layout Section
17360 \begin_layout Standard
17366 \begin_layout Subsection
17370 \begin_layout Standard
17379 \begin_layout Plain Layout
17384 is not yet available when you are using the LaTeX distribution MiKTeX.
17389 , you'll find in the
17396 \begin_inset space ~
17407 \begin_inset CommandInset href
17409 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17416 \begin_layout Standard
17421 package is a program that was written by
17422 \begin_inset Flex CharStyle:Noun
17425 \begin_layout Plain Layout
17427 \begin_inset space ~
17435 in frustration because some constructs in LaTeX are sometimes non-intuitive,
17436 and easy to forget.
17437 The program runs over your LaTeX file, checks the integrity of the file,
17438 and flags some common errors.
17439 In other technical words, it is
17446 \begin_layout Standard
17447 Well, what is a syntax checker doing in LyX which is supposed to produce
17448 correct LaTeX anyways? The answer is simple: Just as
17452 not only checks the
17456 of C programs, but also does
17460 checks for type-errors,
17464 catches some common
17468 errors, in addition to the syntactical ones.
17473 is capable of detecting several common errors, such as
17476 \begin_layout Itemize
17477 Ellipsis detection:
17478 \begin_inset Newline newline
17481 Use \SpecialChar \ldots{}
17485 \begin_layout Itemize
17486 No space in front of/after parenthesis:
17487 \begin_inset Newline newline
17493 \begin_layout Itemize
17494 Enforcement of normal space after common abbreviations:
17495 \begin_inset Newline newline
17499 \begin_inset space \thinspace{}
17503 \begin_inset space \space{}
17506 is too wide spacing.
17509 \begin_layout Itemize
17510 Enforcement of end-of-sentence space when the last sentence ends with a
17512 \begin_inset Newline newline
17516 And this is wrong spacing.
17519 \begin_layout Itemize
17520 Space in front of labels and similar commands:
17521 \begin_inset Newline newline
17524 The label should stick right up to the text to avoid falling to a wrong
17527 \begin_inset CommandInset label
17537 \begin_layout Plain Layout
17538 This footnote is in danger of falling off to a wrong page
17543 The label is separated too much.
17546 \begin_layout Itemize
17547 Space in front of references, instead of hard spaces:
17548 \begin_inset Newline newline
17551 In you are in bad luck, the text will break right between the referenced
17552 text and reference number, and that's a pity.
17554 \begin_inset CommandInset ref
17556 reference "sec:chktex"
17563 \begin_layout Itemize
17565 \begin_inset Quotes eld
17569 \begin_inset Quotes erd
17573 \begin_inset Formula $\times$
17577 \begin_inset Newline newline
17580 2x2 looks cheap compared to
17581 \begin_inset Formula $2\times2$
17587 \begin_layout Standard
17588 and more \SpecialChar \ldots{}
17589 It is an invaluable tool when you are
17590 \begin_inset Quotes eld
17594 \begin_inset Quotes erd
17597 your document before printing, and you should run it right after the obligatory
17598 spelling check, and before you go fine tuning the typesetting.
17601 \begin_layout Subsection
17605 \begin_layout Standard
17606 If you have the program installed, usage is as simple as choosing
17608 Tools\SpecialChar \menuseparator
17610 \begin_inset space ~
17616 This will make LyX generate a LaTeX file of your document, start
17620 to check it, and then make LyX insert
17621 \begin_inset Quotes eld
17625 \begin_inset Quotes erd
17628 with the warnings from
17632 , if there were any.
17633 The warnings will be placed close to the point of the mistake, and you
17634 can quickly find them by using the
17636 Navigate\SpecialChar \menuseparator
17639 menu item, or the shortcut key
17648 Open the error boxes by clicking on them with the mouse, or use the shortcut
17657 bindings, or the corresponding
17666 Read the warning and correct the mistake, if it is a mistake.
17667 If you have trouble understanding what the warning is about, you can safely
17669 Remember that there is a hidden layer between the document on screen and
17670 the technical details in invoking
17674 , and this gap can make some warnings seem arcane or just right down plain
17678 \begin_layout Standard
17679 This document is an excellent testing bed for the feature, and it should
17680 provide quite a few warnings for you to fiddle with.
17681 Since computers are only so smart, expect most of the warnings to be false
17685 \begin_layout Subsection
17686 How to fine tune it
17689 \begin_layout Standard
17690 Sometimes, you'll find that
17694 makes more noise than suits your mood.
17695 Then you can choose not to use it, wait until your mood changes, or try
17700 to get better along with you.
17701 Another choice in the most desperate situations is to use
17703 View\SpecialChar \menuseparator
17705 \begin_inset space ~
17709 \begin_inset space ~
17713 \begin_inset space ~
17718 , which will get rid of all warnings instantly.
17721 \begin_layout Standard
17730 very configurable and extensible, you shouldn't expect to solve all problems
17736 Since LyX has to generate a somewhat special LaTeX file to be able to match
17737 the line numbers from the
17745 \begin_layout Plain Layout
17746 You can inspect the specific output from
17752 Edit\SpecialChar \menuseparator
17754 \begin_inset space ~
17758 \begin_inset space ~
17772 to the internal document structure, some of the warnings will not seen
17773 to appear correctly.
17774 There are two things you can do about this:
17777 \begin_layout Itemize
17782 invocation command line in
17798 installation configuration file (usually with the file
17803 See below to learn what warnings can be enabled and disabled on the command
17808 \begin_layout Itemize
17809 Export your document as a raw LaTeX file using
17811 File\SpecialChar \menuseparator
17812 Export\SpecialChar \menuseparator
17820 Invoked in this way, it can be a hassle to find the corresponding place
17821 in the document inside LyX, but with a little patience, you should be able
17825 \begin_layout Standard
17826 Here follows the warning messages that can be enabled and disabled in
17835 to disable a warning, and
17839 to enable a warning.
17840 The emphasized entries are disabled by default, because the default is
17843 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
17848 \begin_layout Standard
17849 Notice that you should only use the options that enable and disable warnings,
17850 because LyX relies on some of the other command line parameters to be set
17851 in a specific way to have a chance to communicate with
17858 \begin_layout Enumerate
17862 Command terminated with space.
17865 \begin_layout Enumerate
17868 Non-breaking space (
17869 \begin_inset Quotes eld
17877 \begin_inset Quotes erd
17880 ) should have been used.
17883 \begin_layout Enumerate
17887 You should enclose the previous parenthesis with
17888 \begin_inset Quotes eld
17896 \begin_inset Quotes erd
17902 \begin_layout Enumerate
17905 Italic correction (
17906 \begin_inset Quotes eld
17916 \begin_inset Quotes erd
17919 ) found in non-italic buffer.
17922 \begin_layout Enumerate
17925 Italic correction (
17926 \begin_inset Quotes eld
17936 \begin_inset Quotes erd
17939 ) found more than once.
17942 \begin_layout Enumerate
17946 No italic correction (
17947 \begin_inset Quotes eld
17957 \begin_inset Quotes erd
17963 \begin_layout Enumerate
17967 \begin_inset Quotes eld
17975 \begin_inset Quotes erd
17979 \begin_inset Quotes eld
17987 \begin_inset Quotes erd
17993 \begin_layout Enumerate
17996 Wrong length of dash may have been used.
17999 \begin_layout Enumerate
18003 \begin_inset Quotes eld
18011 \begin_inset Quotes erd
18015 \begin_inset Quotes eld
18023 \begin_inset Quotes erd
18029 \begin_layout Enumerate
18033 \begin_inset Quotes eld
18041 \begin_inset Quotes erd
18047 \begin_layout Enumerate
18051 \begin_inset Quotes eld
18059 \begin_inset Quotes erd
18062 to achieve an ellipsis.
18065 \begin_layout Enumerate
18068 Inter-word spacing (
18069 \begin_inset Quotes eld
18079 \begin_inset Quotes eld
18082 ) should perhaps be used.
18085 \begin_layout Enumerate
18088 Inter-sentence spacing (
18089 \begin_inset Quotes eld
18099 \begin_inset Quotes erd
18102 ) should perhaps be used.
18105 \begin_layout Enumerate
18108 Could not find argument for command.
18111 \begin_layout Enumerate
18115 \begin_inset Quotes eld
18123 \begin_inset Quotes erd
18129 \begin_layout Enumerate
18132 Math mode still on at end of LaTeX file.
18135 \begin_layout Enumerate
18139 \begin_inset Quotes eld
18147 \begin_inset Quotes erd
18150 doesn't match the number of
18151 \begin_inset Quotes eld
18159 \begin_inset Quotes erd
18165 \begin_layout Enumerate
18168 You should use either
18171 \begin_inset Quotes eld
18179 \begin_inset Quotes erd
18184 as an alternative to
18185 \begin_inset Quotes eld
18193 \begin_inset Quotes erd
18199 \begin_layout Enumerate
18206 " (ASCII 39) instead of "
18213 \begin_layout Enumerate
18216 User-specified pattern found.
18219 \begin_layout Enumerate
18222 This command might not be intended.
18225 \begin_layout Enumerate
18232 \begin_layout Enumerate
18250 \begin_layout Enumerate
18253 Delete this space to maintain correct page references.
18256 \begin_layout Enumerate
18260 You might wish to put this between a pair of
18261 \begin_inset Quotes eld
18269 \begin_inset Quotes erd
18275 \begin_layout Enumerate
18278 You ought to remove spaces in front of punctuation.
18281 \begin_layout Enumerate
18284 Could not execute LaTeX command.
18287 \begin_layout Enumerate
18296 in front of small punctuation.
18299 \begin_layout Enumerate
18307 may look prettier here.
18310 \begin_layout Enumerate
18314 Multiple spaces detected in output.
18317 \begin_layout Enumerate
18320 This text may be ignored.
18323 \begin_layout Enumerate
18329 \begin_inset Quotes eld
18334 to begin quotation, not
18341 \begin_layout Enumerate
18348 to end quotation, not
18351 \begin_inset Quotes eld
18359 \begin_layout Enumerate
18365 \begin_layout Enumerate
18368 You should perhaps use
18369 \begin_inset Quotes eld
18377 \begin_inset Quotes erd
18383 \begin_layout Enumerate
18386 You should put a space in front of/after parenthesis.
18389 \begin_layout Enumerate
18392 You should avoid spaces in front of/after parenthesis.
18395 \begin_layout Enumerate
18399 You should not use punctuation in front of/after quotes.
18402 \begin_layout Enumerate
18405 Double space found.
18408 \begin_layout Enumerate
18411 You should put punctuation outside inner/inside display math mode.
18414 \begin_layout Enumerate
18417 You ought to not use primitive TeX in LaTeX code.
18420 \begin_layout Enumerate
18423 You should remove spaces in front of
18424 \begin_inset Quotes eld
18432 \begin_inset Quotes erd
18438 \begin_layout Enumerate
18441 \begin_inset Quotes eld
18449 \begin_inset Quotes erd
18452 is normally not followed by
18453 \begin_inset Quotes eld
18461 \begin_inset Quotes erd
18467 \begin_layout Standard
18468 In later versions of LyX, we hope to provide a more complete interface to
18469 this tool (and it's smaller cousin
18473 ) to exploit the full power of it.
18474 But it's not exactly useless as it is now: go try it on one of your existing
18475 documents of a certain length and be surprised.
18478 \begin_layout Section
18479 Version Control in LyX
18482 \begin_layout Standard
18485 Lars Gullik Bjønnes
18492 \begin_layout Subsection
18496 \begin_layout Standard
18497 A friend of mine wanted to try LyX for a group project.
18498 When he didn't find support for version control or file locking, he dropped
18500 This angered me a bit, so I thought that I should at least make support
18501 for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
18502 This has now been done.
18503 LyX now supports some of the most basic RCS commands.
18504 If you need to something a bit more sophisticated you will have to do that
18505 manually in a terminal.
18508 \begin_layout Standard
18509 Before you begin to use the version control features in LyX, you should
18511 \begin_inset Quotes eld
18515 \begin_inset Quotes erd
18518 (a man file, read it with
18523 This file describes all the basic features of RCS.
18524 You should especially notice the comment about a RCS directory, and the
18525 notion of a master RCS file (the file ending in
18532 \begin_layout Standard
18533 Later basic CVS/SVN support was added.
18534 You should be familiar with CVS/SVN usage before start using it under LyX.
18535 Most of the log messages are not currently displayed after operations -
18536 you can check them in Messages pane if unsure.
18539 \begin_layout Standard
18540 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18541 package—no guarantees are made for older versions.
18544 \begin_layout Standard
18545 For introducing your own external commands consult vc-command in the manual
18549 \begin_layout Subsection
18550 RCS commands in LyX
18553 \begin_layout Standard
18554 The following sections describe the RCS commands supported by LyX.
18555 You can find them in the
18557 File\SpecialChar \menuseparator
18559 \begin_inset space ~
18565 LyX was tested against RCS 5.7.
18568 \begin_layout Subsubsection
18574 \begin_layout Standard
18575 If your document is not under revision control, this is the only item shown
18577 And if it is under revision control, the
18581 item is not visible.
18585 \begin_layout Standard
18586 This command registers your document with RCS (unless you are under the
18587 directory managed by CVS)\SpecialChar \@.
18588 You are asked interactively to supply an initial
18589 description of the document.
18590 The document is now set in Read-Only mode and you have to
18593 \begin_inset space ~
18597 \begin_inset space ~
18601 \begin_inset space ~
18606 , before making any changes to it.
18607 A document under revision control has a
18608 \begin_inset Quotes eld
18611 [RCS:<version> <locker>]
18612 \begin_inset Quotes erd
18615 item tagged to the filename in the minibuffer.
18618 \begin_layout Standard
18619 RCS command that is run:
18621 ci -q -u -i -t-"<initial description>" <file-name>
18624 \begin_layout Standard
18629 to understand the switches.
18633 \begin_layout Subsubsection
18639 \begin_layout Standard
18640 When you are finished editing a file, you check in your changes.
18641 When you do this, you are asked for a description of the changes.
18642 This is stored in the history log.
18643 The version number is bumped, your changes are applied to the master RCS
18644 file, the document is unlocked and set to Read-Only mode.
18648 \begin_layout Standard
18651 ci -q -u -m"<description>" <file-name>
18654 \begin_layout Subsubsection
18660 \begin_layout Standard
18661 By doing this you lock the document so that only you can edit it.
18662 This will also make the document Read-Write only for you.
18663 You will usually continue editing for a while and when you are finished
18664 you check in your changes.
18665 The status line is changed to reflect that you have locked the file.
18669 \begin_layout Standard
18672 co -q -l <file-name>
18675 \begin_layout Subsubsection
18678 Revert To Repository Version
18681 \begin_layout Standard
18682 This will discard all changes made to the document since the last check
18684 You get a warning before changes are discarded.
18687 \begin_layout Standard
18690 co -f -u<version> <file-name>
18693 \begin_layout Subsubsection
18699 \begin_layout Standard
18700 This makes as if the last check in never happened.
18701 No changes are made to the document loaded into LyX, but the last version
18702 is removed from the master RCS file.
18706 \begin_layout Standard
18709 rcs -o<version> <file-name>
18712 \begin_layout Subsubsection
18718 \begin_layout Standard
18719 This show the complete history of the RCS document.
18724 is shown in a browser.
18732 \begin_layout Subsubsection
18736 \begin_layout Standard
18737 LyX supports RCS version number information (only), see
18738 \begin_inset CommandInset ref
18740 reference "sub:VCS-Revision-Information"
18747 \begin_layout Subsection
18748 CVS commands in LyX
18751 \begin_layout Standard
18752 CVS is now partially supported by LyX.
18753 You can find the commands in the
18755 File\SpecialChar \menuseparator
18757 \begin_inset space ~
18763 Focus of the development moved to SVN support, so please use it instead
18764 of CVS if possible.
18767 \begin_layout Subsubsection
18773 \begin_layout Standard
18774 If your document is not under revision control, this is the only item shown
18776 And if it is under revision control, the
18783 item is not visible.
18787 \begin_layout Standard
18788 This command registers in CVS your document ONLY in case you have already
18789 the documents directory under CVS control (in particular
18794 This means you have to checkout the archive by yourself.
18798 \begin_layout Standard
18799 Then you are asked interactively to supply an initial description of the
18801 Don't forget that registered file is not yet commited.
18804 \begin_layout Standard
18805 CVS command that is run:
18808 \begin_inset Quotes erd
18812 \begin_inset Quotes eld
18816 \begin_inset Quotes erd
18822 \begin_layout Standard
18827 to understand the switches.
18831 \begin_layout Subsubsection
18837 \begin_layout Standard
18838 When you are finished editing a file, you commit your changes.
18839 When you do this, you are asked for a description of the changes.
18840 After that changes are commited.
18843 \begin_layout Standard
18846 cvs -q commit -m"<description>" "<file-name>"
18849 \begin_layout Subsubsection
18852 Revert To Repository Version
18855 \begin_layout Standard
18856 This will discard all changes made to the document since the last check
18858 You get a warning before changes are discarded.
18859 Firstly the file is deleted, secondly CVS update command is run.
18862 \begin_layout Standard
18866 \begin_inset Quotes eld
18870 \begin_inset Quotes erd
18876 \begin_layout Subsubsection
18882 \begin_layout Standard
18883 This show the complete history of the CVS document.
18887 \begin_inset Quotes eld
18891 \begin_inset Quotes erd
18896 is shown in a browser.
18899 \begin_layout Subsection
18900 SVN commands in LyX
18903 \begin_layout Standard
18904 SVN is now partially supported by LyX.
18905 You can find the commands in the
18907 File\SpecialChar \menuseparator
18909 \begin_inset space ~
18915 Please note that if you use password protected access to repository via
18916 ssh, you will be asked in terminal window.
18917 LyX was tested against SVN 1.5 and 1.6
18921 \begin_layout Plain Layout
18922 Most of the commands will work with 1.4 too, see
18923 \begin_inset CommandInset ref
18925 reference "sub:SVN-Repo-Update"
18937 \begin_layout Subsubsection
18943 \begin_layout Standard
18944 If your document is not under revision control, this is the only item shown
18946 And if it is under revision control, the
18953 item is not visible.
18957 \begin_layout Standard
18958 This command registers in SVN your document ONLY in case you have already
18959 the documents directory under SVN control (in particular
18964 This means you have to checkout the archive by yourself.
18968 \begin_layout Standard
18969 Then you are asked interactively to supply an initial description of the
18971 Don't forget that registered file is not yet commited.
18974 \begin_layout Standard
18975 SVN command that is run:
18978 \begin_inset Quotes eld
18982 \begin_inset Quotes erd
18988 \begin_layout Standard
18993 to understand the switches.
18997 \begin_layout Subsubsection
19003 \begin_layout Standard
19004 When you are finished editing a file, you commit your changes.
19005 When you do this, you are asked for a description of the changes.
19006 After that changes are commited.
19009 \begin_layout Standard
19014 \begin_layout Plain Layout
19015 In case locking is not enabled.
19017 \begin_inset CommandInset ref
19019 reference "subsec:SVN-File-Locking"
19030 svn commit -q -m"<description>" <file-name>
19033 \begin_layout Subsubsection
19039 \begin_layout Standard
19040 Updates the changes of this file from the repository.
19041 Be sure you understand SVN merging and conflicts resolving before using
19042 this function, because all conflicts has to be resolved manually by you!
19045 \begin_layout Standard
19050 \begin_layout Plain Layout
19058 svn update --non-interactive
19059 \begin_inset Quotes eld
19063 \begin_inset Quotes erd
19069 \begin_layout Subsubsection
19072 Revert To Repository Version
19075 \begin_layout Standard
19076 This will discard all changes made to the document since the last check
19078 You get a warning before changes are discarded.
19082 \begin_layout Standard
19086 \begin_inset Quotes eld
19090 \begin_inset Quotes erd
19096 \begin_layout Subsubsection
19097 \begin_inset CommandInset label
19099 name "sub:SVN-Repo-Update"
19103 Update of the local directory checkout from repository
19107 \begin_layout Plain Layout
19108 Note that this command will work only with subversion
19109 \begin_inset Formula $\geqq1.5$
19120 \begin_layout Standard
19121 All the commands above have one shortcomming - they deal with the current
19123 Once your document contains pictures, includes external
19124 \begin_inset Flex CharStyle:Code
19127 \begin_layout Plain Layout
19133 files and so on administration becomes more complicated.
19134 LyX now supports updating the whole tree in which resides the document
19138 \begin_layout Plain Layout
19139 One need to organize the files structure so that all external files are
19140 in the same directory or subdirectories of the document.
19147 This become especially useful once you cooperate with people which neither
19148 know about subversion management nor they have ambition to commit additional
19149 material to the repository.
19153 \begin_layout Standard
19154 \begin_inset Flex CharStyle:Code
19157 \begin_layout Plain Layout
19158 Update local directory from repository
19163 command updates the whole directory and in case of merge conflicts local
19164 version of the files are left, so no unintended data loss occurs.
19165 If local changes are detected user is warned before update starts.
19168 \begin_layout Labeling
19169 \labelwidthstring 00.00.0000
19171 \begin_inset space ~
19175 \begin_inset space ~
19179 \begin_inset Newline newline
19183 \begin_inset Flex CharStyle:Code
19186 \begin_layout Plain Layout
19192 (Ask if changes are detected.)
19193 \begin_inset Newline newline
19197 \begin_inset Flex CharStyle:Code
19200 \begin_layout Plain Layout
19201 svn update --accept mine-full $path
19209 \begin_layout Standard
19211 \begin_inset Flex CharStyle:Code
19214 \begin_layout Plain Layout
19220 stands for the path to the document.
19223 \begin_layout Subsubsection
19229 \begin_layout Standard
19230 This show the complete history of the SVN document.
19234 \begin_inset Quotes eld
19238 \begin_inset Quotes erd
19243 is shown in a browser.
19246 \begin_layout Subsubsection
19248 \begin_inset CommandInset label
19250 name "subsec:SVN-File-Locking"
19257 \begin_layout Standard
19258 The file exchange through various revision control systems brings the problem
19259 of merge conflicts in case two different users try to edit the same (parts
19261 When such conflict happens it needs manual resolving and one reasonable
19262 alternative is to provide some kind of locking mechanism, which guarantees
19263 that only one user is allowed to edit file at the given time.
19266 \begin_layout Standard
19267 SVN has two mechanisms to provide such kind of mutual exclusivity for file
19268 access - locks and automatical setting of write permissions (see sec.
19270 \begin_inset CommandInset ref
19272 reference "subsec:Automatical-Locking-Property"
19277 \begin_inset Flex CharStyle:Code
19280 \begin_layout Plain Layout
19290 \begin_layout Plain Layout
19291 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
19297 In a case this property is detected for a given document LyX starts to
19298 use SVN locks for document editing automatically and the whole check-in/out
19299 mechanism switches to the same regimen as for RCS.
19300 This in particular means there are two different modes how file is used
19304 \begin_layout Itemize
19306 The loaded file is in the read-only mode.
19307 For editation on needs to check-out.
19312 consists of update from repository and gaining write lock.
19313 If the lock is not possible to obtain, we remain in unlocked state.
19316 \begin_layout Itemize
19318 The loaded file is in the 'normal' edit mode.
19319 No other user is allowed to edit the file.
19324 consists of commiting changes and releasing write-lock.
19325 If no changes have been made to the document, no commit will be produced
19329 \begin_layout Plain Layout
19330 Don't be puzzled by the fact that you will be asked for commit message anyway.
19335 and only the write-lock will be released.
19338 \begin_layout Standard
19342 \begin_layout Labeling
19343 \labelwidthstring 00.00.0000
19346 svn commit -q -m"<description>" "<file-name>"
19347 \begin_inset Newline newline
19350 svn unlock "<file-name>"
19353 \begin_layout Labeling
19354 \labelwidthstring 00.00.0000
19357 svn update "<file-name>"
19358 \begin_inset Newline newline
19361 svn lock "<file-name>"
19364 \begin_layout Subsubsection
19367 \begin_inset CommandInset label
19369 name "subsec:Automatical-Locking-Property"
19375 Automatical Locking Property
19378 \begin_layout Standard
19379 The above mentioned automatical setting of write permissions of the .lyx
19380 file can be set through
19385 ile\SpecialChar \menuseparator
19391 \begin_inset space ~
19394 Control\SpecialChar \menuseparator
19399 oggle locking property
19402 This command is active only when the file is not locked on the svn server
19404 you need to check-out before proceeding).
19407 \begin_layout Labeling
19408 \labelwidthstring 00.00.0000
19410 \begin_inset space ~
19416 \begin_layout Labeling
19417 \labelwidthstring 00.00.0000
19420 svn propset svn:needs-lock ON "<file-name>"
19423 \begin_layout Labeling
19424 \labelwidthstring 00.00.0000
19427 svn propdel svn:needs-lock "<file-name>"
19430 \begin_layout Subsubsection
19431 \begin_inset CommandInset label
19433 name "sub:VCS-Revision-Information"
19437 Revision Information in Documents
19440 \begin_layout Standard
19441 There are more possibilities how to activate revision information in our
19445 \begin_layout Itemize
19446 LyX supports directly:
19450 \begin_layout Itemize
19451 tree revision information (
19452 \begin_inset Flex CharStyle:Code
19455 \begin_layout Plain Layout
19462 The result is the output of the
19463 \begin_inset Flex CharStyle:Code
19466 \begin_layout Plain Layout
19472 command, the following table gives you an idea, how to read the results.
19475 \begin_layout Standard
19477 \begin_inset Tabular
19478 <lyxtabular version="3" rows="6" columns="2">
19479 <features tabularvalignment="middle">
19480 <column alignment="center" valignment="top" width="0">
19481 <column alignment="center" valignment="top" width="0">
19483 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
19486 \begin_layout Plain Layout
19492 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
19495 \begin_layout Plain Layout
19503 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19506 \begin_layout Plain Layout
19512 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19515 \begin_layout Plain Layout
19516 mixed revision working copy
19523 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19526 \begin_layout Plain Layout
19532 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19535 \begin_layout Plain Layout
19536 modified working copy
19543 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19546 \begin_layout Plain Layout
19552 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19555 \begin_layout Plain Layout
19556 switched working copy
19563 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19566 \begin_layout Plain Layout
19572 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19575 \begin_layout Plain Layout
19576 partial working copy, from a sparse checkout
19583 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
19586 \begin_layout Plain Layout
19592 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
19595 \begin_layout Plain Layout
19596 mixed revision, modified, switched working copy
19609 \begin_layout Itemize
19610 file revision information.
19611 The result comes from parsing the output of
19612 \begin_inset Flex CharStyle:Code
19615 \begin_layout Plain Layout
19617 \begin_inset space ~
19621 \begin_inset space ~
19625 \begin_inset space ~
19634 Supported flags are:
19638 \begin_layout Itemize
19639 version number of the last commit (
19640 \begin_inset Flex CharStyle:Code
19643 \begin_layout Plain Layout
19652 \begin_layout Itemize
19653 author of the last commit (
19654 \begin_inset Flex CharStyle:Code
19657 \begin_layout Plain Layout
19666 \begin_layout Itemize
19667 date of the last commit (
19668 \begin_inset Flex CharStyle:Code
19671 \begin_layout Plain Layout
19680 \begin_layout Itemize
19681 time of the last commit (
19682 \begin_inset Flex CharStyle:Code
19685 \begin_layout Plain Layout
19695 \begin_layout Standard
19696 You can obtain this info via InsetInfo (e.g.
19698 \begin_inset Flex CharStyle:Code
19701 \begin_layout Plain Layout
19702 info-insert buffer vcs-date
19708 The information will be available only when you have the file stored under
19709 svn managment (i.e.
19711 \begin_inset Flex CharStyle:Code
19714 \begin_layout Plain Layout
19720 directory is available with your document).
19724 \begin_layout Itemize
19725 Another---a hacking one---possibility is to use svn keywords
19729 \begin_layout Plain Layout
19730 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
19736 In short -- you set file keywords property (e.g.
19739 svn propset svn:keywords 'Rev' file.lyx
19741 ) and then paste keyword ERT
19745 \begin_layout Plain Layout
19746 This is an easy way how to ensure that LyX won't break the line in the middle
19752 tag in your document (e.g.
19757 \begin_layout Plain Layout
19765 This way svn client will automatically substitute revision number (e.g.
19770 \begin_layout Plain Layout
19777 ) after each update and commit.
19778 There are more problems with this approach.
19779 Firstly, the '$' character is used in TeX world for math equations, so
19780 any occurence of math formula
19781 \begin_inset Formula $Rev$
19785 \begin_inset Formula $Rev:59$
19788 in your LyX document.
19789 Similarly for other keywords like Id, Date, Author, etc.
19790 Secondly svn output is dependent on your locales, so its very easy that
19791 svn would produce some problematic strings once Date is used.
19792 Thirdly you get the whole 'Rev: 59' string in your document instead of
19794 Until subversion implements user's custom keywords it will be hard to use
19795 this approach reliably or let LyX to support it directly.
19798 \begin_layout Subsection
19799 SVN and Windows Environment
19802 \begin_layout Quote
19803 My inclination is to say that if the user cannot figure out the command
19804 line operations on their own fairly quickly, they would be well advised
19805 to use TortoiseSVN.
19811 \begin_layout Subsubsection
19815 \begin_layout Standard
19816 In addition to installing LyX, and having access to a Subversion repository,
19817 the user will need to install the Subversion client program.
19818 A Windows installer for the client program is available from
19819 \begin_inset CommandInset href
19822 target "http://www.collab.net/nonav/downloads/subversion/"
19827 The user may also want to install
19828 \begin_inset CommandInset href
19831 target "http://tortoisesvn.tigris.org/"
19835 , which integrates Subversion operations into the context (rightclick) menu
19836 of Windows Explorer.
19837 Operations done outside LyX will typically be more convenient using the
19838 Explorer context menu.
19839 Note that TortoiseSVN is not a replacement for the client program, which
19840 is what LyX itself will use.
19843 \begin_layout Subsubsection
19844 Bringing a document under Subversion control
19847 \begin_layout Standard
19848 Before a LyX document can be brought under version control in Subversion,
19849 its parent directory needs to be under version control.
19850 If the document is being added to a project already in the repository,
19851 this is accomplished by checking the project out to the directory where
19852 the new document will be placed.
19853 If the project itself is not yet under version control (for instance, if
19854 this document starts a new project), the directory must be imported into
19856 This is done outside LyX.
19857 Both import and checkout are easily accomplished from the Explorer context
19858 menu using TortoiseSVN, or alternatively can be done using the command
19859 line client at a DOS prompt.
19860 The procedure for importing the project using TortoiseSVN is described
19861 below, assuming an existing repository and a new project being started
19869 For information on using the Subversion client program, run
19876 \begin_layout Enumerate
19883 in Windows Explorer, right click it, and select
19885 TortoiseSVN > Repo-browser
19888 If necessary, adjust the URL for the repository, then click OK.
19891 \begin_layout Enumerate
19892 Right click the level of the repository under which you want to place the
19893 new project folder (typically the top level) and click
19895 Create folder\SpecialChar \ldots{}
19898 Supply a name for the project folder and click OK.
19899 Add a message for the log file if desired, then click OK again.
19900 The new project folder should appear in the repository.
19901 Finally, click OK again to exit the repository browser.
19904 \begin_layout Enumerate
19905 Once again right click
19911 , this time selecting SVN Checkout\SpecialChar \ldots{}
19912 Select the URL of the project folder
19913 you just created in the repository, and set the checkout directory to
19921 You will be warned about a non-empty folder; click OK to proceed.
19922 You should now have a
19933 \begin_layout Enumerate
19934 Create or open your document in LyX and click
19939 ile\SpecialChar \menuseparator
19945 \begin_inset space ~
19948 Control\SpecialChar \menuseparator
19956 Add a log message and click OK to commit the document to version control.
19959 \begin_layout Standard
19960 From this point onward, you should have full functionality in the
19965 ile\SpecialChar \menuseparator
19971 \begin_inset space ~
19977 You also have the option of checking the document in and out, viewing its
19979 using the TortoiseSVN context menu in Windows Explorer or the Subversion
19980 client program from a command prompt.
19983 \begin_layout Subsubsection
19984 SSH tunel used with SVN under Windows
19987 \begin_layout Standard
19988 Compared to linux setting svn client to communicate over ssh under Windows
19989 is rather troublesome task.
19990 We will at least make some hints how to setup client side but former knowledge
19991 about ssh and Windows command line is needed, also be prepared for a great
19992 deal of frustration...
19995 \begin_layout Enumerate
19996 Get svn client for windows, as described in previous sections.
19997 When it is fresh install run some svn command (e.g.
19999 \begin_inset Flex CharStyle:Code
20002 \begin_layout Plain Layout
20008 ) to have created config files, which you will need to change later on.
20011 \begin_layout Enumerate
20012 Choose ssh client for Windows.
20013 There are more possibilities, we will use the one from Putty tools
20017 \begin_layout Plain Layout
20018 \begin_inset Flex URL
20021 \begin_layout Plain Layout
20023 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20034 You will need to automatize connection, so client doesn't ask for any password
20036 To keep things easy we will use only keys without any additional password
20041 \begin_layout Enumerate
20043 \begin_inset Flex CharStyle:Code
20046 \begin_layout Plain Layout
20053 Save your private .ppk key file and put the public one on the server side.
20054 In case the SVN server runs on linux, note that the format of the public
20055 key is not compatible with linux openssh and you will need to direcly copy-past
20056 e the key from the “
20058 Public key for pasting into OpenSSH authorized_keys file
20060 :” edit field into the server's
20061 \begin_inset Flex CharStyle:Code
20064 \begin_layout Plain Layout
20065 ~/.ssh/authorized_keys
20071 \begin_inset Flex CharStyle:Code
20074 \begin_layout Plain Layout
20083 \begin_layout Enumerate
20085 \begin_inset Flex CharStyle:Code
20088 \begin_layout Plain Layout
20095 In the SVN config file
20099 \begin_layout Plain Layout
20100 Exact path depends on Windows version, usually somewhere around
20101 \begin_inset Flex CharStyle:Code
20104 \begin_layout Plain Layout
20107 Documents and Settings
20121 \begin_inset Flex CharStyle:Code
20124 \begin_layout Plain Layout
20139 , section [tunnels], setup ssh command, e.g.
20141 \begin_inset Flex CharStyle:Code
20144 \begin_layout Plain Layout
20145 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20154 \begin_layout Plain Layout
20155 It will usually take a lot of time to get exact command right and it depends
20157 For example do not have some remote server saved as a default session in
20159 If things fail, try to connect via plink without SVN first.
20168 \begin_layout Enumerate
20169 Checkout the SVN archive, e.g.
20171 \begin_inset Flex CharStyle:Code
20174 \begin_layout Plain Layout
20175 svn co svn+ssh://user@server/repository_path
20183 \begin_layout Subsection
20187 \begin_layout Standard
20188 With the recent addition of the vc-command function LyX power users are
20189 allowed to create their own commands for revision control.
20192 \begin_layout Standard
20193 As an example you can see how two TortoiseSVN commands could be integrated
20197 \begin_layout Description
20199 \begin_inset Flex CharStyle:Code
20202 \begin_layout Plain Layout
20203 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
20211 \begin_layout Description
20213 \begin_inset Flex CharStyle:Code
20216 \begin_layout Plain Layout
20217 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
20225 \begin_layout Section
20226 Literate Programming
20229 \begin_layout Standard
20234 (kayvan@sylvan.com)
20238 original documentation written by
20240 Edmar Wienskoski Jr.
20243 (edmar-w-jr@technologist.com)
20246 \begin_layout Subsection
20250 \begin_layout Standard
20251 The main purpose of this documentation is to show you how to use LyX for
20252 literate programming.
20253 Where it is assumed that you are familiar with this programming technique,
20255 \begin_inset Quotes eld
20259 \begin_inset Quotes erd
20263 \begin_inset Quotes eld
20267 \begin_inset Quotes erd
20271 If that is not the case, please follow the web links provided in the following
20273 There is a lot of good documentation out there covering old development
20274 history to the latest tools tips.
20277 \begin_layout Standard
20278 It is also assumed that you are familiar with LyX itself to a point that
20279 you are comfortable changing your LyX preferences, and X resources file.
20280 If that is not the case please refer to other LyX documentation to cover
20281 your specific needs.
20284 \begin_layout Subsection
20285 Literate Programming
20288 \begin_layout Standard
20289 From the Literate Programming FAQ:
20292 \begin_layout Quotation
20293 Literate programming is the combination of documentation and source together
20294 in a fashion suited for reading by human beings.
20295 In fact, literate programs should be enjoyable reading, even inviting!
20296 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
20297 and documentation in a single file.
20298 Literate programming tools then parse the file to produce either readable
20299 documentation or compilable source.
20300 The WEB style of literate programming was created by D.
20301 \begin_inset space \thinspace{}
20305 Knuth during the development of his TeX typesetting software.
20309 \begin_layout Standard
20310 Another excerpt says:
20313 \begin_layout Quotation
20316 How is literate programming different from verbose commenting?
20319 \begin_layout Quotation
20320 There are three distinguishing characteristics.
20321 In order of importance, they are:
20325 \begin_layout Itemize
20326 flexible order of elaboration
20329 \begin_layout Itemize
20330 automatic support for browsing
20333 \begin_layout Itemize
20334 typeset documentation, especially diagrams and mathematics
20338 \begin_layout Standard
20339 Now that I sparked your curiosity, take a look in the references.
20342 \begin_layout Subsubsection
20346 \begin_layout Standard
20347 The complete Literate Programming FAQ can be found at:
20350 \begin_layout Quote
20351 Literate Programming FAQ
20352 \begin_inset Flex URL
20355 \begin_layout Plain Layout
20357 http://shelob.ce.ttu.edu/daves/lpfaq/faq.html
20365 \begin_layout Standard
20366 The FAQ lists 23 (twenty three!) different literate programming tools.
20367 Where some are specialized or
20368 \begin_inset Quotes eld
20372 \begin_inset Quotes erd
20375 for particular programming languages, while other have general scope.
20380 for my own use for several reasons:
20383 \begin_layout Itemize
20384 It can generate the documentation either in LaTeX or HTML.
20387 \begin_layout Itemize
20388 It has a open architecture, i.
20389 \begin_inset space \thinspace{}
20393 \begin_inset space \space{}
20396 it is easy to plug in new filters and to perform special processing that
20401 \begin_layout Itemize
20402 There is a good selection of filters available already (the HTML is one
20406 \begin_layout Itemize
20410 \begin_layout Standard
20411 The Noweb web page can be found at:
20414 \begin_layout Quote
20416 \begin_inset Flex URL
20419 \begin_layout Plain Layout
20421 http://www.cs.virginia.edu/~nr/noweb/
20429 \begin_layout Standard
20430 Starting from there you can reach many other interesting links and even
20431 some literate program examples.
20434 \begin_layout Subsection
20435 LyX and Literate Programming
20438 \begin_layout Standard
20439 The LyX support for Literate Programming is provided by using the generic
20440 LyX converters mechanism.
20441 This support is provided in a
20442 \begin_inset Quotes eld
20446 \begin_inset Quotes erd
20450 \begin_inset space \thinspace{}
20454 \begin_inset space \space{}
20457 you will be able to use this new LyX feature with some other literate programmin
20458 g tool of your choice by just changing your LyX preferences.
20461 \begin_layout Subsubsection
20462 Generating documents and code (weaving and tangling)
20465 \begin_layout Paragraph
20466 Selecting the document class
20469 \begin_layout Standard
20470 If you have installed Noweb and LyX successfully, whenever you open a new
20471 document or try to change the document class of an existing one, you will
20472 find that there are three new document classes available:
20475 \begin_layout Itemize
20479 \begin_layout Itemize
20483 \begin_layout Itemize
20487 \begin_layout Standard
20488 You must select one of them to create your literate documents from.
20492 \begin_layout Standard
20493 Note that literate documents are not limited to these three classes.
20494 New classes can be generated from other styles like letter or in combination
20495 with other class variations like Article (AMS).
20496 If you have special needs that cannot be covered by one of the existing
20497 classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
20498 will arrange to insert a new entry, or teach you how to do it.
20502 \begin_layout Plain Layout
20503 It is very simple, it involves the creation of a file with four lines, and
20504 re-running of the auto configuration.
20509 Moreover, if you use a literate tool other than Noweb you may need to create
20510 a new set of document classes for it.
20513 \begin_layout Paragraph
20517 \begin_layout Standard
20518 LyX enables you to write code with a layout named
20526 \begin_layout Plain Layout
20527 The equivalent Noweb term is
20528 \begin_inset Quotes eld
20532 \begin_inset Quotes erd
20536 For historical reasons, I got used to the term
20537 \begin_inset Quotes eld
20541 \begin_inset Quotes erd
20544 introduced by other literate tool named Nuweb, which I used for many years
20545 before rendering myself to Noweb.
20550 Noweb delimits scraps like this:
20553 \begin_layout LyX-Code
20557 \begin_layout LyX-Code
20561 \begin_layout LyX-Code
20565 \begin_layout LyX-Code
20569 \begin_layout LyX-Code
20573 \begin_layout Standard
20574 The problem is that whatever is written in between the << and the
20578 must be taken literally, i.
20579 \begin_inset space \thinspace{}
20583 \begin_inset space \space{}
20586 LyX should be prevented from making any special interpretation of what has
20588 This is handled by a special layout named Scrap, that works like a normal
20589 paragraph but has a free spacing capability.
20592 \begin_layout Standard
20593 The down side of the Scrap paragraph layout is that consecutive paragraphs
20594 of code will be spaced with one empty line in the source code and also
20595 in the printed documentation.
20596 The work around is to enter each line of code within a single Scrap, with
20597 a newline (ctrl-return).
20598 The example above will look like this:
20602 \begin_layout Plain Layout
20603 If you have a printed version of this document you will not see any difference
20604 between the previous example and this one.
20612 \begin_layout LyX-Code
20614 \begin_inset Newline newline
20618 \begin_inset Newline newline
20622 \begin_inset Newline newline
20626 \begin_inset Newline newline
20632 \begin_layout Standard
20633 This layout works fine.
20634 The only real inconvenience is that you have to type ctrl-return instead
20639 \begin_layout Plain Layout
20640 It is in my list of
20641 \begin_inset Quotes eld
20645 \begin_inset Quotes erd
20656 \begin_layout Standard
20657 As a special note, you can also use the
20658 \begin_inset Quotes eld
20662 \begin_inset Quotes erd
20665 construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
20669 \begin_layout LyX-Code
20671 \begin_inset Newline newline
20674 def some_function(args):
20675 \begin_inset Newline newline
20678 "This is the doc string for this function."
20679 \begin_inset Newline newline
20682 print "My args: ", args
20685 \begin_layout LyX-Code
20686 @ %def some_function
20689 \begin_layout Standard
20690 For an example of this usage and the resulting cross-reference output, look
20691 at the Literate python program in
20693 LIBDIR/examples/listerrors.lyx
20695 which should make this all clear.
20698 \begin_layout Paragraph
20699 Generating the documentation
20702 \begin_layout Standard
20703 At this point you already have a new document file with a proper document
20704 class, and with some code and text on it.
20705 How do I print it? The answer is simple, you select
20707 View\SpecialChar \menuseparator
20711 Just like you would do for a plain document.
20712 No special procedure is required.
20715 \begin_layout Standard
20716 To help orientate you, I will now explain what happens inside LyX:
20719 \begin_layout Enumerate
20722 Update\SpecialChar \menuseparator
20725 menu option is chosen, a LaTeX file is generated.
20730 \begin_layout Standard
20731 If the document is of any literate class the generated file will be named
20732 with an extension name defined by the
20733 \begin_inset Quotes eld
20737 \begin_inset Quotes erd
20740 format (defined in the Preferences panel), otherwise the file will have
20749 \begin_layout Enumerate
20750 Note that the only difference so far is in the name of the file, no special
20751 processing is required by LyX.
20752 Given that you formatted the code using the Scrap layout that, by itself,
20753 takes care of the business.
20756 \begin_layout Enumerate
20757 If the document is of any literate class LyX will then use the internal
20758 LyX to Noweb converter, followed by the Noweb to LaTeX converter
20762 \begin_layout Plain Layout
20763 The converters are defined in the
20765 Tools\SpecialChar \menuseparator
20769 \begin_inset Quotes eld
20773 \begin_inset Quotes erd
20785 manual for general information about converters.
20790 to generate the LaTeX file.
20794 \begin_layout Standard
20795 Otherwise it will just skip this step.
20799 \begin_layout Enumerate
20800 Finally, LaTeX is invoked and the regular post processing continues as in
20804 \begin_layout Standard
20805 Independence from a particular
20806 \begin_inset Quotes eld
20810 \begin_inset Quotes erd
20813 is easily achieved by changing the commands that are run by the various
20817 \begin_layout Paragraph
20818 Generating the code
20821 \begin_layout Standard
20822 When the build menu option is chosen or the corresponding button in the
20823 toolbar is pressed, a LaTeX file is generated just like step 1 above.
20824 Next, LyX invokes the
20829 This converter needs to be defined by the user and is not installed by
20830 default, though the Program format is.
20831 This converter (like any other converter) will have two parts:
20834 \begin_layout Enumerate
20835 The converter program itself.
20836 This program performs the conversion from the one format to the other (in
20837 this case, from the Noweb format to the Program pseudo-format).
20840 \begin_layout Enumerate
20841 The error log parser.
20842 This is a program whose sole purpose is to rewrite error messages in a
20843 format that LyX understands.
20844 This makes it possible for LyX to place error boxes in the right places
20845 in the file buffer.
20848 \begin_layout Standard
20849 The first part, the
20850 \begin_inset Quotes eld
20854 \begin_inset Quotes erd
20857 setting, should be set to
20858 \begin_inset Quotes eld
20866 \begin_inset Quotes erd
20870 This basically means that LyX will call
20871 \begin_inset Quotes eld
20875 \begin_inset Quotes erd
20878 (a program or script) with the name of the Noweb file (normally a file
20879 in the LyX temp directory).
20883 \begin_layout Standard
20884 This is an implementation of
20885 \begin_inset Quotes eld
20889 \begin_inset Quotes erd
20892 that you can place in a directory on your path:
20895 \begin_layout LyX-Code
20899 \begin_layout LyX-Code
20903 \begin_layout LyX-Code
20904 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
20907 \begin_layout Standard
20908 The next part of the converter setting is the
20909 \begin_inset Quotes eld
20913 \begin_inset Quotes erd
20916 which is to be set to
20917 \begin_inset Quotes eld
20922 parselog=listerrors
20925 \begin_inset Quotes erd
20929 This will run any errors that are generated by the
20930 \begin_inset Quotes eld
20934 \begin_inset Quotes erd
20937 process through the
20938 \begin_inset Quotes eld
20942 \begin_inset Quotes erd
20948 \begin_layout Standard
20949 The converter code looks in
20957 then on the path for the
20958 \begin_inset Quotes eld
20962 \begin_inset Quotes erd
20968 \begin_layout Standard
20969 The build will normally take place in LyX's temporary directory, so the
20970 files produced by the conversion will be in that directory.
20971 LyX will copy out what it regards as the `main' file, but the
20975 conversion may produce several files, and so most of these would then be
20976 deleted when LyX was closed.
20977 The present solution is to use a `copier',
20981 \begin_layout Plain Layout
20990 manual for information on these.
20999 script in its default mode, so that the entire contents of the temporary
21000 directory is copied.
21001 More will get copied than is needed, to be sure, but nothing will be lost.
21002 If, however, you know what extensions the generated files will have, this
21003 can be improved by using the
21012 This option takes a comma-separated list of extensions to copy.
21013 So, for example, if the conversion will generate only files with the extensions
21022 , then the correct definition would be:
21025 \begin_layout LyX-Code
21026 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
21029 \begin_layout Standard
21030 The result will be that only files with these two extensions will be copied
21034 \begin_layout Paragraph
21035 Build instructions in the document
21038 \begin_layout Standard
21039 The last piece of the integration between LyX and noweb is the
21040 \begin_inset Quotes eld
21044 \begin_inset Quotes erd
21048 Generally, the instructions for building your program should be embedded
21049 in a scrap of its own.
21051 \begin_inset Quotes eld
21055 \begin_inset Quotes erd
21058 above uses the notangle command to look for this scrap (called
21059 \begin_inset Quotes eld
21063 \begin_inset Quotes erd
21066 ) and runs its contents through
21067 \begin_inset Quotes eld
21071 \begin_inset Quotes erd
21077 \begin_layout Standard
21078 Typically, such a scrap would look something like this:
21081 \begin_layout LyX-Code
21083 \begin_inset Newline newline
21087 \begin_inset Newline newline
21091 \begin_inset Newline newline
21094 if [ -z "${NOWEB_SOURCE}" ]
21095 \begin_inset Newline newline
21099 \begin_inset Newline newline
21102 NOWEB_SOURCE=myfile.nw
21103 \begin_inset Newline newline
21107 \begin_inset Newline newline
21111 code to extract files ...]
21112 \begin_inset Newline newline
21116 code to compile files ...]
21117 \begin_inset Newline newline
21123 \begin_layout Standard
21126 LIBDIR/examples/listerrors.lyx
21130 LIBDIR/examples/Literate.lyx
21132 which implement two versions of the
21133 \begin_inset Quotes eld
21137 \begin_inset Quotes erd
21140 program for some illustrations of how all of these pieces go together or
21143 LIBDIR/examples/noweb2lyx.lyx.
21146 Interestingly, these three files show off the language-indepence of the
21147 LyX literate programming support since they are written in Python, C and
21151 \begin_layout Subsubsection
21155 \begin_layout Standard
21156 All the Literate Programming support is configured by the
21158 Tools\SpecialChar \menuseparator
21162 \begin_inset Quotes eld
21166 \begin_inset Quotes erd
21170 The important parts are:
21173 \begin_layout Description
21175 \begin_inset space ~
21179 \begin_inset Quotes eld
21183 \begin_inset Quotes erd
21187 \begin_inset space ~
21190 format Set up via the Formats tab, this is where the Noweb-specific pieces
21200 , the file extension is set to
21205 This tells LyX to create a file with a
21209 extension in the first step of the conversion process.
21212 \begin_layout Description
21214 \begin_inset space ~
21222 \begin_inset space ~
21225 format This is an empty format whose sole purpose is to be the endpoint
21226 of a conversion (which then allows us to set up a converter for it).
21229 \begin_layout Description
21238 This converter performs the
21239 \begin_inset Quotes eld
21243 \begin_inset Quotes erd
21246 of the literate document.
21247 For Noweb, it is set to
21248 \begin_inset Quotes eld
21253 noweave -delay -index $$i > $$o
21256 \begin_inset Quotes erd
21262 \begin_layout Description
21272 \begin_inset Quotes eld
21276 \begin_inset Quotes erd
21280 As stated above, the Converter is set to
21281 \begin_inset Quotes eld
21289 \begin_inset Quotes erd
21292 , with Flags set to
21293 \begin_inset Quotes eld
21298 originaldir,parselog=listerrors
21301 \begin_inset Quotes erd
21307 \begin_layout Subsubsection
21311 \begin_layout Standard
21312 There is also a new function implemented in the LyX server, the
21313 \begin_inset Quotes eld
21316 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
21320 \begin_layout Standard
21321 When debugging code with ddd/gdb, it is possible to invoke a text editor
21322 at the current execution position with a single key stroke.
21323 The default ddd configuration for that is shift-ctrl-V.
21324 It happens that you can define the editor command line invocation in ddd
21327 Edit\SpecialChar \menuseparator
21328 Preferences\SpecialChar \menuseparator
21331 dialog and changing the "Edit Sources" entry.
21334 \begin_layout Standard
21335 I take advantage of the new created LyX server function and this ddd feature,
21337 \begin_inset Quotes eld
21341 \begin_inset Quotes erd
21347 \begin_layout LyX-Code
21348 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
21351 \begin_layout Standard
21352 With this, whenever you are using ddd and find a point in the program that
21353 you want to edit, you just press shift-ctrl-V (in the ddd window), and
21354 ddd you forward this information to LyX through the LyX server and then
21355 the LyX window will show the same file with the cursor at the same position
21356 ddd was pointing to.
21357 No more guessing or long scrolling to locate a point in the program back
21361 \begin_layout Standard
21362 Note however that you must enable the LyX server to get this feature working
21363 (it is disabled by default).
21364 You can enable it in
21376 ) by entering in the
21381 \begin_inset Quotes eld
21386 /home/<your-home-directory>/.lyx/lyxpipe
21389 \begin_inset Quotes erd
21395 \begin_layout Standard
21396 Read the LyX server documentation in the
21398 Customization Manual
21400 for further information.
21403 \begin_layout Subsubsection
21407 \begin_layout Standard
21408 There are six new buttons that can be added to your LyX toolbar.
21409 Five of these buttons are short cuts to layout styles:
21430 The last one is a short cut to the
21431 \begin_inset Quotes eld
21435 \begin_inset Quotes erd
21442 \begin_layout Standard
21443 LyX has a range of buttons that are available for tool bar customization.
21444 In my toolbar I like to combine the six short cuts above with two more:
21449 \SpecialChar \menuseparator
21454 \SpecialChar \menuseparator
21461 View\SpecialChar \menuseparator
21465 Here is how it looks like:
21468 \begin_layout LyX-Code
21472 \begin_layout LyX-Code
21476 \begin_layout LyX-Code
21477 Icon "layout Standard"
21480 \begin_layout LyX-Code
21481 Icon "layout Section"
21484 \begin_layout LyX-Code
21485 Icon "layout LaTeX"
21488 \begin_layout LyX-Code
21489 Icon "layout LyX-Code"
21492 \begin_layout LyX-Code
21493 Icon "layout Scrap"
21496 \begin_layout LyX-Code
21500 \begin_layout LyX-Code
21504 \begin_layout LyX-Code
21505 Icon "buffer-typeset"
21508 \begin_layout LyX-Code
21509 Icon "build-program"
21512 \begin_layout LyX-Code
21516 \begin_layout LyX-Code
21520 \begin_layout LyX-Code
21524 \begin_layout LyX-Code
21528 \begin_layout LyX-Code
21532 \begin_layout Subsubsection
21533 Colors customization
21536 \begin_layout Standard
21537 There are a number of colors in LyX that can be customized in
21542 One of the things that bothers people is the LaTeX font color.
21543 The default color is red, since the scraps uses LaTeX font, and there is
21544 a lot of scraps in literate documents, you may get tired of seeing everything
21546 You can change it by going to the tabs
21555 \begin_layout Standard
21556 The next thing is the visible presence of the newline character in the screen.
21557 You can choose the color of this particular character and make it blend
21559 I recommend you choosing a color that is close to the background but not
21560 equal, that way you still can see it is there, but it is not bothering
21565 \begin_layout Chapter
21566 Secrets of the LaTeX Masters
21567 \begin_inset CommandInset label
21576 \begin_layout Standard
21577 Though LyX is a powerful tool, it cannot hope to support everything that
21578 can be done with pure TeX/LaTeX.
21579 However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
21580 as long as you are not afraid to use that
21581 \begin_inset Quotes eld
21585 \begin_inset Quotes erd
21588 button on the toolbar or add things to the LaTeX preamble.
21589 This section lists some tips, tricks, and otherwise cool ideas to give
21590 your document that extra little flair.
21593 Do try this at home
21595 , just start with something a little smaller and less important than your
21599 \begin_layout Standard
21600 Most ideas in this section require less common files in your LaTeX installation.
21601 If you have a system like teTeX, most will already be available.
21602 A few, however, will need to be downloaded from one of the CTAN archives.
21603 Often, there are several ways to do something, or several LaTeX style files
21604 which do the same thing.
21605 We do not endorse one choice over another, we simply claim that we have
21606 done a particular task with a particular file.
21607 Put on your wizard hat, keep an eye out for dragons, and let us begin.
21610 \begin_layout Section
21614 \begin_layout Standard
21617 Lars Gullik Bjønnes
21620 \begin_layout Subsection
21624 \begin_layout Standard
21625 The aim for this chapter
21629 \begin_layout Plain Layout
21630 Editor's note: Lars' original chapter was a masterful description of how
21636 However, it was too long to flow smoothly in this document.
21637 I have therefore chosen to excerpt the most important sections here (sorry,
21638 Lars); you can read the original chapter (and more of the story!) in the
21641 examples/multicol.lyx
21649 is to show how the LaTeX package
21653 can be used in a LyX document.
21654 As LyX doesn't support the
21658 package natively yet, we have to use some small hacks.
21659 By reading this section it should be obvious how to do this.
21662 \begin_layout Subsection
21666 \begin_layout Standard
21671 package allows switching between one and multicolumn format on the same
21673 Footnotes are handled correctly (for the most part), but will be placed
21674 at the bottom of the page and not under each column.
21675 LaTeX's float mechanism, however, is partly disabled in the current implementat
21677 At the moment only page-wide floats can be used within the scope of the
21681 \begin_layout Subsection
21685 \begin_layout Subsubsection
21689 \begin_layout Standard
21690 If you want to have two columns in your text, you have use LaTeX mode to
21695 begin{multicols}{2}
21697 at the point where you want the two column layout to start, and then
21703 where you want it to end.
21707 \begin_layout Standard
21711 \begin_layout Plain Layout
21715 begin{multicols}{2}
21723 \begin_layout Standard
21728 The Adventure of the Empty House
21731 \begin_inset Newline newline
21736 Sir Arthur Conan Doyle
21739 \begin_layout Standard
21742 It was in the spring of the year 1894 that all London was interested, and
21743 the fashionable world dismayed, by the murder of the Honourable Ronald
21744 Adair under most unusual and inexplicable circumstances.
21745 The public has already learned those particulars of the crime which came
21746 out in the police investigation, but a good deal was suppressed upon that
21747 occasion, since the case for the prosecution was so overwhelmingly strong
21748 that it was not necessary to bring forward all the facts.
21749 Only now, at the end of nearly ten years, am I allowed to supply those
21750 missing links which make up the whole of that remarkable chain.
21751 The crime was of interest in itself, but that interest was as nothing to
21752 me compared to the inconceivable sequel, which afforded me the greatest
21753 shock and surprise of any event in my adventurous life.
21754 Even now, after this long interval, I find myself thrilling as I think
21755 of it, and feeling once more that sudden flood of joy, amazement, and increduli
21756 ty which utterly submerged my mind.
21757 Let me say to that public, which has shown some interest in those glimpses
21758 which I have occasionally given them of the thoughts and actions of a very
21759 remarkable man, that they are not to blame me if I have not shared my knowledge
21760 with them, for I should have considered it my first duty to do so, had
21761 I not been barred by a positive prohibition from his own lips, which was
21762 only withdrawn upon the third of last month.
21765 \begin_layout Standard
21769 \begin_layout Plain Layout
21781 \begin_layout Subsubsection
21785 \begin_layout Standard
21786 The same pattern is used when you want more than two columns:
21789 \begin_layout Standard
21793 \begin_layout Plain Layout
21797 begin{multicols}{3}
21805 \begin_layout Standard
21808 It can be imagined that my close intimacy with Sherlock Holmes had interested
21809 me deeply in crime, and that after his disappearance I never failed to
21810 read with care the various problems which came before the public.
21811 And I even attempted, more than once, for my own private satisfaction,
21812 to employ his methods in their solution, though with indifferent success.
21813 There was none, however, which appealed to me like this tragedy of Ronald
21815 As I read the evidence at the inquest, which led up to a verdict of willful
21816 murder against some person or persons unknown, I realized more clearly
21817 than I had ever done the loss which the community had sustained by the
21818 death of Sherlock Holmes.
21819 There were points about this strange business which would, I was sure,
21820 have specially appealed to him, and the efforts of the police would have
21821 been supplemented, or more probably anticipated, by the trained observation
21822 and the alert mind of the first criminal agent in Europe.
21823 All day, as I drove upon my round, I turned over the case in my mind and
21824 found no explanation which appeared to me to be adequate.
21825 At the risk of telling a twice-told tale, I will recapitulate the facts
21826 as they were known to the public at the conclusion of the inquest.
21829 \begin_layout Standard
21833 \begin_layout Plain Layout
21845 \begin_layout Standard
21846 You can have more than 3 columns if you want to, but that might not be very
21847 pleasant for the eye.
21850 \begin_layout Subsubsection
21851 Columns inside columns
21854 \begin_layout Standard
21855 You can even have columns inside columns:
21858 \begin_layout Standard
21862 \begin_layout Plain Layout
21866 begin{multicols}{2}
21874 \begin_layout Standard
21877 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
21878 at that time governor of one of the Australian colonies.
21879 Adair's mother had returned from Australia to undergo the operation for
21880 cataract, and she, her son Ronald, and her daughter Hilda were living together
21884 \begin_layout Standard
21888 \begin_layout Plain Layout
21892 begin{multicols}{2}
21900 \begin_layout Standard
21903 The youth moved in the best society–had, so far as was known, no enemies
21904 and no particular vices.
21905 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
21906 had been broken off by mutual consent some months before, and there was
21907 no sign that it had left any very profound feeling behind it.
21908 For the rest {sic} the man's life moved in a narrow and conventional circle,
21909 for his habits were quiet and his nature unemotional.
21910 Yet it was upon this easy-going young aristocrat that death came, in most
21911 strange and unexpected form, between the hours of ten and eleven-twenty
21912 on the night of March 30, 1894.
21915 \begin_layout Standard
21919 \begin_layout Plain Layout
21931 \begin_layout Standard
21934 Ronald Adair was fond of cards–playing continually, but never for such stakes
21936 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
21937 It was shown that, after dinner on the day of his death, he had played
21938 a rubber of whist at the latter club.
21939 He had also played there in the afternoon.
21944 The evidence of those who had played with him– Mr.
21945 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
21946 and that there was a fairly equal fall of the cards.
21947 Adair might have lost five pounds, but not more.
21948 His fortune was a considerable one, and such a loss could not in any way
21950 He had played nearly every day at one club or other, but he was a cautious
21951 player, and usually rose a winner.
21952 It came out in evidence that, in partnership with Colonel Moran, he had
21953 actually won as much as four hundred and twenty pounds in a sitting, some
21954 weeks before, from Godfrey Milner and Lord Balmoral.
21955 So much for his recent history as it came out at the inquest.
21958 \begin_layout Standard
21962 \begin_layout Plain Layout
21974 \begin_layout Standard
21975 Please do read the file
21977 examples/multicol.lyx
21979 for more advanced examples including column and header spacing, vertical
21980 separator lines, and more.
21983 \begin_layout Section
21988 Paragraph Environment
21989 \begin_inset OptArg
21992 \begin_layout Plain Layout
21993 Numbering in Enumerate
22001 \begin_layout Standard
22007 \begin_layout Standard
22008 \begin_inset VSpace bigskip
22014 \begin_layout Standard
22016 The default numbering for the
22020 paragraph environment begins with Arabic numbers and ends with uppercase
22022 Suppose, however, you wanted a different type of numbering scheme.
22023 Here's a quickie example of how to change the numbering scheme:
22026 \begin_layout LyX-Code
22036 \begin_layout LyX-Code
22046 \begin_layout LyX-Code
22056 \begin_layout LyX-Code
22066 \begin_layout Standard
22067 \SpecialChar \ldots{}
22068 which changes the numbering scheme to uppercase Roman numerals, uppercase
22069 letters, Arabic numbers, and lowercase letter.
22072 \begin_layout Standard
22073 Additionally, the previous example also adds a little bit extra to the numbering
22075 For example, the first level label actually looks like:
22076 \begin_inset Quotes eld
22080 \begin_inset Quotes erd
22084 For ease of reading, we'll describe what the numbering schemes look like
22085 using a notation something like this: <
22086 \begin_inset Quotes eld
22090 \begin_inset Quotes erd
22094 \begin_inset space ~
22098 \begin_inset Quotes erd
22102 \begin_inset Quotes erd
22106 \begin_inset space ~
22110 \begin_inset Quotes erd
22114 \begin_inset Quotes erd
22118 \begin_inset space ~
22122 \begin_inset Quotes eld
22126 \begin_inset Quotes erd
22133 \begin_layout Standard
22134 As you can see in the example, there is a label command for each nesting
22141 \SpecialChar \ldots{}
22148 , as well as a counter,
22152 \SpecialChar \ldots{}
22158 There are also five
22159 \begin_inset Quotes eld
22163 \begin_inset Quotes erd
22196 , each of which take one counter as an argument.
22197 You can add characters before or after these, but there's no need to add
22201 \begin_layout Standard
22202 You can get really fancy with these.
22206 \begin_layout LyX-Code
22220 \begin_layout LyX-Code
22232 \begin_layout LyX-Code
22242 \begin_layout LyX-Code
22252 \begin_layout Standard
22253 produces the somewhat out of hand numbering scheme: <
22254 \begin_inset Quotes eld
22258 \begin_inset Quotes erd
22262 \begin_inset space ~
22266 \begin_inset Quotes erd
22270 \begin_inset Quotes erd
22274 \begin_inset space ~
22278 \begin_inset Quotes erd
22282 \begin_inset Quotes erd
22286 \begin_inset space ~
22290 \begin_inset Quotes eld
22294 \begin_inset Quotes erd
22301 \begin_layout Standard
22305 \begin_layout Section
22309 \begin_layout Standard
22315 \begin_layout Standard
22316 \begin_inset VSpace bigskip
22322 \begin_layout Standard
22327 \begin_layout Plain Layout
22333 tmpfont}{cmr17 scaled 2500}{
22345 \begin_layout Standard
22350 \begin_layout Plain Layout
22361 hose of you who like the style of old books probably also like
22362 \begin_inset Quotes eld
22366 \begin_inset Quotes erd
22369 —those large capital letters which begin each new chapter or section.
22370 Implementing them with plain LyX/LaTeX is straightforward (assuming you
22371 know some plain TeX!) but does require a lot of work and many iterations,
22372 as you can see by all the ugly TeX-mode stuff at the beginning of this
22376 \begin_layout Standard
22380 \begin_layout Plain Layout
22386 bigdrop{-1em}{3}{ptmri}{T}+
22391 here is a much easier way of doing this, of course.
22400 ) package from CTAN allows a simple way to add such letters to your documents.
22401 Since this package is not a standard part of teTeX, I can't demonstrate
22402 it within this document, but if you copy this paragraph to a new document,
22404 \begin_inset Quotes eld
22414 \begin_inset Quotes erd
22417 and the pluses from the TeX code at the beginning of the paragraph, and
22422 usepackage{dropcaps}
22424 to your LaTeX preamble, you will get a nice Times Roman Italic
22425 \begin_inset Quotes eld
22429 \begin_inset Quotes erd
22432 , whose height is three lines of text and which protrudes 1 em into the
22434 (Make certain you have copied
22435 \begin_inset Quotes eld
22443 \begin_inset Quotes erd
22446 into a directory where TeX can see it.) The first argument is the amount
22447 of indentation; in this case the negative sign moves it into the margin.
22448 The second argument is the height of the letter in number of lines of text.
22449 The third argument is the font name: virtually anything which has a tfm
22450 file should work (wade through the
22452 .../texmf/fonts/tfm
22454 directory for possibilities).
22455 My personal favorite is
22456 \begin_inset Quotes eld
22464 \begin_inset Quotes erd
22467 , a fancy German font specifically designed for dropped capitals.
22468 The fourth argument is the letter (or letters) to be dropped.
22473 package also offers the
22479 command, as well as a slightly simplified
22488 \begin_layout Section
22489 Non-standard Paragraph Shapes
22492 \begin_layout Standard
22498 \begin_layout Standard
22499 \begin_inset VSpace bigskip
22505 \begin_layout Standard
22509 \begin_layout Plain Layout
22521 \begin_layout Standard
22525 \begin_layout Plain Layout
22534 \begin_layout Plain Layout
22548 \begin_layout Standard
22553 \begin_layout Plain Layout
22564 \begin_layout Plain Layout
22573 \begin_layout Plain Layout
22582 \begin_layout Plain Layout
22591 \begin_layout Plain Layout
22600 \begin_layout Plain Layout
22609 \begin_layout Plain Layout
22618 \begin_layout Plain Layout
22627 \begin_layout Plain Layout
22636 \begin_layout Plain Layout
22645 \begin_layout Plain Layout
22654 \begin_layout Plain Layout
22663 \begin_layout Plain Layout
22672 \begin_layout Plain Layout
22681 \begin_layout Plain Layout
22690 \begin_layout Plain Layout
22699 \begin_layout Plain Layout
22708 \begin_layout Plain Layout
22717 \begin_layout Plain Layout
22726 \begin_layout Plain Layout
22732 There are times when the tyranny of rectangular paragraphs must be overthrown.
22733 In such situations, a call to the delightful plain TeX command
22740 As you can see, completely arbitrary shapes can be laid out with a suitable
22741 set of linelength definitions.
22742 While this parshape may look a bit silly and useless, one could conceive
22743 of situations such as finely tuned dropped capitals, word wrapping around
22744 non-rectangular graphics, etc.
22745 which will benefit from such handcrafting.
22748 \begin_layout Standard
22749 \begin_inset VSpace bigskip
22755 \begin_layout Standard
22760 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
22767 is the number of lines of text which define the paragraph.
22768 If there turn out to be fewer lines, the shape is truncated; if there are
22769 more, the excess lines have the same dimensions as the last line of the
22779 entries specify the indentation of the line from the left margin, and the
22780 length of the line as measured from that point.
22781 The shape applies only to the current paragraph; everything is reset to
22782 normal for the next paragraph.
22785 \begin_layout Standard
22789 \begin_layout Plain Layout
22801 \begin_layout Section
22805 \begin_layout Standard
22806 As you can see, the examples in this section range from the useful to the
22808 While I don't expect that anyone will ever need the paragraph shape demonstrate
22809 d in the last section, the important point is that you can do almost anything
22810 you want in LyX if you are willing to figure out how to do it in TeX and
22812 TeX is a fantastically powerful typesetting system and all that power is
22813 available to you since LyX uses it as its backend.