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 true
127 \output_changes false
136 Additional LyX Features
144 \begin_layout Plain Layout
146 Principal maintainer of this file is
151 If you have comments or error corrections, please send them to the LyX
152 Documentation mailing list,
153 \begin_inset Flex CharStyle:Code
156 \begin_layout Plain Layout
158 <lyx-docs@lists.lyx.org>
171 \begin_layout Standard
172 \begin_inset CommandInset toc
173 LatexCommand tableofcontents
180 \begin_layout Chapter
184 \begin_layout Standard
185 This manual is essentially Part II of the
187 User's Guide\SpecialChar \@.
190 The reason for separating this document out is simple: the
194 is already quite lengthy, and it contains information on all of the basic
195 features one needs to know in order to prepare most documents.
196 However, the LyX Team has worked to make LyX extensible through various
197 configuration files and external packages.
198 That means that if you want to support the Fizzwizzle LaTeX package, you
199 can create a layout file (or module) for it without having to alter LyX
201 We've already had contributions of several new features this way, and some
202 of them are documented here.
203 There are also some more `advanced' features, such as how to control the
204 presentation of bibliographies and how to work with multi-part documents,
205 that are not covered in the
209 and are discussed here.
212 \begin_layout Standard
213 This manual also documents some special features, like fax support, version
214 control, and SGML support, which require additional software to work properly.
215 There is also a chapter on LyX's support for HTML.
216 And lastly, there's a chapter of LaTeX tools and tips, things you can use
217 to spruce up your documents by directly using the powerful features of
223 only WYSIWYM and will only ever interface to some, not all, LaTeX features.
226 \begin_layout Standard
227 If you haven't read the
231 yet, you are definitely in the wrong manual.
236 is the first place to go, since it describes the notation and format of
238 You should also be thoroughly familiar with the
242 and all of the basic features of LyX before attempting to read this one.
245 \begin_layout Standard
246 Since many of the topics in this manual depend heavily on LyX's interaction
247 with LaTeX, this first chapter covers the inner workings of LyX and how
248 to direct LyX to generate exactly the LaTeX code you want.
249 It is obviously for more seasoned LyX users.
252 \begin_layout Chapter
256 \begin_layout Section
260 \begin_layout Standard
261 This chapter is for both TeX-nicians and the LaTeX-curious.
262 In it, we'll explain how LyX and LaTeX work together to produce printable
264 This is the only place in any of the manuals where we assume you know something
268 \begin_layout Standard
269 At one time, LyX was called a
270 \begin_inset Quotes eld
273 WYSIWYM frontend to LaTeX,
274 \begin_inset Quotes erd
277 but that's no longer true.
278 There are frontends to LaTeX out there.
282 \begin_layout Plain Layout
283 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
284 There are also the LaTeX modes for vi and emacs, of course.
289 These are basically text editors with the ability to run LaTeX and mark
290 any errors in the file you're editing.
299 run LaTeX, and it also indicates errors in the file, it also does much,
301 For one thing, you don't need to know LaTeX to use LyX effectively.
302 And LyX has added its own extensions to LaTeX.
303 Try the following sometime: select
304 \begin_inset Flex CharStyle:MenuItem
307 \begin_layout Plain Layout
308 Export\SpecialChar \menuseparator
315 \begin_inset Flex CharStyle:MenuItem
318 \begin_layout Plain Layout
325 \begin_inset Flex CharStyle:MenuItem
328 \begin_layout Plain Layout
329 View\SpecialChar \menuseparator
335 ), then look at the preamble of the resulting
336 \begin_inset Flex CharStyle:Code
339 \begin_layout Plain Layout
346 You'll notice a variety of new macros defined specifically by LyX.
347 These macros are defined automatically, according to the features you use
351 \begin_layout Standard
352 There are several commands that automatically invoke LaTeX.
356 \begin_layout Itemize
357 \begin_inset Flex CharStyle:MenuItem
360 \begin_layout Plain Layout
361 View\SpecialChar \menuseparator
370 \begin_layout Itemize
371 \begin_inset Flex CharStyle:MenuItem
374 \begin_layout Plain Layout
375 View\SpecialChar \menuseparator
376 Update\SpecialChar \menuseparator
385 \begin_layout Itemize
386 \begin_inset Flex CharStyle:MenuItem
389 \begin_layout Plain Layout
390 File\SpecialChar \menuseparator
399 \begin_layout Itemize
400 \begin_inset Flex CharStyle:MenuItem
403 \begin_layout Plain Layout
404 File\SpecialChar \menuseparator
413 \begin_layout Standard
414 They will only invoke LaTeX if the file has changed since the last time
419 \begin_layout Standard
420 When LyX runs LaTeX on the file you're editing, it performs these steps:
423 \begin_layout Enumerate
424 Convert the document to LaTeX and save to a file with the extension
425 \begin_inset Flex CharStyle:Code
428 \begin_layout Plain Layout
435 \begin_inset Flex CharStyle:Code
438 \begin_layout Plain Layout
447 \begin_layout Enumerate
449 \begin_inset Flex CharStyle:Code
452 \begin_layout Plain Layout
458 file (maybe several times), and run any other commands (such as
459 \begin_inset Flex CharStyle:Code
462 \begin_layout Plain Layout
469 \begin_inset Flex CharStyle:Code
472 \begin_layout Plain Layout
478 ) needed to compile the LaTeX file.
481 \begin_layout Enumerate
482 If there are any errors, show the error log.
485 \begin_layout Standard
486 If you've run LaTeX using
487 \begin_inset Flex CharStyle:MenuItem
490 \begin_layout Plain Layout
493 \SpecialChar \menuseparator
501 , LyX then runs a DVI viewer to display the DVI-file.
503 \begin_inset Flex CharStyle:MenuItem
506 \begin_layout Plain Layout
509 \SpecialChar \menuseparator
517 , LyX performs further steps:
520 \begin_layout Itemize
522 \begin_inset Flex CharStyle:Code
525 \begin_layout Plain Layout
531 to convert the DVI file to PostScript.
534 \begin_layout Itemize
535 Run a PostScript viewer, such as
536 \begin_inset Flex CharStyle:Code
539 \begin_layout Plain Layout
545 , to display the PostScript file.
548 \begin_layout Standard
549 LyX does similar things when viewing, or exporting, other formats.
552 \begin_layout Section
553 Translating LaTeX files into LyX
556 \begin_layout Standard
557 You can import a LaTeX file into LyX by using the
558 \begin_inset Flex CharStyle:MenuItem
561 \begin_layout Plain Layout
562 File\SpecialChar \menuseparator
563 Import\SpecialChar \menuseparator
570 This will call a program named
571 \begin_inset Flex CharStyle:Code
574 \begin_layout Plain Layout
580 which will create a file
581 \begin_inset Flex CharStyle:Code
584 \begin_layout Plain Layout
591 \begin_inset Flex CharStyle:Code
594 \begin_layout Plain Layout
601 LyX will then open that file.
605 \begin_layout Plain Layout
606 \begin_inset Flex CharStyle:Code
609 \begin_layout Plain Layout
615 can also be run from the command line, of course.
623 \begin_layout Standard
624 \begin_inset Flex CharStyle:Code
627 \begin_layout Plain Layout
633 will translate most legal LaTeX, but not everything.
634 It will put things it doesn't understand into TeX code, so after translating
636 \begin_inset Flex CharStyle:Code
639 \begin_layout Plain Layout
645 , you can look for TeX code and hand-edit it until it looks right.
648 \begin_layout Standard
649 If you don't know what TeX code is, read the next section.
652 \begin_layout Section
653 \begin_inset CommandInset label
655 name "sec:Inserting-TeX-Code"
659 Inserting TeX Code into LyX Documents
662 \begin_layout Standard
663 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
664 You can always insert TeX code into any LyX document.
665 LyX cannot, and will never be able to, display every possible LaTeX construct.
666 If ever you need to insert LaTeX commands into your LyX document, you can
668 \begin_inset Flex CharStyle:Code
671 \begin_layout Plain Layout
677 box, which you can insert into your document with
678 \begin_inset Flex CharStyle:MenuItem
681 \begin_layout Plain Layout
682 Insert\SpecialChar \menuseparator
691 \begin_layout Standard
692 Here's an example of inserting LaTeX commands in a LyX document.
693 The code looks like this:
696 \begin_layout LyX-Code
700 \begin_inset Newline newline
706 \begin_inset Newline newline
709 This is an example for a minipage environment.
711 \begin_inset Newline newline
714 can put nearly everything in it, even (non-floating)
715 \begin_inset Newline newline
720 \begin_inset Newline newline
726 \begin_inset Newline newline
730 \begin_inset Newline newline
736 \begin_inset Newline newline
742 \begin_inset Newline newline
748 \begin_inset Newline newline
753 \begin_inset Newline newline
759 \begin_inset Newline newline
765 \begin_inset Newline newline
771 \begin_inset Newline newline
779 \begin_layout LyX-Code
783 \begin_layout Standard
785 \begin_inset Flex CharStyle:Code
788 \begin_layout Plain Layout
794 box containing this text is directly after this paragraph.
795 Those of you reading the manual in LyX will only see the TeX code inset.
796 Those reading a printed version of the manuals will see the actual results:
799 \begin_layout Standard
803 \begin_layout Plain Layout
810 \begin_layout Plain Layout
817 \begin_layout Plain Layout
819 This is an example for a minipage environment.
820 You can put nearly everything in it, even (non-floating) figures and tables.
824 \begin_layout Plain Layout
831 \begin_layout Plain Layout
836 \begin_layout Plain Layout
843 \begin_layout Plain Layout
850 \begin_layout Plain Layout
857 \begin_layout Plain Layout
863 \begin_layout Plain Layout
870 \begin_layout Plain Layout
877 \begin_layout Plain Layout
884 \begin_layout Plain Layout
896 \begin_layout Standard
897 In addition to using TeX code, you can also create a separate file containing
898 some complex LaTeX structure and then use
899 \begin_inset Flex CharStyle:MenuItem
902 \begin_layout Plain Layout
903 Insert\SpecialChar \menuseparator
913 to include your file (you should select the type
914 \begin_inset Flex CharStyle:Code
917 \begin_layout Plain Layout
924 We recommend that you only do this if you have a
925 \begin_inset Flex CharStyle:Code
928 \begin_layout Plain Layout
939 Otherwise, you'll have a big job tracking down LaTeX errors.
942 \begin_layout Standard
943 There are a few last points to emphasize:
946 \begin_layout Itemize
951 check if your LaTeX code is correct.
954 \begin_layout Itemize
955 Beware reinventing the wheel.
958 \begin_layout Standard
959 On that last point, LyX does have quite a few features tucked into it, and
961 Be sure to check the manuals to make sure that LyX doesn't have such-and-such
962 feature before you decide you have to do it by hand.
963 Moreover, there are numerous LaTeX packages out there to do all sorts of
964 things, from labels to envelopes to fancy multipage tables.
966 \begin_inset CommandInset href
969 target "http://www.ctan.org/"
973 for details, and see chapter
974 \begin_inset CommandInset ref
976 reference "cha:secrets"
983 \begin_layout Standard
984 If you do need to do some wild and fancy things within your document, be
985 sure to check out a good LaTeX book for assistance.
986 There are a number of them listed in the bibliography of the
993 \begin_layout Section
994 LyX and the LaTeX Preamble
997 \begin_layout Subsection
998 About the LaTeX Preamble
1001 \begin_layout Standard
1002 If you already know LaTeX, there is no need to explain here what the preamble
1004 If you don't, the following will give you some ideas—we recommend again
1005 that you consult a LaTeX book for further information.
1006 In any case, you should read the points below, because they explain what
1007 you can do and what you don't need to do in the LaTeX preamble of a LyX
1011 \begin_layout Standard
1012 The LaTeX preamble comes at the very beginning of a document,
1020 \begin_layout Itemize
1021 Declare the document class.
1023 \begin_inset Newline newline
1026 LyX already does this for you.
1027 If you're a seasoned LaTeX-nician, and you have a custom document class
1028 you want to use, check out the
1030 Customization Manual
1032 for information on how to make LyX interface to it.
1035 \begin_layout Itemize
1036 Declare the usage of packages.
1038 \begin_inset Newline newline
1041 LaTeX packages provide special commands, which are only available within
1042 a document when the package has been declared in the preamble.
1043 For example, the package
1044 \begin_inset Flex CharStyle:Code
1047 \begin_layout Plain Layout
1053 forces all paragraphs to be indented.
1054 There are other packages for labels, envelopes, margins, etc.
1058 \begin_layout Itemize
1059 Set counters, variables, lengths and widths.
1061 \begin_inset Newline newline
1064 There are several LaTeX counters and variables which
1068 be set globally from within the preamble in order to have the desired effect.
1069 (There are variables which you can set and reset inside the document, too.)
1070 Margins are a good example of something which must be set in the preamble.
1071 Another example is the label format for lists.
1072 You can actually set these just about anywhere, but it's best to do it
1073 just once, inside the preamble.
1076 \begin_layout Itemize
1077 Declare user defined commands (with
1078 \begin_inset Flex CharStyle:Code
1081 \begin_layout Plain Layout
1090 \begin_inset Flex CharStyle:Code
1093 \begin_layout Plain Layout
1102 \begin_inset Newline newline
1105 These are abbreviations for LaTeX commands which appear very often inside
1107 Although the preamble is a good place to declare such commands, they
1111 be declared anywhere (before they are used for the first time, of course).
1112 This can be useful if there is a lot of raw LaTeX code in your document,
1113 which normally should not be the case.
1116 \begin_layout Standard
1117 LyX adds its own set of definitions to the preamble of the
1118 \begin_inset Flex CharStyle:Code
1121 \begin_layout Plain Layout
1128 This makes LaTeX files generated by LyX portable.
1131 \begin_layout Subsection
1132 Changing the Preamble
1135 \begin_layout Standard
1136 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1137 can't change them without patching LyX itself.
1138 You can, however, add your own stuff to the preamble by selecting
1139 \begin_inset Flex CharStyle:MenuItem
1142 \begin_layout Plain Layout
1144 \begin_inset space ~
1153 \begin_inset Flex CharStyle:MenuItem
1156 \begin_layout Plain Layout
1157 Document\SpecialChar \menuseparator
1164 LyX adds anything in the
1165 \begin_inset Flex CharStyle:MenuItem
1168 \begin_layout Plain Layout
1174 dialog to its own built-in preamble.
1175 Before adding your own declarations in the preamble, you should make sure
1176 that LyX doesn't already support what you want to do.
1177 (Remember what we said about reinventing the wheel?) Also,
1179 make sure your preamble code is correct
1182 LyX doesn't check it for you.
1183 If there is an error, you're likely to get an error like
1184 \begin_inset Quotes eld
1188 \begin_inset Flex CharStyle:Code
1191 \begin_layout Plain Layout
1200 \begin_inset Quotes erd
1204 If you see this error, check your preamble.
1207 \begin_layout Subsection
1211 \begin_layout Standard
1212 Here are some examples of what you can add to a preamble, and what they
1216 \begin_layout Subsubsection
1220 \begin_layout Standard
1221 There are two variables under LaTeX that control page position:
1222 \begin_inset Flex CharStyle:Code
1225 \begin_layout Plain Layout
1234 \begin_inset Flex CharStyle:Code
1237 \begin_layout Plain Layout
1246 Their names should be self-explanatory.
1247 These variables are useful if you think for a moment about computer labels.
1248 Sometimes, the size of a print medium and the area of the medium that you
1249 can actually print on aren't the same.
1251 \begin_inset Flex CharStyle:Code
1254 \begin_layout Plain Layout
1263 \begin_inset Flex CharStyle:Code
1266 \begin_layout Plain Layout
1277 \begin_layout Standard
1278 The default values for
1279 \begin_inset Flex CharStyle:Code
1282 \begin_layout Plain Layout
1291 \begin_inset Flex CharStyle:Code
1294 \begin_layout Plain Layout
1303 \begin_inset space \thinspace{}
1307 \begin_inset space \thinspace{}
1311 \begin_inset space \space{}
1314 the page isn't shifted.
1315 Unfortunately, some DVI drivers always seem to shift the page.
1316 We have no idea why, or why the sysadmin hasn't fixed such behavior.
1317 If you're using LyX on a system that you don't personally maintain, and
1318 your sysadmin is a doofus,
1319 \begin_inset Flex CharStyle:Code
1322 \begin_layout Plain Layout
1331 \begin_inset Flex CharStyle:Code
1334 \begin_layout Plain Layout
1343 Suppose you're left and top margins are always 0.5
1344 \begin_inset space \thinspace{}
1348 You can add this to the preamble:
1351 \begin_layout LyX-Code
1359 \begin_layout LyX-Code
1367 \begin_layout Standard
1368 and your margins should now be correct.
1371 \begin_layout Subsubsection
1375 \begin_layout Standard
1376 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1377 There's a rather nice package, available at your nearest CTAN archive,
1378 for printing sheets of labels:
1379 \begin_inset Flex CharStyle:Code
1382 \begin_layout Plain Layout
1389 Now, your system may not have this package installed by default.
1390 We leave that up to you to check.
1391 You'll also want to read the documentation for it; we're not going to do
1393 Since this is an example, however, we'll give you an example of how you
1397 \begin_layout Standard
1398 First, make sure you're using the
1399 \begin_inset Flex CharStyle:Code
1402 \begin_layout Plain Layout
1409 Next, you need to put the following in your preamble:
1412 \begin_layout LyX-Code
1418 \begin_layout LyX-Code
1424 \begin_layout LyX-Code
1430 \begin_layout LyX-Code
1436 \begin_layout LyX-Code
1442 \begin_layout LyX-Code
1448 \begin_layout LyX-Code
1454 \begin_layout Standard
1455 This sets things up for Avery label sheets, stock #5360.
1456 You're now ready to print labels, but you'll need to insert LaTeX code,
1457 placing the commands
1458 \begin_inset Flex CharStyle:Code
1461 \begin_layout Plain Layout
1470 \begin_inset Flex CharStyle:Code
1473 \begin_layout Plain Layout
1481 around each label text.
1482 This and other special features of
1483 \begin_inset Flex CharStyle:Code
1486 \begin_layout Plain Layout
1492 are explained in its documentation.
1495 \begin_layout Standard
1496 Someday, someone may write a LyX layout file to support this package directly.
1497 Maybe that someone is you.
1500 \begin_layout Subsubsection
1501 Example #3: Paragraph Indentation
1504 \begin_layout Standard
1505 Americans are trained to indent the first line of
1510 As with all of their other weird quirks, most Americans will whine and
1511 moan until they can have their way and indent the first line of all paragraphs.
1520 \begin_layout Standard
1521 Of course, this behavior isn't standard typography.
1522 In books, you typically only indent the first line of a paragraph
1526 it follows another one.
1527 The idea behind indenting the first line of a paragraph is to distinguish
1528 neighboring paragraphs from one another.
1529 If there is no previous paragraph—for example, if it follows a figure or
1530 is the first paragraph in a section—then there is no need for indentation.
1534 \begin_layout Standard
1535 If you're a typical American (we're still joking!), though, you don't care
1536 about such esoteric things; you want your indentation! Add this to the
1540 \begin_layout LyX-Code
1543 usepackage{indentfirst}
1546 \begin_layout Standard
1547 If your TeX distribution isn't braindead, you'll have this package, and
1548 all of your paragraphs will get the indentation the Founding Fathers intended
1552 \begin_layout Subsubsection
1553 Example #4: This Document
1556 \begin_layout Standard
1557 You can also check out the preamble of this document to get an idea of some
1558 of the advanced things you can do.
1559 Also, there are more examples and an assortment of LaTeX
1560 \begin_inset Quotes eld
1564 \begin_inset Quotes erd
1568 \begin_inset space ~
1572 \begin_inset CommandInset ref
1574 reference "cha:secrets"
1582 \begin_layout Section
1583 LyX and LaTeX Errors
1586 \begin_layout Standard
1587 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1589 It then uses the logfile from the LaTeX run to do a post-mortem.
1590 After analyzing the logfile,LyX displays a dialog listing the errors.
1591 Clicking on any one of them will take you to the position in your LyX file
1592 where the error occurred.
1596 \begin_layout Plain Layout
1598 Analyzing the logfile is a tough job, and LyX doesn't always go to the
1600 There are also cases where LaTeX reports the error on one line, but the
1601 actual error is earlier.
1602 This is not unlike forgetting a closing brace in a program: You'll get
1603 an error, but only later.
1611 \begin_layout Standard
1612 Some folks also like to look at the log file directly: It is available from
1614 \begin_inset Flex CharStyle:MenuItem
1617 \begin_layout Plain Layout
1620 \SpecialChar \menuseparator
1624 \begin_inset space ~
1633 There are some fairly common error messages and warnings.
1634 We'll cover those here.
1635 You should look at a good LaTeX book for a complete listing.
1638 \begin_layout Itemize
1639 \begin_inset Flex CharStyle:Code
1642 \begin_layout Plain Layout
1649 \begin_inset Newline newline
1652 Anything beginning with these words is a warning message for the purpose
1654 \begin_inset Quotes eld
1658 \begin_inset Quotes erd
1661 the LaTeX code itself.
1662 You'll get messages like this if you added or changed cross-references
1663 or bibliography entries, in which case, LaTeX is trying to tell you that
1664 you need to make another run.
1665 You can by-and-large ignore these.
1668 \begin_layout Itemize
1669 \begin_inset Flex CharStyle:Code
1672 \begin_layout Plain Layout
1679 \begin_inset Newline newline
1682 Another warning message, this time about fonts which LaTeX couldn't find.
1683 The rest of the message will often say something about a replacement font
1685 You can safely ignore these, too.
1688 \begin_layout Itemize
1689 \begin_inset Flex CharStyle:Code
1692 \begin_layout Plain Layout
1701 \begin_inset Newline newline
1709 They are warnings about lines that were too long and run past the right
1711 Almost always, this is unnoticeable in the final output.
1712 (It can be just a point or two.) Or, only one or two characters extend past
1714 LaTeX seems to generate at least one of these messages for just about any
1716 \begin_inset Newline newline
1719 You can ignore these messages.
1720 Your eyes will tell you if there's a problem with something that's too
1721 wide; just look at the output.
1725 \begin_layout Plain Layout
1726 You can also enable the `draft' option in
1727 \begin_inset Flex CharStyle:MenuItem
1730 \begin_layout Plain Layout
1733 \SpecialChar \menuseparator
1741 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1749 \begin_layout Itemize
1750 \begin_inset Flex CharStyle:Code
1753 \begin_layout Plain Layout
1762 \begin_inset Newline newline
1765 Not quite as common as its cousin.
1766 LaTeX seems to like to print lines that are a bit too wide as opposed to
1767 ones that are a bit too narrow.
1768 We have no idea why.
1771 \begin_layout Itemize
1772 \begin_inset Flex CharStyle:Code
1775 \begin_layout Plain Layout
1784 \begin_inset Flex CharStyle:Code
1787 \begin_layout Plain Layout
1796 \begin_inset Newline newline
1799 Warnings about troubles breaking the page.
1800 Once again, just look at the output.
1801 Your eyes will tell you where something has gone wrong.
1804 \begin_layout Itemize
1805 \begin_inset Flex CharStyle:Code
1808 \begin_layout Plain Layout
1810 \begin_inset Quotes els
1814 \begin_inset Quotes ers
1823 \begin_inset Newline newline
1827 \begin_inset Quotes eld
1831 \begin_inset Quotes erd
1834 isn't installed on this system.
1835 This usually appears because some package your document needs isn't installed.
1836 If you didn't touch the preamble or didn't use the
1837 \begin_inset Flex CharStyle:Code
1840 \begin_layout Plain Layout
1848 command, then one of the packages LyX tried to load is missing.
1850 \begin_inset Flex CharStyle:MenuItem
1853 \begin_layout Plain Layout
1854 Help\SpecialChar \menuseparator
1860 to get a list of packages that LyX knows about.
1861 This file is updated whenever you reconfigure LyX (using
1862 \begin_inset Flex CharStyle:MenuItem
1865 \begin_layout Plain Layout
1866 Tools\SpecialChar \menuseparator
1872 ) and tells you which packages have been detected and what they do.
1873 \begin_inset Newline newline
1877 \begin_inset Flex CharStyle:Code
1880 \begin_layout Plain Layout
1888 command and the package in question isn't installed, then you'll need to
1889 install it yourself.
1892 \begin_layout Itemize
1893 \begin_inset Flex CharStyle:Code
1896 \begin_layout Plain Layout
1897 LaTeX Error: Unknown option
1903 \begin_inset Newline newline
1906 Error messages beginning with this are trying to tell you that you specified
1907 a bad or undefined option to a package.
1908 Check the package's documentation.
1911 \begin_layout Itemize
1912 \begin_inset Flex CharStyle:Code
1915 \begin_layout Plain Layout
1916 Undefined control sequence
1922 \begin_inset Newline newline
1925 If you've inserted LaTeX code into your document, but made a typo, you'll
1927 You may have forgotten to load a package.
1928 In any case, this error message usually means that you used an undefined
1933 \begin_layout Standard
1934 There are other error and warning messages.
1935 Some are self-explanatory.
1936 These are usually LaTeX messages.
1937 Others are downright cryptic.
1938 These are usually TeX error messages, and we really have
1942 what they mean or how to decipher them.
1946 \begin_layout Standard
1947 There's a general sequence you should follow if you get error messages:
1950 \begin_layout Enumerate
1951 Look at the LaTeX code you inserted for typos.
1954 \begin_layout Enumerate
1955 If there are no typos, check that you used the command(s) correctly.
1958 \begin_layout Enumerate
1959 If you get a bunch of error boxes piled up at the very top of the document—and
1960 especially if you see a
1961 \begin_inset Quotes eld
1965 \begin_inset Flex CharStyle:Code
1968 \begin_layout Plain Layout
1977 \begin_inset Quotes erd
1980 error—it means that there are errors in the preamble.
1981 Start debugging your preamble.
1984 \begin_layout Enumerate
1985 If you didn't add anything to the preamble and didn't add any LaTeX code
1986 to the document, the first suspect is your LaTeX distribution itself.
1987 Check for missing packages and install them.
1990 \begin_layout Enumerate
1991 Okay, so there are no missing packages.
1992 Did you use any of the fine-tuning options in LyX? Specifically, did you
1997 any of them, like trying to manually insert lots of
1998 \begin_inset Flex CharStyle:Code
2001 \begin_layout Plain Layout
2003 \begin_inset space ~
2012 \begin_inset Flex CharStyle:Code
2015 \begin_layout Plain Layout
2022 \begin_inset Flex CharStyle:Code
2025 \begin_layout Plain Layout
2031 ? Did you try to kludge something together with these instead of using the
2032 appropriate paragraph environment?
2035 \begin_layout Enumerate
2036 All right, you didn't use any of the fine-tuning options, you played by
2038 Did you try to pull a fancy maneuver? Did you do something funky inside
2039 a table or an equation, like inserting a graphic into a table cell?
2042 \begin_layout Enumerate
2043 Do you have long sections of text where LaTeX cannot find a place to break
2044 a line? By default, LaTeX is rather strict about how much extra inter-word
2045 spacing it will add in order to break a line.
2046 Preferably, you should rework the paragraph to avoid the problem.
2047 If this isn't an option, you can wrap your text in
2048 \begin_inset Flex CharStyle:Code
2051 \begin_layout Plain Layout
2059 to make LaTeX's line breaking more, well, sloppy.
2062 \begin_layout Enumerate
2063 Did you go overboard with the nesting? LyX (currently) doesn't check to
2064 make sure you're in the limits for nesting environments.
2065 If you nested a bunch of environments to the
2066 \begin_inset Formula $17^{\mathrm{th}}$
2069 level, that's the problem.
2070 (The limit in LaTeX is five.)
2073 \begin_layout Enumerate
2074 Okay, you didn't get any error messages, but your output looks awful.
2075 If you have a table or figure that's too wide or long for the page, you
2080 \begin_layout Enumerate
2081 rescale the figure so it fits.
2084 \begin_layout Enumerate
2085 trim down the table so it fits.
2089 \begin_layout Enumerate
2090 If something else is wrong with the output, and you didn't try to pull anything
2091 fancy or kludge the fine-tuning options, we're not sure what's wrong.
2094 \begin_layout Standard
2095 If all this doesn't help—well, then
2099 you might have found a bug in LyX\SpecialChar \ldots{}
2103 \begin_layout Chapter
2107 \begin_layout Section
2108 Customizing Bibliographies with BibTeX
2111 \begin_layout Standard
2112 The most basic information about how to use BibTeX with LyX is contained
2115 Bibliography databases (BibTeX)
2122 The following subsections explain special bibliography features supported
2126 \begin_layout Subsection
2127 Alternative Citation Styles
2130 \begin_layout Standard
2131 Standard BibTeX uses numbers (e.
2132 \begin_inset space \thinspace{}
2136 \begin_inset space \space{}
2140 \begin_inset Quotes eld
2144 \begin_inset Quotes erd
2147 ) to refer to a cited work.
2148 However, in many scientific disciplines, other citation styles are in use.
2149 The most common one is the author-year style (e.
2150 \begin_inset space \thinspace{}
2154 \begin_inset space \space{}
2158 \begin_inset Quotes eld
2162 \begin_inset Quotes erd
2166 LyX supports two packages that provide this style,
2167 \begin_inset Flex CharStyle:Code
2170 \begin_layout Plain Layout
2177 \begin_inset Flex CharStyle:Code
2180 \begin_layout Plain Layout
2187 Both packages have their pros and cons, which cannot be listed in detail.
2188 If you only want to have simple author-year (or author-numerical) style,
2189 or if you want to use one of the countless style files for
2190 \begin_inset Flex CharStyle:Code
2193 \begin_layout Plain Layout
2199 , than the established
2200 \begin_inset Flex CharStyle:Code
2203 \begin_layout Plain Layout
2209 package is probably your choice.
2210 If you need special features like short title references, ibidem etc., you
2212 \begin_inset Flex CharStyle:Code
2215 \begin_layout Plain Layout
2224 \begin_layout Standard
2225 The handling of both packages in LyX is basically the same.
2227 \begin_inset Flex CharStyle:MenuItem
2230 \begin_layout Plain Layout
2231 Document\SpecialChar \menuseparator
2238 \begin_inset Flex CharStyle:MenuItem
2241 \begin_layout Plain Layout
2248 \begin_inset Flex CharStyle:MenuItem
2251 \begin_layout Plain Layout
2258 \begin_inset Flex CharStyle:MenuItem
2261 \begin_layout Plain Layout
2268 With both packages, you will get some extra features in the citation dialog
2269 and you can select the style of the reference (
2270 \begin_inset Quotes eld
2274 \begin_inset Quotes erd
2278 \begin_inset Quotes eld
2282 \begin_inset Quotes erd
2286 \begin_inset Quotes eld
2290 \begin_inset Quotes erd
2294 \begin_inset Quotes eld
2298 \begin_inset Quotes erd
2302 Note that both packages need specifically designed style files.
2303 They both ship their own, but there are lots of additional style files,
2304 and there is even an interactive style file builder
2308 \begin_layout Plain Layout
2310 \begin_inset Flex URL
2313 \begin_layout Plain Layout
2315 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2326 \begin_inset Flex CharStyle:Code
2329 \begin_layout Plain Layout
2338 \begin_layout Subsection
2339 Sectioned Bibliographies
2342 \begin_layout Standard
2343 Sometimes you might need to divide your bibliography into several sections.
2344 If you are for instance a historian, the possibility to separate sources
2345 and scientific works is most likely a
2346 \begin_inset Quotes eld
2350 \begin_inset Quotes erd
2354 Unfortunately, BibTeX itself does not allow you to do this.
2355 But with the help of some LaTeX packages, BibTeX can be extended to fit
2359 \begin_layout Standard
2360 LyX provides native support for one of these packages,
2368 \begin_layout Plain Layout
2370 \begin_inset Flex URL
2373 \begin_layout Plain Layout
2375 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2385 The advantage of this package (compared to other packages like
2389 ) is that you don't need to define new citation commands.
2390 Instead, you need to prepare different bibliographic databases which include
2391 the entries for the different sections of the bibliography.
2392 For example: If you want to divide your bibliography into the sections
2394 \begin_inset Quotes eld
2398 \begin_inset Quotes erd
2402 \begin_inset Quotes eld
2406 \begin_inset Quotes erd
2409 , you first need to create two bibliographic databases, e.
2410 \begin_inset space \thinspace{}
2414 \begin_inset space \space{}
2418 \begin_inset Flex CharStyle:Code
2421 \begin_layout Plain Layout
2428 \begin_inset Flex CharStyle:Code
2431 \begin_layout Plain Layout
2441 \begin_layout Standard
2443 \begin_inset Flex CharStyle:MenuItem
2446 \begin_layout Plain Layout
2447 Document\SpecialChar \menuseparator
2454 \begin_inset Flex CharStyle:MenuItem
2457 \begin_layout Plain Layout
2464 \begin_inset Flex CharStyle:MenuItem
2467 \begin_layout Plain Layout
2468 Sectioned bibliography
2474 Now you can insert multiple BibTeX bibliographies, one for each section
2475 of your bibliography.
2476 Returning to our example: Insert the BibTeX bibliography
2477 \begin_inset Flex CharStyle:Code
2480 \begin_layout Plain Layout
2486 and a second one for the database
2487 \begin_inset Flex CharStyle:Code
2490 \begin_layout Plain Layout
2497 You are free to use the same or different styles for each section.
2498 Additionally, you can chose if the bibliography section should contain
2500 \begin_inset Quotes eld
2503 all cited references
2504 \begin_inset Quotes erd
2507 of the specified database(s) (which is the default),
2508 \begin_inset Quotes eld
2511 all uncited references
2512 \begin_inset Quotes erd
2516 \begin_inset Quotes eld
2520 \begin_inset Quotes erd
2524 This might be useful if you would like to separate your bibliography into
2526 \begin_inset Quotes eld
2530 \begin_inset Quotes erd
2534 \begin_inset Quotes eld
2538 \begin_inset Quotes erd
2542 \begin_inset Quotes eld
2546 \begin_inset Quotes erd
2550 The titles for the sections can be added as ordinary sections or subsections.
2552 \begin_inset Flex CharStyle:Code
2555 \begin_layout Plain Layout
2561 removes the bibliography title, you have manually re-add that, too (as
2562 a chapter* or section*, for instance).
2565 \begin_layout Subsection
2566 Multiple Bibliographies
2569 \begin_layout Standard
2570 Multiple bibliographies, e.
2571 \begin_inset space \thinspace{}
2575 \begin_inset space \space{}
2578 a bibliography for each section or chapter of the document, are not supported
2581 \begin_inset Flex CharStyle:Code
2584 \begin_layout Plain Layout
2590 package, which is used for the creation of sectioned bibliographies in
2591 LyX (see the previous section), provides an easy way to solve this task,
2592 if you are willing to use some
2593 \begin_inset Flex CharStyle:MenuItem
2596 \begin_layout Plain Layout
2603 \begin_inset space ~
2607 \begin_inset CommandInset ref
2609 reference "sec:Inserting-TeX-Code"
2617 \begin_layout Plain Layout
2618 An alternative approach is to use the
2619 \begin_inset Flex CharStyle:Code
2622 \begin_layout Plain Layout
2629 \begin_inset Flex CharStyle:Code
2632 \begin_layout Plain Layout
2638 package, respectively.
2646 \begin_layout Standard
2648 \begin_inset Flex CharStyle:MenuItem
2651 \begin_layout Plain Layout
2652 Document\SpecialChar \menuseparator
2659 \begin_inset Flex CharStyle:MenuItem
2662 \begin_layout Plain Layout
2669 \begin_inset Flex CharStyle:MenuItem
2672 \begin_layout Plain Layout
2673 Sectioned bibliography
2679 In the document, you have to enclose the sections, which shall contain
2680 their own bibliography (including the BibTeX bibliography itself), between
2682 \begin_inset Flex CharStyle:Code
2685 \begin_layout Plain Layout
2694 \begin_inset Flex CharStyle:Code
2697 \begin_layout Plain Layout
2705 (those commands have to be inserted as TeX code).
2706 The bibliography will contain all references which have been cited in the
2708 \begin_inset Flex CharStyle:Code
2711 \begin_layout Plain Layout
2722 If you are using this approach, then every citation reference has to be
2724 \begin_inset Flex CharStyle:Code
2727 \begin_layout Plain Layout
2735 \begin_inset Flex CharStyle:Code
2738 \begin_layout Plain Layout
2747 \begin_layout Section
2751 \begin_layout Subsection
2755 \begin_layout Standard
2756 When you are working on a large file with many sections, it is often convenient
2757 to break up the document into several files, or perhaps you have something
2758 where a table may change from time to time, but the preceding text does
2760 In these cases, you should seriously consider using multipart documents.
2761 For example, scientific papers often have five major sections: the introduction
2762 , observations, results, discussion, and conclusion.
2763 Each of these could be its own separate LyX file, with one
2764 \begin_inset Quotes eld
2768 \begin_inset Quotes erd
2771 file which contains the title, authors, abstract, references, etc., plus
2772 the five included files.
2773 It is important to note that each of these files is a full LyX file which
2774 can be formatted and printed on its own, as well as included in a master
2776 Each of these files must have the same document class, however—don't attempt
2777 to mix book classes with article classes.
2778 You may also include LaTeX files; however, these files must not have their
2780 \begin_inset space \thinspace{}
2784 \begin_inset space \space{}
2787 everything up to and including the
2788 \begin_inset Flex CharStyle:Code
2791 \begin_layout Plain Layout
2800 \begin_inset Flex CharStyle:Code
2803 \begin_layout Plain Layout
2811 line must be deleted) or else errors will be generated when you try to
2815 \begin_layout Standard
2816 LyX allows you to include files quite easily with
2817 \begin_inset Flex CharStyle:MenuItem
2820 \begin_layout Plain Layout
2821 Insert\SpecialChar \menuseparator
2823 \begin_inset space ~
2832 When you click on this selection a small box is inserted into the file
2833 at the current cursor location.
2834 Clicking on the box raises a dialog which allows you to select the file
2835 to be included, and the method of its inclusion.
2839 \begin_layout Standard
2840 The file selection box should by now be obvious.
2841 The three inclusion methods are
2842 \begin_inset Quotes eld
2846 \begin_inset Quotes erd
2850 \begin_inset Quotes eld
2854 \begin_inset Quotes erd
2858 \begin_inset Quotes eld
2862 \begin_inset Quotes erd
2866 The difference between
2867 \begin_inset Quotes eld
2871 \begin_inset Quotes erd
2875 \begin_inset Quotes eld
2879 \begin_inset Quotes erd
2882 is really only meaningful to LaTeXperts, but the practical difference is
2883 that files which are
2884 \begin_inset Quotes eld
2888 \begin_inset Quotes erd
2891 are typeset beginning on a new page, while files which are
2892 \begin_inset Quotes eld
2896 \begin_inset Quotes erd
2899 are typeset starting on the current page.
2902 \begin_layout Standard
2903 Generally, the master file is converted into a full LaTeX file before typesettin
2904 g, while the included files are converted to LaTeX files which do not have
2905 all the preamble information.
2908 \begin_layout Standard
2910 \begin_inset Quotes eld
2914 \begin_inset Quotes erd
2917 included file allows you to include a file typeset exactly as it appears
2919 \begin_inset space \thinspace{}
2923 \begin_inset space \space{}
2927 \begin_inset Flex CharStyle:Code
2930 \begin_layout Plain Layout
2936 mode, with the characters set in a fixed-width typewriter font.
2937 Normally, spaces in this file are invisible, though two consecutive spaces
2938 are conserved, unlike LyX's normal treatment of spaces.
2939 However, setting the
2940 \begin_inset Flex CharStyle:MenuItem
2943 \begin_layout Plain Layout
2945 \begin_inset space ~
2949 \begin_inset space ~
2953 \begin_inset space ~
2961 checkbox typesets a mark to unambiguously define the presence of a space.
2965 \begin_layout Subsection
2966 Cross-References Between Files
2969 \begin_layout Standard
2970 \begin_inset Box Shadowbox
2979 height_special "totalheight"
2982 \begin_layout Plain Layout
2983 This section is somewhat out of date.
2984 Need to describe default master documents and how children are opened when
2994 \begin_layout Standard
2995 It is possible to set up cross-references between the different files.
2996 First, open all the files in question: let's call them A and B in a two
2997 file example, where B is included in A.
2998 Let's say you insert a label in A, then want to reference it in B.
2999 Open the cross-reference dialog in whilst in document B, and you can select
3001 \begin_inset Quotes eld
3005 \begin_inset Quotes erd
3011 \begin_layout Subsection
3012 Bibliography Lists in all Subdocuments
3015 \begin_layout Standard
3016 \begin_inset Box Frameless
3025 height_special "totalheight"
3028 \begin_layout Plain Layout
3029 This section also needs updating.
3030 There is now material about this on the wiki, and it could be copied here.
3038 \begin_layout Standard
3039 Copy the bibliography list with all entries to all subdocuments and transform
3041 This way LyX will find the
3042 \begin_inset Flex CharStyle:Code
3045 \begin_layout Plain Layout
3051 -files and you can easily insert references without making the bibliography
3055 \begin_layout Standard
3056 As the bibliography list is in a comment, LaTeX won't use use it and the
3057 references will look like this: [?], instead of like this: [1].
3058 One solution is to use the LaTeX-package
3059 \begin_inset Flex CharStyle:Code
3062 \begin_layout Plain Layout
3068 that will only include comments by processing the files separately.
3069 To do this, add in the LaTeX preamble of every subdocument the following:
3072 \begin_layout LyX-Code
3078 \begin_layout LyX-Code
3081 includecomment{comment}
3084 \begin_layout Standard
3086 \begin_inset Flex URL
3089 \begin_layout Plain Layout
3091 http://wiki.lyx.org/FAQ/Unsorted#toc31
3099 \begin_layout Section
3100 Fancy Headers and Footers
3103 \begin_layout Standard
3104 The default page layout is rather plain; for an
3105 \begin_inset Flex CharStyle:Code
3108 \begin_layout Plain Layout
3114 document class, all you get is a centered page number at the bottom of
3116 This document uses KOMA-script's book class, so it appears to be a bit
3118 But to really put on a show, you need to set the document page style to
3120 \begin_inset Quotes eld
3124 \begin_inset Quotes erd
3127 , as mentioned in the
3132 This section describes the LaTeX code you need to insert in your LaTeX
3133 preamble in order to get the desired effects.
3136 \begin_layout Standard
3137 For more information on fancy headers, see the
3138 \begin_inset Flex CharStyle:Code
3141 \begin_layout Plain Layout
3147 package documentation.
3149 \begin_inset Flex URL
3152 \begin_layout Plain Layout
3154 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3162 \begin_layout Standard
3163 The page header is divided into three fields, not surprisingly labeled
3164 \begin_inset Quotes eld
3168 \begin_inset Quotes erd
3172 \begin_inset Quotes eld
3176 \begin_inset Quotes erd
3180 \begin_inset Quotes eld
3184 \begin_inset Quotes erd
3188 The footer is also divided into these three fields.
3189 The LaTeX commands to set these fields in the simplest manner are
3190 \begin_inset Flex CharStyle:Code
3193 \begin_layout Plain Layout
3202 \begin_inset Flex CharStyle:Code
3205 \begin_layout Plain Layout
3214 \begin_inset Flex CharStyle:Code
3217 \begin_layout Plain Layout
3226 \begin_inset Flex CharStyle:Code
3229 \begin_layout Plain Layout
3238 Suppose you wish to put your name in the upper left hand corner of each
3240 Simply insert the following command in the preamble:
3243 \begin_layout Standard
3252 \begin_layout Standard
3253 You will now see your name in the upper left.
3254 If a field has a default entry that you would like to get rid of (often
3255 the page number appears in the central footer, simply include a command
3256 with a blank argument, e.
3257 \begin_inset space \thinspace{}
3263 \begin_layout Standard
3271 \begin_layout Standard
3272 Let's get really fancy: lets put the section number with the word
3273 \begin_inset Quotes eld
3277 \begin_inset Quotes erd
3281 \begin_inset space \thinspace{}
3285 \begin_inset space \space{}
3288 Section 3) in the upper left, the page number (e.
3289 \begin_inset space \thinspace{}
3293 \begin_inset space \space{}
3296 Page 4) in the upper right, your name in the lower left, and the date in
3298 The following commands should now appear in the preamble:
3301 \begin_layout Standard
3311 \begin_layout Standard
3319 \begin_layout Standard
3329 \begin_layout Standard
3338 \begin_layout Standard
3346 \begin_layout Standard
3356 \begin_layout Standard
3358 \begin_inset Flex CharStyle:Code
3361 \begin_layout Plain Layout
3370 \begin_inset Flex CharStyle:Code
3373 \begin_layout Plain Layout
3381 access LaTeX's section and page counters, and so print out the current
3382 section and page numbers.
3384 \begin_inset Flex CharStyle:Code
3387 \begin_layout Plain Layout
3395 simply prints out today's date.
3398 \begin_layout Standard
3399 The thicknesses of the horizontal rules drawn beneath the header and above
3400 the footer can also be modified.
3401 If you don't want one of the rules, set its thickness to 0.
3402 The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3408 \begin_inset Flex CharStyle:Code
3411 \begin_layout Plain Layout
3416 headrulewidth}{0.4pt}
3422 \begin_inset Flex CharStyle:Code
3425 \begin_layout Plain Layout
3430 footrulewidth}{0.4pt}
3435 to set the thicknesses.
3438 \begin_layout Standard
3439 You can switch the header/footer settings on and off for individual pages
3441 \begin_inset Flex CharStyle:Code
3444 \begin_layout Plain Layout
3447 thispagestyle{empty}
3453 \begin_inset Flex CharStyle:Code
3456 \begin_layout Plain Layout
3459 thispagestyle{plain}
3465 \begin_inset Flex CharStyle:Code
3468 \begin_layout Plain Layout
3471 thispagestyle{fancy}
3477 Simply insert them in the text on the page you want changed and mark them
3479 In fact, title pages are marked as plain by default, while following pages
3480 are marked fancy when using the global fancy setting.
3483 \begin_layout Standard
3484 As a final example, it is possible to include an image in the header or
3486 Suppose you want to put a company logo in the upper lefthand corner.
3487 You might try something like
3490 \begin_layout Standard
3499 includegraphics{logo.eps}}}
3502 \begin_layout Standard
3504 (you may need to preface this with
3505 \begin_inset Flex CharStyle:Code
3508 \begin_layout Plain Layout
3512 usepackage{graphics}
3517 if you don't include graphics elsewhere in your document).
3520 \begin_layout Section
3521 Itemize Bullet Selection
3522 \begin_inset CommandInset label
3531 \begin_layout Standard
3537 \begin_layout Subsection
3541 \begin_layout Standard
3542 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3543 Using this dialog you can easily specify what bullet shape to use at each
3544 level of an itemized list.
3545 These settings are document-wide so you won't be able to specify different
3546 sets of bullets for different paragraphs.
3550 \begin_layout Plain Layout
3551 Well, actually you can but you'll have to do it by hand.
3559 \begin_layout Subsection
3563 \begin_layout Standard
3564 Open the dialog by selecting the
3565 \begin_inset Flex CharStyle:MenuItem
3568 \begin_layout Plain Layout
3569 Document\SpecialChar \menuseparator
3575 menu item and then select the
3576 \begin_inset Flex CharStyle:MenuItem
3579 \begin_layout Plain Layout
3588 \begin_layout Standard
3589 The dialog provides you with a table of bullet shapes.
3590 A column of buttons on the left of the table provides access to the six
3591 different panels of bullet shapes.
3592 The row of buttons across the top is used to select which bullet depth
3594 A text entry under the table shows the currently selected bullet shape's
3595 LaTeX equivalent and this can be edited if desired.
3596 If you do modify the text you will also need to specify any needed packages
3597 in the LaTeX preamble.
3600 \begin_layout Standard
3601 The six panels are divided up by the packages they require.
3602 The following table shows the mappings from button name to LaTeX packages.
3605 \begin_layout Standard
3607 \begin_inset Tabular
3608 <lyxtabular version="3" rows="7" columns="2">
3609 <features tabularvalignment="middle">
3610 <column alignment="center" valignment="top" width="0pt">
3611 <column alignment="center" valignment="top" width="0pt">
3613 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3616 \begin_layout Plain Layout
3631 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3634 \begin_layout Plain Layout
3651 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3654 \begin_layout Plain Layout
3669 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3672 \begin_layout Plain Layout
3688 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3691 \begin_layout Plain Layout
3706 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3709 \begin_layout Plain Layout
3726 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3729 \begin_layout Plain Layout
3744 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3747 \begin_layout Plain Layout
3764 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3767 \begin_layout Plain Layout
3782 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3785 \begin_layout Plain Layout
3802 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3805 \begin_layout Plain Layout
3820 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3823 \begin_layout Plain Layout
3840 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3843 \begin_layout Plain Layout
3858 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3861 \begin_layout Plain Layout
3884 \begin_layout Standard
3885 LyX doesn't stop you using bullets from packages you don't have.
3886 If you get errors from LaTeX when you try to view or print the file, then
3887 it is likely you are missing a package.
3891 \begin_layout Plain Layout
3892 LyX doesn't restrict your use since you may be editing locally and exporting
3901 \begin_layout Subsection
3905 \begin_layout Standard
3906 Select which bullet depth you want to change then select the bullet shape
3908 Any changes will not be visible in LyX, but are visible when viewing the
3912 \begin_layout Standard
3913 You can reset a bullet shape to the default simply by clicking your right
3914 mouse button on the appropriate bullet depth button.
3918 \begin_layout Plain Layout
3923 want to have multiple sets of paragraphs with different sets of bullets
3924 in each, then you're going to have to get your hands dirty with TeX code.
3925 The bullet selection dialog can help though because it provides you with
3926 the LaTeX code for a wide range of bullet shapes.
3927 To make your own custom paragraphs you have the following options:
3930 \begin_layout Plain Layout
3934 \begin_layout Plain Layout
3950 \begin_layout Plain Layout
3954 \begin_layout Plain Layout
3976 \begin_layout Itemize
3977 Use the LaTeX command
3978 \begin_inset Flex CharStyle:Code
3981 \begin_layout Plain Layout
3989 to specify a new bullet shape for a given depth.
3990 You'll also need to save the current bullet shape so you can restore it
3992 In this itemized list the following LaTeX code was used to change the bullet
3993 used for the first depth.
3997 \begin_layout LyX-Code
4007 \begin_layout LyX-Code
4024 \begin_layout Itemize
4025 Note that the itemize depth is specified in Roman numerals as part of the
4035 \begin_layout Itemize
4039 \begin_layout Plain Layout
4052 Specify each individual entry by starting each item with the bullet shape
4053 enclosed in square brackets and set as
4054 \begin_inset Flex CharStyle:MenuItem
4057 \begin_layout Plain Layout
4064 For example, this item was started with
4065 \begin_inset Flex CharStyle:Code
4068 \begin_layout Plain Layout
4083 \begin_layout Plain Layout
4087 \begin_layout Plain Layout
4103 \begin_layout Plain Layout
4104 You'll also need to revert the labelitem back to its previous setting for
4105 the global bullet shape settings to remain in effect.
4106 The way used here was:
4109 \begin_layout LyX-Code
4124 \begin_layout Chapter
4125 LyX and the World Wide Web
4128 \begin_layout Standard
4129 LyX has long supported the export of documents to various web-friendly formats,
4131 Before verson 1.7, however, HTML export was always accomplished by the use
4132 of external converters.
4136 \begin_layout Plain Layout
4137 For details on the use of external converters with LyX, see the
4142 section of the Customization manual.
4147 These fall into two large groups: there are converters that use LaTeX as
4148 an intermediate format, such as
4149 \begin_inset Flex CharStyle:Code
4152 \begin_layout Plain Layout
4159 \begin_inset Flex CharStyle:Code
4162 \begin_layout Plain Layout
4169 \begin_inset Flex CharStyle:Code
4172 \begin_layout Plain Layout
4178 , relying upon LyX to produce the LaTeX; and there is a converter that works
4179 directly on LyX files,
4180 \begin_inset Flex CharStyle:Code
4183 \begin_layout Plain Layout
4190 All of these have different advantages and disadvantages.
4194 \begin_layout Standard
4195 The LaTeX-based converters have the advantage that, in principle, they know
4196 everything about the exported document that LaTeX does.
4197 Such converters do not care, for example, if a certain block of code was
4198 produced by LyX or was Evil Red Text.
4200 \begin_inset Flex CharStyle:Code
4203 \begin_layout Plain Layout
4209 files, counters, and references, and can often make use of the
4210 \begin_inset Flex CharStyle:Code
4213 \begin_layout Plain Layout
4219 files generated by BibTeX.
4220 On the other hand, LaTeX is a very hard language to parse---it is sometimes
4221 said that only TeX itself understands TeX---and LaTeX-based converters
4222 will often choke on what seem to be quite simple constructs; complex ones
4223 can throw them completely, and as of this writing, for example, the
4227 manual will not export with
4228 \begin_inset Flex CharStyle:Code
4231 \begin_layout Plain Layout
4237 , though the others will.
4238 The other issue concerns how math is handled.
4239 These converters typically convert the formulae into little pictures that
4240 are then linked from the HTML document.
4241 Since these are actually generated by LaTeX, they are accurate.
4242 But they do not scale well, and just getting them to look as if they are
4243 actually meant to be in your document---so that the font sizes seem to
4244 be roughly the same---can be a challenge.
4247 \begin_layout Standard
4249 \begin_inset Flex CharStyle:Code
4252 \begin_layout Plain Layout
4258 solves some of these problems.
4259 In particular, its rendering of math tends to look better than
4260 \begin_inset Flex CharStyle:Code
4263 \begin_layout Plain Layout
4269 's, at least in simpler cases, since it renders math using a neat combination
4270 of HTML and CSS rather than converting the formulae to images.
4271 But more complex formula tend to be rendered less well than with
4272 \begin_inset Flex CharStyle:Code
4275 \begin_layout Plain Layout
4281 , since there is no reasonable way of scaling parentheses in HTML, for example.
4282 More importantly (as of version 0.39, at least),
4283 \begin_inset Flex CharStyle:Code
4286 \begin_layout Plain Layout
4292 has no support for math macros, for user-defined paragraph or character
4293 styles, or for tables of contents and figures.
4294 These limitations make
4295 \begin_inset Flex CharStyle:Code
4298 \begin_layout Plain Layout
4304 unsuitable for many of the documents more advanced LyX users would produce.
4305 In principle, of course, all of these problems could be solved, but the
4306 LyX developers have decided to follow a different path and made LyX itself
4307 capable of writing XHTML, just as it is capable of writing LaTeX, DocBook,
4311 \begin_layout Standard
4312 As of this writing, XHTML output remains under development and should probably
4314 \begin_inset Quotes eld
4318 \begin_inset Quotes erd
4325 \begin_layout Plain Layout
4327 \begin_inset Flex CharStyle:Code
4330 \begin_layout Plain Layout
4331 development/HTML.notes
4336 , which can be found in the LyX source tree or
4337 \begin_inset CommandInset href
4339 name "accessed online"
4340 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4344 , usually contains up-to-date information about the state of XHTML output.
4349 Still, the developers have chosen this approach because it has several
4350 potential advantages over the other two.
4353 \begin_layout Standard
4354 These advantages are primarily due to the fact that the XHTML output routines,
4355 since they are part of LyX, know everything LyX knows about the document
4360 \begin_layout Plain Layout
4361 Another advantege is that, since these routines are internal to LyX, they
4362 are immune to changes in LyX's file format, or to changes in the semantics
4368 So they know about the table of contents (as displayed in the Outline),
4369 about the counters associated with different paragraph styles, and about
4370 user-defined styles.
4371 The XHTML output routines know what LyX knows about internationalization,
4372 too, so they will output
4373 \begin_inset Quotes eld
4377 \begin_inset Quotes erd
4381 \begin_inset Quotes eld
4389 \begin_inset Quotes erd
4392 , depending upon the language in effect at the time.
4396 \begin_layout Standard
4397 Quite generally, the output routines know everything LyX knows about document
4398 layout, that is, about the document is to be rendered on screen.
4399 We can use this information when we output the document as XHTML.
4404 generates CSS style information corresponding to the layout information
4405 it uses to render the document on screen: if section headings are supposed
4406 to be sans-serif and bold as seen in LyX, then (by default) they will be
4407 sans-serif and bold when viewed in a web browser, too.
4408 And this is true not just for pre-defined styles, like Section, but for
4409 any style, including user-defined styles.
4410 Indeed, the XHTML output routines make no distinction between user-defined
4411 paragraph and character styles and LyX's own pre-defined styles: in each
4412 case, everything LyX knows about the styles is contained in the layout
4414 And much the same is true as regards pre-defined textual insets, such as
4415 footnotes, and custom versions.
4419 \begin_layout Standard
4420 The result is that XHTML output can be customized and extended in
4424 the same way LaTeX output can be customized and extended: through layout
4426 See chapter five of the
4430 manual for the details.
4433 \begin_layout Standard
4434 As for math, LyX renders math using MathML.
4435 This has advantages and disadvantages.
4436 The advantage is that MathML is a dialect of XML designed specifically
4437 for mathematics on the web, and it typically renders very well in browsers
4439 The first disadvantage is that not all browsers support MathML, and support
4440 is not complete even in the Gecko-based browsers, such as Firefox.
4441 A second disadvantage, as compared to rendering math by images, is that
4442 LyX can only output MathML for LaTeX constructs that it knows about, which
4443 means that the use of ERT in math---e.g., the command
4444 \begin_inset Flex CharStyle:Code
4447 \begin_layout Plain Layout
4456 \begin_inset Flex CharStyle:Code
4459 \begin_layout Plain Layout
4465 package---will produce nothing helpful.
4466 Eventually, therefore, LyX will offer the user the option to use MathML
4467 or images, and it will offer this choice on a case by case basis.
4470 \begin_layout Standard
4471 The remainder of this chapter contains more detailed information on XHTML
4472 output, its limitations, and ways around those limitations.
4475 \begin_layout Standard
4476 \begin_inset Note Note
4479 \begin_layout Plain Layout
4480 This is very incomplete at this point!
4488 \begin_layout Section
4489 Bibliography and Citations
4492 \begin_layout Standard
4493 XHTML output fully supports bibliographies and citations.
4497 \begin_layout Standard
4498 Citation labels are generated by exactly the same machinery that generates
4499 LyX's on-screen labels, so the labels will look in the output much as they
4500 do in LyX, though better.
4501 If you are using numerical citations, then LyX will output numerical labels,
4502 such as [1] or [17], rather than simply showing the citation key in square
4503 brackets, as it does on-screen.
4504 If you are using author-year citations, then LyX will add lowercase letters
4505 to the years, just as BibTeX does, if it finds more than one citation for
4506 a given author-year combination.
4507 The labels will be printed with the bibliography entries.
4508 Note that there is, at present, no way to customize the appearance of the
4509 labels, for example, to choose between square brackets and parentheses.
4512 \begin_layout Standard
4513 Bibliography output is handled by the same machinery that handles the presentati
4514 on of reference information in the citation dialog, so you will see in the
4515 XHTML output pretty much what you would see if you were to look at a given
4516 entry in the citation dialog.
4517 The formatting can be customized in your layout file or, preferably, in
4520 \begin_inset CommandInset ref
4522 reference "sub:Citation-format-description"
4530 manual for the details.
4533 \begin_layout Standard
4534 The other significant defect is that cross-referenced information is printed
4535 with every entry with which it is associated.
4536 So you can see things like this:
4541 \begin_inset Quotes eld
4544 Context and Logical Form
4545 \begin_inset Quotes erd
4550 Language in Context: Selected Essays
4552 (Oxford: Oxford University Press, 2007), pp.
4558 \begin_inset Quotes eld
4561 Semantics in Context
4562 \begin_inset Quotes erd
4567 Language in Context: Selected Essays
4569 (Oxford: Oxford University Press, 2007), pp.
4573 \begin_layout Standard
4574 This should be fixed before long.
4577 \begin_layout Standard
4578 There is no support at present for sectioned bibliographies.
4579 If you have multiple bibliographies, then LyX will print the same bibliography
4583 \begin_layout Section
4587 \begin_layout Standard
4588 LyX will happily export indexes as XHTML, but with certain limitations at
4592 \begin_layout Standard
4593 Index export will be most reliable when you do not attempt to use the fancy
4594 constructs that are described in the section on indexes in the
4602 \begin_layout Plain Layout
4603 The main issue here is that LyX itself does not really handle these.
4604 It just lets you enter what you would have to enter in raw LaTeX.
4609 We'll describe how they are handled using the subsection headings from
4613 \begin_layout Itemize
4614 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
4615 these, but the entries must be separated by
4616 \begin_inset Quotes eld
4620 \begin_inset Quotes erd
4623 , that is, there must be spaces around the exclamation point.
4624 This is because it is otherwise too difficult to check for escaped exclamation
4625 points, ones in math, and so forth.
4628 \begin_layout Itemize
4629 Page Ranges: There is no support at all for page ranges, since these make
4630 no sense with XHMTL.
4631 Instead, you will just get two index entries, one at either end.
4634 \begin_layout Itemize
4635 Cross-referencing: There is no support for cross-referencing.
4636 If LyX finds an entry containing the
4637 \begin_inset Quotes eld
4640 |see\SpecialChar \ldots{}
4642 \begin_inset Quotes erd
4645 construct, it is just dropped, and the rest is treated as an ordinary index
4649 \begin_layout Itemize
4650 Index Entry Order: LyX does support attempts to fix the sorting order.
4651 It will take what is before the first `@' it finds and use that for sorting,
4652 taking what follows the first `@' to be the actual entry.
4653 At present, LyX does not check for escaped `@', so do not try to index
4657 \begin_layout Itemize
4658 Index Entry Layout: You can format entries by using the text style dialog,
4659 or by using any other method available within LyX itself.
4660 There is no support for constructs like:
4661 \begin_inset Quotes eld
4665 \begin_inset Quotes erd
4669 Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
4670 and everything that follows it.
4673 \begin_layout Itemize
4674 Multiple Indexes: There is no support for multiple indexes.
4675 Rather, all index entries will be printed as one large index.
4676 To avoid our printing several versions of the index, we print only the
4677 main index, so make sure you have one.
4680 \begin_layout Section
4681 Nomenclature and Glossary
4684 \begin_layout Standard
4685 There is at present no support for glossaries.
4688 \begin_layout Chapter
4692 \begin_layout Section
4696 \begin_layout Standard
4697 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
4698 and retrieve information about the LyX internal state.
4699 This is only intended for advanced users, but they should find it useful.
4700 It is by writing to the LyX server, for example, that bibliography managers,
4701 such as JabRef, are able to
4702 \begin_inset Quotes eld
4706 \begin_inset Quotes erd
4712 \begin_layout Section
4713 Starting the LyX Server
4716 \begin_layout Standard
4717 The LyX server works through the use of a pair of named pipes.
4718 These are usually located in
4719 \begin_inset Flex CharStyle:Code
4722 \begin_layout Plain Layout
4728 , (except on Windows, where
4732 named pipes are special objects located in
4733 \begin_inset Flex CharStyle:Code
4736 \begin_layout Plain Layout
4748 ) and have the names
4749 \begin_inset Quotes eld
4753 \begin_inset Flex CharStyle:Code
4756 \begin_layout Plain Layout
4763 \begin_inset Quotes erd
4767 \begin_inset Quotes eld
4771 \begin_inset Flex CharStyle:Code
4774 \begin_layout Plain Layout
4781 \begin_inset Quotes erd
4785 External programs write into
4786 \begin_inset Flex CharStyle:Code
4789 \begin_layout Plain Layout
4795 and read back data from
4796 \begin_inset Flex CharStyle:Code
4799 \begin_layout Plain Layout
4806 The stem of the pipe names can be defined in the
4807 \begin_inset Flex CharStyle:MenuItem
4810 \begin_layout Plain Layout
4811 Tools\SpecialChar \menuseparator
4818 \begin_inset Flex CharStyle:Code
4821 \begin_layout Plain Layout
4822 "/home/myhome/lyxpipe"
4828 \begin_inset Flex CharStyle:Code
4831 \begin_layout Plain Layout
4850 configure this manually in order for the server to start.
4853 \begin_layout Standard
4855 \begin_inset Flex CharStyle:Code
4858 \begin_layout Plain Layout
4865 \begin_inset Flex CharStyle:Code
4868 \begin_layout Plain Layout
4874 ' to create the pipes.
4875 If one of the pipes already exists, LyX will assume that another LyX process
4876 is already running and will not start the server.
4877 On POSIX (Unix like) systems, if for some other reason, an unused
4878 \begin_inset Quotes eld
4882 \begin_inset Quotes erd
4885 pipe is left in existence when LyX closes, then LyX will try to delete
4887 If this fails for some reason, you will need to delete the pipes manually
4888 and then restart LyX.
4889 On Windows, pipes are deleted by the OS on program termination or crash,
4891 \begin_inset Quotes eld
4895 \begin_inset Quotes erd
4898 pipes should not be possible.
4901 \begin_layout Standard
4902 To have several LyX processes with servers at the same time, you have to
4903 use different configurations, perhaps by using separate user directories,
4905 \begin_inset Flex CharStyle:Code
4908 \begin_layout Plain Layout
4914 file, for each process.
4917 \begin_layout Standard
4918 If you are developing a client program, you might find it useful to enable
4919 debugging information from the LyX server.
4920 Do this by starting LyX as
4921 \begin_inset Flex CharStyle:Code
4924 \begin_layout Plain Layout
4933 \begin_layout Standard
4934 You can find a complete example client written in C in the source distribution
4936 \begin_inset Flex CharStyle:Code
4939 \begin_layout Plain Layout
4940 development/lyxserver/server_monitor.c
4948 \begin_layout Standard
4949 Another useful tool is command-line based client you will find in
4950 \begin_inset Flex CharStyle:Code
4953 \begin_layout Plain Layout
4954 src/client/lyxclient
4962 \begin_layout Section
4963 Normal communication
4966 \begin_layout Standard
4967 To issue a LyX call, the client writes a line of ASCII text into the input
4969 This line has the following format:
4986 \begin_layout Description
4987 clientname is a name that the client can choose arbitrarily.
4988 Its only use is that LyX will echo it if it sends an answer—so a client
4989 can dispatch results from different requesters.
4992 \begin_layout Description
4993 function is the function you want LyX to perform.
4994 It is the same as the commands you'd use in the minibuffer.
4997 \begin_layout Description
4998 argument is an optional argument which is meaningful only to some functions
5000 \begin_inset Quotes eld
5004 \begin_inset Quotes erd
5007 LFUN will insert the argument as text at the cursor position).
5010 \begin_layout Standard
5011 The answer from LyX will arrive in the output pipe and be of the form
5028 \begin_layout Standard
5037 are just echoed from the command request, while
5041 is more or less useful information filled according to how the command
5042 execution worked out.
5043 Some commands, such as
5044 \begin_inset Quotes eld
5048 \begin_inset Quotes erd
5051 , will return information about the internal state of LyX, while other will
5052 return an empty data-response.
5053 This means that the command execution went fine.
5056 \begin_layout Standard
5057 In case of errors, the response from LyX will have this form
5074 \begin_layout Standard
5079 should contain an explanation of why the command failed.
5082 \begin_layout Standard
5086 \begin_layout LyX-Code
5087 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5088 \begin_inset Newline newline
5091 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5092 \begin_inset Newline newline
5095 read a <~/.lyxpipe.out
5096 \begin_inset Newline newline
5102 \begin_layout Section
5106 \begin_layout Standard
5107 LyX can notify clients of events going on asynchronously.
5108 Currently it will only do this if the user binds a key sequence with the
5110 \begin_inset Quotes eld
5114 \begin_inset Quotes erd
5118 The format of the string LyX sends is as follows:
5122 \begin_inset Flex CharStyle:Code
5125 \begin_layout Plain Layout
5136 \begin_layout Standard
5141 is the printed representation of the key sequence that was actually typed
5145 \begin_layout Standard
5146 This mechanism can be used to extend LyX's command set and implement macros.
5147 Bind some key sequence to
5148 \begin_inset Quotes eld
5152 \begin_inset Quotes erd
5156 Then start a client that listens on the output pipe, dispatches the command
5157 according to the sequence, and starts a function that may use LyX calls
5158 and LyX requests to issue a command or a series of commands to LyX.
5161 \begin_layout Section
5162 The simple LyX Server Protocol
5165 \begin_layout Standard
5166 LyX implements a simple protocol that can be used for session management.
5167 All messages are of the form
5180 \begin_layout Standard
5186 \begin_inset Quotes eld
5190 \begin_inset Quotes erd
5194 \begin_inset Quotes eld
5198 \begin_inset Quotes erd
5203 \begin_inset Quotes eld
5207 \begin_inset Quotes erd
5210 is received from a client, LyX will report back to inform the client that
5211 it's listening to it's messages, while
5212 \begin_inset Quotes eld
5216 \begin_inset Quotes erd
5219 sent from LyX will inform clients that LyX is closing.
5222 \begin_layout Section
5223 Reverse DVI/PDF search
5226 \begin_layout Standard
5227 Some DVI/PDF viewers
5231 \begin_layout Plain Layout
5232 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5233 Skim on Mac OSX and SumatraPDF on Windows.
5242 facility (also called
5247 This means that you can tell LyX to put the cursor to a specific line in
5248 the document by clicking at the respective position in the DVI/PDF output.
5249 To achieve this, the viewer must be able to communicate with LyX.
5250 This is done via the LyX server either by using the named pipe (
5254 ), or the UNIX domain socket (
5258 ) that LyX creates in its temporary directory (this is the way the
5259 \begin_inset Flex CharStyle:Code
5262 \begin_layout Plain Layout
5268 program communicates with LyX).
5269 In some cases, you need a helper script that mediates between the viewer
5270 and LyX, in others, the viewer can communicate with LyX directly.
5271 This depends on the selected viewer and on your operating system.
5272 The same applies to the way viewers need to be configured and the way the
5273 reverse search is actually performed.
5274 In what follows, we will thus describe how to setup reverse search for
5276 Before we turn to this, though, we will explain what needs to be done generally
5277 to enable reverse search in the DVI/PDF output.
5280 \begin_layout Subsection
5282 \change_inserted 1 1271453726
5283 \begin_inset CommandInset label
5285 name "sub:rev-search"
5291 Enabling reverse search
5294 \begin_layout Standard
5295 LaTeX provides several different methods for reverse search.
5296 Some are built-in in the
5297 \begin_inset Flex CharStyle:Code
5300 \begin_layout Plain Layout
5306 program, some are provided by external packages.
5307 Your choice depends on whether your LaTeX distribution already provides
5308 a given method (the built-in methods are rather new) and whether your viewer
5310 The available methods are described in the following.
5313 \begin_layout Subsubsection*
5314 Built-in DVI-search via src-specials (DVI only)
5317 \begin_layout Standard
5318 This method provides the DVI file with the necessary information for reverse
5320 It is available in LaTeX since quite some time (any somewhat recent LaTeX
5321 distribution should include it), and it works reliably.
5322 To enable it, change the
5323 \begin_inset Flex CharStyle:MenuItem
5326 \begin_layout Plain Layout
5331 \begin_layout Plain Layout
5344 \begin_inset Flex CharStyle:MenuItem
5347 \begin_layout Plain Layout
5352 \begin_layout Plain Layout
5359 eX (plain)->DraftDVI
5365 \begin_inset Flex CharStyle:MenuItem
5368 \begin_layout Plain Layout
5369 Preferences\SpecialChar \menuseparator
5370 File Handling\SpecialChar \menuseparator
5377 \begin_inset Flex CharStyle:Code
5380 \begin_layout Plain Layout
5381 latex -src-specials $$i
5387 If this doesn't work, check if your TeX engine needs different options
5388 (the syntax might differ in some distributions).
5391 \begin_layout Subsubsection*
5392 External Packages (PDFSync and scrltx)
5395 \begin_layout Standard
5404 provide reverse search facility for PDF output (via pdflatex) and DVI output,
5406 In order to enable it, load the packages in the LyX preamble:
5409 \begin_layout Itemize
5410 \begin_inset Flex CharStyle:Code
5413 \begin_layout Plain Layout
5421 for reverse PDF search,
5424 \begin_layout Itemize
5426 \begin_inset Flex CharStyle:Code
5429 \begin_layout Plain Layout
5432 usepackage[active]{srcltx}
5437 for reverse DVI search.
5440 \begin_layout Standard
5441 If you want to be able to perform both DVI and PDF reverse searches, you
5442 can also insert in the preamble the following lines
5445 \begin_layout LyX-Code
5449 \begin_inset Newline newline
5455 \begin_inset Newline newline
5461 \begin_inset Newline newline
5467 \begin_inset Newline newline
5472 usepackage[active]{srcltx}
5473 \begin_inset Newline newline
5481 \begin_layout Standard
5482 This way, you can preview the file as either DVI or PDF (pdflatex) and the
5483 right package will be used.
5486 \begin_layout Standard
5487 Note that PDFSync might affect the output layout of your document.
5488 It is therefore advised to disable PDFsync for final documents.
5491 \begin_layout Subsubsection*
5492 Built-in reverse search via SyncTeX (DVI and PDF)
5495 \begin_layout Standard
5497 \begin_inset Flex CharStyle:Code
5500 \begin_layout Plain Layout
5506 have built-in support for both PDF and DVI reverse search.
5511 facility is basically the result of the integration of the PDFSync package
5512 to the pdftex program and its merge with the
5517 You need at least TeXLive 2008 or a recent MikTeX distribution in order
5519 Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
5520 already provide SyncTeX support.
5523 \begin_layout Standard
5524 To enable SyncTeX for DVI output, change the
5525 \begin_inset Flex CharStyle:MenuItem
5528 \begin_layout Plain Layout
5533 \begin_layout Plain Layout
5546 \begin_inset Flex CharStyle:MenuItem
5549 \begin_layout Plain Layout
5554 \begin_layout Plain Layout
5561 eX (plain) -> DraftDVI
5567 \begin_inset Flex CharStyle:MenuItem
5570 \begin_layout Plain Layout
5571 Preferences\SpecialChar \menuseparator
5572 File Handling\SpecialChar \menuseparator
5579 \begin_inset Flex CharStyle:Code
5582 \begin_layout Plain Layout
5583 latex -synctex=1 $$i
5588 , and for PDF output, change the
5589 \begin_inset Flex CharStyle:MenuItem
5592 \begin_layout Plain Layout
5597 \begin_layout Plain Layout
5604 eX (pdflatex) -> PDF (pdflatex)
5610 \begin_inset Flex CharStyle:Code
5613 \begin_layout Plain Layout
5614 pdflatex -synctex=1 $$i
5620 Check the documentation of your viewer whether the viewer needs to be configure
5621 d for the use with SyncTeX.
5625 \begin_layout Plain Layout
5627 \begin_inset Flex CharStyle:Code
5630 \begin_layout Plain Layout
5636 option enables gzip compression.
5637 If your viewer does not support it, you should instead use
5638 \begin_inset Flex CharStyle:Code
5641 \begin_layout Plain Layout
5655 \begin_layout Subsection
5656 Configuring and using specific viewers
5659 \begin_layout Subsubsection*
5660 Xdvi (all platforms)
5663 \begin_layout Standard
5665 \begin_inset Flex CharStyle:Code
5668 \begin_layout Plain Layout
5674 , you don't need to do anything else for performing a reverse DVI search,
5675 as LyX already provides the necessary hooks for automatically using the
5677 \begin_inset Flex CharStyle:Code
5680 \begin_layout Plain Layout
5687 Just setup your document as described above (reverse search is triggered
5688 by Ctrl-click or Alt-click on Mac OSX, respectively).
5691 \begin_layout Standard
5692 However, if for whatever reason you want to use the named pipe instead of
5693 the socket for communicating with LyX, simply change the DVI viewer in
5695 \begin_inset Flex CharStyle:MenuItem
5698 \begin_layout Plain Layout
5699 Preferences\SpecialChar \menuseparator
5700 File Handling\SpecialChar \menuseparator
5710 \begin_layout Plain Layout
5711 On Mac OSX you have to use
5712 \begin_inset Flex CharStyle:Code
5715 \begin_layout Plain Layout
5716 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
5727 \begin_inset Flex CharStyle:Code
5730 \begin_layout Plain Layout
5731 xdvi -editor 'lyxeditor.sh %f %l'
5737 \begin_inset Flex CharStyle:Code
5740 \begin_layout Plain Layout
5746 is a suitable script.
5747 For example, a minimal shell script is the following one:
5750 \begin_layout LyX-Code
5752 \begin_inset Newline newline
5755 LYXPIPE="/path/to/lyxpipe"
5756 \begin_inset Newline newline
5759 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
5760 \begin_inset Newline newline
5763 echo "$COMMAND" > "${LYXPIPE}".in || exit
5764 \begin_inset Newline newline
5767 read < "${LYXPIPE}".out || exit
5770 \begin_layout Standard
5772 \begin_inset Flex CharStyle:Code
5775 \begin_layout Plain Layout
5785 \begin_layout Plain Layout
5792 XServer pipe path specified in
5793 \begin_inset Flex CharStyle:MenuItem
5796 \begin_layout Plain Layout
5797 Preferences\SpecialChar \menuseparator
5807 \begin_layout Plain Layout
5809 \begin_inset Flex CharStyle:Code
5812 \begin_layout Plain Layout
5818 folder of a source distribution you can find a
5819 \begin_inset Flex CharStyle:Code
5822 \begin_layout Plain Layout
5828 script which is able to locate the
5832 based on your preferences.
5840 \begin_layout Subsubsection*
5844 \begin_layout Standard
5846 \begin_inset Flex CharStyle:Code
5849 \begin_layout Plain Layout
5850 /Applications/MacDviX_Folder/calleditor.script
5855 , add the following lines:
5858 \begin_layout LyX-Code
5863 \begin_layout Plain Layout
5870 X.app/Contents/MacOS/lyxeditor "$2" $1
5871 \begin_inset Newline newline
5877 \begin_layout Standard
5878 Modify the lines accordingly if you install LyX somewhere else than in the
5879 Applications folder.
5882 \begin_layout Standard
5883 Reverse search is triggered by Alt-click (OPTION-click).
5886 \begin_layout Subsubsection*
5890 \begin_layout Standard
5892 \begin_inset Flex CharStyle:Code
5895 \begin_layout Plain Layout
5896 open -a Skim.app $$i
5901 to the viewer setting in
5902 \begin_inset Flex CharStyle:MenuItem
5905 \begin_layout Plain Layout
5906 Preferences\SpecialChar \menuseparator
5907 File Handling\SpecialChar \menuseparator
5908 File formats\SpecialChar \menuseparator
5915 \begin_inset Flex CharStyle:MenuItem
5918 \begin_layout Plain Layout
5919 Skim\SpecialChar \menuseparator
5920 Preferences\SpecialChar \menuseparator
5930 \begin_layout Plain Layout
5940 \begin_layout Standard
5941 Reverse search is triggered by COMMAND-SHIFT-click
5944 \begin_layout Subsubsection*
5948 \begin_layout Standard
5950 \begin_inset Flex CharStyle:MenuItem
5953 \begin_layout Plain Layout
5954 Settings\SpecialChar \menuseparator
5955 Configure Okular\SpecialChar \ldots{}
5956 \SpecialChar \menuseparator
5963 \begin_inset Quotes eld
5967 \begin_inset Quotes erd
5971 \begin_inset Flex CharStyle:Code
5974 \begin_layout Plain Layout
5983 \begin_layout Standard
5984 Reverse search is triggered by SHIFT-click.
5987 \begin_layout Subsubsection*
5991 \begin_layout Standard
5992 Launch yap, choose its
5993 \begin_inset Flex CharStyle:MenuItem
5996 \begin_layout Plain Layout
5997 View\SpecialChar \menuseparator
6004 \begin_inset Quotes eld
6008 \begin_inset Quotes erd
6013 \begin_inset Quotes eld
6016 New\SpecialChar \ldots{}
6018 \begin_inset Quotes erd
6021 button and, in the window that opens, enter
6022 \begin_inset Quotes eld
6026 \begin_inset Quotes erd
6029 (or any other name you like) in the
6030 \begin_inset Quotes eld
6034 \begin_inset Quotes erd
6038 Now click on the button labeled
6039 \begin_inset Quotes eld
6042 \SpecialChar \ldots{}
6044 \begin_inset Quotes erd
6047 to open a file dialog and navigate to the directory containing the batch
6049 \begin_inset Flex CharStyle:Code
6052 \begin_layout Plain Layout
6060 \begin_inset Flex CharStyle:Code
6063 \begin_layout Plain Layout
6069 and then specify the program arguments as
6070 \begin_inset Flex CharStyle:Code
6073 \begin_layout Plain Layout
6081 \begin_inset Flex CharStyle:Code
6084 \begin_layout Plain Layout
6090 wrapper is used for communicating with LyX through the
6097 \begin_layout LyX-Code
6099 \begin_inset Newline newline
6102 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
6111 \begin_inset Newline newline
6125 \begin_layout Standard
6126 Make sure that the LyXServer pipe path you specified in LyX is
6127 \begin_inset Flex CharStyle:Code
6130 \begin_layout Plain Layout
6144 , otherwise change the
6145 \begin_inset Flex CharStyle:Code
6148 \begin_layout Plain Layout
6154 wrapper accordingly.
6157 \begin_layout Standard
6158 In yap, reverse search is triggered by double-click.
6161 \begin_layout Subsubsection*
6162 SumatraPDF (Windows)
6165 \begin_layout Standard
6166 In order to use SumatraPDF for inverse search, enter
6167 \begin_inset Flex CharStyle:Code
6170 \begin_layout Plain Layout
6171 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6176 in the viewer setting in
6177 \begin_inset Flex CharStyle:MenuItem
6180 \begin_layout Plain Layout
6181 Preferences\SpecialChar \menuseparator
6182 File Handling\SpecialChar \menuseparator
6183 File formats\SpecialChar \menuseparator
6190 \begin_inset Flex CharStyle:Code
6193 \begin_layout Plain Layout
6199 is the previous wrapper.
6200 If SumatraPDF.exe is not in your command PATH, use its full file name.
6203 \begin_layout Standard
6204 Reverse search is triggered by double-click.
6207 \begin_layout Subsubsection*
6211 \begin_layout Standard
6212 First of all, make sure that yap is your default DVI viewer in the Windows
6213 environment, then launch it, choose its
6214 \begin_inset Flex CharStyle:MenuItem
6217 \begin_layout Plain Layout
6218 View\SpecialChar \menuseparator
6225 \begin_inset Quotes eld
6229 \begin_inset Quotes erd
6234 \begin_inset Quotes eld
6237 New\SpecialChar \ldots{}
6239 \begin_inset Quotes erd
6242 button and, in the window that opens, enter
6243 \begin_inset Quotes eld
6247 \begin_inset Quotes erd
6250 (or any other name you like) in the
6251 \begin_inset Quotes eld
6255 \begin_inset Quotes erd
6259 Now click on the button labeled
6260 \begin_inset Quotes eld
6263 \SpecialChar \ldots{}
6265 \begin_inset Quotes erd
6268 to open a file dialog and navigate to the directory containing the
6269 \begin_inset Flex CharStyle:Code
6272 \begin_layout Plain Layout
6278 program (which is installed by default on Cygwin along with the LyX executable).
6280 \begin_inset Flex CharStyle:Code
6283 \begin_layout Plain Layout
6289 and then specify the program arguments as
6290 \begin_inset Flex CharStyle:Code
6293 \begin_layout Plain Layout
6300 In this way, you will be using the
6304 for communicating with LyX.
6305 If, for whatever reason, you want to use the
6310 \begin_inset Flex CharStyle:Code
6313 \begin_layout Plain Layout
6319 option and be sure to specify the LyXServer pipe path in the LyX preferences.
6322 \begin_layout Standard
6323 In yap, reverse search is triggered by double-click.
6326 \begin_layout Subsubsection*
6330 \begin_layout Standard
6331 In order to use SumatraPDF for inverse search, enter
6332 \begin_inset Flex CharStyle:Code
6335 \begin_layout Plain Layout
6341 in the viewer setting in
6342 \begin_inset Flex CharStyle:MenuItem
6345 \begin_layout Plain Layout
6346 Preferences\SpecialChar \menuseparator
6347 File Handling\SpecialChar \menuseparator
6348 File formats\SpecialChar \menuseparator
6355 \begin_inset Flex CharStyle:Code
6358 \begin_layout Plain Layout
6364 is the following script (to be placed in your command PATH,
6365 \begin_inset Flex CharStyle:Code
6368 \begin_layout Plain Layout
6374 being the best choice):
6377 \begin_layout LyX-Code
6379 \begin_inset Newline newline
6383 \begin_inset Newline newline
6386 SumatraPDF -inverse-search "lyxeditor -g %f %l" $(basename $1)
6389 \begin_layout Standard
6390 This wrapper script is needed because SumatraPDF is a native Windows application
6391 and does not understand the posix paths used by the Cygwin version of LyX.
6392 If SumatraPDF.exe is not in your command PATH, use its full posix path in
6395 \begin_inset Flex CharStyle:Code
6398 \begin_layout Plain Layout
6404 enables communication via the
6410 \begin_inset Flex CharStyle:Code
6413 \begin_layout Plain Layout
6419 option if you want to use the
6423 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6426 \begin_layout Standard
6427 Reverse search is triggered by double-click.
6428 \change_inserted 1 1271453423
6432 \begin_layout Section
6434 \change_inserted 1 1271453442
6438 \begin_layout Standard
6440 \change_inserted 1 1271454338
6441 To make forward search possible you need to provide generated output PDF/DVI
6442 file with additional information about TeX sources.
6443 This can be done via the methods described in the section
6444 \begin_inset CommandInset ref
6446 reference "sub:rev-search"
6453 \begin_layout Standard
6455 \change_inserted 1 1271454479
6456 Secondly you need to configure LyX for using your viewers in
6457 \begin_inset Flex CharStyle:MenuItem
6460 \begin_layout Plain Layout
6462 \change_inserted 1 1271453866
6463 Preferences\SpecialChar \menuseparator
6464 Output\SpecialChar \menuseparator
6471 Only some of the viewers allows this operation --- yap, xdvi, okular, Sumatra
6476 \begin_layout Plain Layout
6478 \change_inserted 1 1271454273
6479 For Sumatra CMCDDE is needed --- downloadable from http://www.istri.fr/zip/CMCDDE.z
6488 Some other viewers allow at least reloading and positioning to particular
6489 page of the file --- Evince or xpdf --- for these cases you can use external
6491 Please study the prepared examples in the Preferences dialog.
6496 \begin_layout Chapter
6497 Special Document Classes
6500 \begin_layout Section
6504 \begin_layout Standard
6510 \begin_layout Subsection
6514 \begin_layout Standard
6515 This section describes how LyX can be used to write articles for submission
6516 to the scientific journal
6518 Astronomy and Astrophysics
6520 (www.edpsciences.fr/aa/
6521 \begin_inset Flex URL
6524 \begin_layout Plain Layout
6526 http://www.edpsciences.fr/aa/
6531 ) using Version 5.01 of the document class
6536 This package can be downloaded from the ftp site
6539 \begin_layout Standard
6540 \begin_inset VSpace medskip
6546 \begin_layout Standard
6548 \begin_inset Flex URL
6551 \begin_layout Plain Layout
6553 ftp://ftp.edpsciences.org/pub/aa/readme.html
6561 \begin_layout Standard
6562 \begin_inset VSpace medskip
6568 \begin_layout Standard
6569 A manual comes together with that package, and this text is not meant to
6570 replace the original manual but merely a short guide how to realize the
6571 correct form of your paper.
6575 \begin_layout Standard
6576 Please note that the publisher of the journal was changed from Springer
6577 to EDP Sciences starting January 1, 2001.
6578 That change implicated also some slight changes of the style files, namely
6579 the removal of the thesaurus command.
6580 The LyX class aa supports the newest version of these style files, V 5.01.
6581 If you have an older version installed, please upgrade.
6582 For compatibility, the old (version 4) layout has been kept as
6587 Please refer to the comments in
6589 LyXDir/layouts/aapaper.layout
6594 \begin_layout Subsection
6598 \begin_layout Standard
6599 It is recommended you start from the example template distributed with LyX.
6600 If you are not using a template, note the following settings:
6603 \begin_layout Itemize
6610 Document\SpecialChar \menuseparator
6613 dialog (OK, that one was obvious).
6616 \begin_layout Itemize
6617 Don't change the option
6620 \begin_inset space ~
6630 The whole layout is done by the macros, you shouldn't change anything.
6633 \begin_layout Subsection
6637 \begin_layout Standard
6638 First thing to enter is the header information.
6639 It consists of seven entries, of which some are optional.
6643 \begin_layout Itemize
6651 \begin_layout Itemize
6659 \begin_layout Itemize
6667 \begin_layout Itemize
6675 \begin_layout Itemize
6680 : [optional] if more than one author: whom to contact for offprint requests.
6683 \begin_layout Itemize
6688 : [optional] mail address for contacts.
6691 \begin_layout Itemize
6699 Received: <date>; Accepted <date>
6702 \begin_layout Standard
6703 There is no need to issue the
6709 command, this is done automatically by LyX when the header is finished.
6710 Although the order of the single header entries doesn't matter it is advised
6711 to keep the above sequence, just to get the best optics and meets the layout
6712 of the real document.
6715 \begin_layout Standard
6716 If you want to place footnotes in the header block, e.
6717 \begin_inset space \thinspace{}
6721 \begin_inset space \space{}
6724 to state your present address, just use the standard footnote via the menu
6727 Insert\SpecialChar \menuseparator
6731 LyX will automagically use the term
6740 \begin_layout Standard
6741 In addition to these topics, the macros use three additional LaTeX commands
6742 that have no counterpart in LyX:
6745 \begin_layout Itemize
6752 to separate different names for more than one author and institute, respectivel
6756 \begin_layout Itemize
6763 to mark corresponding author/institute pairs.
6764 The institutes are numbered sequentially as they appear in the
6768 field, so you have to put a marker to each author.
6771 \begin_layout Itemize
6778 to supply an email address for fast contact.
6781 \begin_layout Standard
6782 In all cases, the appropriate command has to be entered in LyX and marked
6788 \begin_layout Subsection
6792 \begin_layout Standard
6793 The abstract should immediately follow the header block.
6794 With version 5 the abstract environment was changed to a command, and there
6795 is now a resctriction to only one paragraph.
6796 In addition, it should contain an entry with the keywords.
6797 This is not yet implemented for LyX, therefore you have to enter the LaTeX
6804 by hand and mark it as LaTeX code.
6805 Refer to the example paper.
6808 \begin_layout Subsection
6809 Supported environments
6812 \begin_layout Standard
6813 The A&A paper layout supports the following environments for structuring
6817 \begin_layout Itemize
6823 \begin_layout Itemize
6829 \begin_layout Itemize
6835 \begin_layout Itemize
6841 \begin_layout Itemize
6847 \begin_layout Itemize
6853 \begin_layout Itemize
6859 \begin_layout Itemize
6865 \begin_layout Itemize
6871 \begin_layout Itemize
6877 \begin_layout Itemize
6883 \begin_layout Itemize
6889 \begin_layout Subsection
6890 Commands not supported by LyX
6893 \begin_layout Standard
6894 Some commands are not yet supported by the
6899 Some have already been mentioned.
6900 For the sake of completeness, they are listed all together here:
6903 \begin_layout Itemize
6911 \begin_layout Itemize
6919 \begin_layout Itemize
6927 \begin_layout Itemize
6935 \begin_layout Itemize
6943 \begin_layout Itemize
6951 \begin_layout Itemize
6959 \begin_layout Itemize
6967 \begin_layout Standard
6968 If you want to use any of these commands, you have to enter them yourself.
6971 Do not forget to mark them as LaTeX code!
6974 \begin_layout Subsection
6975 Figure and Table Floats
6978 \begin_layout Standard
6979 LyX provides support for the necessary float environments
6981 figure, figure*, table
6987 , therefore we won't tell much about it here.
6991 \begin_inset space ~
6997 Just remember that tables should be left-aligned.
6998 For that, select the table and change the alignment in
7000 Edit\SpecialChar \menuseparator
7002 \begin_inset space ~
7008 \begin_layout Standard
7009 There is only one special thing: the figures with caption besides the figure.
7010 To create such a figure, you have to do the following:
7013 \begin_layout Enumerate
7014 Create a wide figure float:
7016 Insert\SpecialChar \menuseparator
7017 Float\SpecialChar \menuseparator
7020 , then right click in the figure and select
7026 \begin_inset space ~
7034 \begin_layout Enumerate
7035 Enter your caption text.
7038 \begin_layout Enumerate
7043 to move the cursor above the caption.
7046 \begin_layout Enumerate
7050 \begin_layout Enumerate
7051 Position the cursor behind the figure and insert a horizontal fill:
7053 Insert\SpecialChar \menuseparator
7055 \begin_inset space ~
7058 Character\SpecialChar \menuseparator
7060 \begin_inset space ~
7068 \begin_layout Enumerate
7069 Switch to LaTeX mode:
7072 \begin_inset space ~
7080 \begin_layout Enumerate
7090 Do not close the brace!
7093 \begin_layout Enumerate
7094 Position the cursor behind the caption text, switch to LaTeX mode and insert
7098 \begin_inset space ~
7110 \begin_layout Standard
7111 Also, refer to the figures in the example paper.
7114 \begin_layout Subsection
7118 \begin_layout Standard
7119 For submission, the paper has to be formated in a special double-spacing
7121 For this purpose, you have to give the option
7125 to the documentclass.
7126 This must be done using the extra class options field in the
7128 Document\SpecialChar \menuseparator
7132 Just enter the string
7139 \begin_layout Subsection
7143 \begin_layout Standard
7148 directory contains an example paper written with LyX.
7149 It is the example paper from the original macro package, translated to
7151 Use it for inspiration, and compare the original LaTeX code with LyX way
7155 \begin_layout Section
7159 \begin_layout Standard
7165 \begin_layout Subsection
7169 \begin_layout Standard
7170 AASTeX is a set of macros produced by the American Astronomical Society
7171 to facilitate electronic manuscript submission to the three journals they
7172 publish: the Astrophysical Journal (including the Letters and Supplement),
7173 the Astronomical Journal, and the Publications of the Astronomical Society
7175 LyX has proven to be an excellent tool for generating these documents,
7176 especially given its equation, citation, and figure handling capabilities.
7177 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7178 is the version described here, or higher.
7179 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7180 incompatible with LyX.
7181 The AASTeX package may be downloaded from the AASTeX Web site
7184 \begin_layout Standard
7185 \begin_inset VSpace medskip
7191 \begin_layout Standard
7193 \begin_inset Flex URL
7196 \begin_layout Plain Layout
7198 http://www.journals.uchicago.edu/AAS/AASTeX
7206 \begin_layout Standard
7207 \begin_inset VSpace medskip
7213 \begin_layout Standard
7214 A complete user guide is contained in that package and you should familiarize
7215 yourself with it thoroughly before embarking on writing a paper in LyX.
7216 LyX will not reduce the need to figure out all the AASTeX commands, it
7217 will only reduce the drudgery of typing everything in.
7218 It is your responsibility to ensure that the final exported LaTeX document
7219 conforms completely to the requirements of the journal to which you are
7220 submitting your paper.
7223 \begin_layout Subsection
7224 Starting a New Paper
7227 \begin_layout Standard
7228 I strongly suggest that you start with the AASTeX template file.
7231 File\SpecialChar \menuseparator
7238 , enter the new file name, then choose the
7243 This will show the most common fields found in a manuscript.
7244 Simply overwrite the existing text (including the brackets,
7248 ) with the correct information.
7249 Many of the AASTeX commands and environments can be implemented directly
7250 in LyX, but some cannot: most noticeably
7262 , which should stick out like a sore thumb if you actually just opened the
7264 For commands such as these, the LaTeX code must be entered directly and
7266 Such commands are referred to as TeX code, or Evil Red Text.
7267 I tried to minimize the amount of TeX code needed in an AASTeX document,
7268 but there is still a bit more required than any of us would like.
7271 \begin_layout Subsection
7272 Finishing Your Paper
7275 \begin_layout Standard
7276 When the paper is finished to your satisfaction and previews/prints correctly,
7278 \begin_inset Quotes eld
7282 \begin_inset Quotes erd
7285 actions which need to be done before you submit it to the journals.
7289 \begin_layout Enumerate
7290 Export your paper as a LaTeX file (
7292 File\SpecialChar \menuseparator
7293 Export\SpecialChar \menuseparator
7300 \begin_layout Enumerate
7305 file with your favorite text editor
7309 \begin_layout Enumerate
7310 remove the comment lines before the
7319 \begin_layout Enumerate
7324 usepackage...{fontenc}
7326 line if it appears (usually just after
7341 \begin_layout Enumerate
7342 remove everything between (and including) the
7354 commands, except for any commands you specifically put into the LaTeX preamble
7355 (which should appear immediately after the
7356 \begin_inset Quotes eld
7359 User specified LaTeX commands
7360 \begin_inset Quotes erd
7371 \begin_layout Enumerate
7372 Run the resulting file through LaTeX to make sure it still processes correctly.
7375 \begin_layout Enumerate
7376 Reread the journal requirements to make sure your filenames and formats
7380 \begin_layout Enumerate
7384 \begin_layout Subsection
7385 Comments On Specific Commands
7388 \begin_layout Standard
7389 I will not describe the detailed usage of the individual AASTeX commands:
7390 the AASTeX User Guide (
7394 ) gives a good description of each.
7395 Thus it's probably easiest for me to go down the list as found in the guide
7396 and offer comments where necessary.
7397 So let's begin \SpecialChar \ldots{}
7401 \begin_layout Subsubsection
7402 Things that work as expected
7405 \begin_layout Standard
7409 \begin_layout Plain Layout
7421 \begin_layout Standard
7422 Because they work as you might expect, I simply list them and the section
7523 begin{thebibliography}
7531 (2.13.2), all the cite commands and their variations (2.13.2), the generic
7532 graphicx figure commands (2.14.1),
7556 (2.15.4, amongst other places),
7583 \begin_layout Standard
7584 The following style options also work correctly:
7605 Simply put them in the
7611 Layout\SpecialChar \menuseparator
7617 \begin_layout Standard
7621 \begin_layout Plain Layout
7633 \begin_layout Subsubsection
7634 Things that work, but require more comment
7637 \begin_layout Standard
7638 The following items work, but require a little more discussion:
7641 \begin_layout Itemize
7642 These items are reserved for use by the journal editors, but you can put
7643 them into the LaTeX preamble if you feel compelled to do so:
7676 \begin_layout Itemize
7677 These items may be placed in the LaTeX preamble, and are included as blanks
7678 in the template file:
7699 \begin_layout Itemize
7706 (2.3) – can only be used
7707 \begin_inset Quotes eld
7711 \begin_inset Quotes erd
7714 , not in the middle of a paragraph.
7715 Use TeX code if you need to embed it.
7718 \begin_layout Itemize
7725 (2.3) – will have extra {} after it.
7726 This should not cause an error.
7729 \begin_layout Itemize
7736 (2.6) – can only be used
7737 \begin_inset Quotes eld
7741 \begin_inset Quotes erd
7744 , not in the middle of a paragraph.
7745 Use TeX code if you need to embed it.
7748 \begin_layout Itemize
7755 (2.8) – can't insert a cross-reference tag, you must type the tag name by
7759 \begin_layout Itemize
7773 \begin_layout Itemize
7780 (2.9) – will have extra {} after it.
7781 This should not cause an error.
7784 \begin_layout Itemize
7791 (2.11) – will have extra {} after it.
7792 This should not cause an error.
7795 \begin_layout Itemize
7802 (2.14.2) – you can insert an optional filename argument by placing the cursor
7803 at the beginning of the text and selecting
7805 Insert\SpecialChar \menuseparator
7810 \begin_inset Quotes eld
7814 \begin_inset Quotes erd
7817 inserts an optional argument of the type needed by
7824 Hopefully it will be renamed someday.
7827 \begin_layout Itemize
7840 for the catalog ID optional parameter
7843 \begin_layout Itemize
7856 for the catalog ID optional parameter
7859 \begin_layout Subsubsection
7860 Things not implemented, use TeX code
7863 \begin_layout Standard
7867 \begin_layout Plain Layout
7879 \begin_layout Standard
7902 setcounter{equation}
7904 (2.12), Journal name abbreviations (2.13.4),
7940 (2.15.4, insert it as the first element in the lefthand cell after where
7942 Don't use any of LyX's rules in the table),
7954 (2.15.5), much of Misc (2.17, except
8005 \begin_layout Standard
8009 \begin_layout Plain Layout
8021 \begin_layout Subsubsection
8022 Things that cannot be implemented
8025 \begin_layout Standard
8026 \SpecialChar \ldots{}
8027 at least in any meaningful sort of way, so I suggest ignoring them.
8028 They are the references environment (2.13.3), and the deluxetable environment
8030 If you really, really need to use deluxetable, I suggest editing it in
8031 a separate file with a text editor, then using
8033 Insert\SpecialChar \menuseparator
8035 \begin_inset space ~
8040 to include it in your LyX document.
8045 file to see an example of this.
8048 \begin_layout Subsection
8049 FAQs, Tips, Tricks, and Other Ruminations
8052 \begin_layout Subsubsection
8053 Getting LyX and AASTeX to cooperate
8056 \begin_layout Standard
8057 It can be a bit tricky to get LyX to recognize a new layout and document
8059 When all else fails, do this:
8062 \begin_layout Enumerate
8063 Make certain that LaTeX can find AASTeX.
8064 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8065 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
8072 \begin_layout Enumerate
8084 \begin_layout Enumerate
8087 Tools\SpecialChar \menuseparator
8090 in LyX, then restart LyX.
8093 \begin_layout Enumerate
8094 Open a regular new file, not from a template.
8095 Does AASTeX appear in the class list in
8097 Document\SpecialChar \menuseparator
8103 \begin_layout Standard
8104 If you get a warning from an existing AASTeX document about not being able
8105 to find the AASTeX layout or a message about
8106 \begin_inset Quotes eld
8109 You should not mix title layouts with normal ones
8110 \begin_inset Quotes erd
8113 , things haven't been installed correctly.
8116 \begin_layout Subsubsection
8117 LaTeX error processing a table
8120 \begin_layout Standard
8121 LyX, by default, attempts to center the table caption/title.
8122 This seems to produce a bad interaction in AASTeX so you should click somewhere
8123 in the caption/title, then select
8125 Edit\SpecialChar \menuseparator
8127 \begin_inset space ~
8141 This took care of it for me.
8144 \begin_layout Subsubsection
8148 \begin_layout Standard
8149 A couple of things: 1) I have noticed some funny spacing in the reference
8150 entries in the text.
8151 When you enter the bibliography item data, make sure their is
8155 space between the last author and the parenthesis setting off the year;
8159 \begin_inset space \thinspace{}
8163 \begin_inset space \space{}
8177 2) Entering the references at all is not obvious.
8178 The easiest thing is to start typing your first reference at the end of
8179 the document, then mark it as type
8184 That will put a small gray box in front of what you just typed.
8185 Click on the box to fill in the rest of the information.
8186 For new references, go to the end of an existing reference and press return.
8187 That will create a new line with its own box, etc.
8190 \begin_layout Subsubsection
8194 \begin_layout Standard
8195 Even though AASTeX provides its own figure commands (
8201 , for example), I much prefer LaTeX's standard figure commands (with the
8210 \begin_inset space ~
8213 commands as TeX code into a Figure Float box if you desire, but I never
8214 have much luck getting the layout right.
8215 With the standard graphics, LyX will insert a
8219 usepackage{graphicx}
8221 command into the LaTeX preamble and handle the figures in the standard
8222 LaTeX2e way, interspersing the figures in the text.
8223 I believe ApJ accepts figures exactly this way now; AJ might still use
8225 \begin_inset Quotes eld
8228 stack everything at the end
8229 \begin_inset Quotes erd
8235 \begin_layout Subsubsection
8236 Things I could have done, but didn't
8239 \begin_layout Standard
8241 \begin_inset Quotes eld
8245 \begin_inset Quotes erd
8248 things I could have implemented, but chose not to.
8249 For instance, I saw no point in double-spacing the text in the LyX window,
8250 even though it is double-spaced in the paper manuscript.
8251 Also, I chose not to make separate layouts for the preprint and preprint2
8253 Since I assume you will spend most of your time in the plain manuscript
8254 mode anyway, I decided not to chew up more disk space with this.
8258 \begin_layout Subsection
8262 \begin_layout Standard
8263 Your mileage may vary.
8264 I've now had papers published by both ApJ and AJ that have had 98% of the
8265 effort done in LyX; the last 2% was the LaTeX post-processing and a few
8267 I have had no trouble with the submission process, and I'm sure the journals
8268 were never aware that there might be a difference.
8269 So, go forth and publish!
8272 \begin_layout Section
8276 \begin_layout Standard
8279 David Johnson; updated by Richard Heck
8282 \begin_layout Standard
8283 \begin_inset VSpace bigskip
8289 \begin_layout Standard
8291 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8292 papers to be submitted to American Mathematical Society publications.
8293 The layouts are not tailored to a specific journal, but easily can be.
8294 You should refer to the AMS documentation for specific instructions for
8295 each journal (usually it will entail only changing a single line in the
8297 That documentation is available on the Web at
8298 \begin_inset Flex URL
8301 \begin_layout Plain Layout
8309 \begin_inset Flex URL
8312 \begin_layout Plain Layout
8314 ftp://ftp.ams.org/pub/tex/amslatex/
8320 These layouts are appropriate, and useful, for any mathematical writing.
8324 \begin_layout Standard
8325 There are two basic AMS LaTeX layouts:
8328 \begin_layout Itemize
8329 amsart: The standard AMS article format.
8332 \begin_layout Itemize
8333 amsbook: the standard AMS book (really, monograph) format.
8337 \begin_layout Standard
8338 The layouts themselves contain only the minimum necessary to use the AMS
8340 They do not, in particular, contain any of the `theorem' environments used
8341 for setting theorems, lemmas, and the like.
8342 These are contained, instead, in the
8343 \begin_inset Flex CharStyle:Code
8346 \begin_layout Plain Layout
8352 module, which is loaded by default when when you select one of the AMS
8354 (It can also be used with other classes and can be removed, if you would
8355 rather use something else.) Less commonly used environments are in the
8356 \begin_inset Flex CharStyle:Code
8359 \begin_layout Plain Layout
8360 Theorems (AMS-Extended)
8365 module, which must be loaded manually.
8368 \begin_layout Standard
8369 By default, theorems and the like are numbered consecutively throughout
8370 the document, but this may be modified by loading the module
8371 \begin_inset Flex CharStyle:Code
8374 \begin_layout Plain Layout
8375 Theorems (Order by Section)
8380 or, if you are using
8381 \begin_inset Flex CharStyle:Code
8384 \begin_layout Plain Layout
8391 \begin_inset Flex CharStyle:Code
8394 \begin_layout Plain Layout
8395 Theorems (Order by Chapter)
8401 These will number the results as
8402 \begin_inset Formula $n.m$
8405 , where the first number refers to the section (or chapter) and the second
8406 refers to the total number of results so far in that section (or chapter).
8407 Many environments are also available unnumbered.
8408 These are indicated by an asterisk at the end.
8409 If you happen to want
8413 unnumbered results, the the module
8414 \begin_inset Flex CharStyle:Code
8417 \begin_layout Plain Layout
8423 provides that option.
8426 \begin_layout Standard
8427 Note that these modules do not
8431 to be used with the AMS classes.
8432 It is perfectly possible to use the
8433 \begin_inset Flex CharStyle:Code
8436 \begin_layout Plain Layout
8442 module, and the others mentioned, with other classes, such as
8443 \begin_inset Flex CharStyle:Code
8446 \begin_layout Plain Layout
8453 \begin_inset Flex CharStyle:Code
8456 \begin_layout Plain Layout
8463 \begin_inset Flex CharStyle:Code
8466 \begin_layout Plain Layout
8475 \begin_layout Subsection
8476 What these layouts provide
8479 \begin_layout Standard
8480 There is a long list of included environments provided by these layouts.
8481 In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
8482 variety of `theorem' environments.
8483 However, the AMS recommends the environments that are available in LyX.
8487 \begin_layout Standard
8488 The following environments—as well as the standard environments, such as
8490 \begin_inset Flex CharStyle:Noun
8493 \begin_layout Plain Layout
8500 \begin_inset Flex CharStyle:Noun
8503 \begin_layout Plain Layout
8510 \begin_inset Flex CharStyle:Noun
8513 \begin_layout Plain Layout
8520 \begin_inset Flex CharStyle:Noun
8523 \begin_layout Plain Layout
8530 \begin_inset Flex CharStyle:Noun
8533 \begin_layout Plain Layout
8540 \begin_inset Flex CharStyle:Code
8543 \begin_layout Plain Layout
8550 \begin_inset Flex CharStyle:Code
8553 \begin_layout Plain Layout
8562 \begin_layout Description
8563 Address This should be the author's permanent address.
8566 \begin_layout Description
8568 \begin_inset space ~
8571 Address This should be the author's temporary address at the time of submission,
8572 if different from the Address.
8575 \begin_layout Description
8576 Email Author's e-mail address
8579 \begin_layout Description
8580 URL Author's Web address, if desired.
8583 \begin_layout Description
8584 Keywords Key words or phrases used to identify specific topics discussed
8588 \begin_layout Description
8589 Subjectclass These refer to the AMS Subject Classifications, published and
8592 Mathematical Reviews
8595 These are also available online at the AMS cites listed above.
8598 \begin_layout Description
8602 \begin_layout Description
8606 \begin_layout Description
8610 \begin_layout Standard
8611 The following environments are provided by both the
8612 \begin_inset Flex CharStyle:Code
8615 \begin_layout Plain Layout
8622 \begin_inset Flex CharStyle:Code
8625 \begin_layout Plain Layout
8631 modules, in the latter case in both starred (unnumbered) and unstarred
8632 (numbered) versions.
8633 These same environments are provided only in the starred versions by the
8635 \begin_inset Flex CharStyle:Code
8638 \begin_layout Plain Layout
8647 \begin_layout Theorem
8648 This is typically used for the statements of major results.
8652 \begin_layout Corollary*
8653 This is used for statements which follow fairly directly from previous statement
8655 Again, these can be major results.
8660 These are smaller results needed to prove other statements.
8663 \begin_layout Proposition
8664 These are less major results which (hopefully) add to the general theory
8668 \begin_layout Conjecture
8669 These are statements provided without justification, which the author does
8670 not know how to prove, but which seem to be true (to the author, at least).
8673 \begin_layout Definition*
8674 Guess what this is for.
8675 The font is different for this environment than for the previous ones.
8679 \begin_layout Example*
8680 Used for examples illustrating proven results.
8683 \begin_layout Problem
8684 It's not really known what this is for.
8685 You should figure it out.
8688 \begin_layout Exercise*
8689 Write a description for this one.
8692 \begin_layout Remark
8693 This environment is also a type of theorem, usually a lesser sort of observation.
8696 \begin_layout Claim*
8697 Often used in the course of giving a proof of a larger result.
8701 Generally, these are used to break up long arguments, using specific instances
8707 The numbering scheme for cases is on its own, not together with other numbered
8713 At the end of this environment, a QED symbol (usually a square, but it can
8714 vary with different styles) is placed.
8715 If you want to have other environments within this one—for example, Case
8716 environments—and have the QED symbol appear only after them, then the other
8717 environments need to be nested within the proof environment.
8720 Nesting Environments
8726 for information on nesting.
8729 \begin_layout Standard
8730 And these environments are provided by
8731 \begin_inset Flex CharStyle:Code
8734 \begin_layout Plain Layout
8735 Theorems (AMS-Extended)
8743 \begin_layout Criterion*
8744 A required condition.
8747 \begin_layout Algorithm*
8748 A general procedure to be used.
8751 \begin_layout Axiom*
8752 This is a property or statement taken as true within the system being discussed.
8755 \begin_layout Condition*
8756 Sometimes used to state a condition assumed within the present context of
8761 Similar to a Remark.
8764 \begin_layout Notation*
8765 Used for the explanation of, yes, notation.
8768 \begin_layout Summary
8769 Do we really need to tell you?
8772 \begin_layout Acknowledgement*
8776 \begin_layout Conclusion*
8777 Sometimes used at the end of a long train of argument.
8781 Used in a way similar to Proposition, though perhaps lower on the scale.
8784 \begin_layout Standard
8785 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
8787 They need to be available on your system in order to use these environments.
8790 \begin_layout Section
8798 \begin_layout Standard
8804 \begin_layout Subsection
8808 \begin_layout Standard
8809 These are the layout files for some of the journals of the American Geophysical
8811 It is assumed that you have both the AGU's own class files and AGUplus
8812 installed (everything to be found at
8813 \begin_inset Flex URL
8816 \begin_layout Plain Layout
8818 ftp://ftp.agu.org/journals/latex/journals
8826 \begin_layout Subsection
8830 \begin_layout Standard
8840 They are still called this in the LyX GUI, though their LaTeX equivalents
8841 in the AGU classes are
8852 \begin_layout Standard
8853 Newly defined styles are
8890 These are mostly manuscript attributes and defined in the AGU class documentati
8894 \begin_layout Standard
8895 I suspect this is still badly incomplete.
8898 \begin_layout Subsection
8902 \begin_layout Standard
8919 \begin_layout Subsection
8923 \begin_layout Itemize
8926 Journal of Geophysical Research
8935 \begin_layout Standard
8936 Add your own, it isn't so hard! Look at the
8947 \begin_layout Subsection
8948 Bugs and things to remember
8951 \begin_layout Standard
8952 In order to use the new layouts, you must remember to do the following for
8956 \begin_layout Enumerate
8962 This can be done in the
8964 Layout\SpecialChar \menuseparator
8969 Document\SpecialChar \menuseparator
8973 (AGU articles are always in English, right? So
8980 \begin_layout Enumerate
8990 (Yes, this is a bug.)
8993 \begin_layout Enumerate
8994 Make sure you use the
8998 bibliography style, by entering
9002 into the second field of the BibTeX inset.
9003 None of the standard styles will do.
9006 \begin_layout Section
9010 \begin_layout Standard
9016 \begin_layout Subsection
9020 \begin_layout Standard
9021 Broadway is for writing plays.
9022 The format is more decorative than Hollywood, and much less standardized.
9023 This format should be suitable for workshops.
9026 \begin_layout Subsection
9030 \begin_layout Standard
9031 The same as in Hollywood.
9034 \begin_layout Subsection
9038 \begin_layout Standard
9043 names as labels then cross-reference the label to insert the name.
9044 The cross-reference dialog will show the current cast of characters.
9047 \begin_layout Subsection
9048 Paper size and Margins
9051 \begin_layout Standard
9052 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9055 \begin_layout Subsection
9059 \begin_layout Standard
9060 The following environments are available.
9061 You can use broadway.bind to get the bind keys shown at the right.
9064 \begin_layout Itemize
9068 \begin_inset Newline newline
9073 You should not have to use this, but it is here for anything that does not
9077 \begin_layout Itemize
9081 \begin_inset space \hfill{}
9085 \begin_inset Newline newline
9090 Used to describe stage setting and the action.
9091 First use of speaker names in all CAPs.
9094 \begin_layout Itemize
9098 \begin_inset space \hfill{}
9102 \begin_inset Newline newline
9107 Automatically numbered.
9108 On screen it will be arabic, but will print as Roman.
9111 \begin_layout Itemize
9115 \begin_inset space \hfill{}
9119 \begin_inset Newline newline
9129 It is just centered text.
9132 \begin_layout Itemize
9136 \begin_inset space \hfill{}
9140 \begin_inset Newline newline
9145 Not automatically numbered.
9146 You supply the number.
9147 This is because I couldn't figure out how.
9150 \begin_layout Itemize
9154 \begin_inset space \hfill{}
9158 \begin_inset Newline newline
9163 A special case of Narrative to describe the setting and action as the curtain
9167 \begin_layout Itemize
9171 \begin_inset space \hfill{}
9175 \begin_inset Newline newline
9180 The speaker's (actor's) title, centered in all CAPS.
9183 \begin_layout Itemize
9187 \begin_inset space \hfill{}
9191 \begin_inset Newline newline
9196 Instructions to the speaker.
9197 The parentheses are automatically inserted.
9198 The ( will appear on screen, but both will be in the printed play.
9199 This environment is only used within
9206 \begin_layout Itemize
9210 \begin_inset space \hfill{}
9214 \begin_inset Newline newline
9219 What the Speaker says.
9222 \begin_layout Itemize
9226 \begin_inset space \hfill{}
9230 \begin_inset Newline newline
9235 The curtain comes down.
9238 \begin_layout Itemize
9242 \begin_inset space \hfill{}
9248 \begin_layout Itemize
9252 \begin_inset space \hfill{}
9258 \begin_layout Itemize
9262 \begin_inset space \hfill{}
9268 \begin_layout Standard
9272 \begin_layout Section
9276 \begin_layout Standard
9281 can be used to type letters according to German conventions.
9282 A template file is included in
9284 .../lyx/share/templates
9286 for you to use as a starting point.
9289 \begin_layout Section
9297 \begin_layout Standard
9303 \begin_layout Subsection
9307 \begin_layout Standard
9308 This is the layout file for the European Geophysical Society journals.
9313 can be downloaded from the web site of the EGS under
9314 \begin_inset Flex URL
9317 \begin_layout Plain Layout
9327 \begin_layout Subsection
9331 \begin_layout Standard
9334 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9342 The current layout file is unfortunately very unmodular and would benefit
9343 from using the various
9350 \begin_layout Section
9354 \begin_layout Standard
9360 \begin_layout Standard
9361 Elsevier Science Publishers B.V.
9362 provides a standard LaTeX document class (
9366 ) for submitting articles to their various journals.
9367 The style file can be downloaded directly from their web site:
9368 \begin_inset Flex URL
9371 \begin_layout Plain Layout
9373 http://authors.elsevier.com/
9379 Instructions are supplied along with the class file, which details the
9380 requirements of the publishers.
9381 LyX includes package that allows for the use of this class, by a layout
9382 and a template file.
9383 Installation of the class file is the same as for any other LaTeX package;
9384 instructions are provided in the Elsevier documentation.
9387 \begin_layout Standard
9397 As the Elsevier class file is based mainly on the standard article class,
9398 most of the normal functionality is provided.
9399 The Elsevier class defines a number of mathematical environments, which
9400 are similar to the AMS environments.
9401 These commands are all described in the Elsevier documentation, and are
9405 \begin_layout Standard
9406 The easiest way to use the Elsevier style is to base documents on the included
9408 It is best not to use options such as fancy headings or the geometry package,
9409 as elements such as these are defined by Elsevier in their style file.
9410 Ideally, no extra packages except those mentioned in the Elsevier documentation
9412 Essentially, Elsevier require as
9413 \begin_inset Quotes eld
9417 \begin_inset Quotes erd
9420 a LaTeX file as possible, as their intention is to take the supplied file
9421 and replace the class file with one for the particular journal to which
9422 the paper has been submitted.
9423 This also means that not too much time should be spent on the formating
9425 When it comes to be published, this will change anyway.
9426 The rest of the usage for this layout is substantially the same as for
9427 the normal article class.
9428 For details of what Elsevier do and don't allow, refer to their documentation.
9431 \begin_layout Section
9437 \begin_inset CommandInset label
9446 \begin_layout Standard
9452 \begin_layout Subsection
9456 \begin_layout Standard
9457 This section describes how to use LyX to make slides for overhead projectors.
9458 There are two document classes that can do this: the default slides class
9464 This section documents the latter.
9467 \begin_layout Standard
9468 I'm going to say this again, nice and clear, so that there's no misunderstanding
9472 \begin_layout Standard
9473 \begin_inset VSpace bigskip
9479 \begin_layout Standard
9483 This section documents the class
9484 \begin_inset Quotes eld
9492 \begin_inset Quotes erd
9500 \begin_layout Standard
9501 \begin_inset VSpace bigskip
9507 \begin_layout Standard
9508 If you're looking for the documentation for
9509 \begin_inset Quotes eld
9517 \begin_inset Quotes erd
9521 \begin_inset space ~
9525 \begin_inset CommandInset ref
9527 reference "sec:slitex"
9532 If your machine doesn't have the
9537 \begin_inset Quotes eld
9545 \begin_inset Quotes erd
9548 ] installed, you'll probably have to use the default
9552 class, which isn't quite as good as
9557 \begin_layout Standard
9562 class is designed for use with version 2.1 of the
9566 LaTeX class file which is now an integral part of LaTeX2e.
9569 \begin_layout Subsection
9573 \begin_layout Standard
9574 Obviously, to use this document class, you need to select
9575 \begin_inset Quotes eld
9583 \begin_inset Quotes erd
9593 \begin_inset space ~
9599 There are some settings in the
9602 \begin_inset space ~
9607 dialog that you should know about that are specific to this class:
9610 \begin_layout Itemize
9611 Don't change the options
9622 \begin_inset space ~
9628 They're ignored by the
9635 \begin_layout Itemize
9636 The default font size is 20
9637 \begin_inset space \thinspace{}
9640 pt with the other options being 17
9641 \begin_inset space \thinspace{}
9645 \begin_inset space \thinspace{}
9649 \begin_inset space \thinspace{}
9655 \begin_layout Itemize
9664 but all math equations are still typeset in the usual roman font.
9667 \begin_layout Itemize
9672 supports A4 and Letter paper sizes as well as a special size for working
9674 \begin_inset space \thinspace{}
9678 It doesn't support A5, B5, legal or executive paper sizes.
9681 \begin_layout Itemize
9682 Don't bother changing the
9686 settings because they are ignored anyway.
9687 All floats appear where they are defined in the text.
9690 \begin_layout Itemize
9695 setting behaves a bit differently for this class.
9700 provides extensive footer and header capabilities including a user-defined
9703 \begin_inset space ~
9707 \begin_inset CommandInset ref
9709 reference "sec:foilfoot"
9714 The title page is treated differently to all other pages in the document
9723 has the logo centered at the bottom of the page (if one is defined).
9724 The possible page style choices and what they do are as follows:
9728 \begin_layout Labeling
9729 \labelwidthstring MMMMMMM
9736 The final output contains no page numbers, or other headers or footers
9737 (except footnotes of course).
9741 \begin_layout Labeling
9742 \labelwidthstring MMMMMMM
9749 The final output contains page numbers centered at the bottom of the page.
9750 No other headings or footers (other than footnotes).
9753 \begin_layout Labeling
9754 \labelwidthstring MMMMMMM
9759 Page numbers in lower right corner.
9760 Additional headers and footers are also shown.
9761 This is also the default.
9764 \begin_layout Labeling
9765 \labelwidthstring MMMMMMM
9770 Gives you access to the
9774 package although its use with
9778 is discouraged by the writer of the
9782 package because of some potential page layout clashes.
9786 \begin_layout Subsubsection
9790 \begin_layout Standard
9791 The following options may be used in the extra class options in the
9793 Document\SpecialChar \menuseparator
9799 \begin_layout Labeling
9800 \labelwidthstring MMMMMMx
9805 This sets up the page layout for 7.33
9806 \begin_inset space \thinspace{}
9810 \begin_inset space \thinspace{}
9813 in paper, which is about the same aspect ratio as a 35
9814 \begin_inset space \thinspace{}
9817 mm slide, making it a bit easier to work with this medium.
9820 \begin_layout Labeling
9821 \labelwidthstring MMMMMMx
9826 Places a rule across the page below the header on every page except the
9830 \begin_layout Labeling
9831 \labelwidthstring MMMMMMx
9836 Places a rule across the page above the footer on every page except the
9840 \begin_layout Labeling
9841 \labelwidthstring MMMMMMx
9846 This is automatically set each time you create a new
9855 to use the dvips driver to rotate those pages that are set as landscape
9859 \begin_layout Labeling
9860 \labelwidthstring MMMMMMx
9865 Simply changes the page dimensions to those of a landscape page but doesn't
9867 Thus if you use this option you need to use an external program to rotate
9868 each page or feed your paper through your printer as landscape.
9869 Note that this option effectively reverses the roles of the
9877 environments (don't worry these are described in the next section).
9880 \begin_layout Labeling
9881 \labelwidthstring MMMMMMx
9886 Equation numbers on the left.
9889 \begin_layout Labeling
9890 \labelwidthstring MMMMMMx
9895 Flush-left equations.
9898 \begin_layout Subsection
9899 Supported Environments
9902 \begin_layout Standard
9903 Most of the environments commonly supported in other classes are also supported
9909 There are several additional environments provided by
9913 as well as a couple added by LyX.
9914 The following environments are shared with other classes:
9917 \begin_layout Standard
9921 \begin_layout Plain Layout
9933 \begin_layout Itemize
9939 \begin_layout Itemize
9945 \begin_layout Itemize
9951 \begin_layout Itemize
9957 \begin_layout Itemize
9963 \begin_layout Itemize
9969 \begin_layout Itemize
9975 \begin_layout Itemize
9981 \begin_layout Itemize
9987 \begin_layout Itemize
9993 \begin_layout Itemize
9999 \begin_layout Itemize
10005 \begin_layout Itemize
10011 \begin_layout Itemize
10017 \begin_layout Itemize
10023 \begin_layout Itemize
10029 \begin_layout Itemize
10035 \begin_layout Itemize
10041 \begin_layout Standard
10045 \begin_layout Plain Layout
10057 \begin_layout Standard
10058 That is, all the major environments apart from the sectioning environments.
10059 Since foils are essentially self-contained sections, with a title and body,
10064 provides specific commands for starting new foils and these are:
10067 \begin_layout Itemize
10073 \begin_layout Itemize
10079 \begin_layout Standard
10080 LyX also provides slightly modified versions of these two environments called:
10083 \begin_layout Itemize
10089 \begin_layout Itemize
10092 ShortRotatefoilhead
10095 \begin_layout Standard
10096 and the differences will be explained in the next section.
10099 \begin_layout Standard
10100 Since foils are often used in presenting ideas or new theorems and such
10105 also provides a comprehensive box of goodies for presenting them:
10108 \begin_layout Standard
10112 \begin_layout Plain Layout
10116 begin{multicols}{2}
10124 \begin_layout Itemize
10130 \begin_layout Itemize
10136 \begin_layout Itemize
10142 \begin_layout Itemize
10148 \begin_layout Itemize
10154 \begin_layout Itemize
10160 \begin_layout Itemize
10166 \begin_layout Itemize
10172 \begin_layout Itemize
10178 \begin_layout Itemize
10184 \begin_layout Itemize
10190 \begin_layout Standard
10194 \begin_layout Plain Layout
10206 \begin_layout Standard
10207 The starred versions are unnumbered while the unstarred versions are numbered.
10208 There are also two list environments added by LyX and these are:
10211 \begin_layout Itemize
10217 \begin_layout Itemize
10223 \begin_layout Standard
10228 provides some powerful header and footer capabilities that are best set
10229 in the preamble although they may be set at any point in a document.
10230 If you want to change these settings in your document the best place to
10231 do so is at the very top of a foil, i.
10232 \begin_inset space \thinspace{}
10238 \begin_inset space \space{}
10243 straight after the foilhead.
10246 \begin_layout Standard
10247 For this purpose, the following command styles are provided [
10254 \begin_layout Standard
10258 \begin_layout Plain Layout
10262 begin{multicols}{2}
10270 \begin_layout Itemize
10274 \begin_inset space ~
10280 \begin_layout Itemize
10286 \begin_layout Itemize
10290 \begin_inset space ~
10296 \begin_layout Itemize
10300 \begin_inset space ~
10306 \begin_layout Itemize
10310 \begin_inset space ~
10317 \begin_layout Standard
10318 \begin_inset space ~
10325 \begin_layout Standard
10329 \begin_layout Plain Layout
10341 \begin_layout Standard
10342 There are also a few commands provided by
10346 that aren't directly supported by LyX but I'll tell you what they do and
10347 how to use them in section
10348 \begin_inset space ~
10352 \begin_inset CommandInset ref
10354 reference "sec:unsuppfoils"
10361 \begin_layout Subsection
10362 Building a Set of Foils
10365 \begin_layout Standard
10366 This section will give a simple introduction to using the different environments
10367 to build a set of foils.
10368 If you want to see an example set of foils, take a look at the
10372 file you find in LyX's
10379 \begin_layout Subsubsection
10380 Give It a Title Page
10383 \begin_layout Standard
10384 Unlike other classes that provide
10404 creates the title on a page of its own.
10405 If you leave out the
10409 environment LaTeX will substitute the current date (every time you regenerate
10413 \begin_layout Subsubsection
10417 \begin_layout Standard
10418 As I mentioned earlier, there are four ways of starting a new foil.
10419 For portrait foils you should use
10428 The difference between these two environments is the amount of space between
10429 the title of the foil (the foilhead) and the body of the foil.
10432 \begin_layout Standard
10433 Landscape foils are generated using the
10439 ShortRotatefoilhead
10442 Again the only difference is the spacing between foilhead and body.
10443 Both of the short versions have 0.5 inches less separation between the foilhead
10448 \begin_layout Standard
10449 One problem with the support for landscape foils is the requirement that
10450 you have to use the
10454 driver to generate the PostScript output otherwise the foils won't be rotated.
10455 It is possible to get landscape foils even if you haven't got the
10459 driver provided you can feed your foils sideways through your printer ;-)
10462 \begin_layout Subsubsection
10463 Theorems, Lemmas, Proofs and more
10466 \begin_layout Standard
10467 Due to a small bug in LyX you can't have two of the same type of these environme
10468 nts directly following each other.
10469 They must be separated by something.
10470 If you try, you will just be extending the previous environment as if you
10471 had merged the two environments together.
10472 So, how do you get around this problem? The simplest option is to insert
10473 some text between the two environments or add a
10477 environment between the two with just a
10478 \begin_inset Quotes eld
10486 \begin_inset Quotes erd
10490 This will force LyX to produce two separate environments and hence the
10491 correct LaTeX output.
10492 An example is provided in the example file included with the LyX distribution.
10493 Remember, this problem only occurs if you are trying to place two of the
10494 same type of theorem-like environments one directly after the other.
10497 \begin_layout Subsubsection
10501 \begin_layout Standard
10502 You get all the commonly supported list styles found in other classes as
10503 well as two new ones.
10504 I'll only describe the new ones here.
10505 If you want to find out more about the other list environments check out
10511 If you intend to use itemized lists you might also want to read about the
10515 \begin_inset space ~
10519 \begin_inset space ~
10524 dialog described above in section
10525 \begin_inset space ~
10529 \begin_inset CommandInset ref
10531 reference "sec:bullet"
10538 \begin_layout Standard
10539 The two new list styles,
10547 , are designed to make it easier for you to create lists of do's and don'ts
10548 or right and wrong by providing dedicated environments that use a tick
10549 or a cross as the label of the list.
10550 These lists are in fact dedicated variants of the
10555 They do however require that you have the
10559 packages installed.
10562 \begin_layout Subsubsection
10566 \begin_layout Standard
10571 redefines the floating tables and figures so that they appear exactly where
10572 they are in the text rather than pushing them to the top of the page or
10573 to some user specified location.
10574 In fact if you change the float placement settings they are simply ignored.
10577 \begin_layout Subsubsection
10578 Page Headers and Footers
10579 \begin_inset CommandInset label
10581 name "sec:foilfoot"
10588 \begin_layout Standard
10592 \begin_inset space ~
10601 are two commands used to control the left-footer text string.
10602 The first is meant to allow you to include a graphic logo on your foils
10604 \begin_inset Quotes eld
10612 \begin_inset Quotes erd
10616 While the second is meant to provide a classification for the audience,
10620 \begin_inset space \thinspace{}
10626 \begin_inset space \space{}
10630 It is empty by default.
10633 \begin_layout Standard
10634 The remaining page corners can be filled by
10637 \begin_inset space ~
10642 (which defaults to page numbers),
10645 \begin_inset space ~
10653 \begin_inset space ~
10661 \begin_layout Subsection
10667 \begin_inset CommandInset label
10669 name "sec:unsuppfoils"
10676 \begin_layout Standard
10677 All the commands mentioned below need to be set in a
10685 within another environment.
10688 \begin_layout Subsubsection
10692 \begin_layout Standard
10693 All lengths are adjusted using the
10716 should be replaced by the name given to the length you want to change and
10721 is the length value.
10722 All lengths should be specified in units of length such as inches (
10734 ) or relative to some document or font-based length such as
10744 \begin_layout Standard
10745 It's possible to change the spacing between a foilhead and the body of the
10746 foil by adjusting the length specified by
10753 For example, to make
10758 \begin_inset space \space{}
10761 in closer to their bodies put the following in the preamble:
10767 foilheadskip}{-0.5in}
10770 \begin_layout Standard
10771 The spacings around floats can be adjusted by setting these lengths:
10774 \begin_layout Labeling
10775 \labelwidthstring MMMMMMMMMMM
10782 Separation between the text and the top of the float
10785 \begin_layout Labeling
10786 \labelwidthstring MMMMMMMMMMM
10793 Separation between the float and the caption
10796 \begin_layout Labeling
10797 \labelwidthstring MMMMMMMMMMM
10804 Separation between the caption and the following text
10807 \begin_layout Labeling
10808 \labelwidthstring MMMMMMMMMMM
10815 You can make the captions narrower than the surrounding text by adjusting
10817 Best done relative to
10826 \begin_layout Standard
10827 There are also several title page related lengths that you may find useful
10828 if you have a long title or several authors:
10831 \begin_layout Labeling
10832 \labelwidthstring MMMMMMMMMMM
10839 Separation from headers to
10844 \begin_layout Labeling
10845 \labelwidthstring MMMMMMMMMMM
10863 \begin_layout Labeling
10864 \labelwidthstring MMMMMMMMMMM
10878 \begin_layout Labeling
10879 \labelwidthstring MMMMMMMMMMM
10895 \begin_layout Labeling
10896 \labelwidthstring MMMMMMMMMMM
10912 \begin_layout Standard
10913 The last length related command affects all the list environments.
10924 a list environment then all the vertical spacing between the list items
10926 Note that this is a command not a length so it doesn't require
10932 like the stuff mentioned above.
10935 \begin_layout Subsubsection
10936 Headers and Footers
10939 \begin_layout Standard
10952 commands control whether the logo in the
10956 definition appear on a given page.
10963 in the preamble then none of the foils will have the logo on them.
10964 If you don't want the logo on a particular page place the
10970 directly after the foilhead of that page and the
10976 directly after the next foilhead.
10979 \begin_layout Standard
10980 If you decide to use the
10984 page style setting in the
10987 \begin_inset space ~
10992 dialog you should probably add
11002 to your preamble so headers and footers on landscape pages are correctly
11003 placed when rotated.
11004 This is due to some clashes between the page layouts provided by the
11015 \begin_layout Section
11016 Hollywood (Hollywood spec scripts)
11019 \begin_layout Standard
11025 \begin_layout Subsection
11029 \begin_layout Standard
11030 Getting the format of a Hollywood script right is a
11031 \begin_inset Quotes eld
11035 \begin_inset Quotes erd
11038 It is designed to make the readers focus on content and to be easy and
11039 familiar for the actors to read.
11040 Each page of a script should be one minute of film.
11041 Nothing goes in a script that you cannot see or hear on screen.
11042 The courier 12 pt font should be used throughout.
11046 \begin_layout Subsection
11050 \begin_layout Standard
11051 Speakers' lines should NEVER break in mid-sentence.
11052 If a speaker's lines continue over a page break, repeat the
11056 title followed by (Cont'd).
11059 \begin_layout Subsection
11063 \begin_layout Standard
11068 names as labels then cross-reference the label to insert the name.
11069 The cross-reference dialog will show the current cast of characters.
11070 You can use this to insert the speaker name in narratives also.
11073 \begin_layout Subsection
11074 Paper size and Margins
11077 \begin_layout Standard
11078 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11081 \begin_layout Subsection
11085 \begin_layout Standard
11086 The following environments are available.
11087 You can use hollywood.bind to get the bind keys shown at the right.
11090 \begin_layout Itemize
11094 \begin_inset Newline newline
11099 Used where nothing else works.
11103 \begin_layout Itemize
11109 \begin_inset space \hfill{}
11117 \begin_inset Newline newline
11120 Usually followed by something like
11121 \begin_inset Quotes eld
11124 on Sally waking up.
11125 \begin_inset Quotes erd
11131 \begin_layout Itemize
11135 \begin_inset space \hfill{}
11139 \begin_inset Newline newline
11144 Introduces a new INTERIOR camera set-up.
11145 Always followed by DAY or NIGHT, or something similar to define the lighting
11147 Everthing on this line in CAPS.
11150 \begin_layout Itemize
11154 \begin_inset space \hfill{}
11158 \begin_inset Newline newline
11163 Introduces a new EXTERIOR camera set-up.
11164 Everthing on this line in CAPS.
11167 \begin_layout Itemize
11171 \begin_inset space \hfill{}
11175 \begin_inset Newline newline
11180 The character speaking.
11183 \begin_layout Itemize
11187 \begin_inset space \hfill{}
11191 \begin_inset Newline newline
11196 Instructions to the speaker.
11197 The () are automatically inserted, but only the ( will show in LyX.
11198 Both will be printed.
11201 \begin_layout Itemize
11205 \begin_inset space \hfill{}
11209 \begin_inset Newline newline
11221 \begin_layout Itemize
11225 \begin_inset space \hfill{}
11229 \begin_inset Newline newline
11234 Camera movement instruction.
11236 \begin_inset space \thinspace{}
11240 \begin_inset space \space{}
11246 \begin_layout Itemize
11250 \begin_inset space \hfill{}
11256 \begin_layout Itemize
11260 \begin_inset space \hfill{}
11266 \begin_layout Itemize
11270 \begin_inset space \hfill{}
11276 \begin_layout Itemize
11280 \begin_inset space \hfill{}
11286 \begin_layout Subsection
11290 \begin_layout Itemize
11294 \begin_layout Itemize
11298 \begin_layout Itemize
11300 \begin_inset space \thinspace{}
11307 \begin_layout Itemize
11312 \begin_layout Itemize
11313 PAN — camera movement
11316 \begin_layout Itemize
11317 INSERT — cut to close-up of
11320 \begin_layout Section
11324 \begin_layout Standard
11327 Panayotis Papasotiriou
11330 \begin_layout Subsection
11334 \begin_layout Standard
11335 The ijmpc package is a set of macros that facilitates electronic manuscript
11338 International Journal of Modern Physics C
11341 Similarly, the ijmpd package is for creating manuscripts to be submitted
11344 International Journal of Modern Physics D
11347 Both journals are published by World Scientific.
11348 The corresponding document classes are named
11357 These files, together with instructions for the authors, can be downloaded
11359 \begin_inset Flex URL
11362 \begin_layout Plain Layout
11364 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11370 \begin_inset Flex URL
11373 \begin_layout Plain Layout
11375 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11381 Both packages are modified versions of the standard
11382 \begin_inset Quotes eld
11386 \begin_inset Quotes erd
11389 package, and they are almost (but not exactly) identical.
11390 Most of their features are supported by LyX.
11391 I have used LyX successfully to write articles submitted to both journals
11392 without any problem.
11395 \begin_layout Subsection
11399 \begin_layout Standard
11400 As usual, the easiest way to write a paper is to start with a template.
11403 File\SpecialChar \menuseparator
11422 This will give an (almost) empty document that includes the most common
11423 fields found in a manuscript.
11424 Simply overwrite the existing text (including the brackets,
11429 You should keep in mind the following remarks.
11432 \begin_layout Enumerate
11433 LyX won't let you change the font size and the page style of the document,
11434 because such modifications are not allowed by both packages.
11437 \begin_layout Enumerate
11438 The language of the document should not be changed.
11439 Before previewing your paper, be sure that the babel package is not used.
11440 To do this, click on
11442 Tools\SpecialChar \menuseparator
11453 checkbox in the language settings, and click on
11461 , if you wish to make this change permanent).
11464 \begin_layout Enumerate
11466 \begin_inset Quotes eld
11470 \begin_inset Quotes erd
11473 style must be used to define keywords.
11476 \begin_layout Enumerate
11477 The ijmpc package provides a style named
11478 \begin_inset Quotes eld
11481 Classification Codes
11482 \begin_inset Quotes erd
11485 , which can be used to define classification codes, such as PACS numbers.
11486 Note that this facility is not supported by the ijmpd package.
11489 \begin_layout Enumerate
11490 Several new environments are available:
11491 \begin_inset Quotes eld
11495 \begin_inset Quotes erd
11499 \begin_inset Quotes eld
11503 \begin_inset Quotes erd
11507 \begin_inset Quotes eld
11511 \begin_inset Quotes erd
11515 \begin_inset Quotes eld
11519 \begin_inset Quotes erd
11523 \begin_inset Quotes eld
11527 \begin_inset Quotes erd
11531 \begin_inset Quotes eld
11535 \begin_inset Quotes erd
11539 \begin_inset Quotes eld
11543 \begin_inset Quotes erd
11547 \begin_inset Quotes eld
11551 \begin_inset Quotes erd
11555 \begin_inset Quotes eld
11559 \begin_inset Quotes erd
11563 \begin_inset Quotes eld
11567 \begin_inset Quotes erd
11571 \begin_inset Quotes eld
11575 \begin_inset Quotes erd
11579 \begin_inset Quotes eld
11583 \begin_inset Quotes erd
11587 \begin_inset Quotes eld
11591 \begin_inset Quotes erd
11595 \begin_inset Quotes eld
11599 \begin_inset Quotes erd
11603 Their use is more or less obvious.
11604 LyX supports all these environments; it will use the proper label, text
11605 style, and numbering scheme for each of them.
11608 \begin_layout Enumerate
11609 Both packages use basic citations; the natbib package should not be used.
11610 In LyX, citation references are shown as usual; in the output, citations
11611 are shown as superscripts.
11612 If you want to use a citation as normal text, you should use the
11617 \begin_inset space \thinspace{}
11621 \begin_inset space \space{}
11625 \begin_inset Quotes eld
11629 \begin_inset space \space{}
11639 \begin_inset Quotes erd
11645 \begin_layout Enumerate
11647 \begin_inset Quotes eld
11651 \begin_inset Quotes erd
11654 section in both packages.
11655 To put acknowledgments, just use the
11656 \begin_inset Quotes eld
11660 \begin_inset Quotes erd
11666 \begin_layout Enumerate
11667 Appendices may be added to the paper,
11671 the Acknowledgments and
11676 LyX provides a special environment, called
11677 \begin_inset Quotes eld
11681 \begin_inset Quotes erd
11684 which marks the beginning of the appendices.
11685 This environment should be left blank; it just sends a LaTeX command, but
11686 nothing is really printed.
11688 \begin_inset Quotes eld
11692 \begin_inset Quotes erd
11695 is printed with blue letters, as a signal that all sections after that
11696 point are appendices.
11697 To write an appendix, use the
11698 \begin_inset Quotes eld
11702 \begin_inset Quotes erd
11706 LyX will number each appendix with capital letters, as required by both
11709 \begin_inset Quotes eld
11713 \begin_inset Quotes erd
11720 be present before the first appendix; if not, all appendices will be numbered
11721 as normal sections in the output.
11724 \begin_layout Enumerate
11725 The ijmpc and the ijmpd packages use the
11729 command to implement table captions.
11730 As a result, a table created by LyX is printed correctly, but its caption
11732 However, you can use some TeX code to overpass this problem, so that captions
11733 are printed as expected.
11734 To do so, create a float table as usual, remove the caption, and replace
11735 it with the TeX code
11745 (sic); you must also the TeX code
11749 immediately after the tabular material.
11750 Study the example table included in the template files to see how this
11751 trick is implemented.
11752 Alternatively, If you need table captions, you should implement the whole
11757 file, then include this file to the LyX document (
11759 Insert\SpecialChar \menuseparator
11760 File\SpecialChar \menuseparator
11762 \begin_inset space ~
11768 Details on how to create a table float can be found in the files
11776 , included in the corresponding packages.
11779 \begin_layout Subsection
11780 Preparing a paper for submission
11783 \begin_layout Standard
11784 Before you submit your paper you must export the LyX document as a LaTeX
11787 File\SpecialChar \menuseparator
11788 Export\SpecialChar \menuseparator
11795 \begin_layout Plain Layout
11796 Actually you have the choice between LaTeX (plain) and pdflatex.
11797 If you intend to use pdflatex to prepare the paper, you should use the
11798 pdflatex option so that included graphics are converted to PDF format,
11799 ready for use by pdflatex.
11804 , then make the following changes to the resulting
11811 \begin_layout Enumerate
11812 Remove the comment lines before the
11821 \begin_layout Enumerate
11822 Remove everything between (and including) the
11834 commands, except for any commands you specifically put into the LaTeX preamble.
11837 \begin_layout Standard
11842 file should be saved and processed through LaTeX as many times as necessary.
11843 You may also want to check the resulting
11850 \begin_layout Subsection
11854 \begin_layout Standard
11855 The use of TeX code is reduced to two commands, which must be placed at
11856 the top of the document.
11857 If you started writing your paper by using the
11865 template, the TeX code needed is already in its place; you usually don't
11867 You may only modify the first TeX code to specify the information printed
11868 to the top of odd and even pages (authors' names and short paper's title,
11870 This TeX code must have the form
11874 markboth{Authors' Names}{Short Paper's Title}
11879 \begin_layout Section
11883 \begin_layout Standard
11889 \begin_layout Subsection
11893 \begin_layout Standard
11894 The iopart package provides a document class to create electronic manuscript
11895 submission to the journals published by the Institute of Physics.
11896 Instructions for the authors how to create a paper using the iopart class
11897 can be downloaded together with the iopart package from the site
11898 \begin_inset Flex URL
11901 \begin_layout Plain Layout
11903 ftp://ftp.iop.org/pub/journals/latex2e
11911 \begin_layout Subsection
11915 \begin_layout Standard
11916 The easiest way to write a paper is to start with the file
11920 that is available in LyX's examples files folder.
11921 Open this file, save it under a new name, and start writing.
11922 The example file explains how to use the special text environments.
11923 Here are the most important advices:
11926 \begin_layout Itemize
11927 To be able to compile your document to a PDF, PS, or DVI, assure that the
11930 Use AMS math package
11932 in the document settings under
11939 \begin_layout Itemize
11942 The title environment defines the kind of your paper.
11943 So use one of the following environments for the title:
11947 \begin_layout Itemize
11956 \begin_layout Itemize
11965 \begin_layout Itemize
11971 for a Topical review
11974 \begin_layout Itemize
11983 \begin_layout Itemize
11992 \begin_layout Itemize
11998 for a Paper (same as Title)
12001 \begin_layout Itemize
12007 for a Preliminary communication
12010 \begin_layout Itemize
12016 for a Rapid communication
12019 \begin_layout Itemize
12025 for a Letter to the editor
12029 \begin_layout Itemize
12032 All title environments except of
12036 can have an optional short title.
12039 \begin_layout Itemize
12040 There is a general title environment
12044 which is not directly supported by the LyX.
12045 This can be used as TeX code when your document doesn't fit into one of
12046 the other title types.
12049 \begin_layout Standard
12050 For more informations like hints for special table and formula formatting,
12051 look at the IOP author guidelines.
12054 \begin_layout Section
12058 \begin_layout Standard
12061 Panayotis Papasotiriou
12064 \begin_layout Subsection
12068 \begin_layout Standard
12069 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12070 that facilitates electronic manuscript submission to the journals they
12072 Most known of them (at least in my domain of interest) are
12074 Astrophysics and Space Science
12080 , but there are many others (see a complete list at
12081 \begin_inset Flex URL
12084 \begin_layout Plain Layout
12086 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12092 The Kluwer package may be downloaded from the site
12093 \begin_inset Flex URL
12096 \begin_layout Plain Layout
12098 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12104 A complete user guide is contained in that package (but it can also be
12105 downloaded separately).
12108 \begin_layout Standard
12109 LyX supports many features of the package but not everything.
12110 However, the TeX code needed is reduced to some
12111 \begin_inset Quotes eld
12115 \begin_inset Quotes erd
12118 commands of the package (see
12119 \begin_inset space ~
12123 \begin_inset CommandInset ref
12125 reference "subsec:kluwer_peculiarities"
12130 I have recently used LyX to write an article submitted to the
12132 Astrophysics and Space Science
12134 without any problem.
12137 \begin_layout Subsection
12141 \begin_layout Standard
12142 The easiest way to write a paper is to start with the Kluwer template file.
12145 File\SpecialChar \menuseparator
12157 This will give an (almost) empty document that includes the most common
12158 fields found in a manuscript and a short description of their use.
12159 As in most templates, simply overwrite the existing text (including the
12164 ) with the correct information.
12167 \begin_layout Subsection
12168 Preparing a paper for submission
12171 \begin_layout Standard
12172 As in the AASTeX package, before you submit your paper to a journal you
12174 \begin_inset Quotes eld
12178 \begin_inset Quotes erd
12184 \begin_layout Enumerate
12185 Export your paper as a LaTeX file.
12186 To do this, click on
12188 File\SpecialChar \menuseparator
12189 Export\SpecialChar \menuseparator
12196 \begin_layout Enumerate
12201 file with a text editor and make the following changes
12205 \begin_layout Enumerate
12206 remove the comment lines before the
12215 \begin_layout Enumerate
12216 remove everything between (and including) the
12228 commands, except for any commands you specifically put into the LaTeX preamble.
12231 \begin_layout Standard
12240 \begin_layout Enumerate
12245 file through LaTeX as many times as necessary (usually up to three).
12248 \begin_layout Enumerate
12254 \begin_inset space \thinspace{}
12258 \begin_inset space \space{}
12265 , and check if everything is OK (it should, if you didn't make any mistake).
12268 \begin_layout Subsection
12269 \begin_inset Quotes eld
12273 \begin_inset Quotes erd
12276 of the Kluwer package
12277 \begin_inset CommandInset label
12279 name "subsec:kluwer_peculiarities"
12286 \begin_layout Standard
12287 The Kluwer package has the following
12288 \begin_inset Quotes eld
12292 \begin_inset Quotes erd
12298 \begin_layout Enumerate
12299 It is possible to write multiple articles in the same LaTeX file
12303 \begin_layout Plain Layout
12304 I can't imagine any good reason to do this.
12310 Each article must be included in the environment
12311 \begin_inset Quotes eld
12315 \begin_inset Quotes erd
12319 Unfortunately, this environment cannot be omitted, even if you write just
12321 Therefore, each article starts with the command
12327 and, obviously, ends with the command
12334 Although this can be implemented in LyX, I didn't included it, since it
12335 looks ugly and can confuse the novice user.
12336 Therefore, you need to enter them directly and mark them as LaTeX code
12338 \begin_inset Quotes eld
12342 \begin_inset Quotes erd
12348 \begin_layout Enumerate
12349 Information given at the beginning of the article (i.
12350 \begin_inset space \thinspace{}
12354 \begin_inset space \space{}
12357 title, subtitle, author, institution, running title, running author, abstract
12358 and keywords) must be included in an environment called
12359 \begin_inset Quotes eld
12363 \begin_inset Quotes erd
12367 This is not implemented in LyX, so you must enter title, subtitle etc.
12368 \begin_inset space ~
12371 between two TeX code lines (
12386 \begin_layout Enumerate
12387 According to the user manual, the label of each bibliography item must be
12411 \begin_layout Standard
12416 template takes care of all these
12417 \begin_inset Quotes eld
12421 \begin_inset Quotes erd
12425 If you start a new paper using this template you don't need to do anything
12430 \begin_layout Enumerate
12431 don't delete the TeX code included in the template, and
12434 \begin_layout Enumerate
12435 copy the example bibliography item included in the template and modify it
12436 as necessary to enter new bibliography items.
12439 \begin_layout Section
12443 \begin_layout Standard
12449 \begin_layout Subsection
12453 \begin_layout Standard
12454 The LyX document classes
12456 article (koma-script)
12460 report (koma-script)
12478 correspond to the LaTeX document classes
12495 \begin_inset space ~
12498 of the Koma-Script family.
12499 They are replacements for the standard document classes
12515 , resp., and fit better to European typography conventions in a number of
12519 \begin_layout Itemize
12520 Standard character size is 11pt in
12522 article (koma-script)
12526 report (koma-script)
12534 letter (koma-script)
12539 \begin_layout Itemize
12540 Headings, labels of the description environment, and a number of elements
12543 letter (koma-script)
12545 document class are set in a bold sans serif font.
12549 \begin_layout Plain Layout
12550 There is a big difference between the bold sans serif old cm fonts and new
12551 ec fonts, especially in the appearance of headings.
12552 In comparison, the ec bold sans serif fonts look a bit thin.
12553 Here the LaTeX package
12561 helps to produce the
12562 \begin_inset Quotes eld
12566 \begin_inset Quotes erd
12569 appearance when using the ec fonts.
12574 The numbering of chapter headings is made in the same way as the numbering
12575 of section headings, that is without the extra line
12576 \begin_inset Quotes eld
12579 Chapter\SpecialChar \ldots{}
12581 \begin_inset Quotes erd
12585 In addition, the appearance of the headings can be modified by using a
12586 number of options (in LyX to be entered in the field
12589 \begin_inset space ~
12596 Layout\SpecialChar \menuseparator
12600 A detailed German description of these options can be found in the Koma-Script
12608 \begin_layout Itemize
12609 The main means in the Koma-Script document classes to design the type area
12618 (in LyX to be entered in the extra class options field in the dialog
12620 Document\SpecialChar \menuseparator
12624 They make a clearer modification of page margins possible as do the options
12627 Document\SpecialChar \menuseparator
12631 A detailed German description of these and other type area options can
12632 be found in the Koma-Script documentation
12639 \begin_layout Itemize
12640 The LaTeX document classes of the Koma-Script family define a number of
12641 additional commands.
12642 Those part of it which makes sense in LyX is implemented in corresponding
12646 \begin_layout Standard
12647 A detailed German description of the LaTeX document classes of the Koma-Script
12648 family can be found in the Koma-Script documentation
12656 \begin_layout Plain Layout
12657 There is an English translation
12661 , but it is not a complete one.
12666 The following sections describe only those aspects, which are relevant
12670 \begin_layout Subsection
12671 article (koma-script), report (koma-script), and book (koma-script)
12674 \begin_layout Standard
12675 The document classes
12677 article (koma-script)
12681 report (koma-script)
12691 are implemented in the layout files
12704 They contain all the paragraph types of the corresponding standard document
12717 , resp., partly modified, with the exception of the LyX specific
12721 -type, which is replaced by the new
12725 -type having the same functionality.
12730 -Type there is a number of new paragraph types added.
12737 letter (koma-script)
12742 \begin_layout Itemize
12751 : are equivalents to
12759 , resp., additionally inserting an entry in the table of contents.
12768 are not contained in
12770 article (koma-script)
12775 \begin_layout Itemize
12784 : behave exactly as
12792 , resp., additionally clearing running heads.
12797 is not contained in
12799 article (koma-script)
12805 \begin_layout Plain Layout
12818 report (koma-script)
12820 , but since this is identical to
12824 , is has not been implemented in LyX.
12832 \begin_layout Itemize
12837 : generates a heading directly above the following paragraph in the standard
12838 character size without affecting the structure of the document.
12841 \begin_layout Itemize
12850 are special captions which respect the different space settings needed
12851 for captions placed above or below an element (if you follow strict typographic
12852 rules, you might want to place table captions always above the table).
12853 You can also use the class option
12857 , which will switch
12870 You need at least Koma-Script version 2.8q to use this.
12873 \begin_layout Itemize
12878 : can be used to set a bonmot, e.
12879 \begin_inset space \thinspace{}
12883 \begin_inset space \space{}
12886 at the beginning of a chapter.
12887 If you use the optional argument (
12889 Insert\SpecialChar \menuseparator
12891 \begin_inset space ~
12896 ), you can insert the dictum's author there.
12897 Dictum and author are separated by a line.
12898 You need at least Koma-Script version 2.8q to use this.
12903 is not contained in
12905 article (koma-script)
12910 \begin_layout Standard
12911 The following types, together with the standard types
12923 , form the title area of the document.
12924 They must be entered ahead of the first
12925 \begin_inset Quotes eld
12929 \begin_inset Quotes erd
12936 \begin_layout Plain Layout
12937 The corresponding LaTeX commands must appear before the
12948 When such a type is used more than once, the latter usage overwrites the
12949 former one, that means, for every type only the latest usage is valid.
12950 The order of the different types however has, like
12962 , no effect on the appearance of the produced document.
12965 \begin_layout Itemize
12970 : produces a centered paragraph above the ordinary title (
12982 ) for the subject of the document.
12985 \begin_layout Itemize
12990 : produces a centered paragraph below the ordinary title (
13002 ) for the publishers' name.
13005 \begin_layout Itemize
13012 report (koma-script)
13018 produces a centered paragraph on its own page behind the title page, or
13021 article (koma-script)
13023 produces a centered paragraph below the ordinary title (
13039 ) for a dedication.
13042 \begin_layout Itemize
13047 : produces a left aligned paragraph above the ordinary title (
13063 ) for a document`s head.
13066 \begin_layout Itemize
13071 : produces in a double-sided print in
13073 report (koma-script)
13079 a left-aligned paragraph at the top of the title page`s back or has no
13080 effect in a single-sided print or in
13082 article (koma-script)
13087 \begin_layout Itemize
13092 : produces in a double-sided print in
13094 report (koma-script)
13100 a left-aligned paragraph at the bottom of the title page`s back or has
13101 no effect in a single-sided print or in
13103 article (koma-script)
13108 \begin_layout Itemize
13113 : produces a special
13114 \begin_inset Quotes eld
13118 \begin_inset Quotes erd
13121 page ahead of the actual document containing a paragraph without special
13125 \begin_layout Standard
13126 The layout files for the document classes
13128 article (koma-script)
13132 report (koma-script)
13138 do include the file
13143 This is thought of as a place to define your own types.
13148 in your personal layout directory and edit the file!
13151 \begin_layout Subsection
13152 letter (koma-script)
13155 \begin_layout Standard
13159 \begin_layout Plain Layout
13171 \begin_layout Standard
13175 letter (koma-script)
13177 is implemented in the layout file
13182 It contains all the paragraph types of the corresponding standard document
13187 , partly modified, with the exception of the LyX specific types
13199 type, which is replaced by the new
13204 In addition, it contains, in contrast to the standard document class, the
13222 Furthermore, there are a number of new letter specific types.
13225 \begin_layout Standard
13229 \begin_layout Plain Layout
13241 \begin_layout Standard
13242 The appearance of the letter produced by this document class can be controlled
13243 by a number of LaTeX commands, which you can put in the LaTeX preamble.
13247 \begin_layout Plain Layout
13248 For example, the standard appearance of the letter`s heading, consisting
13249 of name and address, is quite self-willed.
13251 \begin_inset Quotes eld
13255 \begin_inset Quotes erd
13258 heading is produced by the following LaTeX commands in the preamble:
13261 \begin_layout LyX-Code
13271 \begin_layout LyX-Code
13287 \begin_layout LyX-Code
13297 \begin_layout LyX-Code
13317 A detailed German description of such LaTeX commands can be found in the
13318 Koma-Script documentation
13323 With it, the letter's author can produce his personal letter layout.
13326 \begin_layout Standard
13335 define the beginning of the letter and must be used in every letter.
13336 To emphasize them in the LyX document class, they are marked with the letter
13346 \begin_inset space ~
13349 in the left margin.
13350 It is possible to write any number of letters in one file.
13355 type produces a new letter using the same addressee and a
13359 type produces a new addressee.
13376 are ordinary paragraph types and can also be used several times in one
13377 and the same letter.
13380 \begin_layout Itemize
13385 : produces a paragraph for the addressee and implicitly defines the beginning
13389 \begin_layout Itemize
13394 : produces a paragraph for the form of address and implicitly produces a
13398 \begin_layout Itemize
13403 : produces a paragraph for a close.
13406 \begin_layout Itemize
13411 : produces a paragraph for a postscript.
13414 \begin_layout Itemize
13419 : produces a paragraph for a distribution list.
13422 \begin_layout Itemize
13427 : produces a paragraph for enclosures.
13430 \begin_layout Standard
13471 are input types provided with a label to enter information, which will
13472 be processed by the document class.
13476 \begin_layout Plain Layout
13477 It could be seen as a matter of inconsequence, that the types
13485 described above are not such input types as well.
13486 Because of the special meaning of those types, however, I have implemented
13487 them as ordinary paragraph types with a one letter mark in the left margin.
13488 Moreover, it would affect my feeling of symmetry, if the
13496 type had such a serious different appearance.
13501 The types must be used ahead of the corresponding
13508 \begin_layout Standard
13509 An implementation of these types in a WYSIWYG fashion does not seem to make
13510 sense, because the real appearance of the produced letter does not only
13511 depend on the usage of the particular type, but also on other factors.
13512 For example, a signature entered in the
13516 type will in the standard behavior appear in the produced letter only,
13517 when in the same letter also a
13522 The entered value of the
13526 type will in the standard behavior not appear in the produced letter at
13528 The possibility to design the letter`s heading freely is already indicated
13529 in a footnote above.
13532 \begin_layout Standard
13533 The input types can also be used as empty paragraphs.
13534 This makes sense e.
13535 \begin_inset space \thinspace{}
13539 \begin_inset space \space{}
13551 type is not used at all, in the standard behavior the value of the
13555 type is used as signature, whereas if an empty
13559 type is used, no signature value is defined.
13562 \begin_layout Standard
13563 By using the input types it is possible to write a letter template, containing
13564 filled input types with your personal dates (name, address, etc.) and empty
13565 input types for other dates you want to enter.
13568 \begin_layout Itemize
13573 : sender's name, in the standard behavior appears as a centered paragraph
13574 in small caps in the letter`s heading.
13577 \begin_layout Itemize
13582 : sender's signature, in the standard behavior appears below the
13591 type is used, the value of the
13595 type appears instead.
13598 \begin_layout Itemize
13603 : sender's address, in the standard behavior appears in a centered paragraph
13604 in the letter`s heading below the sender's name.
13607 \begin_layout Itemize
13612 : sender's telephone number, in the standard behavior only sets the LaTeX
13622 \begin_layout Itemize
13627 : place of the letter`s making.
13630 \begin_layout Itemize
13635 : date of the letter`s making.
13644 , in the standard behavior, produce the place and the date in a right-aligned
13645 line below the addressee's field.
13650 type is used, neither place nor date appear, independent of the value of
13660 type is used, the date of the letter `s production is used.
13663 \begin_layout Itemize
13668 : sender`s back address, in the standard behavior appears above the addressee's
13669 field in a small sans serif font.
13672 \begin_layout Itemize
13677 : special mail information, in the standard behavior appears underlined
13678 above the addressee's field below the back address.
13681 \begin_layout Itemize
13686 : additional information, in the standard behavior appears on right side
13687 below the addressee`s field.
13690 \begin_layout Itemize
13695 : the letter's title, in the standard behavior appears in a big, bold, sans
13696 serif font above the subject.
13699 \begin_layout Itemize
13704 : the letter's subject, in the standard behavior appears in a bold font
13712 \begin_layout Standard
13733 produce a business letter like line above the
13737 line containing the fields
13738 \begin_inset Quotes eld
13742 \begin_inset Quotes erd
13746 \begin_inset Quotes eld
13750 \begin_inset Quotes erd
13754 \begin_inset Quotes eld
13758 \begin_inset Quotes erd
13762 \begin_inset Quotes eld
13766 \begin_inset Quotes erd
13770 \begin_inset Quotes eld
13774 \begin_inset Quotes erd
13778 \begin_inset Quotes eld
13782 \begin_inset Quotes erd
13786 For the date field, the value of the
13792 \begin_inset Quotes eld
13795 business letter types
13796 \begin_inset Quotes erd
13799 is used, the value of the
13803 type however does not appear, but only the LaTeX variable
13810 The ordinary output of place and date in a right-aligned line below the
13811 addressee`s field is suppressed.
13812 The types are implemented as input types provided with a label and must
13813 be used ahead of the corresponding
13820 \begin_layout Itemize
13828 \begin_layout Itemize
13836 \begin_layout Itemize
13844 \begin_layout Itemize
13852 \begin_layout Itemize
13860 \begin_layout Subsection
13861 The new letter class: letter (koma-script v.2)
13864 \begin_layout Standard
13870 \begin_layout Standard
13871 \begin_inset VSpace medskip
13877 \begin_layout Standard
13879 Koma-Script version 2.8 has introduced a new letter class
13883 which supersedes the now unsupported
13888 It has — on the LaTeX side — a completely new interface and is not compatible
13889 with the old class.
13890 Therefore, LyX supports both, though it is recommended to use the new class.
13893 \begin_layout Standard
13894 This class covers the same functionality as
13896 letter (koma-script),
13899 The basic items are
13903 (receiver's address, same as
13907 in the old layout),
13920 will start a new letter (i.
13921 \begin_inset space \thinspace{}
13925 \begin_inset space \space{}
13928 you can write several letters per document).
13929 New elements are sender's
13945 and the possibility to use a
13951 Insert\SpecialChar \menuseparator
13957 \begin_layout Standard
13958 The biggest improvement is, though, that the letter's layout is configurable
13959 at almost any needs.
13960 This can be done via the preamble or with a special style file (Letter
13961 Class Option, extension
13965 ), that will be read in as a class option.
13969 \begin_layout Plain Layout
13970 The KOMA package comes with some default
13975 There is, for instance, a
13979 file that follows german typesetting rules, or a
13983 that provides the default layout of the old
13988 The latter can be loaded with the class option
13997 ayout\SpecialChar \menuseparator
14002 ocument\SpecialChar \menuseparator
14014 template that is included in LyX for examples.
14015 A detailed description is to be found in the Koma-Script documentation
14023 \begin_layout Subsection
14027 \begin_layout Standard
14028 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14032 \begin_layout Itemize
14033 The chapter number of a
14037 type appears on a line of its own above the chapter heading instead of
14038 appearing in the same line ahead of it.
14039 The cause for that is the LyX internal behavior for the labeltype
14043 in the layout file.
14046 \begin_layout Itemize
14047 The headings of the types
14055 are only put in the
14056 \begin_inset Quotes eld
14060 \begin_inset Quotes erd
14063 LaTeX table of contents, but not in the LyX table of contents (
14065 Document\SpecialChar \menuseparator
14067 \begin_inset space ~
14071 \begin_inset space ~
14079 \begin_layout Itemize
14080 The paragraphs in a
14084 document class appear in a skip separation mode, not indented.
14085 This is the standard behavior, no special LaTeX commands are needed for
14089 Document\SpecialChar \menuseparator
14092 dialog the corresponding radio button indicates
14101 value always has the effect that extra LaTeX commands are inserted in the
14102 document to produce the gap, which is not what is wanted in this case.
14105 \begin_layout Section
14106 Latex8 (IEEE Conference Papers)
14109 \begin_layout Standard
14115 \begin_layout Subsection
14119 \begin_layout Standard
14120 Since this class is specifically for writing submissions to IEEE sponsored
14121 conferences I strongly recommend that you get a copy of their Authors Kit.
14126 package and associated bibliography style file is included in the kit.
14127 The Authors Kit is usually sent out by email once your initial submission
14129 There is a lot of useful information in the Authors Kit explaining formatting
14130 restrictions and so on and I will assume you have read this since that
14131 means I don't have to repeat it all here.
14134 \begin_layout Subsection
14138 \begin_layout Standard
14139 [AR\SpecialChar \@.
14143 \begin_layout Subsection
14144 Supported Environments
14147 \begin_layout Itemize
14153 \begin_layout Itemize
14159 \begin_layout Itemize
14165 \begin_layout Itemize
14171 \begin_layout Itemize
14177 \begin_layout Itemize
14183 \begin_layout Itemize
14189 \begin_layout Itemize
14195 \begin_layout Itemize
14201 \begin_layout Subsection
14202 Differences Between Screen and Paper
14205 \begin_layout Standard
14206 There are slight differences in appearance mainly with the presentation
14207 of section counters.
14208 On screen the trailing period of the section counter is missing but it
14209 will appear in the output so don't let this worry you.
14212 \begin_layout Section
14216 \begin_layout Standard
14222 \begin_layout Subsection
14226 \begin_layout Standard
14227 Memoir is a very powerful and constantly evolving class.
14228 It has been designed with regard to fictional and non-fictional literature.
14229 Its aim is to let the user have maximum control over the typesetting of
14231 Memoir is based on the standard book class, but it can also emulate the
14232 article class (see below).
14235 \begin_layout Standard
14236 Peter Wilson, the developer of Memoir, is known as the author of lots of
14237 useful packages in the LaTeX world.
14238 Most of them have been merged with Memoir.
14239 Therefore, it is much easier to layout the table of contents, appendices,
14240 chapter designs and such.
14241 LyX, though, does not support all of these goodies natively.
14242 Some of them might be added to forthcoming releases
14246 \begin_layout Plain Layout
14247 You are invited to send suggestions to
14248 \begin_inset Flex URL
14251 \begin_layout Plain Layout
14253 lyx-devel@lists.lyx.org
14263 , lots will probably never, due to the limitations of LyX's framework.
14264 Of course you can still use all features with the help of some native LaTeX
14269 \begin_layout Plain Layout
14274 \begin_layout Plain Layout
14284 \begin_inset space ~
14288 \begin_inset CommandInset ref
14290 reference "sec:Inserting-TeX-Code"
14300 In this section, we can only list those features which are natively supported
14302 For detailed descriptions (and for the rest of features) we are recommending
14303 to have a look at the detailed manual of the Memoir class
14307 \begin_layout Plain Layout
14312 \begin_layout Plain Layout
14322 \begin_inset Flex URL
14325 \begin_layout Plain Layout
14327 CTAN:/macros/latex/memoir/memman.pdf
14337 , which is not only a user guide for the class, but also both a comprehensive
14338 description on good typesetting and a superb example for good typesetting
14342 \begin_layout Subsection
14343 Basic features and restrictions
14346 \begin_layout Standard
14347 Memoir supports basically all features of the standard book classes.
14348 There are, however, some differences, as follows:
14351 \begin_layout Description
14353 \begin_inset space ~
14356 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14359 \begin_layout Description
14361 \begin_inset space ~
14364 style: The fancy page style is not supported, due to a command clash between
14365 Memoir and the fancyhdr package (they are both defining a command with
14366 the same name, which confuses LaTeX).
14367 Instead, Memoir comes with a bunch of own page styles (see
14369 Layout\SpecialChar \menuseparator
14370 Document\SpecialChar \menuseparator
14372 \begin_inset space ~
14378 If you want to use these for the chapter pages, you have to use the command
14385 in the main text or in preamble (e.
14386 \begin_inset space \thinspace{}
14390 \begin_inset space \space{}
14397 chapterstyle{companion}
14402 \begin_layout Description
14403 Sectioning: Sectionings (chapter, section, subsection etc.) are coming with
14404 an optional argument in the standard classes.
14405 With this, you can specify an alternative version of the title for the
14406 table of contents and the headers (for instance, if the title is too long).
14407 In LyX, you can do this via
14409 Insert\SpecialChar \menuseparator
14411 \begin_inset space ~
14416 at the beginning of a chapter/section.
14417 Memoir features a second optional argument and thus separates the table
14418 of contents from the header.
14419 You can define three variants of a title with this: one for the main text,
14420 one for the table of contents, and one for the headers.
14421 Simply insert two optional arguments if you need this feature, the first
14422 one containing the short title for the Table of Contents, the second one
14423 containing an alternative short title for the headers.
14426 \begin_layout Description
14427 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14428 of contents, the list of figures and the list of table start a new page
14430 Memoir does not follow this route.
14431 You have to insert a page break yourself, if you want to have one.
14434 \begin_layout Description
14435 Titlepage: For some unknown reason, Memoir uses pagination on the title
14436 page (in the standard classes, title pages are
14437 \begin_inset Quotes eld
14441 \begin_inset Quotes erd
14445 \begin_inset space \thinspace{}
14449 \begin_inset space \space{}
14453 If you want an empty title page, type
14457 aliaspagestyle{title}{empty}
14462 \begin_layout Description
14463 Article: With the class option
14469 Layout\SpecialChar \menuseparator
14470 Document\SpecialChar \menuseparator
14472 \begin_inset space ~
14477 ), you can emulate article style.
14478 That is, counters (footnotes, figures, tables etc.) will not be reset on
14479 new chapters, chapters don't start a new page (but are—in contrary to
14480 \begin_inset Quotes eld
14484 \begin_inset Quotes erd
14487 article classes—still allowed), parts, though, use their own page, as in
14491 \begin_layout Description
14492 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14493 font commands, which have been used in the old LaTeX version 2.09 (e.
14494 \begin_inset space \thinspace{}
14498 \begin_inset space \space{}
14514 It produces an error and stops LaTeX whenever such a command appears.
14519 reallows the commands and spits out warnings instead (which does at least
14521 Since a lot of packages and particularly BibTeX style files are still using
14522 those commands, we have decided to use this option by default.
14525 \begin_layout Subsection
14529 \begin_layout Standard
14530 We will only describe the features supported by LyX (which is not much currently
14532 Please consult the Memoir manual
14536 \begin_layout Plain Layout
14541 \begin_layout Plain Layout
14551 \begin_inset Flex URL
14554 \begin_layout Plain Layout
14556 CTAN:/macros/latex/memoir/memman.pdf
14569 \begin_layout Description
14570 Abstract: You may wonder why an abstract is an extra feature.
14571 Well, it is in book class.
14572 Usually books don't have abstracts.
14573 Memoir, however, has.
14574 You can use it wherever and how often you like.
14577 \begin_layout Description
14578 Chapterprecis: You may know this from belletristic: The contents of a chapter
14579 is shortly described below the title and also in the table of contents
14581 \begin_inset space \thinspace{}
14585 \begin_inset space \space{}
14590 Our hero arrives in Troia; he loses some friends; he finds others
14593 Chapterprecis does exactly this.
14594 It is therefore only sensible below a chapter.
14597 \begin_layout Description
14598 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14599 The epigraph environment provides an elegant way of typesetting such a
14601 The motto itself (text) and its author (source) are divided by a short
14603 Unfortunately, we have to fool LyX a bit here again, since the environment
14604 needs two arguments (text and source).
14605 In this case, we have to use curly brackets (in TeX mode) between the two
14616 <author of the slogan>.
14619 \begin_layout Description
14620 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14621 complex figurative poems).
14622 LyX can only support a few of them.
14623 One is poemtitle, which is a centered title for poems, which will also
14624 be added to the table of contents (verse is the standard environment for
14626 Memoir has some enhanced versions of verse, but you need to use TeX code,
14627 because they have to be nested inside regular verse environments, which
14628 is not possible with LyX).
14631 \begin_layout Description
14632 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14635 \begin_layout Section
14636 Article (mwart), book (mwbk) and report (mwrep)
14637 \begin_inset OptArg
14640 \begin_layout Plain Layout
14653 \begin_layout Standard
14659 \begin_layout Standard
14660 The LyX document classes
14676 correspond to the LaTeX document classes
14689 They are replacements for the standard document classes
14701 , resp., and fit better to Polish typography conventions in a number of points.
14705 \begin_layout Standard
14709 \begin_layout Itemize
14710 Unnumbered titles (with star, e.
14711 \begin_inset space \thinspace{}
14715 \begin_inset space \space{}
14722 ) are added into table of contents,
14725 \begin_layout Itemize
14726 Additional page styles:
14730 \begin_layout Description
14731 uheadings header with separated lines,
14734 \begin_layout Description
14735 myheadings custom header, contents headers via commands:
14750 \begin_layout Description
14751 myuheadings custom header with separated lines,
14754 \begin_layout Description
14755 outer page number is placed on outer side of page
14759 \begin_layout Itemize
14764 \begin_layout Description
14765 rmheadings serif titles — default,
14768 \begin_layout Description
14769 sfheadings sansserif titles,
14772 \begin_layout Description
14773 authortitle on title page first placed is author next title — default,
14776 \begin_layout Description
14777 titleauthor on title page first placed is title next author,
14780 \begin_layout Description
14781 withmarginpar reserve place on page for margins.
14785 \begin_layout Section
14789 \begin_layout Standard
14794 provides an alternative to the standard
14799 It provides similar functionality, but you might prefer this layout with
14800 sans serif sections, headings, and more.
14803 \begin_layout Section
14807 \begin_layout Standard
14813 \begin_layout Standard
14814 \begin_inset VSpace bigskip
14820 \begin_layout Standard
14825 \begin_inset space ~
14830 textclass works with the American Physical Sociey's RevTeX 4.0 (the
14831 \begin_inset Formula $\beta$
14834 release of May, 1999) class.
14837 \begin_layout Standard
14842 textclass, which works with RevTeX 3.1.
14843 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
14844 That means that it doesn't interact very well with LyX, which requires
14845 LaTeX2e, although it has been kludged to work.
14846 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
14850 \begin_inset space ~
14855 textclass should also be pretty easy to use.
14858 \begin_layout Standard
14859 These documents are supposed to be used in
14863 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
14864 macros, and assume you'll know what to put in the preamble if necessary.
14867 \begin_layout Subsection
14871 \begin_layout Standard
14872 All you need to do is install RevTeX 4, as described in the package's README
14874 The package can be found at The RevTeX 4 Web Site
14875 \begin_inset Flex URL
14878 \begin_layout Plain Layout
14880 http://publish.aps.org/revtex4/
14886 Install it somewhere that LaTeX can see it.
14887 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
14889 \begin_inset space \thinspace{}
14893 \begin_inset space \space{}
14896 not the directory where you installed the class file.) Then, if you reconfigure
14897 LyX, it will find the class file and let you use the RevTeX4 textclass.
14900 \begin_layout Standard
14901 Probably the easiest way to get started is either to import a RevTeX 4 document
14909 \begin_inset space ~
14914 template, found in the templates directory.
14917 \begin_layout Subsection
14921 \begin_layout Standard
14922 Optional arguments to
14929 \begin_inset Quotes eld
14933 \begin_inset Quotes erd
14937 \begin_inset Quotes eld
14941 \begin_inset Quotes erd
14951 \begin_inset space ~
14959 \begin_inset space ~
14965 Remember that in RevTeX, at least one optional argument is required!
14968 \begin_layout Standard
14969 Other preamble matter, like
14976 \begin_inset space ~
14982 \begin_inset space ~
14987 dialog, also as usual.
14990 \begin_layout Subsection
14994 \begin_layout Standard
14995 The layouts basically correspond to the commands in RevTeX4.0.
14996 For example, the Email layout corresponds to
15003 Note that (at least as of RevTeX 4.0 Beta), the
15011 layouts are exactly equivalent, so you shouldn't need to use both.
15015 \begin_layout Plain Layout
15016 In case you're curious, both were included so that
15020 would be able to translate both
15040 \begin_layout Subsection
15044 \begin_layout Standard
15045 There are a couple of important unique aspects of RevTeX 4 which might cause
15046 bugs that will be even more confusing in LyX.
15049 \begin_layout Standard
15067 The LyX equivalent is that there is a separate Thanks layout.
15072 write footnotes in the
15076 layout, or weird things may happen.
15077 See the RevTeX 4 documentation for more details.
15080 \begin_layout Standard
15084 \begin_inset space ~
15092 \begin_inset space ~
15101 layouts must be placed
15109 layout and the corresponding
15126 , the LaTeX won't compile.
15129 \begin_layout Subsection
15133 \begin_layout Standard
15134 The main problem with this layout is that you can't use the optional arguments
15135 to layouts like Email and Title.
15136 (The problem is not unique to this layout; you can't use optional arguments
15137 to the Section layouts either.) This means that after you export that file
15138 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15139 need to edit the LaTeX file with a text editor to add the optional arguments
15141 \begin_inset space \thinspace{}
15145 \begin_inset space \space{}
15148 the running title for the page headers.
15149 Lacking these layouts makes the
15155 (and the equivalent
15161 ) useless, so the corresponding layouts don't exist, and will have to be
15166 \begin_layout Plain Layout
15171 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15172 has not been updated yet to take advantage of it.
15180 \begin_layout Section
15181 Springer Journals (
15188 \begin_layout Standard
15194 \begin_layout Subsection
15198 \begin_layout Standard
15199 These are the layout files for some of the journal formats used by Springer
15200 Verlag and listed on
15201 \begin_inset Flex URL
15204 \begin_layout Plain Layout
15206 http://www.springer.de/author/tex/help-journals.html
15211 , where you should also go to fetch the class files (yes, these are LaTeX2e
15213 It is a modular system: the things common to all journals are implemented
15218 , which journal-specific layout files (such as, e.
15219 \begin_inset space \thinspace{}
15223 \begin_inset space \space{}
15230 for Journal of Geodesy) can include.
15233 \begin_layout Standard
15234 This means that implementing support for any other Springer journal on this
15235 list is as simple as writing your own
15243 file following the outline given in
15251 \begin_layout Standard
15252 It is reasonably well tested only for the Journal of Geodesy.
15261 come with the standard LyX distribution.
15262 Install the relevant class file (downloaded from Springer) in a proper
15263 directory, reconfigure LaTeX (in the teTeX case by running
15267 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15268 and it should work.
15271 \begin_layout Subsection
15275 \begin_layout Standard
15276 A large number of theorem-like styles —
15282 \SpecialChar \ldots{}
15288 \begin_layout Standard
15291 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15292 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15295 See the Springer class file documentation for details.
15298 \begin_layout Subsection
15302 \begin_layout Itemize
15314 \begin_layout Itemize
15317 Probability Theory and Related Fields
15323 — Jean-Marc Lasgouttes
15326 \begin_layout Standard
15327 Add your own, it isn't so hard!
15330 \begin_layout Subsection
15334 \begin_layout Standard
15335 These files are partly based on the older
15339 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15340 file from Springer.
15345 layout, are now defunct.
15346 Jean-Marc Lasgouttes helped out big in making me find my way around the
15347 LyX layout file mechanism.
15350 \begin_layout Subsection
15354 \begin_layout Standard
15356 But probably less than in the old hacked-LaTeX
15363 \begin_layout Standard
15365 \begin_inset space \thinspace{}
15368 g.: does not display the number for theorem-like layouts, just #.
15371 \begin_layout Section
15377 \begin_inset CommandInset label
15386 \begin_layout Standard
15394 \begin_layout Subsection
15398 \begin_layout Standard
15399 This section describes how to use LyX to make slides for overhead projectors.
15400 There are two document classes that can do this: the default slides class
15406 This section documents the former.
15409 \begin_layout Standard
15410 I'm going to say this again, nice and clear, so that there's no misunderstanding
15414 \begin_layout Standard
15415 \begin_inset VSpace bigskip
15421 \begin_layout Standard
15425 This section documents the class
15426 \begin_inset Quotes eld
15434 \begin_inset Quotes erd
15442 \begin_layout Standard
15443 \begin_inset VSpace bigskip
15449 \begin_layout Standard
15450 If you're looking for the documentation for
15451 \begin_inset Quotes eld
15459 \begin_inset Quotes erd
15462 , check out section
15463 \begin_inset space ~
15467 \begin_inset CommandInset ref
15469 reference "sec:foiltex"
15479 \begin_inset Quotes eld
15487 \begin_inset Quotes erd
15490 ] is actually somewhat better than the default
15498 \begin_layout Plain Layout
15499 \SpecialChar \ldots{}
15500 or so I've been told repeatedly by its advocates.
15501 Having never used it, I have no idea if this claim is true or not.
15506 which this section documents.
15509 \begin_layout Standard
15510 This class is the LaTeX2e improvement of the old
15515 Every LaTeX2e distribution includes this class [which I'll just refer to
15517 \begin_inset Quotes eld
15525 \begin_inset Quotes erd
15528 from now on], so you're bound to have it.
15529 As I noted earlier, there are other classes, such as
15533 , which also produce slides for overhead projectors and do a better job
15535 However, there are some things which
15539 can do which the others can't, such as generate overlays.
15540 Read on to learn more!
15543 \begin_layout Subsection
15545 \begin_inset CommandInset label
15547 name "sec:slidesetup"
15554 \begin_layout Standard
15555 Obviously, to use this document class, you need to select
15556 \begin_inset Quotes eld
15564 \begin_inset Quotes erd
15567 from the class list in the
15569 Document\SpecialChar \menuseparator
15573 There are some other special things you should know about this class:
15576 \begin_layout Itemize
15577 Don't bother changing the options
15582 They're not supported by the
15589 \begin_layout Itemize
15593 \begin_inset space ~
15598 behaves a bit differently for this class.
15599 The possible choices and what they do are as follows:
15603 \begin_layout Description
15608 The final output contains page numbers in the lower right corner.
15611 \begin_layout Description
15620 , but also prints out any time markers you've put in.
15621 This is the default.
15624 \begin_layout Description
15629 The final output contains no page numbers, time markers, or alignment markers.
15633 \begin_layout Itemize
15638 class has an extra option:
15644 \begin_inset Quotes eld
15652 \begin_inset Quotes erd
15655 in the extra class options.
15659 \begin_layout Standard
15660 Using this options allows you to add time markers to
15666 \begin_inset space ~
15670 \begin_inset CommandInset ref
15672 reference "sec:slideNote"
15680 \begin_layout Standard
15681 You can also use the template file
15682 \begin_inset Quotes eld
15690 \begin_inset Quotes erd
15693 to automatically set up a document to use the
15699 File\SpecialChar \menuseparator
15701 \begin_inset space ~
15705 \begin_inset space ~
15710 to open your new document].
15711 The template file also contains some examples of the special paragraph
15712 environments used by this class.
15713 I'll describe those next.
15716 \begin_layout Subsection
15717 Paragraph Environments
15720 \begin_layout Subsubsection
15721 Supported Environments
15724 \begin_layout Standard
15725 The first thing you'll notice when you start up a new
15729 document is the font size and type: it's the equivalent of the size
15730 \begin_inset Quotes eld
15738 \begin_inset Quotes erd
15744 \begin_inset space ~
15750 This is also what's used in the output.
15752 \begin_inset Quotes eld
15756 \begin_inset Quotes erd
15759 to remind you that this is a slide.
15760 Your final slides will use a larger font; ergo, you'll have less space.
15761 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
15764 \begin_layout Standard
15765 The next thing that becomes obvious is the changes to the paragraph environment
15766 pull-down box [at the far-left end of the toolbar].
15767 Most of the paragraph environments you're used to seeing are missing.
15768 There are also five new ones.
15773 class itself only supports certain paragraph environments:
15776 \begin_layout Itemize
15782 \begin_layout Itemize
15788 \begin_layout Itemize
15794 \begin_layout Itemize
15800 \begin_layout Itemize
15806 \begin_layout Itemize
15812 \begin_layout Itemize
15818 \begin_layout Itemize
15824 \begin_layout Itemize
15830 \begin_layout Itemize
15836 \begin_layout Itemize
15842 \begin_layout Standard
15843 All of the other standard environments, including the section-heading environmen
15844 ts, aren't used in the
15851 \begin_layout Standard
15852 On the other hand, you'll notice the following new environments:
15855 \begin_layout Itemize
15861 \begin_layout Itemize
15867 \begin_layout Itemize
15873 \begin_layout Itemize
15879 \begin_layout Itemize
15885 \begin_layout Standard
15886 These five are kind of quirky, due to a
15887 \begin_inset Quotes eld
15891 \begin_inset Quotes erd
15895 You see, LyX doesn't permit you to nest any other paragraph environment
15896 into an empty environment.
15897 Now, that's fine and dandy, but it means that you wouldn't be able to start
15898 a slide with anything except plain text.
15899 To deal with this, I've performed a little
15900 \begin_inset Quotes eld
15904 \begin_inset Quotes erd
15910 \begin_layout Subsubsection
15911 Quirks of the New Environments
15912 \begin_inset CommandInset label
15914 name "sec:slideQuirk"
15921 \begin_layout Standard
15922 All five of the new paragraph environments are somewhat quirky due to inherent
15923 limitiations in the current version of LyX.
15924 As I just mentioned, LyX forbids environments that begin with another environme
15926 To get around this, the
15930 environment isn't a paragraph environment as described in the
15938 \begin_layout Standard
15939 You should consider
15952 \begin_inset Quotes eld
15955 pseudo-environments.
15956 \begin_inset Quotes erd
15959 They look like a section heading or a
15960 \begin_inset Quotes eld
15968 \begin_inset Quotes erd
15971 but really begin a [and, if necessary, end the previous] paragraph environment.
15981 \begin_inset Quotes eld
15985 \begin_inset Quotes erd
15988 These two perform some action.
15991 \begin_layout Standard
15992 A common feature of all five environments,
16012 , is a rather long-ish label.
16013 The text following this label — ordinarily the contents of the paragraph
16014 environment — is utterly irrelevant for
16035 LyX completely ignores it.
16036 In fact, you can leave these five environments completely empty.
16040 \begin_layout Standard
16045 to put any text after the rather long-ish label, you might want to.
16046 This could be a short description of the contents of the
16051 In that case, enter in your descriptive comment and hit
16055 as you normally would.
16058 \begin_layout Standard
16059 If, on the other hand, you don't want to enter in any descriptive text,
16060 you'll hit another LyX quirk.
16061 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16062 environment until you put something in the old one.
16066 \begin_layout Itemize
16067 Start entering the text that will
16095 \begin_layout Itemize
16096 Now move to the beginning of that paragraph.
16100 \begin_layout Itemize
16109 \begin_layout Itemize
16110 Finally, change this new, empty paragraph to a
16134 \begin_layout Standard
16135 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16139 \begin_layout Subsection
16140 Making a Presentation with
16153 \begin_layout Subsubsection
16161 \begin_layout Standard
16162 If you're expecting this section to teach you how to actually make a presentatio
16163 n, you'll be sorely disappointed.
16164 Naturally, I'll describe all of the ways the
16168 class can assist you in preparing the materials for a presentation.
16169 Filling in the contents, however, is up to you.
16174 the LyX philosophy.]
16177 \begin_layout Standard
16182 environment [in the manner described in section
16183 \begin_inset space ~
16187 \begin_inset CommandInset ref
16189 reference "sec:slideQuirk"
16193 ] tells LyX to begin a new slide [duh].
16194 The label for this environment/
16195 \begin_inset Quotes erd
16199 \begin_inset Quotes erd
16203 \begin_inset Quotes eld
16207 \begin_inset Quotes erd
16210 in cool blue, followed by the label,
16211 \begin_inset Quotes eld
16215 \begin_inset Quotes erd
16219 Any text or paragraph environments that follow this one go on the new slide.
16223 \begin_layout Standard
16224 Slides are probably the only time you'll need to forcibly end pages in LyX
16225 (this can be specified in the
16230 In fact, you'll want to, once you finish entering the contents of one slide.
16231 If you've entered more text than can physically fit on a slide, the extra
16232 overflows onto a new slide.
16233 I don't recommend doing this, however, since the overflow slide won't have
16234 any page number on it.
16235 Furthermore, it may interfere with any
16239 you've made to accompany the oversized
16246 \begin_layout Standard
16255 environments work the same way as the
16260 They both create an
16261 \begin_inset Quotes eld
16265 \begin_inset Quotes erd
16268 followed by a label [
16269 \begin_inset Quotes eld
16273 \begin_inset Quotes erd
16277 \begin_inset Quotes eld
16281 \begin_inset Quotes erd
16285 The color is a stunning magenta instead of blue, and the
16286 \begin_inset Quotes eld
16290 \begin_inset Quotes erd
16293 will look different, in style and in length.
16294 The label fonts of all three also differ from one another.
16297 \begin_layout Standard
16302 , if the contents of a
16310 exceed the physical size of a slide or sheet of paper, the extra will overflow
16312 Again, you should avoid this.
16313 It defeats the whole purpose of
16324 \begin_layout Subsubsection
16334 \begin_layout Standard
16339 is a slide that sits atop another slide.
16340 Perhaps you wish to discuss a figure on the main
16344 before displaying the text associated with it.
16345 One way to accomplish this is tape a flap of dark paper over the part of
16350 you want to display later.
16351 This method fails, however, if you wish to overlap one graph with another,
16353 You would then have to fumble while speaking to align the two separate,
16358 s to align the two graphs.
16363 environment in both cases makes life much easier.
16366 \begin_layout Standard
16371 receives the page number of its
16372 \begin_inset Quotes eld
16376 \begin_inset Quotes erd
16384 \begin_inset Quotes eld
16392 \begin_inset Quotes erd
16399 \begin_layout Plain Layout
16400 Presumably, mutliple
16405 \begin_inset Quotes eld
16413 \begin_inset Quotes erd
16417 \begin_inset Quotes eld
16425 \begin_inset Quotes erd
16429 \begin_inset Quotes eld
16437 \begin_inset Quotes erd
16441 \begin_inset space ~
16444 appended to the page number of the parent
16454 Clearly, you want the contents of both the
16462 to each fit on a single physical slide! You should probably consider an
16468 \begin_inset Quotes eld
16472 \begin_inset Quotes erd
16484 class provides a visual cue for this: the label at the start of an
16488 is shorter than that at the start of a
16493 Lastly, when you generate printable output, you'll find alignment markers
16494 in all four corners of both the
16498 page and its parent
16503 These will assist you in lining up the two physical slides.
16506 \begin_layout Standard
16507 The major problem in overlaying two slides is aligning the contents of the
16508 two transparencies.
16509 How much space should you leave for that graph on the second slide? Worse
16510 still, what if you want a graph and a sentence on second slide, but there
16511 is text on the main transparency that goes in between them? You could try
16512 and insert vertical space of the right size.
16513 The better way is to use
16524 \begin_layout Standard
16525 As their names imply,
16533 are two command-like paragraph environments that make all subsequent text
16534 invisible and visible, respectively.
16536 \begin_inset space ~
16540 \begin_inset CommandInset ref
16542 reference "sec:slideQuirk"
16546 that you don't place anything
16550 these two environments, however.
16555 , it inserts a centered, sky-blue label into the page reading
16556 \begin_inset Quotes eld
16559 <Invisible Text Follows>
16560 \begin_inset Quotes erd
16564 For paragraphs following this label, the parts of the
16572 ; it doesn't matter which] where they would be contain instead blank space.
16576 \begin_layout Standard
16581 , the corresponding centered label is
16582 \begin_inset Quotes eld
16585 <Visible Text Follows>
16586 \begin_inset Quotes erd
16590 Paragraphs following this label behave normally.
16591 Note that the beginning of a new
16603 automatically shuts off an
16608 It's therefore not necessary to use
16619 \begin_layout Standard
16620 By now, it should be obvious how to create overlay transparencies using
16621 the proper combination of
16640 \begin_layout Enumerate
16645 , including everything that will appear on it, whether on the main slide
16653 \begin_layout Enumerate
16654 Before each figure or paragraph that will appear only on the
16663 If necessary, insert a
16667 environment after the
16674 \begin_layout Enumerate
16679 immediately following the
16686 \begin_layout Enumerate
16687 Copy the contents of this
16698 \begin_layout Enumerate
16703 , change all of the
16714 \begin_layout Standard
16716 You've just made an
16723 \begin_layout Standard
16724 There's one problem with the way I've designed the LyX
16728 class: you can't make text in the middle of a paragraph invisible, nor
16729 make text in the middle of an invisible paragraph visible again.
16730 To accomplish this feat, you'll need to use some inlined LaTeX codes.
16734 \begin_layout Plain Layout
16735 The commands of interest are:
16738 \begin_layout Itemize
16743 invisible \SpecialChar \ldots{}
16747 \begin_layout Itemize
16752 visible \SpecialChar \ldots{}
16756 \begin_layout Plain Layout
16757 \SpecialChar \ldots{}
16758 and need to be marked as TeX.
16760 \begin_inset Quotes eld
16764 \begin_inset Quotes erd
16767 you wish to change goes in between the brackets [and after the
16780 If you don't know how to mark text as TeX, see the appropriate section
16793 \begin_layout Subsubsection
16803 \begin_inset CommandInset label
16805 name "sec:slideNote"
16812 \begin_layout Standard
16821 is associated with a
16822 \begin_inset Quotes eld
16826 \begin_inset Quotes erd
16838 class provides visual cues.
16843 is shorter than that of a
16847 [yet longer than that of an
16851 ] and, like the label of an
16855 is shockingly magenta.
16856 Additionally, the printed
16860 has the page number of its
16861 \begin_inset Quotes eld
16865 \begin_inset Quotes erd
16873 \begin_inset Quotes eld
16881 \begin_inset Quotes erd
16885 \begin_inset Quotes eld
16893 \begin_inset Quotes erd
16897 \begin_inset Quotes eld
16905 \begin_inset Quotes erd
16909 You can have multiple
16913 s associated with a single
16925 , you'll probably want to break up long
16929 s so that they fit on a single sheet of paper.
16932 \begin_layout Standard
16937 is obvious: it contains anything additional you might want to say about
16943 It could also be used as a sheet of reminders for a particular
16948 In the case of the latter, you might want to make use of time markers.
16954 \begin_inset Quotes eld
16958 \begin_inset Quotes erd
16961 support for time markers, a
16966 So, you'll have to resort to using the LaTeX codes.
16969 \begin_layout Standard
16970 To use time markers, you'll need to specify the extra class option
16971 \begin_inset Quotes eld
16979 \begin_inset Quotes erd
16983 \begin_inset space ~
16987 \begin_inset CommandInset ref
16989 reference "sec:slidesetup"
16994 This option turns on timing marks, which will appear in the lower-left-hand
17000 To set what appears in the time marker, you use the LaTeX commands
17001 \begin_inset Quotes eld
17011 \begin_inset Quotes erd
17015 \begin_inset Quotes eld
17025 \begin_inset Quotes erd
17029 The arguments of both commands are time measured in seconds.
17031 \begin_inset Quotes eld
17041 \begin_inset Quotes erd
17044 sets the time marker to a given time.
17046 \begin_inset Quotes eld
17056 \begin_inset Quotes erd
17059 increments the time marker by the specified amount.
17060 Using time markers and
17064 s in this fashion, you can remind yourself how much time to spend on a particula
17072 \begin_layout Standard
17073 There's one last feature to describe.
17074 Clearly, you'd like to print out all of your
17082 s on transparencies while printing all of your
17099 with which it is associated.
17100 What's a person to do?
17103 \begin_layout Standard
17104 Luckily, there are two LaTeX commands that allow you to select what to print
17106 Both must be placed into the preamble of your document.
17108 \begin_inset Quotes eld
17120 \begin_inset Quotes erd
17123 will cause the output to contain only the
17132 Correspondingly, the command
17133 \begin_inset Quotes eld
17145 \begin_inset Quotes erd
17148 prevents the output of anything but
17153 I'd advise placing both commands in the preamble and initially comment
17155 You can then preview your entire presentation as you write.
17156 When you're done writing, you can then uncomment one of the two to select
17157 what you want to print.
17158 I like to uncomment
17159 \begin_inset Quotes eld
17171 \begin_inset Quotes erd
17174 , print to a file with
17175 \begin_inset Quotes eld
17183 \begin_inset Quotes erd
17186 in its name, comment it back out, then uncomment
17187 \begin_inset Quotes eld
17199 \begin_inset Quotes erd
17203 \begin_inset Quotes eld
17211 \begin_inset Quotes erd
17215 I can then send either file to a printer, loading transparencies or plain
17216 paper as appropriate.
17219 \begin_layout Standard
17220 You can also provide other arguments to the
17221 \begin_inset Quotes eld
17231 \begin_inset Quotes erd
17235 \begin_inset Quotes eld
17245 \begin_inset Quotes erd
17249 See a good LaTeX book for details.
17252 \begin_layout Subsection
17257 Class Template File
17260 \begin_layout Standard
17261 I have also provided a template file,
17262 \begin_inset Quotes eld
17270 \begin_inset Quotes erd
17278 To use it, begin your new presentation with
17283 ile\SpecialChar \menuseparator
17285 \begin_inset space ~
17289 \begin_inset space ~
17299 Your new LyX presentation file will contain an example
17320 additionally contain an example of the use of
17329 Lastly, the preamble will contain:
17332 \begin_layout LyX-Code
17333 % Uncomment to print out only slides and overlays
17336 \begin_layout LyX-Code
17340 \begin_layout LyX-Code
17346 \begin_inset Newline newline
17352 \begin_layout LyX-Code
17353 % Uncomment to print out only notes
17356 \begin_layout LyX-Code
17360 \begin_layout LyX-Code
17368 \begin_layout Standard
17369 One final thing: I created this class to support the LaTeX2e
17370 \begin_inset Quotes eld
17378 \begin_inset Quotes erd
17381 class, one of the built-in LaTeX2e classes.
17382 Neither I nor the rest of the LyX Team endorse or oppose the use of this
17383 built-in slide class.
17384 It's here if you want it or need it.
17385 There exist other LaTeX2e classes for creating presentations, such as the
17391 \begin_inset space ~
17395 \begin_inset CommandInset ref
17397 reference "sec:foiltex"
17402 \begin_inset Quotes eld
17410 \begin_inset Quotes erd
17413 package [present on some TeX distributions].
17414 The latter is not yet supported under LyX.
17418 \begin_layout Plain Layout
17419 Perhaps you can take on the task\SpecialChar \ldots{}
17425 I know nothing about these other classes.
17426 Try them out to see what sort of alternative they provide.
17429 \begin_layout Chapter
17430 LyX Features needing Extra Software
17433 \begin_layout Section
17437 \begin_layout Standard
17443 \begin_layout Subsection
17447 \begin_layout Standard
17456 \begin_layout Plain Layout
17461 is not yet available when you are using the LaTeX distribution MiKTeX.
17466 , you'll find in the
17473 \begin_inset space ~
17484 \begin_inset CommandInset href
17486 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17493 \begin_layout Standard
17498 package is a program that was written by
17499 \begin_inset Flex CharStyle:Noun
17502 \begin_layout Plain Layout
17504 \begin_inset space ~
17512 in frustration because some constructs in LaTeX are sometimes non-intuitive,
17513 and easy to forget.
17514 The program runs over your LaTeX file, checks the integrity of the file,
17515 and flags some common errors.
17516 In other technical words, it is
17523 \begin_layout Standard
17524 Well, what is a syntax checker doing in LyX which is supposed to produce
17525 correct LaTeX anyways? The answer is simple: Just as
17529 not only checks the
17533 of C programs, but also does
17537 checks for type-errors,
17541 catches some common
17545 errors, in addition to the syntactical ones.
17550 is capable of detecting several common errors, such as
17553 \begin_layout Itemize
17554 Ellipsis detection:
17555 \begin_inset Newline newline
17558 Use \SpecialChar \ldots{}
17562 \begin_layout Itemize
17563 No space in front of/after parenthesis:
17564 \begin_inset Newline newline
17570 \begin_layout Itemize
17571 Enforcement of normal space after common abbreviations:
17572 \begin_inset Newline newline
17576 \begin_inset space \thinspace{}
17580 \begin_inset space \space{}
17583 is too wide spacing.
17586 \begin_layout Itemize
17587 Enforcement of end-of-sentence space when the last sentence ends with a
17589 \begin_inset Newline newline
17593 And this is wrong spacing.
17596 \begin_layout Itemize
17597 Space in front of labels and similar commands:
17598 \begin_inset Newline newline
17601 The label should stick right up to the text to avoid falling to a wrong
17604 \begin_inset CommandInset label
17614 \begin_layout Plain Layout
17615 This footnote is in danger of falling off to a wrong page
17620 The label is separated too much.
17623 \begin_layout Itemize
17624 Space in front of references, instead of hard spaces:
17625 \begin_inset Newline newline
17628 In you are in bad luck, the text will break right between the referenced
17629 text and reference number, and that's a pity.
17631 \begin_inset CommandInset ref
17633 reference "sec:chktex"
17640 \begin_layout Itemize
17642 \begin_inset Quotes eld
17646 \begin_inset Quotes erd
17650 \begin_inset Formula $\times$
17654 \begin_inset Newline newline
17657 2x2 looks cheap compared to
17658 \begin_inset Formula $2\times2$
17664 \begin_layout Standard
17665 and more \SpecialChar \ldots{}
17666 It is an invaluable tool when you are
17667 \begin_inset Quotes eld
17671 \begin_inset Quotes erd
17674 your document before printing, and you should run it right after the obligatory
17675 spelling check, and before you go fine tuning the typesetting.
17678 \begin_layout Subsection
17682 \begin_layout Standard
17683 If you have the program installed, usage is as simple as choosing
17685 Tools\SpecialChar \menuseparator
17687 \begin_inset space ~
17693 This will make LyX generate a LaTeX file of your document, start
17697 to check it, and then make LyX insert
17698 \begin_inset Quotes eld
17702 \begin_inset Quotes erd
17705 with the warnings from
17709 , if there were any.
17710 The warnings will be placed close to the point of the mistake, and you
17711 can quickly find them by using the
17713 Navigate\SpecialChar \menuseparator
17716 menu item, or the shortcut key
17725 Open the error boxes by clicking on them with the mouse, or use the shortcut
17734 bindings, or the corresponding
17743 Read the warning and correct the mistake, if it is a mistake.
17744 If you have trouble understanding what the warning is about, you can safely
17746 Remember that there is a hidden layer between the document on screen and
17747 the technical details in invoking
17751 , and this gap can make some warnings seem arcane or just right down plain
17755 \begin_layout Standard
17756 This document is an excellent testing bed for the feature, and it should
17757 provide quite a few warnings for you to fiddle with.
17758 Since computers are only so smart, expect most of the warnings to be false
17762 \begin_layout Subsection
17763 How to fine tune it
17766 \begin_layout Standard
17767 Sometimes, you'll find that
17771 makes more noise than suits your mood.
17772 Then you can choose not to use it, wait until your mood changes, or try
17777 to get better along with you.
17778 Another choice in the most desperate situations is to use
17780 View\SpecialChar \menuseparator
17782 \begin_inset space ~
17786 \begin_inset space ~
17790 \begin_inset space ~
17795 , which will get rid of all warnings instantly.
17798 \begin_layout Standard
17807 very configurable and extensible, you shouldn't expect to solve all problems
17813 Since LyX has to generate a somewhat special LaTeX file to be able to match
17814 the line numbers from the
17822 \begin_layout Plain Layout
17823 You can inspect the specific output from
17829 Edit\SpecialChar \menuseparator
17831 \begin_inset space ~
17835 \begin_inset space ~
17849 to the internal document structure, some of the warnings will not seen
17850 to appear correctly.
17851 There are two things you can do about this:
17854 \begin_layout Itemize
17859 invocation command line in
17875 installation configuration file (usually with the file
17880 See below to learn what warnings can be enabled and disabled on the command
17885 \begin_layout Itemize
17886 Export your document as a raw LaTeX file using
17888 File\SpecialChar \menuseparator
17889 Export\SpecialChar \menuseparator
17897 Invoked in this way, it can be a hassle to find the corresponding place
17898 in the document inside LyX, but with a little patience, you should be able
17902 \begin_layout Standard
17903 Here follows the warning messages that can be enabled and disabled in
17912 to disable a warning, and
17916 to enable a warning.
17917 The emphasized entries are disabled by default, because the default is
17920 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
17925 \begin_layout Standard
17926 Notice that you should only use the options that enable and disable warnings,
17927 because LyX relies on some of the other command line parameters to be set
17928 in a specific way to have a chance to communicate with
17935 \begin_layout Enumerate
17939 Command terminated with space.
17942 \begin_layout Enumerate
17945 Non-breaking space (
17946 \begin_inset Quotes eld
17954 \begin_inset Quotes erd
17957 ) should have been used.
17960 \begin_layout Enumerate
17964 You should enclose the previous parenthesis with
17965 \begin_inset Quotes eld
17973 \begin_inset Quotes erd
17979 \begin_layout Enumerate
17982 Italic correction (
17983 \begin_inset Quotes eld
17993 \begin_inset Quotes erd
17996 ) found in non-italic buffer.
17999 \begin_layout Enumerate
18002 Italic correction (
18003 \begin_inset Quotes eld
18013 \begin_inset Quotes erd
18016 ) found more than once.
18019 \begin_layout Enumerate
18023 No italic correction (
18024 \begin_inset Quotes eld
18034 \begin_inset Quotes erd
18040 \begin_layout Enumerate
18044 \begin_inset Quotes eld
18052 \begin_inset Quotes erd
18056 \begin_inset Quotes eld
18064 \begin_inset Quotes erd
18070 \begin_layout Enumerate
18073 Wrong length of dash may have been used.
18076 \begin_layout Enumerate
18080 \begin_inset Quotes eld
18088 \begin_inset Quotes erd
18092 \begin_inset Quotes eld
18100 \begin_inset Quotes erd
18106 \begin_layout Enumerate
18110 \begin_inset Quotes eld
18118 \begin_inset Quotes erd
18124 \begin_layout Enumerate
18128 \begin_inset Quotes eld
18136 \begin_inset Quotes erd
18139 to achieve an ellipsis.
18142 \begin_layout Enumerate
18145 Inter-word spacing (
18146 \begin_inset Quotes eld
18156 \begin_inset Quotes eld
18159 ) should perhaps be used.
18162 \begin_layout Enumerate
18165 Inter-sentence spacing (
18166 \begin_inset Quotes eld
18176 \begin_inset Quotes erd
18179 ) should perhaps be used.
18182 \begin_layout Enumerate
18185 Could not find argument for command.
18188 \begin_layout Enumerate
18192 \begin_inset Quotes eld
18200 \begin_inset Quotes erd
18206 \begin_layout Enumerate
18209 Math mode still on at end of LaTeX file.
18212 \begin_layout Enumerate
18216 \begin_inset Quotes eld
18224 \begin_inset Quotes erd
18227 doesn't match the number of
18228 \begin_inset Quotes eld
18236 \begin_inset Quotes erd
18242 \begin_layout Enumerate
18245 You should use either
18248 \begin_inset Quotes eld
18256 \begin_inset Quotes erd
18261 as an alternative to
18262 \begin_inset Quotes eld
18270 \begin_inset Quotes erd
18276 \begin_layout Enumerate
18283 " (ASCII 39) instead of "
18290 \begin_layout Enumerate
18293 User-specified pattern found.
18296 \begin_layout Enumerate
18299 This command might not be intended.
18302 \begin_layout Enumerate
18309 \begin_layout Enumerate
18327 \begin_layout Enumerate
18330 Delete this space to maintain correct page references.
18333 \begin_layout Enumerate
18337 You might wish to put this between a pair of
18338 \begin_inset Quotes eld
18346 \begin_inset Quotes erd
18352 \begin_layout Enumerate
18355 You ought to remove spaces in front of punctuation.
18358 \begin_layout Enumerate
18361 Could not execute LaTeX command.
18364 \begin_layout Enumerate
18373 in front of small punctuation.
18376 \begin_layout Enumerate
18384 may look prettier here.
18387 \begin_layout Enumerate
18391 Multiple spaces detected in output.
18394 \begin_layout Enumerate
18397 This text may be ignored.
18400 \begin_layout Enumerate
18406 \begin_inset Quotes eld
18411 to begin quotation, not
18418 \begin_layout Enumerate
18425 to end quotation, not
18428 \begin_inset Quotes eld
18436 \begin_layout Enumerate
18442 \begin_layout Enumerate
18445 You should perhaps use
18446 \begin_inset Quotes eld
18454 \begin_inset Quotes erd
18460 \begin_layout Enumerate
18463 You should put a space in front of/after parenthesis.
18466 \begin_layout Enumerate
18469 You should avoid spaces in front of/after parenthesis.
18472 \begin_layout Enumerate
18476 You should not use punctuation in front of/after quotes.
18479 \begin_layout Enumerate
18482 Double space found.
18485 \begin_layout Enumerate
18488 You should put punctuation outside inner/inside display math mode.
18491 \begin_layout Enumerate
18494 You ought to not use primitive TeX in LaTeX code.
18497 \begin_layout Enumerate
18500 You should remove spaces in front of
18501 \begin_inset Quotes eld
18509 \begin_inset Quotes erd
18515 \begin_layout Enumerate
18518 \begin_inset Quotes eld
18526 \begin_inset Quotes erd
18529 is normally not followed by
18530 \begin_inset Quotes eld
18538 \begin_inset Quotes erd
18544 \begin_layout Standard
18545 In later versions of LyX, we hope to provide a more complete interface to
18546 this tool (and it's smaller cousin
18550 ) to exploit the full power of it.
18551 But it's not exactly useless as it is now: go try it on one of your existing
18552 documents of a certain length and be surprised.
18555 \begin_layout Section
18556 Version Control in LyX
18559 \begin_layout Standard
18562 Lars Gullik Bjønnes
18569 \begin_layout Subsection
18573 \begin_layout Standard
18574 A friend of mine wanted to try LyX for a group project.
18575 When he didn't find support for version control or file locking, he dropped
18577 This angered me a bit, so I thought that I should at least make support
18578 for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
18579 This has now been done.
18580 LyX now supports some of the most basic RCS commands.
18581 If you need to something a bit more sophisticated you will have to do that
18582 manually in a terminal.
18585 \begin_layout Standard
18586 Before you begin to use the version control features in LyX, you should
18588 \begin_inset Quotes eld
18592 \begin_inset Quotes erd
18595 (a man file, read it with
18600 This file describes all the basic features of RCS.
18601 You should especially notice the comment about a RCS directory, and the
18602 notion of a master RCS file (the file ending in
18609 \begin_layout Standard
18610 Later basic CVS/SVN support was added.
18611 You should be familiar with CVS/SVN usage before start using it under LyX.
18612 Most of the log messages are not currently displayed after operations -
18613 you can check them in Messages pane if unsure.
18616 \begin_layout Standard
18617 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18618 package—no guarantees are made for older versions.
18621 \begin_layout Standard
18622 For introducing your own external commands consult vc-command in the manual
18626 \begin_layout Subsection
18627 RCS commands in LyX
18630 \begin_layout Standard
18631 The following sections describe the RCS commands supported by LyX.
18632 You can find them in the
18634 File\SpecialChar \menuseparator
18636 \begin_inset space ~
18642 LyX was tested against RCS 5.7.
18645 \begin_layout Subsubsection
18651 \begin_layout Standard
18652 If your document is not under revision control, this is the only item shown
18654 And if it is under revision control, the
18658 item is not visible.
18662 \begin_layout Standard
18663 This command registers your document with RCS (unless you are under the
18664 directory managed by CVS)\SpecialChar \@.
18665 You are asked interactively to supply an initial
18666 description of the document.
18667 The document is now set in Read-Only mode and you have to
18670 \begin_inset space ~
18674 \begin_inset space ~
18678 \begin_inset space ~
18683 , before making any changes to it.
18684 A document under revision control has a
18685 \begin_inset Quotes eld
18688 [RCS:<version> <locker>]
18689 \begin_inset Quotes erd
18692 item tagged to the filename in the minibuffer.
18695 \begin_layout Standard
18696 RCS command that is run:
18698 ci -q -u -i -t-"<initial description>" <file-name>
18701 \begin_layout Standard
18706 to understand the switches.
18710 \begin_layout Subsubsection
18716 \begin_layout Standard
18717 When you are finished editing a file, you check in your changes.
18718 When you do this, you are asked for a description of the changes.
18719 This is stored in the history log.
18720 The version number is bumped, your changes are applied to the master RCS
18721 file, the document is unlocked and set to Read-Only mode.
18725 \begin_layout Standard
18728 ci -q -u -m"<description>" <file-name>
18731 \begin_layout Subsubsection
18737 \begin_layout Standard
18738 By doing this you lock the document so that only you can edit it.
18739 This will also make the document Read-Write only for you.
18740 You will usually continue editing for a while and when you are finished
18741 you check in your changes.
18742 The status line is changed to reflect that you have locked the file.
18746 \begin_layout Standard
18749 co -q -l <file-name>
18752 \begin_layout Subsubsection
18755 Revert To Repository Version
18758 \begin_layout Standard
18759 This will discard all changes made to the document since the last check
18761 You get a warning before changes are discarded.
18764 \begin_layout Standard
18767 co -f -u<version> <file-name>
18770 \begin_layout Subsubsection
18776 \begin_layout Standard
18777 This makes as if the last check in never happened.
18778 No changes are made to the document loaded into LyX, but the last version
18779 is removed from the master RCS file.
18783 \begin_layout Standard
18786 rcs -o<version> <file-name>
18789 \begin_layout Subsubsection
18795 \begin_layout Standard
18796 This show the complete history of the RCS document.
18801 is shown in a browser.
18809 \begin_layout Subsubsection
18813 \begin_layout Standard
18814 LyX supports RCS version number information (only), see
18815 \begin_inset CommandInset ref
18817 reference "sub:VCS-Revision-Information"
18824 \begin_layout Subsection
18825 CVS commands in LyX
18828 \begin_layout Standard
18829 CVS is now partially supported by LyX.
18830 You can find the commands in the
18832 File\SpecialChar \menuseparator
18834 \begin_inset space ~
18840 Focus of the development moved to SVN support, so please use it instead
18841 of CVS if possible.
18844 \begin_layout Subsubsection
18850 \begin_layout Standard
18851 If your document is not under revision control, this is the only item shown
18853 And if it is under revision control, the
18860 item is not visible.
18864 \begin_layout Standard
18865 This command registers in CVS your document ONLY in case you have already
18866 the documents directory under CVS control (in particular
18871 This means you have to checkout the archive by yourself.
18875 \begin_layout Standard
18876 Then you are asked interactively to supply an initial description of the
18878 Don't forget that registered file is not yet commited.
18881 \begin_layout Standard
18882 CVS command that is run:
18885 \begin_inset Quotes erd
18889 \begin_inset Quotes eld
18893 \begin_inset Quotes erd
18899 \begin_layout Standard
18904 to understand the switches.
18908 \begin_layout Subsubsection
18914 \begin_layout Standard
18915 When you are finished editing a file, you commit your changes.
18916 When you do this, you are asked for a description of the changes.
18917 After that changes are commited.
18920 \begin_layout Standard
18923 cvs -q commit -m"<description>" "<file-name>"
18926 \begin_layout Subsubsection
18929 Revert To Repository Version
18932 \begin_layout Standard
18933 This will discard all changes made to the document since the last check
18935 You get a warning before changes are discarded.
18936 Firstly the file is deleted, secondly CVS update command is run.
18939 \begin_layout Standard
18943 \begin_inset Quotes eld
18947 \begin_inset Quotes erd
18953 \begin_layout Subsubsection
18959 \begin_layout Standard
18960 This show the complete history of the CVS document.
18964 \begin_inset Quotes eld
18968 \begin_inset Quotes erd
18973 is shown in a browser.
18976 \begin_layout Subsection
18977 SVN commands in LyX
18980 \begin_layout Standard
18981 SVN is now partially supported by LyX.
18982 You can find the commands in the
18984 File\SpecialChar \menuseparator
18986 \begin_inset space ~
18992 Please note that if you use password protected access to repository via
18993 ssh, you will be asked in terminal window.
18994 LyX was tested against SVN 1.5 and 1.6
18998 \begin_layout Plain Layout
18999 Most of the commands will work with 1.4 too, see
19000 \begin_inset CommandInset ref
19002 reference "sub:SVN-Repo-Update"
19014 \begin_layout Subsubsection
19020 \begin_layout Standard
19021 If your document is not under revision control, this is the only item shown
19023 And if it is under revision control, the
19030 item is not visible.
19034 \begin_layout Standard
19035 This command registers in SVN your document ONLY in case you have already
19036 the documents directory under SVN control (in particular
19041 This means you have to checkout the archive by yourself.
19045 \begin_layout Standard
19046 Then you are asked interactively to supply an initial description of the
19048 Don't forget that registered file is not yet commited.
19051 \begin_layout Standard
19052 SVN command that is run:
19055 \begin_inset Quotes eld
19059 \begin_inset Quotes erd
19065 \begin_layout Standard
19070 to understand the switches.
19074 \begin_layout Subsubsection
19080 \begin_layout Standard
19081 When you are finished editing a file, you commit your changes.
19082 When you do this, you are asked for a description of the changes.
19083 After that changes are commited.
19086 \begin_layout Standard
19091 \begin_layout Plain Layout
19092 In case locking is not enabled.
19094 \begin_inset CommandInset ref
19096 reference "subsec:SVN-File-Locking"
19107 svn commit -q -m"<description>" <file-name>
19110 \begin_layout Subsubsection
19116 \begin_layout Standard
19117 Updates the changes of this file from the repository.
19118 Be sure you understand SVN merging and conflicts resolving before using
19119 this function, because all conflicts has to be resolved manually by you!
19122 \begin_layout Standard
19127 \begin_layout Plain Layout
19135 svn update --non-interactive
19136 \begin_inset Quotes eld
19140 \begin_inset Quotes erd
19146 \begin_layout Subsubsection
19149 Revert To Repository Version
19152 \begin_layout Standard
19153 This will discard all changes made to the document since the last check
19155 You get a warning before changes are discarded.
19159 \begin_layout Standard
19163 \begin_inset Quotes eld
19167 \begin_inset Quotes erd
19173 \begin_layout Subsubsection
19174 \begin_inset CommandInset label
19176 name "sub:SVN-Repo-Update"
19180 Update of the local directory checkout from repository
19184 \begin_layout Plain Layout
19185 Note that this command will work only with subversion
19186 \begin_inset Formula $\geqq1.5$
19197 \begin_layout Standard
19198 All the commands above have one shortcomming - they deal with the current
19200 Once your document contains pictures, includes external
19201 \begin_inset Flex CharStyle:Code
19204 \begin_layout Plain Layout
19210 files and so on administration becomes more complicated.
19211 LyX now supports updating the whole tree in which resides the document
19215 \begin_layout Plain Layout
19216 One need to organize the files structure so that all external files are
19217 in the same directory or subdirectories of the document.
19224 This become especially useful once you cooperate with people which neither
19225 know about subversion management nor they have ambition to commit additional
19226 material to the repository.
19230 \begin_layout Standard
19231 \begin_inset Flex CharStyle:Code
19234 \begin_layout Plain Layout
19235 Update local directory from repository
19240 command updates the whole directory and in case of merge conflicts local
19241 version of the files are left, so no unintended data loss occurs.
19242 If local changes are detected user is warned before update starts.
19245 \begin_layout Labeling
19246 \labelwidthstring 00.00.0000
19248 \begin_inset space ~
19252 \begin_inset space ~
19256 \begin_inset Newline newline
19260 \begin_inset Flex CharStyle:Code
19263 \begin_layout Plain Layout
19269 (Ask if changes are detected.)
19270 \begin_inset Newline newline
19274 \begin_inset Flex CharStyle:Code
19277 \begin_layout Plain Layout
19278 svn update --accept mine-full $path
19286 \begin_layout Standard
19288 \begin_inset Flex CharStyle:Code
19291 \begin_layout Plain Layout
19297 stands for the path to the document.
19300 \begin_layout Subsubsection
19306 \begin_layout Standard
19307 This show the complete history of the SVN document.
19311 \begin_inset Quotes eld
19315 \begin_inset Quotes erd
19320 is shown in a browser.
19323 \begin_layout Subsubsection
19325 \begin_inset CommandInset label
19327 name "subsec:SVN-File-Locking"
19334 \begin_layout Standard
19335 The file exchange through various revision control systems brings the problem
19336 of merge conflicts in case two different users try to edit the same (parts
19338 When such conflict happens it needs manual resolving and one reasonable
19339 alternative is to provide some kind of locking mechanism, which guarantees
19340 that only one user is allowed to edit file at the given time.
19343 \begin_layout Standard
19344 SVN has two mechanisms to provide such kind of mutual exclusivity for file
19345 access - locks and automatical setting of write permissions (see sec.
19347 \begin_inset CommandInset ref
19349 reference "subsec:Automatical-Locking-Property"
19354 \begin_inset Flex CharStyle:Code
19357 \begin_layout Plain Layout
19367 \begin_layout Plain Layout
19368 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
19374 In a case this property is detected for a given document LyX starts to
19375 use SVN locks for document editing automatically and the whole check-in/out
19376 mechanism switches to the same regimen as for RCS.
19377 This in particular means there are two different modes how file is used
19381 \begin_layout Itemize
19383 The loaded file is in the read-only mode.
19384 For editation on needs to check-out.
19389 consists of update from repository and gaining write lock.
19390 If the lock is not possible to obtain, we remain in unlocked state.
19393 \begin_layout Itemize
19395 The loaded file is in the 'normal' edit mode.
19396 No other user is allowed to edit the file.
19401 consists of commiting changes and releasing write-lock.
19402 If no changes have been made to the document, no commit will be produced
19406 \begin_layout Plain Layout
19407 Don't be puzzled by the fact that you will be asked for commit message anyway.
19412 and only the write-lock will be released.
19415 \begin_layout Standard
19419 \begin_layout Labeling
19420 \labelwidthstring 00.00.0000
19423 svn commit -q -m"<description>" "<file-name>"
19424 \begin_inset Newline newline
19427 svn unlock "<file-name>"
19430 \begin_layout Labeling
19431 \labelwidthstring 00.00.0000
19434 svn update "<file-name>"
19435 \begin_inset Newline newline
19438 svn lock "<file-name>"
19441 \begin_layout Subsubsection
19444 \begin_inset CommandInset label
19446 name "subsec:Automatical-Locking-Property"
19452 Automatical Locking Property
19455 \begin_layout Standard
19456 The above mentioned automatical setting of write permissions of the .lyx
19457 file can be set through
19462 ile\SpecialChar \menuseparator
19468 \begin_inset space ~
19471 Control\SpecialChar \menuseparator
19476 oggle locking property
19479 This command is active only when the file is not locked on the svn server
19481 you need to check-out before proceeding).
19484 \begin_layout Labeling
19485 \labelwidthstring 00.00.0000
19487 \begin_inset space ~
19493 \begin_layout Labeling
19494 \labelwidthstring 00.00.0000
19497 svn propset svn:needs-lock ON "<file-name>"
19500 \begin_layout Labeling
19501 \labelwidthstring 00.00.0000
19504 svn propdel svn:needs-lock "<file-name>"
19507 \begin_layout Subsubsection
19508 \begin_inset CommandInset label
19510 name "sub:VCS-Revision-Information"
19514 Revision Information in Documents
19517 \begin_layout Standard
19518 There are more possibilities how to activate revision information in our
19522 \begin_layout Itemize
19523 LyX supports directly:
19527 \begin_layout Itemize
19528 tree revision information (
19529 \begin_inset Flex CharStyle:Code
19532 \begin_layout Plain Layout
19539 The result is the output of the
19540 \begin_inset Flex CharStyle:Code
19543 \begin_layout Plain Layout
19549 command, the following table gives you an idea, how to read the results.
19552 \begin_layout Standard
19554 \begin_inset Tabular
19555 <lyxtabular version="3" rows="6" columns="2">
19556 <features tabularvalignment="middle">
19557 <column alignment="center" valignment="top" width="0">
19558 <column alignment="center" valignment="top" width="0">
19560 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
19563 \begin_layout Plain Layout
19569 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
19572 \begin_layout Plain Layout
19580 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19583 \begin_layout Plain Layout
19589 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19592 \begin_layout Plain Layout
19593 mixed revision working copy
19600 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19603 \begin_layout Plain Layout
19609 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19612 \begin_layout Plain Layout
19613 modified working copy
19620 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19623 \begin_layout Plain Layout
19629 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19632 \begin_layout Plain Layout
19633 switched working copy
19640 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19643 \begin_layout Plain Layout
19649 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19652 \begin_layout Plain Layout
19653 partial working copy, from a sparse checkout
19660 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
19663 \begin_layout Plain Layout
19669 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
19672 \begin_layout Plain Layout
19673 mixed revision, modified, switched working copy
19686 \begin_layout Itemize
19687 file revision information.
19688 The result comes from parsing the output of
19689 \begin_inset Flex CharStyle:Code
19692 \begin_layout Plain Layout
19694 \begin_inset space ~
19698 \begin_inset space ~
19702 \begin_inset space ~
19711 Supported flags are:
19715 \begin_layout Itemize
19716 version number of the last commit (
19717 \begin_inset Flex CharStyle:Code
19720 \begin_layout Plain Layout
19729 \begin_layout Itemize
19730 author of the last commit (
19731 \begin_inset Flex CharStyle:Code
19734 \begin_layout Plain Layout
19743 \begin_layout Itemize
19744 date of the last commit (
19745 \begin_inset Flex CharStyle:Code
19748 \begin_layout Plain Layout
19757 \begin_layout Itemize
19758 time of the last commit (
19759 \begin_inset Flex CharStyle:Code
19762 \begin_layout Plain Layout
19772 \begin_layout Standard
19773 You can obtain this info via InsetInfo (e.g.
19775 \begin_inset Flex CharStyle:Code
19778 \begin_layout Plain Layout
19779 info-insert buffer vcs-date
19785 The information will be available only when you have the file stored under
19786 svn managment (i.e.
19788 \begin_inset Flex CharStyle:Code
19791 \begin_layout Plain Layout
19797 directory is available with your document).
19801 \begin_layout Itemize
19802 Another---a hacking one---possibility is to use svn keywords
19806 \begin_layout Plain Layout
19807 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
19813 In short -- you set file keywords property (e.g.
19816 svn propset svn:keywords 'Rev' file.lyx
19818 ) and then paste keyword ERT
19822 \begin_layout Plain Layout
19823 This is an easy way how to ensure that LyX won't break the line in the middle
19829 tag in your document (e.g.
19834 \begin_layout Plain Layout
19842 This way svn client will automatically substitute revision number (e.g.
19847 \begin_layout Plain Layout
19854 ) after each update and commit.
19855 There are more problems with this approach.
19856 Firstly, the '$' character is used in TeX world for math equations, so
19857 any occurence of math formula
19858 \begin_inset Formula $Rev$
19862 \begin_inset Formula $Rev:59$
19865 in your LyX document.
19866 Similarly for other keywords like Id, Date, Author, etc.
19867 Secondly svn output is dependent on your locales, so its very easy that
19868 svn would produce some problematic strings once Date is used.
19869 Thirdly you get the whole 'Rev: 59' string in your document instead of
19871 Until subversion implements user's custom keywords it will be hard to use
19872 this approach reliably or let LyX to support it directly.
19875 \begin_layout Subsection
19876 SVN and Windows Environment
19879 \begin_layout Quote
19880 My inclination is to say that if the user cannot figure out the command
19881 line operations on their own fairly quickly, they would be well advised
19882 to use TortoiseSVN.
19888 \begin_layout Subsubsection
19892 \begin_layout Standard
19893 In addition to installing LyX, and having access to a Subversion repository,
19894 the user will need to install the Subversion client program.
19895 A Windows installer for the client program is available from
19896 \begin_inset CommandInset href
19899 target "http://www.collab.net/nonav/downloads/subversion/"
19904 The user may also want to install
19905 \begin_inset CommandInset href
19908 target "http://tortoisesvn.tigris.org/"
19912 , which integrates Subversion operations into the context (rightclick) menu
19913 of Windows Explorer.
19914 Operations done outside LyX will typically be more convenient using the
19915 Explorer context menu.
19916 Note that TortoiseSVN is not a replacement for the client program, which
19917 is what LyX itself will use.
19920 \begin_layout Subsubsection
19921 Bringing a document under Subversion control
19924 \begin_layout Standard
19925 Before a LyX document can be brought under version control in Subversion,
19926 its parent directory needs to be under version control.
19927 If the document is being added to a project already in the repository,
19928 this is accomplished by checking the project out to the directory where
19929 the new document will be placed.
19930 If the project itself is not yet under version control (for instance, if
19931 this document starts a new project), the directory must be imported into
19933 This is done outside LyX.
19934 Both import and checkout are easily accomplished from the Explorer context
19935 menu using TortoiseSVN, or alternatively can be done using the command
19936 line client at a DOS prompt.
19937 The procedure for importing the project using TortoiseSVN is described
19938 below, assuming an existing repository and a new project being started
19946 For information on using the Subversion client program, run
19953 \begin_layout Enumerate
19960 in Windows Explorer, right click it, and select
19962 TortoiseSVN > Repo-browser
19965 If necessary, adjust the URL for the repository, then click OK.
19968 \begin_layout Enumerate
19969 Right click the level of the repository under which you want to place the
19970 new project folder (typically the top level) and click
19972 Create folder\SpecialChar \ldots{}
19975 Supply a name for the project folder and click OK.
19976 Add a message for the log file if desired, then click OK again.
19977 The new project folder should appear in the repository.
19978 Finally, click OK again to exit the repository browser.
19981 \begin_layout Enumerate
19982 Once again right click
19988 , this time selecting SVN Checkout\SpecialChar \ldots{}
19989 Select the URL of the project folder
19990 you just created in the repository, and set the checkout directory to
19998 You will be warned about a non-empty folder; click OK to proceed.
19999 You should now have a
20010 \begin_layout Enumerate
20011 Create or open your document in LyX and click
20016 ile\SpecialChar \menuseparator
20022 \begin_inset space ~
20025 Control\SpecialChar \menuseparator
20033 Add a log message and click OK to commit the document to version control.
20036 \begin_layout Standard
20037 From this point onward, you should have full functionality in the
20042 ile\SpecialChar \menuseparator
20048 \begin_inset space ~
20054 You also have the option of checking the document in and out, viewing its
20056 using the TortoiseSVN context menu in Windows Explorer or the Subversion
20057 client program from a command prompt.
20060 \begin_layout Subsubsection
20061 SSH tunel used with SVN under Windows
20064 \begin_layout Standard
20065 Compared to linux setting svn client to communicate over ssh under Windows
20066 is rather troublesome task.
20067 We will at least make some hints how to setup client side but former knowledge
20068 about ssh and Windows command line is needed, also be prepared for a great
20069 deal of frustration...
20072 \begin_layout Enumerate
20073 Get svn client for windows, as described in previous sections.
20074 When it is fresh install run some svn command (e.g.
20076 \begin_inset Flex CharStyle:Code
20079 \begin_layout Plain Layout
20085 ) to have created config files, which you will need to change later on.
20088 \begin_layout Enumerate
20089 Choose ssh client for Windows.
20090 There are more possibilities, we will use the one from Putty tools
20094 \begin_layout Plain Layout
20095 \begin_inset Flex URL
20098 \begin_layout Plain Layout
20100 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20111 You will need to automatize connection, so client doesn't ask for any password
20113 To keep things easy we will use only keys without any additional password
20118 \begin_layout Enumerate
20120 \begin_inset Flex CharStyle:Code
20123 \begin_layout Plain Layout
20130 Save your private .ppk key file and put the public one on the server side.
20131 In case the SVN server runs on linux, note that the format of the public
20132 key is not compatible with linux openssh and you will need to direcly copy-past
20133 e the key from the “
20135 Public key for pasting into OpenSSH authorized_keys file
20137 :” edit field into the server's
20138 \begin_inset Flex CharStyle:Code
20141 \begin_layout Plain Layout
20142 ~/.ssh/authorized_keys
20148 \begin_inset Flex CharStyle:Code
20151 \begin_layout Plain Layout
20160 \begin_layout Enumerate
20162 \begin_inset Flex CharStyle:Code
20165 \begin_layout Plain Layout
20172 In the SVN config file
20176 \begin_layout Plain Layout
20177 Exact path depends on Windows version, usually somewhere around
20178 \begin_inset Flex CharStyle:Code
20181 \begin_layout Plain Layout
20184 Documents and Settings
20198 \begin_inset Flex CharStyle:Code
20201 \begin_layout Plain Layout
20216 , section [tunnels], setup ssh command, e.g.
20218 \begin_inset Flex CharStyle:Code
20221 \begin_layout Plain Layout
20222 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20231 \begin_layout Plain Layout
20232 It will usually take a lot of time to get exact command right and it depends
20234 For example do not have some remote server saved as a default session in
20236 If things fail, try to connect via plink without SVN first.
20245 \begin_layout Enumerate
20246 Checkout the SVN archive, e.g.
20248 \begin_inset Flex CharStyle:Code
20251 \begin_layout Plain Layout
20252 svn co svn+ssh://user@server/repository_path
20260 \begin_layout Subsection
20264 \begin_layout Standard
20265 With the recent addition of the vc-command function LyX power users are
20266 allowed to create their own commands for revision control.
20269 \begin_layout Standard
20270 As an example you can see how two TortoiseSVN commands could be integrated
20274 \begin_layout Description
20276 \begin_inset Flex CharStyle:Code
20279 \begin_layout Plain Layout
20280 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
20288 \begin_layout Description
20290 \begin_inset Flex CharStyle:Code
20293 \begin_layout Plain Layout
20294 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
20302 \begin_layout Section
20303 Literate Programming
20306 \begin_layout Standard
20311 (kayvan@sylvan.com)
20315 original documentation written by
20317 Edmar Wienskoski Jr.
20320 (edmar-w-jr@technologist.com)
20323 \begin_layout Subsection
20327 \begin_layout Standard
20328 The main purpose of this documentation is to show you how to use LyX for
20329 literate programming.
20330 Where it is assumed that you are familiar with this programming technique,
20332 \begin_inset Quotes eld
20336 \begin_inset Quotes erd
20340 \begin_inset Quotes eld
20344 \begin_inset Quotes erd
20348 If that is not the case, please follow the web links provided in the following
20350 There is a lot of good documentation out there covering old development
20351 history to the latest tools tips.
20354 \begin_layout Standard
20355 It is also assumed that you are familiar with LyX itself to a point that
20356 you are comfortable changing your LyX preferences, and X resources file.
20357 If that is not the case please refer to other LyX documentation to cover
20358 your specific needs.
20361 \begin_layout Subsection
20362 Literate Programming
20365 \begin_layout Standard
20366 From the Literate Programming FAQ:
20369 \begin_layout Quotation
20370 Literate programming is the combination of documentation and source together
20371 in a fashion suited for reading by human beings.
20372 In fact, literate programs should be enjoyable reading, even inviting!
20373 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
20374 and documentation in a single file.
20375 Literate programming tools then parse the file to produce either readable
20376 documentation or compilable source.
20377 The WEB style of literate programming was created by D.
20378 \begin_inset space \thinspace{}
20382 Knuth during the development of his TeX typesetting software.
20386 \begin_layout Standard
20387 Another excerpt says:
20390 \begin_layout Quotation
20393 How is literate programming different from verbose commenting?
20396 \begin_layout Quotation
20397 There are three distinguishing characteristics.
20398 In order of importance, they are:
20402 \begin_layout Itemize
20403 flexible order of elaboration
20406 \begin_layout Itemize
20407 automatic support for browsing
20410 \begin_layout Itemize
20411 typeset documentation, especially diagrams and mathematics
20415 \begin_layout Standard
20416 Now that I sparked your curiosity, take a look in the references.
20419 \begin_layout Subsubsection
20423 \begin_layout Standard
20424 The complete Literate Programming FAQ can be found at:
20427 \begin_layout Quote
20428 Literate Programming FAQ
20429 \begin_inset Flex URL
20432 \begin_layout Plain Layout
20434 http://shelob.ce.ttu.edu/daves/lpfaq/faq.html
20442 \begin_layout Standard
20443 The FAQ lists 23 (twenty three!) different literate programming tools.
20444 Where some are specialized or
20445 \begin_inset Quotes eld
20449 \begin_inset Quotes erd
20452 for particular programming languages, while other have general scope.
20457 for my own use for several reasons:
20460 \begin_layout Itemize
20461 It can generate the documentation either in LaTeX or HTML.
20464 \begin_layout Itemize
20465 It has a open architecture, i.
20466 \begin_inset space \thinspace{}
20470 \begin_inset space \space{}
20473 it is easy to plug in new filters and to perform special processing that
20478 \begin_layout Itemize
20479 There is a good selection of filters available already (the HTML is one
20483 \begin_layout Itemize
20487 \begin_layout Standard
20488 The Noweb web page can be found at:
20491 \begin_layout Quote
20493 \begin_inset Flex URL
20496 \begin_layout Plain Layout
20498 http://www.cs.virginia.edu/~nr/noweb/
20506 \begin_layout Standard
20507 Starting from there you can reach many other interesting links and even
20508 some literate program examples.
20511 \begin_layout Subsection
20512 LyX and Literate Programming
20515 \begin_layout Standard
20516 The LyX support for Literate Programming is provided by using the generic
20517 LyX converters mechanism.
20518 This support is provided in a
20519 \begin_inset Quotes eld
20523 \begin_inset Quotes erd
20527 \begin_inset space \thinspace{}
20531 \begin_inset space \space{}
20534 you will be able to use this new LyX feature with some other literate programmin
20535 g tool of your choice by just changing your LyX preferences.
20538 \begin_layout Subsubsection
20539 Generating documents and code (weaving and tangling)
20542 \begin_layout Paragraph
20543 Selecting the document class
20546 \begin_layout Standard
20547 If you have installed Noweb and LyX successfully, whenever you open a new
20548 document or try to change the document class of an existing one, you will
20549 find that there are three new document classes available:
20552 \begin_layout Itemize
20556 \begin_layout Itemize
20560 \begin_layout Itemize
20564 \begin_layout Standard
20565 You must select one of them to create your literate documents from.
20569 \begin_layout Standard
20570 Note that literate documents are not limited to these three classes.
20571 New classes can be generated from other styles like letter or in combination
20572 with other class variations like Article (AMS).
20573 If you have special needs that cannot be covered by one of the existing
20574 classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
20575 will arrange to insert a new entry, or teach you how to do it.
20579 \begin_layout Plain Layout
20580 It is very simple, it involves the creation of a file with four lines, and
20581 re-running of the auto configuration.
20586 Moreover, if you use a literate tool other than Noweb you may need to create
20587 a new set of document classes for it.
20590 \begin_layout Paragraph
20594 \begin_layout Standard
20595 LyX enables you to write code with a layout named
20603 \begin_layout Plain Layout
20604 The equivalent Noweb term is
20605 \begin_inset Quotes eld
20609 \begin_inset Quotes erd
20613 For historical reasons, I got used to the term
20614 \begin_inset Quotes eld
20618 \begin_inset Quotes erd
20621 introduced by other literate tool named Nuweb, which I used for many years
20622 before rendering myself to Noweb.
20627 Noweb delimits scraps like this:
20630 \begin_layout LyX-Code
20634 \begin_layout LyX-Code
20638 \begin_layout LyX-Code
20642 \begin_layout LyX-Code
20646 \begin_layout LyX-Code
20650 \begin_layout Standard
20651 The problem is that whatever is written in between the << and the
20655 must be taken literally, i.
20656 \begin_inset space \thinspace{}
20660 \begin_inset space \space{}
20663 LyX should be prevented from making any special interpretation of what has
20665 This is handled by a special layout named Scrap, that works like a normal
20666 paragraph but has a free spacing capability.
20669 \begin_layout Standard
20670 The down side of the Scrap paragraph layout is that consecutive paragraphs
20671 of code will be spaced with one empty line in the source code and also
20672 in the printed documentation.
20673 The work around is to enter each line of code within a single Scrap, with
20674 a newline (ctrl-return).
20675 The example above will look like this:
20679 \begin_layout Plain Layout
20680 If you have a printed version of this document you will not see any difference
20681 between the previous example and this one.
20689 \begin_layout LyX-Code
20691 \begin_inset Newline newline
20695 \begin_inset Newline newline
20699 \begin_inset Newline newline
20703 \begin_inset Newline newline
20709 \begin_layout Standard
20710 This layout works fine.
20711 The only real inconvenience is that you have to type ctrl-return instead
20716 \begin_layout Plain Layout
20717 It is in my list of
20718 \begin_inset Quotes eld
20722 \begin_inset Quotes erd
20733 \begin_layout Standard
20734 As a special note, you can also use the
20735 \begin_inset Quotes eld
20739 \begin_inset Quotes erd
20742 construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
20746 \begin_layout LyX-Code
20748 \begin_inset Newline newline
20751 def some_function(args):
20752 \begin_inset Newline newline
20755 "This is the doc string for this function."
20756 \begin_inset Newline newline
20759 print "My args: ", args
20762 \begin_layout LyX-Code
20763 @ %def some_function
20766 \begin_layout Standard
20767 For an example of this usage and the resulting cross-reference output, look
20768 at the Literate python program in
20770 LIBDIR/examples/listerrors.lyx
20772 which should make this all clear.
20775 \begin_layout Paragraph
20776 Generating the documentation
20779 \begin_layout Standard
20780 At this point you already have a new document file with a proper document
20781 class, and with some code and text on it.
20782 How do I print it? The answer is simple, you select
20784 View\SpecialChar \menuseparator
20788 Just like you would do for a plain document.
20789 No special procedure is required.
20792 \begin_layout Standard
20793 To help orientate you, I will now explain what happens inside LyX:
20796 \begin_layout Enumerate
20799 Update\SpecialChar \menuseparator
20802 menu option is chosen, a LaTeX file is generated.
20807 \begin_layout Standard
20808 If the document is of any literate class the generated file will be named
20809 with an extension name defined by the
20810 \begin_inset Quotes eld
20814 \begin_inset Quotes erd
20817 format (defined in the Preferences panel), otherwise the file will have
20826 \begin_layout Enumerate
20827 Note that the only difference so far is in the name of the file, no special
20828 processing is required by LyX.
20829 Given that you formatted the code using the Scrap layout that, by itself,
20830 takes care of the business.
20833 \begin_layout Enumerate
20834 If the document is of any literate class LyX will then use the internal
20835 LyX to Noweb converter, followed by the Noweb to LaTeX converter
20839 \begin_layout Plain Layout
20840 The converters are defined in the
20842 Tools\SpecialChar \menuseparator
20846 \begin_inset Quotes eld
20850 \begin_inset Quotes erd
20862 manual for general information about converters.
20867 to generate the LaTeX file.
20871 \begin_layout Standard
20872 Otherwise it will just skip this step.
20876 \begin_layout Enumerate
20877 Finally, LaTeX is invoked and the regular post processing continues as in
20881 \begin_layout Standard
20882 Independence from a particular
20883 \begin_inset Quotes eld
20887 \begin_inset Quotes erd
20890 is easily achieved by changing the commands that are run by the various
20894 \begin_layout Paragraph
20895 Generating the code
20898 \begin_layout Standard
20899 When the build menu option is chosen or the corresponding button in the
20900 toolbar is pressed, a LaTeX file is generated just like step 1 above.
20901 Next, LyX invokes the
20906 This converter needs to be defined by the user and is not installed by
20907 default, though the Program format is.
20908 This converter (like any other converter) will have two parts:
20911 \begin_layout Enumerate
20912 The converter program itself.
20913 This program performs the conversion from the one format to the other (in
20914 this case, from the Noweb format to the Program pseudo-format).
20917 \begin_layout Enumerate
20918 The error log parser.
20919 This is a program whose sole purpose is to rewrite error messages in a
20920 format that LyX understands.
20921 This makes it possible for LyX to place error boxes in the right places
20922 in the file buffer.
20925 \begin_layout Standard
20926 The first part, the
20927 \begin_inset Quotes eld
20931 \begin_inset Quotes erd
20934 setting, should be set to
20935 \begin_inset Quotes eld
20943 \begin_inset Quotes erd
20947 This basically means that LyX will call
20948 \begin_inset Quotes eld
20952 \begin_inset Quotes erd
20955 (a program or script) with the name of the Noweb file (normally a file
20956 in the LyX temp directory).
20960 \begin_layout Standard
20961 This is an implementation of
20962 \begin_inset Quotes eld
20966 \begin_inset Quotes erd
20969 that you can place in a directory on your path:
20972 \begin_layout LyX-Code
20976 \begin_layout LyX-Code
20980 \begin_layout LyX-Code
20981 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
20984 \begin_layout Standard
20985 The next part of the converter setting is the
20986 \begin_inset Quotes eld
20990 \begin_inset Quotes erd
20993 which is to be set to
20994 \begin_inset Quotes eld
20999 parselog=listerrors
21002 \begin_inset Quotes erd
21006 This will run any errors that are generated by the
21007 \begin_inset Quotes eld
21011 \begin_inset Quotes erd
21014 process through the
21015 \begin_inset Quotes eld
21019 \begin_inset Quotes erd
21025 \begin_layout Standard
21026 The converter code looks in
21034 then on the path for the
21035 \begin_inset Quotes eld
21039 \begin_inset Quotes erd
21045 \begin_layout Standard
21046 The build will normally take place in LyX's temporary directory, so the
21047 files produced by the conversion will be in that directory.
21048 LyX will copy out what it regards as the `main' file, but the
21052 conversion may produce several files, and so most of these would then be
21053 deleted when LyX was closed.
21054 The present solution is to use a `copier',
21058 \begin_layout Plain Layout
21067 manual for information on these.
21076 script in its default mode, so that the entire contents of the temporary
21077 directory is copied.
21078 More will get copied than is needed, to be sure, but nothing will be lost.
21079 If, however, you know what extensions the generated files will have, this
21080 can be improved by using the
21089 This option takes a comma-separated list of extensions to copy.
21090 So, for example, if the conversion will generate only files with the extensions
21099 , then the correct definition would be:
21102 \begin_layout LyX-Code
21103 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
21106 \begin_layout Standard
21107 The result will be that only files with these two extensions will be copied
21111 \begin_layout Paragraph
21112 Build instructions in the document
21115 \begin_layout Standard
21116 The last piece of the integration between LyX and noweb is the
21117 \begin_inset Quotes eld
21121 \begin_inset Quotes erd
21125 Generally, the instructions for building your program should be embedded
21126 in a scrap of its own.
21128 \begin_inset Quotes eld
21132 \begin_inset Quotes erd
21135 above uses the notangle command to look for this scrap (called
21136 \begin_inset Quotes eld
21140 \begin_inset Quotes erd
21143 ) and runs its contents through
21144 \begin_inset Quotes eld
21148 \begin_inset Quotes erd
21154 \begin_layout Standard
21155 Typically, such a scrap would look something like this:
21158 \begin_layout LyX-Code
21160 \begin_inset Newline newline
21164 \begin_inset Newline newline
21168 \begin_inset Newline newline
21171 if [ -z "${NOWEB_SOURCE}" ]
21172 \begin_inset Newline newline
21176 \begin_inset Newline newline
21179 NOWEB_SOURCE=myfile.nw
21180 \begin_inset Newline newline
21184 \begin_inset Newline newline
21188 code to extract files ...]
21189 \begin_inset Newline newline
21193 code to compile files ...]
21194 \begin_inset Newline newline
21200 \begin_layout Standard
21203 LIBDIR/examples/listerrors.lyx
21207 LIBDIR/examples/Literate.lyx
21209 which implement two versions of the
21210 \begin_inset Quotes eld
21214 \begin_inset Quotes erd
21217 program for some illustrations of how all of these pieces go together or
21220 LIBDIR/examples/noweb2lyx.lyx.
21223 Interestingly, these three files show off the language-indepence of the
21224 LyX literate programming support since they are written in Python, C and
21228 \begin_layout Subsubsection
21232 \begin_layout Standard
21233 All the Literate Programming support is configured by the
21235 Tools\SpecialChar \menuseparator
21239 \begin_inset Quotes eld
21243 \begin_inset Quotes erd
21247 The important parts are:
21250 \begin_layout Description
21252 \begin_inset space ~
21256 \begin_inset Quotes eld
21260 \begin_inset Quotes erd
21264 \begin_inset space ~
21267 format Set up via the Formats tab, this is where the Noweb-specific pieces
21277 , the file extension is set to
21282 This tells LyX to create a file with a
21286 extension in the first step of the conversion process.
21289 \begin_layout Description
21291 \begin_inset space ~
21299 \begin_inset space ~
21302 format This is an empty format whose sole purpose is to be the endpoint
21303 of a conversion (which then allows us to set up a converter for it).
21306 \begin_layout Description
21315 This converter performs the
21316 \begin_inset Quotes eld
21320 \begin_inset Quotes erd
21323 of the literate document.
21324 For Noweb, it is set to
21325 \begin_inset Quotes eld
21330 noweave -delay -index $$i > $$o
21333 \begin_inset Quotes erd
21339 \begin_layout Description
21349 \begin_inset Quotes eld
21353 \begin_inset Quotes erd
21357 As stated above, the Converter is set to
21358 \begin_inset Quotes eld
21366 \begin_inset Quotes erd
21369 , with Flags set to
21370 \begin_inset Quotes eld
21375 originaldir,parselog=listerrors
21378 \begin_inset Quotes erd
21384 \begin_layout Subsubsection
21388 \begin_layout Standard
21389 There is also a new function implemented in the LyX server, the
21390 \begin_inset Quotes eld
21393 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
21397 \begin_layout Standard
21398 When debugging code with ddd/gdb, it is possible to invoke a text editor
21399 at the current execution position with a single key stroke.
21400 The default ddd configuration for that is shift-ctrl-V.
21401 It happens that you can define the editor command line invocation in ddd
21404 Edit\SpecialChar \menuseparator
21405 Preferences\SpecialChar \menuseparator
21408 dialog and changing the "Edit Sources" entry.
21411 \begin_layout Standard
21412 I take advantage of the new created LyX server function and this ddd feature,
21414 \begin_inset Quotes eld
21418 \begin_inset Quotes erd
21424 \begin_layout LyX-Code
21425 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
21428 \begin_layout Standard
21429 With this, whenever you are using ddd and find a point in the program that
21430 you want to edit, you just press shift-ctrl-V (in the ddd window), and
21431 ddd you forward this information to LyX through the LyX server and then
21432 the LyX window will show the same file with the cursor at the same position
21433 ddd was pointing to.
21434 No more guessing or long scrolling to locate a point in the program back
21438 \begin_layout Standard
21439 Note however that you must enable the LyX server to get this feature working
21440 (it is disabled by default).
21441 You can enable it in
21453 ) by entering in the
21458 \begin_inset Quotes eld
21463 /home/<your-home-directory>/.lyx/lyxpipe
21466 \begin_inset Quotes erd
21472 \begin_layout Standard
21473 Read the LyX server documentation in the
21475 Customization Manual
21477 for further information.
21480 \begin_layout Subsubsection
21484 \begin_layout Standard
21485 There are six new buttons that can be added to your LyX toolbar.
21486 Five of these buttons are short cuts to layout styles:
21507 The last one is a short cut to the
21508 \begin_inset Quotes eld
21512 \begin_inset Quotes erd
21519 \begin_layout Standard
21520 LyX has a range of buttons that are available for tool bar customization.
21521 In my toolbar I like to combine the six short cuts above with two more:
21526 \SpecialChar \menuseparator
21531 \SpecialChar \menuseparator
21538 View\SpecialChar \menuseparator
21542 Here is how it looks like:
21545 \begin_layout LyX-Code
21549 \begin_layout LyX-Code
21553 \begin_layout LyX-Code
21554 Icon "layout Standard"
21557 \begin_layout LyX-Code
21558 Icon "layout Section"
21561 \begin_layout LyX-Code
21562 Icon "layout LaTeX"
21565 \begin_layout LyX-Code
21566 Icon "layout LyX-Code"
21569 \begin_layout LyX-Code
21570 Icon "layout Scrap"
21573 \begin_layout LyX-Code
21577 \begin_layout LyX-Code
21581 \begin_layout LyX-Code
21582 Icon "buffer-typeset"
21585 \begin_layout LyX-Code
21586 Icon "build-program"
21589 \begin_layout LyX-Code
21593 \begin_layout LyX-Code
21597 \begin_layout LyX-Code
21601 \begin_layout LyX-Code
21605 \begin_layout LyX-Code
21609 \begin_layout Subsubsection
21610 Colors customization
21613 \begin_layout Standard
21614 There are a number of colors in LyX that can be customized in
21619 One of the things that bothers people is the LaTeX font color.
21620 The default color is red, since the scraps uses LaTeX font, and there is
21621 a lot of scraps in literate documents, you may get tired of seeing everything
21623 You can change it by going to the tabs
21632 \begin_layout Standard
21633 The next thing is the visible presence of the newline character in the screen.
21634 You can choose the color of this particular character and make it blend
21636 I recommend you choosing a color that is close to the background but not
21637 equal, that way you still can see it is there, but it is not bothering
21642 \begin_layout Chapter
21643 Secrets of the LaTeX Masters
21644 \begin_inset CommandInset label
21653 \begin_layout Standard
21654 Though LyX is a powerful tool, it cannot hope to support everything that
21655 can be done with pure TeX/LaTeX.
21656 However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
21657 as long as you are not afraid to use that
21658 \begin_inset Quotes eld
21662 \begin_inset Quotes erd
21665 button on the toolbar or add things to the LaTeX preamble.
21666 This section lists some tips, tricks, and otherwise cool ideas to give
21667 your document that extra little flair.
21670 Do try this at home
21672 , just start with something a little smaller and less important than your
21676 \begin_layout Standard
21677 Most ideas in this section require less common files in your LaTeX installation.
21678 If you have a system like teTeX, most will already be available.
21679 A few, however, will need to be downloaded from one of the CTAN archives.
21680 Often, there are several ways to do something, or several LaTeX style files
21681 which do the same thing.
21682 We do not endorse one choice over another, we simply claim that we have
21683 done a particular task with a particular file.
21684 Put on your wizard hat, keep an eye out for dragons, and let us begin.
21687 \begin_layout Section
21691 \begin_layout Standard
21694 Lars Gullik Bjønnes
21697 \begin_layout Subsection
21701 \begin_layout Standard
21702 The aim for this chapter
21706 \begin_layout Plain Layout
21707 Editor's note: Lars' original chapter was a masterful description of how
21713 However, it was too long to flow smoothly in this document.
21714 I have therefore chosen to excerpt the most important sections here (sorry,
21715 Lars); you can read the original chapter (and more of the story!) in the
21718 examples/multicol.lyx
21726 is to show how the LaTeX package
21730 can be used in a LyX document.
21731 As LyX doesn't support the
21735 package natively yet, we have to use some small hacks.
21736 By reading this section it should be obvious how to do this.
21739 \begin_layout Subsection
21743 \begin_layout Standard
21748 package allows switching between one and multicolumn format on the same
21750 Footnotes are handled correctly (for the most part), but will be placed
21751 at the bottom of the page and not under each column.
21752 LaTeX's float mechanism, however, is partly disabled in the current implementat
21754 At the moment only page-wide floats can be used within the scope of the
21758 \begin_layout Subsection
21762 \begin_layout Subsubsection
21766 \begin_layout Standard
21767 If you want to have two columns in your text, you have use LaTeX mode to
21772 begin{multicols}{2}
21774 at the point where you want the two column layout to start, and then
21780 where you want it to end.
21784 \begin_layout Standard
21788 \begin_layout Plain Layout
21792 begin{multicols}{2}
21800 \begin_layout Standard
21805 The Adventure of the Empty House
21808 \begin_inset Newline newline
21813 Sir Arthur Conan Doyle
21816 \begin_layout Standard
21819 It was in the spring of the year 1894 that all London was interested, and
21820 the fashionable world dismayed, by the murder of the Honourable Ronald
21821 Adair under most unusual and inexplicable circumstances.
21822 The public has already learned those particulars of the crime which came
21823 out in the police investigation, but a good deal was suppressed upon that
21824 occasion, since the case for the prosecution was so overwhelmingly strong
21825 that it was not necessary to bring forward all the facts.
21826 Only now, at the end of nearly ten years, am I allowed to supply those
21827 missing links which make up the whole of that remarkable chain.
21828 The crime was of interest in itself, but that interest was as nothing to
21829 me compared to the inconceivable sequel, which afforded me the greatest
21830 shock and surprise of any event in my adventurous life.
21831 Even now, after this long interval, I find myself thrilling as I think
21832 of it, and feeling once more that sudden flood of joy, amazement, and increduli
21833 ty which utterly submerged my mind.
21834 Let me say to that public, which has shown some interest in those glimpses
21835 which I have occasionally given them of the thoughts and actions of a very
21836 remarkable man, that they are not to blame me if I have not shared my knowledge
21837 with them, for I should have considered it my first duty to do so, had
21838 I not been barred by a positive prohibition from his own lips, which was
21839 only withdrawn upon the third of last month.
21842 \begin_layout Standard
21846 \begin_layout Plain Layout
21858 \begin_layout Subsubsection
21862 \begin_layout Standard
21863 The same pattern is used when you want more than two columns:
21866 \begin_layout Standard
21870 \begin_layout Plain Layout
21874 begin{multicols}{3}
21882 \begin_layout Standard
21885 It can be imagined that my close intimacy with Sherlock Holmes had interested
21886 me deeply in crime, and that after his disappearance I never failed to
21887 read with care the various problems which came before the public.
21888 And I even attempted, more than once, for my own private satisfaction,
21889 to employ his methods in their solution, though with indifferent success.
21890 There was none, however, which appealed to me like this tragedy of Ronald
21892 As I read the evidence at the inquest, which led up to a verdict of willful
21893 murder against some person or persons unknown, I realized more clearly
21894 than I had ever done the loss which the community had sustained by the
21895 death of Sherlock Holmes.
21896 There were points about this strange business which would, I was sure,
21897 have specially appealed to him, and the efforts of the police would have
21898 been supplemented, or more probably anticipated, by the trained observation
21899 and the alert mind of the first criminal agent in Europe.
21900 All day, as I drove upon my round, I turned over the case in my mind and
21901 found no explanation which appeared to me to be adequate.
21902 At the risk of telling a twice-told tale, I will recapitulate the facts
21903 as they were known to the public at the conclusion of the inquest.
21906 \begin_layout Standard
21910 \begin_layout Plain Layout
21922 \begin_layout Standard
21923 You can have more than 3 columns if you want to, but that might not be very
21924 pleasant for the eye.
21927 \begin_layout Subsubsection
21928 Columns inside columns
21931 \begin_layout Standard
21932 You can even have columns inside columns:
21935 \begin_layout Standard
21939 \begin_layout Plain Layout
21943 begin{multicols}{2}
21951 \begin_layout Standard
21954 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
21955 at that time governor of one of the Australian colonies.
21956 Adair's mother had returned from Australia to undergo the operation for
21957 cataract, and she, her son Ronald, and her daughter Hilda were living together
21961 \begin_layout Standard
21965 \begin_layout Plain Layout
21969 begin{multicols}{2}
21977 \begin_layout Standard
21980 The youth moved in the best society–had, so far as was known, no enemies
21981 and no particular vices.
21982 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
21983 had been broken off by mutual consent some months before, and there was
21984 no sign that it had left any very profound feeling behind it.
21985 For the rest {sic} the man's life moved in a narrow and conventional circle,
21986 for his habits were quiet and his nature unemotional.
21987 Yet it was upon this easy-going young aristocrat that death came, in most
21988 strange and unexpected form, between the hours of ten and eleven-twenty
21989 on the night of March 30, 1894.
21992 \begin_layout Standard
21996 \begin_layout Plain Layout
22008 \begin_layout Standard
22011 Ronald Adair was fond of cards–playing continually, but never for such stakes
22013 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22014 It was shown that, after dinner on the day of his death, he had played
22015 a rubber of whist at the latter club.
22016 He had also played there in the afternoon.
22021 The evidence of those who had played with him– Mr.
22022 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
22023 and that there was a fairly equal fall of the cards.
22024 Adair might have lost five pounds, but not more.
22025 His fortune was a considerable one, and such a loss could not in any way
22027 He had played nearly every day at one club or other, but he was a cautious
22028 player, and usually rose a winner.
22029 It came out in evidence that, in partnership with Colonel Moran, he had
22030 actually won as much as four hundred and twenty pounds in a sitting, some
22031 weeks before, from Godfrey Milner and Lord Balmoral.
22032 So much for his recent history as it came out at the inquest.
22035 \begin_layout Standard
22039 \begin_layout Plain Layout
22051 \begin_layout Standard
22052 Please do read the file
22054 examples/multicol.lyx
22056 for more advanced examples including column and header spacing, vertical
22057 separator lines, and more.
22060 \begin_layout Section
22065 Paragraph Environment
22066 \begin_inset OptArg
22069 \begin_layout Plain Layout
22070 Numbering in Enumerate
22078 \begin_layout Standard
22084 \begin_layout Standard
22085 \begin_inset VSpace bigskip
22091 \begin_layout Standard
22093 The default numbering for the
22097 paragraph environment begins with Arabic numbers and ends with uppercase
22099 Suppose, however, you wanted a different type of numbering scheme.
22100 Here's a quickie example of how to change the numbering scheme:
22103 \begin_layout LyX-Code
22113 \begin_layout LyX-Code
22123 \begin_layout LyX-Code
22133 \begin_layout LyX-Code
22143 \begin_layout Standard
22144 \SpecialChar \ldots{}
22145 which changes the numbering scheme to uppercase Roman numerals, uppercase
22146 letters, Arabic numbers, and lowercase letter.
22149 \begin_layout Standard
22150 Additionally, the previous example also adds a little bit extra to the numbering
22152 For example, the first level label actually looks like:
22153 \begin_inset Quotes eld
22157 \begin_inset Quotes erd
22161 For ease of reading, we'll describe what the numbering schemes look like
22162 using a notation something like this: <
22163 \begin_inset Quotes eld
22167 \begin_inset Quotes erd
22171 \begin_inset space ~
22175 \begin_inset Quotes erd
22179 \begin_inset Quotes erd
22183 \begin_inset space ~
22187 \begin_inset Quotes erd
22191 \begin_inset Quotes erd
22195 \begin_inset space ~
22199 \begin_inset Quotes eld
22203 \begin_inset Quotes erd
22210 \begin_layout Standard
22211 As you can see in the example, there is a label command for each nesting
22218 \SpecialChar \ldots{}
22225 , as well as a counter,
22229 \SpecialChar \ldots{}
22235 There are also five
22236 \begin_inset Quotes eld
22240 \begin_inset Quotes erd
22273 , each of which take one counter as an argument.
22274 You can add characters before or after these, but there's no need to add
22278 \begin_layout Standard
22279 You can get really fancy with these.
22283 \begin_layout LyX-Code
22297 \begin_layout LyX-Code
22309 \begin_layout LyX-Code
22319 \begin_layout LyX-Code
22329 \begin_layout Standard
22330 produces the somewhat out of hand numbering scheme: <
22331 \begin_inset Quotes eld
22335 \begin_inset Quotes erd
22339 \begin_inset space ~
22343 \begin_inset Quotes erd
22347 \begin_inset Quotes erd
22351 \begin_inset space ~
22355 \begin_inset Quotes erd
22359 \begin_inset Quotes erd
22363 \begin_inset space ~
22367 \begin_inset Quotes eld
22371 \begin_inset Quotes erd
22378 \begin_layout Standard
22382 \begin_layout Section
22386 \begin_layout Standard
22392 \begin_layout Standard
22393 \begin_inset VSpace bigskip
22399 \begin_layout Standard
22404 \begin_layout Plain Layout
22410 tmpfont}{cmr17 scaled 2500}{
22422 \begin_layout Standard
22427 \begin_layout Plain Layout
22438 hose of you who like the style of old books probably also like
22439 \begin_inset Quotes eld
22443 \begin_inset Quotes erd
22446 —those large capital letters which begin each new chapter or section.
22447 Implementing them with plain LyX/LaTeX is straightforward (assuming you
22448 know some plain TeX!) but does require a lot of work and many iterations,
22449 as you can see by all the ugly TeX-mode stuff at the beginning of this
22453 \begin_layout Standard
22457 \begin_layout Plain Layout
22463 bigdrop{-1em}{3}{ptmri}{T}+
22468 here is a much easier way of doing this, of course.
22477 ) package from CTAN allows a simple way to add such letters to your documents.
22478 Since this package is not a standard part of teTeX, I can't demonstrate
22479 it within this document, but if you copy this paragraph to a new document,
22481 \begin_inset Quotes eld
22491 \begin_inset Quotes erd
22494 and the pluses from the TeX code at the beginning of the paragraph, and
22499 usepackage{dropcaps}
22501 to your LaTeX preamble, you will get a nice Times Roman Italic
22502 \begin_inset Quotes eld
22506 \begin_inset Quotes erd
22509 , whose height is three lines of text and which protrudes 1 em into the
22511 (Make certain you have copied
22512 \begin_inset Quotes eld
22520 \begin_inset Quotes erd
22523 into a directory where TeX can see it.) The first argument is the amount
22524 of indentation; in this case the negative sign moves it into the margin.
22525 The second argument is the height of the letter in number of lines of text.
22526 The third argument is the font name: virtually anything which has a tfm
22527 file should work (wade through the
22529 .../texmf/fonts/tfm
22531 directory for possibilities).
22532 My personal favorite is
22533 \begin_inset Quotes eld
22541 \begin_inset Quotes erd
22544 , a fancy German font specifically designed for dropped capitals.
22545 The fourth argument is the letter (or letters) to be dropped.
22550 package also offers the
22556 command, as well as a slightly simplified
22565 \begin_layout Section
22566 Non-standard Paragraph Shapes
22569 \begin_layout Standard
22575 \begin_layout Standard
22576 \begin_inset VSpace bigskip
22582 \begin_layout Standard
22586 \begin_layout Plain Layout
22598 \begin_layout Standard
22602 \begin_layout Plain Layout
22611 \begin_layout Plain Layout
22625 \begin_layout Standard
22630 \begin_layout Plain Layout
22641 \begin_layout Plain Layout
22650 \begin_layout Plain Layout
22659 \begin_layout Plain Layout
22668 \begin_layout Plain Layout
22677 \begin_layout Plain Layout
22686 \begin_layout Plain Layout
22695 \begin_layout Plain Layout
22704 \begin_layout Plain Layout
22713 \begin_layout Plain Layout
22722 \begin_layout Plain Layout
22731 \begin_layout Plain Layout
22740 \begin_layout Plain Layout
22749 \begin_layout Plain Layout
22758 \begin_layout Plain Layout
22767 \begin_layout Plain Layout
22776 \begin_layout Plain Layout
22785 \begin_layout Plain Layout
22794 \begin_layout Plain Layout
22803 \begin_layout Plain Layout
22809 There are times when the tyranny of rectangular paragraphs must be overthrown.
22810 In such situations, a call to the delightful plain TeX command
22817 As you can see, completely arbitrary shapes can be laid out with a suitable
22818 set of linelength definitions.
22819 While this parshape may look a bit silly and useless, one could conceive
22820 of situations such as finely tuned dropped capitals, word wrapping around
22821 non-rectangular graphics, etc.
22822 which will benefit from such handcrafting.
22825 \begin_layout Standard
22826 \begin_inset VSpace bigskip
22832 \begin_layout Standard
22837 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
22844 is the number of lines of text which define the paragraph.
22845 If there turn out to be fewer lines, the shape is truncated; if there are
22846 more, the excess lines have the same dimensions as the last line of the
22856 entries specify the indentation of the line from the left margin, and the
22857 length of the line as measured from that point.
22858 The shape applies only to the current paragraph; everything is reset to
22859 normal for the next paragraph.
22862 \begin_layout Standard
22866 \begin_layout Plain Layout
22878 \begin_layout Section
22882 \begin_layout Standard
22883 As you can see, the examples in this section range from the useful to the
22885 While I don't expect that anyone will ever need the paragraph shape demonstrate
22886 d in the last section, the important point is that you can do almost anything
22887 you want in LyX if you are willing to figure out how to do it in TeX and
22889 TeX is a fantastically powerful typesetting system and all that power is
22890 available to you since LyX uses it as its backend.