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
130 \html_math_img_scale 1
131 \html_latex_start "<span class='latex'>"
132 \html_latex_end "</span>"
139 Additional LyX Features
147 \begin_layout Plain Layout
149 Principal maintainer of this file is
154 If you have comments or error corrections, please send them to the LyX
155 Documentation mailing list,
156 \begin_inset Flex CharStyle:Code
159 \begin_layout Plain Layout
161 <lyx-docs@lists.lyx.org>
174 \begin_layout Standard
175 \begin_inset CommandInset toc
176 LatexCommand tableofcontents
183 \begin_layout Chapter
187 \begin_layout Standard
188 This manual is essentially Part II of the
190 User's Guide\SpecialChar \@.
193 The reason for separating this document out is simple: the
197 is already quite lengthy, and it contains information on all of the basic
198 features one needs to know in order to prepare most documents.
199 However, the LyX Team has worked to make LyX extensible through various
200 configuration files and external packages.
201 That means that if you want to support the Fizzwizzle LaTeX package, you
202 can create a layout file (or module) for it without having to alter LyX
204 We've already had contributions of several new features this way, and some
205 of them are documented here.
206 There are also some more `advanced' features, such as how to control the
207 presentation of bibliographies and how to work with multi-part documents,
208 that are not covered in the
212 and are discussed here.
215 \begin_layout Standard
216 This manual also documents some special features, like fax support, version
217 control, and SGML support, which require additional software to work properly.
218 There is also a chapter on LyX's support for HTML.
219 And lastly, there's a chapter of LaTeX tools and tips, things you can use
220 to spruce up your documents by directly using the powerful features of
226 only WYSIWYM and will only ever interface to some, not all, LaTeX features.
229 \begin_layout Standard
230 If you haven't read the
234 yet, you are definitely in the wrong manual.
239 is the first place to go, since it describes the notation and format of
241 You should also be thoroughly familiar with the
245 and all of the basic features of LyX before attempting to read this one.
248 \begin_layout Standard
249 Since many of the topics in this manual depend heavily on LyX's interaction
250 with LaTeX, this first chapter covers the inner workings of LyX and how
251 to direct LyX to generate exactly the LaTeX code you want.
252 It is obviously for more seasoned LyX users.
255 \begin_layout Chapter
259 \begin_layout Section
263 \begin_layout Standard
264 This chapter is for both TeX-nicians and the LaTeX-curious.
265 In it, we'll explain how LyX and LaTeX work together to produce printable
267 This is the only place in any of the manuals where we assume you know something
271 \begin_layout Standard
272 At one time, LyX was called a
273 \begin_inset Quotes eld
276 WYSIWYM frontend to LaTeX,
277 \begin_inset Quotes erd
280 but that's no longer true.
281 There are frontends to LaTeX out there.
285 \begin_layout Plain Layout
286 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
287 There are also the LaTeX modes for vi and emacs, of course.
292 These are basically text editors with the ability to run LaTeX and mark
293 any errors in the file you're editing.
302 run LaTeX, and it also indicates errors in the file, it also does much,
304 For one thing, you don't need to know LaTeX to use LyX effectively.
305 And LyX has added its own extensions to LaTeX.
306 Try the following sometime: select
307 \begin_inset Flex CharStyle:MenuItem
310 \begin_layout Plain Layout
311 Export\SpecialChar \menuseparator
318 \begin_inset Flex CharStyle:MenuItem
321 \begin_layout Plain Layout
328 \begin_inset Flex CharStyle:MenuItem
331 \begin_layout Plain Layout
332 View\SpecialChar \menuseparator
338 ), then look at the preamble of the resulting
339 \begin_inset Flex CharStyle:Code
342 \begin_layout Plain Layout
349 You'll notice a variety of new macros defined specifically by LyX.
350 These macros are defined automatically, according to the features you use
354 \begin_layout Standard
355 There are several commands that automatically invoke LaTeX.
359 \begin_layout Itemize
360 \begin_inset Flex CharStyle:MenuItem
363 \begin_layout Plain Layout
364 View\SpecialChar \menuseparator
373 \begin_layout Itemize
374 \begin_inset Flex CharStyle:MenuItem
377 \begin_layout Plain Layout
378 View\SpecialChar \menuseparator
379 Update\SpecialChar \menuseparator
388 \begin_layout Itemize
389 \begin_inset Flex CharStyle:MenuItem
392 \begin_layout Plain Layout
393 File\SpecialChar \menuseparator
402 \begin_layout Itemize
403 \begin_inset Flex CharStyle:MenuItem
406 \begin_layout Plain Layout
407 File\SpecialChar \menuseparator
416 \begin_layout Standard
417 They will only invoke LaTeX if the file has changed since the last time
422 \begin_layout Standard
423 When LyX runs LaTeX on the file you're editing, it performs these steps:
426 \begin_layout Enumerate
427 Convert the document to LaTeX and save to a file with the extension
428 \begin_inset Flex CharStyle:Code
431 \begin_layout Plain Layout
438 \begin_inset Flex CharStyle:Code
441 \begin_layout Plain Layout
450 \begin_layout Enumerate
452 \begin_inset Flex CharStyle:Code
455 \begin_layout Plain Layout
461 file (maybe several times), and run any other commands (such as
462 \begin_inset Flex CharStyle:Code
465 \begin_layout Plain Layout
472 \begin_inset Flex CharStyle:Code
475 \begin_layout Plain Layout
481 ) needed to compile the LaTeX file.
484 \begin_layout Enumerate
485 If there are any errors, show the error log.
488 \begin_layout Standard
489 If you've run LaTeX using
490 \begin_inset Flex CharStyle:MenuItem
493 \begin_layout Plain Layout
496 \SpecialChar \menuseparator
504 , LyX then runs a DVI viewer to display the DVI-file.
506 \begin_inset Flex CharStyle:MenuItem
509 \begin_layout Plain Layout
512 \SpecialChar \menuseparator
520 , LyX performs further steps:
523 \begin_layout Itemize
525 \begin_inset Flex CharStyle:Code
528 \begin_layout Plain Layout
534 to convert the DVI file to PostScript.
537 \begin_layout Itemize
538 Run a PostScript viewer, such as
539 \begin_inset Flex CharStyle:Code
542 \begin_layout Plain Layout
548 , to display the PostScript file.
551 \begin_layout Standard
552 LyX does similar things when viewing, or exporting, other formats.
555 \begin_layout Section
556 Translating LaTeX files into LyX
559 \begin_layout Standard
560 You can import a LaTeX file into LyX by using the
561 \begin_inset Flex CharStyle:MenuItem
564 \begin_layout Plain Layout
565 File\SpecialChar \menuseparator
566 Import\SpecialChar \menuseparator
573 This will call a program named
574 \begin_inset Flex CharStyle:Code
577 \begin_layout Plain Layout
583 which will create a file
584 \begin_inset Flex CharStyle:Code
587 \begin_layout Plain Layout
594 \begin_inset Flex CharStyle:Code
597 \begin_layout Plain Layout
604 LyX will then open that file.
608 \begin_layout Plain Layout
609 \begin_inset Flex CharStyle:Code
612 \begin_layout Plain Layout
618 can also be run from the command line, of course.
626 \begin_layout Standard
627 \begin_inset Flex CharStyle:Code
630 \begin_layout Plain Layout
636 will translate most legal LaTeX, but not everything.
637 It will put things it doesn't understand into TeX code, so after translating
639 \begin_inset Flex CharStyle:Code
642 \begin_layout Plain Layout
648 , you can look for TeX code and hand-edit it until it looks right.
651 \begin_layout Standard
652 If you don't know what TeX code is, read the next section.
655 \begin_layout Section
656 \begin_inset CommandInset label
658 name "sec:Inserting-TeX-Code"
662 Inserting TeX Code into LyX Documents
665 \begin_layout Standard
666 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
667 You can always insert TeX code into any LyX document.
668 LyX cannot, and will never be able to, display every possible LaTeX construct.
669 If ever you need to insert LaTeX commands into your LyX document, you can
671 \begin_inset Flex CharStyle:Code
674 \begin_layout Plain Layout
680 box, which you can insert into your document with
681 \begin_inset Flex CharStyle:MenuItem
684 \begin_layout Plain Layout
685 Insert\SpecialChar \menuseparator
694 \begin_layout Standard
695 Here's an example of inserting LaTeX commands in a LyX document.
696 The code looks like this:
699 \begin_layout LyX-Code
703 \begin_inset Newline newline
709 \begin_inset Newline newline
712 This is an example for a minipage environment.
714 \begin_inset Newline newline
717 can put nearly everything in it, even (non-floating)
718 \begin_inset Newline newline
723 \begin_inset Newline newline
729 \begin_inset Newline newline
733 \begin_inset Newline newline
739 \begin_inset Newline newline
745 \begin_inset Newline newline
751 \begin_inset Newline newline
756 \begin_inset Newline newline
762 \begin_inset Newline newline
768 \begin_inset Newline newline
774 \begin_inset Newline newline
782 \begin_layout LyX-Code
786 \begin_layout Standard
788 \begin_inset Flex CharStyle:Code
791 \begin_layout Plain Layout
797 box containing this text is directly after this paragraph.
798 Those of you reading the manual in LyX will only see the TeX code inset.
799 Those reading a printed version of the manuals will see the actual results:
802 \begin_layout Standard
806 \begin_layout Plain Layout
813 \begin_layout Plain Layout
820 \begin_layout Plain Layout
822 This is an example for a minipage environment.
823 You can put nearly everything in it, even (non-floating) figures and tables.
827 \begin_layout Plain Layout
834 \begin_layout Plain Layout
839 \begin_layout Plain Layout
846 \begin_layout Plain Layout
853 \begin_layout Plain Layout
860 \begin_layout Plain Layout
866 \begin_layout Plain Layout
873 \begin_layout Plain Layout
880 \begin_layout Plain Layout
887 \begin_layout Plain Layout
899 \begin_layout Standard
900 In addition to using TeX code, you can also create a separate file containing
901 some complex LaTeX structure and then use
902 \begin_inset Flex CharStyle:MenuItem
905 \begin_layout Plain Layout
906 Insert\SpecialChar \menuseparator
916 to include your file (you should select the type
917 \begin_inset Flex CharStyle:Code
920 \begin_layout Plain Layout
927 We recommend that you only do this if you have a
928 \begin_inset Flex CharStyle:Code
931 \begin_layout Plain Layout
942 Otherwise, you'll have a big job tracking down LaTeX errors.
945 \begin_layout Standard
946 There are a few last points to emphasize:
949 \begin_layout Itemize
954 check if your LaTeX code is correct.
957 \begin_layout Itemize
958 Beware reinventing the wheel.
961 \begin_layout Standard
962 On that last point, LyX does have quite a few features tucked into it, and
964 Be sure to check the manuals to make sure that LyX doesn't have such-and-such
965 feature before you decide you have to do it by hand.
966 Moreover, there are numerous LaTeX packages out there to do all sorts of
967 things, from labels to envelopes to fancy multipage tables.
969 \begin_inset CommandInset href
972 target "http://www.ctan.org/"
976 for details, and see chapter
977 \begin_inset CommandInset ref
979 reference "cha:secrets"
986 \begin_layout Standard
987 If you do need to do some wild and fancy things within your document, be
988 sure to check out a good LaTeX book for assistance.
989 There are a number of them listed in the bibliography of the
996 \begin_layout Section
997 LyX and the LaTeX Preamble
1000 \begin_layout Subsection
1001 About the LaTeX Preamble
1004 \begin_layout Standard
1005 If you already know LaTeX, there is no need to explain here what the preamble
1007 If you don't, the following will give you some ideas—we recommend again
1008 that you consult a LaTeX book for further information.
1009 In any case, you should read the points below, because they explain what
1010 you can do and what you don't need to do in the LaTeX preamble of a LyX
1014 \begin_layout Standard
1015 The LaTeX preamble comes at the very beginning of a document,
1023 \begin_layout Itemize
1024 Declare the document class.
1026 \begin_inset Newline newline
1029 LyX already does this for you.
1030 If you're a seasoned LaTeX-nician, and you have a custom document class
1031 you want to use, check out the
1033 Customization Manual
1035 for information on how to make LyX interface to it.
1038 \begin_layout Itemize
1039 Declare the usage of packages.
1041 \begin_inset Newline newline
1044 LaTeX packages provide special commands, which are only available within
1045 a document when the package has been declared in the preamble.
1046 For example, the package
1047 \begin_inset Flex CharStyle:Code
1050 \begin_layout Plain Layout
1056 forces all paragraphs to be indented.
1057 There are other packages for labels, envelopes, margins, etc.
1061 \begin_layout Itemize
1062 Set counters, variables, lengths and widths.
1064 \begin_inset Newline newline
1067 There are several LaTeX counters and variables which
1071 be set globally from within the preamble in order to have the desired effect.
1072 (There are variables which you can set and reset inside the document, too.)
1073 Margins are a good example of something which must be set in the preamble.
1074 Another example is the label format for lists.
1075 You can actually set these just about anywhere, but it's best to do it
1076 just once, inside the preamble.
1079 \begin_layout Itemize
1080 Declare user defined commands (with
1081 \begin_inset Flex CharStyle:Code
1084 \begin_layout Plain Layout
1093 \begin_inset Flex CharStyle:Code
1096 \begin_layout Plain Layout
1105 \begin_inset Newline newline
1108 These are abbreviations for LaTeX commands which appear very often inside
1110 Although the preamble is a good place to declare such commands, they
1114 be declared anywhere (before they are used for the first time, of course).
1115 This can be useful if there is a lot of raw LaTeX code in your document,
1116 which normally should not be the case.
1119 \begin_layout Standard
1120 LyX adds its own set of definitions to the preamble of the
1121 \begin_inset Flex CharStyle:Code
1124 \begin_layout Plain Layout
1131 This makes LaTeX files generated by LyX portable.
1134 \begin_layout Subsection
1135 Changing the Preamble
1138 \begin_layout Standard
1139 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1140 can't change them without patching LyX itself.
1141 You can, however, add your own stuff to the preamble by selecting
1142 \begin_inset Flex CharStyle:MenuItem
1145 \begin_layout Plain Layout
1147 \begin_inset space ~
1156 \begin_inset Flex CharStyle:MenuItem
1159 \begin_layout Plain Layout
1160 Document\SpecialChar \menuseparator
1167 LyX adds anything in the
1168 \begin_inset Flex CharStyle:MenuItem
1171 \begin_layout Plain Layout
1177 dialog to its own built-in preamble.
1178 Before adding your own declarations in the preamble, you should make sure
1179 that LyX doesn't already support what you want to do.
1180 (Remember what we said about reinventing the wheel?) Also,
1182 make sure your preamble code is correct
1185 LyX doesn't check it for you.
1186 If there is an error, you're likely to get an error like
1187 \begin_inset Quotes eld
1191 \begin_inset Flex CharStyle:Code
1194 \begin_layout Plain Layout
1203 \begin_inset Quotes erd
1207 If you see this error, check your preamble.
1210 \begin_layout Subsection
1214 \begin_layout Standard
1215 Here are some examples of what you can add to a preamble, and what they
1219 \begin_layout Subsubsection
1223 \begin_layout Standard
1224 There are two variables under LaTeX that control page position:
1225 \begin_inset Flex CharStyle:Code
1228 \begin_layout Plain Layout
1237 \begin_inset Flex CharStyle:Code
1240 \begin_layout Plain Layout
1249 Their names should be self-explanatory.
1250 These variables are useful if you think for a moment about computer labels.
1251 Sometimes, the size of a print medium and the area of the medium that you
1252 can actually print on aren't the same.
1254 \begin_inset Flex CharStyle:Code
1257 \begin_layout Plain Layout
1266 \begin_inset Flex CharStyle:Code
1269 \begin_layout Plain Layout
1280 \begin_layout Standard
1281 The default values for
1282 \begin_inset Flex CharStyle:Code
1285 \begin_layout Plain Layout
1294 \begin_inset Flex CharStyle:Code
1297 \begin_layout Plain Layout
1306 \begin_inset space \thinspace{}
1310 \begin_inset space \thinspace{}
1314 \begin_inset space \space{}
1317 the page isn't shifted.
1318 Unfortunately, some DVI drivers always seem to shift the page.
1319 We have no idea why, or why the sysadmin hasn't fixed such behavior.
1320 If you're using LyX on a system that you don't personally maintain, and
1321 your sysadmin is a doofus,
1322 \begin_inset Flex CharStyle:Code
1325 \begin_layout Plain Layout
1334 \begin_inset Flex CharStyle:Code
1337 \begin_layout Plain Layout
1346 Suppose you're left and top margins are always 0.5
1347 \begin_inset space \thinspace{}
1351 You can add this to the preamble:
1354 \begin_layout LyX-Code
1362 \begin_layout LyX-Code
1370 \begin_layout Standard
1371 and your margins should now be correct.
1374 \begin_layout Subsubsection
1378 \begin_layout Standard
1379 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1380 There's a rather nice package, available at your nearest CTAN archive,
1381 for printing sheets of labels:
1382 \begin_inset Flex CharStyle:Code
1385 \begin_layout Plain Layout
1392 Now, your system may not have this package installed by default.
1393 We leave that up to you to check.
1394 You'll also want to read the documentation for it; we're not going to do
1396 Since this is an example, however, we'll give you an example of how you
1400 \begin_layout Standard
1401 First, make sure you're using the
1402 \begin_inset Flex CharStyle:Code
1405 \begin_layout Plain Layout
1412 Next, you need to put the following in your preamble:
1415 \begin_layout LyX-Code
1421 \begin_layout LyX-Code
1427 \begin_layout LyX-Code
1433 \begin_layout LyX-Code
1439 \begin_layout LyX-Code
1445 \begin_layout LyX-Code
1451 \begin_layout LyX-Code
1457 \begin_layout Standard
1458 This sets things up for Avery label sheets, stock #5360.
1459 You're now ready to print labels, but you'll need to insert LaTeX code,
1460 placing the commands
1461 \begin_inset Flex CharStyle:Code
1464 \begin_layout Plain Layout
1473 \begin_inset Flex CharStyle:Code
1476 \begin_layout Plain Layout
1484 around each label text.
1485 This and other special features of
1486 \begin_inset Flex CharStyle:Code
1489 \begin_layout Plain Layout
1495 are explained in its documentation.
1498 \begin_layout Standard
1499 Someday, someone may write a LyX layout file to support this package directly.
1500 Maybe that someone is you.
1503 \begin_layout Subsubsection
1504 Example #3: Paragraph Indentation
1507 \begin_layout Standard
1508 Americans are trained to indent the first line of
1513 As with all of their other weird quirks, most Americans will whine and
1514 moan until they can have their way and indent the first line of all paragraphs.
1523 \begin_layout Standard
1524 Of course, this behavior isn't standard typography.
1525 In books, you typically only indent the first line of a paragraph
1529 it follows another one.
1530 The idea behind indenting the first line of a paragraph is to distinguish
1531 neighboring paragraphs from one another.
1532 If there is no previous paragraph—for example, if it follows a figure or
1533 is the first paragraph in a section—then there is no need for indentation.
1537 \begin_layout Standard
1538 If you're a typical American (we're still joking!), though, you don't care
1539 about such esoteric things; you want your indentation! Add this to the
1543 \begin_layout LyX-Code
1546 usepackage{indentfirst}
1549 \begin_layout Standard
1550 If your TeX distribution isn't braindead, you'll have this package, and
1551 all of your paragraphs will get the indentation the Founding Fathers intended
1555 \begin_layout Subsubsection
1556 Example #4: This Document
1559 \begin_layout Standard
1560 You can also check out the preamble of this document to get an idea of some
1561 of the advanced things you can do.
1562 Also, there are more examples and an assortment of LaTeX
1563 \begin_inset Quotes eld
1567 \begin_inset Quotes erd
1571 \begin_inset space ~
1575 \begin_inset CommandInset ref
1577 reference "cha:secrets"
1585 \begin_layout Section
1586 LyX and LaTeX Errors
1589 \begin_layout Standard
1590 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1592 It then uses the logfile from the LaTeX run to do a post-mortem.
1593 After analyzing the logfile,LyX displays a dialog listing the errors.
1594 Clicking on any one of them will take you to the position in your LyX file
1595 where the error occurred.
1599 \begin_layout Plain Layout
1601 Analyzing the logfile is a tough job, and LyX doesn't always go to the
1603 There are also cases where LaTeX reports the error on one line, but the
1604 actual error is earlier.
1605 This is not unlike forgetting a closing brace in a program: You'll get
1606 an error, but only later.
1614 \begin_layout Standard
1615 Some folks also like to look at the log file directly: It is available from
1617 \begin_inset Flex CharStyle:MenuItem
1620 \begin_layout Plain Layout
1623 \SpecialChar \menuseparator
1627 \begin_inset space ~
1636 There are some fairly common error messages and warnings.
1637 We'll cover those here.
1638 You should look at a good LaTeX book for a complete listing.
1641 \begin_layout Itemize
1642 \begin_inset Flex CharStyle:Code
1645 \begin_layout Plain Layout
1652 \begin_inset Newline newline
1655 Anything beginning with these words is a warning message for the purpose
1657 \begin_inset Quotes eld
1661 \begin_inset Quotes erd
1664 the LaTeX code itself.
1665 You'll get messages like this if you added or changed cross-references
1666 or bibliography entries, in which case, LaTeX is trying to tell you that
1667 you need to make another run.
1668 You can by-and-large ignore these.
1671 \begin_layout Itemize
1672 \begin_inset Flex CharStyle:Code
1675 \begin_layout Plain Layout
1682 \begin_inset Newline newline
1685 Another warning message, this time about fonts which LaTeX couldn't find.
1686 The rest of the message will often say something about a replacement font
1688 You can safely ignore these, too.
1691 \begin_layout Itemize
1692 \begin_inset Flex CharStyle:Code
1695 \begin_layout Plain Layout
1704 \begin_inset Newline newline
1712 They are warnings about lines that were too long and run past the right
1714 Almost always, this is unnoticeable in the final output.
1715 (It can be just a point or two.) Or, only one or two characters extend past
1717 LaTeX seems to generate at least one of these messages for just about any
1719 \begin_inset Newline newline
1722 You can ignore these messages.
1723 Your eyes will tell you if there's a problem with something that's too
1724 wide; just look at the output.
1728 \begin_layout Plain Layout
1729 You can also enable the `draft' option in
1730 \begin_inset Flex CharStyle:MenuItem
1733 \begin_layout Plain Layout
1736 \SpecialChar \menuseparator
1744 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1752 \begin_layout Itemize
1753 \begin_inset Flex CharStyle:Code
1756 \begin_layout Plain Layout
1765 \begin_inset Newline newline
1768 Not quite as common as its cousin.
1769 LaTeX seems to like to print lines that are a bit too wide as opposed to
1770 ones that are a bit too narrow.
1771 We have no idea why.
1774 \begin_layout Itemize
1775 \begin_inset Flex CharStyle:Code
1778 \begin_layout Plain Layout
1787 \begin_inset Flex CharStyle:Code
1790 \begin_layout Plain Layout
1799 \begin_inset Newline newline
1802 Warnings about troubles breaking the page.
1803 Once again, just look at the output.
1804 Your eyes will tell you where something has gone wrong.
1807 \begin_layout Itemize
1808 \begin_inset Flex CharStyle:Code
1811 \begin_layout Plain Layout
1813 \begin_inset Quotes els
1817 \begin_inset Quotes ers
1826 \begin_inset Newline newline
1830 \begin_inset Quotes eld
1834 \begin_inset Quotes erd
1837 isn't installed on this system.
1838 This usually appears because some package your document needs isn't installed.
1839 If you didn't touch the preamble or didn't use the
1840 \begin_inset Flex CharStyle:Code
1843 \begin_layout Plain Layout
1851 command, then one of the packages LyX tried to load is missing.
1853 \begin_inset Flex CharStyle:MenuItem
1856 \begin_layout Plain Layout
1857 Help\SpecialChar \menuseparator
1863 to get a list of packages that LyX knows about.
1864 This file is updated whenever you reconfigure LyX (using
1865 \begin_inset Flex CharStyle:MenuItem
1868 \begin_layout Plain Layout
1869 Tools\SpecialChar \menuseparator
1875 ) and tells you which packages have been detected and what they do.
1876 \begin_inset Newline newline
1880 \begin_inset Flex CharStyle:Code
1883 \begin_layout Plain Layout
1891 command and the package in question isn't installed, then you'll need to
1892 install it yourself.
1895 \begin_layout Itemize
1896 \begin_inset Flex CharStyle:Code
1899 \begin_layout Plain Layout
1900 LaTeX Error: Unknown option
1906 \begin_inset Newline newline
1909 Error messages beginning with this are trying to tell you that you specified
1910 a bad or undefined option to a package.
1911 Check the package's documentation.
1914 \begin_layout Itemize
1915 \begin_inset Flex CharStyle:Code
1918 \begin_layout Plain Layout
1919 Undefined control sequence
1925 \begin_inset Newline newline
1928 If you've inserted LaTeX code into your document, but made a typo, you'll
1930 You may have forgotten to load a package.
1931 In any case, this error message usually means that you used an undefined
1936 \begin_layout Standard
1937 There are other error and warning messages.
1938 Some are self-explanatory.
1939 These are usually LaTeX messages.
1940 Others are downright cryptic.
1941 These are usually TeX error messages, and we really have
1945 what they mean or how to decipher them.
1949 \begin_layout Standard
1950 There's a general sequence you should follow if you get error messages:
1953 \begin_layout Enumerate
1954 Look at the LaTeX code you inserted for typos.
1957 \begin_layout Enumerate
1958 If there are no typos, check that you used the command(s) correctly.
1961 \begin_layout Enumerate
1962 If you get a bunch of error boxes piled up at the very top of the document—and
1963 especially if you see a
1964 \begin_inset Quotes eld
1968 \begin_inset Flex CharStyle:Code
1971 \begin_layout Plain Layout
1980 \begin_inset Quotes erd
1983 error—it means that there are errors in the preamble.
1984 Start debugging your preamble.
1987 \begin_layout Enumerate
1988 If you didn't add anything to the preamble and didn't add any LaTeX code
1989 to the document, the first suspect is your LaTeX distribution itself.
1990 Check for missing packages and install them.
1993 \begin_layout Enumerate
1994 Okay, so there are no missing packages.
1995 Did you use any of the fine-tuning options in LyX? Specifically, did you
2000 any of them, like trying to manually insert lots of
2001 \begin_inset Flex CharStyle:Code
2004 \begin_layout Plain Layout
2006 \begin_inset space ~
2015 \begin_inset Flex CharStyle:Code
2018 \begin_layout Plain Layout
2025 \begin_inset Flex CharStyle:Code
2028 \begin_layout Plain Layout
2034 ? Did you try to kludge something together with these instead of using the
2035 appropriate paragraph environment?
2038 \begin_layout Enumerate
2039 All right, you didn't use any of the fine-tuning options, you played by
2041 Did you try to pull a fancy maneuver? Did you do something funky inside
2042 a table or an equation, like inserting a graphic into a table cell?
2045 \begin_layout Enumerate
2046 Do you have long sections of text where LaTeX cannot find a place to break
2047 a line? By default, LaTeX is rather strict about how much extra inter-word
2048 spacing it will add in order to break a line.
2049 Preferably, you should rework the paragraph to avoid the problem.
2050 If this isn't an option, you can wrap your text in
2051 \begin_inset Flex CharStyle:Code
2054 \begin_layout Plain Layout
2062 to make LaTeX's line breaking more, well, sloppy.
2065 \begin_layout Enumerate
2066 Did you go overboard with the nesting? LyX (currently) doesn't check to
2067 make sure you're in the limits for nesting environments.
2068 If you nested a bunch of environments to the
2069 \begin_inset Formula $17^{\mathrm{th}}$
2072 level, that's the problem.
2073 (The limit in LaTeX is five.)
2076 \begin_layout Enumerate
2077 Okay, you didn't get any error messages, but your output looks awful.
2078 If you have a table or figure that's too wide or long for the page, you
2083 \begin_layout Enumerate
2084 rescale the figure so it fits.
2087 \begin_layout Enumerate
2088 trim down the table so it fits.
2092 \begin_layout Enumerate
2093 If something else is wrong with the output, and you didn't try to pull anything
2094 fancy or kludge the fine-tuning options, we're not sure what's wrong.
2097 \begin_layout Standard
2098 If all this doesn't help—well, then
2102 you might have found a bug in LyX\SpecialChar \ldots{}
2106 \begin_layout Chapter
2110 \begin_layout Section
2111 Customizing Bibliographies with BibTeX
2114 \begin_layout Standard
2115 The most basic information about how to use BibTeX with LyX is contained
2118 Bibliography databases (BibTeX)
2125 The following subsections explain special bibliography features supported
2129 \begin_layout Subsection
2130 Alternative Citation Styles
2133 \begin_layout Standard
2134 Standard BibTeX uses numbers (e.
2135 \begin_inset space \thinspace{}
2139 \begin_inset space \space{}
2143 \begin_inset Quotes eld
2147 \begin_inset Quotes erd
2150 ) to refer to a cited work.
2151 However, in many scientific disciplines, other citation styles are in use.
2152 The most common one is the author-year style (e.
2153 \begin_inset space \thinspace{}
2157 \begin_inset space \space{}
2161 \begin_inset Quotes eld
2165 \begin_inset Quotes erd
2169 LyX supports two packages that provide this style,
2170 \begin_inset Flex CharStyle:Code
2173 \begin_layout Plain Layout
2180 \begin_inset Flex CharStyle:Code
2183 \begin_layout Plain Layout
2190 Both packages have their pros and cons, which cannot be listed in detail.
2191 If you only want to have simple author-year (or author-numerical) style,
2192 or if you want to use one of the countless style files for
2193 \begin_inset Flex CharStyle:Code
2196 \begin_layout Plain Layout
2202 , than the established
2203 \begin_inset Flex CharStyle:Code
2206 \begin_layout Plain Layout
2212 package is probably your choice.
2213 If you need special features like short title references, ibidem etc., you
2215 \begin_inset Flex CharStyle:Code
2218 \begin_layout Plain Layout
2227 \begin_layout Standard
2228 The handling of both packages in LyX is basically the same.
2230 \begin_inset Flex CharStyle:MenuItem
2233 \begin_layout Plain Layout
2234 Document\SpecialChar \menuseparator
2241 \begin_inset Flex CharStyle:MenuItem
2244 \begin_layout Plain Layout
2251 \begin_inset Flex CharStyle:MenuItem
2254 \begin_layout Plain Layout
2261 \begin_inset Flex CharStyle:MenuItem
2264 \begin_layout Plain Layout
2271 With both packages, you will get some extra features in the citation dialog
2272 and you can select the style of the reference (
2273 \begin_inset Quotes eld
2277 \begin_inset Quotes erd
2281 \begin_inset Quotes eld
2285 \begin_inset Quotes erd
2289 \begin_inset Quotes eld
2293 \begin_inset Quotes erd
2297 \begin_inset Quotes eld
2301 \begin_inset Quotes erd
2305 Note that both packages need specifically designed style files.
2306 They both ship their own, but there are lots of additional style files,
2307 and there is even an interactive style file builder
2311 \begin_layout Plain Layout
2313 \begin_inset Flex URL
2316 \begin_layout Plain Layout
2318 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2329 \begin_inset Flex CharStyle:Code
2332 \begin_layout Plain Layout
2341 \begin_layout Subsection
2342 Sectioned Bibliographies
2345 \begin_layout Standard
2346 Sometimes you might need to divide your bibliography into several sections.
2347 If you are for instance a historian, the possibility to separate sources
2348 and scientific works is most likely a
2349 \begin_inset Quotes eld
2353 \begin_inset Quotes erd
2357 Unfortunately, BibTeX itself does not allow you to do this.
2358 But with the help of some LaTeX packages, BibTeX can be extended to fit
2362 \begin_layout Standard
2363 LyX provides native support for one of these packages,
2371 \begin_layout Plain Layout
2373 \begin_inset Flex URL
2376 \begin_layout Plain Layout
2378 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2388 The advantage of this package (compared to other packages like
2392 ) is that you don't need to define new citation commands.
2393 Instead, you need to prepare different bibliographic databases which include
2394 the entries for the different sections of the bibliography.
2395 For example: If you want to divide your bibliography into the sections
2397 \begin_inset Quotes eld
2401 \begin_inset Quotes erd
2405 \begin_inset Quotes eld
2409 \begin_inset Quotes erd
2412 , you first need to create two bibliographic databases, e.
2413 \begin_inset space \thinspace{}
2417 \begin_inset space \space{}
2421 \begin_inset Flex CharStyle:Code
2424 \begin_layout Plain Layout
2431 \begin_inset Flex CharStyle:Code
2434 \begin_layout Plain Layout
2444 \begin_layout Standard
2446 \begin_inset Flex CharStyle:MenuItem
2449 \begin_layout Plain Layout
2450 Document\SpecialChar \menuseparator
2457 \begin_inset Flex CharStyle:MenuItem
2460 \begin_layout Plain Layout
2467 \begin_inset Flex CharStyle:MenuItem
2470 \begin_layout Plain Layout
2471 Sectioned bibliography
2477 Now you can insert multiple BibTeX bibliographies, one for each section
2478 of your bibliography.
2479 Returning to our example: Insert the BibTeX bibliography
2480 \begin_inset Flex CharStyle:Code
2483 \begin_layout Plain Layout
2489 and a second one for the database
2490 \begin_inset Flex CharStyle:Code
2493 \begin_layout Plain Layout
2500 You are free to use the same or different styles for each section.
2501 Additionally, you can chose if the bibliography section should contain
2503 \begin_inset Quotes eld
2506 all cited references
2507 \begin_inset Quotes erd
2510 of the specified database(s) (which is the default),
2511 \begin_inset Quotes eld
2514 all uncited references
2515 \begin_inset Quotes erd
2519 \begin_inset Quotes eld
2523 \begin_inset Quotes erd
2527 This might be useful if you would like to separate your bibliography into
2529 \begin_inset Quotes eld
2533 \begin_inset Quotes erd
2537 \begin_inset Quotes eld
2541 \begin_inset Quotes erd
2545 \begin_inset Quotes eld
2549 \begin_inset Quotes erd
2553 The titles for the sections can be added as ordinary sections or subsections.
2555 \begin_inset Flex CharStyle:Code
2558 \begin_layout Plain Layout
2564 removes the bibliography title, you have manually re-add that, too (as
2565 a chapter* or section*, for instance).
2568 \begin_layout Subsection
2569 Multiple Bibliographies
2572 \begin_layout Standard
2573 Multiple bibliographies, e.
2574 \begin_inset space \thinspace{}
2578 \begin_inset space \space{}
2581 a bibliography for each section or chapter of the document, are not supported
2584 \begin_inset Flex CharStyle:Code
2587 \begin_layout Plain Layout
2593 package, which is used for the creation of sectioned bibliographies in
2594 LyX (see the previous section), provides an easy way to solve this task,
2595 if you are willing to use some
2596 \begin_inset Flex CharStyle:MenuItem
2599 \begin_layout Plain Layout
2606 \begin_inset space ~
2610 \begin_inset CommandInset ref
2612 reference "sec:Inserting-TeX-Code"
2620 \begin_layout Plain Layout
2621 An alternative approach is to use the
2622 \begin_inset Flex CharStyle:Code
2625 \begin_layout Plain Layout
2632 \begin_inset Flex CharStyle:Code
2635 \begin_layout Plain Layout
2641 package, respectively.
2649 \begin_layout Standard
2651 \begin_inset Flex CharStyle:MenuItem
2654 \begin_layout Plain Layout
2655 Document\SpecialChar \menuseparator
2662 \begin_inset Flex CharStyle:MenuItem
2665 \begin_layout Plain Layout
2672 \begin_inset Flex CharStyle:MenuItem
2675 \begin_layout Plain Layout
2676 Sectioned bibliography
2682 In the document, you have to enclose the sections, which shall contain
2683 their own bibliography (including the BibTeX bibliography itself), between
2685 \begin_inset Flex CharStyle:Code
2688 \begin_layout Plain Layout
2697 \begin_inset Flex CharStyle:Code
2700 \begin_layout Plain Layout
2708 (those commands have to be inserted as TeX code).
2709 The bibliography will contain all references which have been cited in the
2711 \begin_inset Flex CharStyle:Code
2714 \begin_layout Plain Layout
2725 If you are using this approach, then every citation reference has to be
2727 \begin_inset Flex CharStyle:Code
2730 \begin_layout Plain Layout
2738 \begin_inset Flex CharStyle:Code
2741 \begin_layout Plain Layout
2750 \begin_layout Section
2754 \begin_layout Subsection
2758 \begin_layout Standard
2759 When you are working on a large file with many sections, it is often convenient
2760 to break up the document into several files, or perhaps you have something
2761 where a table may change from time to time, but the preceding text does
2763 In these cases, you should seriously consider using multipart documents.
2764 For example, scientific papers often have five major sections: the introduction
2765 , observations, results, discussion, and conclusion.
2766 Each of these could be its own separate LyX file, with one
2767 \begin_inset Quotes eld
2771 \begin_inset Quotes erd
2774 file which contains the title, authors, abstract, references, etc., plus
2775 the five included files.
2776 It is important to note that each of these files is a full LyX file which
2777 can be formatted and printed on its own, as well as included in a master
2779 Each of these files must have the same document class, however—don't attempt
2780 to mix book classes with article classes.
2781 You may also include LaTeX files; however, these files must not have their
2783 \begin_inset space \thinspace{}
2787 \begin_inset space \space{}
2790 everything up to and including the
2791 \begin_inset Flex CharStyle:Code
2794 \begin_layout Plain Layout
2803 \begin_inset Flex CharStyle:Code
2806 \begin_layout Plain Layout
2814 line must be deleted) or else errors will be generated when you try to
2818 \begin_layout Standard
2819 LyX allows you to include files quite easily with
2820 \begin_inset Flex CharStyle:MenuItem
2823 \begin_layout Plain Layout
2824 Insert\SpecialChar \menuseparator
2826 \begin_inset space ~
2835 When you click on this selection a small box is inserted into the file
2836 at the current cursor location.
2837 Clicking on the box raises a dialog which allows you to select the file
2838 to be included, and the method of its inclusion.
2842 \begin_layout Standard
2843 The file selection box should by now be obvious.
2844 The three inclusion methods are
2845 \begin_inset Quotes eld
2849 \begin_inset Quotes erd
2853 \begin_inset Quotes eld
2857 \begin_inset Quotes erd
2861 \begin_inset Quotes eld
2865 \begin_inset Quotes erd
2869 The difference between
2870 \begin_inset Quotes eld
2874 \begin_inset Quotes erd
2878 \begin_inset Quotes eld
2882 \begin_inset Quotes erd
2885 is really only meaningful to LaTeXperts, but the practical difference is
2886 that files which are
2887 \begin_inset Quotes eld
2891 \begin_inset Quotes erd
2894 are typeset beginning on a new page, while files which are
2895 \begin_inset Quotes eld
2899 \begin_inset Quotes erd
2902 are typeset starting on the current page.
2905 \begin_layout Standard
2906 Generally, the master file is converted into a full LaTeX file before typesettin
2907 g, while the included files are converted to LaTeX files which do not have
2908 all the preamble information.
2911 \begin_layout Standard
2913 \begin_inset Quotes eld
2917 \begin_inset Quotes erd
2920 included file allows you to include a file typeset exactly as it appears
2922 \begin_inset space \thinspace{}
2926 \begin_inset space \space{}
2930 \begin_inset Flex CharStyle:Code
2933 \begin_layout Plain Layout
2939 mode, with the characters set in a fixed-width typewriter font.
2940 Normally, spaces in this file are invisible, though two consecutive spaces
2941 are conserved, unlike LyX's normal treatment of spaces.
2942 However, setting the
2943 \begin_inset Flex CharStyle:MenuItem
2946 \begin_layout Plain Layout
2948 \begin_inset space ~
2952 \begin_inset space ~
2956 \begin_inset space ~
2964 checkbox typesets a mark to unambiguously define the presence of a space.
2968 \begin_layout Subsection
2969 Cross-References Between Files
2972 \begin_layout Standard
2973 \begin_inset Box Shadowbox
2982 height_special "totalheight"
2985 \begin_layout Plain Layout
2986 This section is somewhat out of date.
2987 Need to describe default master documents and how children are opened when
2997 \begin_layout Standard
2998 It is possible to set up cross-references between the different files.
2999 First, open all the files in question: let's call them A and B in a two
3000 file example, where B is included in A.
3001 Let's say you insert a label in A, then want to reference it in B.
3002 Open the cross-reference dialog in whilst in document B, and you can select
3004 \begin_inset Quotes eld
3008 \begin_inset Quotes erd
3014 \begin_layout Subsection
3015 Bibliography Lists in all Subdocuments
3018 \begin_layout Standard
3019 \begin_inset Box Frameless
3028 height_special "totalheight"
3031 \begin_layout Plain Layout
3032 This section also needs updating.
3033 There is now material about this on the wiki, and it could be copied here.
3041 \begin_layout Standard
3042 Copy the bibliography list with all entries to all subdocuments and transform
3044 This way LyX will find the
3045 \begin_inset Flex CharStyle:Code
3048 \begin_layout Plain Layout
3054 -files and you can easily insert references without making the bibliography
3058 \begin_layout Standard
3059 As the bibliography list is in a comment, LaTeX won't use use it and the
3060 references will look like this: [?], instead of like this: [1].
3061 One solution is to use the LaTeX-package
3062 \begin_inset Flex CharStyle:Code
3065 \begin_layout Plain Layout
3071 that will only include comments by processing the files separately.
3072 To do this, add in the LaTeX preamble of every subdocument the following:
3075 \begin_layout LyX-Code
3081 \begin_layout LyX-Code
3084 includecomment{comment}
3087 \begin_layout Standard
3089 \begin_inset Flex URL
3092 \begin_layout Plain Layout
3094 http://wiki.lyx.org/FAQ/Unsorted#toc31
3102 \begin_layout Section
3103 Fancy Headers and Footers
3106 \begin_layout Standard
3107 The default page layout is rather plain; for an
3108 \begin_inset Flex CharStyle:Code
3111 \begin_layout Plain Layout
3117 document class, all you get is a centered page number at the bottom of
3119 This document uses KOMA-script's book class, so it appears to be a bit
3121 But to really put on a show, you need to set the document page style to
3123 \begin_inset Quotes eld
3127 \begin_inset Quotes erd
3130 , as mentioned in the
3135 This section describes the LaTeX code you need to insert in your LaTeX
3136 preamble in order to get the desired effects.
3139 \begin_layout Standard
3140 For more information on fancy headers, see the
3141 \begin_inset Flex CharStyle:Code
3144 \begin_layout Plain Layout
3150 package documentation.
3152 \begin_inset Flex URL
3155 \begin_layout Plain Layout
3157 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3165 \begin_layout Standard
3166 The page header is divided into three fields, not surprisingly labeled
3167 \begin_inset Quotes eld
3171 \begin_inset Quotes erd
3175 \begin_inset Quotes eld
3179 \begin_inset Quotes erd
3183 \begin_inset Quotes eld
3187 \begin_inset Quotes erd
3191 The footer is also divided into these three fields.
3192 The LaTeX commands to set these fields in the simplest manner are
3193 \begin_inset Flex CharStyle:Code
3196 \begin_layout Plain Layout
3205 \begin_inset Flex CharStyle:Code
3208 \begin_layout Plain Layout
3217 \begin_inset Flex CharStyle:Code
3220 \begin_layout Plain Layout
3229 \begin_inset Flex CharStyle:Code
3232 \begin_layout Plain Layout
3241 Suppose you wish to put your name in the upper left hand corner of each
3243 Simply insert the following command in the preamble:
3246 \begin_layout Standard
3255 \begin_layout Standard
3256 You will now see your name in the upper left.
3257 If a field has a default entry that you would like to get rid of (often
3258 the page number appears in the central footer, simply include a command
3259 with a blank argument, e.
3260 \begin_inset space \thinspace{}
3266 \begin_layout Standard
3274 \begin_layout Standard
3275 Let's get really fancy: lets put the section number with the word
3276 \begin_inset Quotes eld
3280 \begin_inset Quotes erd
3284 \begin_inset space \thinspace{}
3288 \begin_inset space \space{}
3291 Section 3) in the upper left, the page number (e.
3292 \begin_inset space \thinspace{}
3296 \begin_inset space \space{}
3299 Page 4) in the upper right, your name in the lower left, and the date in
3301 The following commands should now appear in the preamble:
3304 \begin_layout Standard
3314 \begin_layout Standard
3322 \begin_layout Standard
3332 \begin_layout Standard
3341 \begin_layout Standard
3349 \begin_layout Standard
3359 \begin_layout Standard
3361 \begin_inset Flex CharStyle:Code
3364 \begin_layout Plain Layout
3373 \begin_inset Flex CharStyle:Code
3376 \begin_layout Plain Layout
3384 access LaTeX's section and page counters, and so print out the current
3385 section and page numbers.
3387 \begin_inset Flex CharStyle:Code
3390 \begin_layout Plain Layout
3398 simply prints out today's date.
3401 \begin_layout Standard
3402 The thicknesses of the horizontal rules drawn beneath the header and above
3403 the footer can also be modified.
3404 If you don't want one of the rules, set its thickness to 0.
3405 The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3411 \begin_inset Flex CharStyle:Code
3414 \begin_layout Plain Layout
3419 headrulewidth}{0.4pt}
3425 \begin_inset Flex CharStyle:Code
3428 \begin_layout Plain Layout
3433 footrulewidth}{0.4pt}
3438 to set the thicknesses.
3441 \begin_layout Standard
3442 You can switch the header/footer settings on and off for individual pages
3444 \begin_inset Flex CharStyle:Code
3447 \begin_layout Plain Layout
3450 thispagestyle{empty}
3456 \begin_inset Flex CharStyle:Code
3459 \begin_layout Plain Layout
3462 thispagestyle{plain}
3468 \begin_inset Flex CharStyle:Code
3471 \begin_layout Plain Layout
3474 thispagestyle{fancy}
3480 Simply insert them in the text on the page you want changed and mark them
3482 In fact, title pages are marked as plain by default, while following pages
3483 are marked fancy when using the global fancy setting.
3486 \begin_layout Standard
3487 As a final example, it is possible to include an image in the header or
3489 Suppose you want to put a company logo in the upper lefthand corner.
3490 You might try something like
3493 \begin_layout Standard
3502 includegraphics{logo.eps}}}
3505 \begin_layout Standard
3507 (you may need to preface this with
3508 \begin_inset Flex CharStyle:Code
3511 \begin_layout Plain Layout
3515 usepackage{graphics}
3520 if you don't include graphics elsewhere in your document).
3523 \begin_layout Section
3524 Itemize Bullet Selection
3525 \begin_inset CommandInset label
3534 \begin_layout Standard
3540 \begin_layout Subsection
3544 \begin_layout Standard
3545 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3546 Using this dialog you can easily specify what bullet shape to use at each
3547 level of an itemized list.
3548 These settings are document-wide so you won't be able to specify different
3549 sets of bullets for different paragraphs.
3553 \begin_layout Plain Layout
3554 Well, actually you can but you'll have to do it by hand.
3562 \begin_layout Subsection
3566 \begin_layout Standard
3567 Open the dialog by selecting the
3568 \begin_inset Flex CharStyle:MenuItem
3571 \begin_layout Plain Layout
3572 Document\SpecialChar \menuseparator
3578 menu item and then select the
3579 \begin_inset Flex CharStyle:MenuItem
3582 \begin_layout Plain Layout
3591 \begin_layout Standard
3592 The dialog provides you with a table of bullet shapes.
3593 A column of buttons on the left of the table provides access to the six
3594 different panels of bullet shapes.
3595 The row of buttons across the top is used to select which bullet depth
3597 A text entry under the table shows the currently selected bullet shape's
3598 LaTeX equivalent and this can be edited if desired.
3599 If you do modify the text you will also need to specify any needed packages
3600 in the LaTeX preamble.
3603 \begin_layout Standard
3604 The six panels are divided up by the packages they require.
3605 The following table shows the mappings from button name to LaTeX packages.
3608 \begin_layout Standard
3610 \begin_inset Tabular
3611 <lyxtabular version="3" rows="7" columns="2">
3612 <features tabularvalignment="middle">
3613 <column alignment="center" valignment="top" width="0pt">
3614 <column alignment="center" valignment="top" width="0pt">
3616 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3619 \begin_layout Plain Layout
3634 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3637 \begin_layout Plain Layout
3654 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3657 \begin_layout Plain Layout
3672 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3675 \begin_layout Plain Layout
3691 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3694 \begin_layout Plain Layout
3709 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3712 \begin_layout Plain Layout
3729 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3732 \begin_layout Plain Layout
3747 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3750 \begin_layout Plain Layout
3767 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3770 \begin_layout Plain Layout
3785 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3788 \begin_layout Plain Layout
3805 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3808 \begin_layout Plain Layout
3823 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3826 \begin_layout Plain Layout
3843 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3846 \begin_layout Plain Layout
3861 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3864 \begin_layout Plain Layout
3887 \begin_layout Standard
3888 LyX doesn't stop you using bullets from packages you don't have.
3889 If you get errors from LaTeX when you try to view or print the file, then
3890 it is likely you are missing a package.
3894 \begin_layout Plain Layout
3895 LyX doesn't restrict your use since you may be editing locally and exporting
3904 \begin_layout Subsection
3908 \begin_layout Standard
3909 Select which bullet depth you want to change then select the bullet shape
3911 Any changes will not be visible in LyX, but are visible when viewing the
3915 \begin_layout Standard
3916 You can reset a bullet shape to the default simply by clicking your right
3917 mouse button on the appropriate bullet depth button.
3921 \begin_layout Plain Layout
3926 want to have multiple sets of paragraphs with different sets of bullets
3927 in each, then you're going to have to get your hands dirty with TeX code.
3928 The bullet selection dialog can help though because it provides you with
3929 the LaTeX code for a wide range of bullet shapes.
3930 To make your own custom paragraphs you have the following options:
3933 \begin_layout Plain Layout
3937 \begin_layout Plain Layout
3953 \begin_layout Plain Layout
3957 \begin_layout Plain Layout
3979 \begin_layout Itemize
3980 Use the LaTeX command
3981 \begin_inset Flex CharStyle:Code
3984 \begin_layout Plain Layout
3992 to specify a new bullet shape for a given depth.
3993 You'll also need to save the current bullet shape so you can restore it
3995 In this itemized list the following LaTeX code was used to change the bullet
3996 used for the first depth.
4000 \begin_layout LyX-Code
4010 \begin_layout LyX-Code
4027 \begin_layout Itemize
4028 Note that the itemize depth is specified in Roman numerals as part of the
4038 \begin_layout Itemize
4042 \begin_layout Plain Layout
4055 Specify each individual entry by starting each item with the bullet shape
4056 enclosed in square brackets and set as
4057 \begin_inset Flex CharStyle:MenuItem
4060 \begin_layout Plain Layout
4067 For example, this item was started with
4068 \begin_inset Flex CharStyle:Code
4071 \begin_layout Plain Layout
4086 \begin_layout Plain Layout
4090 \begin_layout Plain Layout
4106 \begin_layout Plain Layout
4107 You'll also need to revert the labelitem back to its previous setting for
4108 the global bullet shape settings to remain in effect.
4109 The way used here was:
4112 \begin_layout LyX-Code
4127 \begin_layout Chapter
4128 LyX and the World Wide Web
4131 \begin_layout Standard
4132 LyX has long supported the export of documents to various web-friendly formats,
4134 Before verson 1.7, however, HTML export was always accomplished by the use
4135 of external converters.
4139 \begin_layout Plain Layout
4140 For details on the use of external converters with LyX, see the
4145 section of the Customization manual.
4150 These fall into two large groups: there are converters that use LaTeX as
4151 an intermediate format, such as
4152 \begin_inset Flex CharStyle:Code
4155 \begin_layout Plain Layout
4162 \begin_inset Flex CharStyle:Code
4165 \begin_layout Plain Layout
4172 \begin_inset Flex CharStyle:Code
4175 \begin_layout Plain Layout
4181 , relying upon LyX to produce the LaTeX; and there is a converter that works
4182 directly on LyX files,
4183 \begin_inset Flex CharStyle:Code
4186 \begin_layout Plain Layout
4193 All of these have different advantages and disadvantages.
4197 \begin_layout Standard
4198 The LaTeX-based converters have the advantage that, in principle, they know
4199 everything about the exported document that LaTeX does.
4200 Such converters do not care, for example, if a certain block of code was
4201 produced by LyX or was Evil Red Text.
4203 \begin_inset Flex CharStyle:Code
4206 \begin_layout Plain Layout
4212 files, counters, and references, and can often make use of the
4213 \begin_inset Flex CharStyle:Code
4216 \begin_layout Plain Layout
4222 files generated by BibTeX.
4223 On the other hand, LaTeX is a very hard language to parse---it is sometimes
4224 said that only TeX itself understands TeX---and LaTeX-based converters
4225 will often choke on what seem to be quite simple constructs; complex ones
4226 can throw them completely, and as of this writing, for example, the
4230 manual will not export with
4231 \begin_inset Flex CharStyle:Code
4234 \begin_layout Plain Layout
4240 , though the others will.
4241 The other issue concerns how math is handled.
4242 These converters typically convert the formulae into little pictures that
4243 are then linked from the HTML document.
4244 Since these are actually generated by LaTeX, they are accurate.
4245 But they do not scale well, and just getting them to look as if they are
4246 actually meant to be in your document---so that the font sizes seem to
4247 be roughly the same---can be a challenge.
4250 \begin_layout Standard
4252 \begin_inset Flex CharStyle:Code
4255 \begin_layout Plain Layout
4261 solves some of these problems.
4262 In particular, its rendering of math tends to look better than
4263 \begin_inset Flex CharStyle:Code
4266 \begin_layout Plain Layout
4272 's, at least in simpler cases, since it renders math using a neat combination
4273 of HTML and CSS rather than converting the formulae to images.
4274 But more complex formula tend to be rendered less well than with
4275 \begin_inset Flex CharStyle:Code
4278 \begin_layout Plain Layout
4284 , since there is no reasonable way of scaling parentheses in HTML, for example.
4285 More importantly (as of version 0.39, at least),
4286 \begin_inset Flex CharStyle:Code
4289 \begin_layout Plain Layout
4295 has no support for math macros, for user-defined paragraph or character
4296 styles, or for tables of contents and figures.
4297 These limitations make
4298 \begin_inset Flex CharStyle:Code
4301 \begin_layout Plain Layout
4307 unsuitable for many of the documents more advanced LyX users would produce.
4308 In principle, of course, all of these problems could be solved, but the
4309 LyX developers have decided to follow a different path and made LyX itself
4310 capable of writing XHTML, just as it is capable of writing LaTeX, DocBook,
4314 \begin_layout Standard
4315 As of this writing, XHTML output remains under development and should probably
4317 \begin_inset Quotes eld
4321 \begin_inset Quotes erd
4328 \begin_layout Plain Layout
4330 \begin_inset Flex CharStyle:Code
4333 \begin_layout Plain Layout
4334 development/HTML.notes
4339 , which can be found in the LyX source tree or
4340 \begin_inset CommandInset href
4342 name "accessed online"
4343 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4347 , usually contains up-to-date information about the state of XHTML output.
4352 Still, the developers have chosen this approach because it has several
4353 potential advantages over the other two.
4356 \begin_layout Standard
4357 These advantages are primarily due to the fact that the XHTML output routines,
4358 since they are part of LyX, know everything LyX knows about the document
4363 \begin_layout Plain Layout
4364 Another advantege is that, since these routines are internal to LyX, they
4365 are immune to changes in LyX's file format, or to changes in the semantics
4371 So they know about the table of contents (as displayed in the Outline),
4372 about the counters associated with different paragraph styles, and about
4373 user-defined styles.
4374 The XHTML output routines know what LyX knows about internationalization,
4375 too, so they will output
4376 \begin_inset Quotes eld
4380 \begin_inset Quotes erd
4384 \begin_inset Quotes eld
4392 \begin_inset Quotes erd
4395 , depending upon the language in effect at the time.
4399 \begin_layout Standard
4400 Quite generally, the output routines know everything LyX knows about document
4401 layout, that is, about the document is to be rendered on screen.
4402 We can use this information when we output the document as XHTML.
4407 generates CSS style information corresponding to the layout information
4408 it uses to render the document on screen: if section headings are supposed
4409 to be sans-serif and bold as seen in LyX, then (by default) they will be
4410 sans-serif and bold when viewed in a web browser, too.
4411 And this is true not just for pre-defined styles, like Section, but for
4412 any style, including user-defined styles.
4413 Indeed, the XHTML output routines make no distinction between user-defined
4414 paragraph and character styles and LyX's own pre-defined styles: in each
4415 case, everything LyX knows about the styles is contained in the layout
4417 And much the same is true as regards pre-defined textual insets, such as
4418 footnotes, and custom versions.
4422 \begin_layout Standard
4423 The result is that XHTML output can be customized and extended in
4427 the same way LaTeX output can be customized and extended: through layout
4429 See chapter five of the
4433 manual for the details.
4436 \begin_layout Standard
4437 As for math, LyX renders math using MathML.
4438 This has advantages and disadvantages.
4439 The advantage is that MathML is a dialect of XML designed specifically
4440 for mathematics on the web, and it typically renders very well in browsers
4442 The first disadvantage is that not all browsers support MathML, and support
4443 is not complete even in the Gecko-based browsers, such as Firefox.
4444 A second disadvantage, as compared to rendering math by images, is that
4445 LyX can only output MathML for LaTeX constructs that it knows about, which
4446 means that the use of ERT in math---e.g., the command
4447 \begin_inset Flex CharStyle:Code
4450 \begin_layout Plain Layout
4459 \begin_inset Flex CharStyle:Code
4462 \begin_layout Plain Layout
4468 package---will produce nothing helpful.
4469 Eventually, therefore, LyX will offer the user the option to use MathML
4470 or images, and it will offer this choice on a case by case basis.
4473 \begin_layout Standard
4474 The remainder of this chapter contains more detailed information on XHTML
4475 output, its limitations, and ways around those limitations.
4478 \begin_layout Standard
4479 \begin_inset Note Note
4482 \begin_layout Plain Layout
4483 This is very incomplete at this point!
4491 \begin_layout Section
4492 Bibliography and Citations
4495 \begin_layout Standard
4496 XHTML output fully supports bibliographies and citations.
4500 \begin_layout Standard
4501 Citation labels are generated by exactly the same machinery that generates
4502 LyX's on-screen labels, so the labels will look in the output much as they
4503 do in LyX, though better.
4504 If you are using numerical citations, then LyX will output numerical labels,
4505 such as [1] or [17], rather than simply showing the citation key in square
4506 brackets, as it does on-screen.
4507 If you are using author-year citations, then LyX will add lowercase letters
4508 to the years, just as BibTeX does, if it finds more than one citation for
4509 a given author-year combination.
4510 The labels will be printed with the bibliography entries.
4511 Note that there is, at present, no way to customize the appearance of the
4512 labels, for example, to choose between square brackets and parentheses.
4515 \begin_layout Standard
4516 Bibliography output is handled by the same machinery that handles the presentati
4517 on of reference information in the citation dialog, so you will see in the
4518 XHTML output pretty much what you would see if you were to look at a given
4519 entry in the citation dialog.
4520 The formatting can be customized in your layout file or, preferably, in
4523 \begin_inset CommandInset ref
4525 reference "sub:Citation-format-description"
4533 manual for the details.
4536 \begin_layout Standard
4537 The other significant defect is that cross-referenced information is printed
4538 with every entry with which it is associated.
4539 So you can see things like this:
4544 \begin_inset Quotes eld
4547 Context and Logical Form
4548 \begin_inset Quotes erd
4553 Language in Context: Selected Essays
4555 (Oxford: Oxford University Press, 2007), pp.
4561 \begin_inset Quotes eld
4564 Semantics in Context
4565 \begin_inset Quotes erd
4570 Language in Context: Selected Essays
4572 (Oxford: Oxford University Press, 2007), pp.
4576 \begin_layout Standard
4577 This should be fixed before long.
4580 \begin_layout Standard
4581 There is no support at present for sectioned bibliographies.
4582 If you have multiple bibliographies, then LyX will print the same bibliography
4586 \begin_layout Section
4590 \begin_layout Standard
4591 LyX will happily export indexes as XHTML, but with certain limitations at
4595 \begin_layout Standard
4596 Index export will be most reliable when you do not attempt to use the fancy
4597 constructs that are described in the section on indexes in the
4605 \begin_layout Plain Layout
4606 The main issue here is that LyX itself does not really handle these.
4607 It just lets you enter what you would have to enter in raw LaTeX.
4612 We'll describe how they are handled using the subsection headings from
4616 \begin_layout Itemize
4617 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
4618 these, but the entries must be separated by
4619 \begin_inset Quotes eld
4623 \begin_inset Quotes erd
4626 , that is, there must be spaces around the exclamation point.
4627 This is because it is otherwise too difficult to check for escaped exclamation
4628 points, ones in math, and so forth.
4631 \begin_layout Itemize
4632 Page Ranges: There is no support at all for page ranges, since these make
4633 no sense with XHMTL.
4634 Instead, you will just get two index entries, one at either end.
4637 \begin_layout Itemize
4638 Cross-referencing: There is no support for cross-referencing.
4639 If LyX finds an entry containing the
4640 \begin_inset Quotes eld
4643 |see\SpecialChar \ldots{}
4645 \begin_inset Quotes erd
4648 construct, it is just dropped, and the rest is treated as an ordinary index
4652 \begin_layout Itemize
4653 Index Entry Order: LyX does support attempts to fix the sorting order.
4654 It will take what is before the first `@' it finds and use that for sorting,
4655 taking what follows the first `@' to be the actual entry.
4656 At present, LyX does not check for escaped `@', so do not try to index
4660 \begin_layout Itemize
4661 Index Entry Layout: You can format entries by using the text style dialog,
4662 or by using any other method available within LyX itself.
4663 There is no support for constructs like:
4664 \begin_inset Quotes eld
4668 \begin_inset Quotes erd
4672 Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
4673 and everything that follows it.
4676 \begin_layout Itemize
4677 Multiple Indexes: There is no support for multiple indexes.
4678 Rather, all index entries will be printed as one large index.
4679 To avoid our printing several versions of the index, we print only the
4680 main index, so make sure you have one.
4683 \begin_layout Section
4684 Nomenclature and Glossary
4687 \begin_layout Standard
4688 There is at present no support for glossaries.
4691 \begin_layout Chapter
4695 \begin_layout Section
4699 \begin_layout Standard
4700 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
4701 and retrieve information about the LyX internal state.
4702 This is only intended for advanced users, but they should find it useful.
4703 It is by writing to the LyX server, for example, that bibliography managers,
4704 such as JabRef, are able to
4705 \begin_inset Quotes eld
4709 \begin_inset Quotes erd
4715 \begin_layout Section
4716 Starting the LyX Server
4719 \begin_layout Standard
4720 The LyX server works through the use of a pair of named pipes.
4721 These are usually located in
4722 \begin_inset Flex CharStyle:Code
4725 \begin_layout Plain Layout
4731 , (except on Windows, where
4735 named pipes are special objects located in
4736 \begin_inset Flex CharStyle:Code
4739 \begin_layout Plain Layout
4751 ) and have the names
4752 \begin_inset Quotes eld
4756 \begin_inset Flex CharStyle:Code
4759 \begin_layout Plain Layout
4766 \begin_inset Quotes erd
4770 \begin_inset Quotes eld
4774 \begin_inset Flex CharStyle:Code
4777 \begin_layout Plain Layout
4784 \begin_inset Quotes erd
4788 External programs write into
4789 \begin_inset Flex CharStyle:Code
4792 \begin_layout Plain Layout
4798 and read back data from
4799 \begin_inset Flex CharStyle:Code
4802 \begin_layout Plain Layout
4809 The stem of the pipe names can be defined in the
4810 \begin_inset Flex CharStyle:MenuItem
4813 \begin_layout Plain Layout
4814 Tools\SpecialChar \menuseparator
4821 \begin_inset Flex CharStyle:Code
4824 \begin_layout Plain Layout
4825 "/home/myhome/lyxpipe"
4831 \begin_inset Flex CharStyle:Code
4834 \begin_layout Plain Layout
4853 configure this manually in order for the server to start.
4856 \begin_layout Standard
4858 \begin_inset Flex CharStyle:Code
4861 \begin_layout Plain Layout
4868 \begin_inset Flex CharStyle:Code
4871 \begin_layout Plain Layout
4877 ' to create the pipes.
4878 If one of the pipes already exists, LyX will assume that another LyX process
4879 is already running and will not start the server.
4880 On POSIX (Unix like) systems, if for some other reason, an unused
4881 \begin_inset Quotes eld
4885 \begin_inset Quotes erd
4888 pipe is left in existence when LyX closes, then LyX will try to delete
4890 If this fails for some reason, you will need to delete the pipes manually
4891 and then restart LyX.
4892 On Windows, pipes are deleted by the OS on program termination or crash,
4894 \begin_inset Quotes eld
4898 \begin_inset Quotes erd
4901 pipes should not be possible.
4904 \begin_layout Standard
4905 To have several LyX processes with servers at the same time, you have to
4906 use different configurations, perhaps by using separate user directories,
4908 \begin_inset Flex CharStyle:Code
4911 \begin_layout Plain Layout
4917 file, for each process.
4920 \begin_layout Standard
4921 If you are developing a client program, you might find it useful to enable
4922 debugging information from the LyX server.
4923 Do this by starting LyX as
4924 \begin_inset Flex CharStyle:Code
4927 \begin_layout Plain Layout
4936 \begin_layout Standard
4937 You can find a complete example client written in C in the source distribution
4939 \begin_inset Flex CharStyle:Code
4942 \begin_layout Plain Layout
4943 development/lyxserver/server_monitor.c
4951 \begin_layout Standard
4952 Another useful tool is command-line based client you will find in
4953 \begin_inset Flex CharStyle:Code
4956 \begin_layout Plain Layout
4957 src/client/lyxclient
4965 \begin_layout Section
4966 Normal communication
4969 \begin_layout Standard
4970 To issue a LyX call, the client writes a line of ASCII text into the input
4972 This line has the following format:
4989 \begin_layout Description
4990 clientname is a name that the client can choose arbitrarily.
4991 Its only use is that LyX will echo it if it sends an answer—so a client
4992 can dispatch results from different requesters.
4995 \begin_layout Description
4996 function is the function you want LyX to perform.
4997 It is the same as the commands you'd use in the minibuffer.
5000 \begin_layout Description
5001 argument is an optional argument which is meaningful only to some functions
5003 \begin_inset Quotes eld
5007 \begin_inset Quotes erd
5010 LFUN will insert the argument as text at the cursor position).
5013 \begin_layout Standard
5014 The answer from LyX will arrive in the output pipe and be of the form
5031 \begin_layout Standard
5040 are just echoed from the command request, while
5044 is more or less useful information filled according to how the command
5045 execution worked out.
5046 Some commands, such as
5047 \begin_inset Quotes eld
5051 \begin_inset Quotes erd
5054 , will return information about the internal state of LyX, while other will
5055 return an empty data-response.
5056 This means that the command execution went fine.
5059 \begin_layout Standard
5060 In case of errors, the response from LyX will have this form
5077 \begin_layout Standard
5082 should contain an explanation of why the command failed.
5085 \begin_layout Standard
5089 \begin_layout LyX-Code
5090 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5091 \begin_inset Newline newline
5094 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5095 \begin_inset Newline newline
5098 read a <~/.lyxpipe.out
5099 \begin_inset Newline newline
5105 \begin_layout Section
5109 \begin_layout Standard
5110 LyX can notify clients of events going on asynchronously.
5111 Currently it will only do this if the user binds a key sequence with the
5113 \begin_inset Quotes eld
5117 \begin_inset Quotes erd
5121 The format of the string LyX sends is as follows:
5125 \begin_inset Flex CharStyle:Code
5128 \begin_layout Plain Layout
5139 \begin_layout Standard
5144 is the printed representation of the key sequence that was actually typed
5148 \begin_layout Standard
5149 This mechanism can be used to extend LyX's command set and implement macros.
5150 Bind some key sequence to
5151 \begin_inset Quotes eld
5155 \begin_inset Quotes erd
5159 Then start a client that listens on the output pipe, dispatches the command
5160 according to the sequence, and starts a function that may use LyX calls
5161 and LyX requests to issue a command or a series of commands to LyX.
5164 \begin_layout Section
5165 The simple LyX Server Protocol
5168 \begin_layout Standard
5169 LyX implements a simple protocol that can be used for session management.
5170 All messages are of the form
5183 \begin_layout Standard
5189 \begin_inset Quotes eld
5193 \begin_inset Quotes erd
5197 \begin_inset Quotes eld
5201 \begin_inset Quotes erd
5206 \begin_inset Quotes eld
5210 \begin_inset Quotes erd
5213 is received from a client, LyX will report back to inform the client that
5214 it's listening to it's messages, while
5215 \begin_inset Quotes eld
5219 \begin_inset Quotes erd
5222 sent from LyX will inform clients that LyX is closing.
5225 \begin_layout Section
5226 Reverse DVI/PDF search
5229 \begin_layout Standard
5230 Some DVI/PDF viewers
5234 \begin_layout Plain Layout
5235 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5236 Skim on Mac OSX and SumatraPDF on Windows.
5245 facility (also called
5250 This means that you can tell LyX to put the cursor to a specific line in
5251 the document by clicking at the respective position in the DVI/PDF output.
5252 To achieve this, the viewer must be able to communicate with LyX.
5253 This is done via the LyX server either by using the named pipe (
5257 ), or the UNIX domain socket (
5261 ) that LyX creates in its temporary directory (this is the way the
5262 \begin_inset Flex CharStyle:Code
5265 \begin_layout Plain Layout
5271 program communicates with LyX).
5272 In some cases, you need a helper script that mediates between the viewer
5273 and LyX, in others, the viewer can communicate with LyX directly.
5274 This depends on the selected viewer and on your operating system.
5275 The same applies to the way viewers need to be configured and the way the
5276 reverse search is actually performed.
5277 In what follows, we will thus describe how to setup reverse search for
5279 Before we turn to this, though, we will explain what needs to be done generally
5280 to enable reverse search in the DVI/PDF output.
5283 \begin_layout Subsection
5285 \change_inserted 1 1271453726
5286 \begin_inset CommandInset label
5288 name "sub:rev-search"
5294 Enabling reverse search
5297 \begin_layout Standard
5298 LaTeX provides several different methods for reverse search.
5299 Some are built-in in the
5300 \begin_inset Flex CharStyle:Code
5303 \begin_layout Plain Layout
5309 program, some are provided by external packages.
5310 Your choice depends on whether your LaTeX distribution already provides
5311 a given method (the built-in methods are rather new) and whether your viewer
5313 The available methods are described in the following.
5316 \begin_layout Subsubsection*
5317 Built-in DVI-search via src-specials (DVI only)
5320 \begin_layout Standard
5321 This method provides the DVI file with the necessary information for reverse
5323 It is available in LaTeX since quite some time (any somewhat recent LaTeX
5324 distribution should include it), and it works reliably.
5325 To enable it, change the
5326 \begin_inset Flex CharStyle:MenuItem
5329 \begin_layout Plain Layout
5334 \begin_layout Plain Layout
5347 \begin_inset Flex CharStyle:MenuItem
5350 \begin_layout Plain Layout
5355 \begin_layout Plain Layout
5362 eX (plain)->DraftDVI
5368 \begin_inset Flex CharStyle:MenuItem
5371 \begin_layout Plain Layout
5372 Preferences\SpecialChar \menuseparator
5373 File Handling\SpecialChar \menuseparator
5380 \begin_inset Flex CharStyle:Code
5383 \begin_layout Plain Layout
5384 latex -src-specials $$i
5390 If this doesn't work, check if your TeX engine needs different options
5391 (the syntax might differ in some distributions).
5394 \begin_layout Subsubsection*
5395 External Packages (PDFSync and scrltx)
5398 \begin_layout Standard
5407 provide reverse search facility for PDF output (via pdflatex) and DVI output,
5409 In order to enable it, load the packages in the LyX preamble:
5412 \begin_layout Itemize
5413 \begin_inset Flex CharStyle:Code
5416 \begin_layout Plain Layout
5424 for reverse PDF search,
5427 \begin_layout Itemize
5429 \begin_inset Flex CharStyle:Code
5432 \begin_layout Plain Layout
5435 usepackage[active]{srcltx}
5440 for reverse DVI search.
5443 \begin_layout Standard
5444 If you want to be able to perform both DVI and PDF reverse searches, you
5445 can also insert in the preamble the following lines
5448 \begin_layout LyX-Code
5452 \begin_inset Newline newline
5458 \begin_inset Newline newline
5464 \begin_inset Newline newline
5470 \begin_inset Newline newline
5475 usepackage[active]{srcltx}
5476 \begin_inset Newline newline
5484 \begin_layout Standard
5485 This way, you can preview the file as either DVI or PDF (pdflatex) and the
5486 right package will be used.
5489 \begin_layout Standard
5490 Note that PDFSync might affect the output layout of your document.
5491 It is therefore advised to disable PDFsync for final documents.
5494 \begin_layout Subsubsection*
5495 Built-in reverse search via SyncTeX (DVI and PDF)
5498 \begin_layout Standard
5500 \begin_inset Flex CharStyle:Code
5503 \begin_layout Plain Layout
5509 have built-in support for both PDF and DVI reverse search.
5514 facility is basically the result of the integration of the PDFSync package
5515 to the pdftex program and its merge with the
5520 You need at least TeXLive 2008 or a recent MikTeX distribution in order
5522 Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
5523 already provide SyncTeX support.
5526 \begin_layout Standard
5527 To enable SyncTeX for DVI output, change the
5528 \begin_inset Flex CharStyle:MenuItem
5531 \begin_layout Plain Layout
5536 \begin_layout Plain Layout
5549 \begin_inset Flex CharStyle:MenuItem
5552 \begin_layout Plain Layout
5557 \begin_layout Plain Layout
5564 eX (plain) -> DraftDVI
5570 \begin_inset Flex CharStyle:MenuItem
5573 \begin_layout Plain Layout
5574 Preferences\SpecialChar \menuseparator
5575 File Handling\SpecialChar \menuseparator
5582 \begin_inset Flex CharStyle:Code
5585 \begin_layout Plain Layout
5586 latex -synctex=1 $$i
5591 , and for PDF output, change the
5592 \begin_inset Flex CharStyle:MenuItem
5595 \begin_layout Plain Layout
5600 \begin_layout Plain Layout
5607 eX (pdflatex) -> PDF (pdflatex)
5613 \begin_inset Flex CharStyle:Code
5616 \begin_layout Plain Layout
5617 pdflatex -synctex=1 $$i
5623 Check the documentation of your viewer whether the viewer needs to be configure
5624 d for the use with SyncTeX.
5628 \begin_layout Plain Layout
5630 \begin_inset Flex CharStyle:Code
5633 \begin_layout Plain Layout
5639 option enables gzip compression.
5640 If your viewer does not support it, you should instead use
5641 \begin_inset Flex CharStyle:Code
5644 \begin_layout Plain Layout
5658 \begin_layout Subsection
5659 Configuring and using specific viewers
5662 \begin_layout Subsubsection*
5663 Xdvi (all platforms)
5666 \begin_layout Standard
5668 \begin_inset Flex CharStyle:Code
5671 \begin_layout Plain Layout
5677 , you don't need to do anything else for performing a reverse DVI search,
5678 as LyX already provides the necessary hooks for automatically using the
5680 \begin_inset Flex CharStyle:Code
5683 \begin_layout Plain Layout
5690 Just setup your document as described above (reverse search is triggered
5691 by Ctrl-click or Alt-click on Mac OSX, respectively).
5694 \begin_layout Standard
5695 However, if for whatever reason you want to use the named pipe instead of
5696 the socket for communicating with LyX, simply change the DVI viewer in
5698 \begin_inset Flex CharStyle:MenuItem
5701 \begin_layout Plain Layout
5702 Preferences\SpecialChar \menuseparator
5703 File Handling\SpecialChar \menuseparator
5713 \begin_layout Plain Layout
5714 On Mac OSX you have to use
5715 \begin_inset Flex CharStyle:Code
5718 \begin_layout Plain Layout
5719 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
5730 \begin_inset Flex CharStyle:Code
5733 \begin_layout Plain Layout
5734 xdvi -editor 'lyxeditor.sh %f %l'
5740 \begin_inset Flex CharStyle:Code
5743 \begin_layout Plain Layout
5749 is a suitable script.
5750 For example, a minimal shell script is the following one:
5753 \begin_layout LyX-Code
5755 \begin_inset Newline newline
5758 LYXPIPE="/path/to/lyxpipe"
5759 \begin_inset Newline newline
5762 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
5763 \begin_inset Newline newline
5766 echo "$COMMAND" > "${LYXPIPE}".in || exit
5767 \begin_inset Newline newline
5770 read < "${LYXPIPE}".out || exit
5773 \begin_layout Standard
5775 \begin_inset Flex CharStyle:Code
5778 \begin_layout Plain Layout
5788 \begin_layout Plain Layout
5795 XServer pipe path specified in
5796 \begin_inset Flex CharStyle:MenuItem
5799 \begin_layout Plain Layout
5800 Preferences\SpecialChar \menuseparator
5810 \begin_layout Plain Layout
5812 \begin_inset Flex CharStyle:Code
5815 \begin_layout Plain Layout
5821 folder of a source distribution you can find a
5822 \begin_inset Flex CharStyle:Code
5825 \begin_layout Plain Layout
5831 script which is able to locate the
5835 based on your preferences.
5843 \begin_layout Subsubsection*
5847 \begin_layout Standard
5849 \begin_inset Flex CharStyle:Code
5852 \begin_layout Plain Layout
5853 /Applications/MacDviX_Folder/calleditor.script
5858 , add the following lines:
5861 \begin_layout LyX-Code
5866 \begin_layout Plain Layout
5873 X.app/Contents/MacOS/lyxeditor "$2" $1
5874 \begin_inset Newline newline
5880 \begin_layout Standard
5881 Modify the lines accordingly if you install LyX somewhere else than in the
5882 Applications folder.
5885 \begin_layout Standard
5886 Reverse search is triggered by Alt-click (OPTION-click).
5889 \begin_layout Subsubsection*
5893 \begin_layout Standard
5895 \begin_inset Flex CharStyle:Code
5898 \begin_layout Plain Layout
5899 open -a Skim.app $$i
5904 to the viewer setting in
5905 \begin_inset Flex CharStyle:MenuItem
5908 \begin_layout Plain Layout
5909 Preferences\SpecialChar \menuseparator
5910 File Handling\SpecialChar \menuseparator
5911 File formats\SpecialChar \menuseparator
5918 \begin_inset Flex CharStyle:MenuItem
5921 \begin_layout Plain Layout
5922 Skim\SpecialChar \menuseparator
5923 Preferences\SpecialChar \menuseparator
5933 \begin_layout Plain Layout
5943 \begin_layout Standard
5944 Reverse search is triggered by COMMAND-SHIFT-click
5947 \begin_layout Subsubsection*
5951 \begin_layout Standard
5953 \begin_inset Flex CharStyle:MenuItem
5956 \begin_layout Plain Layout
5957 Settings\SpecialChar \menuseparator
5958 Configure Okular\SpecialChar \ldots{}
5959 \SpecialChar \menuseparator
5966 \begin_inset Quotes eld
5970 \begin_inset Quotes erd
5974 \begin_inset Flex CharStyle:Code
5977 \begin_layout Plain Layout
5986 \begin_layout Standard
5987 Reverse search is triggered by SHIFT-click.
5990 \begin_layout Subsubsection*
5994 \begin_layout Standard
5995 Launch yap, choose its
5996 \begin_inset Flex CharStyle:MenuItem
5999 \begin_layout Plain Layout
6000 View\SpecialChar \menuseparator
6007 \begin_inset Quotes eld
6011 \begin_inset Quotes erd
6016 \begin_inset Quotes eld
6019 New\SpecialChar \ldots{}
6021 \begin_inset Quotes erd
6024 button and, in the window that opens, enter
6025 \begin_inset Quotes eld
6029 \begin_inset Quotes erd
6032 (or any other name you like) in the
6033 \begin_inset Quotes eld
6037 \begin_inset Quotes erd
6041 Now click on the button labeled
6042 \begin_inset Quotes eld
6045 \SpecialChar \ldots{}
6047 \begin_inset Quotes erd
6050 to open a file dialog and navigate to the directory containing the batch
6052 \begin_inset Flex CharStyle:Code
6055 \begin_layout Plain Layout
6063 \begin_inset Flex CharStyle:Code
6066 \begin_layout Plain Layout
6072 and then specify the program arguments as
6073 \begin_inset Flex CharStyle:Code
6076 \begin_layout Plain Layout
6084 \begin_inset Flex CharStyle:Code
6087 \begin_layout Plain Layout
6093 wrapper is used for communicating with LyX through the
6100 \begin_layout LyX-Code
6102 \begin_inset Newline newline
6105 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
6114 \begin_inset Newline newline
6128 \begin_layout Standard
6129 Make sure that the LyXServer pipe path you specified in LyX is
6130 \begin_inset Flex CharStyle:Code
6133 \begin_layout Plain Layout
6147 , otherwise change the
6148 \begin_inset Flex CharStyle:Code
6151 \begin_layout Plain Layout
6157 wrapper accordingly.
6160 \begin_layout Standard
6161 In yap, reverse search is triggered by double-click.
6164 \begin_layout Subsubsection*
6165 SumatraPDF (Windows)
6168 \begin_layout Standard
6169 In order to use SumatraPDF for inverse search, enter
6170 \begin_inset Flex CharStyle:Code
6173 \begin_layout Plain Layout
6174 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6179 in the viewer setting in
6180 \begin_inset Flex CharStyle:MenuItem
6183 \begin_layout Plain Layout
6184 Preferences\SpecialChar \menuseparator
6185 File Handling\SpecialChar \menuseparator
6186 File formats\SpecialChar \menuseparator
6193 \begin_inset Flex CharStyle:Code
6196 \begin_layout Plain Layout
6202 is the previous wrapper.
6203 If SumatraPDF.exe is not in your command PATH, use its full file name.
6206 \begin_layout Standard
6207 Reverse search is triggered by double-click.
6210 \begin_layout Subsubsection*
6214 \begin_layout Standard
6215 First of all, make sure that yap is your default DVI viewer in the Windows
6216 environment, then launch it, choose its
6217 \begin_inset Flex CharStyle:MenuItem
6220 \begin_layout Plain Layout
6221 View\SpecialChar \menuseparator
6228 \begin_inset Quotes eld
6232 \begin_inset Quotes erd
6237 \begin_inset Quotes eld
6240 New\SpecialChar \ldots{}
6242 \begin_inset Quotes erd
6245 button and, in the window that opens, enter
6246 \begin_inset Quotes eld
6250 \begin_inset Quotes erd
6253 (or any other name you like) in the
6254 \begin_inset Quotes eld
6258 \begin_inset Quotes erd
6262 Now click on the button labeled
6263 \begin_inset Quotes eld
6266 \SpecialChar \ldots{}
6268 \begin_inset Quotes erd
6271 to open a file dialog and navigate to the directory containing the
6272 \begin_inset Flex CharStyle:Code
6275 \begin_layout Plain Layout
6281 program (which is installed by default on Cygwin along with the LyX executable).
6283 \begin_inset Flex CharStyle:Code
6286 \begin_layout Plain Layout
6292 and then specify the program arguments as
6293 \begin_inset Flex CharStyle:Code
6296 \begin_layout Plain Layout
6303 In this way, you will be using the
6307 for communicating with LyX.
6308 If, for whatever reason, you want to use the
6313 \begin_inset Flex CharStyle:Code
6316 \begin_layout Plain Layout
6322 option and be sure to specify the LyXServer pipe path in the LyX preferences.
6325 \begin_layout Standard
6326 In yap, reverse search is triggered by double-click.
6329 \begin_layout Subsubsection*
6333 \begin_layout Standard
6334 In order to use SumatraPDF for inverse search, enter
6335 \begin_inset Flex CharStyle:Code
6338 \begin_layout Plain Layout
6344 in the viewer setting in
6345 \begin_inset Flex CharStyle:MenuItem
6348 \begin_layout Plain Layout
6349 Preferences\SpecialChar \menuseparator
6350 File Handling\SpecialChar \menuseparator
6351 File formats\SpecialChar \menuseparator
6358 \begin_inset Flex CharStyle:Code
6361 \begin_layout Plain Layout
6367 is the following script (to be placed in your command PATH,
6368 \begin_inset Flex CharStyle:Code
6371 \begin_layout Plain Layout
6377 being the best choice):
6380 \begin_layout LyX-Code
6382 \begin_inset Newline newline
6386 \begin_inset Newline newline
6389 SumatraPDF -inverse-search "lyxeditor -g %f %l" $(basename $1)
6392 \begin_layout Standard
6393 This wrapper script is needed because SumatraPDF is a native Windows application
6394 and does not understand the posix paths used by the Cygwin version of LyX.
6395 If SumatraPDF.exe is not in your command PATH, use its full posix path in
6398 \begin_inset Flex CharStyle:Code
6401 \begin_layout Plain Layout
6407 enables communication via the
6413 \begin_inset Flex CharStyle:Code
6416 \begin_layout Plain Layout
6422 option if you want to use the
6426 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6429 \begin_layout Standard
6430 Reverse search is triggered by double-click.
6431 \change_inserted 1 1273345633
6435 \begin_layout Subsection
6437 \change_inserted 1 1273345657
6441 \begin_layout Standard
6443 \change_inserted 1 1273345723
6444 If you prepared reverse search environment and reverse search still does
6445 not work make sure your file does not contain spaces in its name.
6448 \begin_layout Section
6450 \change_inserted 1 1271453442
6454 \begin_layout Standard
6456 \change_inserted 1 1271454338
6457 To make forward search possible you need to provide generated output PDF/DVI
6458 file with additional information about TeX sources.
6459 This can be done via the methods described in the section
6460 \begin_inset CommandInset ref
6462 reference "sub:rev-search"
6469 \begin_layout Standard
6471 \change_inserted 1 1271454479
6472 Secondly you need to configure LyX for using your viewers in
6473 \begin_inset Flex CharStyle:MenuItem
6476 \begin_layout Plain Layout
6478 \change_inserted 1 1271453866
6479 Preferences\SpecialChar \menuseparator
6480 Output\SpecialChar \menuseparator
6487 Only some of the viewers allows this operation --- yap, xdvi, okular, Sumatra
6492 \begin_layout Plain Layout
6494 \change_inserted 1 1271454273
6495 For Sumatra CMCDDE is needed --- downloadable from http://www.istri.fr/zip/CMCDDE.z
6504 Some other viewers allow at least reloading and positioning to particular
6505 page of the file --- Evince or xpdf --- for these cases you can use external
6507 Please study the prepared examples in the Preferences dialog.
6512 \begin_layout Chapter
6513 Special Document Classes
6516 \begin_layout Section
6520 \begin_layout Standard
6526 \begin_layout Subsection
6530 \begin_layout Standard
6531 This section describes how LyX can be used to write articles for submission
6532 to the scientific journal
6534 Astronomy and Astrophysics
6536 (www.edpsciences.fr/aa/
6537 \begin_inset Flex URL
6540 \begin_layout Plain Layout
6542 http://www.edpsciences.fr/aa/
6547 ) using Version 5.01 of the document class
6552 This package can be downloaded from the ftp site
6555 \begin_layout Standard
6556 \begin_inset VSpace medskip
6562 \begin_layout Standard
6564 \begin_inset Flex URL
6567 \begin_layout Plain Layout
6569 ftp://ftp.edpsciences.org/pub/aa/readme.html
6577 \begin_layout Standard
6578 \begin_inset VSpace medskip
6584 \begin_layout Standard
6585 A manual comes together with that package, and this text is not meant to
6586 replace the original manual but merely a short guide how to realize the
6587 correct form of your paper.
6591 \begin_layout Standard
6592 Please note that the publisher of the journal was changed from Springer
6593 to EDP Sciences starting January 1, 2001.
6594 That change implicated also some slight changes of the style files, namely
6595 the removal of the thesaurus command.
6596 The LyX class aa supports the newest version of these style files, V 5.01.
6597 If you have an older version installed, please upgrade.
6598 For compatibility, the old (version 4) layout has been kept as
6603 Please refer to the comments in
6605 LyXDir/layouts/aapaper.layout
6610 \begin_layout Subsection
6614 \begin_layout Standard
6615 It is recommended you start from the example template distributed with LyX.
6616 If you are not using a template, note the following settings:
6619 \begin_layout Itemize
6626 Document\SpecialChar \menuseparator
6629 dialog (OK, that one was obvious).
6632 \begin_layout Itemize
6633 Don't change the option
6636 \begin_inset space ~
6646 The whole layout is done by the macros, you shouldn't change anything.
6649 \begin_layout Subsection
6653 \begin_layout Standard
6654 First thing to enter is the header information.
6655 It consists of seven entries, of which some are optional.
6659 \begin_layout Itemize
6667 \begin_layout Itemize
6675 \begin_layout Itemize
6683 \begin_layout Itemize
6691 \begin_layout Itemize
6696 : [optional] if more than one author: whom to contact for offprint requests.
6699 \begin_layout Itemize
6704 : [optional] mail address for contacts.
6707 \begin_layout Itemize
6715 Received: <date>; Accepted <date>
6718 \begin_layout Standard
6719 There is no need to issue the
6725 command, this is done automatically by LyX when the header is finished.
6726 Although the order of the single header entries doesn't matter it is advised
6727 to keep the above sequence, just to get the best optics and meets the layout
6728 of the real document.
6731 \begin_layout Standard
6732 If you want to place footnotes in the header block, e.
6733 \begin_inset space \thinspace{}
6737 \begin_inset space \space{}
6740 to state your present address, just use the standard footnote via the menu
6743 Insert\SpecialChar \menuseparator
6747 LyX will automagically use the term
6756 \begin_layout Standard
6757 In addition to these topics, the macros use three additional LaTeX commands
6758 that have no counterpart in LyX:
6761 \begin_layout Itemize
6768 to separate different names for more than one author and institute, respectivel
6772 \begin_layout Itemize
6779 to mark corresponding author/institute pairs.
6780 The institutes are numbered sequentially as they appear in the
6784 field, so you have to put a marker to each author.
6787 \begin_layout Itemize
6794 to supply an email address for fast contact.
6797 \begin_layout Standard
6798 In all cases, the appropriate command has to be entered in LyX and marked
6804 \begin_layout Subsection
6808 \begin_layout Standard
6809 The abstract should immediately follow the header block.
6810 With version 5 the abstract environment was changed to a command, and there
6811 is now a resctriction to only one paragraph.
6812 In addition, it should contain an entry with the keywords.
6813 This is not yet implemented for LyX, therefore you have to enter the LaTeX
6820 by hand and mark it as LaTeX code.
6821 Refer to the example paper.
6824 \begin_layout Subsection
6825 Supported environments
6828 \begin_layout Standard
6829 The A&A paper layout supports the following environments for structuring
6833 \begin_layout Itemize
6839 \begin_layout Itemize
6845 \begin_layout Itemize
6851 \begin_layout Itemize
6857 \begin_layout Itemize
6863 \begin_layout Itemize
6869 \begin_layout Itemize
6875 \begin_layout Itemize
6881 \begin_layout Itemize
6887 \begin_layout Itemize
6893 \begin_layout Itemize
6899 \begin_layout Itemize
6905 \begin_layout Subsection
6906 Commands not supported by LyX
6909 \begin_layout Standard
6910 Some commands are not yet supported by the
6915 Some have already been mentioned.
6916 For the sake of completeness, they are listed all together here:
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 Itemize
6975 \begin_layout Itemize
6983 \begin_layout Standard
6984 If you want to use any of these commands, you have to enter them yourself.
6987 Do not forget to mark them as LaTeX code!
6990 \begin_layout Subsection
6991 Figure and Table Floats
6994 \begin_layout Standard
6995 LyX provides support for the necessary float environments
6997 figure, figure*, table
7003 , therefore we won't tell much about it here.
7007 \begin_inset space ~
7013 Just remember that tables should be left-aligned.
7014 For that, select the table and change the alignment in
7016 Edit\SpecialChar \menuseparator
7018 \begin_inset space ~
7024 \begin_layout Standard
7025 There is only one special thing: the figures with caption besides the figure.
7026 To create such a figure, you have to do the following:
7029 \begin_layout Enumerate
7030 Create a wide figure float:
7032 Insert\SpecialChar \menuseparator
7033 Float\SpecialChar \menuseparator
7036 , then right click in the figure and select
7042 \begin_inset space ~
7050 \begin_layout Enumerate
7051 Enter your caption text.
7054 \begin_layout Enumerate
7059 to move the cursor above the caption.
7062 \begin_layout Enumerate
7066 \begin_layout Enumerate
7067 Position the cursor behind the figure and insert a horizontal fill:
7069 Insert\SpecialChar \menuseparator
7071 \begin_inset space ~
7074 Character\SpecialChar \menuseparator
7076 \begin_inset space ~
7084 \begin_layout Enumerate
7085 Switch to LaTeX mode:
7088 \begin_inset space ~
7096 \begin_layout Enumerate
7106 Do not close the brace!
7109 \begin_layout Enumerate
7110 Position the cursor behind the caption text, switch to LaTeX mode and insert
7114 \begin_inset space ~
7126 \begin_layout Standard
7127 Also, refer to the figures in the example paper.
7130 \begin_layout Subsection
7134 \begin_layout Standard
7135 For submission, the paper has to be formated in a special double-spacing
7137 For this purpose, you have to give the option
7141 to the documentclass.
7142 This must be done using the extra class options field in the
7144 Document\SpecialChar \menuseparator
7148 Just enter the string
7155 \begin_layout Subsection
7159 \begin_layout Standard
7164 directory contains an example paper written with LyX.
7165 It is the example paper from the original macro package, translated to
7167 Use it for inspiration, and compare the original LaTeX code with LyX way
7171 \begin_layout Section
7175 \begin_layout Standard
7181 \begin_layout Subsection
7185 \begin_layout Standard
7186 AASTeX is a set of macros produced by the American Astronomical Society
7187 to facilitate electronic manuscript submission to the three journals they
7188 publish: the Astrophysical Journal (including the Letters and Supplement),
7189 the Astronomical Journal, and the Publications of the Astronomical Society
7191 LyX has proven to be an excellent tool for generating these documents,
7192 especially given its equation, citation, and figure handling capabilities.
7193 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7194 is the version described here, or higher.
7195 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7196 incompatible with LyX.
7197 The AASTeX package may be downloaded from the AASTeX Web site
7200 \begin_layout Standard
7201 \begin_inset VSpace medskip
7207 \begin_layout Standard
7209 \begin_inset Flex URL
7212 \begin_layout Plain Layout
7214 http://www.journals.uchicago.edu/AAS/AASTeX
7222 \begin_layout Standard
7223 \begin_inset VSpace medskip
7229 \begin_layout Standard
7230 A complete user guide is contained in that package and you should familiarize
7231 yourself with it thoroughly before embarking on writing a paper in LyX.
7232 LyX will not reduce the need to figure out all the AASTeX commands, it
7233 will only reduce the drudgery of typing everything in.
7234 It is your responsibility to ensure that the final exported LaTeX document
7235 conforms completely to the requirements of the journal to which you are
7236 submitting your paper.
7239 \begin_layout Subsection
7240 Starting a New Paper
7243 \begin_layout Standard
7244 I strongly suggest that you start with the AASTeX template file.
7247 File\SpecialChar \menuseparator
7254 , enter the new file name, then choose the
7259 This will show the most common fields found in a manuscript.
7260 Simply overwrite the existing text (including the brackets,
7264 ) with the correct information.
7265 Many of the AASTeX commands and environments can be implemented directly
7266 in LyX, but some cannot: most noticeably
7278 , which should stick out like a sore thumb if you actually just opened the
7280 For commands such as these, the LaTeX code must be entered directly and
7282 Such commands are referred to as TeX code, or Evil Red Text.
7283 I tried to minimize the amount of TeX code needed in an AASTeX document,
7284 but there is still a bit more required than any of us would like.
7287 \begin_layout Subsection
7288 Finishing Your Paper
7291 \begin_layout Standard
7292 When the paper is finished to your satisfaction and previews/prints correctly,
7294 \begin_inset Quotes eld
7298 \begin_inset Quotes erd
7301 actions which need to be done before you submit it to the journals.
7305 \begin_layout Enumerate
7306 Export your paper as a LaTeX file (
7308 File\SpecialChar \menuseparator
7309 Export\SpecialChar \menuseparator
7316 \begin_layout Enumerate
7321 file with your favorite text editor
7325 \begin_layout Enumerate
7326 remove the comment lines before the
7335 \begin_layout Enumerate
7340 usepackage...{fontenc}
7342 line if it appears (usually just after
7357 \begin_layout Enumerate
7358 remove everything between (and including) the
7370 commands, except for any commands you specifically put into the LaTeX preamble
7371 (which should appear immediately after the
7372 \begin_inset Quotes eld
7375 User specified LaTeX commands
7376 \begin_inset Quotes erd
7387 \begin_layout Enumerate
7388 Run the resulting file through LaTeX to make sure it still processes correctly.
7391 \begin_layout Enumerate
7392 Reread the journal requirements to make sure your filenames and formats
7396 \begin_layout Enumerate
7400 \begin_layout Subsection
7401 Comments On Specific Commands
7404 \begin_layout Standard
7405 I will not describe the detailed usage of the individual AASTeX commands:
7406 the AASTeX User Guide (
7410 ) gives a good description of each.
7411 Thus it's probably easiest for me to go down the list as found in the guide
7412 and offer comments where necessary.
7413 So let's begin \SpecialChar \ldots{}
7417 \begin_layout Subsubsection
7418 Things that work as expected
7421 \begin_layout Standard
7425 \begin_layout Plain Layout
7437 \begin_layout Standard
7438 Because they work as you might expect, I simply list them and the section
7539 begin{thebibliography}
7547 (2.13.2), all the cite commands and their variations (2.13.2), the generic
7548 graphicx figure commands (2.14.1),
7572 (2.15.4, amongst other places),
7599 \begin_layout Standard
7600 The following style options also work correctly:
7621 Simply put them in the
7627 Layout\SpecialChar \menuseparator
7633 \begin_layout Standard
7637 \begin_layout Plain Layout
7649 \begin_layout Subsubsection
7650 Things that work, but require more comment
7653 \begin_layout Standard
7654 The following items work, but require a little more discussion:
7657 \begin_layout Itemize
7658 These items are reserved for use by the journal editors, but you can put
7659 them into the LaTeX preamble if you feel compelled to do so:
7692 \begin_layout Itemize
7693 These items may be placed in the LaTeX preamble, and are included as blanks
7694 in the template file:
7715 \begin_layout Itemize
7722 (2.3) – can only be used
7723 \begin_inset Quotes eld
7727 \begin_inset Quotes erd
7730 , not in the middle of a paragraph.
7731 Use TeX code if you need to embed it.
7734 \begin_layout Itemize
7741 (2.3) – will have extra {} after it.
7742 This should not cause an error.
7745 \begin_layout Itemize
7752 (2.6) – can only be used
7753 \begin_inset Quotes eld
7757 \begin_inset Quotes erd
7760 , not in the middle of a paragraph.
7761 Use TeX code if you need to embed it.
7764 \begin_layout Itemize
7771 (2.8) – can't insert a cross-reference tag, you must type the tag name by
7775 \begin_layout Itemize
7789 \begin_layout Itemize
7796 (2.9) – will have extra {} after it.
7797 This should not cause an error.
7800 \begin_layout Itemize
7807 (2.11) – will have extra {} after it.
7808 This should not cause an error.
7811 \begin_layout Itemize
7818 (2.14.2) – you can insert an optional filename argument by placing the cursor
7819 at the beginning of the text and selecting
7821 Insert\SpecialChar \menuseparator
7826 \begin_inset Quotes eld
7830 \begin_inset Quotes erd
7833 inserts an optional argument of the type needed by
7840 Hopefully it will be renamed someday.
7843 \begin_layout Itemize
7856 for the catalog ID optional parameter
7859 \begin_layout Itemize
7872 for the catalog ID optional parameter
7875 \begin_layout Subsubsection
7876 Things not implemented, use TeX code
7879 \begin_layout Standard
7883 \begin_layout Plain Layout
7895 \begin_layout Standard
7918 setcounter{equation}
7920 (2.12), Journal name abbreviations (2.13.4),
7956 (2.15.4, insert it as the first element in the lefthand cell after where
7958 Don't use any of LyX's rules in the table),
7970 (2.15.5), much of Misc (2.17, except
8021 \begin_layout Standard
8025 \begin_layout Plain Layout
8037 \begin_layout Subsubsection
8038 Things that cannot be implemented
8041 \begin_layout Standard
8042 \SpecialChar \ldots{}
8043 at least in any meaningful sort of way, so I suggest ignoring them.
8044 They are the references environment (2.13.3), and the deluxetable environment
8046 If you really, really need to use deluxetable, I suggest editing it in
8047 a separate file with a text editor, then using
8049 Insert\SpecialChar \menuseparator
8051 \begin_inset space ~
8056 to include it in your LyX document.
8061 file to see an example of this.
8064 \begin_layout Subsection
8065 FAQs, Tips, Tricks, and Other Ruminations
8068 \begin_layout Subsubsection
8069 Getting LyX and AASTeX to cooperate
8072 \begin_layout Standard
8073 It can be a bit tricky to get LyX to recognize a new layout and document
8075 When all else fails, do this:
8078 \begin_layout Enumerate
8079 Make certain that LaTeX can find AASTeX.
8080 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8081 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
8088 \begin_layout Enumerate
8100 \begin_layout Enumerate
8103 Tools\SpecialChar \menuseparator
8106 in LyX, then restart LyX.
8109 \begin_layout Enumerate
8110 Open a regular new file, not from a template.
8111 Does AASTeX appear in the class list in
8113 Document\SpecialChar \menuseparator
8119 \begin_layout Standard
8120 If you get a warning from an existing AASTeX document about not being able
8121 to find the AASTeX layout or a message about
8122 \begin_inset Quotes eld
8125 You should not mix title layouts with normal ones
8126 \begin_inset Quotes erd
8129 , things haven't been installed correctly.
8132 \begin_layout Subsubsection
8133 LaTeX error processing a table
8136 \begin_layout Standard
8137 LyX, by default, attempts to center the table caption/title.
8138 This seems to produce a bad interaction in AASTeX so you should click somewhere
8139 in the caption/title, then select
8141 Edit\SpecialChar \menuseparator
8143 \begin_inset space ~
8157 This took care of it for me.
8160 \begin_layout Subsubsection
8164 \begin_layout Standard
8165 A couple of things: 1) I have noticed some funny spacing in the reference
8166 entries in the text.
8167 When you enter the bibliography item data, make sure their is
8171 space between the last author and the parenthesis setting off the year;
8175 \begin_inset space \thinspace{}
8179 \begin_inset space \space{}
8193 2) Entering the references at all is not obvious.
8194 The easiest thing is to start typing your first reference at the end of
8195 the document, then mark it as type
8200 That will put a small gray box in front of what you just typed.
8201 Click on the box to fill in the rest of the information.
8202 For new references, go to the end of an existing reference and press return.
8203 That will create a new line with its own box, etc.
8206 \begin_layout Subsubsection
8210 \begin_layout Standard
8211 Even though AASTeX provides its own figure commands (
8217 , for example), I much prefer LaTeX's standard figure commands (with the
8226 \begin_inset space ~
8229 commands as TeX code into a Figure Float box if you desire, but I never
8230 have much luck getting the layout right.
8231 With the standard graphics, LyX will insert a
8235 usepackage{graphicx}
8237 command into the LaTeX preamble and handle the figures in the standard
8238 LaTeX2e way, interspersing the figures in the text.
8239 I believe ApJ accepts figures exactly this way now; AJ might still use
8241 \begin_inset Quotes eld
8244 stack everything at the end
8245 \begin_inset Quotes erd
8251 \begin_layout Subsubsection
8252 Things I could have done, but didn't
8255 \begin_layout Standard
8257 \begin_inset Quotes eld
8261 \begin_inset Quotes erd
8264 things I could have implemented, but chose not to.
8265 For instance, I saw no point in double-spacing the text in the LyX window,
8266 even though it is double-spaced in the paper manuscript.
8267 Also, I chose not to make separate layouts for the preprint and preprint2
8269 Since I assume you will spend most of your time in the plain manuscript
8270 mode anyway, I decided not to chew up more disk space with this.
8274 \begin_layout Subsection
8278 \begin_layout Standard
8279 Your mileage may vary.
8280 I've now had papers published by both ApJ and AJ that have had 98% of the
8281 effort done in LyX; the last 2% was the LaTeX post-processing and a few
8283 I have had no trouble with the submission process, and I'm sure the journals
8284 were never aware that there might be a difference.
8285 So, go forth and publish!
8288 \begin_layout Section
8292 \begin_layout Standard
8295 David Johnson; updated by Richard Heck
8298 \begin_layout Standard
8299 \begin_inset VSpace bigskip
8305 \begin_layout Standard
8307 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8308 papers to be submitted to American Mathematical Society publications.
8309 The layouts are not tailored to a specific journal, but easily can be.
8310 You should refer to the AMS documentation for specific instructions for
8311 each journal (usually it will entail only changing a single line in the
8313 That documentation is available on the Web at
8314 \begin_inset Flex URL
8317 \begin_layout Plain Layout
8325 \begin_inset Flex URL
8328 \begin_layout Plain Layout
8330 ftp://ftp.ams.org/pub/tex/amslatex/
8336 These layouts are appropriate, and useful, for any mathematical writing.
8340 \begin_layout Standard
8341 There are two basic AMS LaTeX layouts:
8344 \begin_layout Itemize
8345 amsart: The standard AMS article format.
8348 \begin_layout Itemize
8349 amsbook: the standard AMS book (really, monograph) format.
8353 \begin_layout Standard
8354 The layouts themselves contain only the minimum necessary to use the AMS
8356 They do not, in particular, contain any of the `theorem' environments used
8357 for setting theorems, lemmas, and the like.
8358 These are contained, instead, in the
8359 \begin_inset Flex CharStyle:Code
8362 \begin_layout Plain Layout
8368 module, which is loaded by default when when you select one of the AMS
8370 (It can also be used with other classes and can be removed, if you would
8371 rather use something else.) Less commonly used environments are in the
8372 \begin_inset Flex CharStyle:Code
8375 \begin_layout Plain Layout
8376 Theorems (AMS-Extended)
8381 module, which must be loaded manually.
8384 \begin_layout Standard
8385 By default, theorems and the like are numbered consecutively throughout
8386 the document, but this may be modified by loading the module
8387 \begin_inset Flex CharStyle:Code
8390 \begin_layout Plain Layout
8391 Theorems (Order by Section)
8396 or, if you are using
8397 \begin_inset Flex CharStyle:Code
8400 \begin_layout Plain Layout
8407 \begin_inset Flex CharStyle:Code
8410 \begin_layout Plain Layout
8411 Theorems (Order by Chapter)
8417 These will number the results as
8418 \begin_inset Formula $n.m$
8421 , where the first number refers to the section (or chapter) and the second
8422 refers to the total number of results so far in that section (or chapter).
8423 Many environments are also available unnumbered.
8424 These are indicated by an asterisk at the end.
8425 If you happen to want
8429 unnumbered results, the module
8430 \begin_inset Flex CharStyle:Code
8433 \begin_layout Plain Layout
8439 provides that option.
8442 \begin_layout Standard
8443 Note that these modules do not
8447 to be used with the AMS classes.
8448 It is perfectly possible to use the
8449 \begin_inset Flex CharStyle:Code
8452 \begin_layout Plain Layout
8458 module, and the others mentioned, with other classes, such as
8459 \begin_inset Flex CharStyle:Code
8462 \begin_layout Plain Layout
8469 \begin_inset Flex CharStyle:Code
8472 \begin_layout Plain Layout
8479 \begin_inset Flex CharStyle:Code
8482 \begin_layout Plain Layout
8491 \begin_layout Subsection
8492 What these layouts provide
8495 \begin_layout Standard
8496 There is a long list of included environments provided by these layouts.
8497 In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
8498 variety of `theorem' environments.
8499 However, the AMS recommends the environments that are available in LyX.
8503 \begin_layout Standard
8504 The following environments—as well as the standard environments, such as
8506 \begin_inset Flex CharStyle:Noun
8509 \begin_layout Plain Layout
8516 \begin_inset Flex CharStyle:Noun
8519 \begin_layout Plain Layout
8526 \begin_inset Flex CharStyle:Noun
8529 \begin_layout Plain Layout
8536 \begin_inset Flex CharStyle:Noun
8539 \begin_layout Plain Layout
8546 \begin_inset Flex CharStyle:Noun
8549 \begin_layout Plain Layout
8556 \begin_inset Flex CharStyle:Code
8559 \begin_layout Plain Layout
8566 \begin_inset Flex CharStyle:Code
8569 \begin_layout Plain Layout
8578 \begin_layout Description
8579 Address This should be the author's permanent address.
8582 \begin_layout Description
8584 \begin_inset space ~
8587 Address This should be the author's temporary address at the time of submission,
8588 if different from the Address.
8591 \begin_layout Description
8592 Email Author's e-mail address
8595 \begin_layout Description
8596 URL Author's Web address, if desired.
8599 \begin_layout Description
8600 Keywords Key words or phrases used to identify specific topics discussed
8604 \begin_layout Description
8605 Subjectclass These refer to the AMS Subject Classifications, published and
8608 Mathematical Reviews
8611 These are also available online at the AMS cites listed above.
8614 \begin_layout Description
8618 \begin_layout Description
8622 \begin_layout Description
8626 \begin_layout Standard
8627 The following environments are provided by both the
8628 \begin_inset Flex CharStyle:Code
8631 \begin_layout Plain Layout
8638 \begin_inset Flex CharStyle:Code
8641 \begin_layout Plain Layout
8647 modules, in the latter case in both starred (unnumbered) and unstarred
8648 (numbered) versions.
8649 These same environments are provided only in the starred versions by the
8651 \begin_inset Flex CharStyle:Code
8654 \begin_layout Plain Layout
8663 \begin_layout Theorem
8664 This is typically used for the statements of major results.
8668 \begin_layout Corollary*
8669 This is used for statements which follow fairly directly from previous statement
8671 Again, these can be major results.
8676 These are smaller results needed to prove other statements.
8679 \begin_layout Proposition
8680 These are less major results which (hopefully) add to the general theory
8684 \begin_layout Conjecture
8685 These are statements provided without justification, which the author does
8686 not know how to prove, but which seem to be true (to the author, at least).
8689 \begin_layout Definition*
8690 Guess what this is for.
8691 The font is different for this environment than for the previous ones.
8695 \begin_layout Example*
8696 Used for examples illustrating proven results.
8699 \begin_layout Problem
8700 It's not really known what this is for.
8701 You should figure it out.
8704 \begin_layout Exercise*
8705 Write a description for this one.
8708 \begin_layout Remark
8709 This environment is also a type of theorem, usually a lesser sort of observation.
8712 \begin_layout Claim*
8713 Often used in the course of giving a proof of a larger result.
8717 Generally, these are used to break up long arguments, using specific instances
8723 The numbering scheme for cases is on its own, not together with other numbered
8729 At the end of this environment, a QED symbol (usually a square, but it can
8730 vary with different styles) is placed.
8731 If you want to have other environments within this one—for example, Case
8732 environments—and have the QED symbol appear only after them, then the other
8733 environments need to be nested within the proof environment.
8736 Nesting Environments
8742 for information on nesting.
8745 \begin_layout Standard
8746 And these environments are provided by
8747 \begin_inset Flex CharStyle:Code
8750 \begin_layout Plain Layout
8751 Theorems (AMS-Extended)
8759 \begin_layout Criterion*
8760 A required condition.
8763 \begin_layout Algorithm*
8764 A general procedure to be used.
8767 \begin_layout Axiom*
8768 This is a property or statement taken as true within the system being discussed.
8771 \begin_layout Condition*
8772 Sometimes used to state a condition assumed within the present context of
8777 Similar to a Remark.
8780 \begin_layout Notation*
8781 Used for the explanation of, yes, notation.
8784 \begin_layout Summary
8785 Do we really need to tell you?
8788 \begin_layout Acknowledgement*
8792 \begin_layout Conclusion*
8793 Sometimes used at the end of a long train of argument.
8797 Used in a way similar to Proposition, though perhaps lower on the scale.
8800 \begin_layout Standard
8801 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
8803 They need to be available on your system in order to use these environments.
8806 \begin_layout Section
8814 \begin_layout Standard
8820 \begin_layout Subsection
8824 \begin_layout Standard
8825 These are the layout files for some of the journals of the American Geophysical
8827 It is assumed that you have both the AGU's own class files and AGUplus
8828 installed (everything to be found at
8829 \begin_inset Flex URL
8832 \begin_layout Plain Layout
8834 ftp://ftp.agu.org/journals/latex/journals
8842 \begin_layout Subsection
8846 \begin_layout Standard
8856 They are still called this in the LyX GUI, though their LaTeX equivalents
8857 in the AGU classes are
8868 \begin_layout Standard
8869 Newly defined styles are
8906 These are mostly manuscript attributes and defined in the AGU class documentati
8910 \begin_layout Standard
8911 I suspect this is still badly incomplete.
8914 \begin_layout Subsection
8918 \begin_layout Standard
8935 \begin_layout Subsection
8939 \begin_layout Itemize
8942 Journal of Geophysical Research
8951 \begin_layout Standard
8952 Add your own, it isn't so hard! Look at the
8963 \begin_layout Subsection
8964 Bugs and things to remember
8967 \begin_layout Standard
8968 In order to use the new layouts, you must remember to do the following for
8972 \begin_layout Enumerate
8978 This can be done in the
8980 Layout\SpecialChar \menuseparator
8985 Document\SpecialChar \menuseparator
8989 (AGU articles are always in English, right? So
8996 \begin_layout Enumerate
9006 (Yes, this is a bug.)
9009 \begin_layout Enumerate
9010 Make sure you use the
9014 bibliography style, by entering
9018 into the second field of the BibTeX inset.
9019 None of the standard styles will do.
9022 \begin_layout Section
9026 \begin_layout Standard
9032 \begin_layout Subsection
9036 \begin_layout Standard
9037 Broadway is for writing plays.
9038 The format is more decorative than Hollywood, and much less standardized.
9039 This format should be suitable for workshops.
9042 \begin_layout Subsection
9046 \begin_layout Standard
9047 The same as in Hollywood.
9050 \begin_layout Subsection
9054 \begin_layout Standard
9059 names as labels then cross-reference the label to insert the name.
9060 The cross-reference dialog will show the current cast of characters.
9063 \begin_layout Subsection
9064 Paper size and Margins
9067 \begin_layout Standard
9068 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9071 \begin_layout Subsection
9075 \begin_layout Standard
9076 The following environments are available.
9077 You can use broadway.bind to get the bind keys shown at the right.
9080 \begin_layout Itemize
9084 \begin_inset Newline newline
9089 You should not have to use this, but it is here for anything that does not
9093 \begin_layout Itemize
9097 \begin_inset space \hfill{}
9101 \begin_inset Newline newline
9106 Used to describe stage setting and the action.
9107 First use of speaker names in all CAPs.
9110 \begin_layout Itemize
9114 \begin_inset space \hfill{}
9118 \begin_inset Newline newline
9123 Automatically numbered.
9124 On screen it will be arabic, but will print as Roman.
9127 \begin_layout Itemize
9131 \begin_inset space \hfill{}
9135 \begin_inset Newline newline
9145 It is just centered text.
9148 \begin_layout Itemize
9152 \begin_inset space \hfill{}
9156 \begin_inset Newline newline
9161 Not automatically numbered.
9162 You supply the number.
9163 This is because I couldn't figure out how.
9166 \begin_layout Itemize
9170 \begin_inset space \hfill{}
9174 \begin_inset Newline newline
9179 A special case of Narrative to describe the setting and action as the curtain
9183 \begin_layout Itemize
9187 \begin_inset space \hfill{}
9191 \begin_inset Newline newline
9196 The speaker's (actor's) title, centered in all CAPS.
9199 \begin_layout Itemize
9203 \begin_inset space \hfill{}
9207 \begin_inset Newline newline
9212 Instructions to the speaker.
9213 The parentheses are automatically inserted.
9214 The ( will appear on screen, but both will be in the printed play.
9215 This environment is only used within
9222 \begin_layout Itemize
9226 \begin_inset space \hfill{}
9230 \begin_inset Newline newline
9235 What the Speaker says.
9238 \begin_layout Itemize
9242 \begin_inset space \hfill{}
9246 \begin_inset Newline newline
9251 The curtain comes down.
9254 \begin_layout Itemize
9258 \begin_inset space \hfill{}
9264 \begin_layout Itemize
9268 \begin_inset space \hfill{}
9274 \begin_layout Itemize
9278 \begin_inset space \hfill{}
9284 \begin_layout Standard
9288 \begin_layout Section
9292 \begin_layout Standard
9297 can be used to type letters according to German conventions.
9298 A template file is included in
9300 .../lyx/share/templates
9302 for you to use as a starting point.
9305 \begin_layout Section
9313 \begin_layout Standard
9319 \begin_layout Subsection
9323 \begin_layout Standard
9324 This is the layout file for the European Geophysical Society journals.
9329 can be downloaded from the web site of the EGS under
9330 \begin_inset Flex URL
9333 \begin_layout Plain Layout
9343 \begin_layout Subsection
9347 \begin_layout Standard
9350 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9358 The current layout file is unfortunately very unmodular and would benefit
9359 from using the various
9366 \begin_layout Section
9370 \begin_layout Standard
9376 \begin_layout Standard
9377 Elsevier Science Publishers B.V.
9378 provides a standard LaTeX document class (
9382 ) for submitting articles to their various journals.
9383 The style file can be downloaded directly from their web site:
9384 \begin_inset Flex URL
9387 \begin_layout Plain Layout
9389 http://authors.elsevier.com/
9395 Instructions are supplied along with the class file, which details the
9396 requirements of the publishers.
9397 LyX includes package that allows for the use of this class, by a layout
9398 and a template file.
9399 Installation of the class file is the same as for any other LaTeX package;
9400 instructions are provided in the Elsevier documentation.
9403 \begin_layout Standard
9413 As the Elsevier class file is based mainly on the standard article class,
9414 most of the normal functionality is provided.
9415 The Elsevier class defines a number of mathematical environments, which
9416 are similar to the AMS environments.
9417 These commands are all described in the Elsevier documentation, and are
9421 \begin_layout Standard
9422 The easiest way to use the Elsevier style is to base documents on the included
9424 It is best not to use options such as fancy headings or the geometry package,
9425 as elements such as these are defined by Elsevier in their style file.
9426 Ideally, no extra packages except those mentioned in the Elsevier documentation
9428 Essentially, Elsevier require as
9429 \begin_inset Quotes eld
9433 \begin_inset Quotes erd
9436 a LaTeX file as possible, as their intention is to take the supplied file
9437 and replace the class file with one for the particular journal to which
9438 the paper has been submitted.
9439 This also means that not too much time should be spent on the formating
9441 When it comes to be published, this will change anyway.
9442 The rest of the usage for this layout is substantially the same as for
9443 the normal article class.
9444 For details of what Elsevier do and don't allow, refer to their documentation.
9447 \begin_layout Section
9453 \begin_inset CommandInset label
9462 \begin_layout Standard
9468 \begin_layout Subsection
9472 \begin_layout Standard
9473 This section describes how to use LyX to make slides for overhead projectors.
9474 There are two document classes that can do this: the default slides class
9480 This section documents the latter.
9483 \begin_layout Standard
9484 I'm going to say this again, nice and clear, so that there's no misunderstanding
9488 \begin_layout Standard
9489 \begin_inset VSpace bigskip
9495 \begin_layout Standard
9499 This section documents the class
9500 \begin_inset Quotes eld
9508 \begin_inset Quotes erd
9516 \begin_layout Standard
9517 \begin_inset VSpace bigskip
9523 \begin_layout Standard
9524 If you're looking for the documentation for
9525 \begin_inset Quotes eld
9533 \begin_inset Quotes erd
9537 \begin_inset space ~
9541 \begin_inset CommandInset ref
9543 reference "sec:slitex"
9548 If your machine doesn't have the
9553 \begin_inset Quotes eld
9561 \begin_inset Quotes erd
9564 ] installed, you'll probably have to use the default
9568 class, which isn't quite as good as
9573 \begin_layout Standard
9578 class is designed for use with version 2.1 of the
9582 LaTeX class file which is now an integral part of LaTeX2e.
9585 \begin_layout Subsection
9589 \begin_layout Standard
9590 Obviously, to use this document class, you need to select
9591 \begin_inset Quotes eld
9599 \begin_inset Quotes erd
9609 \begin_inset space ~
9615 There are some settings in the
9618 \begin_inset space ~
9623 dialog that you should know about that are specific to this class:
9626 \begin_layout Itemize
9627 Don't change the options
9638 \begin_inset space ~
9644 They're ignored by the
9651 \begin_layout Itemize
9652 The default font size is 20
9653 \begin_inset space \thinspace{}
9656 pt with the other options being 17
9657 \begin_inset space \thinspace{}
9661 \begin_inset space \thinspace{}
9665 \begin_inset space \thinspace{}
9671 \begin_layout Itemize
9680 but all math equations are still typeset in the usual roman font.
9683 \begin_layout Itemize
9688 supports A4 and Letter paper sizes as well as a special size for working
9690 \begin_inset space \thinspace{}
9694 It doesn't support A5, B5, legal or executive paper sizes.
9697 \begin_layout Itemize
9698 Don't bother changing the
9702 settings because they are ignored anyway.
9703 All floats appear where they are defined in the text.
9706 \begin_layout Itemize
9711 setting behaves a bit differently for this class.
9716 provides extensive footer and header capabilities including a user-defined
9719 \begin_inset space ~
9723 \begin_inset CommandInset ref
9725 reference "sec:foilfoot"
9730 The title page is treated differently to all other pages in the document
9739 has the logo centered at the bottom of the page (if one is defined).
9740 The possible page style choices and what they do are as follows:
9744 \begin_layout Labeling
9745 \labelwidthstring MMMMMMM
9752 The final output contains no page numbers, or other headers or footers
9753 (except footnotes of course).
9757 \begin_layout Labeling
9758 \labelwidthstring MMMMMMM
9765 The final output contains page numbers centered at the bottom of the page.
9766 No other headings or footers (other than footnotes).
9769 \begin_layout Labeling
9770 \labelwidthstring MMMMMMM
9775 Page numbers in lower right corner.
9776 Additional headers and footers are also shown.
9777 This is also the default.
9780 \begin_layout Labeling
9781 \labelwidthstring MMMMMMM
9786 Gives you access to the
9790 package although its use with
9794 is discouraged by the writer of the
9798 package because of some potential page layout clashes.
9802 \begin_layout Subsubsection
9806 \begin_layout Standard
9807 The following options may be used in the extra class options in the
9809 Document\SpecialChar \menuseparator
9815 \begin_layout Labeling
9816 \labelwidthstring MMMMMMx
9821 This sets up the page layout for 7.33
9822 \begin_inset space \thinspace{}
9826 \begin_inset space \thinspace{}
9829 in paper, which is about the same aspect ratio as a 35
9830 \begin_inset space \thinspace{}
9833 mm slide, making it a bit easier to work with this medium.
9836 \begin_layout Labeling
9837 \labelwidthstring MMMMMMx
9842 Places a rule across the page below the header on every page except the
9846 \begin_layout Labeling
9847 \labelwidthstring MMMMMMx
9852 Places a rule across the page above the footer on every page except the
9856 \begin_layout Labeling
9857 \labelwidthstring MMMMMMx
9862 This is automatically set each time you create a new
9871 to use the dvips driver to rotate those pages that are set as landscape
9875 \begin_layout Labeling
9876 \labelwidthstring MMMMMMx
9881 Simply changes the page dimensions to those of a landscape page but doesn't
9883 Thus if you use this option you need to use an external program to rotate
9884 each page or feed your paper through your printer as landscape.
9885 Note that this option effectively reverses the roles of the
9893 environments (don't worry these are described in the next section).
9896 \begin_layout Labeling
9897 \labelwidthstring MMMMMMx
9902 Equation numbers on the left.
9905 \begin_layout Labeling
9906 \labelwidthstring MMMMMMx
9911 Flush-left equations.
9914 \begin_layout Subsection
9915 Supported Environments
9918 \begin_layout Standard
9919 Most of the environments commonly supported in other classes are also supported
9925 There are several additional environments provided by
9929 as well as a couple added by LyX.
9930 The following environments are shared with other classes:
9933 \begin_layout Standard
9937 \begin_layout Plain Layout
9949 \begin_layout Itemize
9955 \begin_layout Itemize
9961 \begin_layout Itemize
9967 \begin_layout Itemize
9973 \begin_layout Itemize
9979 \begin_layout Itemize
9985 \begin_layout Itemize
9991 \begin_layout Itemize
9997 \begin_layout Itemize
10003 \begin_layout Itemize
10009 \begin_layout Itemize
10015 \begin_layout Itemize
10021 \begin_layout Itemize
10027 \begin_layout Itemize
10033 \begin_layout Itemize
10039 \begin_layout Itemize
10045 \begin_layout Itemize
10051 \begin_layout Itemize
10057 \begin_layout Standard
10061 \begin_layout Plain Layout
10073 \begin_layout Standard
10074 That is, all the major environments apart from the sectioning environments.
10075 Since foils are essentially self-contained sections, with a title and body,
10080 provides specific commands for starting new foils and these are:
10083 \begin_layout Itemize
10089 \begin_layout Itemize
10095 \begin_layout Standard
10096 LyX also provides slightly modified versions of these two environments called:
10099 \begin_layout Itemize
10105 \begin_layout Itemize
10108 ShortRotatefoilhead
10111 \begin_layout Standard
10112 and the differences will be explained in the next section.
10115 \begin_layout Standard
10116 Since foils are often used in presenting ideas or new theorems and such
10121 also provides a comprehensive box of goodies for presenting them:
10124 \begin_layout Standard
10128 \begin_layout Plain Layout
10132 begin{multicols}{2}
10140 \begin_layout Itemize
10146 \begin_layout Itemize
10152 \begin_layout Itemize
10158 \begin_layout Itemize
10164 \begin_layout Itemize
10170 \begin_layout Itemize
10176 \begin_layout Itemize
10182 \begin_layout Itemize
10188 \begin_layout Itemize
10194 \begin_layout Itemize
10200 \begin_layout Itemize
10206 \begin_layout Standard
10210 \begin_layout Plain Layout
10222 \begin_layout Standard
10223 The starred versions are unnumbered while the unstarred versions are numbered.
10224 There are also two list environments added by LyX and these are:
10227 \begin_layout Itemize
10233 \begin_layout Itemize
10239 \begin_layout Standard
10244 provides some powerful header and footer capabilities that are best set
10245 in the preamble although they may be set at any point in a document.
10246 If you want to change these settings in your document the best place to
10247 do so is at the very top of a foil, i.
10248 \begin_inset space \thinspace{}
10254 \begin_inset space \space{}
10259 straight after the foilhead.
10262 \begin_layout Standard
10263 For this purpose, the following command styles are provided [
10270 \begin_layout Standard
10274 \begin_layout Plain Layout
10278 begin{multicols}{2}
10286 \begin_layout Itemize
10290 \begin_inset space ~
10296 \begin_layout Itemize
10302 \begin_layout Itemize
10306 \begin_inset space ~
10312 \begin_layout Itemize
10316 \begin_inset space ~
10322 \begin_layout Itemize
10326 \begin_inset space ~
10333 \begin_layout Standard
10334 \begin_inset space ~
10341 \begin_layout Standard
10345 \begin_layout Plain Layout
10357 \begin_layout Standard
10358 There are also a few commands provided by
10362 that aren't directly supported by LyX but I'll tell you what they do and
10363 how to use them in section
10364 \begin_inset space ~
10368 \begin_inset CommandInset ref
10370 reference "sec:unsuppfoils"
10377 \begin_layout Subsection
10378 Building a Set of Foils
10381 \begin_layout Standard
10382 This section will give a simple introduction to using the different environments
10383 to build a set of foils.
10384 If you want to see an example set of foils, take a look at the
10388 file you find in LyX's
10395 \begin_layout Subsubsection
10396 Give It a Title Page
10399 \begin_layout Standard
10400 Unlike other classes that provide
10420 creates the title on a page of its own.
10421 If you leave out the
10425 environment LaTeX will substitute the current date (every time you regenerate
10429 \begin_layout Subsubsection
10433 \begin_layout Standard
10434 As I mentioned earlier, there are four ways of starting a new foil.
10435 For portrait foils you should use
10444 The difference between these two environments is the amount of space between
10445 the title of the foil (the foilhead) and the body of the foil.
10448 \begin_layout Standard
10449 Landscape foils are generated using the
10455 ShortRotatefoilhead
10458 Again the only difference is the spacing between foilhead and body.
10459 Both of the short versions have 0.5 inches less separation between the foilhead
10464 \begin_layout Standard
10465 One problem with the support for landscape foils is the requirement that
10466 you have to use the
10470 driver to generate the PostScript output otherwise the foils won't be rotated.
10471 It is possible to get landscape foils even if you haven't got the
10475 driver provided you can feed your foils sideways through your printer ;-)
10478 \begin_layout Subsubsection
10479 Theorems, Lemmas, Proofs and more
10482 \begin_layout Standard
10483 Due to a small bug in LyX you can't have two of the same type of these environme
10484 nts directly following each other.
10485 They must be separated by something.
10486 If you try, you will just be extending the previous environment as if you
10487 had merged the two environments together.
10488 So, how do you get around this problem? The simplest option is to insert
10489 some text between the two environments or add a
10493 environment between the two with just a
10494 \begin_inset Quotes eld
10502 \begin_inset Quotes erd
10506 This will force LyX to produce two separate environments and hence the
10507 correct LaTeX output.
10508 An example is provided in the example file included with the LyX distribution.
10509 Remember, this problem only occurs if you are trying to place two of the
10510 same type of theorem-like environments one directly after the other.
10513 \begin_layout Subsubsection
10517 \begin_layout Standard
10518 You get all the commonly supported list styles found in other classes as
10519 well as two new ones.
10520 I'll only describe the new ones here.
10521 If you want to find out more about the other list environments check out
10527 If you intend to use itemized lists you might also want to read about the
10531 \begin_inset space ~
10535 \begin_inset space ~
10540 dialog described above in section
10541 \begin_inset space ~
10545 \begin_inset CommandInset ref
10547 reference "sec:bullet"
10554 \begin_layout Standard
10555 The two new list styles,
10563 , are designed to make it easier for you to create lists of do's and don'ts
10564 or right and wrong by providing dedicated environments that use a tick
10565 or a cross as the label of the list.
10566 These lists are in fact dedicated variants of the
10571 They do however require that you have the
10575 packages installed.
10578 \begin_layout Subsubsection
10582 \begin_layout Standard
10587 redefines the floating tables and figures so that they appear exactly where
10588 they are in the text rather than pushing them to the top of the page or
10589 to some user specified location.
10590 In fact if you change the float placement settings they are simply ignored.
10593 \begin_layout Subsubsection
10594 Page Headers and Footers
10595 \begin_inset CommandInset label
10597 name "sec:foilfoot"
10604 \begin_layout Standard
10608 \begin_inset space ~
10617 are two commands used to control the left-footer text string.
10618 The first is meant to allow you to include a graphic logo on your foils
10620 \begin_inset Quotes eld
10628 \begin_inset Quotes erd
10632 While the second is meant to provide a classification for the audience,
10636 \begin_inset space \thinspace{}
10642 \begin_inset space \space{}
10646 It is empty by default.
10649 \begin_layout Standard
10650 The remaining page corners can be filled by
10653 \begin_inset space ~
10658 (which defaults to page numbers),
10661 \begin_inset space ~
10669 \begin_inset space ~
10677 \begin_layout Subsection
10683 \begin_inset CommandInset label
10685 name "sec:unsuppfoils"
10692 \begin_layout Standard
10693 All the commands mentioned below need to be set in a
10701 within another environment.
10704 \begin_layout Subsubsection
10708 \begin_layout Standard
10709 All lengths are adjusted using the
10732 should be replaced by the name given to the length you want to change and
10737 is the length value.
10738 All lengths should be specified in units of length such as inches (
10750 ) or relative to some document or font-based length such as
10760 \begin_layout Standard
10761 It's possible to change the spacing between a foilhead and the body of the
10762 foil by adjusting the length specified by
10769 For example, to make
10774 \begin_inset space \space{}
10777 in closer to their bodies put the following in the preamble:
10783 foilheadskip}{-0.5in}
10786 \begin_layout Standard
10787 The spacings around floats can be adjusted by setting these lengths:
10790 \begin_layout Labeling
10791 \labelwidthstring MMMMMMMMMMM
10798 Separation between the text and the top of the float
10801 \begin_layout Labeling
10802 \labelwidthstring MMMMMMMMMMM
10809 Separation between the float and the caption
10812 \begin_layout Labeling
10813 \labelwidthstring MMMMMMMMMMM
10820 Separation between the caption and the following text
10823 \begin_layout Labeling
10824 \labelwidthstring MMMMMMMMMMM
10831 You can make the captions narrower than the surrounding text by adjusting
10833 Best done relative to
10842 \begin_layout Standard
10843 There are also several title page related lengths that you may find useful
10844 if you have a long title or several authors:
10847 \begin_layout Labeling
10848 \labelwidthstring MMMMMMMMMMM
10855 Separation from headers to
10860 \begin_layout Labeling
10861 \labelwidthstring MMMMMMMMMMM
10879 \begin_layout Labeling
10880 \labelwidthstring MMMMMMMMMMM
10894 \begin_layout Labeling
10895 \labelwidthstring MMMMMMMMMMM
10911 \begin_layout Labeling
10912 \labelwidthstring MMMMMMMMMMM
10928 \begin_layout Standard
10929 The last length related command affects all the list environments.
10940 a list environment then all the vertical spacing between the list items
10942 Note that this is a command not a length so it doesn't require
10948 like the stuff mentioned above.
10951 \begin_layout Subsubsection
10952 Headers and Footers
10955 \begin_layout Standard
10968 commands control whether the logo in the
10972 definition appear on a given page.
10979 in the preamble then none of the foils will have the logo on them.
10980 If you don't want the logo on a particular page place the
10986 directly after the foilhead of that page and the
10992 directly after the next foilhead.
10995 \begin_layout Standard
10996 If you decide to use the
11000 page style setting in the
11003 \begin_inset space ~
11008 dialog you should probably add
11018 to your preamble so headers and footers on landscape pages are correctly
11019 placed when rotated.
11020 This is due to some clashes between the page layouts provided by the
11031 \begin_layout Section
11032 Hollywood (Hollywood spec scripts)
11035 \begin_layout Standard
11041 \begin_layout Subsection
11045 \begin_layout Standard
11046 Getting the format of a Hollywood script right is a
11047 \begin_inset Quotes eld
11051 \begin_inset Quotes erd
11054 It is designed to make the readers focus on content and to be easy and
11055 familiar for the actors to read.
11056 Each page of a script should be one minute of film.
11057 Nothing goes in a script that you cannot see or hear on screen.
11058 The courier 12 pt font should be used throughout.
11062 \begin_layout Subsection
11066 \begin_layout Standard
11067 Speakers' lines should NEVER break in mid-sentence.
11068 If a speaker's lines continue over a page break, repeat the
11072 title followed by (Cont'd).
11075 \begin_layout Subsection
11079 \begin_layout Standard
11084 names as labels then cross-reference the label to insert the name.
11085 The cross-reference dialog will show the current cast of characters.
11086 You can use this to insert the speaker name in narratives also.
11089 \begin_layout Subsection
11090 Paper size and Margins
11093 \begin_layout Standard
11094 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11097 \begin_layout Subsection
11101 \begin_layout Standard
11102 The following environments are available.
11103 You can use hollywood.bind to get the bind keys shown at the right.
11106 \begin_layout Itemize
11110 \begin_inset Newline newline
11115 Used where nothing else works.
11119 \begin_layout Itemize
11125 \begin_inset space \hfill{}
11133 \begin_inset Newline newline
11136 Usually followed by something like
11137 \begin_inset Quotes eld
11140 on Sally waking up.
11141 \begin_inset Quotes erd
11147 \begin_layout Itemize
11151 \begin_inset space \hfill{}
11155 \begin_inset Newline newline
11160 Introduces a new INTERIOR camera set-up.
11161 Always followed by DAY or NIGHT, or something similar to define the lighting
11163 Everthing on this line in CAPS.
11166 \begin_layout Itemize
11170 \begin_inset space \hfill{}
11174 \begin_inset Newline newline
11179 Introduces a new EXTERIOR camera set-up.
11180 Everthing on this line in CAPS.
11183 \begin_layout Itemize
11187 \begin_inset space \hfill{}
11191 \begin_inset Newline newline
11196 The character speaking.
11199 \begin_layout Itemize
11203 \begin_inset space \hfill{}
11207 \begin_inset Newline newline
11212 Instructions to the speaker.
11213 The () are automatically inserted, but only the ( will show in LyX.
11214 Both will be printed.
11217 \begin_layout Itemize
11221 \begin_inset space \hfill{}
11225 \begin_inset Newline newline
11237 \begin_layout Itemize
11241 \begin_inset space \hfill{}
11245 \begin_inset Newline newline
11250 Camera movement instruction.
11252 \begin_inset space \thinspace{}
11256 \begin_inset space \space{}
11262 \begin_layout Itemize
11266 \begin_inset space \hfill{}
11272 \begin_layout Itemize
11276 \begin_inset space \hfill{}
11282 \begin_layout Itemize
11286 \begin_inset space \hfill{}
11292 \begin_layout Itemize
11296 \begin_inset space \hfill{}
11302 \begin_layout Subsection
11306 \begin_layout Itemize
11310 \begin_layout Itemize
11314 \begin_layout Itemize
11316 \begin_inset space \thinspace{}
11323 \begin_layout Itemize
11328 \begin_layout Itemize
11329 PAN — camera movement
11332 \begin_layout Itemize
11333 INSERT — cut to close-up of
11336 \begin_layout Section
11340 \begin_layout Standard
11343 Panayotis Papasotiriou
11346 \begin_layout Subsection
11350 \begin_layout Standard
11351 The ijmpc package is a set of macros that facilitates electronic manuscript
11354 International Journal of Modern Physics C
11357 Similarly, the ijmpd package is for creating manuscripts to be submitted
11360 International Journal of Modern Physics D
11363 Both journals are published by World Scientific.
11364 The corresponding document classes are named
11373 These files, together with instructions for the authors, can be downloaded
11375 \begin_inset Flex URL
11378 \begin_layout Plain Layout
11380 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11386 \begin_inset Flex URL
11389 \begin_layout Plain Layout
11391 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11397 Both packages are modified versions of the standard
11398 \begin_inset Quotes eld
11402 \begin_inset Quotes erd
11405 package, and they are almost (but not exactly) identical.
11406 Most of their features are supported by LyX.
11407 I have used LyX successfully to write articles submitted to both journals
11408 without any problem.
11411 \begin_layout Subsection
11415 \begin_layout Standard
11416 As usual, the easiest way to write a paper is to start with a template.
11419 File\SpecialChar \menuseparator
11438 This will give an (almost) empty document that includes the most common
11439 fields found in a manuscript.
11440 Simply overwrite the existing text (including the brackets,
11445 You should keep in mind the following remarks.
11448 \begin_layout Enumerate
11449 LyX won't let you change the font size and the page style of the document,
11450 because such modifications are not allowed by both packages.
11453 \begin_layout Enumerate
11454 The language of the document should not be changed.
11455 Before previewing your paper, be sure that the babel package is not used.
11456 To do this, click on
11458 Tools\SpecialChar \menuseparator
11469 checkbox in the language settings, and click on
11477 , if you wish to make this change permanent).
11480 \begin_layout Enumerate
11482 \begin_inset Quotes eld
11486 \begin_inset Quotes erd
11489 style must be used to define keywords.
11492 \begin_layout Enumerate
11493 The ijmpc package provides a style named
11494 \begin_inset Quotes eld
11497 Classification Codes
11498 \begin_inset Quotes erd
11501 , which can be used to define classification codes, such as PACS numbers.
11502 Note that this facility is not supported by the ijmpd package.
11505 \begin_layout Enumerate
11506 Several new environments are available:
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 \begin_inset Quotes eld
11607 \begin_inset Quotes erd
11611 \begin_inset Quotes eld
11615 \begin_inset Quotes erd
11619 Their use is more or less obvious.
11620 LyX supports all these environments; it will use the proper label, text
11621 style, and numbering scheme for each of them.
11624 \begin_layout Enumerate
11625 Both packages use basic citations; the natbib package should not be used.
11626 In LyX, citation references are shown as usual; in the output, citations
11627 are shown as superscripts.
11628 If you want to use a citation as normal text, you should use the
11633 \begin_inset space \thinspace{}
11637 \begin_inset space \space{}
11641 \begin_inset Quotes eld
11645 \begin_inset space \space{}
11655 \begin_inset Quotes erd
11661 \begin_layout Enumerate
11663 \begin_inset Quotes eld
11667 \begin_inset Quotes erd
11670 section in both packages.
11671 To put acknowledgments, just use the
11672 \begin_inset Quotes eld
11676 \begin_inset Quotes erd
11682 \begin_layout Enumerate
11683 Appendices may be added to the paper,
11687 the Acknowledgments and
11692 LyX provides a special environment, called
11693 \begin_inset Quotes eld
11697 \begin_inset Quotes erd
11700 which marks the beginning of the appendices.
11701 This environment should be left blank; it just sends a LaTeX command, but
11702 nothing is really printed.
11704 \begin_inset Quotes eld
11708 \begin_inset Quotes erd
11711 is printed with blue letters, as a signal that all sections after that
11712 point are appendices.
11713 To write an appendix, use the
11714 \begin_inset Quotes eld
11718 \begin_inset Quotes erd
11722 LyX will number each appendix with capital letters, as required by both
11725 \begin_inset Quotes eld
11729 \begin_inset Quotes erd
11736 be present before the first appendix; if not, all appendices will be numbered
11737 as normal sections in the output.
11740 \begin_layout Enumerate
11741 The ijmpc and the ijmpd packages use the
11745 command to implement table captions.
11746 As a result, a table created by LyX is printed correctly, but its caption
11748 However, you can use some TeX code to overpass this problem, so that captions
11749 are printed as expected.
11750 To do so, create a float table as usual, remove the caption, and replace
11751 it with the TeX code
11761 (sic); you must also the TeX code
11765 immediately after the tabular material.
11766 Study the example table included in the template files to see how this
11767 trick is implemented.
11768 Alternatively, If you need table captions, you should implement the whole
11773 file, then include this file to the LyX document (
11775 Insert\SpecialChar \menuseparator
11776 File\SpecialChar \menuseparator
11778 \begin_inset space ~
11784 Details on how to create a table float can be found in the files
11792 , included in the corresponding packages.
11795 \begin_layout Subsection
11796 Preparing a paper for submission
11799 \begin_layout Standard
11800 Before you submit your paper you must export the LyX document as a LaTeX
11803 File\SpecialChar \menuseparator
11804 Export\SpecialChar \menuseparator
11811 \begin_layout Plain Layout
11812 Actually you have the choice between LaTeX (plain) and pdflatex.
11813 If you intend to use pdflatex to prepare the paper, you should use the
11814 pdflatex option so that included graphics are converted to PDF format,
11815 ready for use by pdflatex.
11820 , then make the following changes to the resulting
11827 \begin_layout Enumerate
11828 Remove the comment lines before the
11837 \begin_layout Enumerate
11838 Remove everything between (and including) the
11850 commands, except for any commands you specifically put into the LaTeX preamble.
11853 \begin_layout Standard
11858 file should be saved and processed through LaTeX as many times as necessary.
11859 You may also want to check the resulting
11866 \begin_layout Subsection
11870 \begin_layout Standard
11871 The use of TeX code is reduced to two commands, which must be placed at
11872 the top of the document.
11873 If you started writing your paper by using the
11881 template, the TeX code needed is already in its place; you usually don't
11883 You may only modify the first TeX code to specify the information printed
11884 to the top of odd and even pages (authors' names and short paper's title,
11886 This TeX code must have the form
11890 markboth{Authors' Names}{Short Paper's Title}
11895 \begin_layout Section
11899 \begin_layout Standard
11905 \begin_layout Subsection
11909 \begin_layout Standard
11910 The iopart package provides a document class to create electronic manuscript
11911 submission to the journals published by the Institute of Physics.
11912 Instructions for the authors how to create a paper using the iopart class
11913 can be downloaded together with the iopart package from the site
11914 \begin_inset Flex URL
11917 \begin_layout Plain Layout
11919 ftp://ftp.iop.org/pub/journals/latex2e
11927 \begin_layout Subsection
11931 \begin_layout Standard
11932 The easiest way to write a paper is to start with the file
11936 that is available in LyX's examples files folder.
11937 Open this file, save it under a new name, and start writing.
11938 The example file explains how to use the special text environments.
11939 Here are the most important advices:
11942 \begin_layout Itemize
11943 To be able to compile your document to a PDF, PS, or DVI, assure that the
11946 Use AMS math package
11948 in the document settings under
11955 \begin_layout Itemize
11958 The title environment defines the kind of your paper.
11959 So use one of the following environments for the title:
11963 \begin_layout Itemize
11972 \begin_layout Itemize
11981 \begin_layout Itemize
11987 for a Topical review
11990 \begin_layout Itemize
11999 \begin_layout Itemize
12008 \begin_layout Itemize
12014 for a Paper (same as Title)
12017 \begin_layout Itemize
12023 for a Preliminary communication
12026 \begin_layout Itemize
12032 for a Rapid communication
12035 \begin_layout Itemize
12041 for a Letter to the editor
12045 \begin_layout Itemize
12048 All title environments except of
12052 can have an optional short title.
12055 \begin_layout Itemize
12056 There is a general title environment
12060 which is not directly supported by the LyX.
12061 This can be used as TeX code when your document doesn't fit into one of
12062 the other title types.
12065 \begin_layout Standard
12066 For more informations like hints for special table and formula formatting,
12067 look at the IOP author guidelines.
12070 \begin_layout Section
12074 \begin_layout Standard
12077 Panayotis Papasotiriou
12080 \begin_layout Subsection
12084 \begin_layout Standard
12085 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12086 that facilitates electronic manuscript submission to the journals they
12088 Most known of them (at least in my domain of interest) are
12090 Astrophysics and Space Science
12096 , but there are many others (see a complete list at
12097 \begin_inset Flex URL
12100 \begin_layout Plain Layout
12102 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12108 The Kluwer package may be downloaded from the site
12109 \begin_inset Flex URL
12112 \begin_layout Plain Layout
12114 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12120 A complete user guide is contained in that package (but it can also be
12121 downloaded separately).
12124 \begin_layout Standard
12125 LyX supports many features of the package but not everything.
12126 However, the TeX code needed is reduced to some
12127 \begin_inset Quotes eld
12131 \begin_inset Quotes erd
12134 commands of the package (see
12135 \begin_inset space ~
12139 \begin_inset CommandInset ref
12141 reference "subsec:kluwer_peculiarities"
12146 I have recently used LyX to write an article submitted to the
12148 Astrophysics and Space Science
12150 without any problem.
12153 \begin_layout Subsection
12157 \begin_layout Standard
12158 The easiest way to write a paper is to start with the Kluwer template file.
12161 File\SpecialChar \menuseparator
12173 This will give an (almost) empty document that includes the most common
12174 fields found in a manuscript and a short description of their use.
12175 As in most templates, simply overwrite the existing text (including the
12180 ) with the correct information.
12183 \begin_layout Subsection
12184 Preparing a paper for submission
12187 \begin_layout Standard
12188 As in the AASTeX package, before you submit your paper to a journal you
12190 \begin_inset Quotes eld
12194 \begin_inset Quotes erd
12200 \begin_layout Enumerate
12201 Export your paper as a LaTeX file.
12202 To do this, click on
12204 File\SpecialChar \menuseparator
12205 Export\SpecialChar \menuseparator
12212 \begin_layout Enumerate
12217 file with a text editor and make the following changes
12221 \begin_layout Enumerate
12222 remove the comment lines before the
12231 \begin_layout Enumerate
12232 remove everything between (and including) the
12244 commands, except for any commands you specifically put into the LaTeX preamble.
12247 \begin_layout Standard
12256 \begin_layout Enumerate
12261 file through LaTeX as many times as necessary (usually up to three).
12264 \begin_layout Enumerate
12270 \begin_inset space \thinspace{}
12274 \begin_inset space \space{}
12281 , and check if everything is OK (it should, if you didn't make any mistake).
12284 \begin_layout Subsection
12285 \begin_inset Quotes eld
12289 \begin_inset Quotes erd
12292 of the Kluwer package
12293 \begin_inset CommandInset label
12295 name "subsec:kluwer_peculiarities"
12302 \begin_layout Standard
12303 The Kluwer package has the following
12304 \begin_inset Quotes eld
12308 \begin_inset Quotes erd
12314 \begin_layout Enumerate
12315 It is possible to write multiple articles in the same LaTeX file
12319 \begin_layout Plain Layout
12320 I can't imagine any good reason to do this.
12326 Each article must be included in the environment
12327 \begin_inset Quotes eld
12331 \begin_inset Quotes erd
12335 Unfortunately, this environment cannot be omitted, even if you write just
12337 Therefore, each article starts with the command
12343 and, obviously, ends with the command
12350 Although this can be implemented in LyX, I didn't included it, since it
12351 looks ugly and can confuse the novice user.
12352 Therefore, you need to enter them directly and mark them as LaTeX code
12354 \begin_inset Quotes eld
12358 \begin_inset Quotes erd
12364 \begin_layout Enumerate
12365 Information given at the beginning of the article (i.
12366 \begin_inset space \thinspace{}
12370 \begin_inset space \space{}
12373 title, subtitle, author, institution, running title, running author, abstract
12374 and keywords) must be included in an environment called
12375 \begin_inset Quotes eld
12379 \begin_inset Quotes erd
12383 This is not implemented in LyX, so you must enter title, subtitle etc.
12384 \begin_inset space ~
12387 between two TeX code lines (
12402 \begin_layout Enumerate
12403 According to the user manual, the label of each bibliography item must be
12427 \begin_layout Standard
12432 template takes care of all these
12433 \begin_inset Quotes eld
12437 \begin_inset Quotes erd
12441 If you start a new paper using this template you don't need to do anything
12446 \begin_layout Enumerate
12447 don't delete the TeX code included in the template, and
12450 \begin_layout Enumerate
12451 copy the example bibliography item included in the template and modify it
12452 as necessary to enter new bibliography items.
12455 \begin_layout Section
12459 \begin_layout Standard
12465 \begin_layout Subsection
12469 \begin_layout Standard
12470 The LyX document classes
12472 article (koma-script)
12476 report (koma-script)
12494 correspond to the LaTeX document classes
12511 \begin_inset space ~
12514 of the Koma-Script family.
12515 They are replacements for the standard document classes
12531 , resp., and fit better to European typography conventions in a number of
12535 \begin_layout Itemize
12536 Standard character size is 11pt in
12538 article (koma-script)
12542 report (koma-script)
12550 letter (koma-script)
12555 \begin_layout Itemize
12556 Headings, labels of the description environment, and a number of elements
12559 letter (koma-script)
12561 document class are set in a bold sans serif font.
12565 \begin_layout Plain Layout
12566 There is a big difference between the bold sans serif old cm fonts and new
12567 ec fonts, especially in the appearance of headings.
12568 In comparison, the ec bold sans serif fonts look a bit thin.
12569 Here the LaTeX package
12577 helps to produce the
12578 \begin_inset Quotes eld
12582 \begin_inset Quotes erd
12585 appearance when using the ec fonts.
12590 The numbering of chapter headings is made in the same way as the numbering
12591 of section headings, that is without the extra line
12592 \begin_inset Quotes eld
12595 Chapter\SpecialChar \ldots{}
12597 \begin_inset Quotes erd
12601 In addition, the appearance of the headings can be modified by using a
12602 number of options (in LyX to be entered in the field
12605 \begin_inset space ~
12612 Layout\SpecialChar \menuseparator
12616 A detailed German description of these options can be found in the Koma-Script
12624 \begin_layout Itemize
12625 The main means in the Koma-Script document classes to design the type area
12634 (in LyX to be entered in the extra class options field in the dialog
12636 Document\SpecialChar \menuseparator
12640 They make a clearer modification of page margins possible as do the options
12643 Document\SpecialChar \menuseparator
12647 A detailed German description of these and other type area options can
12648 be found in the Koma-Script documentation
12655 \begin_layout Itemize
12656 The LaTeX document classes of the Koma-Script family define a number of
12657 additional commands.
12658 Those part of it which makes sense in LyX is implemented in corresponding
12662 \begin_layout Standard
12663 A detailed German description of the LaTeX document classes of the Koma-Script
12664 family can be found in the Koma-Script documentation
12672 \begin_layout Plain Layout
12673 There is an English translation
12677 , but it is not a complete one.
12682 The following sections describe only those aspects, which are relevant
12686 \begin_layout Subsection
12687 article (koma-script), report (koma-script), and book (koma-script)
12690 \begin_layout Standard
12691 The document classes
12693 article (koma-script)
12697 report (koma-script)
12707 are implemented in the layout files
12720 They contain all the paragraph types of the corresponding standard document
12733 , resp., partly modified, with the exception of the LyX specific
12737 -type, which is replaced by the new
12741 -type having the same functionality.
12746 -Type there is a number of new paragraph types added.
12753 letter (koma-script)
12758 \begin_layout Itemize
12767 : are equivalents to
12775 , resp., additionally inserting an entry in the table of contents.
12784 are not contained in
12786 article (koma-script)
12791 \begin_layout Itemize
12800 : behave exactly as
12808 , resp., additionally clearing running heads.
12813 is not contained in
12815 article (koma-script)
12821 \begin_layout Plain Layout
12834 report (koma-script)
12836 , but since this is identical to
12840 , is has not been implemented in LyX.
12848 \begin_layout Itemize
12853 : generates a heading directly above the following paragraph in the standard
12854 character size without affecting the structure of the document.
12857 \begin_layout Itemize
12866 are special captions which respect the different space settings needed
12867 for captions placed above or below an element (if you follow strict typographic
12868 rules, you might want to place table captions always above the table).
12869 You can also use the class option
12873 , which will switch
12886 You need at least Koma-Script version 2.8q to use this.
12889 \begin_layout Itemize
12894 : can be used to set a bonmot, e.
12895 \begin_inset space \thinspace{}
12899 \begin_inset space \space{}
12902 at the beginning of a chapter.
12903 If you use the optional argument (
12905 Insert\SpecialChar \menuseparator
12907 \begin_inset space ~
12912 ), you can insert the dictum's author there.
12913 Dictum and author are separated by a line.
12914 You need at least Koma-Script version 2.8q to use this.
12919 is not contained in
12921 article (koma-script)
12926 \begin_layout Standard
12927 The following types, together with the standard types
12939 , form the title area of the document.
12940 They must be entered ahead of the first
12941 \begin_inset Quotes eld
12945 \begin_inset Quotes erd
12952 \begin_layout Plain Layout
12953 The corresponding LaTeX commands must appear before the
12964 When such a type is used more than once, the latter usage overwrites the
12965 former one, that means, for every type only the latest usage is valid.
12966 The order of the different types however has, like
12978 , no effect on the appearance of the produced document.
12981 \begin_layout Itemize
12986 : produces a centered paragraph above the ordinary title (
12998 ) for the subject of the document.
13001 \begin_layout Itemize
13006 : produces a centered paragraph below the ordinary title (
13018 ) for the publishers' name.
13021 \begin_layout Itemize
13028 report (koma-script)
13034 produces a centered paragraph on its own page behind the title page, or
13037 article (koma-script)
13039 produces a centered paragraph below the ordinary title (
13055 ) for a dedication.
13058 \begin_layout Itemize
13063 : produces a left aligned paragraph above the ordinary title (
13079 ) for a document`s head.
13082 \begin_layout Itemize
13087 : produces in a double-sided print in
13089 report (koma-script)
13095 a left-aligned paragraph at the top of the title page`s back or has no
13096 effect in a single-sided print or in
13098 article (koma-script)
13103 \begin_layout Itemize
13108 : produces in a double-sided print in
13110 report (koma-script)
13116 a left-aligned paragraph at the bottom of the title page`s back or has
13117 no effect in a single-sided print or in
13119 article (koma-script)
13124 \begin_layout Itemize
13129 : produces a special
13130 \begin_inset Quotes eld
13134 \begin_inset Quotes erd
13137 page ahead of the actual document containing a paragraph without special
13141 \begin_layout Standard
13142 The layout files for the document classes
13144 article (koma-script)
13148 report (koma-script)
13154 do include the file
13159 This is thought of as a place to define your own types.
13164 in your personal layout directory and edit the file!
13167 \begin_layout Subsection
13168 letter (koma-script)
13171 \begin_layout Standard
13175 \begin_layout Plain Layout
13187 \begin_layout Standard
13191 letter (koma-script)
13193 is implemented in the layout file
13198 It contains all the paragraph types of the corresponding standard document
13203 , partly modified, with the exception of the LyX specific types
13215 type, which is replaced by the new
13220 In addition, it contains, in contrast to the standard document class, the
13238 Furthermore, there are a number of new letter specific types.
13241 \begin_layout Standard
13245 \begin_layout Plain Layout
13257 \begin_layout Standard
13258 The appearance of the letter produced by this document class can be controlled
13259 by a number of LaTeX commands, which you can put in the LaTeX preamble.
13263 \begin_layout Plain Layout
13264 For example, the standard appearance of the letter`s heading, consisting
13265 of name and address, is quite self-willed.
13267 \begin_inset Quotes eld
13271 \begin_inset Quotes erd
13274 heading is produced by the following LaTeX commands in the preamble:
13277 \begin_layout LyX-Code
13287 \begin_layout LyX-Code
13303 \begin_layout LyX-Code
13313 \begin_layout LyX-Code
13333 A detailed German description of such LaTeX commands can be found in the
13334 Koma-Script documentation
13339 With it, the letter's author can produce his personal letter layout.
13342 \begin_layout Standard
13351 define the beginning of the letter and must be used in every letter.
13352 To emphasize them in the LyX document class, they are marked with the letter
13362 \begin_inset space ~
13365 in the left margin.
13366 It is possible to write any number of letters in one file.
13371 type produces a new letter using the same addressee and a
13375 type produces a new addressee.
13392 are ordinary paragraph types and can also be used several times in one
13393 and the same letter.
13396 \begin_layout Itemize
13401 : produces a paragraph for the addressee and implicitly defines the beginning
13405 \begin_layout Itemize
13410 : produces a paragraph for the form of address and implicitly produces a
13414 \begin_layout Itemize
13419 : produces a paragraph for a close.
13422 \begin_layout Itemize
13427 : produces a paragraph for a postscript.
13430 \begin_layout Itemize
13435 : produces a paragraph for a distribution list.
13438 \begin_layout Itemize
13443 : produces a paragraph for enclosures.
13446 \begin_layout Standard
13487 are input types provided with a label to enter information, which will
13488 be processed by the document class.
13492 \begin_layout Plain Layout
13493 It could be seen as a matter of inconsequence, that the types
13501 described above are not such input types as well.
13502 Because of the special meaning of those types, however, I have implemented
13503 them as ordinary paragraph types with a one letter mark in the left margin.
13504 Moreover, it would affect my feeling of symmetry, if the
13512 type had such a serious different appearance.
13517 The types must be used ahead of the corresponding
13524 \begin_layout Standard
13525 An implementation of these types in a WYSIWYG fashion does not seem to make
13526 sense, because the real appearance of the produced letter does not only
13527 depend on the usage of the particular type, but also on other factors.
13528 For example, a signature entered in the
13532 type will in the standard behavior appear in the produced letter only,
13533 when in the same letter also a
13538 The entered value of the
13542 type will in the standard behavior not appear in the produced letter at
13544 The possibility to design the letter`s heading freely is already indicated
13545 in a footnote above.
13548 \begin_layout Standard
13549 The input types can also be used as empty paragraphs.
13550 This makes sense e.
13551 \begin_inset space \thinspace{}
13555 \begin_inset space \space{}
13567 type is not used at all, in the standard behavior the value of the
13571 type is used as signature, whereas if an empty
13575 type is used, no signature value is defined.
13578 \begin_layout Standard
13579 By using the input types it is possible to write a letter template, containing
13580 filled input types with your personal dates (name, address, etc.) and empty
13581 input types for other dates you want to enter.
13584 \begin_layout Itemize
13589 : sender's name, in the standard behavior appears as a centered paragraph
13590 in small caps in the letter`s heading.
13593 \begin_layout Itemize
13598 : sender's signature, in the standard behavior appears below the
13607 type is used, the value of the
13611 type appears instead.
13614 \begin_layout Itemize
13619 : sender's address, in the standard behavior appears in a centered paragraph
13620 in the letter`s heading below the sender's name.
13623 \begin_layout Itemize
13628 : sender's telephone number, in the standard behavior only sets the LaTeX
13638 \begin_layout Itemize
13643 : place of the letter`s making.
13646 \begin_layout Itemize
13651 : date of the letter`s making.
13660 , in the standard behavior, produce the place and the date in a right-aligned
13661 line below the addressee's field.
13666 type is used, neither place nor date appear, independent of the value of
13676 type is used, the date of the letter `s production is used.
13679 \begin_layout Itemize
13684 : sender`s back address, in the standard behavior appears above the addressee's
13685 field in a small sans serif font.
13688 \begin_layout Itemize
13693 : special mail information, in the standard behavior appears underlined
13694 above the addressee's field below the back address.
13697 \begin_layout Itemize
13702 : additional information, in the standard behavior appears on right side
13703 below the addressee`s field.
13706 \begin_layout Itemize
13711 : the letter's title, in the standard behavior appears in a big, bold, sans
13712 serif font above the subject.
13715 \begin_layout Itemize
13720 : the letter's subject, in the standard behavior appears in a bold font
13728 \begin_layout Standard
13749 produce a business letter like line above the
13753 line containing the fields
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 \begin_inset Quotes eld
13790 \begin_inset Quotes erd
13794 \begin_inset Quotes eld
13798 \begin_inset Quotes erd
13802 For the date field, the value of the
13808 \begin_inset Quotes eld
13811 business letter types
13812 \begin_inset Quotes erd
13815 is used, the value of the
13819 type however does not appear, but only the LaTeX variable
13826 The ordinary output of place and date in a right-aligned line below the
13827 addressee`s field is suppressed.
13828 The types are implemented as input types provided with a label and must
13829 be used ahead of the corresponding
13836 \begin_layout Itemize
13844 \begin_layout Itemize
13852 \begin_layout Itemize
13860 \begin_layout Itemize
13868 \begin_layout Itemize
13876 \begin_layout Subsection
13877 The new letter class: letter (koma-script v.2)
13880 \begin_layout Standard
13886 \begin_layout Standard
13887 \begin_inset VSpace medskip
13893 \begin_layout Standard
13895 Koma-Script version 2.8 has introduced a new letter class
13899 which supersedes the now unsupported
13904 It has — on the LaTeX side — a completely new interface and is not compatible
13905 with the old class.
13906 Therefore, LyX supports both, though it is recommended to use the new class.
13909 \begin_layout Standard
13910 This class covers the same functionality as
13912 letter (koma-script),
13915 The basic items are
13919 (receiver's address, same as
13923 in the old layout),
13936 will start a new letter (i.
13937 \begin_inset space \thinspace{}
13941 \begin_inset space \space{}
13944 you can write several letters per document).
13945 New elements are sender's
13961 and the possibility to use a
13967 Insert\SpecialChar \menuseparator
13973 \begin_layout Standard
13974 The biggest improvement is, though, that the letter's layout is configurable
13975 at almost any needs.
13976 This can be done via the preamble or with a special style file (Letter
13977 Class Option, extension
13981 ), that will be read in as a class option.
13985 \begin_layout Plain Layout
13986 The KOMA package comes with some default
13991 There is, for instance, a
13995 file that follows german typesetting rules, or a
13999 that provides the default layout of the old
14004 The latter can be loaded with the class option
14013 ayout\SpecialChar \menuseparator
14018 ocument\SpecialChar \menuseparator
14030 template that is included in LyX for examples.
14031 A detailed description is to be found in the Koma-Script documentation
14039 \begin_layout Subsection
14043 \begin_layout Standard
14044 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14048 \begin_layout Itemize
14049 The chapter number of a
14053 type appears on a line of its own above the chapter heading instead of
14054 appearing in the same line ahead of it.
14055 The cause for that is the LyX internal behavior for the labeltype
14059 in the layout file.
14062 \begin_layout Itemize
14063 The headings of the types
14071 are only put in the
14072 \begin_inset Quotes eld
14076 \begin_inset Quotes erd
14079 LaTeX table of contents, but not in the LyX table of contents (
14081 Document\SpecialChar \menuseparator
14083 \begin_inset space ~
14087 \begin_inset space ~
14095 \begin_layout Itemize
14096 The paragraphs in a
14100 document class appear in a skip separation mode, not indented.
14101 This is the standard behavior, no special LaTeX commands are needed for
14105 Document\SpecialChar \menuseparator
14108 dialog the corresponding radio button indicates
14117 value always has the effect that extra LaTeX commands are inserted in the
14118 document to produce the gap, which is not what is wanted in this case.
14121 \begin_layout Section
14122 Latex8 (IEEE Conference Papers)
14125 \begin_layout Standard
14131 \begin_layout Subsection
14135 \begin_layout Standard
14136 Since this class is specifically for writing submissions to IEEE sponsored
14137 conferences I strongly recommend that you get a copy of their Authors Kit.
14142 package and associated bibliography style file is included in the kit.
14143 The Authors Kit is usually sent out by email once your initial submission
14145 There is a lot of useful information in the Authors Kit explaining formatting
14146 restrictions and so on and I will assume you have read this since that
14147 means I don't have to repeat it all here.
14150 \begin_layout Subsection
14154 \begin_layout Standard
14155 [AR\SpecialChar \@.
14159 \begin_layout Subsection
14160 Supported Environments
14163 \begin_layout Itemize
14169 \begin_layout Itemize
14175 \begin_layout Itemize
14181 \begin_layout Itemize
14187 \begin_layout Itemize
14193 \begin_layout Itemize
14199 \begin_layout Itemize
14205 \begin_layout Itemize
14211 \begin_layout Itemize
14217 \begin_layout Subsection
14218 Differences Between Screen and Paper
14221 \begin_layout Standard
14222 There are slight differences in appearance mainly with the presentation
14223 of section counters.
14224 On screen the trailing period of the section counter is missing but it
14225 will appear in the output so don't let this worry you.
14228 \begin_layout Section
14232 \begin_layout Standard
14238 \begin_layout Subsection
14242 \begin_layout Standard
14243 Memoir is a very powerful and constantly evolving class.
14244 It has been designed with regard to fictional and non-fictional literature.
14245 Its aim is to let the user have maximum control over the typesetting of
14247 Memoir is based on the standard book class, but it can also emulate the
14248 article class (see below).
14251 \begin_layout Standard
14252 Peter Wilson, the developer of Memoir, is known as the author of lots of
14253 useful packages in the LaTeX world.
14254 Most of them have been merged with Memoir.
14255 Therefore, it is much easier to layout the table of contents, appendices,
14256 chapter designs and such.
14257 LyX, though, does not support all of these goodies natively.
14258 Some of them might be added to forthcoming releases
14262 \begin_layout Plain Layout
14263 You are invited to send suggestions to
14264 \begin_inset Flex URL
14267 \begin_layout Plain Layout
14269 lyx-devel@lists.lyx.org
14279 , lots will probably never, due to the limitations of LyX's framework.
14280 Of course you can still use all features with the help of some native LaTeX
14285 \begin_layout Plain Layout
14290 \begin_layout Plain Layout
14300 \begin_inset space ~
14304 \begin_inset CommandInset ref
14306 reference "sec:Inserting-TeX-Code"
14316 In this section, we can only list those features which are natively supported
14318 For detailed descriptions (and for the rest of features) we are recommending
14319 to have a look at the detailed manual of the Memoir class
14323 \begin_layout Plain Layout
14328 \begin_layout Plain Layout
14338 \begin_inset Flex URL
14341 \begin_layout Plain Layout
14343 CTAN:/macros/latex/memoir/memman.pdf
14353 , which is not only a user guide for the class, but also both a comprehensive
14354 description on good typesetting and a superb example for good typesetting
14358 \begin_layout Subsection
14359 Basic features and restrictions
14362 \begin_layout Standard
14363 Memoir supports basically all features of the standard book classes.
14364 There are, however, some differences, as follows:
14367 \begin_layout Description
14369 \begin_inset space ~
14372 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14375 \begin_layout Description
14377 \begin_inset space ~
14380 style: The fancy page style is not supported, due to a command clash between
14381 Memoir and the fancyhdr package (they are both defining a command with
14382 the same name, which confuses LaTeX).
14383 Instead, Memoir comes with a bunch of own page styles (see
14385 Layout\SpecialChar \menuseparator
14386 Document\SpecialChar \menuseparator
14388 \begin_inset space ~
14394 If you want to use these for the chapter pages, you have to use the command
14401 in the main text or in preamble (e.
14402 \begin_inset space \thinspace{}
14406 \begin_inset space \space{}
14413 chapterstyle{companion}
14418 \begin_layout Description
14419 Sectioning: Sectionings (chapter, section, subsection etc.) are coming with
14420 an optional argument in the standard classes.
14421 With this, you can specify an alternative version of the title for the
14422 table of contents and the headers (for instance, if the title is too long).
14423 In LyX, you can do this via
14425 Insert\SpecialChar \menuseparator
14427 \begin_inset space ~
14432 at the beginning of a chapter/section.
14433 Memoir features a second optional argument and thus separates the table
14434 of contents from the header.
14435 You can define three variants of a title with this: one for the main text,
14436 one for the table of contents, and one for the headers.
14437 Simply insert two optional arguments if you need this feature, the first
14438 one containing the short title for the Table of Contents, the second one
14439 containing an alternative short title for the headers.
14442 \begin_layout Description
14443 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14444 of contents, the list of figures and the list of table start a new page
14446 Memoir does not follow this route.
14447 You have to insert a page break yourself, if you want to have one.
14450 \begin_layout Description
14451 Titlepage: For some unknown reason, Memoir uses pagination on the title
14452 page (in the standard classes, title pages are
14453 \begin_inset Quotes eld
14457 \begin_inset Quotes erd
14461 \begin_inset space \thinspace{}
14465 \begin_inset space \space{}
14469 If you want an empty title page, type
14473 aliaspagestyle{title}{empty}
14478 \begin_layout Description
14479 Article: With the class option
14485 Layout\SpecialChar \menuseparator
14486 Document\SpecialChar \menuseparator
14488 \begin_inset space ~
14493 ), you can emulate article style.
14494 That is, counters (footnotes, figures, tables etc.) will not be reset on
14495 new chapters, chapters don't start a new page (but are—in contrary to
14496 \begin_inset Quotes eld
14500 \begin_inset Quotes erd
14503 article classes—still allowed), parts, though, use their own page, as in
14507 \begin_layout Description
14508 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14509 font commands, which have been used in the old LaTeX version 2.09 (e.
14510 \begin_inset space \thinspace{}
14514 \begin_inset space \space{}
14530 It produces an error and stops LaTeX whenever such a command appears.
14535 reallows the commands and spits out warnings instead (which does at least
14537 Since a lot of packages and particularly BibTeX style files are still using
14538 those commands, we have decided to use this option by default.
14541 \begin_layout Subsection
14545 \begin_layout Standard
14546 We will only describe the features supported by LyX (which is not much currently
14548 Please consult the Memoir manual
14552 \begin_layout Plain Layout
14557 \begin_layout Plain Layout
14567 \begin_inset Flex URL
14570 \begin_layout Plain Layout
14572 CTAN:/macros/latex/memoir/memman.pdf
14585 \begin_layout Description
14586 Abstract: You may wonder why an abstract is an extra feature.
14587 Well, it is in book class.
14588 Usually books don't have abstracts.
14589 Memoir, however, has.
14590 You can use it wherever and how often you like.
14593 \begin_layout Description
14594 Chapterprecis: You may know this from belletristic: The contents of a chapter
14595 is shortly described below the title and also in the table of contents
14597 \begin_inset space \thinspace{}
14601 \begin_inset space \space{}
14606 Our hero arrives in Troia; he loses some friends; he finds others
14609 Chapterprecis does exactly this.
14610 It is therefore only sensible below a chapter.
14613 \begin_layout Description
14614 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14615 The epigraph environment provides an elegant way of typesetting such a
14617 The motto itself (text) and its author (source) are divided by a short
14619 Unfortunately, we have to fool LyX a bit here again, since the environment
14620 needs two arguments (text and source).
14621 In this case, we have to use curly brackets (in TeX mode) between the two
14632 <author of the slogan>.
14635 \begin_layout Description
14636 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14637 complex figurative poems).
14638 LyX can only support a few of them.
14639 One is poemtitle, which is a centered title for poems, which will also
14640 be added to the table of contents (verse is the standard environment for
14642 Memoir has some enhanced versions of verse, but you need to use TeX code,
14643 because they have to be nested inside regular verse environments, which
14644 is not possible with LyX).
14647 \begin_layout Description
14648 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14651 \begin_layout Section
14652 Article (mwart), book (mwbk) and report (mwrep)
14653 \begin_inset OptArg
14656 \begin_layout Plain Layout
14669 \begin_layout Standard
14675 \begin_layout Standard
14676 The LyX document classes
14692 correspond to the LaTeX document classes
14705 They are replacements for the standard document classes
14717 , resp., and fit better to Polish typography conventions in a number of points.
14721 \begin_layout Standard
14725 \begin_layout Itemize
14726 Unnumbered titles (with star, e.
14727 \begin_inset space \thinspace{}
14731 \begin_inset space \space{}
14738 ) are added into table of contents,
14741 \begin_layout Itemize
14742 Additional page styles:
14746 \begin_layout Description
14747 uheadings header with separated lines,
14750 \begin_layout Description
14751 myheadings custom header, contents headers via commands:
14766 \begin_layout Description
14767 myuheadings custom header with separated lines,
14770 \begin_layout Description
14771 outer page number is placed on outer side of page
14775 \begin_layout Itemize
14780 \begin_layout Description
14781 rmheadings serif titles — default,
14784 \begin_layout Description
14785 sfheadings sansserif titles,
14788 \begin_layout Description
14789 authortitle on title page first placed is author next title — default,
14792 \begin_layout Description
14793 titleauthor on title page first placed is title next author,
14796 \begin_layout Description
14797 withmarginpar reserve place on page for margins.
14801 \begin_layout Section
14805 \begin_layout Standard
14810 provides an alternative to the standard
14815 It provides similar functionality, but you might prefer this layout with
14816 sans serif sections, headings, and more.
14819 \begin_layout Section
14823 \begin_layout Standard
14829 \begin_layout Standard
14830 \begin_inset VSpace bigskip
14836 \begin_layout Standard
14841 \begin_inset space ~
14846 textclass works with the American Physical Sociey's RevTeX 4.0 (the
14847 \begin_inset Formula $\beta$
14850 release of May, 1999) class.
14853 \begin_layout Standard
14858 textclass, which works with RevTeX 3.1.
14859 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
14860 That means that it doesn't interact very well with LyX, which requires
14861 LaTeX2e, although it has been kludged to work.
14862 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
14866 \begin_inset space ~
14871 textclass should also be pretty easy to use.
14874 \begin_layout Standard
14875 These documents are supposed to be used in
14879 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
14880 macros, and assume you'll know what to put in the preamble if necessary.
14883 \begin_layout Subsection
14887 \begin_layout Standard
14888 All you need to do is install RevTeX 4, as described in the package's README
14890 The package can be found at The RevTeX 4 Web Site
14891 \begin_inset Flex URL
14894 \begin_layout Plain Layout
14896 http://publish.aps.org/revtex4/
14902 Install it somewhere that LaTeX can see it.
14903 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
14905 \begin_inset space \thinspace{}
14909 \begin_inset space \space{}
14912 not the directory where you installed the class file.) Then, if you reconfigure
14913 LyX, it will find the class file and let you use the RevTeX4 textclass.
14916 \begin_layout Standard
14917 Probably the easiest way to get started is either to import a RevTeX 4 document
14925 \begin_inset space ~
14930 template, found in the templates directory.
14933 \begin_layout Subsection
14937 \begin_layout Standard
14938 Optional arguments to
14945 \begin_inset Quotes eld
14949 \begin_inset Quotes erd
14953 \begin_inset Quotes eld
14957 \begin_inset Quotes erd
14967 \begin_inset space ~
14975 \begin_inset space ~
14981 Remember that in RevTeX, at least one optional argument is required!
14984 \begin_layout Standard
14985 Other preamble matter, like
14992 \begin_inset space ~
14998 \begin_inset space ~
15003 dialog, also as usual.
15006 \begin_layout Subsection
15010 \begin_layout Standard
15011 The layouts basically correspond to the commands in RevTeX4.0.
15012 For example, the Email layout corresponds to
15019 Note that (at least as of RevTeX 4.0 Beta), the
15027 layouts are exactly equivalent, so you shouldn't need to use both.
15031 \begin_layout Plain Layout
15032 In case you're curious, both were included so that
15036 would be able to translate both
15056 \begin_layout Subsection
15060 \begin_layout Standard
15061 There are a couple of important unique aspects of RevTeX 4 which might cause
15062 bugs that will be even more confusing in LyX.
15065 \begin_layout Standard
15083 The LyX equivalent is that there is a separate Thanks layout.
15088 write footnotes in the
15092 layout, or weird things may happen.
15093 See the RevTeX 4 documentation for more details.
15096 \begin_layout Standard
15100 \begin_inset space ~
15108 \begin_inset space ~
15117 layouts must be placed
15125 layout and the corresponding
15142 , the LaTeX won't compile.
15145 \begin_layout Subsection
15149 \begin_layout Standard
15150 The main problem with this layout is that you can't use the optional arguments
15151 to layouts like Email and Title.
15152 (The problem is not unique to this layout; you can't use optional arguments
15153 to the Section layouts either.) This means that after you export that file
15154 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15155 need to edit the LaTeX file with a text editor to add the optional arguments
15157 \begin_inset space \thinspace{}
15161 \begin_inset space \space{}
15164 the running title for the page headers.
15165 Lacking these layouts makes the
15171 (and the equivalent
15177 ) useless, so the corresponding layouts don't exist, and will have to be
15182 \begin_layout Plain Layout
15187 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15188 has not been updated yet to take advantage of it.
15196 \begin_layout Section
15197 Springer Journals (
15204 \begin_layout Standard
15210 \begin_layout Subsection
15214 \begin_layout Standard
15215 These are the layout files for some of the journal formats used by Springer
15216 Verlag and listed on
15217 \begin_inset Flex URL
15220 \begin_layout Plain Layout
15222 http://www.springer.de/author/tex/help-journals.html
15227 , where you should also go to fetch the class files (yes, these are LaTeX2e
15229 It is a modular system: the things common to all journals are implemented
15234 , which journal-specific layout files (such as, e.
15235 \begin_inset space \thinspace{}
15239 \begin_inset space \space{}
15246 for Journal of Geodesy) can include.
15249 \begin_layout Standard
15250 This means that implementing support for any other Springer journal on this
15251 list is as simple as writing your own
15259 file following the outline given in
15267 \begin_layout Standard
15268 It is reasonably well tested only for the Journal of Geodesy.
15277 come with the standard LyX distribution.
15278 Install the relevant class file (downloaded from Springer) in a proper
15279 directory, reconfigure LaTeX (in the teTeX case by running
15283 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15284 and it should work.
15287 \begin_layout Subsection
15291 \begin_layout Standard
15292 A large number of theorem-like styles —
15298 \SpecialChar \ldots{}
15304 \begin_layout Standard
15307 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15308 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15311 See the Springer class file documentation for details.
15314 \begin_layout Subsection
15318 \begin_layout Itemize
15330 \begin_layout Itemize
15333 Probability Theory and Related Fields
15339 — Jean-Marc Lasgouttes
15342 \begin_layout Standard
15343 Add your own, it isn't so hard!
15346 \begin_layout Subsection
15350 \begin_layout Standard
15351 These files are partly based on the older
15355 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15356 file from Springer.
15361 layout, are now defunct.
15362 Jean-Marc Lasgouttes helped out big in making me find my way around the
15363 LyX layout file mechanism.
15366 \begin_layout Subsection
15370 \begin_layout Standard
15372 But probably less than in the old hacked-LaTeX
15379 \begin_layout Standard
15381 \begin_inset space \thinspace{}
15384 g.: does not display the number for theorem-like layouts, just #.
15387 \begin_layout Section
15393 \begin_inset CommandInset label
15402 \begin_layout Standard
15410 \begin_layout Subsection
15414 \begin_layout Standard
15415 This section describes how to use LyX to make slides for overhead projectors.
15416 There are two document classes that can do this: the default slides class
15422 This section documents the former.
15425 \begin_layout Standard
15426 I'm going to say this again, nice and clear, so that there's no misunderstanding
15430 \begin_layout Standard
15431 \begin_inset VSpace bigskip
15437 \begin_layout Standard
15441 This section documents the class
15442 \begin_inset Quotes eld
15450 \begin_inset Quotes erd
15458 \begin_layout Standard
15459 \begin_inset VSpace bigskip
15465 \begin_layout Standard
15466 If you're looking for the documentation for
15467 \begin_inset Quotes eld
15475 \begin_inset Quotes erd
15478 , check out section
15479 \begin_inset space ~
15483 \begin_inset CommandInset ref
15485 reference "sec:foiltex"
15495 \begin_inset Quotes eld
15503 \begin_inset Quotes erd
15506 ] is actually somewhat better than the default
15514 \begin_layout Plain Layout
15515 \SpecialChar \ldots{}
15516 or so I've been told repeatedly by its advocates.
15517 Having never used it, I have no idea if this claim is true or not.
15522 which this section documents.
15525 \begin_layout Standard
15526 This class is the LaTeX2e improvement of the old
15531 Every LaTeX2e distribution includes this class [which I'll just refer to
15533 \begin_inset Quotes eld
15541 \begin_inset Quotes erd
15544 from now on], so you're bound to have it.
15545 As I noted earlier, there are other classes, such as
15549 , which also produce slides for overhead projectors and do a better job
15551 However, there are some things which
15555 can do which the others can't, such as generate overlays.
15556 Read on to learn more!
15559 \begin_layout Subsection
15561 \begin_inset CommandInset label
15563 name "sec:slidesetup"
15570 \begin_layout Standard
15571 Obviously, to use this document class, you need to select
15572 \begin_inset Quotes eld
15580 \begin_inset Quotes erd
15583 from the class list in the
15585 Document\SpecialChar \menuseparator
15589 There are some other special things you should know about this class:
15592 \begin_layout Itemize
15593 Don't bother changing the options
15598 They're not supported by the
15605 \begin_layout Itemize
15609 \begin_inset space ~
15614 behaves a bit differently for this class.
15615 The possible choices and what they do are as follows:
15619 \begin_layout Description
15624 The final output contains page numbers in the lower right corner.
15627 \begin_layout Description
15636 , but also prints out any time markers you've put in.
15637 This is the default.
15640 \begin_layout Description
15645 The final output contains no page numbers, time markers, or alignment markers.
15649 \begin_layout Itemize
15654 class has an extra option:
15660 \begin_inset Quotes eld
15668 \begin_inset Quotes erd
15671 in the extra class options.
15675 \begin_layout Standard
15676 Using this options allows you to add time markers to
15682 \begin_inset space ~
15686 \begin_inset CommandInset ref
15688 reference "sec:slideNote"
15696 \begin_layout Standard
15697 You can also use the template file
15698 \begin_inset Quotes eld
15706 \begin_inset Quotes erd
15709 to automatically set up a document to use the
15715 File\SpecialChar \menuseparator
15717 \begin_inset space ~
15721 \begin_inset space ~
15726 to open your new document].
15727 The template file also contains some examples of the special paragraph
15728 environments used by this class.
15729 I'll describe those next.
15732 \begin_layout Subsection
15733 Paragraph Environments
15736 \begin_layout Subsubsection
15737 Supported Environments
15740 \begin_layout Standard
15741 The first thing you'll notice when you start up a new
15745 document is the font size and type: it's the equivalent of the size
15746 \begin_inset Quotes eld
15754 \begin_inset Quotes erd
15760 \begin_inset space ~
15766 This is also what's used in the output.
15768 \begin_inset Quotes eld
15772 \begin_inset Quotes erd
15775 to remind you that this is a slide.
15776 Your final slides will use a larger font; ergo, you'll have less space.
15777 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
15780 \begin_layout Standard
15781 The next thing that becomes obvious is the changes to the paragraph environment
15782 pull-down box [at the far-left end of the toolbar].
15783 Most of the paragraph environments you're used to seeing are missing.
15784 There are also five new ones.
15789 class itself only supports certain paragraph environments:
15792 \begin_layout Itemize
15798 \begin_layout Itemize
15804 \begin_layout Itemize
15810 \begin_layout Itemize
15816 \begin_layout Itemize
15822 \begin_layout Itemize
15828 \begin_layout Itemize
15834 \begin_layout Itemize
15840 \begin_layout Itemize
15846 \begin_layout Itemize
15852 \begin_layout Itemize
15858 \begin_layout Standard
15859 All of the other standard environments, including the section-heading environmen
15860 ts, aren't used in the
15867 \begin_layout Standard
15868 On the other hand, you'll notice the following new environments:
15871 \begin_layout Itemize
15877 \begin_layout Itemize
15883 \begin_layout Itemize
15889 \begin_layout Itemize
15895 \begin_layout Itemize
15901 \begin_layout Standard
15902 These five are kind of quirky, due to a
15903 \begin_inset Quotes eld
15907 \begin_inset Quotes erd
15911 You see, LyX doesn't permit you to nest any other paragraph environment
15912 into an empty environment.
15913 Now, that's fine and dandy, but it means that you wouldn't be able to start
15914 a slide with anything except plain text.
15915 To deal with this, I've performed a little
15916 \begin_inset Quotes eld
15920 \begin_inset Quotes erd
15926 \begin_layout Subsubsection
15927 Quirks of the New Environments
15928 \begin_inset CommandInset label
15930 name "sec:slideQuirk"
15937 \begin_layout Standard
15938 All five of the new paragraph environments are somewhat quirky due to inherent
15939 limitiations in the current version of LyX.
15940 As I just mentioned, LyX forbids environments that begin with another environme
15942 To get around this, the
15946 environment isn't a paragraph environment as described in the
15954 \begin_layout Standard
15955 You should consider
15968 \begin_inset Quotes eld
15971 pseudo-environments.
15972 \begin_inset Quotes erd
15975 They look like a section heading or a
15976 \begin_inset Quotes eld
15984 \begin_inset Quotes erd
15987 but really begin a [and, if necessary, end the previous] paragraph environment.
15997 \begin_inset Quotes eld
16001 \begin_inset Quotes erd
16004 These two perform some action.
16007 \begin_layout Standard
16008 A common feature of all five environments,
16028 , is a rather long-ish label.
16029 The text following this label — ordinarily the contents of the paragraph
16030 environment — is utterly irrelevant for
16051 LyX completely ignores it.
16052 In fact, you can leave these five environments completely empty.
16056 \begin_layout Standard
16061 to put any text after the rather long-ish label, you might want to.
16062 This could be a short description of the contents of the
16067 In that case, enter in your descriptive comment and hit
16071 as you normally would.
16074 \begin_layout Standard
16075 If, on the other hand, you don't want to enter in any descriptive text,
16076 you'll hit another LyX quirk.
16077 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16078 environment until you put something in the old one.
16082 \begin_layout Itemize
16083 Start entering the text that will
16111 \begin_layout Itemize
16112 Now move to the beginning of that paragraph.
16116 \begin_layout Itemize
16125 \begin_layout Itemize
16126 Finally, change this new, empty paragraph to a
16150 \begin_layout Standard
16151 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16155 \begin_layout Subsection
16156 Making a Presentation with
16169 \begin_layout Subsubsection
16177 \begin_layout Standard
16178 If you're expecting this section to teach you how to actually make a presentatio
16179 n, you'll be sorely disappointed.
16180 Naturally, I'll describe all of the ways the
16184 class can assist you in preparing the materials for a presentation.
16185 Filling in the contents, however, is up to you.
16190 the LyX philosophy.]
16193 \begin_layout Standard
16198 environment [in the manner described in section
16199 \begin_inset space ~
16203 \begin_inset CommandInset ref
16205 reference "sec:slideQuirk"
16209 ] tells LyX to begin a new slide [duh].
16210 The label for this environment/
16211 \begin_inset Quotes erd
16215 \begin_inset Quotes erd
16219 \begin_inset Quotes eld
16223 \begin_inset Quotes erd
16226 in cool blue, followed by the label,
16227 \begin_inset Quotes eld
16231 \begin_inset Quotes erd
16235 Any text or paragraph environments that follow this one go on the new slide.
16239 \begin_layout Standard
16240 Slides are probably the only time you'll need to forcibly end pages in LyX
16241 (this can be specified in the
16246 In fact, you'll want to, once you finish entering the contents of one slide.
16247 If you've entered more text than can physically fit on a slide, the extra
16248 overflows onto a new slide.
16249 I don't recommend doing this, however, since the overflow slide won't have
16250 any page number on it.
16251 Furthermore, it may interfere with any
16255 you've made to accompany the oversized
16262 \begin_layout Standard
16271 environments work the same way as the
16276 They both create an
16277 \begin_inset Quotes eld
16281 \begin_inset Quotes erd
16284 followed by a label [
16285 \begin_inset Quotes eld
16289 \begin_inset Quotes erd
16293 \begin_inset Quotes eld
16297 \begin_inset Quotes erd
16301 The color is a stunning magenta instead of blue, and the
16302 \begin_inset Quotes eld
16306 \begin_inset Quotes erd
16309 will look different, in style and in length.
16310 The label fonts of all three also differ from one another.
16313 \begin_layout Standard
16318 , if the contents of a
16326 exceed the physical size of a slide or sheet of paper, the extra will overflow
16328 Again, you should avoid this.
16329 It defeats the whole purpose of
16340 \begin_layout Subsubsection
16350 \begin_layout Standard
16355 is a slide that sits atop another slide.
16356 Perhaps you wish to discuss a figure on the main
16360 before displaying the text associated with it.
16361 One way to accomplish this is tape a flap of dark paper over the part of
16366 you want to display later.
16367 This method fails, however, if you wish to overlap one graph with another,
16369 You would then have to fumble while speaking to align the two separate,
16374 s to align the two graphs.
16379 environment in both cases makes life much easier.
16382 \begin_layout Standard
16387 receives the page number of its
16388 \begin_inset Quotes eld
16392 \begin_inset Quotes erd
16400 \begin_inset Quotes eld
16408 \begin_inset Quotes erd
16415 \begin_layout Plain Layout
16416 Presumably, mutliple
16421 \begin_inset Quotes eld
16429 \begin_inset Quotes erd
16433 \begin_inset Quotes eld
16441 \begin_inset Quotes erd
16445 \begin_inset Quotes eld
16453 \begin_inset Quotes erd
16457 \begin_inset space ~
16460 appended to the page number of the parent
16470 Clearly, you want the contents of both the
16478 to each fit on a single physical slide! You should probably consider an
16484 \begin_inset Quotes eld
16488 \begin_inset Quotes erd
16500 class provides a visual cue for this: the label at the start of an
16504 is shorter than that at the start of a
16509 Lastly, when you generate printable output, you'll find alignment markers
16510 in all four corners of both the
16514 page and its parent
16519 These will assist you in lining up the two physical slides.
16522 \begin_layout Standard
16523 The major problem in overlaying two slides is aligning the contents of the
16524 two transparencies.
16525 How much space should you leave for that graph on the second slide? Worse
16526 still, what if you want a graph and a sentence on second slide, but there
16527 is text on the main transparency that goes in between them? You could try
16528 and insert vertical space of the right size.
16529 The better way is to use
16540 \begin_layout Standard
16541 As their names imply,
16549 are two command-like paragraph environments that make all subsequent text
16550 invisible and visible, respectively.
16552 \begin_inset space ~
16556 \begin_inset CommandInset ref
16558 reference "sec:slideQuirk"
16562 that you don't place anything
16566 these two environments, however.
16571 , it inserts a centered, sky-blue label into the page reading
16572 \begin_inset Quotes eld
16575 <Invisible Text Follows>
16576 \begin_inset Quotes erd
16580 For paragraphs following this label, the parts of the
16588 ; it doesn't matter which] where they would be contain instead blank space.
16592 \begin_layout Standard
16597 , the corresponding centered label is
16598 \begin_inset Quotes eld
16601 <Visible Text Follows>
16602 \begin_inset Quotes erd
16606 Paragraphs following this label behave normally.
16607 Note that the beginning of a new
16619 automatically shuts off an
16624 It's therefore not necessary to use
16635 \begin_layout Standard
16636 By now, it should be obvious how to create overlay transparencies using
16637 the proper combination of
16656 \begin_layout Enumerate
16661 , including everything that will appear on it, whether on the main slide
16669 \begin_layout Enumerate
16670 Before each figure or paragraph that will appear only on the
16679 If necessary, insert a
16683 environment after the
16690 \begin_layout Enumerate
16695 immediately following the
16702 \begin_layout Enumerate
16703 Copy the contents of this
16714 \begin_layout Enumerate
16719 , change all of the
16730 \begin_layout Standard
16732 You've just made an
16739 \begin_layout Standard
16740 There's one problem with the way I've designed the LyX
16744 class: you can't make text in the middle of a paragraph invisible, nor
16745 make text in the middle of an invisible paragraph visible again.
16746 To accomplish this feat, you'll need to use some inlined LaTeX codes.
16750 \begin_layout Plain Layout
16751 The commands of interest are:
16754 \begin_layout Itemize
16759 invisible \SpecialChar \ldots{}
16763 \begin_layout Itemize
16768 visible \SpecialChar \ldots{}
16772 \begin_layout Plain Layout
16773 \SpecialChar \ldots{}
16774 and need to be marked as TeX.
16776 \begin_inset Quotes eld
16780 \begin_inset Quotes erd
16783 you wish to change goes in between the brackets [and after the
16796 If you don't know how to mark text as TeX, see the appropriate section
16809 \begin_layout Subsubsection
16819 \begin_inset CommandInset label
16821 name "sec:slideNote"
16828 \begin_layout Standard
16837 is associated with a
16838 \begin_inset Quotes eld
16842 \begin_inset Quotes erd
16854 class provides visual cues.
16859 is shorter than that of a
16863 [yet longer than that of an
16867 ] and, like the label of an
16871 is shockingly magenta.
16872 Additionally, the printed
16876 has the page number of its
16877 \begin_inset Quotes eld
16881 \begin_inset Quotes erd
16889 \begin_inset Quotes eld
16897 \begin_inset Quotes erd
16901 \begin_inset Quotes eld
16909 \begin_inset Quotes erd
16913 \begin_inset Quotes eld
16921 \begin_inset Quotes erd
16925 You can have multiple
16929 s associated with a single
16941 , you'll probably want to break up long
16945 s so that they fit on a single sheet of paper.
16948 \begin_layout Standard
16953 is obvious: it contains anything additional you might want to say about
16959 It could also be used as a sheet of reminders for a particular
16964 In the case of the latter, you might want to make use of time markers.
16970 \begin_inset Quotes eld
16974 \begin_inset Quotes erd
16977 support for time markers, a
16982 So, you'll have to resort to using the LaTeX codes.
16985 \begin_layout Standard
16986 To use time markers, you'll need to specify the extra class option
16987 \begin_inset Quotes eld
16995 \begin_inset Quotes erd
16999 \begin_inset space ~
17003 \begin_inset CommandInset ref
17005 reference "sec:slidesetup"
17010 This option turns on timing marks, which will appear in the lower-left-hand
17016 To set what appears in the time marker, you use the LaTeX commands
17017 \begin_inset Quotes eld
17027 \begin_inset Quotes erd
17031 \begin_inset Quotes eld
17041 \begin_inset Quotes erd
17045 The arguments of both commands are time measured in seconds.
17047 \begin_inset Quotes eld
17057 \begin_inset Quotes erd
17060 sets the time marker to a given time.
17062 \begin_inset Quotes eld
17072 \begin_inset Quotes erd
17075 increments the time marker by the specified amount.
17076 Using time markers and
17080 s in this fashion, you can remind yourself how much time to spend on a particula
17088 \begin_layout Standard
17089 There's one last feature to describe.
17090 Clearly, you'd like to print out all of your
17098 s on transparencies while printing all of your
17115 with which it is associated.
17116 What's a person to do?
17119 \begin_layout Standard
17120 Luckily, there are two LaTeX commands that allow you to select what to print
17122 Both must be placed into the preamble of your document.
17124 \begin_inset Quotes eld
17136 \begin_inset Quotes erd
17139 will cause the output to contain only the
17148 Correspondingly, the command
17149 \begin_inset Quotes eld
17161 \begin_inset Quotes erd
17164 prevents the output of anything but
17169 I'd advise placing both commands in the preamble and initially comment
17171 You can then preview your entire presentation as you write.
17172 When you're done writing, you can then uncomment one of the two to select
17173 what you want to print.
17174 I like to uncomment
17175 \begin_inset Quotes eld
17187 \begin_inset Quotes erd
17190 , print to a file with
17191 \begin_inset Quotes eld
17199 \begin_inset Quotes erd
17202 in its name, comment it back out, then uncomment
17203 \begin_inset Quotes eld
17215 \begin_inset Quotes erd
17219 \begin_inset Quotes eld
17227 \begin_inset Quotes erd
17231 I can then send either file to a printer, loading transparencies or plain
17232 paper as appropriate.
17235 \begin_layout Standard
17236 You can also provide other arguments to the
17237 \begin_inset Quotes eld
17247 \begin_inset Quotes erd
17251 \begin_inset Quotes eld
17261 \begin_inset Quotes erd
17265 See a good LaTeX book for details.
17268 \begin_layout Subsection
17273 Class Template File
17276 \begin_layout Standard
17277 I have also provided a template file,
17278 \begin_inset Quotes eld
17286 \begin_inset Quotes erd
17294 To use it, begin your new presentation with
17299 ile\SpecialChar \menuseparator
17301 \begin_inset space ~
17305 \begin_inset space ~
17315 Your new LyX presentation file will contain an example
17336 additionally contain an example of the use of
17345 Lastly, the preamble will contain:
17348 \begin_layout LyX-Code
17349 % Uncomment to print out only slides and overlays
17352 \begin_layout LyX-Code
17356 \begin_layout LyX-Code
17362 \begin_inset Newline newline
17368 \begin_layout LyX-Code
17369 % Uncomment to print out only notes
17372 \begin_layout LyX-Code
17376 \begin_layout LyX-Code
17384 \begin_layout Standard
17385 One final thing: I created this class to support the LaTeX2e
17386 \begin_inset Quotes eld
17394 \begin_inset Quotes erd
17397 class, one of the built-in LaTeX2e classes.
17398 Neither I nor the rest of the LyX Team endorse or oppose the use of this
17399 built-in slide class.
17400 It's here if you want it or need it.
17401 There exist other LaTeX2e classes for creating presentations, such as the
17407 \begin_inset space ~
17411 \begin_inset CommandInset ref
17413 reference "sec:foiltex"
17418 \begin_inset Quotes eld
17426 \begin_inset Quotes erd
17429 package [present on some TeX distributions].
17430 The latter is not yet supported under LyX.
17434 \begin_layout Plain Layout
17435 Perhaps you can take on the task\SpecialChar \ldots{}
17441 I know nothing about these other classes.
17442 Try them out to see what sort of alternative they provide.
17445 \begin_layout Chapter
17446 LyX Features needing Extra Software
17449 \begin_layout Section
17453 \begin_layout Standard
17459 \begin_layout Subsection
17463 \begin_layout Standard
17472 \begin_layout Plain Layout
17477 is not yet available when you are using the LaTeX distribution MiKTeX.
17482 , you'll find in the
17489 \begin_inset space ~
17500 \begin_inset CommandInset href
17502 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17509 \begin_layout Standard
17514 package is a program that was written by
17515 \begin_inset Flex CharStyle:Noun
17518 \begin_layout Plain Layout
17520 \begin_inset space ~
17528 in frustration because some constructs in LaTeX are sometimes non-intuitive,
17529 and easy to forget.
17530 The program runs over your LaTeX file, checks the integrity of the file,
17531 and flags some common errors.
17532 In other technical words, it is
17539 \begin_layout Standard
17540 Well, what is a syntax checker doing in LyX which is supposed to produce
17541 correct LaTeX anyways? The answer is simple: Just as
17545 not only checks the
17549 of C programs, but also does
17553 checks for type-errors,
17557 catches some common
17561 errors, in addition to the syntactical ones.
17566 is capable of detecting several common errors, such as
17569 \begin_layout Itemize
17570 Ellipsis detection:
17571 \begin_inset Newline newline
17574 Use \SpecialChar \ldots{}
17578 \begin_layout Itemize
17579 No space in front of/after parenthesis:
17580 \begin_inset Newline newline
17586 \begin_layout Itemize
17587 Enforcement of normal space after common abbreviations:
17588 \begin_inset Newline newline
17592 \begin_inset space \thinspace{}
17596 \begin_inset space \space{}
17599 is too wide spacing.
17602 \begin_layout Itemize
17603 Enforcement of end-of-sentence space when the last sentence ends with a
17605 \begin_inset Newline newline
17609 And this is wrong spacing.
17612 \begin_layout Itemize
17613 Space in front of labels and similar commands:
17614 \begin_inset Newline newline
17617 The label should stick right up to the text to avoid falling to a wrong
17620 \begin_inset CommandInset label
17630 \begin_layout Plain Layout
17631 This footnote is in danger of falling off to a wrong page
17636 The label is separated too much.
17639 \begin_layout Itemize
17640 Space in front of references, instead of hard spaces:
17641 \begin_inset Newline newline
17644 In you are in bad luck, the text will break right between the referenced
17645 text and reference number, and that's a pity.
17647 \begin_inset CommandInset ref
17649 reference "sec:chktex"
17656 \begin_layout Itemize
17658 \begin_inset Quotes eld
17662 \begin_inset Quotes erd
17666 \begin_inset Formula $\times$
17670 \begin_inset Newline newline
17673 2x2 looks cheap compared to
17674 \begin_inset Formula $2\times2$
17680 \begin_layout Standard
17681 and more \SpecialChar \ldots{}
17682 It is an invaluable tool when you are
17683 \begin_inset Quotes eld
17687 \begin_inset Quotes erd
17690 your document before printing, and you should run it right after the obligatory
17691 spelling check, and before you go fine tuning the typesetting.
17694 \begin_layout Subsection
17698 \begin_layout Standard
17699 If you have the program installed, usage is as simple as choosing
17701 Tools\SpecialChar \menuseparator
17703 \begin_inset space ~
17709 This will make LyX generate a LaTeX file of your document, start
17713 to check it, and then make LyX insert
17714 \begin_inset Quotes eld
17718 \begin_inset Quotes erd
17721 with the warnings from
17725 , if there were any.
17726 The warnings will be placed close to the point of the mistake, and you
17727 can quickly find them by using the
17729 Navigate\SpecialChar \menuseparator
17732 menu item, or the shortcut key
17741 Open the error boxes by clicking on them with the mouse, or use the shortcut
17750 bindings, or the corresponding
17759 Read the warning and correct the mistake, if it is a mistake.
17760 If you have trouble understanding what the warning is about, you can safely
17762 Remember that there is a hidden layer between the document on screen and
17763 the technical details in invoking
17767 , and this gap can make some warnings seem arcane or just right down plain
17771 \begin_layout Standard
17772 This document is an excellent testing bed for the feature, and it should
17773 provide quite a few warnings for you to fiddle with.
17774 Since computers are only so smart, expect most of the warnings to be false
17778 \begin_layout Subsection
17779 How to fine tune it
17782 \begin_layout Standard
17783 Sometimes, you'll find that
17787 makes more noise than suits your mood.
17788 Then you can choose not to use it, wait until your mood changes, or try
17793 to get better along with you.
17794 Another choice in the most desperate situations is to use
17796 View\SpecialChar \menuseparator
17798 \begin_inset space ~
17802 \begin_inset space ~
17806 \begin_inset space ~
17811 , which will get rid of all warnings instantly.
17814 \begin_layout Standard
17823 very configurable and extensible, you shouldn't expect to solve all problems
17829 Since LyX has to generate a somewhat special LaTeX file to be able to match
17830 the line numbers from the
17838 \begin_layout Plain Layout
17839 You can inspect the specific output from
17845 Edit\SpecialChar \menuseparator
17847 \begin_inset space ~
17851 \begin_inset space ~
17865 to the internal document structure, some of the warnings will not seen
17866 to appear correctly.
17867 There are two things you can do about this:
17870 \begin_layout Itemize
17875 invocation command line in
17891 installation configuration file (usually with the file
17896 See below to learn what warnings can be enabled and disabled on the command
17901 \begin_layout Itemize
17902 Export your document as a raw LaTeX file using
17904 File\SpecialChar \menuseparator
17905 Export\SpecialChar \menuseparator
17913 Invoked in this way, it can be a hassle to find the corresponding place
17914 in the document inside LyX, but with a little patience, you should be able
17918 \begin_layout Standard
17919 Here follows the warning messages that can be enabled and disabled in
17928 to disable a warning, and
17932 to enable a warning.
17933 The emphasized entries are disabled by default, because the default is
17936 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
17941 \begin_layout Standard
17942 Notice that you should only use the options that enable and disable warnings,
17943 because LyX relies on some of the other command line parameters to be set
17944 in a specific way to have a chance to communicate with
17951 \begin_layout Enumerate
17955 Command terminated with space.
17958 \begin_layout Enumerate
17961 Non-breaking space (
17962 \begin_inset Quotes eld
17970 \begin_inset Quotes erd
17973 ) should have been used.
17976 \begin_layout Enumerate
17980 You should enclose the previous parenthesis with
17981 \begin_inset Quotes eld
17989 \begin_inset Quotes erd
17995 \begin_layout Enumerate
17998 Italic correction (
17999 \begin_inset Quotes eld
18009 \begin_inset Quotes erd
18012 ) found in non-italic buffer.
18015 \begin_layout Enumerate
18018 Italic correction (
18019 \begin_inset Quotes eld
18029 \begin_inset Quotes erd
18032 ) found more than once.
18035 \begin_layout Enumerate
18039 No italic correction (
18040 \begin_inset Quotes eld
18050 \begin_inset Quotes erd
18056 \begin_layout Enumerate
18060 \begin_inset Quotes eld
18068 \begin_inset Quotes erd
18072 \begin_inset Quotes eld
18080 \begin_inset Quotes erd
18086 \begin_layout Enumerate
18089 Wrong length of dash may have been used.
18092 \begin_layout Enumerate
18096 \begin_inset Quotes eld
18104 \begin_inset Quotes erd
18108 \begin_inset Quotes eld
18116 \begin_inset Quotes erd
18122 \begin_layout Enumerate
18126 \begin_inset Quotes eld
18134 \begin_inset Quotes erd
18140 \begin_layout Enumerate
18144 \begin_inset Quotes eld
18152 \begin_inset Quotes erd
18155 to achieve an ellipsis.
18158 \begin_layout Enumerate
18161 Inter-word spacing (
18162 \begin_inset Quotes eld
18172 \begin_inset Quotes eld
18175 ) should perhaps be used.
18178 \begin_layout Enumerate
18181 Inter-sentence spacing (
18182 \begin_inset Quotes eld
18192 \begin_inset Quotes erd
18195 ) should perhaps be used.
18198 \begin_layout Enumerate
18201 Could not find argument for command.
18204 \begin_layout Enumerate
18208 \begin_inset Quotes eld
18216 \begin_inset Quotes erd
18222 \begin_layout Enumerate
18225 Math mode still on at end of LaTeX file.
18228 \begin_layout Enumerate
18232 \begin_inset Quotes eld
18240 \begin_inset Quotes erd
18243 doesn't match the number of
18244 \begin_inset Quotes eld
18252 \begin_inset Quotes erd
18258 \begin_layout Enumerate
18261 You should use either
18264 \begin_inset Quotes eld
18272 \begin_inset Quotes erd
18277 as an alternative to
18278 \begin_inset Quotes eld
18286 \begin_inset Quotes erd
18292 \begin_layout Enumerate
18299 " (ASCII 39) instead of "
18306 \begin_layout Enumerate
18309 User-specified pattern found.
18312 \begin_layout Enumerate
18315 This command might not be intended.
18318 \begin_layout Enumerate
18325 \begin_layout Enumerate
18343 \begin_layout Enumerate
18346 Delete this space to maintain correct page references.
18349 \begin_layout Enumerate
18353 You might wish to put this between a pair of
18354 \begin_inset Quotes eld
18362 \begin_inset Quotes erd
18368 \begin_layout Enumerate
18371 You ought to remove spaces in front of punctuation.
18374 \begin_layout Enumerate
18377 Could not execute LaTeX command.
18380 \begin_layout Enumerate
18389 in front of small punctuation.
18392 \begin_layout Enumerate
18400 may look prettier here.
18403 \begin_layout Enumerate
18407 Multiple spaces detected in output.
18410 \begin_layout Enumerate
18413 This text may be ignored.
18416 \begin_layout Enumerate
18422 \begin_inset Quotes eld
18427 to begin quotation, not
18434 \begin_layout Enumerate
18441 to end quotation, not
18444 \begin_inset Quotes eld
18452 \begin_layout Enumerate
18458 \begin_layout Enumerate
18461 You should perhaps use
18462 \begin_inset Quotes eld
18470 \begin_inset Quotes erd
18476 \begin_layout Enumerate
18479 You should put a space in front of/after parenthesis.
18482 \begin_layout Enumerate
18485 You should avoid spaces in front of/after parenthesis.
18488 \begin_layout Enumerate
18492 You should not use punctuation in front of/after quotes.
18495 \begin_layout Enumerate
18498 Double space found.
18501 \begin_layout Enumerate
18504 You should put punctuation outside inner/inside display math mode.
18507 \begin_layout Enumerate
18510 You ought to not use primitive TeX in LaTeX code.
18513 \begin_layout Enumerate
18516 You should remove spaces in front of
18517 \begin_inset Quotes eld
18525 \begin_inset Quotes erd
18531 \begin_layout Enumerate
18534 \begin_inset Quotes eld
18542 \begin_inset Quotes erd
18545 is normally not followed by
18546 \begin_inset Quotes eld
18554 \begin_inset Quotes erd
18560 \begin_layout Standard
18561 In later versions of LyX, we hope to provide a more complete interface to
18562 this tool (and it's smaller cousin
18566 ) to exploit the full power of it.
18567 But it's not exactly useless as it is now: go try it on one of your existing
18568 documents of a certain length and be surprised.
18571 \begin_layout Section
18572 Version Control in LyX
18575 \begin_layout Standard
18578 Lars Gullik Bjønnes
18585 \begin_layout Subsection
18589 \begin_layout Standard
18590 A friend of mine wanted to try LyX for a group project.
18591 When he didn't find support for version control or file locking, he dropped
18593 This angered me a bit, so I thought that I should at least make support
18594 for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
18595 This has now been done.
18596 LyX now supports some of the most basic RCS commands.
18597 If you need to something a bit more sophisticated you will have to do that
18598 manually in a terminal.
18601 \begin_layout Standard
18602 Before you begin to use the version control features in LyX, you should
18604 \begin_inset Quotes eld
18608 \begin_inset Quotes erd
18611 (a man file, read it with
18616 This file describes all the basic features of RCS.
18617 You should especially notice the comment about a RCS directory, and the
18618 notion of a master RCS file (the file ending in
18625 \begin_layout Standard
18626 Later basic CVS/SVN support was added.
18627 You should be familiar with CVS/SVN usage before start using it under LyX.
18628 Most of the log messages are not currently displayed after operations -
18629 you can check them in Messages pane if unsure.
18632 \begin_layout Standard
18633 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18634 package—no guarantees are made for older versions.
18637 \begin_layout Standard
18638 For introducing your own external commands consult vc-command in the manual
18642 \begin_layout Subsection
18643 RCS commands in LyX
18646 \begin_layout Standard
18647 The following sections describe the RCS commands supported by LyX.
18648 You can find them in the
18650 File\SpecialChar \menuseparator
18652 \begin_inset space ~
18658 LyX was tested against RCS 5.7.
18661 \begin_layout Subsubsection
18667 \begin_layout Standard
18668 If your document is not under revision control, this is the only item shown
18670 And if it is under revision control, the
18674 item is not visible.
18678 \begin_layout Standard
18679 This command registers your document with RCS (unless you are under the
18680 directory managed by CVS)\SpecialChar \@.
18681 You are asked interactively to supply an initial
18682 description of the document.
18683 The document is now set in Read-Only mode and you have to
18686 \begin_inset space ~
18690 \begin_inset space ~
18694 \begin_inset space ~
18699 , before making any changes to it.
18700 A document under revision control has a
18701 \begin_inset Quotes eld
18704 [RCS:<version> <locker>]
18705 \begin_inset Quotes erd
18708 item tagged to the filename in the minibuffer.
18711 \begin_layout Standard
18712 RCS command that is run:
18714 ci -q -u -i -t-"<initial description>" <file-name>
18717 \begin_layout Standard
18722 to understand the switches.
18726 \begin_layout Subsubsection
18732 \begin_layout Standard
18733 When you are finished editing a file, you check in your changes.
18734 When you do this, you are asked for a description of the changes.
18735 This is stored in the history log.
18736 The version number is bumped, your changes are applied to the master RCS
18737 file, the document is unlocked and set to Read-Only mode.
18741 \begin_layout Standard
18744 ci -q -u -m"<description>" <file-name>
18747 \begin_layout Subsubsection
18753 \begin_layout Standard
18754 By doing this you lock the document so that only you can edit it.
18755 This will also make the document Read-Write only for you.
18756 You will usually continue editing for a while and when you are finished
18757 you check in your changes.
18758 The status line is changed to reflect that you have locked the file.
18762 \begin_layout Standard
18765 co -q -l <file-name>
18768 \begin_layout Subsubsection
18771 Revert To Repository Version
18774 \begin_layout Standard
18775 This will discard all changes made to the document since the last check
18777 You get a warning before changes are discarded.
18780 \begin_layout Standard
18783 co -f -u<version> <file-name>
18786 \begin_layout Subsubsection
18792 \begin_layout Standard
18793 This makes as if the last check in never happened.
18794 No changes are made to the document loaded into LyX, but the last version
18795 is removed from the master RCS file.
18799 \begin_layout Standard
18802 rcs -o<version> <file-name>
18805 \begin_layout Subsubsection
18811 \begin_layout Standard
18812 This show the complete history of the RCS document.
18817 is shown in a browser.
18825 \begin_layout Subsubsection
18829 \begin_layout Standard
18830 LyX supports RCS version number information (only), see
18831 \begin_inset CommandInset ref
18833 reference "sub:VCS-Revision-Information"
18840 \begin_layout Subsection
18841 CVS commands in LyX
18844 \begin_layout Standard
18845 CVS is now partially supported by LyX.
18846 You can find the commands in the
18848 File\SpecialChar \menuseparator
18850 \begin_inset space ~
18856 Focus of the development moved to SVN support, so please use it instead
18857 of CVS if possible.
18860 \begin_layout Subsubsection
18866 \begin_layout Standard
18867 If your document is not under revision control, this is the only item shown
18869 And if it is under revision control, the
18876 item is not visible.
18880 \begin_layout Standard
18881 This command registers in CVS your document ONLY in case you have already
18882 the documents directory under CVS control (in particular
18887 This means you have to checkout the archive by yourself.
18891 \begin_layout Standard
18892 Then you are asked interactively to supply an initial description of the
18894 Don't forget that registered file is not yet commited.
18897 \begin_layout Standard
18898 CVS command that is run:
18901 \begin_inset Quotes erd
18905 \begin_inset Quotes eld
18909 \begin_inset Quotes erd
18915 \begin_layout Standard
18920 to understand the switches.
18924 \begin_layout Subsubsection
18930 \begin_layout Standard
18931 When you are finished editing a file, you commit your changes.
18932 When you do this, you are asked for a description of the changes.
18933 After that changes are commited.
18936 \begin_layout Standard
18939 cvs -q commit -m"<description>" "<file-name>"
18942 \begin_layout Subsubsection
18945 Revert To Repository Version
18948 \begin_layout Standard
18949 This will discard all changes made to the document since the last check
18951 You get a warning before changes are discarded.
18952 Firstly the file is deleted, secondly CVS update command is run.
18955 \begin_layout Standard
18959 \begin_inset Quotes eld
18963 \begin_inset Quotes erd
18969 \begin_layout Subsubsection
18975 \begin_layout Standard
18976 This show the complete history of the CVS document.
18980 \begin_inset Quotes eld
18984 \begin_inset Quotes erd
18989 is shown in a browser.
18992 \begin_layout Subsection
18993 SVN commands in LyX
18996 \begin_layout Standard
18997 SVN is now partially supported by LyX.
18998 You can find the commands in the
19000 File\SpecialChar \menuseparator
19002 \begin_inset space ~
19008 Please note that if you use password protected access to repository via
19009 ssh, you will be asked in terminal window.
19010 LyX was tested against SVN 1.5 and 1.6
19014 \begin_layout Plain Layout
19015 Most of the commands will work with 1.4 too, see
19016 \begin_inset CommandInset ref
19018 reference "sub:SVN-Repo-Update"
19030 \begin_layout Subsubsection
19036 \begin_layout Standard
19037 If your document is not under revision control, this is the only item shown
19039 And if it is under revision control, the
19046 item is not visible.
19050 \begin_layout Standard
19051 This command registers in SVN your document ONLY in case you have already
19052 the documents directory under SVN control (in particular
19057 This means you have to checkout the archive by yourself.
19061 \begin_layout Standard
19062 Then you are asked interactively to supply an initial description of the
19064 Don't forget that registered file is not yet commited.
19067 \begin_layout Standard
19068 SVN command that is run:
19071 \begin_inset Quotes eld
19075 \begin_inset Quotes erd
19081 \begin_layout Standard
19086 to understand the switches.
19090 \begin_layout Subsubsection
19096 \begin_layout Standard
19097 When you are finished editing a file, you commit your changes.
19098 When you do this, you are asked for a description of the changes.
19099 After that changes are commited.
19102 \begin_layout Standard
19107 \begin_layout Plain Layout
19108 In case locking is not enabled.
19110 \begin_inset CommandInset ref
19112 reference "subsec:SVN-File-Locking"
19123 svn commit -q -m"<description>" <file-name>
19126 \begin_layout Subsubsection
19132 \begin_layout Standard
19133 Updates the changes of this file from the repository.
19134 Be sure you understand SVN merging and conflicts resolving before using
19135 this function, because all conflicts has to be resolved manually by you!
19138 \begin_layout Standard
19143 \begin_layout Plain Layout
19151 svn update --non-interactive
19152 \begin_inset Quotes eld
19156 \begin_inset Quotes erd
19162 \begin_layout Subsubsection
19165 Revert To Repository Version
19168 \begin_layout Standard
19169 This will discard all changes made to the document since the last check
19171 You get a warning before changes are discarded.
19175 \begin_layout Standard
19179 \begin_inset Quotes eld
19183 \begin_inset Quotes erd
19189 \begin_layout Subsubsection
19190 \begin_inset CommandInset label
19192 name "sub:SVN-Repo-Update"
19196 Update of the local directory checkout from repository
19200 \begin_layout Plain Layout
19201 Note that this command will work only with subversion
19202 \begin_inset Formula $\geqq1.5$
19213 \begin_layout Standard
19214 All the commands above have one shortcomming - they deal with the current
19216 Once your document contains pictures, includes external
19217 \begin_inset Flex CharStyle:Code
19220 \begin_layout Plain Layout
19226 files and so on administration becomes more complicated.
19227 LyX now supports updating the whole tree in which resides the document
19231 \begin_layout Plain Layout
19232 One need to organize the files structure so that all external files are
19233 in the same directory or subdirectories of the document.
19240 This become especially useful once you cooperate with people which neither
19241 know about subversion management nor they have ambition to commit additional
19242 material to the repository.
19246 \begin_layout Standard
19247 \begin_inset Flex CharStyle:Code
19250 \begin_layout Plain Layout
19251 Update local directory from repository
19256 command updates the whole directory and in case of merge conflicts local
19257 version of the files are left, so no unintended data loss occurs.
19258 If local changes are detected user is warned before update starts.
19261 \begin_layout Labeling
19262 \labelwidthstring 00.00.0000
19264 \begin_inset space ~
19268 \begin_inset space ~
19272 \begin_inset Newline newline
19276 \begin_inset Flex CharStyle:Code
19279 \begin_layout Plain Layout
19285 (Ask if changes are detected.)
19286 \begin_inset Newline newline
19290 \begin_inset Flex CharStyle:Code
19293 \begin_layout Plain Layout
19294 svn update --accept mine-full $path
19302 \begin_layout Standard
19304 \begin_inset Flex CharStyle:Code
19307 \begin_layout Plain Layout
19313 stands for the path to the document.
19316 \begin_layout Subsubsection
19322 \begin_layout Standard
19323 This show the complete history of the SVN document.
19327 \begin_inset Quotes eld
19331 \begin_inset Quotes erd
19336 is shown in a browser.
19339 \begin_layout Subsubsection
19341 \begin_inset CommandInset label
19343 name "subsec:SVN-File-Locking"
19350 \begin_layout Standard
19351 The file exchange through various revision control systems brings the problem
19352 of merge conflicts in case two different users try to edit the same (parts
19354 When such conflict happens it needs manual resolving and one reasonable
19355 alternative is to provide some kind of locking mechanism, which guarantees
19356 that only one user is allowed to edit file at the given time.
19359 \begin_layout Standard
19360 SVN has two mechanisms to provide such kind of mutual exclusivity for file
19361 access - locks and automatical setting of write permissions (see sec.
19363 \begin_inset CommandInset ref
19365 reference "subsec:Automatical-Locking-Property"
19370 \begin_inset Flex CharStyle:Code
19373 \begin_layout Plain Layout
19383 \begin_layout Plain Layout
19384 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
19390 In a case this property is detected for a given document LyX starts to
19391 use SVN locks for document editing automatically and the whole check-in/out
19392 mechanism switches to the same regimen as for RCS.
19393 This in particular means there are two different modes how file is used
19397 \begin_layout Itemize
19399 The loaded file is in the read-only mode.
19400 For editation on needs to check-out.
19405 consists of update from repository and gaining write lock.
19406 If the lock is not possible to obtain, we remain in unlocked state.
19409 \begin_layout Itemize
19411 The loaded file is in the 'normal' edit mode.
19412 No other user is allowed to edit the file.
19417 consists of commiting changes and releasing write-lock.
19418 If no changes have been made to the document, no commit will be produced
19422 \begin_layout Plain Layout
19423 Don't be puzzled by the fact that you will be asked for commit message anyway.
19428 and only the write-lock will be released.
19431 \begin_layout Standard
19435 \begin_layout Labeling
19436 \labelwidthstring 00.00.0000
19439 svn commit -q -m"<description>" "<file-name>"
19440 \begin_inset Newline newline
19443 svn unlock "<file-name>"
19446 \begin_layout Labeling
19447 \labelwidthstring 00.00.0000
19450 svn update "<file-name>"
19451 \begin_inset Newline newline
19454 svn lock "<file-name>"
19457 \begin_layout Subsubsection
19460 \begin_inset CommandInset label
19462 name "subsec:Automatical-Locking-Property"
19468 Automatical Locking Property
19471 \begin_layout Standard
19472 The above mentioned automatical setting of write permissions of the .lyx
19473 file can be set through
19478 ile\SpecialChar \menuseparator
19484 \begin_inset space ~
19487 Control\SpecialChar \menuseparator
19492 oggle locking property
19495 This command is active only when the file is not locked on the svn server
19497 you need to check-out before proceeding).
19500 \begin_layout Labeling
19501 \labelwidthstring 00.00.0000
19503 \begin_inset space ~
19509 \begin_layout Labeling
19510 \labelwidthstring 00.00.0000
19513 svn propset svn:needs-lock ON "<file-name>"
19516 \begin_layout Labeling
19517 \labelwidthstring 00.00.0000
19520 svn propdel svn:needs-lock "<file-name>"
19523 \begin_layout Subsubsection
19524 \begin_inset CommandInset label
19526 name "sub:VCS-Revision-Information"
19530 Revision Information in Documents
19533 \begin_layout Standard
19534 There are more possibilities how to activate revision information in our
19538 \begin_layout Itemize
19539 LyX supports directly:
19543 \begin_layout Itemize
19544 tree revision information (
19545 \begin_inset Flex CharStyle:Code
19548 \begin_layout Plain Layout
19555 The result is the output of the
19556 \begin_inset Flex CharStyle:Code
19559 \begin_layout Plain Layout
19565 command, the following table gives you an idea, how to read the results.
19568 \begin_layout Standard
19570 \begin_inset Tabular
19571 <lyxtabular version="3" rows="6" columns="2">
19572 <features tabularvalignment="middle">
19573 <column alignment="center" valignment="top" width="0">
19574 <column alignment="center" valignment="top" width="0">
19576 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
19579 \begin_layout Plain Layout
19585 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
19588 \begin_layout Plain Layout
19596 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19599 \begin_layout Plain Layout
19605 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19608 \begin_layout Plain Layout
19609 mixed revision working copy
19616 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19619 \begin_layout Plain Layout
19625 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19628 \begin_layout Plain Layout
19629 modified working copy
19636 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19639 \begin_layout Plain Layout
19645 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19648 \begin_layout Plain Layout
19649 switched working copy
19656 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19659 \begin_layout Plain Layout
19665 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19668 \begin_layout Plain Layout
19669 partial working copy, from a sparse checkout
19676 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
19679 \begin_layout Plain Layout
19685 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
19688 \begin_layout Plain Layout
19689 mixed revision, modified, switched working copy
19702 \begin_layout Itemize
19703 file revision information.
19704 The result comes from parsing the output of
19705 \begin_inset Flex CharStyle:Code
19708 \begin_layout Plain Layout
19710 \begin_inset space ~
19714 \begin_inset space ~
19718 \begin_inset space ~
19727 Supported flags are:
19731 \begin_layout Itemize
19732 version number of the last commit (
19733 \begin_inset Flex CharStyle:Code
19736 \begin_layout Plain Layout
19745 \begin_layout Itemize
19746 author of the last commit (
19747 \begin_inset Flex CharStyle:Code
19750 \begin_layout Plain Layout
19759 \begin_layout Itemize
19760 date of the last commit (
19761 \begin_inset Flex CharStyle:Code
19764 \begin_layout Plain Layout
19773 \begin_layout Itemize
19774 time of the last commit (
19775 \begin_inset Flex CharStyle:Code
19778 \begin_layout Plain Layout
19788 \begin_layout Standard
19789 You can obtain this info via InsetInfo (e.g.
19791 \begin_inset Flex CharStyle:Code
19794 \begin_layout Plain Layout
19795 info-insert buffer vcs-date
19801 The information will be available only when you have the file stored under
19802 svn managment (i.e.
19804 \begin_inset Flex CharStyle:Code
19807 \begin_layout Plain Layout
19813 directory is available with your document).
19817 \begin_layout Itemize
19818 Another---a hacking one---possibility is to use svn keywords
19822 \begin_layout Plain Layout
19823 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
19829 In short -- you set file keywords property (e.g.
19832 svn propset svn:keywords 'Rev' file.lyx
19834 ) and then paste keyword ERT
19838 \begin_layout Plain Layout
19839 This is an easy way how to ensure that LyX won't break the line in the middle
19845 tag in your document (e.g.
19850 \begin_layout Plain Layout
19858 This way svn client will automatically substitute revision number (e.g.
19863 \begin_layout Plain Layout
19870 ) after each update and commit.
19871 There are more problems with this approach.
19872 Firstly, the '$' character is used in TeX world for math equations, so
19873 any occurence of math formula
19874 \begin_inset Formula $Rev$
19878 \begin_inset Formula $Rev:59$
19881 in your LyX document.
19882 Similarly for other keywords like Id, Date, Author, etc.
19883 Secondly svn output is dependent on your locales, so its very easy that
19884 svn would produce some problematic strings once Date is used.
19885 Thirdly you get the whole 'Rev: 59' string in your document instead of
19887 Until subversion implements user's custom keywords it will be hard to use
19888 this approach reliably or let LyX to support it directly.
19891 \begin_layout Subsection
19892 SVN and Windows Environment
19895 \begin_layout Quote
19896 My inclination is to say that if the user cannot figure out the command
19897 line operations on their own fairly quickly, they would be well advised
19898 to use TortoiseSVN.
19904 \begin_layout Subsubsection
19908 \begin_layout Standard
19909 In addition to installing LyX, and having access to a Subversion repository,
19910 the user will need to install the Subversion client program.
19911 A Windows installer for the client program is available from
19912 \begin_inset CommandInset href
19915 target "http://www.collab.net/nonav/downloads/subversion/"
19920 The user may also want to install
19921 \begin_inset CommandInset href
19924 target "http://tortoisesvn.tigris.org/"
19928 , which integrates Subversion operations into the context (rightclick) menu
19929 of Windows Explorer.
19930 Operations done outside LyX will typically be more convenient using the
19931 Explorer context menu.
19932 Note that TortoiseSVN is not a replacement for the client program, which
19933 is what LyX itself will use.
19936 \begin_layout Subsubsection
19937 Bringing a document under Subversion control
19940 \begin_layout Standard
19941 Before a LyX document can be brought under version control in Subversion,
19942 its parent directory needs to be under version control.
19943 If the document is being added to a project already in the repository,
19944 this is accomplished by checking the project out to the directory where
19945 the new document will be placed.
19946 If the project itself is not yet under version control (for instance, if
19947 this document starts a new project), the directory must be imported into
19949 This is done outside LyX.
19950 Both import and checkout are easily accomplished from the Explorer context
19951 menu using TortoiseSVN, or alternatively can be done using the command
19952 line client at a DOS prompt.
19953 The procedure for importing the project using TortoiseSVN is described
19954 below, assuming an existing repository and a new project being started
19962 For information on using the Subversion client program, run
19969 \begin_layout Enumerate
19976 in Windows Explorer, right click it, and select
19978 TortoiseSVN > Repo-browser
19981 If necessary, adjust the URL for the repository, then click OK.
19984 \begin_layout Enumerate
19985 Right click the level of the repository under which you want to place the
19986 new project folder (typically the top level) and click
19988 Create folder\SpecialChar \ldots{}
19991 Supply a name for the project folder and click OK.
19992 Add a message for the log file if desired, then click OK again.
19993 The new project folder should appear in the repository.
19994 Finally, click OK again to exit the repository browser.
19997 \begin_layout Enumerate
19998 Once again right click
20004 , this time selecting SVN Checkout\SpecialChar \ldots{}
20005 Select the URL of the project folder
20006 you just created in the repository, and set the checkout directory to
20014 You will be warned about a non-empty folder; click OK to proceed.
20015 You should now have a
20026 \begin_layout Enumerate
20027 Create or open your document in LyX and click
20032 ile\SpecialChar \menuseparator
20038 \begin_inset space ~
20041 Control\SpecialChar \menuseparator
20049 Add a log message and click OK to commit the document to version control.
20052 \begin_layout Standard
20053 From this point onward, you should have full functionality in the
20058 ile\SpecialChar \menuseparator
20064 \begin_inset space ~
20070 You also have the option of checking the document in and out, viewing its
20072 using the TortoiseSVN context menu in Windows Explorer or the Subversion
20073 client program from a command prompt.
20076 \begin_layout Subsubsection
20077 SSH tunel used with SVN under Windows
20080 \begin_layout Standard
20081 Compared to linux setting svn client to communicate over ssh under Windows
20082 is rather troublesome task.
20083 We will at least make some hints how to setup client side but former knowledge
20084 about ssh and Windows command line is needed, also be prepared for a great
20085 deal of frustration...
20088 \begin_layout Enumerate
20089 Get svn client for windows, as described in previous sections.
20090 When it is fresh install run some svn command (e.g.
20092 \begin_inset Flex CharStyle:Code
20095 \begin_layout Plain Layout
20101 ) to have created config files, which you will need to change later on.
20104 \begin_layout Enumerate
20105 Choose ssh client for Windows.
20106 There are more possibilities, we will use the one from Putty tools
20110 \begin_layout Plain Layout
20111 \begin_inset Flex URL
20114 \begin_layout Plain Layout
20116 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20127 You will need to automatize connection, so client doesn't ask for any password
20129 To keep things easy we will use only keys without any additional password
20134 \begin_layout Enumerate
20136 \begin_inset Flex CharStyle:Code
20139 \begin_layout Plain Layout
20146 Save your private .ppk key file and put the public one on the server side.
20147 In case the SVN server runs on linux, note that the format of the public
20148 key is not compatible with linux openssh and you will need to direcly copy-past
20149 e the key from the “
20151 Public key for pasting into OpenSSH authorized_keys file
20153 :” edit field into the server's
20154 \begin_inset Flex CharStyle:Code
20157 \begin_layout Plain Layout
20158 ~/.ssh/authorized_keys
20164 \begin_inset Flex CharStyle:Code
20167 \begin_layout Plain Layout
20176 \begin_layout Enumerate
20178 \begin_inset Flex CharStyle:Code
20181 \begin_layout Plain Layout
20188 In the SVN config file
20192 \begin_layout Plain Layout
20193 Exact path depends on Windows version, usually somewhere around
20194 \begin_inset Flex CharStyle:Code
20197 \begin_layout Plain Layout
20200 Documents and Settings
20214 \begin_inset Flex CharStyle:Code
20217 \begin_layout Plain Layout
20232 , section [tunnels], setup ssh command, e.g.
20234 \begin_inset Flex CharStyle:Code
20237 \begin_layout Plain Layout
20238 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20247 \begin_layout Plain Layout
20248 It will usually take a lot of time to get exact command right and it depends
20250 For example do not have some remote server saved as a default session in
20252 If things fail, try to connect via plink without SVN first.
20261 \begin_layout Enumerate
20262 Checkout the SVN archive, e.g.
20264 \begin_inset Flex CharStyle:Code
20267 \begin_layout Plain Layout
20268 svn co svn+ssh://user@server/repository_path
20276 \begin_layout Subsection
20280 \begin_layout Standard
20281 With the recent addition of the vc-command function LyX power users are
20282 allowed to create their own commands for revision control.
20285 \begin_layout Standard
20286 As an example you can see how two TortoiseSVN commands could be integrated
20290 \begin_layout Description
20292 \begin_inset Flex CharStyle:Code
20295 \begin_layout Plain Layout
20296 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
20304 \begin_layout Description
20306 \begin_inset Flex CharStyle:Code
20309 \begin_layout Plain Layout
20310 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
20318 \begin_layout Section
20319 Literate Programming
20322 \begin_layout Standard
20327 (kayvan@sylvan.com)
20331 original documentation written by
20333 Edmar Wienskoski Jr.
20336 (edmar-w-jr@technologist.com)
20339 \begin_layout Subsection
20343 \begin_layout Standard
20344 The main purpose of this documentation is to show you how to use LyX for
20345 literate programming.
20346 Where it is assumed that you are familiar with this programming technique,
20348 \begin_inset Quotes eld
20352 \begin_inset Quotes erd
20356 \begin_inset Quotes eld
20360 \begin_inset Quotes erd
20364 If that is not the case, please follow the web links provided in the following
20366 There is a lot of good documentation out there covering old development
20367 history to the latest tools tips.
20370 \begin_layout Standard
20371 It is also assumed that you are familiar with LyX itself to a point that
20372 you are comfortable changing your LyX preferences, and X resources file.
20373 If that is not the case please refer to other LyX documentation to cover
20374 your specific needs.
20377 \begin_layout Subsection
20378 Literate Programming
20381 \begin_layout Standard
20382 From the Literate Programming FAQ:
20385 \begin_layout Quotation
20386 Literate programming is the combination of documentation and source together
20387 in a fashion suited for reading by human beings.
20388 In fact, literate programs should be enjoyable reading, even inviting!
20389 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
20390 and documentation in a single file.
20391 Literate programming tools then parse the file to produce either readable
20392 documentation or compilable source.
20393 The WEB style of literate programming was created by D.
20394 \begin_inset space \thinspace{}
20398 Knuth during the development of his TeX typesetting software.
20402 \begin_layout Standard
20403 Another excerpt says:
20406 \begin_layout Quotation
20409 How is literate programming different from verbose commenting?
20412 \begin_layout Quotation
20413 There are three distinguishing characteristics.
20414 In order of importance, they are:
20418 \begin_layout Itemize
20419 flexible order of elaboration
20422 \begin_layout Itemize
20423 automatic support for browsing
20426 \begin_layout Itemize
20427 typeset documentation, especially diagrams and mathematics
20431 \begin_layout Standard
20432 Now that I sparked your curiosity, take a look in the references.
20435 \begin_layout Subsubsection
20439 \begin_layout Standard
20440 The complete Literate Programming FAQ can be found at:
20443 \begin_layout Quote
20444 Literate Programming FAQ
20445 \begin_inset Flex URL
20448 \begin_layout Plain Layout
20450 http://shelob.ce.ttu.edu/daves/lpfaq/faq.html
20458 \begin_layout Standard
20459 The FAQ lists 23 (twenty three!) different literate programming tools.
20460 Where some are specialized or
20461 \begin_inset Quotes eld
20465 \begin_inset Quotes erd
20468 for particular programming languages, while other have general scope.
20473 for my own use for several reasons:
20476 \begin_layout Itemize
20477 It can generate the documentation either in LaTeX or HTML.
20480 \begin_layout Itemize
20481 It has a open architecture, i.
20482 \begin_inset space \thinspace{}
20486 \begin_inset space \space{}
20489 it is easy to plug in new filters and to perform special processing that
20494 \begin_layout Itemize
20495 There is a good selection of filters available already (the HTML is one
20499 \begin_layout Itemize
20503 \begin_layout Standard
20504 The Noweb web page can be found at:
20507 \begin_layout Quote
20509 \begin_inset Flex URL
20512 \begin_layout Plain Layout
20514 http://www.cs.virginia.edu/~nr/noweb/
20522 \begin_layout Standard
20523 Starting from there you can reach many other interesting links and even
20524 some literate program examples.
20527 \begin_layout Subsection
20528 LyX and Literate Programming
20531 \begin_layout Standard
20532 The LyX support for Literate Programming is provided by using the generic
20533 LyX converters mechanism.
20534 This support is provided in a
20535 \begin_inset Quotes eld
20539 \begin_inset Quotes erd
20543 \begin_inset space \thinspace{}
20547 \begin_inset space \space{}
20550 you will be able to use this new LyX feature with some other literate programmin
20551 g tool of your choice by just changing your LyX preferences.
20554 \begin_layout Subsubsection
20555 Generating documents and code (weaving and tangling)
20558 \begin_layout Paragraph
20559 Selecting the document class
20562 \begin_layout Standard
20563 If you have installed Noweb and LyX successfully, whenever you open a new
20564 document or try to change the document class of an existing one, you will
20565 find that there are three new document classes available:
20568 \begin_layout Itemize
20572 \begin_layout Itemize
20576 \begin_layout Itemize
20580 \begin_layout Standard
20581 You must select one of them to create your literate documents from.
20585 \begin_layout Standard
20586 Note that literate documents are not limited to these three classes.
20587 New classes can be generated from other styles like letter or in combination
20588 with other class variations like Article (AMS).
20589 If you have special needs that cannot be covered by one of the existing
20590 classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
20591 will arrange to insert a new entry, or teach you how to do it.
20595 \begin_layout Plain Layout
20596 It is very simple, it involves the creation of a file with four lines, and
20597 re-running of the auto configuration.
20602 Moreover, if you use a literate tool other than Noweb you may need to create
20603 a new set of document classes for it.
20606 \begin_layout Paragraph
20610 \begin_layout Standard
20611 LyX enables you to write code with a layout named
20619 \begin_layout Plain Layout
20620 The equivalent Noweb term is
20621 \begin_inset Quotes eld
20625 \begin_inset Quotes erd
20629 For historical reasons, I got used to the term
20630 \begin_inset Quotes eld
20634 \begin_inset Quotes erd
20637 introduced by other literate tool named Nuweb, which I used for many years
20638 before rendering myself to Noweb.
20643 Noweb delimits scraps like this:
20646 \begin_layout LyX-Code
20650 \begin_layout LyX-Code
20654 \begin_layout LyX-Code
20658 \begin_layout LyX-Code
20662 \begin_layout LyX-Code
20666 \begin_layout Standard
20667 The problem is that whatever is written in between the << and the
20671 must be taken literally, i.
20672 \begin_inset space \thinspace{}
20676 \begin_inset space \space{}
20679 LyX should be prevented from making any special interpretation of what has
20681 This is handled by a special layout named Scrap, that works like a normal
20682 paragraph but has a free spacing capability.
20685 \begin_layout Standard
20686 The down side of the Scrap paragraph layout is that consecutive paragraphs
20687 of code will be spaced with one empty line in the source code and also
20688 in the printed documentation.
20689 The work around is to enter each line of code within a single Scrap, with
20690 a newline (ctrl-return).
20691 The example above will look like this:
20695 \begin_layout Plain Layout
20696 If you have a printed version of this document you will not see any difference
20697 between the previous example and this one.
20705 \begin_layout LyX-Code
20707 \begin_inset Newline newline
20711 \begin_inset Newline newline
20715 \begin_inset Newline newline
20719 \begin_inset Newline newline
20725 \begin_layout Standard
20726 This layout works fine.
20727 The only real inconvenience is that you have to type ctrl-return instead
20732 \begin_layout Plain Layout
20733 It is in my list of
20734 \begin_inset Quotes eld
20738 \begin_inset Quotes erd
20749 \begin_layout Standard
20750 As a special note, you can also use the
20751 \begin_inset Quotes eld
20755 \begin_inset Quotes erd
20758 construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
20762 \begin_layout LyX-Code
20764 \begin_inset Newline newline
20767 def some_function(args):
20768 \begin_inset Newline newline
20771 "This is the doc string for this function."
20772 \begin_inset Newline newline
20775 print "My args: ", args
20778 \begin_layout LyX-Code
20779 @ %def some_function
20782 \begin_layout Standard
20783 For an example of this usage and the resulting cross-reference output, look
20784 at the Literate python program in
20786 LIBDIR/examples/listerrors.lyx
20788 which should make this all clear.
20791 \begin_layout Paragraph
20792 Generating the documentation
20795 \begin_layout Standard
20796 At this point you already have a new document file with a proper document
20797 class, and with some code and text on it.
20798 How do I print it? The answer is simple, you select
20800 View\SpecialChar \menuseparator
20804 Just like you would do for a plain document.
20805 No special procedure is required.
20808 \begin_layout Standard
20809 To help orientate you, I will now explain what happens inside LyX:
20812 \begin_layout Enumerate
20815 Update\SpecialChar \menuseparator
20818 menu option is chosen, a LaTeX file is generated.
20823 \begin_layout Standard
20824 If the document is of any literate class the generated file will be named
20825 with an extension name defined by the
20826 \begin_inset Quotes eld
20830 \begin_inset Quotes erd
20833 format (defined in the Preferences panel), otherwise the file will have
20842 \begin_layout Enumerate
20843 Note that the only difference so far is in the name of the file, no special
20844 processing is required by LyX.
20845 Given that you formatted the code using the Scrap layout that, by itself,
20846 takes care of the business.
20849 \begin_layout Enumerate
20850 If the document is of any literate class LyX will then use the internal
20851 LyX to Noweb converter, followed by the Noweb to LaTeX converter
20855 \begin_layout Plain Layout
20856 The converters are defined in the
20858 Tools\SpecialChar \menuseparator
20862 \begin_inset Quotes eld
20866 \begin_inset Quotes erd
20878 manual for general information about converters.
20883 to generate the LaTeX file.
20887 \begin_layout Standard
20888 Otherwise it will just skip this step.
20892 \begin_layout Enumerate
20893 Finally, LaTeX is invoked and the regular post processing continues as in
20897 \begin_layout Standard
20898 Independence from a particular
20899 \begin_inset Quotes eld
20903 \begin_inset Quotes erd
20906 is easily achieved by changing the commands that are run by the various
20910 \begin_layout Paragraph
20911 Generating the code
20914 \begin_layout Standard
20915 When the build menu option is chosen or the corresponding button in the
20916 toolbar is pressed, a LaTeX file is generated just like step 1 above.
20917 Next, LyX invokes the
20922 This converter needs to be defined by the user and is not installed by
20923 default, though the Program format is.
20924 This converter (like any other converter) will have two parts:
20927 \begin_layout Enumerate
20928 The converter program itself.
20929 This program performs the conversion from the one format to the other (in
20930 this case, from the Noweb format to the Program pseudo-format).
20933 \begin_layout Enumerate
20934 The error log parser.
20935 This is a program whose sole purpose is to rewrite error messages in a
20936 format that LyX understands.
20937 This makes it possible for LyX to place error boxes in the right places
20938 in the file buffer.
20941 \begin_layout Standard
20942 The first part, the
20943 \begin_inset Quotes eld
20947 \begin_inset Quotes erd
20950 setting, should be set to
20951 \begin_inset Quotes eld
20959 \begin_inset Quotes erd
20963 This basically means that LyX will call
20964 \begin_inset Quotes eld
20968 \begin_inset Quotes erd
20971 (a program or script) with the name of the Noweb file (normally a file
20972 in the LyX temp directory).
20976 \begin_layout Standard
20977 This is an implementation of
20978 \begin_inset Quotes eld
20982 \begin_inset Quotes erd
20985 that you can place in a directory on your path:
20988 \begin_layout LyX-Code
20992 \begin_layout LyX-Code
20996 \begin_layout LyX-Code
20997 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
21000 \begin_layout Standard
21001 The next part of the converter setting is the
21002 \begin_inset Quotes eld
21006 \begin_inset Quotes erd
21009 which is to be set to
21010 \begin_inset Quotes eld
21015 parselog=listerrors
21018 \begin_inset Quotes erd
21022 This will run any errors that are generated by the
21023 \begin_inset Quotes eld
21027 \begin_inset Quotes erd
21030 process through the
21031 \begin_inset Quotes eld
21035 \begin_inset Quotes erd
21041 \begin_layout Standard
21042 The converter code looks in
21050 then on the path for the
21051 \begin_inset Quotes eld
21055 \begin_inset Quotes erd
21061 \begin_layout Standard
21062 The build will normally take place in LyX's temporary directory, so the
21063 files produced by the conversion will be in that directory.
21064 LyX will copy out what it regards as the `main' file, but the
21068 conversion may produce several files, and so most of these would then be
21069 deleted when LyX was closed.
21070 The present solution is to use a `copier',
21074 \begin_layout Plain Layout
21083 manual for information on these.
21092 script in its default mode, so that the entire contents of the temporary
21093 directory is copied.
21094 More will get copied than is needed, to be sure, but nothing will be lost.
21095 If, however, you know what extensions the generated files will have, this
21096 can be improved by using the
21105 This option takes a comma-separated list of extensions to copy.
21106 So, for example, if the conversion will generate only files with the extensions
21115 , then the correct definition would be:
21118 \begin_layout LyX-Code
21119 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
21122 \begin_layout Standard
21123 The result will be that only files with these two extensions will be copied
21127 \begin_layout Paragraph
21128 Build instructions in the document
21131 \begin_layout Standard
21132 The last piece of the integration between LyX and noweb is the
21133 \begin_inset Quotes eld
21137 \begin_inset Quotes erd
21141 Generally, the instructions for building your program should be embedded
21142 in a scrap of its own.
21144 \begin_inset Quotes eld
21148 \begin_inset Quotes erd
21151 above uses the notangle command to look for this scrap (called
21152 \begin_inset Quotes eld
21156 \begin_inset Quotes erd
21159 ) and runs its contents through
21160 \begin_inset Quotes eld
21164 \begin_inset Quotes erd
21170 \begin_layout Standard
21171 Typically, such a scrap would look something like this:
21174 \begin_layout LyX-Code
21176 \begin_inset Newline newline
21180 \begin_inset Newline newline
21184 \begin_inset Newline newline
21187 if [ -z "${NOWEB_SOURCE}" ]
21188 \begin_inset Newline newline
21192 \begin_inset Newline newline
21195 NOWEB_SOURCE=myfile.nw
21196 \begin_inset Newline newline
21200 \begin_inset Newline newline
21204 code to extract files ...]
21205 \begin_inset Newline newline
21209 code to compile files ...]
21210 \begin_inset Newline newline
21216 \begin_layout Standard
21219 LIBDIR/examples/listerrors.lyx
21223 LIBDIR/examples/Literate.lyx
21225 which implement two versions of the
21226 \begin_inset Quotes eld
21230 \begin_inset Quotes erd
21233 program for some illustrations of how all of these pieces go together or
21236 LIBDIR/examples/noweb2lyx.lyx.
21239 Interestingly, these three files show off the language-indepence of the
21240 LyX literate programming support since they are written in Python, C and
21244 \begin_layout Subsubsection
21248 \begin_layout Standard
21249 All the Literate Programming support is configured by the
21251 Tools\SpecialChar \menuseparator
21255 \begin_inset Quotes eld
21259 \begin_inset Quotes erd
21263 The important parts are:
21266 \begin_layout Description
21268 \begin_inset space ~
21272 \begin_inset Quotes eld
21276 \begin_inset Quotes erd
21280 \begin_inset space ~
21283 format Set up via the Formats tab, this is where the Noweb-specific pieces
21293 , the file extension is set to
21298 This tells LyX to create a file with a
21302 extension in the first step of the conversion process.
21305 \begin_layout Description
21307 \begin_inset space ~
21315 \begin_inset space ~
21318 format This is an empty format whose sole purpose is to be the endpoint
21319 of a conversion (which then allows us to set up a converter for it).
21322 \begin_layout Description
21331 This converter performs the
21332 \begin_inset Quotes eld
21336 \begin_inset Quotes erd
21339 of the literate document.
21340 For Noweb, it is set to
21341 \begin_inset Quotes eld
21346 noweave -delay -index $$i > $$o
21349 \begin_inset Quotes erd
21355 \begin_layout Description
21365 \begin_inset Quotes eld
21369 \begin_inset Quotes erd
21373 As stated above, the Converter is set to
21374 \begin_inset Quotes eld
21382 \begin_inset Quotes erd
21385 , with Flags set to
21386 \begin_inset Quotes eld
21391 originaldir,parselog=listerrors
21394 \begin_inset Quotes erd
21400 \begin_layout Subsubsection
21404 \begin_layout Standard
21405 There is also a new function implemented in the LyX server, the
21406 \begin_inset Quotes eld
21409 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
21413 \begin_layout Standard
21414 When debugging code with ddd/gdb, it is possible to invoke a text editor
21415 at the current execution position with a single key stroke.
21416 The default ddd configuration for that is shift-ctrl-V.
21417 It happens that you can define the editor command line invocation in ddd
21420 Edit\SpecialChar \menuseparator
21421 Preferences\SpecialChar \menuseparator
21424 dialog and changing the "Edit Sources" entry.
21427 \begin_layout Standard
21428 I take advantage of the new created LyX server function and this ddd feature,
21430 \begin_inset Quotes eld
21434 \begin_inset Quotes erd
21440 \begin_layout LyX-Code
21441 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
21444 \begin_layout Standard
21445 With this, whenever you are using ddd and find a point in the program that
21446 you want to edit, you just press shift-ctrl-V (in the ddd window), and
21447 ddd you forward this information to LyX through the LyX server and then
21448 the LyX window will show the same file with the cursor at the same position
21449 ddd was pointing to.
21450 No more guessing or long scrolling to locate a point in the program back
21454 \begin_layout Standard
21455 Note however that you must enable the LyX server to get this feature working
21456 (it is disabled by default).
21457 You can enable it in
21469 ) by entering in the
21474 \begin_inset Quotes eld
21479 /home/<your-home-directory>/.lyx/lyxpipe
21482 \begin_inset Quotes erd
21488 \begin_layout Standard
21489 Read the LyX server documentation in the
21491 Customization Manual
21493 for further information.
21496 \begin_layout Subsubsection
21500 \begin_layout Standard
21501 There are six new buttons that can be added to your LyX toolbar.
21502 Five of these buttons are short cuts to layout styles:
21523 The last one is a short cut to the
21524 \begin_inset Quotes eld
21528 \begin_inset Quotes erd
21535 \begin_layout Standard
21536 LyX has a range of buttons that are available for tool bar customization.
21537 In my toolbar I like to combine the six short cuts above with two more:
21542 \SpecialChar \menuseparator
21547 \SpecialChar \menuseparator
21554 View\SpecialChar \menuseparator
21558 Here is how it looks like:
21561 \begin_layout LyX-Code
21565 \begin_layout LyX-Code
21569 \begin_layout LyX-Code
21570 Icon "layout Standard"
21573 \begin_layout LyX-Code
21574 Icon "layout Section"
21577 \begin_layout LyX-Code
21578 Icon "layout LaTeX"
21581 \begin_layout LyX-Code
21582 Icon "layout LyX-Code"
21585 \begin_layout LyX-Code
21586 Icon "layout Scrap"
21589 \begin_layout LyX-Code
21593 \begin_layout LyX-Code
21597 \begin_layout LyX-Code
21598 Icon "buffer-typeset"
21601 \begin_layout LyX-Code
21602 Icon "build-program"
21605 \begin_layout LyX-Code
21609 \begin_layout LyX-Code
21613 \begin_layout LyX-Code
21617 \begin_layout LyX-Code
21621 \begin_layout LyX-Code
21625 \begin_layout Subsubsection
21626 Colors customization
21629 \begin_layout Standard
21630 There are a number of colors in LyX that can be customized in
21635 One of the things that bothers people is the LaTeX font color.
21636 The default color is red, since the scraps uses LaTeX font, and there is
21637 a lot of scraps in literate documents, you may get tired of seeing everything
21639 You can change it by going to the tabs
21648 \begin_layout Standard
21649 The next thing is the visible presence of the newline character in the screen.
21650 You can choose the color of this particular character and make it blend
21652 I recommend you choosing a color that is close to the background but not
21653 equal, that way you still can see it is there, but it is not bothering
21658 \begin_layout Chapter
21659 Secrets of the LaTeX Masters
21660 \begin_inset CommandInset label
21669 \begin_layout Standard
21670 Though LyX is a powerful tool, it cannot hope to support everything that
21671 can be done with pure TeX/LaTeX.
21672 However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
21673 as long as you are not afraid to use that
21674 \begin_inset Quotes eld
21678 \begin_inset Quotes erd
21681 button on the toolbar or add things to the LaTeX preamble.
21682 This section lists some tips, tricks, and otherwise cool ideas to give
21683 your document that extra little flair.
21686 Do try this at home
21688 , just start with something a little smaller and less important than your
21692 \begin_layout Standard
21693 Most ideas in this section require less common files in your LaTeX installation.
21694 If you have a system like teTeX, most will already be available.
21695 A few, however, will need to be downloaded from one of the CTAN archives.
21696 Often, there are several ways to do something, or several LaTeX style files
21697 which do the same thing.
21698 We do not endorse one choice over another, we simply claim that we have
21699 done a particular task with a particular file.
21700 Put on your wizard hat, keep an eye out for dragons, and let us begin.
21703 \begin_layout Section
21707 \begin_layout Standard
21710 Lars Gullik Bjønnes
21713 \begin_layout Subsection
21717 \begin_layout Standard
21718 The aim for this chapter
21722 \begin_layout Plain Layout
21723 Editor's note: Lars' original chapter was a masterful description of how
21729 However, it was too long to flow smoothly in this document.
21730 I have therefore chosen to excerpt the most important sections here (sorry,
21731 Lars); you can read the original chapter (and more of the story!) in the
21734 examples/multicol.lyx
21742 is to show how the LaTeX package
21746 can be used in a LyX document.
21747 As LyX doesn't support the
21751 package natively yet, we have to use some small hacks.
21752 By reading this section it should be obvious how to do this.
21755 \begin_layout Subsection
21759 \begin_layout Standard
21764 package allows switching between one and multicolumn format on the same
21766 Footnotes are handled correctly (for the most part), but will be placed
21767 at the bottom of the page and not under each column.
21768 LaTeX's float mechanism, however, is partly disabled in the current implementat
21770 At the moment only page-wide floats can be used within the scope of the
21774 \begin_layout Subsection
21778 \begin_layout Subsubsection
21782 \begin_layout Standard
21783 If you want to have two columns in your text, you have use LaTeX mode to
21788 begin{multicols}{2}
21790 at the point where you want the two column layout to start, and then
21796 where you want it to end.
21800 \begin_layout Standard
21804 \begin_layout Plain Layout
21808 begin{multicols}{2}
21816 \begin_layout Standard
21821 The Adventure of the Empty House
21824 \begin_inset Newline newline
21829 Sir Arthur Conan Doyle
21832 \begin_layout Standard
21835 It was in the spring of the year 1894 that all London was interested, and
21836 the fashionable world dismayed, by the murder of the Honourable Ronald
21837 Adair under most unusual and inexplicable circumstances.
21838 The public has already learned those particulars of the crime which came
21839 out in the police investigation, but a good deal was suppressed upon that
21840 occasion, since the case for the prosecution was so overwhelmingly strong
21841 that it was not necessary to bring forward all the facts.
21842 Only now, at the end of nearly ten years, am I allowed to supply those
21843 missing links which make up the whole of that remarkable chain.
21844 The crime was of interest in itself, but that interest was as nothing to
21845 me compared to the inconceivable sequel, which afforded me the greatest
21846 shock and surprise of any event in my adventurous life.
21847 Even now, after this long interval, I find myself thrilling as I think
21848 of it, and feeling once more that sudden flood of joy, amazement, and increduli
21849 ty which utterly submerged my mind.
21850 Let me say to that public, which has shown some interest in those glimpses
21851 which I have occasionally given them of the thoughts and actions of a very
21852 remarkable man, that they are not to blame me if I have not shared my knowledge
21853 with them, for I should have considered it my first duty to do so, had
21854 I not been barred by a positive prohibition from his own lips, which was
21855 only withdrawn upon the third of last month.
21858 \begin_layout Standard
21862 \begin_layout Plain Layout
21874 \begin_layout Subsubsection
21878 \begin_layout Standard
21879 The same pattern is used when you want more than two columns:
21882 \begin_layout Standard
21886 \begin_layout Plain Layout
21890 begin{multicols}{3}
21898 \begin_layout Standard
21901 It can be imagined that my close intimacy with Sherlock Holmes had interested
21902 me deeply in crime, and that after his disappearance I never failed to
21903 read with care the various problems which came before the public.
21904 And I even attempted, more than once, for my own private satisfaction,
21905 to employ his methods in their solution, though with indifferent success.
21906 There was none, however, which appealed to me like this tragedy of Ronald
21908 As I read the evidence at the inquest, which led up to a verdict of willful
21909 murder against some person or persons unknown, I realized more clearly
21910 than I had ever done the loss which the community had sustained by the
21911 death of Sherlock Holmes.
21912 There were points about this strange business which would, I was sure,
21913 have specially appealed to him, and the efforts of the police would have
21914 been supplemented, or more probably anticipated, by the trained observation
21915 and the alert mind of the first criminal agent in Europe.
21916 All day, as I drove upon my round, I turned over the case in my mind and
21917 found no explanation which appeared to me to be adequate.
21918 At the risk of telling a twice-told tale, I will recapitulate the facts
21919 as they were known to the public at the conclusion of the inquest.
21922 \begin_layout Standard
21926 \begin_layout Plain Layout
21938 \begin_layout Standard
21939 You can have more than 3 columns if you want to, but that might not be very
21940 pleasant for the eye.
21943 \begin_layout Subsubsection
21944 Columns inside columns
21947 \begin_layout Standard
21948 You can even have columns inside columns:
21951 \begin_layout Standard
21955 \begin_layout Plain Layout
21959 begin{multicols}{2}
21967 \begin_layout Standard
21970 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
21971 at that time governor of one of the Australian colonies.
21972 Adair's mother had returned from Australia to undergo the operation for
21973 cataract, and she, her son Ronald, and her daughter Hilda were living together
21977 \begin_layout Standard
21981 \begin_layout Plain Layout
21985 begin{multicols}{2}
21993 \begin_layout Standard
21996 The youth moved in the best society–had, so far as was known, no enemies
21997 and no particular vices.
21998 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
21999 had been broken off by mutual consent some months before, and there was
22000 no sign that it had left any very profound feeling behind it.
22001 For the rest {sic} the man's life moved in a narrow and conventional circle,
22002 for his habits were quiet and his nature unemotional.
22003 Yet it was upon this easy-going young aristocrat that death came, in most
22004 strange and unexpected form, between the hours of ten and eleven-twenty
22005 on the night of March 30, 1894.
22008 \begin_layout Standard
22012 \begin_layout Plain Layout
22024 \begin_layout Standard
22027 Ronald Adair was fond of cards–playing continually, but never for such stakes
22029 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22030 It was shown that, after dinner on the day of his death, he had played
22031 a rubber of whist at the latter club.
22032 He had also played there in the afternoon.
22037 The evidence of those who had played with him– Mr.
22038 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
22039 and that there was a fairly equal fall of the cards.
22040 Adair might have lost five pounds, but not more.
22041 His fortune was a considerable one, and such a loss could not in any way
22043 He had played nearly every day at one club or other, but he was a cautious
22044 player, and usually rose a winner.
22045 It came out in evidence that, in partnership with Colonel Moran, he had
22046 actually won as much as four hundred and twenty pounds in a sitting, some
22047 weeks before, from Godfrey Milner and Lord Balmoral.
22048 So much for his recent history as it came out at the inquest.
22051 \begin_layout Standard
22055 \begin_layout Plain Layout
22067 \begin_layout Standard
22068 Please do read the file
22070 examples/multicol.lyx
22072 for more advanced examples including column and header spacing, vertical
22073 separator lines, and more.
22076 \begin_layout Section
22081 Paragraph Environment
22082 \begin_inset OptArg
22085 \begin_layout Plain Layout
22086 Numbering in Enumerate
22094 \begin_layout Standard
22100 \begin_layout Standard
22101 \begin_inset VSpace bigskip
22107 \begin_layout Standard
22109 The default numbering for the
22113 paragraph environment begins with Arabic numbers and ends with uppercase
22115 Suppose, however, you wanted a different type of numbering scheme.
22116 Here's a quickie example of how to change the numbering scheme:
22119 \begin_layout LyX-Code
22129 \begin_layout LyX-Code
22139 \begin_layout LyX-Code
22149 \begin_layout LyX-Code
22159 \begin_layout Standard
22160 \SpecialChar \ldots{}
22161 which changes the numbering scheme to uppercase Roman numerals, uppercase
22162 letters, Arabic numbers, and lowercase letter.
22165 \begin_layout Standard
22166 Additionally, the previous example also adds a little bit extra to the numbering
22168 For example, the first level label actually looks like:
22169 \begin_inset Quotes eld
22173 \begin_inset Quotes erd
22177 For ease of reading, we'll describe what the numbering schemes look like
22178 using a notation something like this: <
22179 \begin_inset Quotes eld
22183 \begin_inset Quotes erd
22187 \begin_inset space ~
22191 \begin_inset Quotes erd
22195 \begin_inset Quotes erd
22199 \begin_inset space ~
22203 \begin_inset Quotes erd
22207 \begin_inset Quotes erd
22211 \begin_inset space ~
22215 \begin_inset Quotes eld
22219 \begin_inset Quotes erd
22226 \begin_layout Standard
22227 As you can see in the example, there is a label command for each nesting
22234 \SpecialChar \ldots{}
22241 , as well as a counter,
22245 \SpecialChar \ldots{}
22251 There are also five
22252 \begin_inset Quotes eld
22256 \begin_inset Quotes erd
22289 , each of which take one counter as an argument.
22290 You can add characters before or after these, but there's no need to add
22294 \begin_layout Standard
22295 You can get really fancy with these.
22299 \begin_layout LyX-Code
22313 \begin_layout LyX-Code
22325 \begin_layout LyX-Code
22335 \begin_layout LyX-Code
22345 \begin_layout Standard
22346 produces the somewhat out of hand numbering scheme: <
22347 \begin_inset Quotes eld
22351 \begin_inset Quotes erd
22355 \begin_inset space ~
22359 \begin_inset Quotes erd
22363 \begin_inset Quotes erd
22367 \begin_inset space ~
22371 \begin_inset Quotes erd
22375 \begin_inset Quotes erd
22379 \begin_inset space ~
22383 \begin_inset Quotes eld
22387 \begin_inset Quotes erd
22394 \begin_layout Standard
22398 \begin_layout Section
22402 \begin_layout Standard
22408 \begin_layout Standard
22409 \begin_inset VSpace bigskip
22415 \begin_layout Standard
22420 \begin_layout Plain Layout
22426 tmpfont}{cmr17 scaled 2500}{
22438 \begin_layout Standard
22443 \begin_layout Plain Layout
22454 hose of you who like the style of old books probably also like
22455 \begin_inset Quotes eld
22459 \begin_inset Quotes erd
22462 —those large capital letters which begin each new chapter or section.
22463 Implementing them with plain LyX/LaTeX is straightforward (assuming you
22464 know some plain TeX!) but does require a lot of work and many iterations,
22465 as you can see by all the ugly TeX-mode stuff at the beginning of this
22469 \begin_layout Standard
22473 \begin_layout Plain Layout
22479 bigdrop{-1em}{3}{ptmri}{T}+
22484 here is a much easier way of doing this, of course.
22493 ) package from CTAN allows a simple way to add such letters to your documents.
22494 Since this package is not a standard part of teTeX, I can't demonstrate
22495 it within this document, but if you copy this paragraph to a new document,
22497 \begin_inset Quotes eld
22507 \begin_inset Quotes erd
22510 and the pluses from the TeX code at the beginning of the paragraph, and
22515 usepackage{dropcaps}
22517 to your LaTeX preamble, you will get a nice Times Roman Italic
22518 \begin_inset Quotes eld
22522 \begin_inset Quotes erd
22525 , whose height is three lines of text and which protrudes 1 em into the
22527 (Make certain you have copied
22528 \begin_inset Quotes eld
22536 \begin_inset Quotes erd
22539 into a directory where TeX can see it.) The first argument is the amount
22540 of indentation; in this case the negative sign moves it into the margin.
22541 The second argument is the height of the letter in number of lines of text.
22542 The third argument is the font name: virtually anything which has a tfm
22543 file should work (wade through the
22545 .../texmf/fonts/tfm
22547 directory for possibilities).
22548 My personal favorite is
22549 \begin_inset Quotes eld
22557 \begin_inset Quotes erd
22560 , a fancy German font specifically designed for dropped capitals.
22561 The fourth argument is the letter (or letters) to be dropped.
22566 package also offers the
22572 command, as well as a slightly simplified
22581 \begin_layout Section
22582 Non-standard Paragraph Shapes
22585 \begin_layout Standard
22591 \begin_layout Standard
22592 \begin_inset VSpace bigskip
22598 \begin_layout Standard
22602 \begin_layout Plain Layout
22614 \begin_layout Standard
22618 \begin_layout Plain Layout
22627 \begin_layout Plain Layout
22641 \begin_layout Standard
22646 \begin_layout Plain Layout
22657 \begin_layout Plain Layout
22666 \begin_layout Plain Layout
22675 \begin_layout Plain Layout
22684 \begin_layout Plain Layout
22693 \begin_layout Plain Layout
22702 \begin_layout Plain Layout
22711 \begin_layout Plain Layout
22720 \begin_layout Plain Layout
22729 \begin_layout Plain Layout
22738 \begin_layout Plain Layout
22747 \begin_layout Plain Layout
22756 \begin_layout Plain Layout
22765 \begin_layout Plain Layout
22774 \begin_layout Plain Layout
22783 \begin_layout Plain Layout
22792 \begin_layout Plain Layout
22801 \begin_layout Plain Layout
22810 \begin_layout Plain Layout
22819 \begin_layout Plain Layout
22825 There are times when the tyranny of rectangular paragraphs must be overthrown.
22826 In such situations, a call to the delightful plain TeX command
22833 As you can see, completely arbitrary shapes can be laid out with a suitable
22834 set of linelength definitions.
22835 While this parshape may look a bit silly and useless, one could conceive
22836 of situations such as finely tuned dropped capitals, word wrapping around
22837 non-rectangular graphics, etc.
22838 which will benefit from such handcrafting.
22841 \begin_layout Standard
22842 \begin_inset VSpace bigskip
22848 \begin_layout Standard
22853 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
22860 is the number of lines of text which define the paragraph.
22861 If there turn out to be fewer lines, the shape is truncated; if there are
22862 more, the excess lines have the same dimensions as the last line of the
22872 entries specify the indentation of the line from the left margin, and the
22873 length of the line as measured from that point.
22874 The shape applies only to the current paragraph; everything is reset to
22875 normal for the next paragraph.
22878 \begin_layout Standard
22882 \begin_layout Plain Layout
22894 \begin_layout Section
22898 \begin_layout Standard
22899 As you can see, the examples in this section range from the useful to the
22901 While I don't expect that anyone will ever need the paragraph shape demonstrate
22902 d in the last section, the important point is that you can do almost anything
22903 you want in LyX if you are willing to figure out how to do it in TeX and
22905 TeX is a fantastically powerful typesetting system and all that power is
22906 available to you since LyX uses it as its backend.