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 1271453423
6435 \begin_layout Section
6437 \change_inserted 1 1271453442
6441 \begin_layout Standard
6443 \change_inserted 1 1271454338
6444 To make forward search possible you need to provide generated output PDF/DVI
6445 file with additional information about TeX sources.
6446 This can be done via the methods described in the section
6447 \begin_inset CommandInset ref
6449 reference "sub:rev-search"
6456 \begin_layout Standard
6458 \change_inserted 1 1271454479
6459 Secondly you need to configure LyX for using your viewers in
6460 \begin_inset Flex CharStyle:MenuItem
6463 \begin_layout Plain Layout
6465 \change_inserted 1 1271453866
6466 Preferences\SpecialChar \menuseparator
6467 Output\SpecialChar \menuseparator
6474 Only some of the viewers allows this operation --- yap, xdvi, okular, Sumatra
6479 \begin_layout Plain Layout
6481 \change_inserted 1 1271454273
6482 For Sumatra CMCDDE is needed --- downloadable from http://www.istri.fr/zip/CMCDDE.z
6491 Some other viewers allow at least reloading and positioning to particular
6492 page of the file --- Evince or xpdf --- for these cases you can use external
6494 Please study the prepared examples in the Preferences dialog.
6499 \begin_layout Chapter
6500 Special Document Classes
6503 \begin_layout Section
6507 \begin_layout Standard
6513 \begin_layout Subsection
6517 \begin_layout Standard
6518 This section describes how LyX can be used to write articles for submission
6519 to the scientific journal
6521 Astronomy and Astrophysics
6523 (www.edpsciences.fr/aa/
6524 \begin_inset Flex URL
6527 \begin_layout Plain Layout
6529 http://www.edpsciences.fr/aa/
6534 ) using Version 5.01 of the document class
6539 This package can be downloaded from the ftp site
6542 \begin_layout Standard
6543 \begin_inset VSpace medskip
6549 \begin_layout Standard
6551 \begin_inset Flex URL
6554 \begin_layout Plain Layout
6556 ftp://ftp.edpsciences.org/pub/aa/readme.html
6564 \begin_layout Standard
6565 \begin_inset VSpace medskip
6571 \begin_layout Standard
6572 A manual comes together with that package, and this text is not meant to
6573 replace the original manual but merely a short guide how to realize the
6574 correct form of your paper.
6578 \begin_layout Standard
6579 Please note that the publisher of the journal was changed from Springer
6580 to EDP Sciences starting January 1, 2001.
6581 That change implicated also some slight changes of the style files, namely
6582 the removal of the thesaurus command.
6583 The LyX class aa supports the newest version of these style files, V 5.01.
6584 If you have an older version installed, please upgrade.
6585 For compatibility, the old (version 4) layout has been kept as
6590 Please refer to the comments in
6592 LyXDir/layouts/aapaper.layout
6597 \begin_layout Subsection
6601 \begin_layout Standard
6602 It is recommended you start from the example template distributed with LyX.
6603 If you are not using a template, note the following settings:
6606 \begin_layout Itemize
6613 Document\SpecialChar \menuseparator
6616 dialog (OK, that one was obvious).
6619 \begin_layout Itemize
6620 Don't change the option
6623 \begin_inset space ~
6633 The whole layout is done by the macros, you shouldn't change anything.
6636 \begin_layout Subsection
6640 \begin_layout Standard
6641 First thing to enter is the header information.
6642 It consists of seven entries, of which some are optional.
6646 \begin_layout Itemize
6654 \begin_layout Itemize
6662 \begin_layout Itemize
6670 \begin_layout Itemize
6678 \begin_layout Itemize
6683 : [optional] if more than one author: whom to contact for offprint requests.
6686 \begin_layout Itemize
6691 : [optional] mail address for contacts.
6694 \begin_layout Itemize
6702 Received: <date>; Accepted <date>
6705 \begin_layout Standard
6706 There is no need to issue the
6712 command, this is done automatically by LyX when the header is finished.
6713 Although the order of the single header entries doesn't matter it is advised
6714 to keep the above sequence, just to get the best optics and meets the layout
6715 of the real document.
6718 \begin_layout Standard
6719 If you want to place footnotes in the header block, e.
6720 \begin_inset space \thinspace{}
6724 \begin_inset space \space{}
6727 to state your present address, just use the standard footnote via the menu
6730 Insert\SpecialChar \menuseparator
6734 LyX will automagically use the term
6743 \begin_layout Standard
6744 In addition to these topics, the macros use three additional LaTeX commands
6745 that have no counterpart in LyX:
6748 \begin_layout Itemize
6755 to separate different names for more than one author and institute, respectivel
6759 \begin_layout Itemize
6766 to mark corresponding author/institute pairs.
6767 The institutes are numbered sequentially as they appear in the
6771 field, so you have to put a marker to each author.
6774 \begin_layout Itemize
6781 to supply an email address for fast contact.
6784 \begin_layout Standard
6785 In all cases, the appropriate command has to be entered in LyX and marked
6791 \begin_layout Subsection
6795 \begin_layout Standard
6796 The abstract should immediately follow the header block.
6797 With version 5 the abstract environment was changed to a command, and there
6798 is now a resctriction to only one paragraph.
6799 In addition, it should contain an entry with the keywords.
6800 This is not yet implemented for LyX, therefore you have to enter the LaTeX
6807 by hand and mark it as LaTeX code.
6808 Refer to the example paper.
6811 \begin_layout Subsection
6812 Supported environments
6815 \begin_layout Standard
6816 The A&A paper layout supports the following environments for structuring
6820 \begin_layout Itemize
6826 \begin_layout Itemize
6832 \begin_layout Itemize
6838 \begin_layout Itemize
6844 \begin_layout Itemize
6850 \begin_layout Itemize
6856 \begin_layout Itemize
6862 \begin_layout Itemize
6868 \begin_layout Itemize
6874 \begin_layout Itemize
6880 \begin_layout Itemize
6886 \begin_layout Itemize
6892 \begin_layout Subsection
6893 Commands not supported by LyX
6896 \begin_layout Standard
6897 Some commands are not yet supported by the
6902 Some have already been mentioned.
6903 For the sake of completeness, they are listed all together here:
6906 \begin_layout Itemize
6914 \begin_layout Itemize
6922 \begin_layout Itemize
6930 \begin_layout Itemize
6938 \begin_layout Itemize
6946 \begin_layout Itemize
6954 \begin_layout Itemize
6962 \begin_layout Itemize
6970 \begin_layout Standard
6971 If you want to use any of these commands, you have to enter them yourself.
6974 Do not forget to mark them as LaTeX code!
6977 \begin_layout Subsection
6978 Figure and Table Floats
6981 \begin_layout Standard
6982 LyX provides support for the necessary float environments
6984 figure, figure*, table
6990 , therefore we won't tell much about it here.
6994 \begin_inset space ~
7000 Just remember that tables should be left-aligned.
7001 For that, select the table and change the alignment in
7003 Edit\SpecialChar \menuseparator
7005 \begin_inset space ~
7011 \begin_layout Standard
7012 There is only one special thing: the figures with caption besides the figure.
7013 To create such a figure, you have to do the following:
7016 \begin_layout Enumerate
7017 Create a wide figure float:
7019 Insert\SpecialChar \menuseparator
7020 Float\SpecialChar \menuseparator
7023 , then right click in the figure and select
7029 \begin_inset space ~
7037 \begin_layout Enumerate
7038 Enter your caption text.
7041 \begin_layout Enumerate
7046 to move the cursor above the caption.
7049 \begin_layout Enumerate
7053 \begin_layout Enumerate
7054 Position the cursor behind the figure and insert a horizontal fill:
7056 Insert\SpecialChar \menuseparator
7058 \begin_inset space ~
7061 Character\SpecialChar \menuseparator
7063 \begin_inset space ~
7071 \begin_layout Enumerate
7072 Switch to LaTeX mode:
7075 \begin_inset space ~
7083 \begin_layout Enumerate
7093 Do not close the brace!
7096 \begin_layout Enumerate
7097 Position the cursor behind the caption text, switch to LaTeX mode and insert
7101 \begin_inset space ~
7113 \begin_layout Standard
7114 Also, refer to the figures in the example paper.
7117 \begin_layout Subsection
7121 \begin_layout Standard
7122 For submission, the paper has to be formated in a special double-spacing
7124 For this purpose, you have to give the option
7128 to the documentclass.
7129 This must be done using the extra class options field in the
7131 Document\SpecialChar \menuseparator
7135 Just enter the string
7142 \begin_layout Subsection
7146 \begin_layout Standard
7151 directory contains an example paper written with LyX.
7152 It is the example paper from the original macro package, translated to
7154 Use it for inspiration, and compare the original LaTeX code with LyX way
7158 \begin_layout Section
7162 \begin_layout Standard
7168 \begin_layout Subsection
7172 \begin_layout Standard
7173 AASTeX is a set of macros produced by the American Astronomical Society
7174 to facilitate electronic manuscript submission to the three journals they
7175 publish: the Astrophysical Journal (including the Letters and Supplement),
7176 the Astronomical Journal, and the Publications of the Astronomical Society
7178 LyX has proven to be an excellent tool for generating these documents,
7179 especially given its equation, citation, and figure handling capabilities.
7180 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7181 is the version described here, or higher.
7182 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7183 incompatible with LyX.
7184 The AASTeX package may be downloaded from the AASTeX Web site
7187 \begin_layout Standard
7188 \begin_inset VSpace medskip
7194 \begin_layout Standard
7196 \begin_inset Flex URL
7199 \begin_layout Plain Layout
7201 http://www.journals.uchicago.edu/AAS/AASTeX
7209 \begin_layout Standard
7210 \begin_inset VSpace medskip
7216 \begin_layout Standard
7217 A complete user guide is contained in that package and you should familiarize
7218 yourself with it thoroughly before embarking on writing a paper in LyX.
7219 LyX will not reduce the need to figure out all the AASTeX commands, it
7220 will only reduce the drudgery of typing everything in.
7221 It is your responsibility to ensure that the final exported LaTeX document
7222 conforms completely to the requirements of the journal to which you are
7223 submitting your paper.
7226 \begin_layout Subsection
7227 Starting a New Paper
7230 \begin_layout Standard
7231 I strongly suggest that you start with the AASTeX template file.
7234 File\SpecialChar \menuseparator
7241 , enter the new file name, then choose the
7246 This will show the most common fields found in a manuscript.
7247 Simply overwrite the existing text (including the brackets,
7251 ) with the correct information.
7252 Many of the AASTeX commands and environments can be implemented directly
7253 in LyX, but some cannot: most noticeably
7265 , which should stick out like a sore thumb if you actually just opened the
7267 For commands such as these, the LaTeX code must be entered directly and
7269 Such commands are referred to as TeX code, or Evil Red Text.
7270 I tried to minimize the amount of TeX code needed in an AASTeX document,
7271 but there is still a bit more required than any of us would like.
7274 \begin_layout Subsection
7275 Finishing Your Paper
7278 \begin_layout Standard
7279 When the paper is finished to your satisfaction and previews/prints correctly,
7281 \begin_inset Quotes eld
7285 \begin_inset Quotes erd
7288 actions which need to be done before you submit it to the journals.
7292 \begin_layout Enumerate
7293 Export your paper as a LaTeX file (
7295 File\SpecialChar \menuseparator
7296 Export\SpecialChar \menuseparator
7303 \begin_layout Enumerate
7308 file with your favorite text editor
7312 \begin_layout Enumerate
7313 remove the comment lines before the
7322 \begin_layout Enumerate
7327 usepackage...{fontenc}
7329 line if it appears (usually just after
7344 \begin_layout Enumerate
7345 remove everything between (and including) the
7357 commands, except for any commands you specifically put into the LaTeX preamble
7358 (which should appear immediately after the
7359 \begin_inset Quotes eld
7362 User specified LaTeX commands
7363 \begin_inset Quotes erd
7374 \begin_layout Enumerate
7375 Run the resulting file through LaTeX to make sure it still processes correctly.
7378 \begin_layout Enumerate
7379 Reread the journal requirements to make sure your filenames and formats
7383 \begin_layout Enumerate
7387 \begin_layout Subsection
7388 Comments On Specific Commands
7391 \begin_layout Standard
7392 I will not describe the detailed usage of the individual AASTeX commands:
7393 the AASTeX User Guide (
7397 ) gives a good description of each.
7398 Thus it's probably easiest for me to go down the list as found in the guide
7399 and offer comments where necessary.
7400 So let's begin \SpecialChar \ldots{}
7404 \begin_layout Subsubsection
7405 Things that work as expected
7408 \begin_layout Standard
7412 \begin_layout Plain Layout
7424 \begin_layout Standard
7425 Because they work as you might expect, I simply list them and the section
7526 begin{thebibliography}
7534 (2.13.2), all the cite commands and their variations (2.13.2), the generic
7535 graphicx figure commands (2.14.1),
7559 (2.15.4, amongst other places),
7586 \begin_layout Standard
7587 The following style options also work correctly:
7608 Simply put them in the
7614 Layout\SpecialChar \menuseparator
7620 \begin_layout Standard
7624 \begin_layout Plain Layout
7636 \begin_layout Subsubsection
7637 Things that work, but require more comment
7640 \begin_layout Standard
7641 The following items work, but require a little more discussion:
7644 \begin_layout Itemize
7645 These items are reserved for use by the journal editors, but you can put
7646 them into the LaTeX preamble if you feel compelled to do so:
7679 \begin_layout Itemize
7680 These items may be placed in the LaTeX preamble, and are included as blanks
7681 in the template file:
7702 \begin_layout Itemize
7709 (2.3) – can only be used
7710 \begin_inset Quotes eld
7714 \begin_inset Quotes erd
7717 , not in the middle of a paragraph.
7718 Use TeX code if you need to embed it.
7721 \begin_layout Itemize
7728 (2.3) – will have extra {} after it.
7729 This should not cause an error.
7732 \begin_layout Itemize
7739 (2.6) – can only be used
7740 \begin_inset Quotes eld
7744 \begin_inset Quotes erd
7747 , not in the middle of a paragraph.
7748 Use TeX code if you need to embed it.
7751 \begin_layout Itemize
7758 (2.8) – can't insert a cross-reference tag, you must type the tag name by
7762 \begin_layout Itemize
7776 \begin_layout Itemize
7783 (2.9) – will have extra {} after it.
7784 This should not cause an error.
7787 \begin_layout Itemize
7794 (2.11) – will have extra {} after it.
7795 This should not cause an error.
7798 \begin_layout Itemize
7805 (2.14.2) – you can insert an optional filename argument by placing the cursor
7806 at the beginning of the text and selecting
7808 Insert\SpecialChar \menuseparator
7813 \begin_inset Quotes eld
7817 \begin_inset Quotes erd
7820 inserts an optional argument of the type needed by
7827 Hopefully it will be renamed someday.
7830 \begin_layout Itemize
7843 for the catalog ID optional parameter
7846 \begin_layout Itemize
7859 for the catalog ID optional parameter
7862 \begin_layout Subsubsection
7863 Things not implemented, use TeX code
7866 \begin_layout Standard
7870 \begin_layout Plain Layout
7882 \begin_layout Standard
7905 setcounter{equation}
7907 (2.12), Journal name abbreviations (2.13.4),
7943 (2.15.4, insert it as the first element in the lefthand cell after where
7945 Don't use any of LyX's rules in the table),
7957 (2.15.5), much of Misc (2.17, except
8008 \begin_layout Standard
8012 \begin_layout Plain Layout
8024 \begin_layout Subsubsection
8025 Things that cannot be implemented
8028 \begin_layout Standard
8029 \SpecialChar \ldots{}
8030 at least in any meaningful sort of way, so I suggest ignoring them.
8031 They are the references environment (2.13.3), and the deluxetable environment
8033 If you really, really need to use deluxetable, I suggest editing it in
8034 a separate file with a text editor, then using
8036 Insert\SpecialChar \menuseparator
8038 \begin_inset space ~
8043 to include it in your LyX document.
8048 file to see an example of this.
8051 \begin_layout Subsection
8052 FAQs, Tips, Tricks, and Other Ruminations
8055 \begin_layout Subsubsection
8056 Getting LyX and AASTeX to cooperate
8059 \begin_layout Standard
8060 It can be a bit tricky to get LyX to recognize a new layout and document
8062 When all else fails, do this:
8065 \begin_layout Enumerate
8066 Make certain that LaTeX can find AASTeX.
8067 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8068 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
8075 \begin_layout Enumerate
8087 \begin_layout Enumerate
8090 Tools\SpecialChar \menuseparator
8093 in LyX, then restart LyX.
8096 \begin_layout Enumerate
8097 Open a regular new file, not from a template.
8098 Does AASTeX appear in the class list in
8100 Document\SpecialChar \menuseparator
8106 \begin_layout Standard
8107 If you get a warning from an existing AASTeX document about not being able
8108 to find the AASTeX layout or a message about
8109 \begin_inset Quotes eld
8112 You should not mix title layouts with normal ones
8113 \begin_inset Quotes erd
8116 , things haven't been installed correctly.
8119 \begin_layout Subsubsection
8120 LaTeX error processing a table
8123 \begin_layout Standard
8124 LyX, by default, attempts to center the table caption/title.
8125 This seems to produce a bad interaction in AASTeX so you should click somewhere
8126 in the caption/title, then select
8128 Edit\SpecialChar \menuseparator
8130 \begin_inset space ~
8144 This took care of it for me.
8147 \begin_layout Subsubsection
8151 \begin_layout Standard
8152 A couple of things: 1) I have noticed some funny spacing in the reference
8153 entries in the text.
8154 When you enter the bibliography item data, make sure their is
8158 space between the last author and the parenthesis setting off the year;
8162 \begin_inset space \thinspace{}
8166 \begin_inset space \space{}
8180 2) Entering the references at all is not obvious.
8181 The easiest thing is to start typing your first reference at the end of
8182 the document, then mark it as type
8187 That will put a small gray box in front of what you just typed.
8188 Click on the box to fill in the rest of the information.
8189 For new references, go to the end of an existing reference and press return.
8190 That will create a new line with its own box, etc.
8193 \begin_layout Subsubsection
8197 \begin_layout Standard
8198 Even though AASTeX provides its own figure commands (
8204 , for example), I much prefer LaTeX's standard figure commands (with the
8213 \begin_inset space ~
8216 commands as TeX code into a Figure Float box if you desire, but I never
8217 have much luck getting the layout right.
8218 With the standard graphics, LyX will insert a
8222 usepackage{graphicx}
8224 command into the LaTeX preamble and handle the figures in the standard
8225 LaTeX2e way, interspersing the figures in the text.
8226 I believe ApJ accepts figures exactly this way now; AJ might still use
8228 \begin_inset Quotes eld
8231 stack everything at the end
8232 \begin_inset Quotes erd
8238 \begin_layout Subsubsection
8239 Things I could have done, but didn't
8242 \begin_layout Standard
8244 \begin_inset Quotes eld
8248 \begin_inset Quotes erd
8251 things I could have implemented, but chose not to.
8252 For instance, I saw no point in double-spacing the text in the LyX window,
8253 even though it is double-spaced in the paper manuscript.
8254 Also, I chose not to make separate layouts for the preprint and preprint2
8256 Since I assume you will spend most of your time in the plain manuscript
8257 mode anyway, I decided not to chew up more disk space with this.
8261 \begin_layout Subsection
8265 \begin_layout Standard
8266 Your mileage may vary.
8267 I've now had papers published by both ApJ and AJ that have had 98% of the
8268 effort done in LyX; the last 2% was the LaTeX post-processing and a few
8270 I have had no trouble with the submission process, and I'm sure the journals
8271 were never aware that there might be a difference.
8272 So, go forth and publish!
8275 \begin_layout Section
8279 \begin_layout Standard
8282 David Johnson; updated by Richard Heck
8285 \begin_layout Standard
8286 \begin_inset VSpace bigskip
8292 \begin_layout Standard
8294 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8295 papers to be submitted to American Mathematical Society publications.
8296 The layouts are not tailored to a specific journal, but easily can be.
8297 You should refer to the AMS documentation for specific instructions for
8298 each journal (usually it will entail only changing a single line in the
8300 That documentation is available on the Web at
8301 \begin_inset Flex URL
8304 \begin_layout Plain Layout
8312 \begin_inset Flex URL
8315 \begin_layout Plain Layout
8317 ftp://ftp.ams.org/pub/tex/amslatex/
8323 These layouts are appropriate, and useful, for any mathematical writing.
8327 \begin_layout Standard
8328 There are two basic AMS LaTeX layouts:
8331 \begin_layout Itemize
8332 amsart: The standard AMS article format.
8335 \begin_layout Itemize
8336 amsbook: the standard AMS book (really, monograph) format.
8340 \begin_layout Standard
8341 The layouts themselves contain only the minimum necessary to use the AMS
8343 They do not, in particular, contain any of the `theorem' environments used
8344 for setting theorems, lemmas, and the like.
8345 These are contained, instead, in the
8346 \begin_inset Flex CharStyle:Code
8349 \begin_layout Plain Layout
8355 module, which is loaded by default when when you select one of the AMS
8357 (It can also be used with other classes and can be removed, if you would
8358 rather use something else.) Less commonly used environments are in the
8359 \begin_inset Flex CharStyle:Code
8362 \begin_layout Plain Layout
8363 Theorems (AMS-Extended)
8368 module, which must be loaded manually.
8371 \begin_layout Standard
8372 By default, theorems and the like are numbered consecutively throughout
8373 the document, but this may be modified by loading the module
8374 \begin_inset Flex CharStyle:Code
8377 \begin_layout Plain Layout
8378 Theorems (Order by Section)
8383 or, if you are using
8384 \begin_inset Flex CharStyle:Code
8387 \begin_layout Plain Layout
8394 \begin_inset Flex CharStyle:Code
8397 \begin_layout Plain Layout
8398 Theorems (Order by Chapter)
8404 These will number the results as
8405 \begin_inset Formula $n.m$
8408 , where the first number refers to the section (or chapter) and the second
8409 refers to the total number of results so far in that section (or chapter).
8410 Many environments are also available unnumbered.
8411 These are indicated by an asterisk at the end.
8412 If you happen to want
8416 unnumbered results, the module
8417 \begin_inset Flex CharStyle:Code
8420 \begin_layout Plain Layout
8426 provides that option.
8429 \begin_layout Standard
8430 Note that these modules do not
8434 to be used with the AMS classes.
8435 It is perfectly possible to use the
8436 \begin_inset Flex CharStyle:Code
8439 \begin_layout Plain Layout
8445 module, and the others mentioned, with other classes, such as
8446 \begin_inset Flex CharStyle:Code
8449 \begin_layout Plain Layout
8456 \begin_inset Flex CharStyle:Code
8459 \begin_layout Plain Layout
8466 \begin_inset Flex CharStyle:Code
8469 \begin_layout Plain Layout
8478 \begin_layout Subsection
8479 What these layouts provide
8482 \begin_layout Standard
8483 There is a long list of included environments provided by these layouts.
8484 In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
8485 variety of `theorem' environments.
8486 However, the AMS recommends the environments that are available in LyX.
8490 \begin_layout Standard
8491 The following environments—as well as the standard environments, such as
8493 \begin_inset Flex CharStyle:Noun
8496 \begin_layout Plain Layout
8503 \begin_inset Flex CharStyle:Noun
8506 \begin_layout Plain Layout
8513 \begin_inset Flex CharStyle:Noun
8516 \begin_layout Plain Layout
8523 \begin_inset Flex CharStyle:Noun
8526 \begin_layout Plain Layout
8533 \begin_inset Flex CharStyle:Noun
8536 \begin_layout Plain Layout
8543 \begin_inset Flex CharStyle:Code
8546 \begin_layout Plain Layout
8553 \begin_inset Flex CharStyle:Code
8556 \begin_layout Plain Layout
8565 \begin_layout Description
8566 Address This should be the author's permanent address.
8569 \begin_layout Description
8571 \begin_inset space ~
8574 Address This should be the author's temporary address at the time of submission,
8575 if different from the Address.
8578 \begin_layout Description
8579 Email Author's e-mail address
8582 \begin_layout Description
8583 URL Author's Web address, if desired.
8586 \begin_layout Description
8587 Keywords Key words or phrases used to identify specific topics discussed
8591 \begin_layout Description
8592 Subjectclass These refer to the AMS Subject Classifications, published and
8595 Mathematical Reviews
8598 These are also available online at the AMS cites listed above.
8601 \begin_layout Description
8605 \begin_layout Description
8609 \begin_layout Description
8613 \begin_layout Standard
8614 The following environments are provided by both the
8615 \begin_inset Flex CharStyle:Code
8618 \begin_layout Plain Layout
8625 \begin_inset Flex CharStyle:Code
8628 \begin_layout Plain Layout
8634 modules, in the latter case in both starred (unnumbered) and unstarred
8635 (numbered) versions.
8636 These same environments are provided only in the starred versions by the
8638 \begin_inset Flex CharStyle:Code
8641 \begin_layout Plain Layout
8650 \begin_layout Theorem
8651 This is typically used for the statements of major results.
8655 \begin_layout Corollary*
8656 This is used for statements which follow fairly directly from previous statement
8658 Again, these can be major results.
8663 These are smaller results needed to prove other statements.
8666 \begin_layout Proposition
8667 These are less major results which (hopefully) add to the general theory
8671 \begin_layout Conjecture
8672 These are statements provided without justification, which the author does
8673 not know how to prove, but which seem to be true (to the author, at least).
8676 \begin_layout Definition*
8677 Guess what this is for.
8678 The font is different for this environment than for the previous ones.
8682 \begin_layout Example*
8683 Used for examples illustrating proven results.
8686 \begin_layout Problem
8687 It's not really known what this is for.
8688 You should figure it out.
8691 \begin_layout Exercise*
8692 Write a description for this one.
8695 \begin_layout Remark
8696 This environment is also a type of theorem, usually a lesser sort of observation.
8699 \begin_layout Claim*
8700 Often used in the course of giving a proof of a larger result.
8704 Generally, these are used to break up long arguments, using specific instances
8710 The numbering scheme for cases is on its own, not together with other numbered
8716 At the end of this environment, a QED symbol (usually a square, but it can
8717 vary with different styles) is placed.
8718 If you want to have other environments within this one—for example, Case
8719 environments—and have the QED symbol appear only after them, then the other
8720 environments need to be nested within the proof environment.
8723 Nesting Environments
8729 for information on nesting.
8732 \begin_layout Standard
8733 And these environments are provided by
8734 \begin_inset Flex CharStyle:Code
8737 \begin_layout Plain Layout
8738 Theorems (AMS-Extended)
8746 \begin_layout Criterion*
8747 A required condition.
8750 \begin_layout Algorithm*
8751 A general procedure to be used.
8754 \begin_layout Axiom*
8755 This is a property or statement taken as true within the system being discussed.
8758 \begin_layout Condition*
8759 Sometimes used to state a condition assumed within the present context of
8764 Similar to a Remark.
8767 \begin_layout Notation*
8768 Used for the explanation of, yes, notation.
8771 \begin_layout Summary
8772 Do we really need to tell you?
8775 \begin_layout Acknowledgement*
8779 \begin_layout Conclusion*
8780 Sometimes used at the end of a long train of argument.
8784 Used in a way similar to Proposition, though perhaps lower on the scale.
8787 \begin_layout Standard
8788 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
8790 They need to be available on your system in order to use these environments.
8793 \begin_layout Section
8801 \begin_layout Standard
8807 \begin_layout Subsection
8811 \begin_layout Standard
8812 These are the layout files for some of the journals of the American Geophysical
8814 It is assumed that you have both the AGU's own class files and AGUplus
8815 installed (everything to be found at
8816 \begin_inset Flex URL
8819 \begin_layout Plain Layout
8821 ftp://ftp.agu.org/journals/latex/journals
8829 \begin_layout Subsection
8833 \begin_layout Standard
8843 They are still called this in the LyX GUI, though their LaTeX equivalents
8844 in the AGU classes are
8855 \begin_layout Standard
8856 Newly defined styles are
8893 These are mostly manuscript attributes and defined in the AGU class documentati
8897 \begin_layout Standard
8898 I suspect this is still badly incomplete.
8901 \begin_layout Subsection
8905 \begin_layout Standard
8922 \begin_layout Subsection
8926 \begin_layout Itemize
8929 Journal of Geophysical Research
8938 \begin_layout Standard
8939 Add your own, it isn't so hard! Look at the
8950 \begin_layout Subsection
8951 Bugs and things to remember
8954 \begin_layout Standard
8955 In order to use the new layouts, you must remember to do the following for
8959 \begin_layout Enumerate
8965 This can be done in the
8967 Layout\SpecialChar \menuseparator
8972 Document\SpecialChar \menuseparator
8976 (AGU articles are always in English, right? So
8983 \begin_layout Enumerate
8993 (Yes, this is a bug.)
8996 \begin_layout Enumerate
8997 Make sure you use the
9001 bibliography style, by entering
9005 into the second field of the BibTeX inset.
9006 None of the standard styles will do.
9009 \begin_layout Section
9013 \begin_layout Standard
9019 \begin_layout Subsection
9023 \begin_layout Standard
9024 Broadway is for writing plays.
9025 The format is more decorative than Hollywood, and much less standardized.
9026 This format should be suitable for workshops.
9029 \begin_layout Subsection
9033 \begin_layout Standard
9034 The same as in Hollywood.
9037 \begin_layout Subsection
9041 \begin_layout Standard
9046 names as labels then cross-reference the label to insert the name.
9047 The cross-reference dialog will show the current cast of characters.
9050 \begin_layout Subsection
9051 Paper size and Margins
9054 \begin_layout Standard
9055 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9058 \begin_layout Subsection
9062 \begin_layout Standard
9063 The following environments are available.
9064 You can use broadway.bind to get the bind keys shown at the right.
9067 \begin_layout Itemize
9071 \begin_inset Newline newline
9076 You should not have to use this, but it is here for anything that does not
9080 \begin_layout Itemize
9084 \begin_inset space \hfill{}
9088 \begin_inset Newline newline
9093 Used to describe stage setting and the action.
9094 First use of speaker names in all CAPs.
9097 \begin_layout Itemize
9101 \begin_inset space \hfill{}
9105 \begin_inset Newline newline
9110 Automatically numbered.
9111 On screen it will be arabic, but will print as Roman.
9114 \begin_layout Itemize
9118 \begin_inset space \hfill{}
9122 \begin_inset Newline newline
9132 It is just centered text.
9135 \begin_layout Itemize
9139 \begin_inset space \hfill{}
9143 \begin_inset Newline newline
9148 Not automatically numbered.
9149 You supply the number.
9150 This is because I couldn't figure out how.
9153 \begin_layout Itemize
9157 \begin_inset space \hfill{}
9161 \begin_inset Newline newline
9166 A special case of Narrative to describe the setting and action as the curtain
9170 \begin_layout Itemize
9174 \begin_inset space \hfill{}
9178 \begin_inset Newline newline
9183 The speaker's (actor's) title, centered in all CAPS.
9186 \begin_layout Itemize
9190 \begin_inset space \hfill{}
9194 \begin_inset Newline newline
9199 Instructions to the speaker.
9200 The parentheses are automatically inserted.
9201 The ( will appear on screen, but both will be in the printed play.
9202 This environment is only used within
9209 \begin_layout Itemize
9213 \begin_inset space \hfill{}
9217 \begin_inset Newline newline
9222 What the Speaker says.
9225 \begin_layout Itemize
9229 \begin_inset space \hfill{}
9233 \begin_inset Newline newline
9238 The curtain comes down.
9241 \begin_layout Itemize
9245 \begin_inset space \hfill{}
9251 \begin_layout Itemize
9255 \begin_inset space \hfill{}
9261 \begin_layout Itemize
9265 \begin_inset space \hfill{}
9271 \begin_layout Standard
9275 \begin_layout Section
9279 \begin_layout Standard
9284 can be used to type letters according to German conventions.
9285 A template file is included in
9287 .../lyx/share/templates
9289 for you to use as a starting point.
9292 \begin_layout Section
9300 \begin_layout Standard
9306 \begin_layout Subsection
9310 \begin_layout Standard
9311 This is the layout file for the European Geophysical Society journals.
9316 can be downloaded from the web site of the EGS under
9317 \begin_inset Flex URL
9320 \begin_layout Plain Layout
9330 \begin_layout Subsection
9334 \begin_layout Standard
9337 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9345 The current layout file is unfortunately very unmodular and would benefit
9346 from using the various
9353 \begin_layout Section
9357 \begin_layout Standard
9363 \begin_layout Standard
9364 Elsevier Science Publishers B.V.
9365 provides a standard LaTeX document class (
9369 ) for submitting articles to their various journals.
9370 The style file can be downloaded directly from their web site:
9371 \begin_inset Flex URL
9374 \begin_layout Plain Layout
9376 http://authors.elsevier.com/
9382 Instructions are supplied along with the class file, which details the
9383 requirements of the publishers.
9384 LyX includes package that allows for the use of this class, by a layout
9385 and a template file.
9386 Installation of the class file is the same as for any other LaTeX package;
9387 instructions are provided in the Elsevier documentation.
9390 \begin_layout Standard
9400 As the Elsevier class file is based mainly on the standard article class,
9401 most of the normal functionality is provided.
9402 The Elsevier class defines a number of mathematical environments, which
9403 are similar to the AMS environments.
9404 These commands are all described in the Elsevier documentation, and are
9408 \begin_layout Standard
9409 The easiest way to use the Elsevier style is to base documents on the included
9411 It is best not to use options such as fancy headings or the geometry package,
9412 as elements such as these are defined by Elsevier in their style file.
9413 Ideally, no extra packages except those mentioned in the Elsevier documentation
9415 Essentially, Elsevier require as
9416 \begin_inset Quotes eld
9420 \begin_inset Quotes erd
9423 a LaTeX file as possible, as their intention is to take the supplied file
9424 and replace the class file with one for the particular journal to which
9425 the paper has been submitted.
9426 This also means that not too much time should be spent on the formating
9428 When it comes to be published, this will change anyway.
9429 The rest of the usage for this layout is substantially the same as for
9430 the normal article class.
9431 For details of what Elsevier do and don't allow, refer to their documentation.
9434 \begin_layout Section
9440 \begin_inset CommandInset label
9449 \begin_layout Standard
9455 \begin_layout Subsection
9459 \begin_layout Standard
9460 This section describes how to use LyX to make slides for overhead projectors.
9461 There are two document classes that can do this: the default slides class
9467 This section documents the latter.
9470 \begin_layout Standard
9471 I'm going to say this again, nice and clear, so that there's no misunderstanding
9475 \begin_layout Standard
9476 \begin_inset VSpace bigskip
9482 \begin_layout Standard
9486 This section documents the class
9487 \begin_inset Quotes eld
9495 \begin_inset Quotes erd
9503 \begin_layout Standard
9504 \begin_inset VSpace bigskip
9510 \begin_layout Standard
9511 If you're looking for the documentation for
9512 \begin_inset Quotes eld
9520 \begin_inset Quotes erd
9524 \begin_inset space ~
9528 \begin_inset CommandInset ref
9530 reference "sec:slitex"
9535 If your machine doesn't have the
9540 \begin_inset Quotes eld
9548 \begin_inset Quotes erd
9551 ] installed, you'll probably have to use the default
9555 class, which isn't quite as good as
9560 \begin_layout Standard
9565 class is designed for use with version 2.1 of the
9569 LaTeX class file which is now an integral part of LaTeX2e.
9572 \begin_layout Subsection
9576 \begin_layout Standard
9577 Obviously, to use this document class, you need to select
9578 \begin_inset Quotes eld
9586 \begin_inset Quotes erd
9596 \begin_inset space ~
9602 There are some settings in the
9605 \begin_inset space ~
9610 dialog that you should know about that are specific to this class:
9613 \begin_layout Itemize
9614 Don't change the options
9625 \begin_inset space ~
9631 They're ignored by the
9638 \begin_layout Itemize
9639 The default font size is 20
9640 \begin_inset space \thinspace{}
9643 pt with the other options being 17
9644 \begin_inset space \thinspace{}
9648 \begin_inset space \thinspace{}
9652 \begin_inset space \thinspace{}
9658 \begin_layout Itemize
9667 but all math equations are still typeset in the usual roman font.
9670 \begin_layout Itemize
9675 supports A4 and Letter paper sizes as well as a special size for working
9677 \begin_inset space \thinspace{}
9681 It doesn't support A5, B5, legal or executive paper sizes.
9684 \begin_layout Itemize
9685 Don't bother changing the
9689 settings because they are ignored anyway.
9690 All floats appear where they are defined in the text.
9693 \begin_layout Itemize
9698 setting behaves a bit differently for this class.
9703 provides extensive footer and header capabilities including a user-defined
9706 \begin_inset space ~
9710 \begin_inset CommandInset ref
9712 reference "sec:foilfoot"
9717 The title page is treated differently to all other pages in the document
9726 has the logo centered at the bottom of the page (if one is defined).
9727 The possible page style choices and what they do are as follows:
9731 \begin_layout Labeling
9732 \labelwidthstring MMMMMMM
9739 The final output contains no page numbers, or other headers or footers
9740 (except footnotes of course).
9744 \begin_layout Labeling
9745 \labelwidthstring MMMMMMM
9752 The final output contains page numbers centered at the bottom of the page.
9753 No other headings or footers (other than footnotes).
9756 \begin_layout Labeling
9757 \labelwidthstring MMMMMMM
9762 Page numbers in lower right corner.
9763 Additional headers and footers are also shown.
9764 This is also the default.
9767 \begin_layout Labeling
9768 \labelwidthstring MMMMMMM
9773 Gives you access to the
9777 package although its use with
9781 is discouraged by the writer of the
9785 package because of some potential page layout clashes.
9789 \begin_layout Subsubsection
9793 \begin_layout Standard
9794 The following options may be used in the extra class options in the
9796 Document\SpecialChar \menuseparator
9802 \begin_layout Labeling
9803 \labelwidthstring MMMMMMx
9808 This sets up the page layout for 7.33
9809 \begin_inset space \thinspace{}
9813 \begin_inset space \thinspace{}
9816 in paper, which is about the same aspect ratio as a 35
9817 \begin_inset space \thinspace{}
9820 mm slide, making it a bit easier to work with this medium.
9823 \begin_layout Labeling
9824 \labelwidthstring MMMMMMx
9829 Places a rule across the page below the header on every page except the
9833 \begin_layout Labeling
9834 \labelwidthstring MMMMMMx
9839 Places a rule across the page above the footer on every page except the
9843 \begin_layout Labeling
9844 \labelwidthstring MMMMMMx
9849 This is automatically set each time you create a new
9858 to use the dvips driver to rotate those pages that are set as landscape
9862 \begin_layout Labeling
9863 \labelwidthstring MMMMMMx
9868 Simply changes the page dimensions to those of a landscape page but doesn't
9870 Thus if you use this option you need to use an external program to rotate
9871 each page or feed your paper through your printer as landscape.
9872 Note that this option effectively reverses the roles of the
9880 environments (don't worry these are described in the next section).
9883 \begin_layout Labeling
9884 \labelwidthstring MMMMMMx
9889 Equation numbers on the left.
9892 \begin_layout Labeling
9893 \labelwidthstring MMMMMMx
9898 Flush-left equations.
9901 \begin_layout Subsection
9902 Supported Environments
9905 \begin_layout Standard
9906 Most of the environments commonly supported in other classes are also supported
9912 There are several additional environments provided by
9916 as well as a couple added by LyX.
9917 The following environments are shared with other classes:
9920 \begin_layout Standard
9924 \begin_layout Plain Layout
9936 \begin_layout Itemize
9942 \begin_layout Itemize
9948 \begin_layout Itemize
9954 \begin_layout Itemize
9960 \begin_layout Itemize
9966 \begin_layout Itemize
9972 \begin_layout Itemize
9978 \begin_layout Itemize
9984 \begin_layout Itemize
9990 \begin_layout Itemize
9996 \begin_layout Itemize
10002 \begin_layout Itemize
10008 \begin_layout Itemize
10014 \begin_layout Itemize
10020 \begin_layout Itemize
10026 \begin_layout Itemize
10032 \begin_layout Itemize
10038 \begin_layout Itemize
10044 \begin_layout Standard
10048 \begin_layout Plain Layout
10060 \begin_layout Standard
10061 That is, all the major environments apart from the sectioning environments.
10062 Since foils are essentially self-contained sections, with a title and body,
10067 provides specific commands for starting new foils and these are:
10070 \begin_layout Itemize
10076 \begin_layout Itemize
10082 \begin_layout Standard
10083 LyX also provides slightly modified versions of these two environments called:
10086 \begin_layout Itemize
10092 \begin_layout Itemize
10095 ShortRotatefoilhead
10098 \begin_layout Standard
10099 and the differences will be explained in the next section.
10102 \begin_layout Standard
10103 Since foils are often used in presenting ideas or new theorems and such
10108 also provides a comprehensive box of goodies for presenting them:
10111 \begin_layout Standard
10115 \begin_layout Plain Layout
10119 begin{multicols}{2}
10127 \begin_layout Itemize
10133 \begin_layout Itemize
10139 \begin_layout Itemize
10145 \begin_layout Itemize
10151 \begin_layout Itemize
10157 \begin_layout Itemize
10163 \begin_layout Itemize
10169 \begin_layout Itemize
10175 \begin_layout Itemize
10181 \begin_layout Itemize
10187 \begin_layout Itemize
10193 \begin_layout Standard
10197 \begin_layout Plain Layout
10209 \begin_layout Standard
10210 The starred versions are unnumbered while the unstarred versions are numbered.
10211 There are also two list environments added by LyX and these are:
10214 \begin_layout Itemize
10220 \begin_layout Itemize
10226 \begin_layout Standard
10231 provides some powerful header and footer capabilities that are best set
10232 in the preamble although they may be set at any point in a document.
10233 If you want to change these settings in your document the best place to
10234 do so is at the very top of a foil, i.
10235 \begin_inset space \thinspace{}
10241 \begin_inset space \space{}
10246 straight after the foilhead.
10249 \begin_layout Standard
10250 For this purpose, the following command styles are provided [
10257 \begin_layout Standard
10261 \begin_layout Plain Layout
10265 begin{multicols}{2}
10273 \begin_layout Itemize
10277 \begin_inset space ~
10283 \begin_layout Itemize
10289 \begin_layout Itemize
10293 \begin_inset space ~
10299 \begin_layout Itemize
10303 \begin_inset space ~
10309 \begin_layout Itemize
10313 \begin_inset space ~
10320 \begin_layout Standard
10321 \begin_inset space ~
10328 \begin_layout Standard
10332 \begin_layout Plain Layout
10344 \begin_layout Standard
10345 There are also a few commands provided by
10349 that aren't directly supported by LyX but I'll tell you what they do and
10350 how to use them in section
10351 \begin_inset space ~
10355 \begin_inset CommandInset ref
10357 reference "sec:unsuppfoils"
10364 \begin_layout Subsection
10365 Building a Set of Foils
10368 \begin_layout Standard
10369 This section will give a simple introduction to using the different environments
10370 to build a set of foils.
10371 If you want to see an example set of foils, take a look at the
10375 file you find in LyX's
10382 \begin_layout Subsubsection
10383 Give It a Title Page
10386 \begin_layout Standard
10387 Unlike other classes that provide
10407 creates the title on a page of its own.
10408 If you leave out the
10412 environment LaTeX will substitute the current date (every time you regenerate
10416 \begin_layout Subsubsection
10420 \begin_layout Standard
10421 As I mentioned earlier, there are four ways of starting a new foil.
10422 For portrait foils you should use
10431 The difference between these two environments is the amount of space between
10432 the title of the foil (the foilhead) and the body of the foil.
10435 \begin_layout Standard
10436 Landscape foils are generated using the
10442 ShortRotatefoilhead
10445 Again the only difference is the spacing between foilhead and body.
10446 Both of the short versions have 0.5 inches less separation between the foilhead
10451 \begin_layout Standard
10452 One problem with the support for landscape foils is the requirement that
10453 you have to use the
10457 driver to generate the PostScript output otherwise the foils won't be rotated.
10458 It is possible to get landscape foils even if you haven't got the
10462 driver provided you can feed your foils sideways through your printer ;-)
10465 \begin_layout Subsubsection
10466 Theorems, Lemmas, Proofs and more
10469 \begin_layout Standard
10470 Due to a small bug in LyX you can't have two of the same type of these environme
10471 nts directly following each other.
10472 They must be separated by something.
10473 If you try, you will just be extending the previous environment as if you
10474 had merged the two environments together.
10475 So, how do you get around this problem? The simplest option is to insert
10476 some text between the two environments or add a
10480 environment between the two with just a
10481 \begin_inset Quotes eld
10489 \begin_inset Quotes erd
10493 This will force LyX to produce two separate environments and hence the
10494 correct LaTeX output.
10495 An example is provided in the example file included with the LyX distribution.
10496 Remember, this problem only occurs if you are trying to place two of the
10497 same type of theorem-like environments one directly after the other.
10500 \begin_layout Subsubsection
10504 \begin_layout Standard
10505 You get all the commonly supported list styles found in other classes as
10506 well as two new ones.
10507 I'll only describe the new ones here.
10508 If you want to find out more about the other list environments check out
10514 If you intend to use itemized lists you might also want to read about the
10518 \begin_inset space ~
10522 \begin_inset space ~
10527 dialog described above in section
10528 \begin_inset space ~
10532 \begin_inset CommandInset ref
10534 reference "sec:bullet"
10541 \begin_layout Standard
10542 The two new list styles,
10550 , are designed to make it easier for you to create lists of do's and don'ts
10551 or right and wrong by providing dedicated environments that use a tick
10552 or a cross as the label of the list.
10553 These lists are in fact dedicated variants of the
10558 They do however require that you have the
10562 packages installed.
10565 \begin_layout Subsubsection
10569 \begin_layout Standard
10574 redefines the floating tables and figures so that they appear exactly where
10575 they are in the text rather than pushing them to the top of the page or
10576 to some user specified location.
10577 In fact if you change the float placement settings they are simply ignored.
10580 \begin_layout Subsubsection
10581 Page Headers and Footers
10582 \begin_inset CommandInset label
10584 name "sec:foilfoot"
10591 \begin_layout Standard
10595 \begin_inset space ~
10604 are two commands used to control the left-footer text string.
10605 The first is meant to allow you to include a graphic logo on your foils
10607 \begin_inset Quotes eld
10615 \begin_inset Quotes erd
10619 While the second is meant to provide a classification for the audience,
10623 \begin_inset space \thinspace{}
10629 \begin_inset space \space{}
10633 It is empty by default.
10636 \begin_layout Standard
10637 The remaining page corners can be filled by
10640 \begin_inset space ~
10645 (which defaults to page numbers),
10648 \begin_inset space ~
10656 \begin_inset space ~
10664 \begin_layout Subsection
10670 \begin_inset CommandInset label
10672 name "sec:unsuppfoils"
10679 \begin_layout Standard
10680 All the commands mentioned below need to be set in a
10688 within another environment.
10691 \begin_layout Subsubsection
10695 \begin_layout Standard
10696 All lengths are adjusted using the
10719 should be replaced by the name given to the length you want to change and
10724 is the length value.
10725 All lengths should be specified in units of length such as inches (
10737 ) or relative to some document or font-based length such as
10747 \begin_layout Standard
10748 It's possible to change the spacing between a foilhead and the body of the
10749 foil by adjusting the length specified by
10756 For example, to make
10761 \begin_inset space \space{}
10764 in closer to their bodies put the following in the preamble:
10770 foilheadskip}{-0.5in}
10773 \begin_layout Standard
10774 The spacings around floats can be adjusted by setting these lengths:
10777 \begin_layout Labeling
10778 \labelwidthstring MMMMMMMMMMM
10785 Separation between the text and the top of the float
10788 \begin_layout Labeling
10789 \labelwidthstring MMMMMMMMMMM
10796 Separation between the float and the caption
10799 \begin_layout Labeling
10800 \labelwidthstring MMMMMMMMMMM
10807 Separation between the caption and the following text
10810 \begin_layout Labeling
10811 \labelwidthstring MMMMMMMMMMM
10818 You can make the captions narrower than the surrounding text by adjusting
10820 Best done relative to
10829 \begin_layout Standard
10830 There are also several title page related lengths that you may find useful
10831 if you have a long title or several authors:
10834 \begin_layout Labeling
10835 \labelwidthstring MMMMMMMMMMM
10842 Separation from headers to
10847 \begin_layout Labeling
10848 \labelwidthstring MMMMMMMMMMM
10866 \begin_layout Labeling
10867 \labelwidthstring MMMMMMMMMMM
10881 \begin_layout Labeling
10882 \labelwidthstring MMMMMMMMMMM
10898 \begin_layout Labeling
10899 \labelwidthstring MMMMMMMMMMM
10915 \begin_layout Standard
10916 The last length related command affects all the list environments.
10927 a list environment then all the vertical spacing between the list items
10929 Note that this is a command not a length so it doesn't require
10935 like the stuff mentioned above.
10938 \begin_layout Subsubsection
10939 Headers and Footers
10942 \begin_layout Standard
10955 commands control whether the logo in the
10959 definition appear on a given page.
10966 in the preamble then none of the foils will have the logo on them.
10967 If you don't want the logo on a particular page place the
10973 directly after the foilhead of that page and the
10979 directly after the next foilhead.
10982 \begin_layout Standard
10983 If you decide to use the
10987 page style setting in the
10990 \begin_inset space ~
10995 dialog you should probably add
11005 to your preamble so headers and footers on landscape pages are correctly
11006 placed when rotated.
11007 This is due to some clashes between the page layouts provided by the
11018 \begin_layout Section
11019 Hollywood (Hollywood spec scripts)
11022 \begin_layout Standard
11028 \begin_layout Subsection
11032 \begin_layout Standard
11033 Getting the format of a Hollywood script right is a
11034 \begin_inset Quotes eld
11038 \begin_inset Quotes erd
11041 It is designed to make the readers focus on content and to be easy and
11042 familiar for the actors to read.
11043 Each page of a script should be one minute of film.
11044 Nothing goes in a script that you cannot see or hear on screen.
11045 The courier 12 pt font should be used throughout.
11049 \begin_layout Subsection
11053 \begin_layout Standard
11054 Speakers' lines should NEVER break in mid-sentence.
11055 If a speaker's lines continue over a page break, repeat the
11059 title followed by (Cont'd).
11062 \begin_layout Subsection
11066 \begin_layout Standard
11071 names as labels then cross-reference the label to insert the name.
11072 The cross-reference dialog will show the current cast of characters.
11073 You can use this to insert the speaker name in narratives also.
11076 \begin_layout Subsection
11077 Paper size and Margins
11080 \begin_layout Standard
11081 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11084 \begin_layout Subsection
11088 \begin_layout Standard
11089 The following environments are available.
11090 You can use hollywood.bind to get the bind keys shown at the right.
11093 \begin_layout Itemize
11097 \begin_inset Newline newline
11102 Used where nothing else works.
11106 \begin_layout Itemize
11112 \begin_inset space \hfill{}
11120 \begin_inset Newline newline
11123 Usually followed by something like
11124 \begin_inset Quotes eld
11127 on Sally waking up.
11128 \begin_inset Quotes erd
11134 \begin_layout Itemize
11138 \begin_inset space \hfill{}
11142 \begin_inset Newline newline
11147 Introduces a new INTERIOR camera set-up.
11148 Always followed by DAY or NIGHT, or something similar to define the lighting
11150 Everthing on this line in CAPS.
11153 \begin_layout Itemize
11157 \begin_inset space \hfill{}
11161 \begin_inset Newline newline
11166 Introduces a new EXTERIOR camera set-up.
11167 Everthing on this line in CAPS.
11170 \begin_layout Itemize
11174 \begin_inset space \hfill{}
11178 \begin_inset Newline newline
11183 The character speaking.
11186 \begin_layout Itemize
11190 \begin_inset space \hfill{}
11194 \begin_inset Newline newline
11199 Instructions to the speaker.
11200 The () are automatically inserted, but only the ( will show in LyX.
11201 Both will be printed.
11204 \begin_layout Itemize
11208 \begin_inset space \hfill{}
11212 \begin_inset Newline newline
11224 \begin_layout Itemize
11228 \begin_inset space \hfill{}
11232 \begin_inset Newline newline
11237 Camera movement instruction.
11239 \begin_inset space \thinspace{}
11243 \begin_inset space \space{}
11249 \begin_layout Itemize
11253 \begin_inset space \hfill{}
11259 \begin_layout Itemize
11263 \begin_inset space \hfill{}
11269 \begin_layout Itemize
11273 \begin_inset space \hfill{}
11279 \begin_layout Itemize
11283 \begin_inset space \hfill{}
11289 \begin_layout Subsection
11293 \begin_layout Itemize
11297 \begin_layout Itemize
11301 \begin_layout Itemize
11303 \begin_inset space \thinspace{}
11310 \begin_layout Itemize
11315 \begin_layout Itemize
11316 PAN — camera movement
11319 \begin_layout Itemize
11320 INSERT — cut to close-up of
11323 \begin_layout Section
11327 \begin_layout Standard
11330 Panayotis Papasotiriou
11333 \begin_layout Subsection
11337 \begin_layout Standard
11338 The ijmpc package is a set of macros that facilitates electronic manuscript
11341 International Journal of Modern Physics C
11344 Similarly, the ijmpd package is for creating manuscripts to be submitted
11347 International Journal of Modern Physics D
11350 Both journals are published by World Scientific.
11351 The corresponding document classes are named
11360 These files, together with instructions for the authors, can be downloaded
11362 \begin_inset Flex URL
11365 \begin_layout Plain Layout
11367 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11373 \begin_inset Flex URL
11376 \begin_layout Plain Layout
11378 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11384 Both packages are modified versions of the standard
11385 \begin_inset Quotes eld
11389 \begin_inset Quotes erd
11392 package, and they are almost (but not exactly) identical.
11393 Most of their features are supported by LyX.
11394 I have used LyX successfully to write articles submitted to both journals
11395 without any problem.
11398 \begin_layout Subsection
11402 \begin_layout Standard
11403 As usual, the easiest way to write a paper is to start with a template.
11406 File\SpecialChar \menuseparator
11425 This will give an (almost) empty document that includes the most common
11426 fields found in a manuscript.
11427 Simply overwrite the existing text (including the brackets,
11432 You should keep in mind the following remarks.
11435 \begin_layout Enumerate
11436 LyX won't let you change the font size and the page style of the document,
11437 because such modifications are not allowed by both packages.
11440 \begin_layout Enumerate
11441 The language of the document should not be changed.
11442 Before previewing your paper, be sure that the babel package is not used.
11443 To do this, click on
11445 Tools\SpecialChar \menuseparator
11456 checkbox in the language settings, and click on
11464 , if you wish to make this change permanent).
11467 \begin_layout Enumerate
11469 \begin_inset Quotes eld
11473 \begin_inset Quotes erd
11476 style must be used to define keywords.
11479 \begin_layout Enumerate
11480 The ijmpc package provides a style named
11481 \begin_inset Quotes eld
11484 Classification Codes
11485 \begin_inset Quotes erd
11488 , which can be used to define classification codes, such as PACS numbers.
11489 Note that this facility is not supported by the ijmpd package.
11492 \begin_layout Enumerate
11493 Several new environments are available:
11494 \begin_inset Quotes eld
11498 \begin_inset Quotes erd
11502 \begin_inset Quotes eld
11506 \begin_inset Quotes erd
11510 \begin_inset Quotes eld
11514 \begin_inset Quotes erd
11518 \begin_inset Quotes eld
11522 \begin_inset Quotes erd
11526 \begin_inset Quotes eld
11530 \begin_inset Quotes erd
11534 \begin_inset Quotes eld
11538 \begin_inset Quotes erd
11542 \begin_inset Quotes eld
11546 \begin_inset Quotes erd
11550 \begin_inset Quotes eld
11554 \begin_inset Quotes erd
11558 \begin_inset Quotes eld
11562 \begin_inset Quotes erd
11566 \begin_inset Quotes eld
11570 \begin_inset Quotes erd
11574 \begin_inset Quotes eld
11578 \begin_inset Quotes erd
11582 \begin_inset Quotes eld
11586 \begin_inset Quotes erd
11590 \begin_inset Quotes eld
11594 \begin_inset Quotes erd
11598 \begin_inset Quotes eld
11602 \begin_inset Quotes erd
11606 Their use is more or less obvious.
11607 LyX supports all these environments; it will use the proper label, text
11608 style, and numbering scheme for each of them.
11611 \begin_layout Enumerate
11612 Both packages use basic citations; the natbib package should not be used.
11613 In LyX, citation references are shown as usual; in the output, citations
11614 are shown as superscripts.
11615 If you want to use a citation as normal text, you should use the
11620 \begin_inset space \thinspace{}
11624 \begin_inset space \space{}
11628 \begin_inset Quotes eld
11632 \begin_inset space \space{}
11642 \begin_inset Quotes erd
11648 \begin_layout Enumerate
11650 \begin_inset Quotes eld
11654 \begin_inset Quotes erd
11657 section in both packages.
11658 To put acknowledgments, just use the
11659 \begin_inset Quotes eld
11663 \begin_inset Quotes erd
11669 \begin_layout Enumerate
11670 Appendices may be added to the paper,
11674 the Acknowledgments and
11679 LyX provides a special environment, called
11680 \begin_inset Quotes eld
11684 \begin_inset Quotes erd
11687 which marks the beginning of the appendices.
11688 This environment should be left blank; it just sends a LaTeX command, but
11689 nothing is really printed.
11691 \begin_inset Quotes eld
11695 \begin_inset Quotes erd
11698 is printed with blue letters, as a signal that all sections after that
11699 point are appendices.
11700 To write an appendix, use the
11701 \begin_inset Quotes eld
11705 \begin_inset Quotes erd
11709 LyX will number each appendix with capital letters, as required by both
11712 \begin_inset Quotes eld
11716 \begin_inset Quotes erd
11723 be present before the first appendix; if not, all appendices will be numbered
11724 as normal sections in the output.
11727 \begin_layout Enumerate
11728 The ijmpc and the ijmpd packages use the
11732 command to implement table captions.
11733 As a result, a table created by LyX is printed correctly, but its caption
11735 However, you can use some TeX code to overpass this problem, so that captions
11736 are printed as expected.
11737 To do so, create a float table as usual, remove the caption, and replace
11738 it with the TeX code
11748 (sic); you must also the TeX code
11752 immediately after the tabular material.
11753 Study the example table included in the template files to see how this
11754 trick is implemented.
11755 Alternatively, If you need table captions, you should implement the whole
11760 file, then include this file to the LyX document (
11762 Insert\SpecialChar \menuseparator
11763 File\SpecialChar \menuseparator
11765 \begin_inset space ~
11771 Details on how to create a table float can be found in the files
11779 , included in the corresponding packages.
11782 \begin_layout Subsection
11783 Preparing a paper for submission
11786 \begin_layout Standard
11787 Before you submit your paper you must export the LyX document as a LaTeX
11790 File\SpecialChar \menuseparator
11791 Export\SpecialChar \menuseparator
11798 \begin_layout Plain Layout
11799 Actually you have the choice between LaTeX (plain) and pdflatex.
11800 If you intend to use pdflatex to prepare the paper, you should use the
11801 pdflatex option so that included graphics are converted to PDF format,
11802 ready for use by pdflatex.
11807 , then make the following changes to the resulting
11814 \begin_layout Enumerate
11815 Remove the comment lines before the
11824 \begin_layout Enumerate
11825 Remove everything between (and including) the
11837 commands, except for any commands you specifically put into the LaTeX preamble.
11840 \begin_layout Standard
11845 file should be saved and processed through LaTeX as many times as necessary.
11846 You may also want to check the resulting
11853 \begin_layout Subsection
11857 \begin_layout Standard
11858 The use of TeX code is reduced to two commands, which must be placed at
11859 the top of the document.
11860 If you started writing your paper by using the
11868 template, the TeX code needed is already in its place; you usually don't
11870 You may only modify the first TeX code to specify the information printed
11871 to the top of odd and even pages (authors' names and short paper's title,
11873 This TeX code must have the form
11877 markboth{Authors' Names}{Short Paper's Title}
11882 \begin_layout Section
11886 \begin_layout Standard
11892 \begin_layout Subsection
11896 \begin_layout Standard
11897 The iopart package provides a document class to create electronic manuscript
11898 submission to the journals published by the Institute of Physics.
11899 Instructions for the authors how to create a paper using the iopart class
11900 can be downloaded together with the iopart package from the site
11901 \begin_inset Flex URL
11904 \begin_layout Plain Layout
11906 ftp://ftp.iop.org/pub/journals/latex2e
11914 \begin_layout Subsection
11918 \begin_layout Standard
11919 The easiest way to write a paper is to start with the file
11923 that is available in LyX's examples files folder.
11924 Open this file, save it under a new name, and start writing.
11925 The example file explains how to use the special text environments.
11926 Here are the most important advices:
11929 \begin_layout Itemize
11930 To be able to compile your document to a PDF, PS, or DVI, assure that the
11933 Use AMS math package
11935 in the document settings under
11942 \begin_layout Itemize
11945 The title environment defines the kind of your paper.
11946 So use one of the following environments for the title:
11950 \begin_layout Itemize
11959 \begin_layout Itemize
11968 \begin_layout Itemize
11974 for a Topical review
11977 \begin_layout Itemize
11986 \begin_layout Itemize
11995 \begin_layout Itemize
12001 for a Paper (same as Title)
12004 \begin_layout Itemize
12010 for a Preliminary communication
12013 \begin_layout Itemize
12019 for a Rapid communication
12022 \begin_layout Itemize
12028 for a Letter to the editor
12032 \begin_layout Itemize
12035 All title environments except of
12039 can have an optional short title.
12042 \begin_layout Itemize
12043 There is a general title environment
12047 which is not directly supported by the LyX.
12048 This can be used as TeX code when your document doesn't fit into one of
12049 the other title types.
12052 \begin_layout Standard
12053 For more informations like hints for special table and formula formatting,
12054 look at the IOP author guidelines.
12057 \begin_layout Section
12061 \begin_layout Standard
12064 Panayotis Papasotiriou
12067 \begin_layout Subsection
12071 \begin_layout Standard
12072 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12073 that facilitates electronic manuscript submission to the journals they
12075 Most known of them (at least in my domain of interest) are
12077 Astrophysics and Space Science
12083 , but there are many others (see a complete list at
12084 \begin_inset Flex URL
12087 \begin_layout Plain Layout
12089 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12095 The Kluwer package may be downloaded from the site
12096 \begin_inset Flex URL
12099 \begin_layout Plain Layout
12101 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12107 A complete user guide is contained in that package (but it can also be
12108 downloaded separately).
12111 \begin_layout Standard
12112 LyX supports many features of the package but not everything.
12113 However, the TeX code needed is reduced to some
12114 \begin_inset Quotes eld
12118 \begin_inset Quotes erd
12121 commands of the package (see
12122 \begin_inset space ~
12126 \begin_inset CommandInset ref
12128 reference "subsec:kluwer_peculiarities"
12133 I have recently used LyX to write an article submitted to the
12135 Astrophysics and Space Science
12137 without any problem.
12140 \begin_layout Subsection
12144 \begin_layout Standard
12145 The easiest way to write a paper is to start with the Kluwer template file.
12148 File\SpecialChar \menuseparator
12160 This will give an (almost) empty document that includes the most common
12161 fields found in a manuscript and a short description of their use.
12162 As in most templates, simply overwrite the existing text (including the
12167 ) with the correct information.
12170 \begin_layout Subsection
12171 Preparing a paper for submission
12174 \begin_layout Standard
12175 As in the AASTeX package, before you submit your paper to a journal you
12177 \begin_inset Quotes eld
12181 \begin_inset Quotes erd
12187 \begin_layout Enumerate
12188 Export your paper as a LaTeX file.
12189 To do this, click on
12191 File\SpecialChar \menuseparator
12192 Export\SpecialChar \menuseparator
12199 \begin_layout Enumerate
12204 file with a text editor and make the following changes
12208 \begin_layout Enumerate
12209 remove the comment lines before the
12218 \begin_layout Enumerate
12219 remove everything between (and including) the
12231 commands, except for any commands you specifically put into the LaTeX preamble.
12234 \begin_layout Standard
12243 \begin_layout Enumerate
12248 file through LaTeX as many times as necessary (usually up to three).
12251 \begin_layout Enumerate
12257 \begin_inset space \thinspace{}
12261 \begin_inset space \space{}
12268 , and check if everything is OK (it should, if you didn't make any mistake).
12271 \begin_layout Subsection
12272 \begin_inset Quotes eld
12276 \begin_inset Quotes erd
12279 of the Kluwer package
12280 \begin_inset CommandInset label
12282 name "subsec:kluwer_peculiarities"
12289 \begin_layout Standard
12290 The Kluwer package has the following
12291 \begin_inset Quotes eld
12295 \begin_inset Quotes erd
12301 \begin_layout Enumerate
12302 It is possible to write multiple articles in the same LaTeX file
12306 \begin_layout Plain Layout
12307 I can't imagine any good reason to do this.
12313 Each article must be included in the environment
12314 \begin_inset Quotes eld
12318 \begin_inset Quotes erd
12322 Unfortunately, this environment cannot be omitted, even if you write just
12324 Therefore, each article starts with the command
12330 and, obviously, ends with the command
12337 Although this can be implemented in LyX, I didn't included it, since it
12338 looks ugly and can confuse the novice user.
12339 Therefore, you need to enter them directly and mark them as LaTeX code
12341 \begin_inset Quotes eld
12345 \begin_inset Quotes erd
12351 \begin_layout Enumerate
12352 Information given at the beginning of the article (i.
12353 \begin_inset space \thinspace{}
12357 \begin_inset space \space{}
12360 title, subtitle, author, institution, running title, running author, abstract
12361 and keywords) must be included in an environment called
12362 \begin_inset Quotes eld
12366 \begin_inset Quotes erd
12370 This is not implemented in LyX, so you must enter title, subtitle etc.
12371 \begin_inset space ~
12374 between two TeX code lines (
12389 \begin_layout Enumerate
12390 According to the user manual, the label of each bibliography item must be
12414 \begin_layout Standard
12419 template takes care of all these
12420 \begin_inset Quotes eld
12424 \begin_inset Quotes erd
12428 If you start a new paper using this template you don't need to do anything
12433 \begin_layout Enumerate
12434 don't delete the TeX code included in the template, and
12437 \begin_layout Enumerate
12438 copy the example bibliography item included in the template and modify it
12439 as necessary to enter new bibliography items.
12442 \begin_layout Section
12446 \begin_layout Standard
12452 \begin_layout Subsection
12456 \begin_layout Standard
12457 The LyX document classes
12459 article (koma-script)
12463 report (koma-script)
12481 correspond to the LaTeX document classes
12498 \begin_inset space ~
12501 of the Koma-Script family.
12502 They are replacements for the standard document classes
12518 , resp., and fit better to European typography conventions in a number of
12522 \begin_layout Itemize
12523 Standard character size is 11pt in
12525 article (koma-script)
12529 report (koma-script)
12537 letter (koma-script)
12542 \begin_layout Itemize
12543 Headings, labels of the description environment, and a number of elements
12546 letter (koma-script)
12548 document class are set in a bold sans serif font.
12552 \begin_layout Plain Layout
12553 There is a big difference between the bold sans serif old cm fonts and new
12554 ec fonts, especially in the appearance of headings.
12555 In comparison, the ec bold sans serif fonts look a bit thin.
12556 Here the LaTeX package
12564 helps to produce the
12565 \begin_inset Quotes eld
12569 \begin_inset Quotes erd
12572 appearance when using the ec fonts.
12577 The numbering of chapter headings is made in the same way as the numbering
12578 of section headings, that is without the extra line
12579 \begin_inset Quotes eld
12582 Chapter\SpecialChar \ldots{}
12584 \begin_inset Quotes erd
12588 In addition, the appearance of the headings can be modified by using a
12589 number of options (in LyX to be entered in the field
12592 \begin_inset space ~
12599 Layout\SpecialChar \menuseparator
12603 A detailed German description of these options can be found in the Koma-Script
12611 \begin_layout Itemize
12612 The main means in the Koma-Script document classes to design the type area
12621 (in LyX to be entered in the extra class options field in the dialog
12623 Document\SpecialChar \menuseparator
12627 They make a clearer modification of page margins possible as do the options
12630 Document\SpecialChar \menuseparator
12634 A detailed German description of these and other type area options can
12635 be found in the Koma-Script documentation
12642 \begin_layout Itemize
12643 The LaTeX document classes of the Koma-Script family define a number of
12644 additional commands.
12645 Those part of it which makes sense in LyX is implemented in corresponding
12649 \begin_layout Standard
12650 A detailed German description of the LaTeX document classes of the Koma-Script
12651 family can be found in the Koma-Script documentation
12659 \begin_layout Plain Layout
12660 There is an English translation
12664 , but it is not a complete one.
12669 The following sections describe only those aspects, which are relevant
12673 \begin_layout Subsection
12674 article (koma-script), report (koma-script), and book (koma-script)
12677 \begin_layout Standard
12678 The document classes
12680 article (koma-script)
12684 report (koma-script)
12694 are implemented in the layout files
12707 They contain all the paragraph types of the corresponding standard document
12720 , resp., partly modified, with the exception of the LyX specific
12724 -type, which is replaced by the new
12728 -type having the same functionality.
12733 -Type there is a number of new paragraph types added.
12740 letter (koma-script)
12745 \begin_layout Itemize
12754 : are equivalents to
12762 , resp., additionally inserting an entry in the table of contents.
12771 are not contained in
12773 article (koma-script)
12778 \begin_layout Itemize
12787 : behave exactly as
12795 , resp., additionally clearing running heads.
12800 is not contained in
12802 article (koma-script)
12808 \begin_layout Plain Layout
12821 report (koma-script)
12823 , but since this is identical to
12827 , is has not been implemented in LyX.
12835 \begin_layout Itemize
12840 : generates a heading directly above the following paragraph in the standard
12841 character size without affecting the structure of the document.
12844 \begin_layout Itemize
12853 are special captions which respect the different space settings needed
12854 for captions placed above or below an element (if you follow strict typographic
12855 rules, you might want to place table captions always above the table).
12856 You can also use the class option
12860 , which will switch
12873 You need at least Koma-Script version 2.8q to use this.
12876 \begin_layout Itemize
12881 : can be used to set a bonmot, e.
12882 \begin_inset space \thinspace{}
12886 \begin_inset space \space{}
12889 at the beginning of a chapter.
12890 If you use the optional argument (
12892 Insert\SpecialChar \menuseparator
12894 \begin_inset space ~
12899 ), you can insert the dictum's author there.
12900 Dictum and author are separated by a line.
12901 You need at least Koma-Script version 2.8q to use this.
12906 is not contained in
12908 article (koma-script)
12913 \begin_layout Standard
12914 The following types, together with the standard types
12926 , form the title area of the document.
12927 They must be entered ahead of the first
12928 \begin_inset Quotes eld
12932 \begin_inset Quotes erd
12939 \begin_layout Plain Layout
12940 The corresponding LaTeX commands must appear before the
12951 When such a type is used more than once, the latter usage overwrites the
12952 former one, that means, for every type only the latest usage is valid.
12953 The order of the different types however has, like
12965 , no effect on the appearance of the produced document.
12968 \begin_layout Itemize
12973 : produces a centered paragraph above the ordinary title (
12985 ) for the subject of the document.
12988 \begin_layout Itemize
12993 : produces a centered paragraph below the ordinary title (
13005 ) for the publishers' name.
13008 \begin_layout Itemize
13015 report (koma-script)
13021 produces a centered paragraph on its own page behind the title page, or
13024 article (koma-script)
13026 produces a centered paragraph below the ordinary title (
13042 ) for a dedication.
13045 \begin_layout Itemize
13050 : produces a left aligned paragraph above the ordinary title (
13066 ) for a document`s head.
13069 \begin_layout Itemize
13074 : produces in a double-sided print in
13076 report (koma-script)
13082 a left-aligned paragraph at the top of the title page`s back or has no
13083 effect in a single-sided print or in
13085 article (koma-script)
13090 \begin_layout Itemize
13095 : produces in a double-sided print in
13097 report (koma-script)
13103 a left-aligned paragraph at the bottom of the title page`s back or has
13104 no effect in a single-sided print or in
13106 article (koma-script)
13111 \begin_layout Itemize
13116 : produces a special
13117 \begin_inset Quotes eld
13121 \begin_inset Quotes erd
13124 page ahead of the actual document containing a paragraph without special
13128 \begin_layout Standard
13129 The layout files for the document classes
13131 article (koma-script)
13135 report (koma-script)
13141 do include the file
13146 This is thought of as a place to define your own types.
13151 in your personal layout directory and edit the file!
13154 \begin_layout Subsection
13155 letter (koma-script)
13158 \begin_layout Standard
13162 \begin_layout Plain Layout
13174 \begin_layout Standard
13178 letter (koma-script)
13180 is implemented in the layout file
13185 It contains all the paragraph types of the corresponding standard document
13190 , partly modified, with the exception of the LyX specific types
13202 type, which is replaced by the new
13207 In addition, it contains, in contrast to the standard document class, the
13225 Furthermore, there are a number of new letter specific types.
13228 \begin_layout Standard
13232 \begin_layout Plain Layout
13244 \begin_layout Standard
13245 The appearance of the letter produced by this document class can be controlled
13246 by a number of LaTeX commands, which you can put in the LaTeX preamble.
13250 \begin_layout Plain Layout
13251 For example, the standard appearance of the letter`s heading, consisting
13252 of name and address, is quite self-willed.
13254 \begin_inset Quotes eld
13258 \begin_inset Quotes erd
13261 heading is produced by the following LaTeX commands in the preamble:
13264 \begin_layout LyX-Code
13274 \begin_layout LyX-Code
13290 \begin_layout LyX-Code
13300 \begin_layout LyX-Code
13320 A detailed German description of such LaTeX commands can be found in the
13321 Koma-Script documentation
13326 With it, the letter's author can produce his personal letter layout.
13329 \begin_layout Standard
13338 define the beginning of the letter and must be used in every letter.
13339 To emphasize them in the LyX document class, they are marked with the letter
13349 \begin_inset space ~
13352 in the left margin.
13353 It is possible to write any number of letters in one file.
13358 type produces a new letter using the same addressee and a
13362 type produces a new addressee.
13379 are ordinary paragraph types and can also be used several times in one
13380 and the same letter.
13383 \begin_layout Itemize
13388 : produces a paragraph for the addressee and implicitly defines the beginning
13392 \begin_layout Itemize
13397 : produces a paragraph for the form of address and implicitly produces a
13401 \begin_layout Itemize
13406 : produces a paragraph for a close.
13409 \begin_layout Itemize
13414 : produces a paragraph for a postscript.
13417 \begin_layout Itemize
13422 : produces a paragraph for a distribution list.
13425 \begin_layout Itemize
13430 : produces a paragraph for enclosures.
13433 \begin_layout Standard
13474 are input types provided with a label to enter information, which will
13475 be processed by the document class.
13479 \begin_layout Plain Layout
13480 It could be seen as a matter of inconsequence, that the types
13488 described above are not such input types as well.
13489 Because of the special meaning of those types, however, I have implemented
13490 them as ordinary paragraph types with a one letter mark in the left margin.
13491 Moreover, it would affect my feeling of symmetry, if the
13499 type had such a serious different appearance.
13504 The types must be used ahead of the corresponding
13511 \begin_layout Standard
13512 An implementation of these types in a WYSIWYG fashion does not seem to make
13513 sense, because the real appearance of the produced letter does not only
13514 depend on the usage of the particular type, but also on other factors.
13515 For example, a signature entered in the
13519 type will in the standard behavior appear in the produced letter only,
13520 when in the same letter also a
13525 The entered value of the
13529 type will in the standard behavior not appear in the produced letter at
13531 The possibility to design the letter`s heading freely is already indicated
13532 in a footnote above.
13535 \begin_layout Standard
13536 The input types can also be used as empty paragraphs.
13537 This makes sense e.
13538 \begin_inset space \thinspace{}
13542 \begin_inset space \space{}
13554 type is not used at all, in the standard behavior the value of the
13558 type is used as signature, whereas if an empty
13562 type is used, no signature value is defined.
13565 \begin_layout Standard
13566 By using the input types it is possible to write a letter template, containing
13567 filled input types with your personal dates (name, address, etc.) and empty
13568 input types for other dates you want to enter.
13571 \begin_layout Itemize
13576 : sender's name, in the standard behavior appears as a centered paragraph
13577 in small caps in the letter`s heading.
13580 \begin_layout Itemize
13585 : sender's signature, in the standard behavior appears below the
13594 type is used, the value of the
13598 type appears instead.
13601 \begin_layout Itemize
13606 : sender's address, in the standard behavior appears in a centered paragraph
13607 in the letter`s heading below the sender's name.
13610 \begin_layout Itemize
13615 : sender's telephone number, in the standard behavior only sets the LaTeX
13625 \begin_layout Itemize
13630 : place of the letter`s making.
13633 \begin_layout Itemize
13638 : date of the letter`s making.
13647 , in the standard behavior, produce the place and the date in a right-aligned
13648 line below the addressee's field.
13653 type is used, neither place nor date appear, independent of the value of
13663 type is used, the date of the letter `s production is used.
13666 \begin_layout Itemize
13671 : sender`s back address, in the standard behavior appears above the addressee's
13672 field in a small sans serif font.
13675 \begin_layout Itemize
13680 : special mail information, in the standard behavior appears underlined
13681 above the addressee's field below the back address.
13684 \begin_layout Itemize
13689 : additional information, in the standard behavior appears on right side
13690 below the addressee`s field.
13693 \begin_layout Itemize
13698 : the letter's title, in the standard behavior appears in a big, bold, sans
13699 serif font above the subject.
13702 \begin_layout Itemize
13707 : the letter's subject, in the standard behavior appears in a bold font
13715 \begin_layout Standard
13736 produce a business letter like line above the
13740 line containing the fields
13741 \begin_inset Quotes eld
13745 \begin_inset Quotes erd
13749 \begin_inset Quotes eld
13753 \begin_inset Quotes erd
13757 \begin_inset Quotes eld
13761 \begin_inset Quotes erd
13765 \begin_inset Quotes eld
13769 \begin_inset Quotes erd
13773 \begin_inset Quotes eld
13777 \begin_inset Quotes erd
13781 \begin_inset Quotes eld
13785 \begin_inset Quotes erd
13789 For the date field, the value of the
13795 \begin_inset Quotes eld
13798 business letter types
13799 \begin_inset Quotes erd
13802 is used, the value of the
13806 type however does not appear, but only the LaTeX variable
13813 The ordinary output of place and date in a right-aligned line below the
13814 addressee`s field is suppressed.
13815 The types are implemented as input types provided with a label and must
13816 be used ahead of the corresponding
13823 \begin_layout Itemize
13831 \begin_layout Itemize
13839 \begin_layout Itemize
13847 \begin_layout Itemize
13855 \begin_layout Itemize
13863 \begin_layout Subsection
13864 The new letter class: letter (koma-script v.2)
13867 \begin_layout Standard
13873 \begin_layout Standard
13874 \begin_inset VSpace medskip
13880 \begin_layout Standard
13882 Koma-Script version 2.8 has introduced a new letter class
13886 which supersedes the now unsupported
13891 It has — on the LaTeX side — a completely new interface and is not compatible
13892 with the old class.
13893 Therefore, LyX supports both, though it is recommended to use the new class.
13896 \begin_layout Standard
13897 This class covers the same functionality as
13899 letter (koma-script),
13902 The basic items are
13906 (receiver's address, same as
13910 in the old layout),
13923 will start a new letter (i.
13924 \begin_inset space \thinspace{}
13928 \begin_inset space \space{}
13931 you can write several letters per document).
13932 New elements are sender's
13948 and the possibility to use a
13954 Insert\SpecialChar \menuseparator
13960 \begin_layout Standard
13961 The biggest improvement is, though, that the letter's layout is configurable
13962 at almost any needs.
13963 This can be done via the preamble or with a special style file (Letter
13964 Class Option, extension
13968 ), that will be read in as a class option.
13972 \begin_layout Plain Layout
13973 The KOMA package comes with some default
13978 There is, for instance, a
13982 file that follows german typesetting rules, or a
13986 that provides the default layout of the old
13991 The latter can be loaded with the class option
14000 ayout\SpecialChar \menuseparator
14005 ocument\SpecialChar \menuseparator
14017 template that is included in LyX for examples.
14018 A detailed description is to be found in the Koma-Script documentation
14026 \begin_layout Subsection
14030 \begin_layout Standard
14031 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14035 \begin_layout Itemize
14036 The chapter number of a
14040 type appears on a line of its own above the chapter heading instead of
14041 appearing in the same line ahead of it.
14042 The cause for that is the LyX internal behavior for the labeltype
14046 in the layout file.
14049 \begin_layout Itemize
14050 The headings of the types
14058 are only put in the
14059 \begin_inset Quotes eld
14063 \begin_inset Quotes erd
14066 LaTeX table of contents, but not in the LyX table of contents (
14068 Document\SpecialChar \menuseparator
14070 \begin_inset space ~
14074 \begin_inset space ~
14082 \begin_layout Itemize
14083 The paragraphs in a
14087 document class appear in a skip separation mode, not indented.
14088 This is the standard behavior, no special LaTeX commands are needed for
14092 Document\SpecialChar \menuseparator
14095 dialog the corresponding radio button indicates
14104 value always has the effect that extra LaTeX commands are inserted in the
14105 document to produce the gap, which is not what is wanted in this case.
14108 \begin_layout Section
14109 Latex8 (IEEE Conference Papers)
14112 \begin_layout Standard
14118 \begin_layout Subsection
14122 \begin_layout Standard
14123 Since this class is specifically for writing submissions to IEEE sponsored
14124 conferences I strongly recommend that you get a copy of their Authors Kit.
14129 package and associated bibliography style file is included in the kit.
14130 The Authors Kit is usually sent out by email once your initial submission
14132 There is a lot of useful information in the Authors Kit explaining formatting
14133 restrictions and so on and I will assume you have read this since that
14134 means I don't have to repeat it all here.
14137 \begin_layout Subsection
14141 \begin_layout Standard
14142 [AR\SpecialChar \@.
14146 \begin_layout Subsection
14147 Supported Environments
14150 \begin_layout Itemize
14156 \begin_layout Itemize
14162 \begin_layout Itemize
14168 \begin_layout Itemize
14174 \begin_layout Itemize
14180 \begin_layout Itemize
14186 \begin_layout Itemize
14192 \begin_layout Itemize
14198 \begin_layout Itemize
14204 \begin_layout Subsection
14205 Differences Between Screen and Paper
14208 \begin_layout Standard
14209 There are slight differences in appearance mainly with the presentation
14210 of section counters.
14211 On screen the trailing period of the section counter is missing but it
14212 will appear in the output so don't let this worry you.
14215 \begin_layout Section
14219 \begin_layout Standard
14225 \begin_layout Subsection
14229 \begin_layout Standard
14230 Memoir is a very powerful and constantly evolving class.
14231 It has been designed with regard to fictional and non-fictional literature.
14232 Its aim is to let the user have maximum control over the typesetting of
14234 Memoir is based on the standard book class, but it can also emulate the
14235 article class (see below).
14238 \begin_layout Standard
14239 Peter Wilson, the developer of Memoir, is known as the author of lots of
14240 useful packages in the LaTeX world.
14241 Most of them have been merged with Memoir.
14242 Therefore, it is much easier to layout the table of contents, appendices,
14243 chapter designs and such.
14244 LyX, though, does not support all of these goodies natively.
14245 Some of them might be added to forthcoming releases
14249 \begin_layout Plain Layout
14250 You are invited to send suggestions to
14251 \begin_inset Flex URL
14254 \begin_layout Plain Layout
14256 lyx-devel@lists.lyx.org
14266 , lots will probably never, due to the limitations of LyX's framework.
14267 Of course you can still use all features with the help of some native LaTeX
14272 \begin_layout Plain Layout
14277 \begin_layout Plain Layout
14287 \begin_inset space ~
14291 \begin_inset CommandInset ref
14293 reference "sec:Inserting-TeX-Code"
14303 In this section, we can only list those features which are natively supported
14305 For detailed descriptions (and for the rest of features) we are recommending
14306 to have a look at the detailed manual of the Memoir class
14310 \begin_layout Plain Layout
14315 \begin_layout Plain Layout
14325 \begin_inset Flex URL
14328 \begin_layout Plain Layout
14330 CTAN:/macros/latex/memoir/memman.pdf
14340 , which is not only a user guide for the class, but also both a comprehensive
14341 description on good typesetting and a superb example for good typesetting
14345 \begin_layout Subsection
14346 Basic features and restrictions
14349 \begin_layout Standard
14350 Memoir supports basically all features of the standard book classes.
14351 There are, however, some differences, as follows:
14354 \begin_layout Description
14356 \begin_inset space ~
14359 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14362 \begin_layout Description
14364 \begin_inset space ~
14367 style: The fancy page style is not supported, due to a command clash between
14368 Memoir and the fancyhdr package (they are both defining a command with
14369 the same name, which confuses LaTeX).
14370 Instead, Memoir comes with a bunch of own page styles (see
14372 Layout\SpecialChar \menuseparator
14373 Document\SpecialChar \menuseparator
14375 \begin_inset space ~
14381 If you want to use these for the chapter pages, you have to use the command
14388 in the main text or in preamble (e.
14389 \begin_inset space \thinspace{}
14393 \begin_inset space \space{}
14400 chapterstyle{companion}
14405 \begin_layout Description
14406 Sectioning: Sectionings (chapter, section, subsection etc.) are coming with
14407 an optional argument in the standard classes.
14408 With this, you can specify an alternative version of the title for the
14409 table of contents and the headers (for instance, if the title is too long).
14410 In LyX, you can do this via
14412 Insert\SpecialChar \menuseparator
14414 \begin_inset space ~
14419 at the beginning of a chapter/section.
14420 Memoir features a second optional argument and thus separates the table
14421 of contents from the header.
14422 You can define three variants of a title with this: one for the main text,
14423 one for the table of contents, and one for the headers.
14424 Simply insert two optional arguments if you need this feature, the first
14425 one containing the short title for the Table of Contents, the second one
14426 containing an alternative short title for the headers.
14429 \begin_layout Description
14430 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14431 of contents, the list of figures and the list of table start a new page
14433 Memoir does not follow this route.
14434 You have to insert a page break yourself, if you want to have one.
14437 \begin_layout Description
14438 Titlepage: For some unknown reason, Memoir uses pagination on the title
14439 page (in the standard classes, title pages are
14440 \begin_inset Quotes eld
14444 \begin_inset Quotes erd
14448 \begin_inset space \thinspace{}
14452 \begin_inset space \space{}
14456 If you want an empty title page, type
14460 aliaspagestyle{title}{empty}
14465 \begin_layout Description
14466 Article: With the class option
14472 Layout\SpecialChar \menuseparator
14473 Document\SpecialChar \menuseparator
14475 \begin_inset space ~
14480 ), you can emulate article style.
14481 That is, counters (footnotes, figures, tables etc.) will not be reset on
14482 new chapters, chapters don't start a new page (but are—in contrary to
14483 \begin_inset Quotes eld
14487 \begin_inset Quotes erd
14490 article classes—still allowed), parts, though, use their own page, as in
14494 \begin_layout Description
14495 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14496 font commands, which have been used in the old LaTeX version 2.09 (e.
14497 \begin_inset space \thinspace{}
14501 \begin_inset space \space{}
14517 It produces an error and stops LaTeX whenever such a command appears.
14522 reallows the commands and spits out warnings instead (which does at least
14524 Since a lot of packages and particularly BibTeX style files are still using
14525 those commands, we have decided to use this option by default.
14528 \begin_layout Subsection
14532 \begin_layout Standard
14533 We will only describe the features supported by LyX (which is not much currently
14535 Please consult the Memoir manual
14539 \begin_layout Plain Layout
14544 \begin_layout Plain Layout
14554 \begin_inset Flex URL
14557 \begin_layout Plain Layout
14559 CTAN:/macros/latex/memoir/memman.pdf
14572 \begin_layout Description
14573 Abstract: You may wonder why an abstract is an extra feature.
14574 Well, it is in book class.
14575 Usually books don't have abstracts.
14576 Memoir, however, has.
14577 You can use it wherever and how often you like.
14580 \begin_layout Description
14581 Chapterprecis: You may know this from belletristic: The contents of a chapter
14582 is shortly described below the title and also in the table of contents
14584 \begin_inset space \thinspace{}
14588 \begin_inset space \space{}
14593 Our hero arrives in Troia; he loses some friends; he finds others
14596 Chapterprecis does exactly this.
14597 It is therefore only sensible below a chapter.
14600 \begin_layout Description
14601 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14602 The epigraph environment provides an elegant way of typesetting such a
14604 The motto itself (text) and its author (source) are divided by a short
14606 Unfortunately, we have to fool LyX a bit here again, since the environment
14607 needs two arguments (text and source).
14608 In this case, we have to use curly brackets (in TeX mode) between the two
14619 <author of the slogan>.
14622 \begin_layout Description
14623 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14624 complex figurative poems).
14625 LyX can only support a few of them.
14626 One is poemtitle, which is a centered title for poems, which will also
14627 be added to the table of contents (verse is the standard environment for
14629 Memoir has some enhanced versions of verse, but you need to use TeX code,
14630 because they have to be nested inside regular verse environments, which
14631 is not possible with LyX).
14634 \begin_layout Description
14635 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14638 \begin_layout Section
14639 Article (mwart), book (mwbk) and report (mwrep)
14640 \begin_inset OptArg
14643 \begin_layout Plain Layout
14656 \begin_layout Standard
14662 \begin_layout Standard
14663 The LyX document classes
14679 correspond to the LaTeX document classes
14692 They are replacements for the standard document classes
14704 , resp., and fit better to Polish typography conventions in a number of points.
14708 \begin_layout Standard
14712 \begin_layout Itemize
14713 Unnumbered titles (with star, e.
14714 \begin_inset space \thinspace{}
14718 \begin_inset space \space{}
14725 ) are added into table of contents,
14728 \begin_layout Itemize
14729 Additional page styles:
14733 \begin_layout Description
14734 uheadings header with separated lines,
14737 \begin_layout Description
14738 myheadings custom header, contents headers via commands:
14753 \begin_layout Description
14754 myuheadings custom header with separated lines,
14757 \begin_layout Description
14758 outer page number is placed on outer side of page
14762 \begin_layout Itemize
14767 \begin_layout Description
14768 rmheadings serif titles — default,
14771 \begin_layout Description
14772 sfheadings sansserif titles,
14775 \begin_layout Description
14776 authortitle on title page first placed is author next title — default,
14779 \begin_layout Description
14780 titleauthor on title page first placed is title next author,
14783 \begin_layout Description
14784 withmarginpar reserve place on page for margins.
14788 \begin_layout Section
14792 \begin_layout Standard
14797 provides an alternative to the standard
14802 It provides similar functionality, but you might prefer this layout with
14803 sans serif sections, headings, and more.
14806 \begin_layout Section
14810 \begin_layout Standard
14816 \begin_layout Standard
14817 \begin_inset VSpace bigskip
14823 \begin_layout Standard
14828 \begin_inset space ~
14833 textclass works with the American Physical Sociey's RevTeX 4.0 (the
14834 \begin_inset Formula $\beta$
14837 release of May, 1999) class.
14840 \begin_layout Standard
14845 textclass, which works with RevTeX 3.1.
14846 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
14847 That means that it doesn't interact very well with LyX, which requires
14848 LaTeX2e, although it has been kludged to work.
14849 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
14853 \begin_inset space ~
14858 textclass should also be pretty easy to use.
14861 \begin_layout Standard
14862 These documents are supposed to be used in
14866 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
14867 macros, and assume you'll know what to put in the preamble if necessary.
14870 \begin_layout Subsection
14874 \begin_layout Standard
14875 All you need to do is install RevTeX 4, as described in the package's README
14877 The package can be found at The RevTeX 4 Web Site
14878 \begin_inset Flex URL
14881 \begin_layout Plain Layout
14883 http://publish.aps.org/revtex4/
14889 Install it somewhere that LaTeX can see it.
14890 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
14892 \begin_inset space \thinspace{}
14896 \begin_inset space \space{}
14899 not the directory where you installed the class file.) Then, if you reconfigure
14900 LyX, it will find the class file and let you use the RevTeX4 textclass.
14903 \begin_layout Standard
14904 Probably the easiest way to get started is either to import a RevTeX 4 document
14912 \begin_inset space ~
14917 template, found in the templates directory.
14920 \begin_layout Subsection
14924 \begin_layout Standard
14925 Optional arguments to
14932 \begin_inset Quotes eld
14936 \begin_inset Quotes erd
14940 \begin_inset Quotes eld
14944 \begin_inset Quotes erd
14954 \begin_inset space ~
14962 \begin_inset space ~
14968 Remember that in RevTeX, at least one optional argument is required!
14971 \begin_layout Standard
14972 Other preamble matter, like
14979 \begin_inset space ~
14985 \begin_inset space ~
14990 dialog, also as usual.
14993 \begin_layout Subsection
14997 \begin_layout Standard
14998 The layouts basically correspond to the commands in RevTeX4.0.
14999 For example, the Email layout corresponds to
15006 Note that (at least as of RevTeX 4.0 Beta), the
15014 layouts are exactly equivalent, so you shouldn't need to use both.
15018 \begin_layout Plain Layout
15019 In case you're curious, both were included so that
15023 would be able to translate both
15043 \begin_layout Subsection
15047 \begin_layout Standard
15048 There are a couple of important unique aspects of RevTeX 4 which might cause
15049 bugs that will be even more confusing in LyX.
15052 \begin_layout Standard
15070 The LyX equivalent is that there is a separate Thanks layout.
15075 write footnotes in the
15079 layout, or weird things may happen.
15080 See the RevTeX 4 documentation for more details.
15083 \begin_layout Standard
15087 \begin_inset space ~
15095 \begin_inset space ~
15104 layouts must be placed
15112 layout and the corresponding
15129 , the LaTeX won't compile.
15132 \begin_layout Subsection
15136 \begin_layout Standard
15137 The main problem with this layout is that you can't use the optional arguments
15138 to layouts like Email and Title.
15139 (The problem is not unique to this layout; you can't use optional arguments
15140 to the Section layouts either.) This means that after you export that file
15141 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15142 need to edit the LaTeX file with a text editor to add the optional arguments
15144 \begin_inset space \thinspace{}
15148 \begin_inset space \space{}
15151 the running title for the page headers.
15152 Lacking these layouts makes the
15158 (and the equivalent
15164 ) useless, so the corresponding layouts don't exist, and will have to be
15169 \begin_layout Plain Layout
15174 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15175 has not been updated yet to take advantage of it.
15183 \begin_layout Section
15184 Springer Journals (
15191 \begin_layout Standard
15197 \begin_layout Subsection
15201 \begin_layout Standard
15202 These are the layout files for some of the journal formats used by Springer
15203 Verlag and listed on
15204 \begin_inset Flex URL
15207 \begin_layout Plain Layout
15209 http://www.springer.de/author/tex/help-journals.html
15214 , where you should also go to fetch the class files (yes, these are LaTeX2e
15216 It is a modular system: the things common to all journals are implemented
15221 , which journal-specific layout files (such as, e.
15222 \begin_inset space \thinspace{}
15226 \begin_inset space \space{}
15233 for Journal of Geodesy) can include.
15236 \begin_layout Standard
15237 This means that implementing support for any other Springer journal on this
15238 list is as simple as writing your own
15246 file following the outline given in
15254 \begin_layout Standard
15255 It is reasonably well tested only for the Journal of Geodesy.
15264 come with the standard LyX distribution.
15265 Install the relevant class file (downloaded from Springer) in a proper
15266 directory, reconfigure LaTeX (in the teTeX case by running
15270 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15271 and it should work.
15274 \begin_layout Subsection
15278 \begin_layout Standard
15279 A large number of theorem-like styles —
15285 \SpecialChar \ldots{}
15291 \begin_layout Standard
15294 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15295 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15298 See the Springer class file documentation for details.
15301 \begin_layout Subsection
15305 \begin_layout Itemize
15317 \begin_layout Itemize
15320 Probability Theory and Related Fields
15326 — Jean-Marc Lasgouttes
15329 \begin_layout Standard
15330 Add your own, it isn't so hard!
15333 \begin_layout Subsection
15337 \begin_layout Standard
15338 These files are partly based on the older
15342 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15343 file from Springer.
15348 layout, are now defunct.
15349 Jean-Marc Lasgouttes helped out big in making me find my way around the
15350 LyX layout file mechanism.
15353 \begin_layout Subsection
15357 \begin_layout Standard
15359 But probably less than in the old hacked-LaTeX
15366 \begin_layout Standard
15368 \begin_inset space \thinspace{}
15371 g.: does not display the number for theorem-like layouts, just #.
15374 \begin_layout Section
15380 \begin_inset CommandInset label
15389 \begin_layout Standard
15397 \begin_layout Subsection
15401 \begin_layout Standard
15402 This section describes how to use LyX to make slides for overhead projectors.
15403 There are two document classes that can do this: the default slides class
15409 This section documents the former.
15412 \begin_layout Standard
15413 I'm going to say this again, nice and clear, so that there's no misunderstanding
15417 \begin_layout Standard
15418 \begin_inset VSpace bigskip
15424 \begin_layout Standard
15428 This section documents the class
15429 \begin_inset Quotes eld
15437 \begin_inset Quotes erd
15445 \begin_layout Standard
15446 \begin_inset VSpace bigskip
15452 \begin_layout Standard
15453 If you're looking for the documentation for
15454 \begin_inset Quotes eld
15462 \begin_inset Quotes erd
15465 , check out section
15466 \begin_inset space ~
15470 \begin_inset CommandInset ref
15472 reference "sec:foiltex"
15482 \begin_inset Quotes eld
15490 \begin_inset Quotes erd
15493 ] is actually somewhat better than the default
15501 \begin_layout Plain Layout
15502 \SpecialChar \ldots{}
15503 or so I've been told repeatedly by its advocates.
15504 Having never used it, I have no idea if this claim is true or not.
15509 which this section documents.
15512 \begin_layout Standard
15513 This class is the LaTeX2e improvement of the old
15518 Every LaTeX2e distribution includes this class [which I'll just refer to
15520 \begin_inset Quotes eld
15528 \begin_inset Quotes erd
15531 from now on], so you're bound to have it.
15532 As I noted earlier, there are other classes, such as
15536 , which also produce slides for overhead projectors and do a better job
15538 However, there are some things which
15542 can do which the others can't, such as generate overlays.
15543 Read on to learn more!
15546 \begin_layout Subsection
15548 \begin_inset CommandInset label
15550 name "sec:slidesetup"
15557 \begin_layout Standard
15558 Obviously, to use this document class, you need to select
15559 \begin_inset Quotes eld
15567 \begin_inset Quotes erd
15570 from the class list in the
15572 Document\SpecialChar \menuseparator
15576 There are some other special things you should know about this class:
15579 \begin_layout Itemize
15580 Don't bother changing the options
15585 They're not supported by the
15592 \begin_layout Itemize
15596 \begin_inset space ~
15601 behaves a bit differently for this class.
15602 The possible choices and what they do are as follows:
15606 \begin_layout Description
15611 The final output contains page numbers in the lower right corner.
15614 \begin_layout Description
15623 , but also prints out any time markers you've put in.
15624 This is the default.
15627 \begin_layout Description
15632 The final output contains no page numbers, time markers, or alignment markers.
15636 \begin_layout Itemize
15641 class has an extra option:
15647 \begin_inset Quotes eld
15655 \begin_inset Quotes erd
15658 in the extra class options.
15662 \begin_layout Standard
15663 Using this options allows you to add time markers to
15669 \begin_inset space ~
15673 \begin_inset CommandInset ref
15675 reference "sec:slideNote"
15683 \begin_layout Standard
15684 You can also use the template file
15685 \begin_inset Quotes eld
15693 \begin_inset Quotes erd
15696 to automatically set up a document to use the
15702 File\SpecialChar \menuseparator
15704 \begin_inset space ~
15708 \begin_inset space ~
15713 to open your new document].
15714 The template file also contains some examples of the special paragraph
15715 environments used by this class.
15716 I'll describe those next.
15719 \begin_layout Subsection
15720 Paragraph Environments
15723 \begin_layout Subsubsection
15724 Supported Environments
15727 \begin_layout Standard
15728 The first thing you'll notice when you start up a new
15732 document is the font size and type: it's the equivalent of the size
15733 \begin_inset Quotes eld
15741 \begin_inset Quotes erd
15747 \begin_inset space ~
15753 This is also what's used in the output.
15755 \begin_inset Quotes eld
15759 \begin_inset Quotes erd
15762 to remind you that this is a slide.
15763 Your final slides will use a larger font; ergo, you'll have less space.
15764 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
15767 \begin_layout Standard
15768 The next thing that becomes obvious is the changes to the paragraph environment
15769 pull-down box [at the far-left end of the toolbar].
15770 Most of the paragraph environments you're used to seeing are missing.
15771 There are also five new ones.
15776 class itself only supports certain paragraph environments:
15779 \begin_layout Itemize
15785 \begin_layout Itemize
15791 \begin_layout Itemize
15797 \begin_layout Itemize
15803 \begin_layout Itemize
15809 \begin_layout Itemize
15815 \begin_layout Itemize
15821 \begin_layout Itemize
15827 \begin_layout Itemize
15833 \begin_layout Itemize
15839 \begin_layout Itemize
15845 \begin_layout Standard
15846 All of the other standard environments, including the section-heading environmen
15847 ts, aren't used in the
15854 \begin_layout Standard
15855 On the other hand, you'll notice the following new environments:
15858 \begin_layout Itemize
15864 \begin_layout Itemize
15870 \begin_layout Itemize
15876 \begin_layout Itemize
15882 \begin_layout Itemize
15888 \begin_layout Standard
15889 These five are kind of quirky, due to a
15890 \begin_inset Quotes eld
15894 \begin_inset Quotes erd
15898 You see, LyX doesn't permit you to nest any other paragraph environment
15899 into an empty environment.
15900 Now, that's fine and dandy, but it means that you wouldn't be able to start
15901 a slide with anything except plain text.
15902 To deal with this, I've performed a little
15903 \begin_inset Quotes eld
15907 \begin_inset Quotes erd
15913 \begin_layout Subsubsection
15914 Quirks of the New Environments
15915 \begin_inset CommandInset label
15917 name "sec:slideQuirk"
15924 \begin_layout Standard
15925 All five of the new paragraph environments are somewhat quirky due to inherent
15926 limitiations in the current version of LyX.
15927 As I just mentioned, LyX forbids environments that begin with another environme
15929 To get around this, the
15933 environment isn't a paragraph environment as described in the
15941 \begin_layout Standard
15942 You should consider
15955 \begin_inset Quotes eld
15958 pseudo-environments.
15959 \begin_inset Quotes erd
15962 They look like a section heading or a
15963 \begin_inset Quotes eld
15971 \begin_inset Quotes erd
15974 but really begin a [and, if necessary, end the previous] paragraph environment.
15984 \begin_inset Quotes eld
15988 \begin_inset Quotes erd
15991 These two perform some action.
15994 \begin_layout Standard
15995 A common feature of all five environments,
16015 , is a rather long-ish label.
16016 The text following this label — ordinarily the contents of the paragraph
16017 environment — is utterly irrelevant for
16038 LyX completely ignores it.
16039 In fact, you can leave these five environments completely empty.
16043 \begin_layout Standard
16048 to put any text after the rather long-ish label, you might want to.
16049 This could be a short description of the contents of the
16054 In that case, enter in your descriptive comment and hit
16058 as you normally would.
16061 \begin_layout Standard
16062 If, on the other hand, you don't want to enter in any descriptive text,
16063 you'll hit another LyX quirk.
16064 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16065 environment until you put something in the old one.
16069 \begin_layout Itemize
16070 Start entering the text that will
16098 \begin_layout Itemize
16099 Now move to the beginning of that paragraph.
16103 \begin_layout Itemize
16112 \begin_layout Itemize
16113 Finally, change this new, empty paragraph to a
16137 \begin_layout Standard
16138 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16142 \begin_layout Subsection
16143 Making a Presentation with
16156 \begin_layout Subsubsection
16164 \begin_layout Standard
16165 If you're expecting this section to teach you how to actually make a presentatio
16166 n, you'll be sorely disappointed.
16167 Naturally, I'll describe all of the ways the
16171 class can assist you in preparing the materials for a presentation.
16172 Filling in the contents, however, is up to you.
16177 the LyX philosophy.]
16180 \begin_layout Standard
16185 environment [in the manner described in section
16186 \begin_inset space ~
16190 \begin_inset CommandInset ref
16192 reference "sec:slideQuirk"
16196 ] tells LyX to begin a new slide [duh].
16197 The label for this environment/
16198 \begin_inset Quotes erd
16202 \begin_inset Quotes erd
16206 \begin_inset Quotes eld
16210 \begin_inset Quotes erd
16213 in cool blue, followed by the label,
16214 \begin_inset Quotes eld
16218 \begin_inset Quotes erd
16222 Any text or paragraph environments that follow this one go on the new slide.
16226 \begin_layout Standard
16227 Slides are probably the only time you'll need to forcibly end pages in LyX
16228 (this can be specified in the
16233 In fact, you'll want to, once you finish entering the contents of one slide.
16234 If you've entered more text than can physically fit on a slide, the extra
16235 overflows onto a new slide.
16236 I don't recommend doing this, however, since the overflow slide won't have
16237 any page number on it.
16238 Furthermore, it may interfere with any
16242 you've made to accompany the oversized
16249 \begin_layout Standard
16258 environments work the same way as the
16263 They both create an
16264 \begin_inset Quotes eld
16268 \begin_inset Quotes erd
16271 followed by a label [
16272 \begin_inset Quotes eld
16276 \begin_inset Quotes erd
16280 \begin_inset Quotes eld
16284 \begin_inset Quotes erd
16288 The color is a stunning magenta instead of blue, and the
16289 \begin_inset Quotes eld
16293 \begin_inset Quotes erd
16296 will look different, in style and in length.
16297 The label fonts of all three also differ from one another.
16300 \begin_layout Standard
16305 , if the contents of a
16313 exceed the physical size of a slide or sheet of paper, the extra will overflow
16315 Again, you should avoid this.
16316 It defeats the whole purpose of
16327 \begin_layout Subsubsection
16337 \begin_layout Standard
16342 is a slide that sits atop another slide.
16343 Perhaps you wish to discuss a figure on the main
16347 before displaying the text associated with it.
16348 One way to accomplish this is tape a flap of dark paper over the part of
16353 you want to display later.
16354 This method fails, however, if you wish to overlap one graph with another,
16356 You would then have to fumble while speaking to align the two separate,
16361 s to align the two graphs.
16366 environment in both cases makes life much easier.
16369 \begin_layout Standard
16374 receives the page number of its
16375 \begin_inset Quotes eld
16379 \begin_inset Quotes erd
16387 \begin_inset Quotes eld
16395 \begin_inset Quotes erd
16402 \begin_layout Plain Layout
16403 Presumably, mutliple
16408 \begin_inset Quotes eld
16416 \begin_inset Quotes erd
16420 \begin_inset Quotes eld
16428 \begin_inset Quotes erd
16432 \begin_inset Quotes eld
16440 \begin_inset Quotes erd
16444 \begin_inset space ~
16447 appended to the page number of the parent
16457 Clearly, you want the contents of both the
16465 to each fit on a single physical slide! You should probably consider an
16471 \begin_inset Quotes eld
16475 \begin_inset Quotes erd
16487 class provides a visual cue for this: the label at the start of an
16491 is shorter than that at the start of a
16496 Lastly, when you generate printable output, you'll find alignment markers
16497 in all four corners of both the
16501 page and its parent
16506 These will assist you in lining up the two physical slides.
16509 \begin_layout Standard
16510 The major problem in overlaying two slides is aligning the contents of the
16511 two transparencies.
16512 How much space should you leave for that graph on the second slide? Worse
16513 still, what if you want a graph and a sentence on second slide, but there
16514 is text on the main transparency that goes in between them? You could try
16515 and insert vertical space of the right size.
16516 The better way is to use
16527 \begin_layout Standard
16528 As their names imply,
16536 are two command-like paragraph environments that make all subsequent text
16537 invisible and visible, respectively.
16539 \begin_inset space ~
16543 \begin_inset CommandInset ref
16545 reference "sec:slideQuirk"
16549 that you don't place anything
16553 these two environments, however.
16558 , it inserts a centered, sky-blue label into the page reading
16559 \begin_inset Quotes eld
16562 <Invisible Text Follows>
16563 \begin_inset Quotes erd
16567 For paragraphs following this label, the parts of the
16575 ; it doesn't matter which] where they would be contain instead blank space.
16579 \begin_layout Standard
16584 , the corresponding centered label is
16585 \begin_inset Quotes eld
16588 <Visible Text Follows>
16589 \begin_inset Quotes erd
16593 Paragraphs following this label behave normally.
16594 Note that the beginning of a new
16606 automatically shuts off an
16611 It's therefore not necessary to use
16622 \begin_layout Standard
16623 By now, it should be obvious how to create overlay transparencies using
16624 the proper combination of
16643 \begin_layout Enumerate
16648 , including everything that will appear on it, whether on the main slide
16656 \begin_layout Enumerate
16657 Before each figure or paragraph that will appear only on the
16666 If necessary, insert a
16670 environment after the
16677 \begin_layout Enumerate
16682 immediately following the
16689 \begin_layout Enumerate
16690 Copy the contents of this
16701 \begin_layout Enumerate
16706 , change all of the
16717 \begin_layout Standard
16719 You've just made an
16726 \begin_layout Standard
16727 There's one problem with the way I've designed the LyX
16731 class: you can't make text in the middle of a paragraph invisible, nor
16732 make text in the middle of an invisible paragraph visible again.
16733 To accomplish this feat, you'll need to use some inlined LaTeX codes.
16737 \begin_layout Plain Layout
16738 The commands of interest are:
16741 \begin_layout Itemize
16746 invisible \SpecialChar \ldots{}
16750 \begin_layout Itemize
16755 visible \SpecialChar \ldots{}
16759 \begin_layout Plain Layout
16760 \SpecialChar \ldots{}
16761 and need to be marked as TeX.
16763 \begin_inset Quotes eld
16767 \begin_inset Quotes erd
16770 you wish to change goes in between the brackets [and after the
16783 If you don't know how to mark text as TeX, see the appropriate section
16796 \begin_layout Subsubsection
16806 \begin_inset CommandInset label
16808 name "sec:slideNote"
16815 \begin_layout Standard
16824 is associated with a
16825 \begin_inset Quotes eld
16829 \begin_inset Quotes erd
16841 class provides visual cues.
16846 is shorter than that of a
16850 [yet longer than that of an
16854 ] and, like the label of an
16858 is shockingly magenta.
16859 Additionally, the printed
16863 has the page number of its
16864 \begin_inset Quotes eld
16868 \begin_inset Quotes erd
16876 \begin_inset Quotes eld
16884 \begin_inset Quotes erd
16888 \begin_inset Quotes eld
16896 \begin_inset Quotes erd
16900 \begin_inset Quotes eld
16908 \begin_inset Quotes erd
16912 You can have multiple
16916 s associated with a single
16928 , you'll probably want to break up long
16932 s so that they fit on a single sheet of paper.
16935 \begin_layout Standard
16940 is obvious: it contains anything additional you might want to say about
16946 It could also be used as a sheet of reminders for a particular
16951 In the case of the latter, you might want to make use of time markers.
16957 \begin_inset Quotes eld
16961 \begin_inset Quotes erd
16964 support for time markers, a
16969 So, you'll have to resort to using the LaTeX codes.
16972 \begin_layout Standard
16973 To use time markers, you'll need to specify the extra class option
16974 \begin_inset Quotes eld
16982 \begin_inset Quotes erd
16986 \begin_inset space ~
16990 \begin_inset CommandInset ref
16992 reference "sec:slidesetup"
16997 This option turns on timing marks, which will appear in the lower-left-hand
17003 To set what appears in the time marker, you use the LaTeX commands
17004 \begin_inset Quotes eld
17014 \begin_inset Quotes erd
17018 \begin_inset Quotes eld
17028 \begin_inset Quotes erd
17032 The arguments of both commands are time measured in seconds.
17034 \begin_inset Quotes eld
17044 \begin_inset Quotes erd
17047 sets the time marker to a given time.
17049 \begin_inset Quotes eld
17059 \begin_inset Quotes erd
17062 increments the time marker by the specified amount.
17063 Using time markers and
17067 s in this fashion, you can remind yourself how much time to spend on a particula
17075 \begin_layout Standard
17076 There's one last feature to describe.
17077 Clearly, you'd like to print out all of your
17085 s on transparencies while printing all of your
17102 with which it is associated.
17103 What's a person to do?
17106 \begin_layout Standard
17107 Luckily, there are two LaTeX commands that allow you to select what to print
17109 Both must be placed into the preamble of your document.
17111 \begin_inset Quotes eld
17123 \begin_inset Quotes erd
17126 will cause the output to contain only the
17135 Correspondingly, the command
17136 \begin_inset Quotes eld
17148 \begin_inset Quotes erd
17151 prevents the output of anything but
17156 I'd advise placing both commands in the preamble and initially comment
17158 You can then preview your entire presentation as you write.
17159 When you're done writing, you can then uncomment one of the two to select
17160 what you want to print.
17161 I like to uncomment
17162 \begin_inset Quotes eld
17174 \begin_inset Quotes erd
17177 , print to a file with
17178 \begin_inset Quotes eld
17186 \begin_inset Quotes erd
17189 in its name, comment it back out, then uncomment
17190 \begin_inset Quotes eld
17202 \begin_inset Quotes erd
17206 \begin_inset Quotes eld
17214 \begin_inset Quotes erd
17218 I can then send either file to a printer, loading transparencies or plain
17219 paper as appropriate.
17222 \begin_layout Standard
17223 You can also provide other arguments to the
17224 \begin_inset Quotes eld
17234 \begin_inset Quotes erd
17238 \begin_inset Quotes eld
17248 \begin_inset Quotes erd
17252 See a good LaTeX book for details.
17255 \begin_layout Subsection
17260 Class Template File
17263 \begin_layout Standard
17264 I have also provided a template file,
17265 \begin_inset Quotes eld
17273 \begin_inset Quotes erd
17281 To use it, begin your new presentation with
17286 ile\SpecialChar \menuseparator
17288 \begin_inset space ~
17292 \begin_inset space ~
17302 Your new LyX presentation file will contain an example
17323 additionally contain an example of the use of
17332 Lastly, the preamble will contain:
17335 \begin_layout LyX-Code
17336 % Uncomment to print out only slides and overlays
17339 \begin_layout LyX-Code
17343 \begin_layout LyX-Code
17349 \begin_inset Newline newline
17355 \begin_layout LyX-Code
17356 % Uncomment to print out only notes
17359 \begin_layout LyX-Code
17363 \begin_layout LyX-Code
17371 \begin_layout Standard
17372 One final thing: I created this class to support the LaTeX2e
17373 \begin_inset Quotes eld
17381 \begin_inset Quotes erd
17384 class, one of the built-in LaTeX2e classes.
17385 Neither I nor the rest of the LyX Team endorse or oppose the use of this
17386 built-in slide class.
17387 It's here if you want it or need it.
17388 There exist other LaTeX2e classes for creating presentations, such as the
17394 \begin_inset space ~
17398 \begin_inset CommandInset ref
17400 reference "sec:foiltex"
17405 \begin_inset Quotes eld
17413 \begin_inset Quotes erd
17416 package [present on some TeX distributions].
17417 The latter is not yet supported under LyX.
17421 \begin_layout Plain Layout
17422 Perhaps you can take on the task\SpecialChar \ldots{}
17428 I know nothing about these other classes.
17429 Try them out to see what sort of alternative they provide.
17432 \begin_layout Chapter
17433 LyX Features needing Extra Software
17436 \begin_layout Section
17440 \begin_layout Standard
17446 \begin_layout Subsection
17450 \begin_layout Standard
17459 \begin_layout Plain Layout
17464 is not yet available when you are using the LaTeX distribution MiKTeX.
17469 , you'll find in the
17476 \begin_inset space ~
17487 \begin_inset CommandInset href
17489 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17496 \begin_layout Standard
17501 package is a program that was written by
17502 \begin_inset Flex CharStyle:Noun
17505 \begin_layout Plain Layout
17507 \begin_inset space ~
17515 in frustration because some constructs in LaTeX are sometimes non-intuitive,
17516 and easy to forget.
17517 The program runs over your LaTeX file, checks the integrity of the file,
17518 and flags some common errors.
17519 In other technical words, it is
17526 \begin_layout Standard
17527 Well, what is a syntax checker doing in LyX which is supposed to produce
17528 correct LaTeX anyways? The answer is simple: Just as
17532 not only checks the
17536 of C programs, but also does
17540 checks for type-errors,
17544 catches some common
17548 errors, in addition to the syntactical ones.
17553 is capable of detecting several common errors, such as
17556 \begin_layout Itemize
17557 Ellipsis detection:
17558 \begin_inset Newline newline
17561 Use \SpecialChar \ldots{}
17565 \begin_layout Itemize
17566 No space in front of/after parenthesis:
17567 \begin_inset Newline newline
17573 \begin_layout Itemize
17574 Enforcement of normal space after common abbreviations:
17575 \begin_inset Newline newline
17579 \begin_inset space \thinspace{}
17583 \begin_inset space \space{}
17586 is too wide spacing.
17589 \begin_layout Itemize
17590 Enforcement of end-of-sentence space when the last sentence ends with a
17592 \begin_inset Newline newline
17596 And this is wrong spacing.
17599 \begin_layout Itemize
17600 Space in front of labels and similar commands:
17601 \begin_inset Newline newline
17604 The label should stick right up to the text to avoid falling to a wrong
17607 \begin_inset CommandInset label
17617 \begin_layout Plain Layout
17618 This footnote is in danger of falling off to a wrong page
17623 The label is separated too much.
17626 \begin_layout Itemize
17627 Space in front of references, instead of hard spaces:
17628 \begin_inset Newline newline
17631 In you are in bad luck, the text will break right between the referenced
17632 text and reference number, and that's a pity.
17634 \begin_inset CommandInset ref
17636 reference "sec:chktex"
17643 \begin_layout Itemize
17645 \begin_inset Quotes eld
17649 \begin_inset Quotes erd
17653 \begin_inset Formula $\times$
17657 \begin_inset Newline newline
17660 2x2 looks cheap compared to
17661 \begin_inset Formula $2\times2$
17667 \begin_layout Standard
17668 and more \SpecialChar \ldots{}
17669 It is an invaluable tool when you are
17670 \begin_inset Quotes eld
17674 \begin_inset Quotes erd
17677 your document before printing, and you should run it right after the obligatory
17678 spelling check, and before you go fine tuning the typesetting.
17681 \begin_layout Subsection
17685 \begin_layout Standard
17686 If you have the program installed, usage is as simple as choosing
17688 Tools\SpecialChar \menuseparator
17690 \begin_inset space ~
17696 This will make LyX generate a LaTeX file of your document, start
17700 to check it, and then make LyX insert
17701 \begin_inset Quotes eld
17705 \begin_inset Quotes erd
17708 with the warnings from
17712 , if there were any.
17713 The warnings will be placed close to the point of the mistake, and you
17714 can quickly find them by using the
17716 Navigate\SpecialChar \menuseparator
17719 menu item, or the shortcut key
17728 Open the error boxes by clicking on them with the mouse, or use the shortcut
17737 bindings, or the corresponding
17746 Read the warning and correct the mistake, if it is a mistake.
17747 If you have trouble understanding what the warning is about, you can safely
17749 Remember that there is a hidden layer between the document on screen and
17750 the technical details in invoking
17754 , and this gap can make some warnings seem arcane or just right down plain
17758 \begin_layout Standard
17759 This document is an excellent testing bed for the feature, and it should
17760 provide quite a few warnings for you to fiddle with.
17761 Since computers are only so smart, expect most of the warnings to be false
17765 \begin_layout Subsection
17766 How to fine tune it
17769 \begin_layout Standard
17770 Sometimes, you'll find that
17774 makes more noise than suits your mood.
17775 Then you can choose not to use it, wait until your mood changes, or try
17780 to get better along with you.
17781 Another choice in the most desperate situations is to use
17783 View\SpecialChar \menuseparator
17785 \begin_inset space ~
17789 \begin_inset space ~
17793 \begin_inset space ~
17798 , which will get rid of all warnings instantly.
17801 \begin_layout Standard
17810 very configurable and extensible, you shouldn't expect to solve all problems
17816 Since LyX has to generate a somewhat special LaTeX file to be able to match
17817 the line numbers from the
17825 \begin_layout Plain Layout
17826 You can inspect the specific output from
17832 Edit\SpecialChar \menuseparator
17834 \begin_inset space ~
17838 \begin_inset space ~
17852 to the internal document structure, some of the warnings will not seen
17853 to appear correctly.
17854 There are two things you can do about this:
17857 \begin_layout Itemize
17862 invocation command line in
17878 installation configuration file (usually with the file
17883 See below to learn what warnings can be enabled and disabled on the command
17888 \begin_layout Itemize
17889 Export your document as a raw LaTeX file using
17891 File\SpecialChar \menuseparator
17892 Export\SpecialChar \menuseparator
17900 Invoked in this way, it can be a hassle to find the corresponding place
17901 in the document inside LyX, but with a little patience, you should be able
17905 \begin_layout Standard
17906 Here follows the warning messages that can be enabled and disabled in
17915 to disable a warning, and
17919 to enable a warning.
17920 The emphasized entries are disabled by default, because the default is
17923 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
17928 \begin_layout Standard
17929 Notice that you should only use the options that enable and disable warnings,
17930 because LyX relies on some of the other command line parameters to be set
17931 in a specific way to have a chance to communicate with
17938 \begin_layout Enumerate
17942 Command terminated with space.
17945 \begin_layout Enumerate
17948 Non-breaking space (
17949 \begin_inset Quotes eld
17957 \begin_inset Quotes erd
17960 ) should have been used.
17963 \begin_layout Enumerate
17967 You should enclose the previous parenthesis with
17968 \begin_inset Quotes eld
17976 \begin_inset Quotes erd
17982 \begin_layout Enumerate
17985 Italic correction (
17986 \begin_inset Quotes eld
17996 \begin_inset Quotes erd
17999 ) found in non-italic buffer.
18002 \begin_layout Enumerate
18005 Italic correction (
18006 \begin_inset Quotes eld
18016 \begin_inset Quotes erd
18019 ) found more than once.
18022 \begin_layout Enumerate
18026 No italic correction (
18027 \begin_inset Quotes eld
18037 \begin_inset Quotes erd
18043 \begin_layout Enumerate
18047 \begin_inset Quotes eld
18055 \begin_inset Quotes erd
18059 \begin_inset Quotes eld
18067 \begin_inset Quotes erd
18073 \begin_layout Enumerate
18076 Wrong length of dash may have been used.
18079 \begin_layout Enumerate
18083 \begin_inset Quotes eld
18091 \begin_inset Quotes erd
18095 \begin_inset Quotes eld
18103 \begin_inset Quotes erd
18109 \begin_layout Enumerate
18113 \begin_inset Quotes eld
18121 \begin_inset Quotes erd
18127 \begin_layout Enumerate
18131 \begin_inset Quotes eld
18139 \begin_inset Quotes erd
18142 to achieve an ellipsis.
18145 \begin_layout Enumerate
18148 Inter-word spacing (
18149 \begin_inset Quotes eld
18159 \begin_inset Quotes eld
18162 ) should perhaps be used.
18165 \begin_layout Enumerate
18168 Inter-sentence spacing (
18169 \begin_inset Quotes eld
18179 \begin_inset Quotes erd
18182 ) should perhaps be used.
18185 \begin_layout Enumerate
18188 Could not find argument for command.
18191 \begin_layout Enumerate
18195 \begin_inset Quotes eld
18203 \begin_inset Quotes erd
18209 \begin_layout Enumerate
18212 Math mode still on at end of LaTeX file.
18215 \begin_layout Enumerate
18219 \begin_inset Quotes eld
18227 \begin_inset Quotes erd
18230 doesn't match the number of
18231 \begin_inset Quotes eld
18239 \begin_inset Quotes erd
18245 \begin_layout Enumerate
18248 You should use either
18251 \begin_inset Quotes eld
18259 \begin_inset Quotes erd
18264 as an alternative to
18265 \begin_inset Quotes eld
18273 \begin_inset Quotes erd
18279 \begin_layout Enumerate
18286 " (ASCII 39) instead of "
18293 \begin_layout Enumerate
18296 User-specified pattern found.
18299 \begin_layout Enumerate
18302 This command might not be intended.
18305 \begin_layout Enumerate
18312 \begin_layout Enumerate
18330 \begin_layout Enumerate
18333 Delete this space to maintain correct page references.
18336 \begin_layout Enumerate
18340 You might wish to put this between a pair of
18341 \begin_inset Quotes eld
18349 \begin_inset Quotes erd
18355 \begin_layout Enumerate
18358 You ought to remove spaces in front of punctuation.
18361 \begin_layout Enumerate
18364 Could not execute LaTeX command.
18367 \begin_layout Enumerate
18376 in front of small punctuation.
18379 \begin_layout Enumerate
18387 may look prettier here.
18390 \begin_layout Enumerate
18394 Multiple spaces detected in output.
18397 \begin_layout Enumerate
18400 This text may be ignored.
18403 \begin_layout Enumerate
18409 \begin_inset Quotes eld
18414 to begin quotation, not
18421 \begin_layout Enumerate
18428 to end quotation, not
18431 \begin_inset Quotes eld
18439 \begin_layout Enumerate
18445 \begin_layout Enumerate
18448 You should perhaps use
18449 \begin_inset Quotes eld
18457 \begin_inset Quotes erd
18463 \begin_layout Enumerate
18466 You should put a space in front of/after parenthesis.
18469 \begin_layout Enumerate
18472 You should avoid spaces in front of/after parenthesis.
18475 \begin_layout Enumerate
18479 You should not use punctuation in front of/after quotes.
18482 \begin_layout Enumerate
18485 Double space found.
18488 \begin_layout Enumerate
18491 You should put punctuation outside inner/inside display math mode.
18494 \begin_layout Enumerate
18497 You ought to not use primitive TeX in LaTeX code.
18500 \begin_layout Enumerate
18503 You should remove spaces in front of
18504 \begin_inset Quotes eld
18512 \begin_inset Quotes erd
18518 \begin_layout Enumerate
18521 \begin_inset Quotes eld
18529 \begin_inset Quotes erd
18532 is normally not followed by
18533 \begin_inset Quotes eld
18541 \begin_inset Quotes erd
18547 \begin_layout Standard
18548 In later versions of LyX, we hope to provide a more complete interface to
18549 this tool (and it's smaller cousin
18553 ) to exploit the full power of it.
18554 But it's not exactly useless as it is now: go try it on one of your existing
18555 documents of a certain length and be surprised.
18558 \begin_layout Section
18559 Version Control in LyX
18562 \begin_layout Standard
18565 Lars Gullik Bjønnes
18572 \begin_layout Subsection
18576 \begin_layout Standard
18577 A friend of mine wanted to try LyX for a group project.
18578 When he didn't find support for version control or file locking, he dropped
18580 This angered me a bit, so I thought that I should at least make support
18581 for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
18582 This has now been done.
18583 LyX now supports some of the most basic RCS commands.
18584 If you need to something a bit more sophisticated you will have to do that
18585 manually in a terminal.
18588 \begin_layout Standard
18589 Before you begin to use the version control features in LyX, you should
18591 \begin_inset Quotes eld
18595 \begin_inset Quotes erd
18598 (a man file, read it with
18603 This file describes all the basic features of RCS.
18604 You should especially notice the comment about a RCS directory, and the
18605 notion of a master RCS file (the file ending in
18612 \begin_layout Standard
18613 Later basic CVS/SVN support was added.
18614 You should be familiar with CVS/SVN usage before start using it under LyX.
18615 Most of the log messages are not currently displayed after operations -
18616 you can check them in Messages pane if unsure.
18619 \begin_layout Standard
18620 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18621 package—no guarantees are made for older versions.
18624 \begin_layout Standard
18625 For introducing your own external commands consult vc-command in the manual
18629 \begin_layout Subsection
18630 RCS commands in LyX
18633 \begin_layout Standard
18634 The following sections describe the RCS commands supported by LyX.
18635 You can find them in the
18637 File\SpecialChar \menuseparator
18639 \begin_inset space ~
18645 LyX was tested against RCS 5.7.
18648 \begin_layout Subsubsection
18654 \begin_layout Standard
18655 If your document is not under revision control, this is the only item shown
18657 And if it is under revision control, the
18661 item is not visible.
18665 \begin_layout Standard
18666 This command registers your document with RCS (unless you are under the
18667 directory managed by CVS)\SpecialChar \@.
18668 You are asked interactively to supply an initial
18669 description of the document.
18670 The document is now set in Read-Only mode and you have to
18673 \begin_inset space ~
18677 \begin_inset space ~
18681 \begin_inset space ~
18686 , before making any changes to it.
18687 A document under revision control has a
18688 \begin_inset Quotes eld
18691 [RCS:<version> <locker>]
18692 \begin_inset Quotes erd
18695 item tagged to the filename in the minibuffer.
18698 \begin_layout Standard
18699 RCS command that is run:
18701 ci -q -u -i -t-"<initial description>" <file-name>
18704 \begin_layout Standard
18709 to understand the switches.
18713 \begin_layout Subsubsection
18719 \begin_layout Standard
18720 When you are finished editing a file, you check in your changes.
18721 When you do this, you are asked for a description of the changes.
18722 This is stored in the history log.
18723 The version number is bumped, your changes are applied to the master RCS
18724 file, the document is unlocked and set to Read-Only mode.
18728 \begin_layout Standard
18731 ci -q -u -m"<description>" <file-name>
18734 \begin_layout Subsubsection
18740 \begin_layout Standard
18741 By doing this you lock the document so that only you can edit it.
18742 This will also make the document Read-Write only for you.
18743 You will usually continue editing for a while and when you are finished
18744 you check in your changes.
18745 The status line is changed to reflect that you have locked the file.
18749 \begin_layout Standard
18752 co -q -l <file-name>
18755 \begin_layout Subsubsection
18758 Revert To Repository Version
18761 \begin_layout Standard
18762 This will discard all changes made to the document since the last check
18764 You get a warning before changes are discarded.
18767 \begin_layout Standard
18770 co -f -u<version> <file-name>
18773 \begin_layout Subsubsection
18779 \begin_layout Standard
18780 This makes as if the last check in never happened.
18781 No changes are made to the document loaded into LyX, but the last version
18782 is removed from the master RCS file.
18786 \begin_layout Standard
18789 rcs -o<version> <file-name>
18792 \begin_layout Subsubsection
18798 \begin_layout Standard
18799 This show the complete history of the RCS document.
18804 is shown in a browser.
18812 \begin_layout Subsubsection
18816 \begin_layout Standard
18817 LyX supports RCS version number information (only), see
18818 \begin_inset CommandInset ref
18820 reference "sub:VCS-Revision-Information"
18827 \begin_layout Subsection
18828 CVS commands in LyX
18831 \begin_layout Standard
18832 CVS is now partially supported by LyX.
18833 You can find the commands in the
18835 File\SpecialChar \menuseparator
18837 \begin_inset space ~
18843 Focus of the development moved to SVN support, so please use it instead
18844 of CVS if possible.
18847 \begin_layout Subsubsection
18853 \begin_layout Standard
18854 If your document is not under revision control, this is the only item shown
18856 And if it is under revision control, the
18863 item is not visible.
18867 \begin_layout Standard
18868 This command registers in CVS your document ONLY in case you have already
18869 the documents directory under CVS control (in particular
18874 This means you have to checkout the archive by yourself.
18878 \begin_layout Standard
18879 Then you are asked interactively to supply an initial description of the
18881 Don't forget that registered file is not yet commited.
18884 \begin_layout Standard
18885 CVS command that is run:
18888 \begin_inset Quotes erd
18892 \begin_inset Quotes eld
18896 \begin_inset Quotes erd
18902 \begin_layout Standard
18907 to understand the switches.
18911 \begin_layout Subsubsection
18917 \begin_layout Standard
18918 When you are finished editing a file, you commit your changes.
18919 When you do this, you are asked for a description of the changes.
18920 After that changes are commited.
18923 \begin_layout Standard
18926 cvs -q commit -m"<description>" "<file-name>"
18929 \begin_layout Subsubsection
18932 Revert To Repository Version
18935 \begin_layout Standard
18936 This will discard all changes made to the document since the last check
18938 You get a warning before changes are discarded.
18939 Firstly the file is deleted, secondly CVS update command is run.
18942 \begin_layout Standard
18946 \begin_inset Quotes eld
18950 \begin_inset Quotes erd
18956 \begin_layout Subsubsection
18962 \begin_layout Standard
18963 This show the complete history of the CVS document.
18967 \begin_inset Quotes eld
18971 \begin_inset Quotes erd
18976 is shown in a browser.
18979 \begin_layout Subsection
18980 SVN commands in LyX
18983 \begin_layout Standard
18984 SVN is now partially supported by LyX.
18985 You can find the commands in the
18987 File\SpecialChar \menuseparator
18989 \begin_inset space ~
18995 Please note that if you use password protected access to repository via
18996 ssh, you will be asked in terminal window.
18997 LyX was tested against SVN 1.5 and 1.6
19001 \begin_layout Plain Layout
19002 Most of the commands will work with 1.4 too, see
19003 \begin_inset CommandInset ref
19005 reference "sub:SVN-Repo-Update"
19017 \begin_layout Subsubsection
19023 \begin_layout Standard
19024 If your document is not under revision control, this is the only item shown
19026 And if it is under revision control, the
19033 item is not visible.
19037 \begin_layout Standard
19038 This command registers in SVN your document ONLY in case you have already
19039 the documents directory under SVN control (in particular
19044 This means you have to checkout the archive by yourself.
19048 \begin_layout Standard
19049 Then you are asked interactively to supply an initial description of the
19051 Don't forget that registered file is not yet commited.
19054 \begin_layout Standard
19055 SVN command that is run:
19058 \begin_inset Quotes eld
19062 \begin_inset Quotes erd
19068 \begin_layout Standard
19073 to understand the switches.
19077 \begin_layout Subsubsection
19083 \begin_layout Standard
19084 When you are finished editing a file, you commit your changes.
19085 When you do this, you are asked for a description of the changes.
19086 After that changes are commited.
19089 \begin_layout Standard
19094 \begin_layout Plain Layout
19095 In case locking is not enabled.
19097 \begin_inset CommandInset ref
19099 reference "subsec:SVN-File-Locking"
19110 svn commit -q -m"<description>" <file-name>
19113 \begin_layout Subsubsection
19119 \begin_layout Standard
19120 Updates the changes of this file from the repository.
19121 Be sure you understand SVN merging and conflicts resolving before using
19122 this function, because all conflicts has to be resolved manually by you!
19125 \begin_layout Standard
19130 \begin_layout Plain Layout
19138 svn update --non-interactive
19139 \begin_inset Quotes eld
19143 \begin_inset Quotes erd
19149 \begin_layout Subsubsection
19152 Revert To Repository Version
19155 \begin_layout Standard
19156 This will discard all changes made to the document since the last check
19158 You get a warning before changes are discarded.
19162 \begin_layout Standard
19166 \begin_inset Quotes eld
19170 \begin_inset Quotes erd
19176 \begin_layout Subsubsection
19177 \begin_inset CommandInset label
19179 name "sub:SVN-Repo-Update"
19183 Update of the local directory checkout from repository
19187 \begin_layout Plain Layout
19188 Note that this command will work only with subversion
19189 \begin_inset Formula $\geqq1.5$
19200 \begin_layout Standard
19201 All the commands above have one shortcomming - they deal with the current
19203 Once your document contains pictures, includes external
19204 \begin_inset Flex CharStyle:Code
19207 \begin_layout Plain Layout
19213 files and so on administration becomes more complicated.
19214 LyX now supports updating the whole tree in which resides the document
19218 \begin_layout Plain Layout
19219 One need to organize the files structure so that all external files are
19220 in the same directory or subdirectories of the document.
19227 This become especially useful once you cooperate with people which neither
19228 know about subversion management nor they have ambition to commit additional
19229 material to the repository.
19233 \begin_layout Standard
19234 \begin_inset Flex CharStyle:Code
19237 \begin_layout Plain Layout
19238 Update local directory from repository
19243 command updates the whole directory and in case of merge conflicts local
19244 version of the files are left, so no unintended data loss occurs.
19245 If local changes are detected user is warned before update starts.
19248 \begin_layout Labeling
19249 \labelwidthstring 00.00.0000
19251 \begin_inset space ~
19255 \begin_inset space ~
19259 \begin_inset Newline newline
19263 \begin_inset Flex CharStyle:Code
19266 \begin_layout Plain Layout
19272 (Ask if changes are detected.)
19273 \begin_inset Newline newline
19277 \begin_inset Flex CharStyle:Code
19280 \begin_layout Plain Layout
19281 svn update --accept mine-full $path
19289 \begin_layout Standard
19291 \begin_inset Flex CharStyle:Code
19294 \begin_layout Plain Layout
19300 stands for the path to the document.
19303 \begin_layout Subsubsection
19309 \begin_layout Standard
19310 This show the complete history of the SVN document.
19314 \begin_inset Quotes eld
19318 \begin_inset Quotes erd
19323 is shown in a browser.
19326 \begin_layout Subsubsection
19328 \begin_inset CommandInset label
19330 name "subsec:SVN-File-Locking"
19337 \begin_layout Standard
19338 The file exchange through various revision control systems brings the problem
19339 of merge conflicts in case two different users try to edit the same (parts
19341 When such conflict happens it needs manual resolving and one reasonable
19342 alternative is to provide some kind of locking mechanism, which guarantees
19343 that only one user is allowed to edit file at the given time.
19346 \begin_layout Standard
19347 SVN has two mechanisms to provide such kind of mutual exclusivity for file
19348 access - locks and automatical setting of write permissions (see sec.
19350 \begin_inset CommandInset ref
19352 reference "subsec:Automatical-Locking-Property"
19357 \begin_inset Flex CharStyle:Code
19360 \begin_layout Plain Layout
19370 \begin_layout Plain Layout
19371 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
19377 In a case this property is detected for a given document LyX starts to
19378 use SVN locks for document editing automatically and the whole check-in/out
19379 mechanism switches to the same regimen as for RCS.
19380 This in particular means there are two different modes how file is used
19384 \begin_layout Itemize
19386 The loaded file is in the read-only mode.
19387 For editation on needs to check-out.
19392 consists of update from repository and gaining write lock.
19393 If the lock is not possible to obtain, we remain in unlocked state.
19396 \begin_layout Itemize
19398 The loaded file is in the 'normal' edit mode.
19399 No other user is allowed to edit the file.
19404 consists of commiting changes and releasing write-lock.
19405 If no changes have been made to the document, no commit will be produced
19409 \begin_layout Plain Layout
19410 Don't be puzzled by the fact that you will be asked for commit message anyway.
19415 and only the write-lock will be released.
19418 \begin_layout Standard
19422 \begin_layout Labeling
19423 \labelwidthstring 00.00.0000
19426 svn commit -q -m"<description>" "<file-name>"
19427 \begin_inset Newline newline
19430 svn unlock "<file-name>"
19433 \begin_layout Labeling
19434 \labelwidthstring 00.00.0000
19437 svn update "<file-name>"
19438 \begin_inset Newline newline
19441 svn lock "<file-name>"
19444 \begin_layout Subsubsection
19447 \begin_inset CommandInset label
19449 name "subsec:Automatical-Locking-Property"
19455 Automatical Locking Property
19458 \begin_layout Standard
19459 The above mentioned automatical setting of write permissions of the .lyx
19460 file can be set through
19465 ile\SpecialChar \menuseparator
19471 \begin_inset space ~
19474 Control\SpecialChar \menuseparator
19479 oggle locking property
19482 This command is active only when the file is not locked on the svn server
19484 you need to check-out before proceeding).
19487 \begin_layout Labeling
19488 \labelwidthstring 00.00.0000
19490 \begin_inset space ~
19496 \begin_layout Labeling
19497 \labelwidthstring 00.00.0000
19500 svn propset svn:needs-lock ON "<file-name>"
19503 \begin_layout Labeling
19504 \labelwidthstring 00.00.0000
19507 svn propdel svn:needs-lock "<file-name>"
19510 \begin_layout Subsubsection
19511 \begin_inset CommandInset label
19513 name "sub:VCS-Revision-Information"
19517 Revision Information in Documents
19520 \begin_layout Standard
19521 There are more possibilities how to activate revision information in our
19525 \begin_layout Itemize
19526 LyX supports directly:
19530 \begin_layout Itemize
19531 tree revision information (
19532 \begin_inset Flex CharStyle:Code
19535 \begin_layout Plain Layout
19542 The result is the output of the
19543 \begin_inset Flex CharStyle:Code
19546 \begin_layout Plain Layout
19552 command, the following table gives you an idea, how to read the results.
19555 \begin_layout Standard
19557 \begin_inset Tabular
19558 <lyxtabular version="3" rows="6" columns="2">
19559 <features tabularvalignment="middle">
19560 <column alignment="center" valignment="top" width="0">
19561 <column alignment="center" valignment="top" width="0">
19563 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
19566 \begin_layout Plain Layout
19572 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
19575 \begin_layout Plain Layout
19583 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19586 \begin_layout Plain Layout
19592 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19595 \begin_layout Plain Layout
19596 mixed revision working copy
19603 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19606 \begin_layout Plain Layout
19612 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19615 \begin_layout Plain Layout
19616 modified working copy
19623 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19626 \begin_layout Plain Layout
19632 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19635 \begin_layout Plain Layout
19636 switched working copy
19643 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
19646 \begin_layout Plain Layout
19652 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
19655 \begin_layout Plain Layout
19656 partial working copy, from a sparse checkout
19663 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
19666 \begin_layout Plain Layout
19672 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
19675 \begin_layout Plain Layout
19676 mixed revision, modified, switched working copy
19689 \begin_layout Itemize
19690 file revision information.
19691 The result comes from parsing the output of
19692 \begin_inset Flex CharStyle:Code
19695 \begin_layout Plain Layout
19697 \begin_inset space ~
19701 \begin_inset space ~
19705 \begin_inset space ~
19714 Supported flags are:
19718 \begin_layout Itemize
19719 version number of the last commit (
19720 \begin_inset Flex CharStyle:Code
19723 \begin_layout Plain Layout
19732 \begin_layout Itemize
19733 author of the last commit (
19734 \begin_inset Flex CharStyle:Code
19737 \begin_layout Plain Layout
19746 \begin_layout Itemize
19747 date of the last commit (
19748 \begin_inset Flex CharStyle:Code
19751 \begin_layout Plain Layout
19760 \begin_layout Itemize
19761 time of the last commit (
19762 \begin_inset Flex CharStyle:Code
19765 \begin_layout Plain Layout
19775 \begin_layout Standard
19776 You can obtain this info via InsetInfo (e.g.
19778 \begin_inset Flex CharStyle:Code
19781 \begin_layout Plain Layout
19782 info-insert buffer vcs-date
19788 The information will be available only when you have the file stored under
19789 svn managment (i.e.
19791 \begin_inset Flex CharStyle:Code
19794 \begin_layout Plain Layout
19800 directory is available with your document).
19804 \begin_layout Itemize
19805 Another---a hacking one---possibility is to use svn keywords
19809 \begin_layout Plain Layout
19810 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
19816 In short -- you set file keywords property (e.g.
19819 svn propset svn:keywords 'Rev' file.lyx
19821 ) and then paste keyword ERT
19825 \begin_layout Plain Layout
19826 This is an easy way how to ensure that LyX won't break the line in the middle
19832 tag in your document (e.g.
19837 \begin_layout Plain Layout
19845 This way svn client will automatically substitute revision number (e.g.
19850 \begin_layout Plain Layout
19857 ) after each update and commit.
19858 There are more problems with this approach.
19859 Firstly, the '$' character is used in TeX world for math equations, so
19860 any occurence of math formula
19861 \begin_inset Formula $Rev$
19865 \begin_inset Formula $Rev:59$
19868 in your LyX document.
19869 Similarly for other keywords like Id, Date, Author, etc.
19870 Secondly svn output is dependent on your locales, so its very easy that
19871 svn would produce some problematic strings once Date is used.
19872 Thirdly you get the whole 'Rev: 59' string in your document instead of
19874 Until subversion implements user's custom keywords it will be hard to use
19875 this approach reliably or let LyX to support it directly.
19878 \begin_layout Subsection
19879 SVN and Windows Environment
19882 \begin_layout Quote
19883 My inclination is to say that if the user cannot figure out the command
19884 line operations on their own fairly quickly, they would be well advised
19885 to use TortoiseSVN.
19891 \begin_layout Subsubsection
19895 \begin_layout Standard
19896 In addition to installing LyX, and having access to a Subversion repository,
19897 the user will need to install the Subversion client program.
19898 A Windows installer for the client program is available from
19899 \begin_inset CommandInset href
19902 target "http://www.collab.net/nonav/downloads/subversion/"
19907 The user may also want to install
19908 \begin_inset CommandInset href
19911 target "http://tortoisesvn.tigris.org/"
19915 , which integrates Subversion operations into the context (rightclick) menu
19916 of Windows Explorer.
19917 Operations done outside LyX will typically be more convenient using the
19918 Explorer context menu.
19919 Note that TortoiseSVN is not a replacement for the client program, which
19920 is what LyX itself will use.
19923 \begin_layout Subsubsection
19924 Bringing a document under Subversion control
19927 \begin_layout Standard
19928 Before a LyX document can be brought under version control in Subversion,
19929 its parent directory needs to be under version control.
19930 If the document is being added to a project already in the repository,
19931 this is accomplished by checking the project out to the directory where
19932 the new document will be placed.
19933 If the project itself is not yet under version control (for instance, if
19934 this document starts a new project), the directory must be imported into
19936 This is done outside LyX.
19937 Both import and checkout are easily accomplished from the Explorer context
19938 menu using TortoiseSVN, or alternatively can be done using the command
19939 line client at a DOS prompt.
19940 The procedure for importing the project using TortoiseSVN is described
19941 below, assuming an existing repository and a new project being started
19949 For information on using the Subversion client program, run
19956 \begin_layout Enumerate
19963 in Windows Explorer, right click it, and select
19965 TortoiseSVN > Repo-browser
19968 If necessary, adjust the URL for the repository, then click OK.
19971 \begin_layout Enumerate
19972 Right click the level of the repository under which you want to place the
19973 new project folder (typically the top level) and click
19975 Create folder\SpecialChar \ldots{}
19978 Supply a name for the project folder and click OK.
19979 Add a message for the log file if desired, then click OK again.
19980 The new project folder should appear in the repository.
19981 Finally, click OK again to exit the repository browser.
19984 \begin_layout Enumerate
19985 Once again right click
19991 , this time selecting SVN Checkout\SpecialChar \ldots{}
19992 Select the URL of the project folder
19993 you just created in the repository, and set the checkout directory to
20001 You will be warned about a non-empty folder; click OK to proceed.
20002 You should now have a
20013 \begin_layout Enumerate
20014 Create or open your document in LyX and click
20019 ile\SpecialChar \menuseparator
20025 \begin_inset space ~
20028 Control\SpecialChar \menuseparator
20036 Add a log message and click OK to commit the document to version control.
20039 \begin_layout Standard
20040 From this point onward, you should have full functionality in the
20045 ile\SpecialChar \menuseparator
20051 \begin_inset space ~
20057 You also have the option of checking the document in and out, viewing its
20059 using the TortoiseSVN context menu in Windows Explorer or the Subversion
20060 client program from a command prompt.
20063 \begin_layout Subsubsection
20064 SSH tunel used with SVN under Windows
20067 \begin_layout Standard
20068 Compared to linux setting svn client to communicate over ssh under Windows
20069 is rather troublesome task.
20070 We will at least make some hints how to setup client side but former knowledge
20071 about ssh and Windows command line is needed, also be prepared for a great
20072 deal of frustration...
20075 \begin_layout Enumerate
20076 Get svn client for windows, as described in previous sections.
20077 When it is fresh install run some svn command (e.g.
20079 \begin_inset Flex CharStyle:Code
20082 \begin_layout Plain Layout
20088 ) to have created config files, which you will need to change later on.
20091 \begin_layout Enumerate
20092 Choose ssh client for Windows.
20093 There are more possibilities, we will use the one from Putty tools
20097 \begin_layout Plain Layout
20098 \begin_inset Flex URL
20101 \begin_layout Plain Layout
20103 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20114 You will need to automatize connection, so client doesn't ask for any password
20116 To keep things easy we will use only keys without any additional password
20121 \begin_layout Enumerate
20123 \begin_inset Flex CharStyle:Code
20126 \begin_layout Plain Layout
20133 Save your private .ppk key file and put the public one on the server side.
20134 In case the SVN server runs on linux, note that the format of the public
20135 key is not compatible with linux openssh and you will need to direcly copy-past
20136 e the key from the “
20138 Public key for pasting into OpenSSH authorized_keys file
20140 :” edit field into the server's
20141 \begin_inset Flex CharStyle:Code
20144 \begin_layout Plain Layout
20145 ~/.ssh/authorized_keys
20151 \begin_inset Flex CharStyle:Code
20154 \begin_layout Plain Layout
20163 \begin_layout Enumerate
20165 \begin_inset Flex CharStyle:Code
20168 \begin_layout Plain Layout
20175 In the SVN config file
20179 \begin_layout Plain Layout
20180 Exact path depends on Windows version, usually somewhere around
20181 \begin_inset Flex CharStyle:Code
20184 \begin_layout Plain Layout
20187 Documents and Settings
20201 \begin_inset Flex CharStyle:Code
20204 \begin_layout Plain Layout
20219 , section [tunnels], setup ssh command, e.g.
20221 \begin_inset Flex CharStyle:Code
20224 \begin_layout Plain Layout
20225 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20234 \begin_layout Plain Layout
20235 It will usually take a lot of time to get exact command right and it depends
20237 For example do not have some remote server saved as a default session in
20239 If things fail, try to connect via plink without SVN first.
20248 \begin_layout Enumerate
20249 Checkout the SVN archive, e.g.
20251 \begin_inset Flex CharStyle:Code
20254 \begin_layout Plain Layout
20255 svn co svn+ssh://user@server/repository_path
20263 \begin_layout Subsection
20267 \begin_layout Standard
20268 With the recent addition of the vc-command function LyX power users are
20269 allowed to create their own commands for revision control.
20272 \begin_layout Standard
20273 As an example you can see how two TortoiseSVN commands could be integrated
20277 \begin_layout Description
20279 \begin_inset Flex CharStyle:Code
20282 \begin_layout Plain Layout
20283 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
20291 \begin_layout Description
20293 \begin_inset Flex CharStyle:Code
20296 \begin_layout Plain Layout
20297 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
20305 \begin_layout Section
20306 Literate Programming
20309 \begin_layout Standard
20314 (kayvan@sylvan.com)
20318 original documentation written by
20320 Edmar Wienskoski Jr.
20323 (edmar-w-jr@technologist.com)
20326 \begin_layout Subsection
20330 \begin_layout Standard
20331 The main purpose of this documentation is to show you how to use LyX for
20332 literate programming.
20333 Where it is assumed that you are familiar with this programming technique,
20335 \begin_inset Quotes eld
20339 \begin_inset Quotes erd
20343 \begin_inset Quotes eld
20347 \begin_inset Quotes erd
20351 If that is not the case, please follow the web links provided in the following
20353 There is a lot of good documentation out there covering old development
20354 history to the latest tools tips.
20357 \begin_layout Standard
20358 It is also assumed that you are familiar with LyX itself to a point that
20359 you are comfortable changing your LyX preferences, and X resources file.
20360 If that is not the case please refer to other LyX documentation to cover
20361 your specific needs.
20364 \begin_layout Subsection
20365 Literate Programming
20368 \begin_layout Standard
20369 From the Literate Programming FAQ:
20372 \begin_layout Quotation
20373 Literate programming is the combination of documentation and source together
20374 in a fashion suited for reading by human beings.
20375 In fact, literate programs should be enjoyable reading, even inviting!
20376 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
20377 and documentation in a single file.
20378 Literate programming tools then parse the file to produce either readable
20379 documentation or compilable source.
20380 The WEB style of literate programming was created by D.
20381 \begin_inset space \thinspace{}
20385 Knuth during the development of his TeX typesetting software.
20389 \begin_layout Standard
20390 Another excerpt says:
20393 \begin_layout Quotation
20396 How is literate programming different from verbose commenting?
20399 \begin_layout Quotation
20400 There are three distinguishing characteristics.
20401 In order of importance, they are:
20405 \begin_layout Itemize
20406 flexible order of elaboration
20409 \begin_layout Itemize
20410 automatic support for browsing
20413 \begin_layout Itemize
20414 typeset documentation, especially diagrams and mathematics
20418 \begin_layout Standard
20419 Now that I sparked your curiosity, take a look in the references.
20422 \begin_layout Subsubsection
20426 \begin_layout Standard
20427 The complete Literate Programming FAQ can be found at:
20430 \begin_layout Quote
20431 Literate Programming FAQ
20432 \begin_inset Flex URL
20435 \begin_layout Plain Layout
20437 http://shelob.ce.ttu.edu/daves/lpfaq/faq.html
20445 \begin_layout Standard
20446 The FAQ lists 23 (twenty three!) different literate programming tools.
20447 Where some are specialized or
20448 \begin_inset Quotes eld
20452 \begin_inset Quotes erd
20455 for particular programming languages, while other have general scope.
20460 for my own use for several reasons:
20463 \begin_layout Itemize
20464 It can generate the documentation either in LaTeX or HTML.
20467 \begin_layout Itemize
20468 It has a open architecture, i.
20469 \begin_inset space \thinspace{}
20473 \begin_inset space \space{}
20476 it is easy to plug in new filters and to perform special processing that
20481 \begin_layout Itemize
20482 There is a good selection of filters available already (the HTML is one
20486 \begin_layout Itemize
20490 \begin_layout Standard
20491 The Noweb web page can be found at:
20494 \begin_layout Quote
20496 \begin_inset Flex URL
20499 \begin_layout Plain Layout
20501 http://www.cs.virginia.edu/~nr/noweb/
20509 \begin_layout Standard
20510 Starting from there you can reach many other interesting links and even
20511 some literate program examples.
20514 \begin_layout Subsection
20515 LyX and Literate Programming
20518 \begin_layout Standard
20519 The LyX support for Literate Programming is provided by using the generic
20520 LyX converters mechanism.
20521 This support is provided in a
20522 \begin_inset Quotes eld
20526 \begin_inset Quotes erd
20530 \begin_inset space \thinspace{}
20534 \begin_inset space \space{}
20537 you will be able to use this new LyX feature with some other literate programmin
20538 g tool of your choice by just changing your LyX preferences.
20541 \begin_layout Subsubsection
20542 Generating documents and code (weaving and tangling)
20545 \begin_layout Paragraph
20546 Selecting the document class
20549 \begin_layout Standard
20550 If you have installed Noweb and LyX successfully, whenever you open a new
20551 document or try to change the document class of an existing one, you will
20552 find that there are three new document classes available:
20555 \begin_layout Itemize
20559 \begin_layout Itemize
20563 \begin_layout Itemize
20567 \begin_layout Standard
20568 You must select one of them to create your literate documents from.
20572 \begin_layout Standard
20573 Note that literate documents are not limited to these three classes.
20574 New classes can be generated from other styles like letter or in combination
20575 with other class variations like Article (AMS).
20576 If you have special needs that cannot be covered by one of the existing
20577 classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
20578 will arrange to insert a new entry, or teach you how to do it.
20582 \begin_layout Plain Layout
20583 It is very simple, it involves the creation of a file with four lines, and
20584 re-running of the auto configuration.
20589 Moreover, if you use a literate tool other than Noweb you may need to create
20590 a new set of document classes for it.
20593 \begin_layout Paragraph
20597 \begin_layout Standard
20598 LyX enables you to write code with a layout named
20606 \begin_layout Plain Layout
20607 The equivalent Noweb term is
20608 \begin_inset Quotes eld
20612 \begin_inset Quotes erd
20616 For historical reasons, I got used to the term
20617 \begin_inset Quotes eld
20621 \begin_inset Quotes erd
20624 introduced by other literate tool named Nuweb, which I used for many years
20625 before rendering myself to Noweb.
20630 Noweb delimits scraps like this:
20633 \begin_layout LyX-Code
20637 \begin_layout LyX-Code
20641 \begin_layout LyX-Code
20645 \begin_layout LyX-Code
20649 \begin_layout LyX-Code
20653 \begin_layout Standard
20654 The problem is that whatever is written in between the << and the
20658 must be taken literally, i.
20659 \begin_inset space \thinspace{}
20663 \begin_inset space \space{}
20666 LyX should be prevented from making any special interpretation of what has
20668 This is handled by a special layout named Scrap, that works like a normal
20669 paragraph but has a free spacing capability.
20672 \begin_layout Standard
20673 The down side of the Scrap paragraph layout is that consecutive paragraphs
20674 of code will be spaced with one empty line in the source code and also
20675 in the printed documentation.
20676 The work around is to enter each line of code within a single Scrap, with
20677 a newline (ctrl-return).
20678 The example above will look like this:
20682 \begin_layout Plain Layout
20683 If you have a printed version of this document you will not see any difference
20684 between the previous example and this one.
20692 \begin_layout LyX-Code
20694 \begin_inset Newline newline
20698 \begin_inset Newline newline
20702 \begin_inset Newline newline
20706 \begin_inset Newline newline
20712 \begin_layout Standard
20713 This layout works fine.
20714 The only real inconvenience is that you have to type ctrl-return instead
20719 \begin_layout Plain Layout
20720 It is in my list of
20721 \begin_inset Quotes eld
20725 \begin_inset Quotes erd
20736 \begin_layout Standard
20737 As a special note, you can also use the
20738 \begin_inset Quotes eld
20742 \begin_inset Quotes erd
20745 construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
20749 \begin_layout LyX-Code
20751 \begin_inset Newline newline
20754 def some_function(args):
20755 \begin_inset Newline newline
20758 "This is the doc string for this function."
20759 \begin_inset Newline newline
20762 print "My args: ", args
20765 \begin_layout LyX-Code
20766 @ %def some_function
20769 \begin_layout Standard
20770 For an example of this usage and the resulting cross-reference output, look
20771 at the Literate python program in
20773 LIBDIR/examples/listerrors.lyx
20775 which should make this all clear.
20778 \begin_layout Paragraph
20779 Generating the documentation
20782 \begin_layout Standard
20783 At this point you already have a new document file with a proper document
20784 class, and with some code and text on it.
20785 How do I print it? The answer is simple, you select
20787 View\SpecialChar \menuseparator
20791 Just like you would do for a plain document.
20792 No special procedure is required.
20795 \begin_layout Standard
20796 To help orientate you, I will now explain what happens inside LyX:
20799 \begin_layout Enumerate
20802 Update\SpecialChar \menuseparator
20805 menu option is chosen, a LaTeX file is generated.
20810 \begin_layout Standard
20811 If the document is of any literate class the generated file will be named
20812 with an extension name defined by the
20813 \begin_inset Quotes eld
20817 \begin_inset Quotes erd
20820 format (defined in the Preferences panel), otherwise the file will have
20829 \begin_layout Enumerate
20830 Note that the only difference so far is in the name of the file, no special
20831 processing is required by LyX.
20832 Given that you formatted the code using the Scrap layout that, by itself,
20833 takes care of the business.
20836 \begin_layout Enumerate
20837 If the document is of any literate class LyX will then use the internal
20838 LyX to Noweb converter, followed by the Noweb to LaTeX converter
20842 \begin_layout Plain Layout
20843 The converters are defined in the
20845 Tools\SpecialChar \menuseparator
20849 \begin_inset Quotes eld
20853 \begin_inset Quotes erd
20865 manual for general information about converters.
20870 to generate the LaTeX file.
20874 \begin_layout Standard
20875 Otherwise it will just skip this step.
20879 \begin_layout Enumerate
20880 Finally, LaTeX is invoked and the regular post processing continues as in
20884 \begin_layout Standard
20885 Independence from a particular
20886 \begin_inset Quotes eld
20890 \begin_inset Quotes erd
20893 is easily achieved by changing the commands that are run by the various
20897 \begin_layout Paragraph
20898 Generating the code
20901 \begin_layout Standard
20902 When the build menu option is chosen or the corresponding button in the
20903 toolbar is pressed, a LaTeX file is generated just like step 1 above.
20904 Next, LyX invokes the
20909 This converter needs to be defined by the user and is not installed by
20910 default, though the Program format is.
20911 This converter (like any other converter) will have two parts:
20914 \begin_layout Enumerate
20915 The converter program itself.
20916 This program performs the conversion from the one format to the other (in
20917 this case, from the Noweb format to the Program pseudo-format).
20920 \begin_layout Enumerate
20921 The error log parser.
20922 This is a program whose sole purpose is to rewrite error messages in a
20923 format that LyX understands.
20924 This makes it possible for LyX to place error boxes in the right places
20925 in the file buffer.
20928 \begin_layout Standard
20929 The first part, the
20930 \begin_inset Quotes eld
20934 \begin_inset Quotes erd
20937 setting, should be set to
20938 \begin_inset Quotes eld
20946 \begin_inset Quotes erd
20950 This basically means that LyX will call
20951 \begin_inset Quotes eld
20955 \begin_inset Quotes erd
20958 (a program or script) with the name of the Noweb file (normally a file
20959 in the LyX temp directory).
20963 \begin_layout Standard
20964 This is an implementation of
20965 \begin_inset Quotes eld
20969 \begin_inset Quotes erd
20972 that you can place in a directory on your path:
20975 \begin_layout LyX-Code
20979 \begin_layout LyX-Code
20983 \begin_layout LyX-Code
20984 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
20987 \begin_layout Standard
20988 The next part of the converter setting is the
20989 \begin_inset Quotes eld
20993 \begin_inset Quotes erd
20996 which is to be set to
20997 \begin_inset Quotes eld
21002 parselog=listerrors
21005 \begin_inset Quotes erd
21009 This will run any errors that are generated by the
21010 \begin_inset Quotes eld
21014 \begin_inset Quotes erd
21017 process through the
21018 \begin_inset Quotes eld
21022 \begin_inset Quotes erd
21028 \begin_layout Standard
21029 The converter code looks in
21037 then on the path for the
21038 \begin_inset Quotes eld
21042 \begin_inset Quotes erd
21048 \begin_layout Standard
21049 The build will normally take place in LyX's temporary directory, so the
21050 files produced by the conversion will be in that directory.
21051 LyX will copy out what it regards as the `main' file, but the
21055 conversion may produce several files, and so most of these would then be
21056 deleted when LyX was closed.
21057 The present solution is to use a `copier',
21061 \begin_layout Plain Layout
21070 manual for information on these.
21079 script in its default mode, so that the entire contents of the temporary
21080 directory is copied.
21081 More will get copied than is needed, to be sure, but nothing will be lost.
21082 If, however, you know what extensions the generated files will have, this
21083 can be improved by using the
21092 This option takes a comma-separated list of extensions to copy.
21093 So, for example, if the conversion will generate only files with the extensions
21102 , then the correct definition would be:
21105 \begin_layout LyX-Code
21106 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
21109 \begin_layout Standard
21110 The result will be that only files with these two extensions will be copied
21114 \begin_layout Paragraph
21115 Build instructions in the document
21118 \begin_layout Standard
21119 The last piece of the integration between LyX and noweb is the
21120 \begin_inset Quotes eld
21124 \begin_inset Quotes erd
21128 Generally, the instructions for building your program should be embedded
21129 in a scrap of its own.
21131 \begin_inset Quotes eld
21135 \begin_inset Quotes erd
21138 above uses the notangle command to look for this scrap (called
21139 \begin_inset Quotes eld
21143 \begin_inset Quotes erd
21146 ) and runs its contents through
21147 \begin_inset Quotes eld
21151 \begin_inset Quotes erd
21157 \begin_layout Standard
21158 Typically, such a scrap would look something like this:
21161 \begin_layout LyX-Code
21163 \begin_inset Newline newline
21167 \begin_inset Newline newline
21171 \begin_inset Newline newline
21174 if [ -z "${NOWEB_SOURCE}" ]
21175 \begin_inset Newline newline
21179 \begin_inset Newline newline
21182 NOWEB_SOURCE=myfile.nw
21183 \begin_inset Newline newline
21187 \begin_inset Newline newline
21191 code to extract files ...]
21192 \begin_inset Newline newline
21196 code to compile files ...]
21197 \begin_inset Newline newline
21203 \begin_layout Standard
21206 LIBDIR/examples/listerrors.lyx
21210 LIBDIR/examples/Literate.lyx
21212 which implement two versions of the
21213 \begin_inset Quotes eld
21217 \begin_inset Quotes erd
21220 program for some illustrations of how all of these pieces go together or
21223 LIBDIR/examples/noweb2lyx.lyx.
21226 Interestingly, these three files show off the language-indepence of the
21227 LyX literate programming support since they are written in Python, C and
21231 \begin_layout Subsubsection
21235 \begin_layout Standard
21236 All the Literate Programming support is configured by the
21238 Tools\SpecialChar \menuseparator
21242 \begin_inset Quotes eld
21246 \begin_inset Quotes erd
21250 The important parts are:
21253 \begin_layout Description
21255 \begin_inset space ~
21259 \begin_inset Quotes eld
21263 \begin_inset Quotes erd
21267 \begin_inset space ~
21270 format Set up via the Formats tab, this is where the Noweb-specific pieces
21280 , the file extension is set to
21285 This tells LyX to create a file with a
21289 extension in the first step of the conversion process.
21292 \begin_layout Description
21294 \begin_inset space ~
21302 \begin_inset space ~
21305 format This is an empty format whose sole purpose is to be the endpoint
21306 of a conversion (which then allows us to set up a converter for it).
21309 \begin_layout Description
21318 This converter performs the
21319 \begin_inset Quotes eld
21323 \begin_inset Quotes erd
21326 of the literate document.
21327 For Noweb, it is set to
21328 \begin_inset Quotes eld
21333 noweave -delay -index $$i > $$o
21336 \begin_inset Quotes erd
21342 \begin_layout Description
21352 \begin_inset Quotes eld
21356 \begin_inset Quotes erd
21360 As stated above, the Converter is set to
21361 \begin_inset Quotes eld
21369 \begin_inset Quotes erd
21372 , with Flags set to
21373 \begin_inset Quotes eld
21378 originaldir,parselog=listerrors
21381 \begin_inset Quotes erd
21387 \begin_layout Subsubsection
21391 \begin_layout Standard
21392 There is also a new function implemented in the LyX server, the
21393 \begin_inset Quotes eld
21396 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
21400 \begin_layout Standard
21401 When debugging code with ddd/gdb, it is possible to invoke a text editor
21402 at the current execution position with a single key stroke.
21403 The default ddd configuration for that is shift-ctrl-V.
21404 It happens that you can define the editor command line invocation in ddd
21407 Edit\SpecialChar \menuseparator
21408 Preferences\SpecialChar \menuseparator
21411 dialog and changing the "Edit Sources" entry.
21414 \begin_layout Standard
21415 I take advantage of the new created LyX server function and this ddd feature,
21417 \begin_inset Quotes eld
21421 \begin_inset Quotes erd
21427 \begin_layout LyX-Code
21428 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
21431 \begin_layout Standard
21432 With this, whenever you are using ddd and find a point in the program that
21433 you want to edit, you just press shift-ctrl-V (in the ddd window), and
21434 ddd you forward this information to LyX through the LyX server and then
21435 the LyX window will show the same file with the cursor at the same position
21436 ddd was pointing to.
21437 No more guessing or long scrolling to locate a point in the program back
21441 \begin_layout Standard
21442 Note however that you must enable the LyX server to get this feature working
21443 (it is disabled by default).
21444 You can enable it in
21456 ) by entering in the
21461 \begin_inset Quotes eld
21466 /home/<your-home-directory>/.lyx/lyxpipe
21469 \begin_inset Quotes erd
21475 \begin_layout Standard
21476 Read the LyX server documentation in the
21478 Customization Manual
21480 for further information.
21483 \begin_layout Subsubsection
21487 \begin_layout Standard
21488 There are six new buttons that can be added to your LyX toolbar.
21489 Five of these buttons are short cuts to layout styles:
21510 The last one is a short cut to the
21511 \begin_inset Quotes eld
21515 \begin_inset Quotes erd
21522 \begin_layout Standard
21523 LyX has a range of buttons that are available for tool bar customization.
21524 In my toolbar I like to combine the six short cuts above with two more:
21529 \SpecialChar \menuseparator
21534 \SpecialChar \menuseparator
21541 View\SpecialChar \menuseparator
21545 Here is how it looks like:
21548 \begin_layout LyX-Code
21552 \begin_layout LyX-Code
21556 \begin_layout LyX-Code
21557 Icon "layout Standard"
21560 \begin_layout LyX-Code
21561 Icon "layout Section"
21564 \begin_layout LyX-Code
21565 Icon "layout LaTeX"
21568 \begin_layout LyX-Code
21569 Icon "layout LyX-Code"
21572 \begin_layout LyX-Code
21573 Icon "layout Scrap"
21576 \begin_layout LyX-Code
21580 \begin_layout LyX-Code
21584 \begin_layout LyX-Code
21585 Icon "buffer-typeset"
21588 \begin_layout LyX-Code
21589 Icon "build-program"
21592 \begin_layout LyX-Code
21596 \begin_layout LyX-Code
21600 \begin_layout LyX-Code
21604 \begin_layout LyX-Code
21608 \begin_layout LyX-Code
21612 \begin_layout Subsubsection
21613 Colors customization
21616 \begin_layout Standard
21617 There are a number of colors in LyX that can be customized in
21622 One of the things that bothers people is the LaTeX font color.
21623 The default color is red, since the scraps uses LaTeX font, and there is
21624 a lot of scraps in literate documents, you may get tired of seeing everything
21626 You can change it by going to the tabs
21635 \begin_layout Standard
21636 The next thing is the visible presence of the newline character in the screen.
21637 You can choose the color of this particular character and make it blend
21639 I recommend you choosing a color that is close to the background but not
21640 equal, that way you still can see it is there, but it is not bothering
21645 \begin_layout Chapter
21646 Secrets of the LaTeX Masters
21647 \begin_inset CommandInset label
21656 \begin_layout Standard
21657 Though LyX is a powerful tool, it cannot hope to support everything that
21658 can be done with pure TeX/LaTeX.
21659 However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
21660 as long as you are not afraid to use that
21661 \begin_inset Quotes eld
21665 \begin_inset Quotes erd
21668 button on the toolbar or add things to the LaTeX preamble.
21669 This section lists some tips, tricks, and otherwise cool ideas to give
21670 your document that extra little flair.
21673 Do try this at home
21675 , just start with something a little smaller and less important than your
21679 \begin_layout Standard
21680 Most ideas in this section require less common files in your LaTeX installation.
21681 If you have a system like teTeX, most will already be available.
21682 A few, however, will need to be downloaded from one of the CTAN archives.
21683 Often, there are several ways to do something, or several LaTeX style files
21684 which do the same thing.
21685 We do not endorse one choice over another, we simply claim that we have
21686 done a particular task with a particular file.
21687 Put on your wizard hat, keep an eye out for dragons, and let us begin.
21690 \begin_layout Section
21694 \begin_layout Standard
21697 Lars Gullik Bjønnes
21700 \begin_layout Subsection
21704 \begin_layout Standard
21705 The aim for this chapter
21709 \begin_layout Plain Layout
21710 Editor's note: Lars' original chapter was a masterful description of how
21716 However, it was too long to flow smoothly in this document.
21717 I have therefore chosen to excerpt the most important sections here (sorry,
21718 Lars); you can read the original chapter (and more of the story!) in the
21721 examples/multicol.lyx
21729 is to show how the LaTeX package
21733 can be used in a LyX document.
21734 As LyX doesn't support the
21738 package natively yet, we have to use some small hacks.
21739 By reading this section it should be obvious how to do this.
21742 \begin_layout Subsection
21746 \begin_layout Standard
21751 package allows switching between one and multicolumn format on the same
21753 Footnotes are handled correctly (for the most part), but will be placed
21754 at the bottom of the page and not under each column.
21755 LaTeX's float mechanism, however, is partly disabled in the current implementat
21757 At the moment only page-wide floats can be used within the scope of the
21761 \begin_layout Subsection
21765 \begin_layout Subsubsection
21769 \begin_layout Standard
21770 If you want to have two columns in your text, you have use LaTeX mode to
21775 begin{multicols}{2}
21777 at the point where you want the two column layout to start, and then
21783 where you want it to end.
21787 \begin_layout Standard
21791 \begin_layout Plain Layout
21795 begin{multicols}{2}
21803 \begin_layout Standard
21808 The Adventure of the Empty House
21811 \begin_inset Newline newline
21816 Sir Arthur Conan Doyle
21819 \begin_layout Standard
21822 It was in the spring of the year 1894 that all London was interested, and
21823 the fashionable world dismayed, by the murder of the Honourable Ronald
21824 Adair under most unusual and inexplicable circumstances.
21825 The public has already learned those particulars of the crime which came
21826 out in the police investigation, but a good deal was suppressed upon that
21827 occasion, since the case for the prosecution was so overwhelmingly strong
21828 that it was not necessary to bring forward all the facts.
21829 Only now, at the end of nearly ten years, am I allowed to supply those
21830 missing links which make up the whole of that remarkable chain.
21831 The crime was of interest in itself, but that interest was as nothing to
21832 me compared to the inconceivable sequel, which afforded me the greatest
21833 shock and surprise of any event in my adventurous life.
21834 Even now, after this long interval, I find myself thrilling as I think
21835 of it, and feeling once more that sudden flood of joy, amazement, and increduli
21836 ty which utterly submerged my mind.
21837 Let me say to that public, which has shown some interest in those glimpses
21838 which I have occasionally given them of the thoughts and actions of a very
21839 remarkable man, that they are not to blame me if I have not shared my knowledge
21840 with them, for I should have considered it my first duty to do so, had
21841 I not been barred by a positive prohibition from his own lips, which was
21842 only withdrawn upon the third of last month.
21845 \begin_layout Standard
21849 \begin_layout Plain Layout
21861 \begin_layout Subsubsection
21865 \begin_layout Standard
21866 The same pattern is used when you want more than two columns:
21869 \begin_layout Standard
21873 \begin_layout Plain Layout
21877 begin{multicols}{3}
21885 \begin_layout Standard
21888 It can be imagined that my close intimacy with Sherlock Holmes had interested
21889 me deeply in crime, and that after his disappearance I never failed to
21890 read with care the various problems which came before the public.
21891 And I even attempted, more than once, for my own private satisfaction,
21892 to employ his methods in their solution, though with indifferent success.
21893 There was none, however, which appealed to me like this tragedy of Ronald
21895 As I read the evidence at the inquest, which led up to a verdict of willful
21896 murder against some person or persons unknown, I realized more clearly
21897 than I had ever done the loss which the community had sustained by the
21898 death of Sherlock Holmes.
21899 There were points about this strange business which would, I was sure,
21900 have specially appealed to him, and the efforts of the police would have
21901 been supplemented, or more probably anticipated, by the trained observation
21902 and the alert mind of the first criminal agent in Europe.
21903 All day, as I drove upon my round, I turned over the case in my mind and
21904 found no explanation which appeared to me to be adequate.
21905 At the risk of telling a twice-told tale, I will recapitulate the facts
21906 as they were known to the public at the conclusion of the inquest.
21909 \begin_layout Standard
21913 \begin_layout Plain Layout
21925 \begin_layout Standard
21926 You can have more than 3 columns if you want to, but that might not be very
21927 pleasant for the eye.
21930 \begin_layout Subsubsection
21931 Columns inside columns
21934 \begin_layout Standard
21935 You can even have columns inside columns:
21938 \begin_layout Standard
21942 \begin_layout Plain Layout
21946 begin{multicols}{2}
21954 \begin_layout Standard
21957 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
21958 at that time governor of one of the Australian colonies.
21959 Adair's mother had returned from Australia to undergo the operation for
21960 cataract, and she, her son Ronald, and her daughter Hilda were living together
21964 \begin_layout Standard
21968 \begin_layout Plain Layout
21972 begin{multicols}{2}
21980 \begin_layout Standard
21983 The youth moved in the best society–had, so far as was known, no enemies
21984 and no particular vices.
21985 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
21986 had been broken off by mutual consent some months before, and there was
21987 no sign that it had left any very profound feeling behind it.
21988 For the rest {sic} the man's life moved in a narrow and conventional circle,
21989 for his habits were quiet and his nature unemotional.
21990 Yet it was upon this easy-going young aristocrat that death came, in most
21991 strange and unexpected form, between the hours of ten and eleven-twenty
21992 on the night of March 30, 1894.
21995 \begin_layout Standard
21999 \begin_layout Plain Layout
22011 \begin_layout Standard
22014 Ronald Adair was fond of cards–playing continually, but never for such stakes
22016 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22017 It was shown that, after dinner on the day of his death, he had played
22018 a rubber of whist at the latter club.
22019 He had also played there in the afternoon.
22024 The evidence of those who had played with him– Mr.
22025 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
22026 and that there was a fairly equal fall of the cards.
22027 Adair might have lost five pounds, but not more.
22028 His fortune was a considerable one, and such a loss could not in any way
22030 He had played nearly every day at one club or other, but he was a cautious
22031 player, and usually rose a winner.
22032 It came out in evidence that, in partnership with Colonel Moran, he had
22033 actually won as much as four hundred and twenty pounds in a sitting, some
22034 weeks before, from Godfrey Milner and Lord Balmoral.
22035 So much for his recent history as it came out at the inquest.
22038 \begin_layout Standard
22042 \begin_layout Plain Layout
22054 \begin_layout Standard
22055 Please do read the file
22057 examples/multicol.lyx
22059 for more advanced examples including column and header spacing, vertical
22060 separator lines, and more.
22063 \begin_layout Section
22068 Paragraph Environment
22069 \begin_inset OptArg
22072 \begin_layout Plain Layout
22073 Numbering in Enumerate
22081 \begin_layout Standard
22087 \begin_layout Standard
22088 \begin_inset VSpace bigskip
22094 \begin_layout Standard
22096 The default numbering for the
22100 paragraph environment begins with Arabic numbers and ends with uppercase
22102 Suppose, however, you wanted a different type of numbering scheme.
22103 Here's a quickie example of how to change the numbering scheme:
22106 \begin_layout LyX-Code
22116 \begin_layout LyX-Code
22126 \begin_layout LyX-Code
22136 \begin_layout LyX-Code
22146 \begin_layout Standard
22147 \SpecialChar \ldots{}
22148 which changes the numbering scheme to uppercase Roman numerals, uppercase
22149 letters, Arabic numbers, and lowercase letter.
22152 \begin_layout Standard
22153 Additionally, the previous example also adds a little bit extra to the numbering
22155 For example, the first level label actually looks like:
22156 \begin_inset Quotes eld
22160 \begin_inset Quotes erd
22164 For ease of reading, we'll describe what the numbering schemes look like
22165 using a notation something like this: <
22166 \begin_inset Quotes eld
22170 \begin_inset Quotes erd
22174 \begin_inset space ~
22178 \begin_inset Quotes erd
22182 \begin_inset Quotes erd
22186 \begin_inset space ~
22190 \begin_inset Quotes erd
22194 \begin_inset Quotes erd
22198 \begin_inset space ~
22202 \begin_inset Quotes eld
22206 \begin_inset Quotes erd
22213 \begin_layout Standard
22214 As you can see in the example, there is a label command for each nesting
22221 \SpecialChar \ldots{}
22228 , as well as a counter,
22232 \SpecialChar \ldots{}
22238 There are also five
22239 \begin_inset Quotes eld
22243 \begin_inset Quotes erd
22276 , each of which take one counter as an argument.
22277 You can add characters before or after these, but there's no need to add
22281 \begin_layout Standard
22282 You can get really fancy with these.
22286 \begin_layout LyX-Code
22300 \begin_layout LyX-Code
22312 \begin_layout LyX-Code
22322 \begin_layout LyX-Code
22332 \begin_layout Standard
22333 produces the somewhat out of hand numbering scheme: <
22334 \begin_inset Quotes eld
22338 \begin_inset Quotes erd
22342 \begin_inset space ~
22346 \begin_inset Quotes erd
22350 \begin_inset Quotes erd
22354 \begin_inset space ~
22358 \begin_inset Quotes erd
22362 \begin_inset Quotes erd
22366 \begin_inset space ~
22370 \begin_inset Quotes eld
22374 \begin_inset Quotes erd
22381 \begin_layout Standard
22385 \begin_layout Section
22389 \begin_layout Standard
22395 \begin_layout Standard
22396 \begin_inset VSpace bigskip
22402 \begin_layout Standard
22407 \begin_layout Plain Layout
22413 tmpfont}{cmr17 scaled 2500}{
22425 \begin_layout Standard
22430 \begin_layout Plain Layout
22441 hose of you who like the style of old books probably also like
22442 \begin_inset Quotes eld
22446 \begin_inset Quotes erd
22449 —those large capital letters which begin each new chapter or section.
22450 Implementing them with plain LyX/LaTeX is straightforward (assuming you
22451 know some plain TeX!) but does require a lot of work and many iterations,
22452 as you can see by all the ugly TeX-mode stuff at the beginning of this
22456 \begin_layout Standard
22460 \begin_layout Plain Layout
22466 bigdrop{-1em}{3}{ptmri}{T}+
22471 here is a much easier way of doing this, of course.
22480 ) package from CTAN allows a simple way to add such letters to your documents.
22481 Since this package is not a standard part of teTeX, I can't demonstrate
22482 it within this document, but if you copy this paragraph to a new document,
22484 \begin_inset Quotes eld
22494 \begin_inset Quotes erd
22497 and the pluses from the TeX code at the beginning of the paragraph, and
22502 usepackage{dropcaps}
22504 to your LaTeX preamble, you will get a nice Times Roman Italic
22505 \begin_inset Quotes eld
22509 \begin_inset Quotes erd
22512 , whose height is three lines of text and which protrudes 1 em into the
22514 (Make certain you have copied
22515 \begin_inset Quotes eld
22523 \begin_inset Quotes erd
22526 into a directory where TeX can see it.) The first argument is the amount
22527 of indentation; in this case the negative sign moves it into the margin.
22528 The second argument is the height of the letter in number of lines of text.
22529 The third argument is the font name: virtually anything which has a tfm
22530 file should work (wade through the
22532 .../texmf/fonts/tfm
22534 directory for possibilities).
22535 My personal favorite is
22536 \begin_inset Quotes eld
22544 \begin_inset Quotes erd
22547 , a fancy German font specifically designed for dropped capitals.
22548 The fourth argument is the letter (or letters) to be dropped.
22553 package also offers the
22559 command, as well as a slightly simplified
22568 \begin_layout Section
22569 Non-standard Paragraph Shapes
22572 \begin_layout Standard
22578 \begin_layout Standard
22579 \begin_inset VSpace bigskip
22585 \begin_layout Standard
22589 \begin_layout Plain Layout
22601 \begin_layout Standard
22605 \begin_layout Plain Layout
22614 \begin_layout Plain Layout
22628 \begin_layout Standard
22633 \begin_layout Plain Layout
22644 \begin_layout Plain Layout
22653 \begin_layout Plain Layout
22662 \begin_layout Plain Layout
22671 \begin_layout Plain Layout
22680 \begin_layout Plain Layout
22689 \begin_layout Plain Layout
22698 \begin_layout Plain Layout
22707 \begin_layout Plain Layout
22716 \begin_layout Plain Layout
22725 \begin_layout Plain Layout
22734 \begin_layout Plain Layout
22743 \begin_layout Plain Layout
22752 \begin_layout Plain Layout
22761 \begin_layout Plain Layout
22770 \begin_layout Plain Layout
22779 \begin_layout Plain Layout
22788 \begin_layout Plain Layout
22797 \begin_layout Plain Layout
22806 \begin_layout Plain Layout
22812 There are times when the tyranny of rectangular paragraphs must be overthrown.
22813 In such situations, a call to the delightful plain TeX command
22820 As you can see, completely arbitrary shapes can be laid out with a suitable
22821 set of linelength definitions.
22822 While this parshape may look a bit silly and useless, one could conceive
22823 of situations such as finely tuned dropped capitals, word wrapping around
22824 non-rectangular graphics, etc.
22825 which will benefit from such handcrafting.
22828 \begin_layout Standard
22829 \begin_inset VSpace bigskip
22835 \begin_layout Standard
22840 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
22847 is the number of lines of text which define the paragraph.
22848 If there turn out to be fewer lines, the shape is truncated; if there are
22849 more, the excess lines have the same dimensions as the last line of the
22859 entries specify the indentation of the line from the left margin, and the
22860 length of the line as measured from that point.
22861 The shape applies only to the current paragraph; everything is reset to
22862 normal for the next paragraph.
22865 \begin_layout Standard
22869 \begin_layout Plain Layout
22881 \begin_layout Section
22885 \begin_layout Standard
22886 As you can see, the examples in this section range from the useful to the
22888 While I don't expect that anyone will ever need the paragraph shape demonstrate
22889 d in the last section, the important point is that you can do almost anything
22890 you want in LyX if you are willing to figure out how to do it in TeX and
22892 TeX is a fantastically powerful typesetting system and all that power is
22893 available to you since LyX uses it as its backend.