1 #LyX 2.0 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}}
71 \language_package default
76 \font_typewriter default
77 \font_default_family default
78 \use_non_tex_fonts false
85 \default_output_format default
87 \bibtex_command default
88 \index_command default
92 \pdf_title "LyX's Additional Features manual"
93 \pdf_author "LyX Team"
94 \pdf_subject "LyX's additional features documentation"
95 \pdf_keywords "LyX, Documentation, Additional"
97 \pdf_bookmarksnumbered true
98 \pdf_bookmarksopen false
99 \pdf_bookmarksopenlevel 1
100 \pdf_breaklinks false
104 \pdf_pdfusetitle false
105 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false, pdfpagelabels"
115 \paperorientation portrait
124 \paragraph_separation indent
125 \paragraph_indentation default
126 \quotes_language english
129 \paperpagestyle headings
130 \tracking_changes false
131 \output_changes false
140 Additional LyX Features
148 \begin_layout Plain Layout
150 Principal maintainer of this file is
155 If you have comments or error corrections, please send them to the LyX
156 Documentation mailing list,
157 \begin_inset Flex Code
160 \begin_layout Plain Layout
162 <lyx-docs@lists.lyx.org>
175 \begin_layout Standard
176 \begin_inset CommandInset toc
177 LatexCommand tableofcontents
184 \begin_layout Chapter
188 \begin_layout Standard
189 This manual is essentially Part II of the
191 User's Guide\SpecialChar \@.
194 The reason for separating this document out is simple: the
198 is already quite lengthy, and it contains information on all of the basic
199 features one needs to know in order to prepare most documents.
200 However, the LyX Team has worked to make LyX extensible through various
201 configuration files and external packages.
202 That means that if you want to support the Fizzwizzle LaTeX package, you
203 can create a layout file (or module) for it without having to alter LyX
205 We've already had contributions of several new features this way, and some
206 of them are documented here.
207 There are also some more `advanced' features, such as how to control the
208 presentation of bibliographies and how to work with multi-part documents,
209 that are not covered in the
213 and are discussed here.
216 \begin_layout Standard
217 This manual also documents some special features, like fax support, version
218 control, and SGML support, which require additional software to work properly.
219 There is also a chapter on LyX's support for HTML.
220 And lastly, there's a chapter of LaTeX tools and tips, things you can use
221 to spruce up your documents by directly using the powerful features of
227 only WYSIWYM and will only ever interface to some, not all, LaTeX features.
230 \begin_layout Standard
231 If you haven't read the
235 yet, you are definitely in the wrong manual.
240 is the first place to go, since it describes the notation and format of
242 You should also be thoroughly familiar with the
246 and all of the basic features of LyX before attempting to read this one.
249 \begin_layout Standard
250 Since many of the topics in this manual depend heavily on LyX's interaction
251 with LaTeX, this first chapter covers the inner workings of LyX and how
252 to direct LyX to generate exactly the LaTeX code you want.
253 It is obviously for more seasoned LyX users.
256 \begin_layout Chapter
260 \begin_layout Section
264 \begin_layout Standard
265 This chapter is for both TeX-nicians and the LaTeX-curious.
266 In it, we'll explain how LyX and LaTeX work together to produce printable
268 This is the only place in any of the manuals where we assume you know something
272 \begin_layout Standard
273 At one time, LyX was called a
274 \begin_inset Quotes eld
277 WYSIWYM frontend to LaTeX,
278 \begin_inset Quotes erd
281 but that's no longer true.
282 There are frontends to LaTeX out there.
286 \begin_layout Plain Layout
287 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
288 There are also the LaTeX modes for vi and emacs, of course.
293 These are basically text editors with the ability to run LaTeX and mark
294 any errors in the file you're editing.
303 run LaTeX, and it also indicates errors in the file, it also does much,
305 For one thing, you don't need to know LaTeX to use LyX effectively.
306 And LyX has added its own extensions to LaTeX.
307 Try the following sometime: select
308 \begin_inset Flex MenuItem
311 \begin_layout Plain Layout
312 Export\SpecialChar \menuseparator
319 \begin_inset Flex MenuItem
322 \begin_layout Plain Layout
329 \begin_inset Flex MenuItem
332 \begin_layout Plain Layout
333 View\SpecialChar \menuseparator
339 ), then look at the preamble of the resulting
340 \begin_inset Flex Code
343 \begin_layout Plain Layout
350 You'll notice a variety of new macros defined specifically by LyX.
351 These macros are defined automatically, according to the features you use
355 \begin_layout Standard
356 There are several commands that automatically invoke LaTeX.
360 \begin_layout Itemize
361 \begin_inset Flex MenuItem
364 \begin_layout Plain Layout
365 View\SpecialChar \menuseparator
374 \begin_layout Itemize
375 \begin_inset Flex MenuItem
378 \begin_layout Plain Layout
379 View\SpecialChar \menuseparator
380 Update\SpecialChar \menuseparator
389 \begin_layout Itemize
390 \begin_inset Flex MenuItem
393 \begin_layout Plain Layout
394 File\SpecialChar \menuseparator
403 \begin_layout Itemize
404 \begin_inset Flex MenuItem
407 \begin_layout Plain Layout
408 File\SpecialChar \menuseparator
417 \begin_layout Standard
418 They will only invoke LaTeX if the file has changed since the last time
423 \begin_layout Standard
424 When LyX runs LaTeX on the file you're editing, it performs these steps:
427 \begin_layout Enumerate
428 Convert the document to LaTeX and save to a file with the extension
429 \begin_inset Flex Code
432 \begin_layout Plain Layout
439 \begin_inset Flex Code
442 \begin_layout Plain Layout
451 \begin_layout Enumerate
453 \begin_inset Flex Code
456 \begin_layout Plain Layout
462 file (maybe several times), and run any other commands (such as
463 \begin_inset Flex Code
466 \begin_layout Plain Layout
473 \begin_inset Flex Code
476 \begin_layout Plain Layout
482 ) needed to compile the LaTeX file.
485 \begin_layout Enumerate
486 If there are any errors, show the error log.
489 \begin_layout Standard
490 If you've run LaTeX using
491 \begin_inset Flex MenuItem
494 \begin_layout Plain Layout
497 \SpecialChar \menuseparator
505 , LyX then runs a DVI viewer to display the DVI-file.
507 \begin_inset Flex MenuItem
510 \begin_layout Plain Layout
513 \SpecialChar \menuseparator
521 , LyX performs further steps:
524 \begin_layout Itemize
526 \begin_inset Flex Code
529 \begin_layout Plain Layout
535 to convert the DVI file to PostScript.
538 \begin_layout Itemize
539 Run a PostScript viewer, such as
540 \begin_inset Flex Code
543 \begin_layout Plain Layout
549 , to display the PostScript file.
552 \begin_layout Standard
553 LyX does similar things when viewing, or exporting, other formats.
556 \begin_layout Section
557 Translating LaTeX files into LyX
560 \begin_layout Standard
561 You can import a LaTeX file into LyX by using the
562 \begin_inset Flex MenuItem
565 \begin_layout Plain Layout
566 File\SpecialChar \menuseparator
567 Import\SpecialChar \menuseparator
574 This will call a program named
575 \begin_inset Flex Code
578 \begin_layout Plain Layout
584 which will create a file
585 \begin_inset Flex Code
588 \begin_layout Plain Layout
595 \begin_inset Flex Code
598 \begin_layout Plain Layout
605 LyX will then open that file.
609 \begin_layout Plain Layout
610 \begin_inset Flex Code
613 \begin_layout Plain Layout
619 can also be run from the command line, of course.
627 \begin_layout Standard
628 \begin_inset Flex Code
631 \begin_layout Plain Layout
637 will translate most legal LaTeX, but not everything.
638 It will put things it doesn't understand into TeX code, so after translating
640 \begin_inset Flex Code
643 \begin_layout Plain Layout
649 , you can look for TeX code and hand-edit it until it looks right.
652 \begin_layout Standard
653 If you don't know what TeX code is, read the next section.
656 \begin_layout Section
657 \begin_inset CommandInset label
659 name "sec:Inserting-TeX-Code"
663 Inserting TeX Code into LyX Documents
666 \begin_layout Standard
667 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
668 You can always insert TeX code into any LyX document.
669 LyX cannot, and will never be able to, display every possible LaTeX construct.
670 If ever you need to insert LaTeX commands into your LyX document, you can
672 \begin_inset Flex Code
675 \begin_layout Plain Layout
681 box, which you can insert into your document with
682 \begin_inset Flex MenuItem
685 \begin_layout Plain Layout
686 Insert\SpecialChar \menuseparator
695 \begin_layout Standard
696 Here's an example of inserting LaTeX commands in a LyX document.
697 The code looks like this:
700 \begin_layout LyX-Code
704 \begin_inset Newline newline
710 \begin_inset Newline newline
713 This is an example for a minipage environment.
715 \begin_inset Newline newline
718 can put nearly everything in it, even (non-floating)
719 \begin_inset Newline newline
724 \begin_inset Newline newline
730 \begin_inset Newline newline
734 \begin_inset Newline newline
740 \begin_inset Newline newline
746 \begin_inset Newline newline
752 \begin_inset Newline newline
757 \begin_inset Newline newline
763 \begin_inset Newline newline
769 \begin_inset Newline newline
775 \begin_inset Newline newline
783 \begin_layout LyX-Code
787 \begin_layout Standard
789 \begin_inset Flex Code
792 \begin_layout Plain Layout
798 box containing this text is directly after this paragraph.
799 Those of you reading the manual in LyX will only see the TeX code inset.
800 Those reading a printed version of the manuals will see the actual results:
803 \begin_layout Standard
807 \begin_layout Plain Layout
814 \begin_layout Plain Layout
821 \begin_layout Plain Layout
823 This is an example for a minipage environment.
824 You can put nearly everything in it, even (non-floating) figures and tables.
828 \begin_layout Plain Layout
835 \begin_layout Plain Layout
840 \begin_layout Plain Layout
847 \begin_layout Plain Layout
854 \begin_layout Plain Layout
861 \begin_layout Plain Layout
867 \begin_layout Plain Layout
874 \begin_layout Plain Layout
881 \begin_layout Plain Layout
888 \begin_layout Plain Layout
900 \begin_layout Standard
901 In addition to using TeX code, you can also create a separate file containing
902 some complex LaTeX structure and then use
903 \begin_inset Flex MenuItem
906 \begin_layout Plain Layout
907 Insert\SpecialChar \menuseparator
917 to include your file (you should select the type
918 \begin_inset Flex Code
921 \begin_layout Plain Layout
928 We recommend that you only do this if you have a
929 \begin_inset Flex Code
932 \begin_layout Plain Layout
943 Otherwise, you'll have a big job tracking down LaTeX errors.
946 \begin_layout Standard
947 There are a few last points to emphasize:
950 \begin_layout Itemize
955 check if your LaTeX code is correct.
958 \begin_layout Itemize
959 Beware reinventing the wheel.
962 \begin_layout Standard
963 On that last point, LyX does have quite a few features tucked into it, and
965 Be sure to check the manuals to make sure that LyX doesn't have such-and-such
966 feature before you decide you have to do it by hand.
967 Moreover, there are numerous LaTeX packages out there to do all sorts of
968 things, from labels to envelopes to fancy multipage tables.
970 \begin_inset CommandInset href
973 target "http://www.ctan.org/"
977 for details, and see chapter
978 \begin_inset CommandInset ref
980 reference "cha:secrets"
987 \begin_layout Standard
988 If you do need to do some wild and fancy things within your document, be
989 sure to check out a good LaTeX book for assistance.
990 There are a number of them listed in the bibliography of the
997 \begin_layout Section
998 LyX and the LaTeX Preamble
1001 \begin_layout Subsection
1002 About the LaTeX Preamble
1005 \begin_layout Standard
1006 If you already know LaTeX, there is no need to explain here what the preamble
1008 If you don't, the following will give you some ideas—we recommend again
1009 that you consult a LaTeX book for further information.
1010 In any case, you should read the points below, because they explain what
1011 you can do and what you don't need to do in the LaTeX preamble of a LyX
1015 \begin_layout Standard
1016 The LaTeX preamble comes at the very beginning of a document,
1024 \begin_layout Itemize
1025 Declare the document class.
1027 \begin_inset Newline newline
1030 LyX already does this for you.
1031 If you're a seasoned LaTeX-nician, and you have a custom document class
1032 you want to use, check out the
1034 Customization Manual
1036 for information on how to make LyX interface to it.
1039 \begin_layout Itemize
1040 Declare the usage of packages.
1042 \begin_inset Newline newline
1045 LaTeX packages provide special commands, which are only available within
1046 a document when the package has been declared in the preamble.
1047 For example, the package
1048 \begin_inset Flex Code
1051 \begin_layout Plain Layout
1057 forces all paragraphs to be indented.
1058 There are other packages for labels, envelopes, margins, etc.
1062 \begin_layout Itemize
1063 Set counters, variables, lengths and widths.
1065 \begin_inset Newline newline
1068 There are several LaTeX counters and variables which
1072 be set globally from within the preamble in order to have the desired effect.
1073 (There are variables which you can set and reset inside the document, too.)
1074 Margins are a good example of something which must be set in the preamble.
1075 Another example is the label format for lists.
1076 You can actually set these just about anywhere, but it's best to do it
1077 just once, inside the preamble.
1080 \begin_layout Itemize
1081 Declare user defined commands (with
1082 \begin_inset Flex Code
1085 \begin_layout Plain Layout
1094 \begin_inset Flex Code
1097 \begin_layout Plain Layout
1106 \begin_inset Newline newline
1109 These are abbreviations for LaTeX commands which appear very often inside
1111 Although the preamble is a good place to declare such commands, they
1115 be declared anywhere (before they are used for the first time, of course).
1116 This can be useful if there is a lot of raw LaTeX code in your document,
1117 which normally should not be the case.
1120 \begin_layout Standard
1121 LyX adds its own set of definitions to the preamble of the
1122 \begin_inset Flex Code
1125 \begin_layout Plain Layout
1132 This makes LaTeX files generated by LyX portable.
1135 \begin_layout Subsection
1136 Changing the Preamble
1139 \begin_layout Standard
1140 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1141 can't change them without patching LyX itself.
1142 You can, however, add your own stuff to the preamble by selecting
1143 \begin_inset Flex MenuItem
1146 \begin_layout Plain Layout
1148 \begin_inset space ~
1157 \begin_inset Flex MenuItem
1160 \begin_layout Plain Layout
1161 Document\SpecialChar \menuseparator
1168 LyX adds anything in the
1169 \begin_inset Flex MenuItem
1172 \begin_layout Plain Layout
1178 dialog to its own built-in preamble.
1179 Before adding your own declarations in the preamble, you should make sure
1180 that LyX doesn't already support what you want to do.
1181 (Remember what we said about reinventing the wheel?) Also,
1183 make sure your preamble code is correct
1186 LyX doesn't check it for you.
1187 If there is an error, you're likely to get an error like
1188 \begin_inset Quotes eld
1192 \begin_inset Flex Code
1195 \begin_layout Plain Layout
1204 \begin_inset Quotes erd
1208 If you see this error, check your preamble.
1211 \begin_layout Subsection
1215 \begin_layout Standard
1216 Here are some examples of what you can add to a preamble, and what they
1220 \begin_layout Subsubsection
1224 \begin_layout Standard
1225 There are two variables under LaTeX that control page position:
1226 \begin_inset Flex Code
1229 \begin_layout Plain Layout
1238 \begin_inset Flex Code
1241 \begin_layout Plain Layout
1250 Their names should be self-explanatory.
1251 These variables are useful if you think for a moment about computer labels.
1252 Sometimes, the size of a print medium and the area of the medium that you
1253 can actually print on aren't the same.
1255 \begin_inset Flex Code
1258 \begin_layout Plain Layout
1267 \begin_inset Flex Code
1270 \begin_layout Plain Layout
1281 \begin_layout Standard
1282 The default values for
1283 \begin_inset Flex Code
1286 \begin_layout Plain Layout
1295 \begin_inset Flex Code
1298 \begin_layout Plain Layout
1307 \begin_inset space \thinspace{}
1311 \begin_inset space \thinspace{}
1315 \begin_inset space \space{}
1318 the page isn't shifted.
1319 Unfortunately, some DVI drivers always seem to shift the page.
1320 We have no idea why, or why the sysadmin hasn't fixed such behavior.
1321 If you're using LyX on a system that you don't personally maintain, and
1322 your sysadmin is a doofus,
1323 \begin_inset Flex Code
1326 \begin_layout Plain Layout
1335 \begin_inset Flex Code
1338 \begin_layout Plain Layout
1347 Suppose your left and top margins are always 0.5
1348 \begin_inset space \thinspace{}
1352 You can add this to the preamble:
1355 \begin_layout LyX-Code
1363 \begin_layout LyX-Code
1371 \begin_layout Standard
1372 and your margins should now be correct.
1375 \begin_layout Subsubsection
1379 \begin_layout Standard
1380 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1381 There's a rather nice package, available at your nearest CTAN archive,
1382 for printing sheets of labels:
1383 \begin_inset Flex Code
1386 \begin_layout Plain Layout
1393 Now, your system may not have this package installed by default.
1394 We leave that up to you to check.
1395 You'll also want to read the documentation for it; we're not going to do
1397 Since this is an example, however, we'll give you an example of how you
1401 \begin_layout Standard
1402 First, make sure you're using the
1403 \begin_inset Flex Code
1406 \begin_layout Plain Layout
1413 Next, you need to put the following in your preamble:
1416 \begin_layout LyX-Code
1422 \begin_layout LyX-Code
1428 \begin_layout LyX-Code
1434 \begin_layout LyX-Code
1440 \begin_layout LyX-Code
1446 \begin_layout LyX-Code
1452 \begin_layout LyX-Code
1458 \begin_layout Standard
1459 This sets things up for Avery label sheets, stock #5360.
1460 You're now ready to print labels, but you'll need to insert LaTeX code,
1461 placing the commands
1462 \begin_inset Flex Code
1465 \begin_layout Plain Layout
1474 \begin_inset Flex Code
1477 \begin_layout Plain Layout
1485 around each label text.
1486 This and other special features of
1487 \begin_inset Flex Code
1490 \begin_layout Plain Layout
1496 are explained in its documentation.
1499 \begin_layout Standard
1500 Someday, someone may write a LyX layout file to support this package directly.
1501 Maybe that someone is you.
1504 \begin_layout Subsubsection
1505 Example #3: Paragraph Indentation
1508 \begin_layout Standard
1509 Americans are trained to indent the first line of
1514 As with all of their other weird quirks, most Americans will whine and
1515 moan until they can have their way and indent the first line of all paragraphs.
1524 \begin_layout Standard
1525 Of course, this behavior isn't standard typography.
1526 In books, you typically only indent the first line of a paragraph
1530 it follows another one.
1531 The idea behind indenting the first line of a paragraph is to distinguish
1532 neighboring paragraphs from one another.
1533 If there is no previous paragraph—for example, if it follows a figure or
1534 is the first paragraph in a section—then there is no need for indentation.
1538 \begin_layout Standard
1539 If you're a typical American (we're still joking!), though, you don't care
1540 about such esoteric things; you want your indentation! Add this to the
1544 \begin_layout LyX-Code
1547 usepackage{indentfirst}
1550 \begin_layout Standard
1551 If your TeX distribution isn't braindead, you'll have this package, and
1552 all of your paragraphs will get the indentation the Founding Fathers intended
1556 \begin_layout Subsubsection
1557 Example #4: This Document
1560 \begin_layout Standard
1561 You can also check out the preamble of this document to get an idea of some
1562 of the advanced things you can do.
1563 Also, there are more examples and an assortment of LaTeX
1564 \begin_inset Quotes eld
1568 \begin_inset Quotes erd
1572 \begin_inset space ~
1576 \begin_inset CommandInset ref
1578 reference "cha:secrets"
1586 \begin_layout Section
1587 LyX and LaTeX Errors
1590 \begin_layout Standard
1591 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1593 It then uses the logfile from the LaTeX run to do a post-mortem.
1594 After analyzing the logfile,LyX displays a dialog listing the errors.
1595 Clicking on any one of them will take you to the position in your LyX file
1596 where the error occurred.
1600 \begin_layout Plain Layout
1602 Analyzing the logfile is a tough job, and LyX doesn't always go to the
1604 There are also cases where LaTeX reports the error on one line, but the
1605 actual error is earlier.
1606 This is not unlike forgetting a closing brace in a program: You'll get
1607 an error, but only later.
1615 \begin_layout Standard
1616 Some folks also like to look at the log file directly: It is available from
1618 \begin_inset Flex MenuItem
1621 \begin_layout Plain Layout
1624 \SpecialChar \menuseparator
1628 \begin_inset space ~
1637 There are some fairly common error messages and warnings.
1638 We'll cover those here.
1639 You should look at a good LaTeX book for a complete listing.
1642 \begin_layout Itemize
1643 \begin_inset Flex Code
1646 \begin_layout Plain Layout
1653 \begin_inset Newline newline
1656 Anything beginning with these words is a warning message for the purpose
1658 \begin_inset Quotes eld
1662 \begin_inset Quotes erd
1665 the LaTeX code itself.
1666 You'll get messages like this if you added or changed cross-references
1667 or bibliography entries, in which case, LaTeX is trying to tell you that
1668 you need to make another run.
1669 You can by-and-large ignore these.
1672 \begin_layout Itemize
1673 \begin_inset Flex Code
1676 \begin_layout Plain Layout
1683 \begin_inset Newline newline
1686 Another warning message, this time about fonts which LaTeX couldn't find.
1687 The rest of the message will often say something about a replacement font
1689 You can safely ignore these, too.
1692 \begin_layout Itemize
1693 \begin_inset Flex Code
1696 \begin_layout Plain Layout
1705 \begin_inset Newline newline
1713 They are warnings about lines that were too long and run past the right
1715 Almost always, this is unnoticeable in the final output.
1716 (It can be just a point or two.) Or, only one or two characters extend past
1718 LaTeX seems to generate at least one of these messages for just about any
1720 \begin_inset Newline newline
1723 You can ignore these messages.
1724 Your eyes will tell you if there's a problem with something that's too
1725 wide; just look at the output.
1729 \begin_layout Plain Layout
1730 You can also enable the `draft' option in
1731 \begin_inset Flex MenuItem
1734 \begin_layout Plain Layout
1737 \SpecialChar \menuseparator
1745 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1753 \begin_layout Itemize
1754 \begin_inset Flex Code
1757 \begin_layout Plain Layout
1766 \begin_inset Newline newline
1769 Not quite as common as its cousin.
1770 LaTeX seems to like to print lines that are a bit too wide as opposed to
1771 ones that are a bit too narrow.
1772 We have no idea why.
1775 \begin_layout Itemize
1776 \begin_inset Flex Code
1779 \begin_layout Plain Layout
1788 \begin_inset Flex Code
1791 \begin_layout Plain Layout
1800 \begin_inset Newline newline
1803 Warnings about troubles breaking the page.
1804 Once again, just look at the output.
1805 Your eyes will tell you where something has gone wrong.
1808 \begin_layout Itemize
1809 \begin_inset Flex Code
1812 \begin_layout Plain Layout
1814 \begin_inset Quotes els
1818 \begin_inset Quotes ers
1827 \begin_inset Newline newline
1831 \begin_inset Quotes eld
1835 \begin_inset Quotes erd
1838 isn't installed on this system.
1839 This usually appears because some package your document needs isn't installed.
1840 If you didn't touch the preamble or didn't use the
1841 \begin_inset Flex Code
1844 \begin_layout Plain Layout
1852 command, then one of the packages LyX tried to load is missing.
1854 \begin_inset Flex MenuItem
1857 \begin_layout Plain Layout
1858 Help\SpecialChar \menuseparator
1864 to get a list of packages that LyX knows about.
1865 This file is updated whenever you reconfigure LyX (using
1866 \begin_inset Flex MenuItem
1869 \begin_layout Plain Layout
1870 Tools\SpecialChar \menuseparator
1876 ) and tells you which packages have been detected and what they do.
1877 \begin_inset Newline newline
1881 \begin_inset Flex Code
1884 \begin_layout Plain Layout
1892 command and the package in question isn't installed, then you'll need to
1893 install it yourself.
1896 \begin_layout Itemize
1897 \begin_inset Flex Code
1900 \begin_layout Plain Layout
1901 LaTeX Error: Unknown option
1907 \begin_inset Newline newline
1910 Error messages beginning with this are trying to tell you that you specified
1911 a bad or undefined option to a package.
1912 Check the package's documentation.
1915 \begin_layout Itemize
1916 \begin_inset Flex Code
1919 \begin_layout Plain Layout
1920 Undefined control sequence
1926 \begin_inset Newline newline
1929 If you've inserted LaTeX code into your document, but made a typo, you'll
1931 You may have forgotten to load a package.
1932 In any case, this error message usually means that you used an undefined
1937 \begin_layout Standard
1938 There are other error and warning messages.
1939 Some are self-explanatory.
1940 These are usually LaTeX messages.
1941 Others are downright cryptic.
1942 These are usually TeX error messages, and we really have
1946 what they mean or how to decipher them.
1950 \begin_layout Standard
1951 There's a general sequence you should follow if you get error messages:
1954 \begin_layout Enumerate
1955 Look at the LaTeX code you inserted for typos.
1958 \begin_layout Enumerate
1959 If there are no typos, check that you used the command(s) correctly.
1962 \begin_layout Enumerate
1963 If you get a bunch of error boxes piled up at the very top of the document—and
1964 especially if you see a
1965 \begin_inset Quotes eld
1969 \begin_inset Flex Code
1972 \begin_layout Plain Layout
1981 \begin_inset Quotes erd
1984 error—it means that there are errors in the preamble.
1985 Start debugging your preamble.
1988 \begin_layout Enumerate
1989 If you didn't add anything to the preamble and didn't add any LaTeX code
1990 to the document, the first suspect is your LaTeX distribution itself.
1991 Check for missing packages and install them.
1994 \begin_layout Enumerate
1995 Okay, so there are no missing packages.
1996 Did you use any of the fine-tuning options in LyX? Specifically, did you
2001 any of them, like trying to manually insert lots of
2002 \begin_inset Flex Code
2005 \begin_layout Plain Layout
2007 \begin_inset space ~
2016 \begin_inset Flex Code
2019 \begin_layout Plain Layout
2026 \begin_inset Flex Code
2029 \begin_layout Plain Layout
2035 ? Did you try to kludge something together with these instead of using the
2036 appropriate paragraph environment?
2039 \begin_layout Enumerate
2040 All right, you didn't use any of the fine-tuning options, you played by
2042 Did you try to pull a fancy maneuver? Did you do something funky inside
2043 a table or an equation, like inserting a graphic into a table cell?
2046 \begin_layout Enumerate
2047 Do you have long sections of text where LaTeX cannot find a place to break
2048 a line? By default, LaTeX is rather strict about how much extra inter-word
2049 spacing it will add in order to break a line.
2050 Preferably, you should rework the paragraph to avoid the problem.
2051 If this isn't an option, you can wrap your text in
2052 \begin_inset Flex Code
2055 \begin_layout Plain Layout
2063 to make LaTeX's line breaking more, well, sloppy.
2066 \begin_layout Enumerate
2067 Did you go overboard with the nesting? LyX (currently) doesn't check to
2068 make sure you're in the limits for nesting environments.
2069 If you nested a bunch of environments to the
2070 \begin_inset Formula $17^{\mathrm{th}}$
2073 level, that's the problem.
2074 (The limit in LaTeX is five.)
2077 \begin_layout Enumerate
2078 Okay, you didn't get any error messages, but your output looks awful.
2079 If you have a table or figure that's too wide or long for the page, you
2084 \begin_layout Enumerate
2085 rescale the figure so it fits.
2088 \begin_layout Enumerate
2089 trim down the table so it fits.
2093 \begin_layout Enumerate
2094 If something else is wrong with the output, and you didn't try to pull anything
2095 fancy or kludge the fine-tuning options, we're not sure what's wrong.
2098 \begin_layout Standard
2099 If all this doesn't help—well, then
2103 you might have found a bug in LyX\SpecialChar \ldots{}
2107 \begin_layout Chapter
2111 \begin_layout Section
2112 Customizing Bibliographies with BibTeX
2115 \begin_layout Standard
2116 The most basic information about how to use BibTeX with LyX is contained
2119 Bibliography databases (BibTeX)
2126 The following subsections explain special bibliography features supported
2130 \begin_layout Subsection
2131 Alternative Citation Styles
2134 \begin_layout Standard
2135 Standard BibTeX uses numbers (e.
2136 \begin_inset space \thinspace{}
2140 \begin_inset space \space{}
2144 \begin_inset Quotes eld
2148 \begin_inset Quotes erd
2151 ) to refer to a cited work.
2152 However, in many scientific disciplines, other citation styles are in use.
2153 The most common one is the author-year style (e.
2154 \begin_inset space \thinspace{}
2158 \begin_inset space \space{}
2162 \begin_inset Quotes eld
2166 \begin_inset Quotes erd
2170 LyX supports two packages that provide this style,
2171 \begin_inset Flex Code
2174 \begin_layout Plain Layout
2181 \begin_inset Flex Code
2184 \begin_layout Plain Layout
2191 Both packages have their pros and cons, which cannot be listed in detail.
2192 If you only want to have simple author-year (or author-numerical) style,
2193 or if you want to use one of the countless style files for
2194 \begin_inset Flex Code
2197 \begin_layout Plain Layout
2203 , than the established
2204 \begin_inset Flex Code
2207 \begin_layout Plain Layout
2213 package is probably your choice.
2214 If you need special features like short title references, ibidem etc., you
2216 \begin_inset Flex Code
2219 \begin_layout Plain Layout
2228 \begin_layout Standard
2229 The handling of both packages in LyX is basically the same.
2231 \begin_inset Flex MenuItem
2234 \begin_layout Plain Layout
2235 Document\SpecialChar \menuseparator
2242 \begin_inset Flex MenuItem
2245 \begin_layout Plain Layout
2252 \begin_inset Flex MenuItem
2255 \begin_layout Plain Layout
2262 \begin_inset Flex MenuItem
2265 \begin_layout Plain Layout
2272 With both packages, you will get some extra features in the citation dialog
2273 and you can select the style of the reference (
2274 \begin_inset Quotes eld
2278 \begin_inset Quotes erd
2282 \begin_inset Quotes eld
2286 \begin_inset Quotes erd
2290 \begin_inset Quotes eld
2294 \begin_inset Quotes erd
2298 \begin_inset Quotes eld
2302 \begin_inset Quotes erd
2306 Note that both packages need specifically designed style files.
2307 They both ship their own, but there are lots of additional style files,
2308 and there is even an interactive style file builder
2312 \begin_layout Plain Layout
2314 \begin_inset Flex URL
2317 \begin_layout Plain Layout
2319 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2330 \begin_inset Flex Code
2333 \begin_layout Plain Layout
2342 \begin_layout Subsection
2343 Sectioned Bibliographies
2346 \begin_layout Standard
2347 Sometimes you might need to divide your bibliography into several sections.
2348 If you are for instance a historian, the possibility to separate sources
2349 and scientific works is most likely a
2350 \begin_inset Quotes eld
2354 \begin_inset Quotes erd
2358 Unfortunately, BibTeX itself does not allow you to do this.
2359 But with the help of some LaTeX packages, BibTeX can be extended to fit
2363 \begin_layout Standard
2364 LyX provides native support for one of these packages,
2372 \begin_layout Plain Layout
2374 \begin_inset Flex URL
2377 \begin_layout Plain Layout
2379 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2389 The advantage of this package (compared to other packages like
2393 ) is that you don't need to define new citation commands.
2394 Instead, you need to prepare different bibliographic databases which include
2395 the entries for the different sections of the bibliography.
2396 For example: If you want to divide your bibliography into the sections
2398 \begin_inset Quotes eld
2402 \begin_inset Quotes erd
2406 \begin_inset Quotes eld
2410 \begin_inset Quotes erd
2413 , you first need to create two bibliographic databases, e.
2414 \begin_inset space \thinspace{}
2418 \begin_inset space \space{}
2422 \begin_inset Flex Code
2425 \begin_layout Plain Layout
2432 \begin_inset Flex Code
2435 \begin_layout Plain Layout
2445 \begin_layout Standard
2447 \begin_inset Flex MenuItem
2450 \begin_layout Plain Layout
2451 Document\SpecialChar \menuseparator
2458 \begin_inset Flex MenuItem
2461 \begin_layout Plain Layout
2468 \begin_inset Flex MenuItem
2471 \begin_layout Plain Layout
2472 Sectioned bibliography
2478 Now you can insert multiple BibTeX bibliographies, one for each section
2479 of your bibliography.
2480 Returning to our example: Insert the BibTeX bibliography
2481 \begin_inset Flex Code
2484 \begin_layout Plain Layout
2490 and a second one for the database
2491 \begin_inset Flex Code
2494 \begin_layout Plain Layout
2501 You are free to use the same or different styles for each section.
2502 Additionally, you can chose if the bibliography section should contain
2504 \begin_inset Quotes eld
2507 all cited references
2508 \begin_inset Quotes erd
2511 of the specified database(s) (which is the default),
2512 \begin_inset Quotes eld
2515 all uncited references
2516 \begin_inset Quotes erd
2520 \begin_inset Quotes eld
2524 \begin_inset Quotes erd
2528 This might be useful if you would like to separate your bibliography into
2530 \begin_inset Quotes eld
2534 \begin_inset Quotes erd
2538 \begin_inset Quotes eld
2542 \begin_inset Quotes erd
2546 \begin_inset Quotes eld
2550 \begin_inset Quotes erd
2554 The titles for the sections can be added as ordinary sections or subsections.
2556 \begin_inset Flex Code
2559 \begin_layout Plain Layout
2565 removes the bibliography title, you have manually re-add that, too (as
2566 a chapter* or section*, for instance).
2569 \begin_layout Subsection
2570 Multiple Bibliographies
2573 \begin_layout Standard
2574 Multiple bibliographies, e.
2575 \begin_inset space \thinspace{}
2579 \begin_inset space \space{}
2582 a bibliography for each section or chapter of the document, are not supported
2585 \begin_inset Flex Code
2588 \begin_layout Plain Layout
2594 package, which is used for the creation of sectioned bibliographies in
2595 LyX (see the previous section), provides an easy way to solve this task,
2596 if you are willing to use some
2597 \begin_inset Flex MenuItem
2600 \begin_layout Plain Layout
2607 \begin_inset space ~
2611 \begin_inset CommandInset ref
2613 reference "sec:Inserting-TeX-Code"
2621 \begin_layout Plain Layout
2622 An alternative approach is to use the
2623 \begin_inset Flex Code
2626 \begin_layout Plain Layout
2633 \begin_inset Flex Code
2636 \begin_layout Plain Layout
2642 package, respectively.
2650 \begin_layout Standard
2652 \begin_inset Flex MenuItem
2655 \begin_layout Plain Layout
2656 Document\SpecialChar \menuseparator
2663 \begin_inset Flex MenuItem
2666 \begin_layout Plain Layout
2673 \begin_inset Flex MenuItem
2676 \begin_layout Plain Layout
2677 Sectioned bibliography
2683 In the document, you have to enclose the sections, which shall contain
2684 their own bibliography (including the BibTeX bibliography itself), between
2686 \begin_inset Flex Code
2689 \begin_layout Plain Layout
2698 \begin_inset Flex Code
2701 \begin_layout Plain Layout
2709 (those commands have to be inserted as TeX code).
2710 The bibliography will contain all references which have been cited in the
2712 \begin_inset Flex Code
2715 \begin_layout Plain Layout
2726 If you are using this approach, then every citation reference has to be
2728 \begin_inset Flex Code
2731 \begin_layout Plain Layout
2739 \begin_inset Flex Code
2742 \begin_layout Plain Layout
2751 \begin_layout Section
2755 \begin_layout Subsection
2759 \begin_layout Standard
2760 When you are working on a large file with many sections, it is often convenient
2761 to break up the document into several files, or perhaps you have something
2762 where a table may change from time to time, but the preceding text does
2764 In these cases, you should seriously consider using multipart documents.
2765 For example, scientific papers often have five major sections: the introduction
2766 , observations, results, discussion, and conclusion.
2767 Each of these could be its own separate LyX file, with one
2768 \begin_inset Quotes eld
2772 \begin_inset Quotes erd
2775 file which contains the title, authors, abstract, references, etc., plus
2776 the five included files.
2777 It is important to note that each of these files is a full LyX file which
2778 can be formatted and printed on its own, as well as included in a master
2780 Each of these files must have the same document class, however—don't attempt
2781 to mix book classes with article classes.
2782 You may also include LaTeX files; however, these files must not have their
2784 \begin_inset space \thinspace{}
2788 \begin_inset space \space{}
2791 everything up to and including the
2792 \begin_inset Flex Code
2795 \begin_layout Plain Layout
2804 \begin_inset Flex Code
2807 \begin_layout Plain Layout
2815 line must be deleted) or else errors will be generated when you try to
2819 \begin_layout Standard
2820 LyX allows you to include files quite easily with
2821 \begin_inset Flex MenuItem
2824 \begin_layout Plain Layout
2825 Insert\SpecialChar \menuseparator
2827 \begin_inset space ~
2836 When you click on this selection a small box is inserted into the file
2837 at the current cursor location.
2838 Clicking on the box raises a dialog which allows you to select the file
2839 to be included, and the method of its inclusion.
2843 \begin_layout Standard
2844 The file selection box should by now be obvious.
2845 The three inclusion methods are
2846 \begin_inset Quotes eld
2850 \begin_inset Quotes erd
2854 \begin_inset Quotes eld
2858 \begin_inset Quotes erd
2862 \begin_inset Quotes eld
2866 \begin_inset Quotes erd
2870 The difference between
2871 \begin_inset Quotes eld
2875 \begin_inset Quotes erd
2879 \begin_inset Quotes eld
2883 \begin_inset Quotes erd
2886 is really only meaningful to LaTeXperts, but the practical difference is
2887 that files which are
2888 \begin_inset Quotes eld
2892 \begin_inset Quotes erd
2895 are typeset beginning on a new page, while files which are
2896 \begin_inset Quotes eld
2900 \begin_inset Quotes erd
2903 are typeset starting on the current page.
2906 \begin_layout Standard
2907 Generally, the master file is converted into a full LaTeX file before typesettin
2908 g, while the included files are converted to LaTeX files which do not have
2909 all the preamble information.
2912 \begin_layout Standard
2914 \begin_inset Quotes eld
2918 \begin_inset Quotes erd
2921 included file allows you to include a file typeset exactly as it appears
2923 \begin_inset space \thinspace{}
2927 \begin_inset space \space{}
2931 \begin_inset Flex Code
2934 \begin_layout Plain Layout
2940 mode, with the characters set in a fixed-width typewriter font.
2941 Normally, spaces in this file are invisible, though two consecutive spaces
2942 are conserved, unlike LyX's normal treatment of spaces.
2943 However, setting the
2944 \begin_inset Flex MenuItem
2947 \begin_layout Plain Layout
2949 \begin_inset space ~
2953 \begin_inset space ~
2957 \begin_inset space ~
2965 checkbox typesets a mark to unambiguously define the presence of a space.
2969 \begin_layout Subsection
2970 Cross-References Between Files
2973 \begin_layout Standard
2974 \begin_inset Box Shadowbox
2984 height_special "totalheight"
2987 \begin_layout Plain Layout
2988 This section is somewhat out of date.
2989 Need to describe default master documents and how children are opened when
2999 \begin_layout Standard
3000 It is possible to set up cross-references between the different files.
3001 First, open all the files in question: let's call them A and B in a two
3002 file example, where B is included in A.
3003 Let's say you insert a label in A, then want to reference it in B.
3004 Open the cross-reference dialog in whilst in document B, and you can select
3006 \begin_inset Quotes eld
3010 \begin_inset Quotes erd
3016 \begin_layout Subsection
3017 Bibliography Lists in all Subdocuments
3020 \begin_layout Standard
3021 \begin_inset Box Frameless
3031 height_special "totalheight"
3034 \begin_layout Plain Layout
3035 This section also needs updating.
3036 There is now material about this on the wiki, and it could be copied here.
3044 \begin_layout Standard
3045 Copy the bibliography list with all entries to all subdocuments and transform
3047 This way LyX will find the
3048 \begin_inset Flex Code
3051 \begin_layout Plain Layout
3057 -files and you can easily insert references without making the bibliography
3061 \begin_layout Standard
3062 As the bibliography list is in a comment, LaTeX won't use use it and the
3063 references will look like this: [?], instead of like this: [1].
3064 One solution is to use the LaTeX-package
3065 \begin_inset Flex Code
3068 \begin_layout Plain Layout
3074 that will only include comments by processing the files separately.
3075 To do this, add in the LaTeX preamble of every subdocument the following:
3078 \begin_layout LyX-Code
3084 \begin_layout LyX-Code
3087 includecomment{comment}
3090 \begin_layout Standard
3092 \begin_inset Flex URL
3095 \begin_layout Plain Layout
3097 http://wiki.lyx.org/FAQ/Unsorted#toc31
3105 \begin_layout Section
3106 Fancy Headers and Footers
3109 \begin_layout Standard
3110 The default page layout is rather plain; for an
3111 \begin_inset Flex Code
3114 \begin_layout Plain Layout
3120 document class, all you get is a centered page number at the bottom of
3122 This document uses KOMA-script's book class, so it appears to be a bit
3124 But to really put on a show, you need to set the document page style to
3126 \begin_inset Quotes eld
3130 \begin_inset Quotes erd
3133 , as mentioned in the
3138 This section describes the LaTeX code you need to insert in your LaTeX
3139 preamble in order to get the desired effects.
3142 \begin_layout Standard
3143 For more information on fancy headers, see the
3144 \begin_inset Flex Code
3147 \begin_layout Plain Layout
3153 package documentation.
3155 \begin_inset Flex URL
3158 \begin_layout Plain Layout
3160 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3168 \begin_layout Standard
3169 The page header is divided into three fields, not surprisingly labeled
3170 \begin_inset Quotes eld
3174 \begin_inset Quotes erd
3178 \begin_inset Quotes eld
3182 \begin_inset Quotes erd
3186 \begin_inset Quotes eld
3190 \begin_inset Quotes erd
3194 The footer is also divided into these three fields.
3195 The LaTeX commands to set these fields in the simplest manner are
3196 \begin_inset Flex Code
3199 \begin_layout Plain Layout
3208 \begin_inset Flex Code
3211 \begin_layout Plain Layout
3220 \begin_inset Flex Code
3223 \begin_layout Plain Layout
3232 \begin_inset Flex Code
3235 \begin_layout Plain Layout
3244 Suppose you wish to put your name in the upper left hand corner of each
3246 Simply insert the following command in the preamble:
3249 \begin_layout Standard
3258 \begin_layout Standard
3259 You will now see your name in the upper left.
3260 If a field has a default entry that you would like to get rid of (often
3261 the page number appears in the central footer, simply include a command
3262 with a blank argument, e.
3263 \begin_inset space \thinspace{}
3269 \begin_layout Standard
3277 \begin_layout Standard
3278 Let's get really fancy: lets put the section number with the word
3279 \begin_inset Quotes eld
3283 \begin_inset Quotes erd
3287 \begin_inset space \thinspace{}
3291 \begin_inset space \space{}
3294 Section 3) in the upper left, the page number (e.
3295 \begin_inset space \thinspace{}
3299 \begin_inset space \space{}
3302 Page 4) in the upper right, your name in the lower left, and the date in
3304 The following commands should now appear in the preamble:
3307 \begin_layout Standard
3317 \begin_layout Standard
3325 \begin_layout Standard
3335 \begin_layout Standard
3344 \begin_layout Standard
3352 \begin_layout Standard
3362 \begin_layout Standard
3364 \begin_inset Flex Code
3367 \begin_layout Plain Layout
3376 \begin_inset Flex Code
3379 \begin_layout Plain Layout
3387 access LaTeX's section and page counters, and so print out the current
3388 section and page numbers.
3390 \begin_inset Flex Code
3393 \begin_layout Plain Layout
3401 simply prints out today's date.
3404 \begin_layout Standard
3405 The thicknesses of the horizontal rules drawn beneath the header and above
3406 the footer can also be modified.
3407 If you don't want one of the rules, set its thickness to 0.
3408 The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3414 \begin_inset Flex Code
3417 \begin_layout Plain Layout
3422 headrulewidth}{0.4pt}
3428 \begin_inset Flex Code
3431 \begin_layout Plain Layout
3436 footrulewidth}{0.4pt}
3441 to set the thicknesses.
3444 \begin_layout Standard
3445 You can switch the header/footer settings on and off for individual pages
3447 \begin_inset Flex Code
3450 \begin_layout Plain Layout
3453 thispagestyle{empty}
3459 \begin_inset Flex Code
3462 \begin_layout Plain Layout
3465 thispagestyle{plain}
3471 \begin_inset Flex Code
3474 \begin_layout Plain Layout
3477 thispagestyle{fancy}
3483 Simply insert them in the text on the page you want changed and mark them
3485 In fact, title pages are marked as plain by default, while following pages
3486 are marked fancy when using the global fancy setting.
3489 \begin_layout Standard
3490 As a final example, it is possible to include an image in the header or
3492 Suppose you want to put a company logo in the upper lefthand corner.
3493 You might try something like
3496 \begin_layout Standard
3505 includegraphics{logo.eps}}}
3508 \begin_layout Standard
3510 (you may need to preface this with
3511 \begin_inset Flex Code
3514 \begin_layout Plain Layout
3518 usepackage{graphics}
3523 if you don't include graphics elsewhere in your document).
3526 \begin_layout Section
3527 Itemize Bullet Selection
3528 \begin_inset CommandInset label
3537 \begin_layout Standard
3543 \begin_layout Subsection
3547 \begin_layout Standard
3548 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3549 Using this dialog you can easily specify what bullet shape to use at each
3550 level of an itemized list.
3551 These settings are document-wide so you won't be able to specify different
3552 sets of bullets for different paragraphs.
3556 \begin_layout Plain Layout
3557 Well, actually you can but you'll have to do it by hand.
3565 \begin_layout Subsection
3569 \begin_layout Standard
3570 Open the dialog by selecting the
3571 \begin_inset Flex MenuItem
3574 \begin_layout Plain Layout
3575 Document\SpecialChar \menuseparator
3581 menu item and then select the
3582 \begin_inset Flex MenuItem
3585 \begin_layout Plain Layout
3594 \begin_layout Standard
3595 The dialog provides you with a table of bullet shapes.
3596 A column of buttons on the left of the table provides access to the six
3597 different panels of bullet shapes.
3598 The row of buttons across the top is used to select which bullet depth
3600 A text entry under the table shows the currently selected bullet shape's
3601 LaTeX equivalent and this can be edited if desired.
3602 If you do modify the text you will also need to specify any needed packages
3603 in the LaTeX preamble.
3606 \begin_layout Standard
3607 The six panels are divided up by the packages they require.
3608 The following table shows the mappings from button name to LaTeX packages.
3611 \begin_layout Standard
3613 \begin_inset Tabular
3614 <lyxtabular version="3" rows="7" columns="2">
3615 <features tabularvalignment="middle">
3616 <column alignment="center" valignment="top" width="0pt">
3617 <column alignment="center" valignment="top" width="0pt">
3619 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3622 \begin_layout Plain Layout
3637 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3640 \begin_layout Plain Layout
3657 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3660 \begin_layout Plain Layout
3675 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3678 \begin_layout Plain Layout
3694 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3697 \begin_layout Plain Layout
3712 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3715 \begin_layout Plain Layout
3732 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3735 \begin_layout Plain Layout
3750 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3753 \begin_layout Plain Layout
3770 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3773 \begin_layout Plain Layout
3788 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3791 \begin_layout Plain Layout
3808 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3811 \begin_layout Plain Layout
3826 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3829 \begin_layout Plain Layout
3846 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3849 \begin_layout Plain Layout
3864 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3867 \begin_layout Plain Layout
3890 \begin_layout Standard
3891 LyX doesn't stop you using bullets from packages you don't have.
3892 If you get errors from LaTeX when you try to view or print the file, then
3893 it is likely you are missing a package.
3897 \begin_layout Plain Layout
3898 LyX doesn't restrict your use since you may be editing locally and exporting
3907 \begin_layout Subsection
3911 \begin_layout Standard
3912 Select which bullet depth you want to change then select the bullet shape
3914 Any changes will not be visible in LyX, but are visible when viewing the
3918 \begin_layout Standard
3919 You can reset a bullet shape to the default simply by clicking your right
3920 mouse button on the appropriate bullet depth button.
3924 \begin_layout Plain Layout
3929 want to have multiple sets of paragraphs with different sets of bullets
3930 in each, then you're going to have to get your hands dirty with TeX code.
3931 The bullet selection dialog can help though because it provides you with
3932 the LaTeX code for a wide range of bullet shapes.
3933 To make your own custom paragraphs you have the following options:
3936 \begin_layout Plain Layout
3940 \begin_layout Plain Layout
3956 \begin_layout Plain Layout
3960 \begin_layout Plain Layout
3982 \begin_layout Itemize
3983 Use the LaTeX command
3984 \begin_inset Flex Code
3987 \begin_layout Plain Layout
3995 to specify a new bullet shape for a given depth.
3996 You'll also need to save the current bullet shape so you can restore it
3998 In this itemized list the following LaTeX code was used to change the bullet
3999 used for the first depth.
4003 \begin_layout LyX-Code
4013 \begin_layout LyX-Code
4030 \begin_layout Itemize
4031 Note that the itemize depth is specified in Roman numerals as part of the
4041 \begin_layout Itemize
4045 \begin_layout Plain Layout
4058 Specify each individual entry by starting each item with the bullet shape
4059 enclosed in square brackets and set as
4060 \begin_inset Flex MenuItem
4063 \begin_layout Plain Layout
4070 For example, this item was started with
4071 \begin_inset Flex Code
4074 \begin_layout Plain Layout
4089 \begin_layout Plain Layout
4093 \begin_layout Plain Layout
4109 \begin_layout Plain Layout
4110 You'll also need to revert the labelitem back to its previous setting for
4111 the global bullet shape settings to remain in effect.
4112 The way used here was:
4115 \begin_layout LyX-Code
4130 \begin_layout Chapter
4131 LyX and the World Wide Web
4134 \begin_layout Standard
4135 LyX has long supported the export of documents to various web-friendly formats,
4137 Before verson 2.0, however, HTML export was always accomplished by the use
4138 of external converters.
4142 \begin_layout Plain Layout
4143 For details on the use of external converters with LyX, see the
4147 section of the Customization manual.
4152 These fall into two large groups: there are converters that use LaTeX as
4153 an intermediate format, such as
4154 \begin_inset Flex Code
4157 \begin_layout Plain Layout
4164 \begin_inset Flex Code
4167 \begin_layout Plain Layout
4174 \begin_inset Flex Code
4177 \begin_layout Plain Layout
4183 , relying upon LyX to produce the LaTeX; and there is a converter that works
4184 directly on LyX files,
4185 \begin_inset Flex Code
4188 \begin_layout Plain Layout
4195 All of these have different advantages and disadvantages.
4199 \begin_layout Standard
4200 The LaTeX-based converters have the advantage that, in principle, they know
4201 everything about the exported document that LaTeX does.
4202 Such converters do not care, for example, if a certain block of code was
4203 produced by LyX or was Evil Red Text.
4204 These converters know about
4205 \begin_inset Flex Code
4208 \begin_layout Plain Layout
4214 files, counters, and references, and can often make use of the
4215 \begin_inset Flex Code
4218 \begin_layout Plain Layout
4224 files generated by BibTeX.
4225 On the other hand, LaTeX is a very hard language to parse---it is sometimes
4226 said that only TeX itself understands TeX---and LaTeX-based converters
4227 will often choke on what seem to be quite simple constructs; complex ones
4228 can throw them completely, and as of this writing, for example, the
4232 manual will not export with
4233 \begin_inset Flex Code
4236 \begin_layout Plain Layout
4242 , though the others will.
4243 The other issue concerns how math is handled.
4244 These converters typically convert the formulae into little pictures that
4245 are then linked from the HTML document.
4246 Since these are actually generated by LaTeX, they are accurate.
4247 But they do not scale well, and just getting them to look as if they are
4248 actually meant to be in your document---so that the font sizes seem to
4249 be roughly the same---can be a challenge.
4252 \begin_layout Standard
4254 \begin_inset Flex Code
4257 \begin_layout Plain Layout
4264 \begin_inset CommandInset href
4266 name "http://elyxer.nongnu.org/"
4267 target "http://elyxer.nongnu.org/"
4271 ) solves some of these problems.
4272 In particular, the formulae it produces scale perfectly, since it renders
4273 math using a combination of HTML and CSS rather than converting the formulae
4275 But even moderately complex formula are rendered less well than with
4276 \begin_inset Flex Code
4279 \begin_layout Plain Layout
4285 ; this reflects the limitations of HTML.
4289 \begin_layout Plain Layout
4291 \begin_inset Flex Code
4294 \begin_layout Plain Layout
4300 can also use jsMath and MathJax for equations, but this setting is only
4301 available globally and requires one to have access to a server that runs
4307 More importantly (as of version 1.1.1, at least),
4308 \begin_inset Flex Code
4311 \begin_layout Plain Layout
4317 has limited support for math macros and no support for user-defined paragraph
4318 or character styles.
4319 These limitations make
4320 \begin_inset Flex Code
4323 \begin_layout Plain Layout
4329 unsuitable for many of the documents LyX users produce.
4330 In principle, of course, these problems could be solved, but the LyX developers
4331 have decided to follow a different path and have made LyX itself capable
4332 of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4336 \begin_layout Standard
4337 As of this writing, XHTML output remains under development and should probably
4339 \begin_inset Quotes eld
4343 \begin_inset Quotes erd
4350 \begin_layout Plain Layout
4352 \begin_inset Flex Code
4355 \begin_layout Plain Layout
4356 development/HTML.notes
4361 , which can be found in the LyX source tree or
4362 \begin_inset CommandInset href
4364 name "accessed online"
4365 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4369 , usually contains up-to-date information about the state of XHTML output.
4370 See also the list of XHTML bugs on
4371 \begin_inset CommandInset href
4373 name "the bug tracker"
4374 target "http://www.lyx.org/trac/query?status=reopened&status=assigned&status=new&max=0&component=xhtml+export&order=id&col=id&col=summary&col=reporter&col=keywords&keywords=%21%7Efixedintrunk&desc=1"
4383 Still, the developers have chosen this approach because it has several
4384 potential advantages over the other two.
4387 \begin_layout Standard
4388 These advantages are primarily due to the fact that the XHTML output routines,
4389 since they are part of LyX, know everything LyX knows about the document
4394 \begin_layout Plain Layout
4395 Another advantage is that, since these routines are internal to LyX, they
4396 are immune to changes in LyX's file format, or to changes in the semantics
4402 So they know about the table of contents (as displayed in the outline),
4403 about the counters associated with different paragraph styles, and about
4404 user-defined styles.
4405 The XHTML output routines know what LyX knows about internationalization,
4406 too, so they will output
4407 \begin_inset Quotes eld
4411 \begin_inset Quotes erd
4415 \begin_inset Quotes eld
4423 \begin_inset Quotes erd
4426 , depending upon the language in effect at the time.
4430 \begin_layout Standard
4431 Quite generally, the output routines know what LyX knows about document
4432 layout, that is, about how the document is to be rendered on screen.
4433 We use this information when we output the document as XHTML.
4438 generates CSS style information corresponding to the layout information
4439 it uses to render the document on screen: if section headings are supposed
4440 to be sans-serif and bold as seen in LyX, then (by default) they will be
4441 sans-serif and bold when viewed in a web browser, too.
4442 And this is true not just for pre-defined styles, like Section, but for
4443 any style, including user-defined styles.
4444 Indeed, the XHTML output routines make no distinction between user-defined
4445 paragraph and character styles and LyX's own pre-defined styles: in each
4446 case, everything LyX knows about the styles is contained in the layout
4448 And much the same is true as regards pre-defined textual insets, such as
4449 footnotes, and various custom insets.
4453 \begin_layout Standard
4454 The result is that XHTML output can be customized and extended in exactly
4455 the same way LaTeX output can be customized and extended: through layout
4457 See chapter five of the
4461 manual for the details.
4464 \begin_layout Standard
4465 The remainder of this chapter contains more detailed information on XHTML
4466 output, its limitations, and ways to work around those limitations.
4469 \begin_layout Section
4470 Math Output in XHTML
4473 \begin_layout Standard
4474 LyX offers four choices for how math is rendered.
4475 These have various advantages and disadvantages:
4478 \begin_layout Itemize
4480 \begin_inset Newline newline
4483 MathML is a dialect of XML designed specifically for mathematics on the
4484 web, and it typically renders very well in browsers that support it.
4485 The disadvantage is that not all browsers support MathML, and support is
4486 not complete even in the Gecko-based browsers, such as Firefox.
4487 \begin_inset Newline newline
4490 If LyX is unable to render a formula as MathML---for example, if the formula
4492 \begin_inset Flex Code
4495 \begin_layout Plain Layout
4501 package or ERT---then it will instead output the formula as an image.
4505 \begin_layout Itemize
4507 \begin_inset Newline newline
4511 \begin_inset Flex Code
4514 \begin_layout Plain Layout
4520 outputs math as HTML, styled by CSS.
4524 \begin_layout Plain Layout
4525 LyX has borrowed some of the CSS for its HTML output from
4526 \begin_inset Flex Code
4529 \begin_layout Plain Layout
4540 For simple formulae, this can work quite well, though with more complicated
4541 formulae it tends to break down.
4542 Still, this method has the advantage that it is very widely supported and
4543 so it may be appropriate for documents that contain only a little, fairly
4545 \begin_inset Newline newline
4548 If Lyx is unable to render a formula as HTML---for example, if the formula
4550 \begin_inset Flex Code
4553 \begin_layout Plain Layout
4559 package or ERT---then it will instead output the formula as an image.
4563 \begin_layout Itemize
4565 \begin_inset Newline newline
4569 \begin_inset Flex Code
4572 \begin_layout Plain Layout
4578 , LyX will output formulae as images, the very same images, in fact, that
4579 are used for instant preview.
4583 \begin_layout Plain Layout
4584 Instant preview does
4588 have to be on for images to be output, however.
4593 The advantage to this method is that the images are simply generated by
4594 LaTeX, so they are very accurate.
4595 The disadvantage, as mentioned earlier, is that these are bitmapped images,
4596 so they do not scale terribly well, and one cannot copy them, etc.
4597 (As of this writing, there are also problems about equation numbering.
4599 \begin_inset CommandInset href
4602 target "http://www.lyx.org/trac/ticket/6894"
4607 \begin_inset Newline newline
4610 The size of the images can be controlled by setting the
4611 \begin_inset Quotes eld
4615 \begin_inset Quotes erd
4619 \begin_inset Flex MenuItem
4622 \begin_layout Plain Layout
4623 Document\SpecialChar \menuseparator
4624 Settings\SpecialChar \menuseparator
4634 \begin_layout Plain Layout
4635 For those who want to know, this controls the resolution of the image in
4636 dots per inch and is based upon a default of 75 dpi.
4642 \begin_inset Newline newline
4645 If LyX for some reason fails to create an image for a formula (e.g., if a
4646 required LaTeX package is not installed), then it will fall back to outputing
4650 \begin_layout Itemize
4652 \begin_inset Newline newline
4655 Finally, LyX will happily output math as LaTeX.
4656 As well as being the output of last resort, this method can be used with
4658 \begin_inset CommandInset href
4661 target "http://www.math.union.edu/~dpvc/jsMath/"
4665 , which uses JavaScript to render LaTeX embedded in HTML documents.
4666 LyX wraps the LaTeX in either a
4667 \begin_inset Flex Code
4670 \begin_layout Plain Layout
4676 (for inline formulas) or
4677 \begin_inset Flex Code
4680 \begin_layout Plain Layout
4686 (for displayed formulas) with
4687 \begin_inset Flex Code
4690 \begin_layout Plain Layout
4696 , as is required for jsMath.
4699 \begin_layout Standard
4700 One of these output methods must be selected under
4701 \begin_inset Flex MenuItem
4704 \begin_layout Plain Layout
4705 Document\SpecialChar \menuseparator
4706 Settings\SpecialChar \menuseparator
4713 By default, LyX outputs MathML.
4714 This is a document-wide setting, therefore.
4717 \begin_layout Standard
4718 Eventually, LyX will offer the user the option to select an alternate output
4719 method for a particular inset, say, one that isn't being rendered very
4724 \begin_layout Plain Layout
4725 That said, since LyX falls back to images if the inset contains ERT, then
4726 one can force output as an image by putting some harmless ERT into the
4728 \begin_inset Formula $a=b\relax$
4739 \begin_layout Section
4740 Bibliography and Citations
4743 \begin_layout Standard
4744 XHTML output fully supports bibliographies and citations.
4748 \begin_layout Standard
4749 Citation labels are generated by the same machinery that generates LyX's
4750 on-screen labels, so the labels will look in the output much as they do
4751 in LyX, though better.
4752 If you are using numerical citations, then LyX will output numerical labels,
4753 such as [1] or [17], rather than simply showing the citation key in square
4754 brackets, as it does on-screen.
4755 If you are using author-year citations, then LyX will add lowercase letters
4756 to the years, just as BibTeX does, if it finds more than one citation for
4757 a given author-year combination.
4758 The labels will be printed with the bibliography entries.
4759 Note that there is, at present, no way to customize the appearance of the
4760 labels, for example, to choose between square brackets and parentheses.
4763 \begin_layout Standard
4764 Bibliography output is handled by the same machinery that handles the presentati
4765 on of reference information in the citation dialog, so you will see in the
4766 XHTML output pretty much what you would see if you were to look at a given
4767 entry in the citation dialog.
4768 The formatting can be customized in your layout file or, preferably, in
4774 manual for the details.
4777 \begin_layout Standard
4778 The main defect at present is that cross-referenced information is printed
4779 with every entry with which it is associated.
4780 So you can see things like this:
4785 \begin_inset Quotes eld
4788 Context and Logical Form
4789 \begin_inset Quotes erd
4794 Language in Context: Selected Essays
4796 (Oxford: Oxford University Press, 2007), pp.
4802 \begin_inset Quotes eld
4805 Semantics in Context
4806 \begin_inset Quotes erd
4811 Language in Context: Selected Essays
4813 (Oxford: Oxford University Press, 2007), pp.
4817 \begin_layout Standard
4818 This should be fixed before long.
4821 \begin_layout Standard
4822 There is no support at present for sectioned bibliographies.
4823 If you have multiple bibliographies, then LyX will print the same bibliography
4827 \begin_layout Section
4831 \begin_layout Standard
4832 LyX will happily export indexes as XHTML, but with certain limitations at
4836 \begin_layout Standard
4837 Index export will be most reliable when you do not attempt to use the fancy
4838 constructs that are described in the section on indexes in the
4846 \begin_layout Plain Layout
4847 The main issue here is that LyX itself does not really handle these.
4848 It just lets you enter what you would have to enter in raw LaTeX.
4853 We'll describe how they are handled using the subsection headings from
4857 \begin_layout Itemize
4858 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
4859 these, but the entries must be separated by
4860 \begin_inset Quotes eld
4864 \begin_inset Quotes erd
4867 , that is, there must be spaces around the exclamation point.
4868 This is because it is otherwise too difficult to check for escaped exclamation
4869 points, ones in math, and so forth.
4872 \begin_layout Itemize
4873 Page Ranges: There is no support at all for page ranges, since these make
4874 no sense with XHMTL.
4875 Instead, you will just get two index entries, one at either end.
4878 \begin_layout Itemize
4879 Cross-referencing: There is no support for cross-referencing.
4880 If LyX finds an entry containing the
4881 \begin_inset Quotes eld
4884 |see\SpecialChar \ldots{}
4886 \begin_inset Quotes erd
4889 construct, it is just dropped, and the rest is treated as an ordinary index
4893 \begin_layout Itemize
4894 Index Entry Order: LyX does support attempts to fix the sorting order.
4895 It will take what is before the first `@' it finds and use that for sorting,
4896 taking what follows the first `@' to be the actual entry.
4897 At present, LyX does not check for escaped `@', so do not try to index
4901 \begin_layout Itemize
4902 Index Entry Layout: You can format entries by using the text style dialog,
4903 or by using any other method available within LyX itself.
4904 There is no support for constructs like:
4905 \begin_inset Quotes eld
4909 \begin_inset Quotes erd
4913 Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
4914 and everything that follows it.
4917 \begin_layout Itemize
4918 Multiple Indexes: There is no support for multiple indexes.
4919 Rather, all index entries will be printed as one large index.
4920 To avoid our printing several versions of the index, we print only the
4921 main index, so make sure you have one.
4924 \begin_layout Section
4925 Nomenclature and Glossary
4928 \begin_layout Standard
4929 There is at present no support for glossaries.
4930 Adding it would be fairly trivial, and welcome.
4933 \begin_layout Chapter
4937 \begin_layout Section
4941 \begin_layout Standard
4942 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
4943 and retrieve information about the LyX internal state.
4944 This is only intended for advanced users, but they should find it useful.
4945 It is by writing to the LyX server, for example, that bibliography managers,
4946 such as JabRef, are able to
4947 \begin_inset Quotes eld
4951 \begin_inset Quotes erd
4957 \begin_layout Section
4958 Starting the LyX Server
4961 \begin_layout Standard
4962 The LyX server works through the use of a pair of named pipes.
4963 These are usually located in
4964 \begin_inset Flex Code
4967 \begin_layout Plain Layout
4973 , (except on Windows, where
4977 named pipes are special objects located in
4978 \begin_inset Flex Code
4981 \begin_layout Plain Layout
4993 ) and have the names
4994 \begin_inset Quotes eld
4998 \begin_inset Flex Code
5001 \begin_layout Plain Layout
5008 \begin_inset Quotes erd
5012 \begin_inset Quotes eld
5016 \begin_inset Flex Code
5019 \begin_layout Plain Layout
5026 \begin_inset Quotes erd
5030 External programs write into
5031 \begin_inset Flex Code
5034 \begin_layout Plain Layout
5040 and read back data from
5041 \begin_inset Flex Code
5044 \begin_layout Plain Layout
5051 The stem of the pipe names can be defined in the
5052 \begin_inset Flex MenuItem
5055 \begin_layout Plain Layout
5056 Tools\SpecialChar \menuseparator
5063 \begin_inset Flex Code
5066 \begin_layout Plain Layout
5067 "/home/myhome/lyxpipe"
5073 \begin_inset Flex Code
5076 \begin_layout Plain Layout
5090 on Windows (but any working path can be used).
5095 configure this manually in order for the server to start.
5098 \begin_layout Standard
5100 \begin_inset Flex Code
5103 \begin_layout Plain Layout
5110 \begin_inset Flex Code
5113 \begin_layout Plain Layout
5119 ' to create the pipes.
5120 If one of the pipes already exists, LyX will assume that another LyX process
5121 is already running and will not start the server.
5122 On POSIX (Unix like) systems, if for some other reason, an unused
5123 \begin_inset Quotes eld
5127 \begin_inset Quotes erd
5130 pipe is left in existence when LyX closes, then LyX will try to delete
5132 If this fails for some reason, you will need to delete the pipes manually
5133 and then restart LyX.
5134 On Windows, pipes are deleted by the OS on program termination or crash,
5136 \begin_inset Quotes eld
5140 \begin_inset Quotes erd
5143 pipes should not be possible.
5146 \begin_layout Standard
5147 To have several LyX processes with servers at the same time, you have to
5148 use different configurations, perhaps by using separate user directories,
5150 \begin_inset Flex Code
5153 \begin_layout Plain Layout
5159 file, for each process.
5162 \begin_layout Standard
5163 If you are developing a client program, you might find it useful to enable
5164 debugging information from the LyX server.
5165 Do this by starting LyX as
5166 \begin_inset Flex Code
5169 \begin_layout Plain Layout
5178 \begin_layout Standard
5179 You can find a complete example client written in C in the source distribution
5181 \begin_inset Flex Code
5184 \begin_layout Plain Layout
5185 development/lyxserver/server_monitor.c
5193 \begin_layout Standard
5194 Another useful tool is command-line based client you will find in
5195 \begin_inset Flex Code
5198 \begin_layout Plain Layout
5199 src/client/lyxclient
5207 \begin_layout Section
5208 Normal communication
5211 \begin_layout Standard
5212 To issue a LyX call, the client writes a line of ASCII text into the input
5214 This line has the following format:
5231 \begin_layout Description
5232 clientname is a name that the client can choose arbitrarily.
5233 Its only use is that LyX will echo it if it sends an answer—so a client
5234 can dispatch results from different requesters.
5237 \begin_layout Description
5238 function is the function you want LyX to perform.
5239 It is the same as the commands you'd use in the minibuffer.
5242 \begin_layout Description
5243 argument is an optional argument which is meaningful only to some functions
5245 \begin_inset Quotes eld
5249 \begin_inset Quotes erd
5252 LFUN will insert the argument as text at the cursor position).
5255 \begin_layout Standard
5256 The answer from LyX will arrive in the output pipe and be of the form
5273 \begin_layout Standard
5282 are just echoed from the command request, while
5286 is more or less useful information filled according to how the command
5287 execution worked out.
5288 Some commands, such as
5289 \begin_inset Quotes eld
5293 \begin_inset Quotes erd
5296 , will return information about the internal state of LyX, while other will
5297 return an empty data-response.
5298 This means that the command execution went fine.
5301 \begin_layout Standard
5302 In case of errors, the response from LyX will have this form
5319 \begin_layout Standard
5324 should contain an explanation of why the command failed.
5327 \begin_layout Standard
5331 \begin_layout LyX-Code
5332 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5333 \begin_inset Newline newline
5336 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5337 \begin_inset Newline newline
5340 read a <~/.lyxpipe.out
5341 \begin_inset Newline newline
5347 \begin_layout Section
5351 \begin_layout Standard
5352 LyX can notify clients of events going on asynchronously.
5353 Currently it will only do this if the user binds a key sequence with the
5355 \begin_inset Quotes eld
5359 \begin_inset Quotes erd
5363 The format of the string LyX sends is as follows:
5367 \begin_inset Flex Code
5370 \begin_layout Plain Layout
5381 \begin_layout Standard
5386 is the printed representation of the key sequence that was actually typed
5390 \begin_layout Standard
5391 This mechanism can be used to extend LyX's command set and implement macros.
5392 Bind some key sequence to
5393 \begin_inset Quotes eld
5397 \begin_inset Quotes erd
5401 Then start a client that listens on the output pipe, dispatches the command
5402 according to the sequence, and starts a function that may use LyX calls
5403 and LyX requests to issue a command or a series of commands to LyX.
5406 \begin_layout Section
5407 The simple LyX Server Protocol
5410 \begin_layout Standard
5411 LyX implements a simple protocol that can be used for session management.
5412 All messages are of the form
5425 \begin_layout Standard
5431 \begin_inset Quotes eld
5435 \begin_inset Quotes erd
5439 \begin_inset Quotes eld
5443 \begin_inset Quotes erd
5448 \begin_inset Quotes eld
5452 \begin_inset Quotes erd
5455 is received from a client, LyX will report back to inform the client that
5456 it's listening to it's messages, while
5457 \begin_inset Quotes eld
5461 \begin_inset Quotes erd
5464 sent from LyX will inform clients that LyX is closing.
5467 \begin_layout Section
5468 Reverse DVI/PDF search
5471 \begin_layout Standard
5472 Some DVI/PDF viewers
5476 \begin_layout Plain Layout
5477 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5478 Skim on Mac OSX and SumatraPDF on Windows.
5487 facility (also called
5492 This means that you can tell LyX to put the cursor to a specific line in
5493 the document by clicking at the respective position in the DVI/PDF output.
5494 To achieve this, the viewer must be able to communicate with LyX.
5495 This is done via the LyX server either by using the named pipe (
5499 ), or the UNIX domain socket (
5503 ) that LyX creates in its temporary directory (this is the way the
5504 \begin_inset Flex Code
5507 \begin_layout Plain Layout
5513 program communicates with LyX).
5514 In some cases, you need a helper script that mediates between the viewer
5515 and LyX, in others, the viewer can communicate with LyX directly.
5516 This depends on the selected viewer and on your operating system.
5517 The same applies to the way viewers need to be configured and the way the
5518 reverse search is actually performed.
5519 In what follows, we will thus describe how to setup reverse search for
5521 Before we turn to this, though, we will explain what needs to be done generally
5522 to enable reverse search in the DVI/PDF output.
5525 \begin_layout Subsection
5526 \begin_inset CommandInset label
5528 name "sub:rev-search"
5535 \begin_layout Standard
5536 In most cases LyX will do the work for you by enabling
5537 \begin_inset Flex MenuItem
5540 \begin_layout Plain Layout
5541 Document\SpecialChar \menuseparator
5542 Output\SpecialChar \menuseparator
5543 Synchronize with Output
5549 In such a case LyX will automatically insert the necessary SyncTeX macro
5550 (for PDF) or load the srcltx package (for DVI) respectively.
5551 This option can be easily reached also on
5552 \begin_inset Flex Code
5555 \begin_layout Plain Layout
5564 \begin_layout Standard
5565 If you need a different setting, you can select or input a custom macro
5566 from the drop down box just below
5567 \begin_inset Flex MenuItem
5570 \begin_layout Plain Layout
5571 Document\SpecialChar \menuseparator
5572 Output\SpecialChar \menuseparator
5573 Synchronize with Output
5581 \begin_layout Standard
5582 Please note that including the
5583 \begin_inset Flex Code
5586 \begin_layout Plain Layout
5593 \begin_inset Flex Code
5596 \begin_layout Plain Layout
5602 sometimes has an undesired impact on the typesetting.
5603 Thus, you should switch output synchronization off for the final typesetting
5605 \begin_inset Flex Code
5608 \begin_layout Plain Layout
5615 \begin_inset Flex Code
5618 \begin_layout Plain Layout
5627 \begin_layout Standard
5628 In case you need some more special settings that are not covered by the
5629 automatic settings, read the next section about how to set up output synchroniz
5631 If the automatic setup suits your needs, you can readily jump to section
5632 \begin_inset space ~
5636 \begin_inset CommandInset ref
5638 reference "sub:configuring-viewers"
5642 , where the necessary configuration steps in your viewer -- needed both
5643 with the automatic and the manual setup -- are described.
5646 \begin_layout Subsection
5650 \begin_layout Standard
5651 LaTeX provides several different methods for reverse search.
5652 Some are built-in in the
5653 \begin_inset Flex Code
5656 \begin_layout Plain Layout
5662 program, some are provided by external packages.
5663 Your choice depends on whether your LaTeX distribution already provides
5664 a given method (the built-in methods are rather new) and whether your viewer
5666 The available methods are described in the following.
5669 \begin_layout Subsubsection*
5670 Built-in DVI-search via src-specials (DVI only)
5673 \begin_layout Standard
5674 This method provides the DVI file with the necessary information for reverse
5676 It is available in LaTeX since quite some time (any somewhat recent LaTeX
5677 distribution should include it), and it works reliably.
5678 To enable it, change the
5679 \begin_inset Flex MenuItem
5682 \begin_layout Plain Layout
5687 \begin_layout Plain Layout
5700 \begin_inset Flex MenuItem
5703 \begin_layout Plain Layout
5708 \begin_layout Plain Layout
5715 eX (plain)->DraftDVI
5721 \begin_inset Flex MenuItem
5724 \begin_layout Plain Layout
5725 Preferences\SpecialChar \menuseparator
5726 File Handling\SpecialChar \menuseparator
5733 \begin_inset Flex Code
5736 \begin_layout Plain Layout
5737 latex -src-specials $$i
5743 If this doesn't work, check if your TeX engine needs different options
5744 (the syntax might differ in some distributions).
5747 \begin_layout Subsubsection*
5748 External Packages (PDFSync and scrltx)
5751 \begin_layout Standard
5760 provide reverse search facility for PDF output (via pdflatex) and DVI output,
5762 In order to enable it, load the packages in the LyX preamble:
5765 \begin_layout Itemize
5766 \begin_inset Flex Code
5769 \begin_layout Plain Layout
5777 for reverse PDF search,
5780 \begin_layout Itemize
5782 \begin_inset Flex Code
5785 \begin_layout Plain Layout
5788 usepackage[active]{srcltx}
5793 for reverse DVI search.
5796 \begin_layout Standard
5797 If you want to be able to perform both DVI and PDF reverse searches, you
5798 can also insert in the preamble the following lines
5801 \begin_layout LyX-Code
5805 \begin_inset Newline newline
5811 \begin_inset Newline newline
5817 \begin_inset Newline newline
5823 \begin_inset Newline newline
5828 usepackage[active]{srcltx}
5829 \begin_inset Newline newline
5837 \begin_layout Standard
5838 This way, you can preview the file as either DVI or PDF (pdflatex) and the
5839 right package will be used.
5842 \begin_layout Standard
5843 Note that PDFSync might affect the output layout of your document.
5844 It is therefore advised to disable PDFsync for final documents.
5847 \begin_layout Subsubsection*
5848 Built-in reverse search via SyncTeX (DVI and PDF)
5851 \begin_layout Standard
5853 \begin_inset Flex Code
5856 \begin_layout Plain Layout
5862 have built-in support for both PDF and DVI reverse search.
5867 facility is basically the result of the integration of the PDFSync package
5868 to the pdftex program and its merge with the
5873 You need at least TeXLive 2008 or a recent MikTeX distribution in order
5875 Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
5876 already provide SyncTeX support.
5879 \begin_layout Standard
5880 To enable SyncTeX for DVI output, change the
5881 \begin_inset Flex MenuItem
5884 \begin_layout Plain Layout
5889 \begin_layout Plain Layout
5902 \begin_inset Flex MenuItem
5905 \begin_layout Plain Layout
5910 \begin_layout Plain Layout
5917 eX (plain) -> DraftDVI
5923 \begin_inset Flex MenuItem
5926 \begin_layout Plain Layout
5927 Preferences\SpecialChar \menuseparator
5928 File Handling\SpecialChar \menuseparator
5935 \begin_inset Flex Code
5938 \begin_layout Plain Layout
5939 latex -synctex=1 $$i
5944 , and for PDF output, change the
5945 \begin_inset Flex MenuItem
5948 \begin_layout Plain Layout
5953 \begin_layout Plain Layout
5960 eX (pdflatex) -> PDF (pdflatex)
5966 \begin_inset Flex Code
5969 \begin_layout Plain Layout
5970 pdflatex -synctex=1 $$i
5976 Check the documentation of your viewer whether the viewer needs to be configure
5977 d for the use with SyncTeX.
5981 \begin_layout Plain Layout
5983 \begin_inset Flex Code
5986 \begin_layout Plain Layout
5992 option enables gzip compression.
5993 If your viewer does not support it, you should instead use
5994 \begin_inset Flex Code
5997 \begin_layout Plain Layout
6011 \begin_layout Subsection
6012 Configuring and using specific viewers
6013 \begin_inset CommandInset label
6015 name "sub:configuring-viewers"
6022 \begin_layout Subsubsection*
6023 Xdvi (all platforms)
6026 \begin_layout Standard
6028 \begin_inset Flex Code
6031 \begin_layout Plain Layout
6037 , you don't need to do anything else for performing a reverse DVI search,
6038 as LyX already provides the necessary hooks for automatically using the
6040 \begin_inset Flex Code
6043 \begin_layout Plain Layout
6050 Just setup your document as described above (reverse search is triggered
6051 by Ctrl-click or Alt-click on Mac OSX, respectively).
6054 \begin_layout Standard
6055 However, if for whatever reason you want to use the named pipe instead of
6056 the socket for communicating with LyX, simply change the DVI viewer in
6058 \begin_inset Flex MenuItem
6061 \begin_layout Plain Layout
6062 Preferences\SpecialChar \menuseparator
6063 File Handling\SpecialChar \menuseparator
6073 \begin_layout Plain Layout
6074 On Mac OSX you have to use
6075 \begin_inset Flex Code
6078 \begin_layout Plain Layout
6079 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6090 \begin_inset Flex Code
6093 \begin_layout Plain Layout
6094 xdvi -editor 'lyxeditor.sh %f %l'
6100 \begin_inset Flex Code
6103 \begin_layout Plain Layout
6109 is a suitable script.
6110 For example, a minimal shell script is the following one:
6113 \begin_layout LyX-Code
6115 \begin_inset Newline newline
6118 LYXPIPE="/path/to/lyxpipe"
6119 \begin_inset Newline newline
6122 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6123 \begin_inset Newline newline
6126 echo "$COMMAND" > "${LYXPIPE}".in || exit
6127 \begin_inset Newline newline
6130 read < "${LYXPIPE}".out || exit
6133 \begin_layout Standard
6135 \begin_inset Flex Code
6138 \begin_layout Plain Layout
6148 \begin_layout Plain Layout
6155 XServer pipe path specified in
6156 \begin_inset Flex MenuItem
6159 \begin_layout Plain Layout
6160 Preferences\SpecialChar \menuseparator
6170 \begin_layout Plain Layout
6172 \begin_inset Flex Code
6175 \begin_layout Plain Layout
6181 folder of a source distribution you can find a
6182 \begin_inset Flex Code
6185 \begin_layout Plain Layout
6191 script which is able to locate the
6195 based on your preferences.
6203 \begin_layout Subsubsection*
6207 \begin_layout Standard
6209 \begin_inset Flex Code
6212 \begin_layout Plain Layout
6213 /Applications/MacDviX_Folder/calleditor.script
6218 , add the following lines:
6221 \begin_layout LyX-Code
6226 \begin_layout Plain Layout
6233 X.app/Contents/MacOS/lyxeditor "$2" $1
6234 \begin_inset Newline newline
6240 \begin_layout Standard
6241 Modify the lines accordingly if you install LyX somewhere else than in the
6242 Applications folder.
6245 \begin_layout Standard
6246 Reverse search is triggered by Alt-click (OPTION-click).
6249 \begin_layout Subsubsection*
6253 \begin_layout Standard
6255 \begin_inset Flex Code
6258 \begin_layout Plain Layout
6259 open -a Skim.app $$i
6264 to the viewer setting in
6265 \begin_inset Flex MenuItem
6268 \begin_layout Plain Layout
6269 Preferences\SpecialChar \menuseparator
6270 File Handling\SpecialChar \menuseparator
6271 File formats\SpecialChar \menuseparator
6278 \begin_inset Flex MenuItem
6281 \begin_layout Plain Layout
6282 Skim\SpecialChar \menuseparator
6283 Preferences\SpecialChar \menuseparator
6293 \begin_layout Plain Layout
6303 \begin_layout Standard
6304 Reverse search is triggered by COMMAND-SHIFT-click
6307 \begin_layout Subsubsection*
6311 \begin_layout Standard
6313 \begin_inset Flex MenuItem
6316 \begin_layout Plain Layout
6317 Settings\SpecialChar \menuseparator
6318 Configure Okular\SpecialChar \ldots{}
6319 \SpecialChar \menuseparator
6326 \begin_inset Quotes eld
6330 \begin_inset Quotes erd
6334 \begin_inset Flex Code
6337 \begin_layout Plain Layout
6346 \begin_layout Standard
6347 Reverse search is triggered by SHIFT-click.
6350 \begin_layout Subsubsection*
6354 \begin_layout Standard
6355 Launch yap, choose its
6356 \begin_inset Flex MenuItem
6359 \begin_layout Plain Layout
6360 View\SpecialChar \menuseparator
6367 \begin_inset Quotes eld
6371 \begin_inset Quotes erd
6376 \begin_inset Quotes eld
6379 New\SpecialChar \ldots{}
6381 \begin_inset Quotes erd
6384 button and, in the window that opens, enter
6385 \begin_inset Quotes eld
6389 \begin_inset Quotes erd
6392 (or any other name you like) in the
6393 \begin_inset Quotes eld
6397 \begin_inset Quotes erd
6401 Now click on the button labeled
6402 \begin_inset Quotes eld
6405 \SpecialChar \ldots{}
6407 \begin_inset Quotes erd
6410 to open a file dialog and navigate to the directory containing the batch
6412 \begin_inset Flex Code
6415 \begin_layout Plain Layout
6423 \begin_inset Flex Code
6426 \begin_layout Plain Layout
6432 and then specify the program arguments as
6433 \begin_inset Flex Code
6436 \begin_layout Plain Layout
6444 \begin_inset Flex Code
6447 \begin_layout Plain Layout
6453 wrapper is used for communicating with LyX through the
6460 \begin_layout LyX-Code
6462 \begin_inset Newline newline
6465 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
6474 \begin_inset Newline newline
6488 \begin_layout Standard
6489 Make sure that the LyXServer pipe path you specified in LyX is
6490 \begin_inset Flex Code
6493 \begin_layout Plain Layout
6507 , otherwise change the
6508 \begin_inset Flex Code
6511 \begin_layout Plain Layout
6517 wrapper accordingly.
6520 \begin_layout Standard
6521 In yap, reverse search is triggered by double-click.
6524 \begin_layout Subsubsection*
6525 SumatraPDF (Windows)
6528 \begin_layout Standard
6529 In order to use SumatraPDF for inverse search, enter
6530 \begin_inset Flex Code
6533 \begin_layout Plain Layout
6534 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6539 in the viewer setting in
6540 \begin_inset Flex MenuItem
6543 \begin_layout Plain Layout
6544 Preferences\SpecialChar \menuseparator
6545 File Handling\SpecialChar \menuseparator
6546 File formats\SpecialChar \menuseparator
6553 \begin_inset Flex Code
6556 \begin_layout Plain Layout
6562 is the previous wrapper.
6563 If SumatraPDF.exe is not in your command PATH, use its full file name.
6566 \begin_layout Standard
6567 Reverse search is triggered by double-click.
6570 \begin_layout Subsubsection*
6574 \begin_layout Standard
6575 First of all, make sure that yap is your default DVI viewer in the Windows
6576 environment, then launch it, choose its
6577 \begin_inset Flex MenuItem
6580 \begin_layout Plain Layout
6581 View\SpecialChar \menuseparator
6588 \begin_inset Quotes eld
6592 \begin_inset Quotes erd
6597 \begin_inset Quotes eld
6600 New\SpecialChar \ldots{}
6602 \begin_inset Quotes erd
6605 button and, in the window that opens, enter
6606 \begin_inset Quotes eld
6610 \begin_inset Quotes erd
6613 (or any other name you like) in the
6614 \begin_inset Quotes eld
6618 \begin_inset Quotes erd
6622 Now click on the button labeled
6623 \begin_inset Quotes eld
6626 \SpecialChar \ldots{}
6628 \begin_inset Quotes erd
6631 to open a file dialog and navigate to the directory containing the
6632 \begin_inset Flex Code
6635 \begin_layout Plain Layout
6641 program (which is installed by default on Cygwin along with the LyX executable).
6643 \begin_inset Flex Code
6646 \begin_layout Plain Layout
6652 and then specify the program arguments as
6653 \begin_inset Flex Code
6656 \begin_layout Plain Layout
6663 In this way, you will be using the
6667 for communicating with LyX.
6668 If, for whatever reason, you want to use the
6673 \begin_inset Flex Code
6676 \begin_layout Plain Layout
6682 option and be sure to specify the LyXServer pipe path in the LyX preferences.
6685 \begin_layout Standard
6686 In yap, reverse search is triggered by double-click.
6689 \begin_layout Subsubsection*
6693 \begin_layout Standard
6694 In order to use SumatraPDF for inverse search, enter
6695 \begin_inset Flex Code
6698 \begin_layout Plain Layout
6704 in the viewer setting in
6705 \begin_inset Flex MenuItem
6708 \begin_layout Plain Layout
6709 Preferences\SpecialChar \menuseparator
6710 File Handling\SpecialChar \menuseparator
6711 File formats\SpecialChar \menuseparator
6718 \begin_inset Flex Code
6721 \begin_layout Plain Layout
6727 is the following script (to be placed in your command PATH,
6728 \begin_inset Flex Code
6731 \begin_layout Plain Layout
6737 being the best choice):
6740 \begin_layout LyX-Code
6742 \begin_inset Newline newline
6746 \begin_inset Newline newline
6749 SumatraPDF -inverse-search "lyxeditor -g %f %l" $(basename $1)
6752 \begin_layout Standard
6753 This wrapper script is needed because SumatraPDF is a native Windows application
6754 and does not understand the posix paths used by the Cygwin version of LyX.
6755 If SumatraPDF.exe is not in your command PATH, use its full posix path in
6758 \begin_inset Flex Code
6761 \begin_layout Plain Layout
6767 enables communication via the
6773 \begin_inset Flex Code
6776 \begin_layout Plain Layout
6782 option if you want to use the
6786 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6789 \begin_layout Standard
6790 Reverse search is triggered by double-click.
6793 \begin_layout Section
6797 \begin_layout Standard
6798 Forward search is, as the name implies, in a sense the
6799 \begin_inset Quotes eld
6803 \begin_inset Quotes erd
6807 It allows you to let the viewer jump to a given position from within LyX.
6808 If forward search is set up (as described in what follows), you can put
6809 the cursor anywhere in your LyX document, and hit
6810 \begin_inset Flex MenuItem
6813 \begin_layout Plain Layout
6814 Navigate\SpecialChar \menuseparator
6821 \begin_inset Flex MenuItem
6824 \begin_layout Plain Layout
6830 in the context menu via right mouse click), and then the viewer will jump
6831 to that position as well.
6832 This implies, of course, that your viewer supports this function.
6835 \begin_layout Standard
6836 To make forward search possible, you first need to provide the generated
6837 output PDF/DVI file with additional information about the TeX sources.
6838 This can be done via the methods described in the section
6839 \begin_inset CommandInset ref
6841 reference "sub:rev-search"
6848 \begin_layout Standard
6849 Additionally, you need to configure LyX for using your viewers in
6850 \begin_inset Flex MenuItem
6853 \begin_layout Plain Layout
6854 Tools\SpecialChar \menuseparator
6855 Preferences\SpecialChar \menuseparator
6856 Output\SpecialChar \menuseparator
6863 We provide a range of tested configurations for some viewers, which you
6864 can select from the drop down list.
6865 If none of these configurations suits you, you have to find out and enter
6866 a suitable configuration yourself.
6867 The definition syntax uses the following placeholders:
6870 \begin_layout Itemize
6872 \begin_inset Flex Code
6875 \begin_layout Plain Layout
6884 \begin_layout Itemize
6886 \begin_inset Flex Code
6889 \begin_layout Plain Layout
6895 : name of the (temporary) exported .tex file
6898 \begin_layout Itemize
6900 \begin_inset Flex Code
6903 \begin_layout Plain Layout
6909 : name of the exported output file (either dvi or pdf, depending on which
6910 one exists in the temporary directory)
6913 \begin_layout Standard
6914 Note that only some of the viewers provide full forward search functionality,
6915 among them yap, xdvi, okular and Sumatra PDF
6919 \begin_layout Plain Layout
6920 For Sumatra CMCDDE is needed --- downloadable from http://www.istri.fr/zip/CMCDDE.z
6927 While many of the widespread PDF viewers (most notably Adobe Reader) do
6928 not support forward search at all, some other viewers -- e.
6929 \begin_inset space \thinspace{}
6933 evince and xpdf -- allow at least to reload the document and jump to a
6934 specific page of the file, so you can at least navigate
6935 \begin_inset Quotes eld
6939 \begin_inset Quotes erd
6943 These latter functionality is provided by an external call of synctex (see
6944 the predefined example configurations).
6948 \begin_layout Standard
6949 Forward search works both with DVI and PDF output.
6950 LyX simply checks which preview format you have used before (i.
6951 \begin_inset space \thinspace{}
6954 e., which format is already there in the temporary directory) and chooses
6955 the appropriate configuration for the respective format.
6959 \begin_layout Chapter
6960 Special Document Classes
6963 \begin_layout Section
6967 \begin_layout Standard
6973 \begin_layout Subsection
6977 \begin_layout Standard
6978 This section describes how LyX can be used to write articles for submission
6979 to the scientific journal
6981 Astronomy and Astrophysics
6983 (www.edpsciences.fr/aa/
6984 \begin_inset Flex URL
6987 \begin_layout Plain Layout
6989 http://www.edpsciences.fr/aa/
6994 ) using Version 5.01 of the document class
6999 This package can be downloaded from the ftp site
7002 \begin_layout Standard
7003 \begin_inset VSpace medskip
7009 \begin_layout Standard
7011 \begin_inset Flex URL
7014 \begin_layout Plain Layout
7016 ftp://ftp.edpsciences.org/pub/aa/readme.html
7024 \begin_layout Standard
7025 \begin_inset VSpace medskip
7031 \begin_layout Standard
7032 A manual comes together with that package, and this text is not meant to
7033 replace the original manual but is merely a short guide in how to realize
7034 the correct form of your paper.
7038 \begin_layout Standard
7039 Please note that the publisher of the journal was changed from Springer
7040 to EDP Sciences starting January 1, 2001.
7041 That change involved also some slight changes to the style files, namely
7042 the removal of the thesaurus command.
7043 The LyX class aa supports the newest version of these style files, V 5.01.
7044 If you have an older version installed, please upgrade.
7045 For compatibility, the old (version 4) layout has been kept as
7050 Please refer to the comments in
7052 LyXDir/layouts/aapaper.layout
7057 \begin_layout Subsection
7061 \begin_layout Standard
7062 It is recommended you start from the example template distributed with LyX.
7063 If you are not using a template, note the following settings:
7066 \begin_layout Itemize
7073 Document\SpecialChar \menuseparator
7076 dialog (OK, that one was obvious).
7079 \begin_layout Itemize
7080 Don't change the option
7083 \begin_inset space ~
7093 The whole layout is done by the macros, you shouldn't change anything.
7096 \begin_layout Subsection
7100 \begin_layout Standard
7101 First thing to enter is the header information.
7102 It consists of seven entries, of which some are optional.
7106 \begin_layout Itemize
7114 \begin_layout Itemize
7122 \begin_layout Itemize
7130 \begin_layout Itemize
7138 \begin_layout Itemize
7143 : [optional] if more than one author: whom to contact for offprint requests.
7146 \begin_layout Itemize
7151 : [optional] mail address for contacts.
7154 \begin_layout Itemize
7162 Received: <date>; Accepted <date>
7165 \begin_layout Standard
7166 There is no need to issue the
7172 command, this is done automatically by LyX when the header is finished.
7173 Although the order of the single header entries doesn't matter it is advised
7174 to keep the above sequence, just to get the best optics and meets the layout
7175 of the real document.
7178 \begin_layout Standard
7179 If you want to place footnotes in the header block, e.
7180 \begin_inset space \thinspace{}
7184 \begin_inset space \space{}
7187 to state your present address, just use the standard footnote via the menu
7190 Insert\SpecialChar \menuseparator
7194 LyX will automagically use the term
7203 \begin_layout Standard
7204 In addition to these topics, the macros use three additional LaTeX commands
7205 that have no counterpart in LyX:
7208 \begin_layout Itemize
7215 to separate different names for more than one author and institute, respectivel
7219 \begin_layout Itemize
7226 to mark corresponding author/institute pairs.
7227 The institutes are numbered sequentially as they appear in the
7231 field, so you have to put a marker to each author.
7234 \begin_layout Itemize
7241 to supply an email address for fast contact.
7244 \begin_layout Standard
7245 In all cases, the appropriate command has to be entered in LyX and marked
7251 \begin_layout Subsection
7255 \begin_layout Standard
7256 The abstract should immediately follow the header block.
7257 With version 5 the abstract environment was changed to a command, and there
7258 is now a resctriction to only one paragraph.
7259 In addition, it should contain an entry with the keywords.
7260 This is not yet implemented for LyX, therefore you have to enter the LaTeX
7267 by hand and mark it as LaTeX code.
7268 Refer to the example paper.
7271 \begin_layout Subsection
7272 Supported environments
7275 \begin_layout Standard
7276 The A&A paper layout supports the following environments for structuring
7280 \begin_layout Itemize
7286 \begin_layout Itemize
7292 \begin_layout Itemize
7298 \begin_layout Itemize
7304 \begin_layout Itemize
7310 \begin_layout Itemize
7316 \begin_layout Itemize
7322 \begin_layout Itemize
7328 \begin_layout Itemize
7334 \begin_layout Itemize
7340 \begin_layout Itemize
7346 \begin_layout Itemize
7352 \begin_layout Subsection
7353 Commands not supported by LyX
7356 \begin_layout Standard
7357 Some commands are not yet supported by the
7362 Some have already been mentioned.
7363 For the sake of completeness, they are listed all together here:
7366 \begin_layout Itemize
7374 \begin_layout Itemize
7382 \begin_layout Itemize
7390 \begin_layout Itemize
7398 \begin_layout Itemize
7406 \begin_layout Itemize
7414 \begin_layout Itemize
7422 \begin_layout Itemize
7430 \begin_layout Standard
7431 If you want to use any of these commands, you have to enter them yourself.
7434 Do not forget to mark them as LaTeX code!
7437 \begin_layout Subsection
7438 Figure and Table Floats
7441 \begin_layout Standard
7442 LyX provides support for the necessary float environments
7444 figure, figure*, table
7450 , therefore we won't tell much about it here.
7454 \begin_inset space ~
7460 Just remember that tables should be left-aligned.
7461 For that, select the table and change the alignment in
7463 Edit\SpecialChar \menuseparator
7465 \begin_inset space ~
7471 \begin_layout Standard
7472 There is only one special thing: the figures with caption besides the figure.
7473 To create such a figure, you have to do the following:
7476 \begin_layout Enumerate
7477 Create a wide figure float:
7479 Insert\SpecialChar \menuseparator
7480 Float\SpecialChar \menuseparator
7483 , then right click in the figure and select
7489 \begin_inset space ~
7497 \begin_layout Enumerate
7498 Enter your caption text.
7501 \begin_layout Enumerate
7506 to move the cursor above the caption.
7509 \begin_layout Enumerate
7513 \begin_layout Enumerate
7514 Position the cursor behind the figure and insert a horizontal fill:
7516 Insert\SpecialChar \menuseparator
7518 \begin_inset space ~
7521 Character\SpecialChar \menuseparator
7523 \begin_inset space ~
7531 \begin_layout Enumerate
7532 Switch to LaTeX mode:
7535 \begin_inset space ~
7543 \begin_layout Enumerate
7553 Do not close the brace!
7556 \begin_layout Enumerate
7557 Position the cursor behind the caption text, switch to LaTeX mode and insert
7561 \begin_inset space ~
7573 \begin_layout Standard
7574 Also, refer to the figures in the example paper.
7577 \begin_layout Subsection
7581 \begin_layout Standard
7582 For submission, the paper has to be formated in a special double-spacing
7584 For this purpose, you have to give the option
7588 to the documentclass.
7589 This must be done using the extra class options field in the
7591 Document\SpecialChar \menuseparator
7595 Just enter the string
7602 \begin_layout Subsection
7606 \begin_layout Standard
7611 directory contains an example paper written with LyX.
7612 It is the example paper from the original macro package, translated to
7614 Use it for inspiration, and compare the original LaTeX code with LyX way
7618 \begin_layout Section
7622 \begin_layout Standard
7628 \begin_layout Subsection
7632 \begin_layout Standard
7633 AASTeX is a set of macros produced by the American Astronomical Society
7634 to facilitate electronic manuscript submission to the three journals they
7635 publish: the Astrophysical Journal (including the Letters and Supplement),
7636 the Astronomical Journal, and the Publications of the Astronomical Society
7638 LyX has proven to be an excellent tool for generating these documents,
7639 especially given its equation, citation, and figure handling capabilities.
7640 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7641 is the version described here, or higher.
7642 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7643 incompatible with LyX.
7644 The AASTeX package may be downloaded from the AASTeX Web site
7647 \begin_layout Standard
7648 \begin_inset VSpace medskip
7654 \begin_layout Standard
7656 \begin_inset Flex URL
7659 \begin_layout Plain Layout
7661 http://www.journals.uchicago.edu/AAS/AASTeX
7669 \begin_layout Standard
7670 \begin_inset VSpace medskip
7676 \begin_layout Standard
7677 A complete user guide is contained in that package and you should familiarize
7678 yourself with it thoroughly before embarking on writing a paper in LyX.
7679 LyX will not reduce the need to figure out all the AASTeX commands, it
7680 will only reduce the drudgery of typing everything in.
7681 It is your responsibility to ensure that the final exported LaTeX document
7682 conforms completely to the requirements of the journal to which you are
7683 submitting your paper.
7686 \begin_layout Subsection
7687 Starting a New Paper
7690 \begin_layout Standard
7691 I strongly suggest that you start with the AASTeX template file.
7694 File\SpecialChar \menuseparator
7701 , enter the new file name, then choose the
7706 This will show the most common fields found in a manuscript.
7707 Simply overwrite the existing text (including the brackets,
7711 ) with the correct information.
7712 Many of the AASTeX commands and environments can be implemented directly
7713 in LyX, but some cannot: most noticeably
7725 , which should stick out like a sore thumb if you actually just opened the
7727 For commands such as these, the LaTeX code must be entered directly and
7729 Such commands are referred to as TeX code, or Evil Red Text.
7730 I tried to minimize the amount of TeX code needed in an AASTeX document,
7731 but there is still a bit more required than any of us would like.
7734 \begin_layout Subsection
7735 Finishing Your Paper
7738 \begin_layout Standard
7739 When the paper is finished to your satisfaction and previews/prints correctly,
7741 \begin_inset Quotes eld
7745 \begin_inset Quotes erd
7748 actions which need to be done before you submit it to the journals.
7752 \begin_layout Enumerate
7753 Export your paper as a LaTeX file (
7755 File\SpecialChar \menuseparator
7756 Export\SpecialChar \menuseparator
7763 \begin_layout Enumerate
7768 file with your favorite text editor
7772 \begin_layout Enumerate
7773 remove the comment lines before the
7782 \begin_layout Enumerate
7787 usepackage...{fontenc}
7789 line if it appears (usually just after
7804 \begin_layout Enumerate
7805 remove everything between (and including) the
7817 commands, except for any commands you specifically put into the LaTeX preamble
7818 (which should appear immediately after the
7819 \begin_inset Quotes eld
7822 User specified LaTeX commands
7823 \begin_inset Quotes erd
7834 \begin_layout Enumerate
7835 Run the resulting file through LaTeX to make sure it still processes correctly.
7838 \begin_layout Enumerate
7839 Reread the journal requirements to make sure your filenames and formats
7843 \begin_layout Enumerate
7847 \begin_layout Subsection
7848 Comments On Specific Commands
7851 \begin_layout Standard
7852 I will not describe the detailed usage of the individual AASTeX commands:
7853 the AASTeX User Guide (
7857 ) gives a good description of each.
7858 Thus it's probably easiest for me to go down the list as found in the guide
7859 and offer comments where necessary.
7860 So let's begin \SpecialChar \ldots{}
7864 \begin_layout Subsubsection
7865 Things that work as expected
7868 \begin_layout Standard
7872 \begin_layout Plain Layout
7884 \begin_layout Standard
7885 Because they work as you might expect, I simply list them and the section
7986 begin{thebibliography}
7994 (2.13.2), all the cite commands and their variations (2.13.2), the generic
7995 graphicx figure commands (2.14.1),
8019 (2.15.4, amongst other places),
8046 \begin_layout Standard
8047 The following style options also work correctly:
8068 Simply put them in the
8074 Layout\SpecialChar \menuseparator
8080 \begin_layout Standard
8084 \begin_layout Plain Layout
8096 \begin_layout Subsubsection
8097 Things that work, but require more comment
8100 \begin_layout Standard
8101 The following items work, but require a little more discussion:
8104 \begin_layout Itemize
8105 These items are reserved for use by the journal editors, but you can put
8106 them into the LaTeX preamble if you feel compelled to do so:
8139 \begin_layout Itemize
8140 These items may be placed in the LaTeX preamble, and are included as blanks
8141 in the template file:
8162 \begin_layout Itemize
8169 (2.3) – can only be used
8170 \begin_inset Quotes eld
8174 \begin_inset Quotes erd
8177 , not in the middle of a paragraph.
8178 Use TeX code if you need to embed it.
8181 \begin_layout Itemize
8188 (2.3) – will have extra {} after it.
8189 This should not cause an error.
8192 \begin_layout Itemize
8199 (2.6) – can only be used
8200 \begin_inset Quotes eld
8204 \begin_inset Quotes erd
8207 , not in the middle of a paragraph.
8208 Use TeX code if you need to embed it.
8211 \begin_layout Itemize
8218 (2.8) – can't insert a cross-reference tag, you must type the tag name by
8222 \begin_layout Itemize
8236 \begin_layout Itemize
8243 (2.9) – will have extra {} after it.
8244 This should not cause an error.
8247 \begin_layout Itemize
8254 (2.11) – will have extra {} after it.
8255 This should not cause an error.
8258 \begin_layout Itemize
8265 (2.14.2) – you can insert an optional filename argument by placing the cursor
8266 at the beginning of the text and selecting
8268 Insert\SpecialChar \menuseparator
8273 \begin_inset Quotes eld
8277 \begin_inset Quotes erd
8280 inserts an optional argument of the type needed by
8287 Hopefully it will be renamed someday.
8290 \begin_layout Itemize
8303 for the catalog ID optional parameter
8306 \begin_layout Itemize
8319 for the catalog ID optional parameter
8322 \begin_layout Subsubsection
8323 Things not implemented, use TeX code
8326 \begin_layout Standard
8330 \begin_layout Plain Layout
8342 \begin_layout Standard
8365 setcounter{equation}
8367 (2.12), Journal name abbreviations (2.13.4),
8403 (2.15.4, insert it as the first element in the lefthand cell after where
8405 Don't use any of LyX's rules in the table),
8417 (2.15.5), much of Misc (2.17, except
8468 \begin_layout Standard
8472 \begin_layout Plain Layout
8484 \begin_layout Subsubsection
8485 Things that cannot be implemented
8488 \begin_layout Standard
8489 \SpecialChar \ldots{}
8490 at least in any meaningful sort of way, so I suggest ignoring them.
8491 They are the references environment (2.13.3), and the deluxetable environment
8493 If you really, really need to use deluxetable, I suggest editing it in
8494 a separate file with a text editor, then using
8496 Insert\SpecialChar \menuseparator
8498 \begin_inset space ~
8503 to include it in your LyX document.
8508 file to see an example of this.
8511 \begin_layout Subsection
8512 FAQs, Tips, Tricks, and Other Ruminations
8515 \begin_layout Subsubsection
8516 Getting LyX and AASTeX to cooperate
8519 \begin_layout Standard
8520 It can be a bit tricky to get LyX to recognize a new layout and document
8522 When all else fails, do this:
8525 \begin_layout Enumerate
8526 Make certain that LaTeX can find AASTeX.
8527 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8528 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
8535 \begin_layout Enumerate
8547 \begin_layout Enumerate
8550 Tools\SpecialChar \menuseparator
8553 in LyX, then restart LyX.
8556 \begin_layout Enumerate
8557 Open a regular new file, not from a template.
8558 Does AASTeX appear in the class list in
8560 Document\SpecialChar \menuseparator
8566 \begin_layout Standard
8567 If you get a warning from an existing AASTeX document about not being able
8568 to find the AASTeX layout or a message about
8569 \begin_inset Quotes eld
8572 You should not mix title layouts with normal ones
8573 \begin_inset Quotes erd
8576 , things haven't been installed correctly.
8579 \begin_layout Subsubsection
8580 LaTeX error processing a table
8583 \begin_layout Standard
8584 LyX, by default, attempts to center the table caption/title.
8585 This seems to produce a bad interaction in AASTeX so you should click somewhere
8586 in the caption/title, then select
8588 Edit\SpecialChar \menuseparator
8590 \begin_inset space ~
8604 This took care of it for me.
8607 \begin_layout Subsubsection
8611 \begin_layout Standard
8612 A couple of things: 1) I have noticed some funny spacing in the reference
8613 entries in the text.
8614 When you enter the bibliography item data, make sure their is
8618 space between the last author and the parenthesis setting off the year;
8622 \begin_inset space \thinspace{}
8626 \begin_inset space \space{}
8640 2) Entering the references at all is not obvious.
8641 The easiest thing is to start typing your first reference at the end of
8642 the document, then mark it as type
8647 That will put a small gray box in front of what you just typed.
8648 Click on the box to fill in the rest of the information.
8649 For new references, go to the end of an existing reference and press return.
8650 That will create a new line with its own box, etc.
8653 \begin_layout Subsubsection
8657 \begin_layout Standard
8658 Even though AASTeX provides its own figure commands (
8664 , for example), I much prefer LaTeX's standard figure commands (with the
8673 \begin_inset space ~
8676 commands as TeX code into a Figure Float box if you desire, but I never
8677 have much luck getting the layout right.
8678 With the standard graphics, LyX will insert a
8682 usepackage{graphicx}
8684 command into the LaTeX preamble and handle the figures in the standard
8685 LaTeX2e way, interspersing the figures in the text.
8686 I believe ApJ accepts figures exactly this way now; AJ might still use
8688 \begin_inset Quotes eld
8691 stack everything at the end
8692 \begin_inset Quotes erd
8698 \begin_layout Subsubsection
8699 Things I could have done, but didn't
8702 \begin_layout Standard
8704 \begin_inset Quotes eld
8708 \begin_inset Quotes erd
8711 things I could have implemented, but chose not to.
8712 For instance, I saw no point in double-spacing the text in the LyX window,
8713 even though it is double-spaced in the paper manuscript.
8714 Also, I chose not to make separate layouts for the preprint and preprint2
8716 Since I assume you will spend most of your time in the plain manuscript
8717 mode anyway, I decided not to chew up more disk space with this.
8721 \begin_layout Subsection
8725 \begin_layout Standard
8726 Your mileage may vary.
8727 I've now had papers published by both ApJ and AJ that have had 98% of the
8728 effort done in LyX; the last 2% was the LaTeX post-processing and a few
8730 I have had no trouble with the submission process, and I'm sure the journals
8731 were never aware that there might be a difference.
8732 So, go forth and publish!
8735 \begin_layout Section
8739 \begin_layout Standard
8742 David Johnson; updated by Richard Heck
8745 \begin_layout Standard
8746 \begin_inset VSpace bigskip
8752 \begin_layout Standard
8754 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8755 papers to be submitted to American Mathematical Society publications.
8756 The layouts are not tailored to a specific journal, but easily can be.
8757 You should refer to the AMS documentation for specific instructions for
8758 each journal (usually it will entail only changing a single line in the
8760 That documentation is available on the Web at
8761 \begin_inset Flex URL
8764 \begin_layout Plain Layout
8772 \begin_inset Flex URL
8775 \begin_layout Plain Layout
8777 ftp://ftp.ams.org/pub/tex/amslatex/
8783 These layouts are appropriate, and useful, for any mathematical writing.
8787 \begin_layout Standard
8788 There are two basic AMS LaTeX layouts:
8791 \begin_layout Itemize
8792 amsart: The standard AMS article format.
8795 \begin_layout Itemize
8796 amsbook: the standard AMS book (really, monograph) format.
8800 \begin_layout Standard
8801 The layouts themselves contain only the minimum necessary to use the AMS
8803 They do not, in particular, contain any of the `theorem' environments used
8804 for setting theorems, lemmas, and the like.
8805 These are contained, instead, in the
8806 \begin_inset Flex Code
8809 \begin_layout Plain Layout
8815 module, which is loaded by default when when you select one of the AMS
8817 (It can also be used with other classes and can be removed, if you would
8818 rather use something else.) Less commonly used environments are in the
8819 \begin_inset Flex Code
8822 \begin_layout Plain Layout
8823 Theorems (AMS-Extended)
8828 module, which must be loaded manually.
8831 \begin_layout Standard
8832 By default, theorems and the like are numbered consecutively throughout
8833 the document, but this may be modified by loading the module
8834 \begin_inset Flex Code
8837 \begin_layout Plain Layout
8838 Theorems (Order by Section)
8843 or, if you are using
8844 \begin_inset Flex Code
8847 \begin_layout Plain Layout
8854 \begin_inset Flex Code
8857 \begin_layout Plain Layout
8858 Theorems (Order by Chapter)
8864 These will number the results as
8865 \begin_inset Formula $n.m$
8868 , where the first number refers to the section (or chapter) and the second
8869 refers to the total number of results so far in that section (or chapter).
8870 Many environments are also available unnumbered.
8871 These are indicated by an asterisk at the end.
8872 If you happen to want
8876 unnumbered results, the module
8877 \begin_inset Flex Code
8880 \begin_layout Plain Layout
8886 provides that option.
8889 \begin_layout Standard
8890 Note that these modules do not
8894 to be used with the AMS classes.
8895 It is perfectly possible to use the
8896 \begin_inset Flex Code
8899 \begin_layout Plain Layout
8905 module, and the others mentioned, with other classes, such as
8906 \begin_inset Flex Code
8909 \begin_layout Plain Layout
8916 \begin_inset Flex Code
8919 \begin_layout Plain Layout
8926 \begin_inset Flex Code
8929 \begin_layout Plain Layout
8938 \begin_layout Subsection
8939 What these layouts provide
8942 \begin_layout Standard
8943 There is a long list of included environments provided by these layouts.
8944 In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
8945 variety of `theorem' environments.
8946 However, the AMS recommends the environments that are available in LyX.
8950 \begin_layout Standard
8951 The following environments—as well as the standard environments, such as
8953 \begin_inset Flex Noun
8956 \begin_layout Plain Layout
8963 \begin_inset Flex Noun
8966 \begin_layout Plain Layout
8973 \begin_inset Flex Noun
8976 \begin_layout Plain Layout
8983 \begin_inset Flex Noun
8986 \begin_layout Plain Layout
8993 \begin_inset Flex Noun
8996 \begin_layout Plain Layout
9003 \begin_inset Flex Code
9006 \begin_layout Plain Layout
9013 \begin_inset Flex Code
9016 \begin_layout Plain Layout
9025 \begin_layout Description
9026 Address This should be the author's permanent address.
9029 \begin_layout Description
9031 \begin_inset space ~
9034 Address This should be the author's temporary address at the time of submission,
9035 if different from the Address.
9038 \begin_layout Description
9039 Email Author's e-mail address
9042 \begin_layout Description
9043 URL Author's Web address, if desired.
9046 \begin_layout Description
9047 Keywords Key words or phrases used to identify specific topics discussed
9051 \begin_layout Description
9052 Subjectclass These refer to the AMS Subject Classifications, published and
9055 Mathematical Reviews
9058 These are also available online at the AMS cites listed above.
9061 \begin_layout Description
9065 \begin_layout Description
9069 \begin_layout Description
9073 \begin_layout Standard
9074 The following environments are provided by both the
9075 \begin_inset Flex Code
9078 \begin_layout Plain Layout
9085 \begin_inset Flex Code
9088 \begin_layout Plain Layout
9094 modules, in the latter case in both starred (unnumbered) and unstarred
9095 (numbered) versions.
9096 These same environments are provided only in the starred versions by the
9098 \begin_inset Flex Code
9101 \begin_layout Plain Layout
9110 \begin_layout Theorem
9111 This is typically used for the statements of major results.
9115 \begin_layout Corollary*
9116 This is used for statements which follow fairly directly from previous statement
9118 Again, these can be major results.
9123 These are smaller results needed to prove other statements.
9126 \begin_layout Proposition
9127 These are less major results which (hopefully) add to the general theory
9131 \begin_layout Conjecture
9132 These are statements provided without justification, which the author does
9133 not know how to prove, but which seem to be true (to the author, at least).
9136 \begin_layout Definition*
9137 Guess what this is for.
9138 The font is different for this environment than for the previous ones.
9142 \begin_layout Example*
9143 Used for examples illustrating proven results.
9146 \begin_layout Problem
9147 It's not really known what this is for.
9148 You should figure it out.
9151 \begin_layout Exercise*
9152 Write a description for this one.
9155 \begin_layout Remark
9156 This environment is also a type of theorem, usually a lesser sort of observation.
9159 \begin_layout Claim*
9160 Often used in the course of giving a proof of a larger result.
9164 Generally, these are used to break up long arguments, using specific instances
9170 The numbering scheme for cases is on its own, not together with other numbered
9176 At the end of this environment, a QED symbol (usually a square, but it can
9177 vary with different styles) is placed.
9178 If you want to have other environments within this one—for example, Case
9179 environments—and have the QED symbol appear only after them, then the other
9180 environments need to be nested within the proof environment.
9183 Nesting Environments
9189 for information on nesting.
9192 \begin_layout Standard
9193 And these environments are provided by
9194 \begin_inset Flex Code
9197 \begin_layout Plain Layout
9198 Theorems (AMS-Extended)
9206 \begin_layout Criterion*
9207 A required condition.
9210 \begin_layout Algorithm*
9211 A general procedure to be used.
9214 \begin_layout Axiom*
9215 This is a property or statement taken as true within the system being discussed.
9218 \begin_layout Condition*
9219 Sometimes used to state a condition assumed within the present context of
9224 Similar to a Remark.
9227 \begin_layout Notation*
9228 Used for the explanation of, yes, notation.
9231 \begin_layout Summary
9232 Do we really need to tell you?
9235 \begin_layout Acknowledgement*
9239 \begin_layout Conclusion*
9240 Sometimes used at the end of a long train of argument.
9244 Used in a way similar to Proposition, though perhaps lower on the scale.
9247 \begin_layout Standard
9248 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9250 They need to be available on your system in order to use these environments.
9253 \begin_layout Section
9261 \begin_layout Standard
9267 \begin_layout Subsection
9271 \begin_layout Standard
9272 These are the layout files for some of the journals of the American Geophysical
9274 It is assumed that you have both the AGU's own class files and AGUplus
9275 installed (everything to be found at
9276 \begin_inset Flex URL
9279 \begin_layout Plain Layout
9281 ftp://ftp.agu.org/journals/latex/journals
9289 \begin_layout Subsection
9293 \begin_layout Standard
9303 They are still called this in the LyX GUI, though their LaTeX equivalents
9304 in the AGU classes are
9315 \begin_layout Standard
9316 Newly defined styles are
9353 These are mostly manuscript attributes and defined in the AGU class documentati
9357 \begin_layout Standard
9358 I suspect this is still badly incomplete.
9361 \begin_layout Subsection
9365 \begin_layout Standard
9382 \begin_layout Subsection
9386 \begin_layout Itemize
9389 Journal of Geophysical Research
9398 \begin_layout Standard
9399 Add your own, it isn't so hard! Look at the
9410 \begin_layout Subsection
9411 Bugs and things to remember
9414 \begin_layout Standard
9415 In order to use the new layouts, you must remember to do the following for
9419 \begin_layout Enumerate
9425 This can be done in the
9427 Layout\SpecialChar \menuseparator
9432 Document\SpecialChar \menuseparator
9436 (AGU articles are always in English, right? So
9443 \begin_layout Enumerate
9453 (Yes, this is a bug.)
9456 \begin_layout Enumerate
9457 Make sure you use the
9461 bibliography style, by entering
9465 into the second field of the BibTeX inset.
9466 None of the standard styles will do.
9469 \begin_layout Section
9473 \begin_layout Standard
9479 \begin_layout Subsection
9483 \begin_layout Standard
9484 Broadway is for writing plays.
9485 The format is more decorative than Hollywood, and much less standardized.
9486 This format should be suitable for workshops.
9489 \begin_layout Subsection
9493 \begin_layout Standard
9494 The same as in Hollywood.
9497 \begin_layout Subsection
9501 \begin_layout Standard
9506 names as labels then cross-reference the label to insert the name.
9507 The cross-reference dialog will show the current cast of characters.
9510 \begin_layout Subsection
9511 Paper size and Margins
9514 \begin_layout Standard
9515 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9518 \begin_layout Subsection
9522 \begin_layout Standard
9523 The following environments are available.
9524 You can use broadway.bind to get the bind keys shown at the right.
9527 \begin_layout Itemize
9531 \begin_inset Newline newline
9536 You should not have to use this, but it is here for anything that does not
9540 \begin_layout Itemize
9544 \begin_inset space \hfill{}
9548 \begin_inset Newline newline
9553 Used to describe stage setting and the action.
9554 First use of speaker names in all CAPs.
9557 \begin_layout Itemize
9561 \begin_inset space \hfill{}
9565 \begin_inset Newline newline
9570 Automatically numbered.
9571 On screen it will be arabic, but will print as Roman.
9574 \begin_layout Itemize
9578 \begin_inset space \hfill{}
9582 \begin_inset Newline newline
9592 It is just centered text.
9595 \begin_layout Itemize
9599 \begin_inset space \hfill{}
9603 \begin_inset Newline newline
9608 Not automatically numbered.
9609 You supply the number.
9610 This is because I couldn't figure out how.
9613 \begin_layout Itemize
9617 \begin_inset space \hfill{}
9621 \begin_inset Newline newline
9626 A special case of Narrative to describe the setting and action as the curtain
9630 \begin_layout Itemize
9634 \begin_inset space \hfill{}
9638 \begin_inset Newline newline
9643 The speaker's (actor's) title, centered in all CAPS.
9646 \begin_layout Itemize
9650 \begin_inset space \hfill{}
9654 \begin_inset Newline newline
9659 Instructions to the speaker.
9660 The parentheses are automatically inserted.
9661 The ( will appear on screen, but both will be in the printed play.
9662 This environment is only used within
9669 \begin_layout Itemize
9673 \begin_inset space \hfill{}
9677 \begin_inset Newline newline
9682 What the Speaker says.
9685 \begin_layout Itemize
9689 \begin_inset space \hfill{}
9693 \begin_inset Newline newline
9698 The curtain comes down.
9701 \begin_layout Itemize
9705 \begin_inset space \hfill{}
9711 \begin_layout Itemize
9715 \begin_inset space \hfill{}
9721 \begin_layout Itemize
9725 \begin_inset space \hfill{}
9731 \begin_layout Standard
9735 \begin_layout Section
9739 \begin_layout Standard
9744 can be used to type letters according to German conventions.
9745 A template file is included in
9747 .../lyx/share/templates
9749 for you to use as a starting point.
9752 \begin_layout Section
9760 \begin_layout Standard
9766 \begin_layout Subsection
9770 \begin_layout Standard
9771 This is the layout file for the European Geophysical Society journals.
9776 can be downloaded from the web site of the EGS under
9777 \begin_inset Flex URL
9780 \begin_layout Plain Layout
9790 \begin_layout Subsection
9794 \begin_layout Standard
9797 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9805 The current layout file is unfortunately very unmodular and would benefit
9806 from using the various
9813 \begin_layout Section
9817 \begin_layout Standard
9823 \begin_layout Standard
9824 Elsevier Science Publishers B.V.
9825 provides a standard LaTeX document class (
9829 ) for submitting articles to their various journals.
9830 The style file can be downloaded directly from their web site:
9831 \begin_inset Flex URL
9834 \begin_layout Plain Layout
9836 http://www.elsevier.com/wps/find/authorsview.authors/latex
9842 Instructions are supplied along with the class file, which details the
9843 requirements of the publishers.
9844 LyX includes a package that allows for the use of this class, by a layout
9845 and a template file.
9846 Installation of the class file is the same as for any other LaTeX package;
9847 instructions are provided in the Elsevier documentation.
9850 \begin_layout Standard
9860 As the Elsevier class file is based mainly on the standard article class,
9861 most of the normal functionality is provided.
9862 The Elsevier class defines a number of mathematical environments, which
9863 are similar to the AMS environments.
9864 These commands are all described in the Elsevier documentation, and are
9868 \begin_layout Standard
9869 The easiest way to use the Elsevier style is to base documents on the included
9871 It is best not to use options such as fancy headings or the geometry package,
9872 as elements such as these are defined by Elsevier in their style file.
9873 Ideally, no extra packages except those mentioned in the Elsevier documentation
9875 Essentially, Elsevier require as
9876 \begin_inset Quotes eld
9880 \begin_inset Quotes erd
9883 a LaTeX file as possible, as their intention is to take the supplied file
9884 and replace the class file with one for the particular journal to which
9885 the paper has been submitted.
9886 This also means that not too much time should be spent on the formating
9888 When it comes to be published, this will change anyway.
9889 The rest of the usage for this layout is substantially the same as for
9890 the normal article class.
9891 For details of what Elsevier do and don't allow, refer to their documentation.
9894 \begin_layout Section
9900 \begin_inset CommandInset label
9909 \begin_layout Standard
9915 \begin_layout Subsection
9919 \begin_layout Standard
9920 This section describes how to use LyX to make slides for overhead projectors.
9921 There are two document classes that can do this: the default slides class
9927 This section documents the latter.
9930 \begin_layout Standard
9931 I'm going to say this again, nice and clear, so that there's no misunderstanding
9935 \begin_layout Standard
9936 \begin_inset VSpace bigskip
9942 \begin_layout Standard
9946 This section documents the class
9947 \begin_inset Quotes eld
9955 \begin_inset Quotes erd
9963 \begin_layout Standard
9964 \begin_inset VSpace bigskip
9970 \begin_layout Standard
9971 If you're looking for the documentation for
9972 \begin_inset Quotes eld
9980 \begin_inset Quotes erd
9984 \begin_inset space ~
9988 \begin_inset CommandInset ref
9990 reference "sec:slitex"
9995 If your machine doesn't have the
10000 \begin_inset Quotes eld
10008 \begin_inset Quotes erd
10011 ] installed, you'll probably have to use the default
10015 class, which isn't quite as good as
10020 \begin_layout Standard
10025 class is designed for use with version 2.1 of the
10029 LaTeX class file which is now an integral part of LaTeX2e.
10032 \begin_layout Subsection
10036 \begin_layout Standard
10037 Obviously, to use this document class, you need to select
10038 \begin_inset Quotes eld
10046 \begin_inset Quotes erd
10056 \begin_inset space ~
10062 There are some settings in the
10065 \begin_inset space ~
10070 dialog that you should know about that are specific to this class:
10073 \begin_layout Itemize
10074 Don't change the options
10085 \begin_inset space ~
10091 They're ignored by the
10098 \begin_layout Itemize
10099 The default font size is 20
10100 \begin_inset space \thinspace{}
10103 pt with the other options being 17
10104 \begin_inset space \thinspace{}
10108 \begin_inset space \thinspace{}
10112 \begin_inset space \thinspace{}
10118 \begin_layout Itemize
10119 The default font is
10127 but all math equations are still typeset in the usual roman font.
10130 \begin_layout Itemize
10135 supports A4 and Letter paper sizes as well as a special size for working
10137 \begin_inset space \thinspace{}
10141 It doesn't support A5, B5, legal or executive paper sizes.
10144 \begin_layout Itemize
10145 Don't bother changing the
10149 settings because they are ignored anyway.
10150 All floats appear where they are defined in the text.
10153 \begin_layout Itemize
10158 setting behaves a bit differently for this class.
10163 provides extensive footer and header capabilities including a user-defined
10166 \begin_inset space ~
10170 \begin_inset CommandInset ref
10172 reference "sec:foilfoot"
10177 The title page is treated differently to all other pages in the document
10186 has the logo centered at the bottom of the page (if one is defined).
10187 The possible page style choices and what they do are as follows:
10191 \begin_layout Labeling
10192 \labelwidthstring MMMMMMM
10199 The final output contains no page numbers, or other headers or footers
10200 (except footnotes of course).
10204 \begin_layout Labeling
10205 \labelwidthstring MMMMMMM
10212 The final output contains page numbers centered at the bottom of the page.
10213 No other headings or footers (other than footnotes).
10216 \begin_layout Labeling
10217 \labelwidthstring MMMMMMM
10222 Page numbers in lower right corner.
10223 Additional headers and footers are also shown.
10224 This is also the default.
10227 \begin_layout Labeling
10228 \labelwidthstring MMMMMMM
10233 Gives you access to the
10237 package although its use with
10241 is discouraged by the writer of the
10245 package because of some potential page layout clashes.
10249 \begin_layout Subsubsection
10253 \begin_layout Standard
10254 The following options may be used in the extra class options in the
10256 Document\SpecialChar \menuseparator
10262 \begin_layout Labeling
10263 \labelwidthstring MMMMMMx
10268 This sets up the page layout for 7.33
10269 \begin_inset space \thinspace{}
10273 \begin_inset space \thinspace{}
10276 in paper, which is about the same aspect ratio as a 35
10277 \begin_inset space \thinspace{}
10280 mm slide, making it a bit easier to work with this medium.
10283 \begin_layout Labeling
10284 \labelwidthstring MMMMMMx
10289 Places a rule across the page below the header on every page except the
10293 \begin_layout Labeling
10294 \labelwidthstring MMMMMMx
10299 Places a rule across the page above the footer on every page except the
10303 \begin_layout Labeling
10304 \labelwidthstring MMMMMMx
10309 This is automatically set each time you create a new
10318 to use the dvips driver to rotate those pages that are set as landscape
10322 \begin_layout Labeling
10323 \labelwidthstring MMMMMMx
10328 Simply changes the page dimensions to those of a landscape page but doesn't
10330 Thus if you use this option you need to use an external program to rotate
10331 each page or feed your paper through your printer as landscape.
10332 Note that this option effectively reverses the roles of the
10340 environments (don't worry these are described in the next section).
10343 \begin_layout Labeling
10344 \labelwidthstring MMMMMMx
10349 Equation numbers on the left.
10352 \begin_layout Labeling
10353 \labelwidthstring MMMMMMx
10358 Flush-left equations.
10361 \begin_layout Subsection
10362 Supported Environments
10365 \begin_layout Standard
10366 Most of the environments commonly supported in other classes are also supported
10372 There are several additional environments provided by
10376 as well as a couple added by LyX.
10377 The following environments are shared with other classes:
10380 \begin_layout Standard
10384 \begin_layout Plain Layout
10388 begin{multicols}{2}
10396 \begin_layout Itemize
10402 \begin_layout Itemize
10408 \begin_layout Itemize
10414 \begin_layout Itemize
10420 \begin_layout Itemize
10426 \begin_layout Itemize
10432 \begin_layout Itemize
10438 \begin_layout Itemize
10444 \begin_layout Itemize
10450 \begin_layout Itemize
10456 \begin_layout Itemize
10462 \begin_layout Itemize
10468 \begin_layout Itemize
10474 \begin_layout Itemize
10480 \begin_layout Itemize
10486 \begin_layout Itemize
10492 \begin_layout Itemize
10498 \begin_layout Itemize
10504 \begin_layout Standard
10508 \begin_layout Plain Layout
10520 \begin_layout Standard
10521 That is, all the major environments apart from the sectioning environments.
10522 Since foils are essentially self-contained sections, with a title and body,
10527 provides specific commands for starting new foils and these are:
10530 \begin_layout Itemize
10536 \begin_layout Itemize
10542 \begin_layout Standard
10543 LyX also provides slightly modified versions of these two environments called:
10546 \begin_layout Itemize
10552 \begin_layout Itemize
10555 ShortRotatefoilhead
10558 \begin_layout Standard
10559 and the differences will be explained in the next section.
10562 \begin_layout Standard
10563 Since foils are often used in presenting ideas or new theorems and such
10568 also provides a comprehensive box of goodies for presenting them:
10571 \begin_layout Standard
10575 \begin_layout Plain Layout
10579 begin{multicols}{2}
10587 \begin_layout Itemize
10593 \begin_layout Itemize
10599 \begin_layout Itemize
10605 \begin_layout Itemize
10611 \begin_layout Itemize
10617 \begin_layout Itemize
10623 \begin_layout Itemize
10629 \begin_layout Itemize
10635 \begin_layout Itemize
10641 \begin_layout Itemize
10647 \begin_layout Itemize
10653 \begin_layout Standard
10657 \begin_layout Plain Layout
10669 \begin_layout Standard
10670 The starred versions are unnumbered while the unstarred versions are numbered.
10671 There are also two list environments added by LyX and these are:
10674 \begin_layout Itemize
10680 \begin_layout Itemize
10686 \begin_layout Standard
10691 provides some powerful header and footer capabilities that are best set
10692 in the preamble although they may be set at any point in a document.
10693 If you want to change these settings in your document the best place to
10694 do so is at the very top of a foil, i.
10695 \begin_inset space \thinspace{}
10701 \begin_inset space \space{}
10706 straight after the foilhead.
10709 \begin_layout Standard
10710 For this purpose, the following command styles are provided [
10717 \begin_layout Standard
10721 \begin_layout Plain Layout
10725 begin{multicols}{2}
10733 \begin_layout Itemize
10737 \begin_inset space ~
10743 \begin_layout Itemize
10749 \begin_layout Itemize
10753 \begin_inset space ~
10759 \begin_layout Itemize
10763 \begin_inset space ~
10769 \begin_layout Itemize
10773 \begin_inset space ~
10780 \begin_layout Standard
10781 \begin_inset space ~
10788 \begin_layout Standard
10792 \begin_layout Plain Layout
10804 \begin_layout Standard
10805 There are also a few commands provided by
10809 that aren't directly supported by LyX but I'll tell you what they do and
10810 how to use them in section
10811 \begin_inset space ~
10815 \begin_inset CommandInset ref
10817 reference "sec:unsuppfoils"
10824 \begin_layout Subsection
10825 Building a Set of Foils
10828 \begin_layout Standard
10829 This section will give a simple introduction to using the different environments
10830 to build a set of foils.
10831 If you want to see an example set of foils, take a look at the
10835 file you find in LyX's
10842 \begin_layout Subsubsection
10843 Give It a Title Page
10846 \begin_layout Standard
10847 Unlike other classes that provide
10867 creates the title on a page of its own.
10868 If you leave out the
10872 environment LaTeX will substitute the current date (every time you regenerate
10876 \begin_layout Subsubsection
10880 \begin_layout Standard
10881 As I mentioned earlier, there are four ways of starting a new foil.
10882 For portrait foils you should use
10891 The difference between these two environments is the amount of space between
10892 the title of the foil (the foilhead) and the body of the foil.
10895 \begin_layout Standard
10896 Landscape foils are generated using the
10902 ShortRotatefoilhead
10905 Again the only difference is the spacing between foilhead and body.
10906 Both of the short versions have 0.5 inches less separation between the foilhead
10911 \begin_layout Standard
10912 One problem with the support for landscape foils is the requirement that
10913 you have to use the
10917 driver to generate the PostScript output otherwise the foils won't be rotated.
10918 It is possible to get landscape foils even if you haven't got the
10922 driver provided you can feed your foils sideways through your printer ;-)
10925 \begin_layout Subsubsection
10926 Theorems, Lemmas, Proofs and more
10929 \begin_layout Standard
10930 Due to a small bug in LyX you can't have two of the same type of these environme
10931 nts directly following each other.
10932 They must be separated by something.
10933 If you try, you will just be extending the previous environment as if you
10934 had merged the two environments together.
10935 So, how do you get around this problem? The simplest option is to insert
10936 some text between the two environments or add a
10940 environment between the two with just a
10941 \begin_inset Quotes eld
10949 \begin_inset Quotes erd
10953 This will force LyX to produce two separate environments and hence the
10954 correct LaTeX output.
10955 An example is provided in the example file included with the LyX distribution.
10956 Remember, this problem only occurs if you are trying to place two of the
10957 same type of theorem-like environments one directly after the other.
10960 \begin_layout Subsubsection
10964 \begin_layout Standard
10965 You get all the commonly supported list styles found in other classes as
10966 well as two new ones.
10967 I'll only describe the new ones here.
10968 If you want to find out more about the other list environments check out
10974 If you intend to use itemized lists you might also want to read about the
10978 \begin_inset space ~
10982 \begin_inset space ~
10987 dialog described above in section
10988 \begin_inset space ~
10992 \begin_inset CommandInset ref
10994 reference "sec:bullet"
11001 \begin_layout Standard
11002 The two new list styles,
11010 , are designed to make it easier for you to create lists of do's and don'ts
11011 or right and wrong by providing dedicated environments that use a tick
11012 or a cross as the label of the list.
11013 These lists are in fact dedicated variants of the
11018 They do however require that you have the
11022 packages installed.
11025 \begin_layout Subsubsection
11029 \begin_layout Standard
11034 redefines the floating tables and figures so that they appear exactly where
11035 they are in the text rather than pushing them to the top of the page or
11036 to some user specified location.
11037 In fact if you change the float placement settings they are simply ignored.
11040 \begin_layout Subsubsection
11041 Page Headers and Footers
11042 \begin_inset CommandInset label
11044 name "sec:foilfoot"
11051 \begin_layout Standard
11055 \begin_inset space ~
11064 are two commands used to control the left-footer text string.
11065 The first is meant to allow you to include a graphic logo on your foils
11067 \begin_inset Quotes eld
11075 \begin_inset Quotes erd
11079 While the second is meant to provide a classification for the audience,
11083 \begin_inset space \thinspace{}
11089 \begin_inset space \space{}
11093 It is empty by default.
11096 \begin_layout Standard
11097 The remaining page corners can be filled by
11100 \begin_inset space ~
11105 (which defaults to page numbers),
11108 \begin_inset space ~
11116 \begin_inset space ~
11124 \begin_layout Subsection
11130 \begin_inset CommandInset label
11132 name "sec:unsuppfoils"
11139 \begin_layout Standard
11140 All the commands mentioned below need to be set in a
11148 within another environment.
11151 \begin_layout Subsubsection
11155 \begin_layout Standard
11156 All lengths are adjusted using the
11179 should be replaced by the name given to the length you want to change and
11184 is the length value.
11185 All lengths should be specified in units of length such as inches (
11197 ) or relative to some document or font-based length such as
11207 \begin_layout Standard
11208 It's possible to change the spacing between a foilhead and the body of the
11209 foil by adjusting the length specified by
11216 For example, to make
11221 \begin_inset space \space{}
11224 in closer to their bodies put the following in the preamble:
11230 foilheadskip}{-0.5in}
11233 \begin_layout Standard
11234 The spacings around floats can be adjusted by setting these lengths:
11237 \begin_layout Labeling
11238 \labelwidthstring MMMMMMMMMMM
11245 Separation between the text and the top of the float
11248 \begin_layout Labeling
11249 \labelwidthstring MMMMMMMMMMM
11256 Separation between the float and the caption
11259 \begin_layout Labeling
11260 \labelwidthstring MMMMMMMMMMM
11267 Separation between the caption and the following text
11270 \begin_layout Labeling
11271 \labelwidthstring MMMMMMMMMMM
11278 You can make the captions narrower than the surrounding text by adjusting
11280 Best done relative to
11289 \begin_layout Standard
11290 There are also several title page related lengths that you may find useful
11291 if you have a long title or several authors:
11294 \begin_layout Labeling
11295 \labelwidthstring MMMMMMMMMMM
11302 Separation from headers to
11307 \begin_layout Labeling
11308 \labelwidthstring MMMMMMMMMMM
11326 \begin_layout Labeling
11327 \labelwidthstring MMMMMMMMMMM
11341 \begin_layout Labeling
11342 \labelwidthstring MMMMMMMMMMM
11358 \begin_layout Labeling
11359 \labelwidthstring MMMMMMMMMMM
11375 \begin_layout Standard
11376 The last length related command affects all the list environments.
11387 a list environment then all the vertical spacing between the list items
11389 Note that this is a command not a length so it doesn't require
11395 like the stuff mentioned above.
11398 \begin_layout Subsubsection
11399 Headers and Footers
11402 \begin_layout Standard
11415 commands control whether the logo in the
11419 definition appear on a given page.
11426 in the preamble then none of the foils will have the logo on them.
11427 If you don't want the logo on a particular page place the
11433 directly after the foilhead of that page and the
11439 directly after the next foilhead.
11442 \begin_layout Standard
11443 If you decide to use the
11447 page style setting in the
11450 \begin_inset space ~
11455 dialog you should probably add
11465 to your preamble so headers and footers on landscape pages are correctly
11466 placed when rotated.
11467 This is due to some clashes between the page layouts provided by the
11478 \begin_layout Section
11479 Hollywood (Hollywood spec scripts)
11482 \begin_layout Standard
11488 \begin_layout Subsection
11492 \begin_layout Standard
11493 Getting the format of a Hollywood script right is a
11494 \begin_inset Quotes eld
11498 \begin_inset Quotes erd
11501 It is designed to make the readers focus on content and to be easy and
11502 familiar for the actors to read.
11503 Each page of a script should be one minute of film.
11504 Nothing goes in a script that you cannot see or hear on screen.
11505 The courier 12 pt font should be used throughout.
11509 \begin_layout Subsection
11513 \begin_layout Standard
11514 Speakers' lines should NEVER break in mid-sentence.
11515 If a speaker's lines continue over a page break, repeat the
11519 title followed by (Cont'd).
11522 \begin_layout Subsection
11526 \begin_layout Standard
11531 names as labels then cross-reference the label to insert the name.
11532 The cross-reference dialog will show the current cast of characters.
11533 You can use this to insert the speaker name in narratives also.
11536 \begin_layout Subsection
11537 Paper size and Margins
11540 \begin_layout Standard
11541 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11544 \begin_layout Subsection
11548 \begin_layout Standard
11549 The following environments are available.
11550 You can use hollywood.bind to get the bind keys shown at the right.
11553 \begin_layout Itemize
11557 \begin_inset Newline newline
11562 Used where nothing else works.
11566 \begin_layout Itemize
11572 \begin_inset space \hfill{}
11580 \begin_inset Newline newline
11583 Usually followed by something like
11584 \begin_inset Quotes eld
11587 on Sally waking up.
11588 \begin_inset Quotes erd
11594 \begin_layout Itemize
11598 \begin_inset space \hfill{}
11602 \begin_inset Newline newline
11607 Introduces a new INTERIOR camera set-up.
11608 Always followed by DAY or NIGHT, or something similar to define the lighting
11610 Everthing on this line in CAPS.
11613 \begin_layout Itemize
11617 \begin_inset space \hfill{}
11621 \begin_inset Newline newline
11626 Introduces a new EXTERIOR camera set-up.
11627 Everthing on this line in CAPS.
11630 \begin_layout Itemize
11634 \begin_inset space \hfill{}
11638 \begin_inset Newline newline
11643 The character speaking.
11646 \begin_layout Itemize
11650 \begin_inset space \hfill{}
11654 \begin_inset Newline newline
11659 Instructions to the speaker.
11660 The () are automatically inserted, but only the ( will show in LyX.
11661 Both will be printed.
11664 \begin_layout Itemize
11668 \begin_inset space \hfill{}
11672 \begin_inset Newline newline
11684 \begin_layout Itemize
11688 \begin_inset space \hfill{}
11692 \begin_inset Newline newline
11697 Camera movement instruction.
11699 \begin_inset space \thinspace{}
11703 \begin_inset space \space{}
11709 \begin_layout Itemize
11713 \begin_inset space \hfill{}
11719 \begin_layout Itemize
11723 \begin_inset space \hfill{}
11729 \begin_layout Itemize
11733 \begin_inset space \hfill{}
11739 \begin_layout Itemize
11743 \begin_inset space \hfill{}
11749 \begin_layout Subsection
11753 \begin_layout Itemize
11757 \begin_layout Itemize
11761 \begin_layout Itemize
11763 \begin_inset space \thinspace{}
11770 \begin_layout Itemize
11775 \begin_layout Itemize
11776 PAN — camera movement
11779 \begin_layout Itemize
11780 INSERT — cut to close-up of
11783 \begin_layout Section
11787 \begin_layout Standard
11790 Panayotis Papasotiriou
11793 \begin_layout Subsection
11797 \begin_layout Standard
11798 The ijmpc package is a set of macros that facilitates electronic manuscript
11801 International Journal of Modern Physics C
11804 Similarly, the ijmpd package is for creating manuscripts to be submitted
11807 International Journal of Modern Physics D
11810 Both journals are published by World Scientific.
11811 The corresponding document classes are named
11820 These files, together with instructions for the authors, can be downloaded
11822 \begin_inset Flex URL
11825 \begin_layout Plain Layout
11827 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11833 \begin_inset Flex URL
11836 \begin_layout Plain Layout
11838 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11844 Both packages are modified versions of the standard
11845 \begin_inset Quotes eld
11849 \begin_inset Quotes erd
11852 package, and they are almost (but not exactly) identical.
11853 Most of their features are supported by LyX.
11854 I have used LyX successfully to write articles submitted to both journals
11855 without any problem.
11858 \begin_layout Subsection
11862 \begin_layout Standard
11863 As usual, the easiest way to write a paper is to start with a template.
11866 File\SpecialChar \menuseparator
11885 This will give an (almost) empty document that includes the most common
11886 fields found in a manuscript.
11887 Simply overwrite the existing text (including the brackets,
11892 You should keep in mind the following remarks.
11895 \begin_layout Enumerate
11896 LyX won't let you change the font size and the page style of the document,
11897 because such modifications are not allowed by both packages.
11900 \begin_layout Enumerate
11901 The language of the document should not be changed.
11902 Before previewing your paper, be sure that the babel package is not used.
11903 To do this, click on
11905 Tools\SpecialChar \menuseparator
11916 checkbox in the language settings, and click on
11924 , if you wish to make this change permanent).
11927 \begin_layout Enumerate
11929 \begin_inset Quotes eld
11933 \begin_inset Quotes erd
11936 style must be used to define keywords.
11939 \begin_layout Enumerate
11940 The ijmpc package provides a style named
11941 \begin_inset Quotes eld
11944 Classification Codes
11945 \begin_inset Quotes erd
11948 , which can be used to define classification codes, such as PACS numbers.
11949 Note that this facility is not supported by the ijmpd package.
11952 \begin_layout Enumerate
11953 Several new environments are available:
11954 \begin_inset Quotes eld
11958 \begin_inset Quotes erd
11962 \begin_inset Quotes eld
11966 \begin_inset Quotes erd
11970 \begin_inset Quotes eld
11974 \begin_inset Quotes erd
11978 \begin_inset Quotes eld
11982 \begin_inset Quotes erd
11986 \begin_inset Quotes eld
11990 \begin_inset Quotes erd
11994 \begin_inset Quotes eld
11998 \begin_inset Quotes erd
12002 \begin_inset Quotes eld
12006 \begin_inset Quotes erd
12010 \begin_inset Quotes eld
12014 \begin_inset Quotes erd
12018 \begin_inset Quotes eld
12022 \begin_inset Quotes erd
12026 \begin_inset Quotes eld
12030 \begin_inset Quotes erd
12034 \begin_inset Quotes eld
12038 \begin_inset Quotes erd
12042 \begin_inset Quotes eld
12046 \begin_inset Quotes erd
12050 \begin_inset Quotes eld
12054 \begin_inset Quotes erd
12058 \begin_inset Quotes eld
12062 \begin_inset Quotes erd
12066 Their use is more or less obvious.
12067 LyX supports all these environments; it will use the proper label, text
12068 style, and numbering scheme for each of them.
12071 \begin_layout Enumerate
12072 Both packages use basic citations; the natbib package should not be used.
12073 In LyX, citation references are shown as usual; in the output, citations
12074 are shown as superscripts.
12075 If you want to use a citation as normal text, you should use the
12080 \begin_inset space \thinspace{}
12084 \begin_inset space \space{}
12088 \begin_inset Quotes eld
12092 \begin_inset space \space{}
12102 \begin_inset Quotes erd
12108 \begin_layout Enumerate
12110 \begin_inset Quotes eld
12114 \begin_inset Quotes erd
12117 section in both packages.
12118 To put acknowledgments, just use the
12119 \begin_inset Quotes eld
12123 \begin_inset Quotes erd
12129 \begin_layout Enumerate
12130 Appendices may be added to the paper,
12134 the Acknowledgments and
12139 LyX provides a special environment, called
12140 \begin_inset Quotes eld
12144 \begin_inset Quotes erd
12147 which marks the beginning of the appendices.
12148 This environment should be left blank; it just sends a LaTeX command, but
12149 nothing is really printed.
12151 \begin_inset Quotes eld
12155 \begin_inset Quotes erd
12158 is printed with blue letters, as a signal that all sections after that
12159 point are appendices.
12160 To write an appendix, use the
12161 \begin_inset Quotes eld
12165 \begin_inset Quotes erd
12169 LyX will number each appendix with capital letters, as required by both
12172 \begin_inset Quotes eld
12176 \begin_inset Quotes erd
12183 be present before the first appendix; if not, all appendices will be numbered
12184 as normal sections in the output.
12187 \begin_layout Enumerate
12188 The ijmpc and the ijmpd packages use the
12192 command to implement table captions.
12193 As a result, a table created by LyX is printed correctly, but its caption
12195 However, you can use some TeX code to overcome this problem, so that captions
12196 are printed as expected.
12197 To do so, create a float table as usual, remove the caption, and replace
12198 it with the TeX code
12208 (sic); you must also the TeX code
12212 immediately after the tabular material.
12213 Study the example table included in the template files to see how this
12214 trick is implemented.
12215 Alternatively, If you need table captions, you should implement the whole
12220 file, then include this file to the LyX document (
12222 Insert\SpecialChar \menuseparator
12223 File\SpecialChar \menuseparator
12225 \begin_inset space ~
12231 Details on how to create a table float can be found in the files
12239 , included in the corresponding packages.
12242 \begin_layout Subsection
12243 Preparing a paper for submission
12246 \begin_layout Standard
12247 Before you submit your paper you must export the LyX document as a LaTeX
12250 File\SpecialChar \menuseparator
12251 Export\SpecialChar \menuseparator
12258 \begin_layout Plain Layout
12259 Actually you have the choice between LaTeX (plain) and pdflatex.
12260 If you intend to use pdflatex to prepare the paper, you should use the
12261 pdflatex option so that included graphics are converted to PDF format,
12262 ready for use by pdflatex.
12267 , then make the following changes to the resulting
12274 \begin_layout Enumerate
12275 Remove the comment lines before the
12284 \begin_layout Enumerate
12285 Remove everything between (and including) the
12297 commands, except for any commands you specifically put into the LaTeX preamble.
12300 \begin_layout Standard
12305 file should be saved and processed through LaTeX as many times as necessary.
12306 You may also want to check the resulting
12313 \begin_layout Subsection
12317 \begin_layout Standard
12318 The use of TeX code is reduced to two commands, which must be placed at
12319 the top of the document.
12320 If you started writing your paper by using the
12328 template, the TeX code needed is already in its place; you usually don't
12330 You may only modify the first TeX code to specify the information printed
12331 to the top of odd and even pages (authors' names and short paper's title,
12333 This TeX code must have the form
12337 markboth{Authors' Names}{Short Paper's Title}
12342 \begin_layout Section
12346 \begin_layout Standard
12352 \begin_layout Subsection
12356 \begin_layout Standard
12357 The iopart package provides a document class to create electronic manuscript
12358 submission to the journals published by the Institute of Physics.
12359 Instructions for the authors how to create a paper using the iopart class
12360 can be downloaded together with the iopart package from the site
12361 \begin_inset Flex URL
12364 \begin_layout Plain Layout
12366 ftp://ftp.iop.org/pub/journals/latex2e
12374 \begin_layout Subsection
12378 \begin_layout Standard
12379 The easiest way to write a paper is to start with the file
12383 that is available in LyX's examples files folder.
12384 Open this file, save it under a new name, and start writing.
12385 The example file explains how to use the special text environments.
12386 Here are the most important advices:
12389 \begin_layout Itemize
12390 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12393 Use AMS math package
12395 in the document settings under
12402 \begin_layout Itemize
12405 The title environment defines the kind of your paper.
12406 So use one of the following environments for the title:
12410 \begin_layout Itemize
12419 \begin_layout Itemize
12428 \begin_layout Itemize
12434 for a Topical review
12437 \begin_layout Itemize
12446 \begin_layout Itemize
12455 \begin_layout Itemize
12461 for a Paper (same as Title)
12464 \begin_layout Itemize
12470 for a Preliminary communication
12473 \begin_layout Itemize
12479 for a Rapid communication
12482 \begin_layout Itemize
12488 for a Letter to the editor
12492 \begin_layout Itemize
12495 All title environments except of
12499 can have an optional short title.
12502 \begin_layout Itemize
12503 There is a general title environment
12507 which is not directly supported by the LyX.
12508 This can be used as TeX code when your document doesn't fit into one of
12509 the other title types.
12512 \begin_layout Standard
12513 For more informations like hints for special table and formula formatting,
12514 look at the IOP author guidelines.
12517 \begin_layout Section
12521 \begin_layout Standard
12524 Panayotis Papasotiriou
12527 \begin_layout Subsection
12531 \begin_layout Standard
12532 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12533 that facilitates electronic manuscript submission to the journals they
12535 Most known of them (at least in my domain of interest) are
12537 Astrophysics and Space Science
12543 , but there are many others (see a complete list at
12544 \begin_inset Flex URL
12547 \begin_layout Plain Layout
12549 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12555 The Kluwer package may be downloaded from the site
12556 \begin_inset Flex URL
12559 \begin_layout Plain Layout
12561 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12567 A complete user guide is contained in that package (but it can also be
12568 downloaded separately).
12571 \begin_layout Standard
12572 LyX supports many features of the package but not everything.
12573 However, the TeX code needed is reduced to some
12574 \begin_inset Quotes eld
12578 \begin_inset Quotes erd
12581 commands of the package (see
12582 \begin_inset space ~
12586 \begin_inset CommandInset ref
12588 reference "subsec:kluwer_peculiarities"
12593 I have recently used LyX to write an article submitted to the
12595 Astrophysics and Space Science
12597 without any problem.
12600 \begin_layout Subsection
12604 \begin_layout Standard
12605 The easiest way to write a paper is to start with the Kluwer template file.
12608 File\SpecialChar \menuseparator
12620 This will give an (almost) empty document that includes the most common
12621 fields found in a manuscript and a short description of their use.
12622 As in most templates, simply overwrite the existing text (including the
12627 ) with the correct information.
12630 \begin_layout Subsection
12631 Preparing a paper for submission
12634 \begin_layout Standard
12635 As in the AASTeX package, before you submit your paper to a journal you
12637 \begin_inset Quotes eld
12641 \begin_inset Quotes erd
12647 \begin_layout Enumerate
12648 Export your paper as a LaTeX file.
12649 To do this, click on
12651 File\SpecialChar \menuseparator
12652 Export\SpecialChar \menuseparator
12659 \begin_layout Enumerate
12664 file with a text editor and make the following changes
12668 \begin_layout Enumerate
12669 remove the comment lines before the
12678 \begin_layout Enumerate
12679 remove everything between (and including) the
12691 commands, except for any commands you specifically put into the LaTeX preamble.
12694 \begin_layout Standard
12703 \begin_layout Enumerate
12708 file through LaTeX as many times as necessary (usually up to three).
12711 \begin_layout Enumerate
12717 \begin_inset space \thinspace{}
12721 \begin_inset space \space{}
12728 , and check if everything is OK (it should, if you didn't make any mistake).
12731 \begin_layout Subsection
12732 \begin_inset Quotes eld
12736 \begin_inset Quotes erd
12739 of the Kluwer package
12740 \begin_inset CommandInset label
12742 name "subsec:kluwer_peculiarities"
12749 \begin_layout Standard
12750 The Kluwer package has the following
12751 \begin_inset Quotes eld
12755 \begin_inset Quotes erd
12761 \begin_layout Enumerate
12762 It is possible to write multiple articles in the same LaTeX file
12766 \begin_layout Plain Layout
12767 I can't imagine any good reason to do this.
12773 Each article must be included in the environment
12774 \begin_inset Quotes eld
12778 \begin_inset Quotes erd
12782 Unfortunately, this environment cannot be omitted, even if you write just
12784 Therefore, each article starts with the command
12790 and, obviously, ends with the command
12797 Although this can be implemented in LyX, I didn't included it, since it
12798 looks ugly and can confuse the novice user.
12799 Therefore, you need to enter them directly and mark them as LaTeX code
12801 \begin_inset Quotes eld
12805 \begin_inset Quotes erd
12811 \begin_layout Enumerate
12812 Information given at the beginning of the article (i.
12813 \begin_inset space \thinspace{}
12817 \begin_inset space \space{}
12820 title, subtitle, author, institution, running title, running author, abstract
12821 and keywords) must be included in an environment called
12822 \begin_inset Quotes eld
12826 \begin_inset Quotes erd
12830 This is not implemented in LyX, so you must enter title, subtitle etc.
12831 \begin_inset space ~
12834 between two TeX code lines (
12849 \begin_layout Enumerate
12850 According to the user manual, the label of each bibliography item must be
12874 \begin_layout Standard
12879 template takes care of all these
12880 \begin_inset Quotes eld
12884 \begin_inset Quotes erd
12888 If you start a new paper using this template you don't need to do anything
12893 \begin_layout Enumerate
12894 don't delete the TeX code included in the template, and
12897 \begin_layout Enumerate
12898 copy the example bibliography item included in the template and modify it
12899 as necessary to enter new bibliography items.
12902 \begin_layout Section
12906 \begin_layout Standard
12912 \begin_layout Subsection
12916 \begin_layout Standard
12917 The LyX document classes
12919 article (koma-script)
12923 report (koma-script)
12941 correspond to the LaTeX document classes
12958 \begin_inset space ~
12961 of the Koma-Script family.
12962 They are replacements for the standard document classes
12978 , resp., and fit better to European typography conventions in a number of
12982 \begin_layout Itemize
12983 Standard character size is 11pt in
12985 article (koma-script)
12989 report (koma-script)
12997 letter (koma-script)
13002 \begin_layout Itemize
13003 Headings, labels of the description environment, and a number of elements
13006 letter (koma-script)
13008 document class are set in a bold sans serif font.
13012 \begin_layout Plain Layout
13013 There is a big difference between the bold sans serif old cm fonts and new
13014 ec fonts, especially in the appearance of headings.
13015 In comparison, the ec bold sans serif fonts look a bit thin.
13016 Here the LaTeX package
13024 helps to produce the
13025 \begin_inset Quotes eld
13029 \begin_inset Quotes erd
13032 appearance when using the ec fonts.
13037 The numbering of chapter headings is made in the same way as the numbering
13038 of section headings, that is without the extra line
13039 \begin_inset Quotes eld
13042 Chapter\SpecialChar \ldots{}
13044 \begin_inset Quotes erd
13048 In addition, the appearance of the headings can be modified by using a
13049 number of options (in LyX to be entered in the field
13052 \begin_inset space ~
13059 Layout\SpecialChar \menuseparator
13066 \begin_layout Itemize
13067 The main means in the Koma-Script document classes to design the type area
13076 (in LyX to be entered in the extra class options field in the dialog
13078 Document\SpecialChar \menuseparator
13082 They make a clearer modification of page margins possible as do the options
13085 Document\SpecialChar \menuseparator
13092 \begin_layout Itemize
13093 The LaTeX document classes of the Koma-Script family define a number of
13094 additional commands.
13095 Those part of it which makes sense in LyX is implemented in corresponding
13099 \begin_layout Standard
13100 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13101 can be found in the Koma-Script documentation
13112 \begin_layout Subsection
13113 article (koma-script), report (koma-script), and book (koma-script)
13116 \begin_layout Standard
13117 The document classes
13119 article (koma-script)
13123 report (koma-script)
13133 are implemented in the layout files
13146 They contain all the paragraph types of the corresponding standard document
13159 , resp., partly modified, with the exception of the LyX specific
13163 -type, which is replaced by the new
13167 -type having the same functionality.
13172 -Type there is a number of new paragraph types added.
13179 letter (koma-script)
13184 \begin_layout Itemize
13193 : are equivalents to
13201 , resp., additionally inserting an entry in the table of contents.
13210 are not contained in
13212 article (koma-script)
13217 \begin_layout Itemize
13226 : behave exactly as
13234 , resp., additionally clearing running heads.
13239 is not contained in
13241 article (koma-script)
13247 \begin_layout Plain Layout
13260 report (koma-script)
13262 , but since this is identical to
13266 , is has not been implemented in LyX.
13274 \begin_layout Itemize
13279 : generates a heading directly above the following paragraph in the standard
13280 character size without affecting the structure of the document.
13283 \begin_layout Itemize
13292 are special captions which respect the different space settings needed
13293 for captions placed above or below an element (if you follow strict typographic
13294 rules, you might want to place table captions always above the table).
13295 You can also use the class option
13299 , which will switch
13312 You need at least Koma-Script version 2.8q to use this.
13315 \begin_layout Itemize
13320 : can be used to set a bonmot, e.
13321 \begin_inset space \thinspace{}
13325 \begin_inset space \space{}
13328 at the beginning of a chapter.
13329 If you use the optional argument (
13331 Insert\SpecialChar \menuseparator
13333 \begin_inset space ~
13338 ), you can insert the dictum's author there.
13339 Dictum and author are separated by a line.
13340 You need at least Koma-Script version 2.8q to use this.
13345 is not contained in
13347 article (koma-script)
13352 \begin_layout Standard
13353 The following types, together with the standard types
13365 , form the title area of the document.
13366 They must be entered ahead of the first
13367 \begin_inset Quotes eld
13371 \begin_inset Quotes erd
13378 \begin_layout Plain Layout
13379 The corresponding LaTeX commands must appear before the
13390 When such a type is used more than once, the latter usage overwrites the
13391 former one, that means, for every type only the latest usage is valid.
13392 The order of the different types however has, like
13404 , no effect on the appearance of the produced document.
13407 \begin_layout Itemize
13412 : produces a centered paragraph above the ordinary title (
13424 ) for the subject of the document.
13427 \begin_layout Itemize
13432 : produces a centered paragraph below the ordinary title (
13444 ) for the publishers' name.
13447 \begin_layout Itemize
13454 report (koma-script)
13460 produces a centered paragraph on its own page behind the title page, or
13463 article (koma-script)
13465 produces a centered paragraph below the ordinary title (
13481 ) for a dedication.
13484 \begin_layout Itemize
13489 : produces a left aligned paragraph above the ordinary title (
13505 ) for a document`s head.
13508 \begin_layout Itemize
13513 : produces in a double-sided print in
13515 report (koma-script)
13521 a left-aligned paragraph at the top of the title page`s back or has no
13522 effect in a single-sided print or in
13524 article (koma-script)
13529 \begin_layout Itemize
13534 : produces in a double-sided print in
13536 report (koma-script)
13542 a left-aligned paragraph at the bottom of the title page`s back or has
13543 no effect in a single-sided print or in
13545 article (koma-script)
13550 \begin_layout Itemize
13555 : produces a special
13556 \begin_inset Quotes eld
13560 \begin_inset Quotes erd
13563 page ahead of the actual document containing a paragraph without special
13567 \begin_layout Standard
13568 The layout files for the document classes
13570 article (koma-script)
13574 report (koma-script)
13580 do include the file
13585 This is thought of as a place to define your own types.
13590 in your personal layout directory and edit the file!
13593 \begin_layout Subsection
13594 letter (koma-script)
13597 \begin_layout Standard
13601 \begin_layout Plain Layout
13613 \begin_layout Standard
13617 letter (koma-script)
13619 is implemented in the layout file
13624 It contains all the paragraph types of the corresponding standard document
13629 , partly modified, with the exception of the LyX specific types
13641 type, which is replaced by the new
13646 In addition, it contains, in contrast to the standard document class, the
13664 Furthermore, there are a number of new letter specific types.
13667 \begin_layout Standard
13671 \begin_layout Plain Layout
13683 \begin_layout Standard
13684 The appearance of the letter produced by this document class can be controlled
13685 by a number of LaTeX commands, which you can put in the LaTeX preamble.
13689 \begin_layout Plain Layout
13690 For example, the standard appearance of the letter`s heading, consisting
13691 of name and address, is quite self-willed.
13693 \begin_inset Quotes eld
13697 \begin_inset Quotes erd
13700 heading is produced by the following LaTeX commands in the preamble:
13703 \begin_layout LyX-Code
13713 \begin_layout LyX-Code
13729 \begin_layout LyX-Code
13739 \begin_layout LyX-Code
13759 A detailed German description of such LaTeX commands can be found in the
13760 Koma-Script documentation
13765 With it, the letter's author can produce his personal letter layout.
13768 \begin_layout Standard
13777 define the beginning of the letter and must be used in every letter.
13778 To emphasize them in the LyX document class, they are marked with the letter
13788 \begin_inset space ~
13791 in the left margin.
13792 It is possible to write any number of letters in one file.
13797 type produces a new letter using the same addressee and a
13801 type produces a new addressee.
13818 are ordinary paragraph types and can also be used several times in one
13819 and the same letter.
13822 \begin_layout Itemize
13827 : produces a paragraph for the addressee and implicitly defines the beginning
13831 \begin_layout Itemize
13836 : produces a paragraph for the form of address and implicitly produces a
13840 \begin_layout Itemize
13845 : produces a paragraph for a close.
13848 \begin_layout Itemize
13853 : produces a paragraph for a postscript.
13856 \begin_layout Itemize
13861 : produces a paragraph for a distribution list.
13864 \begin_layout Itemize
13869 : produces a paragraph for enclosures.
13872 \begin_layout Standard
13913 are input types provided with a label to enter information, which will
13914 be processed by the document class.
13918 \begin_layout Plain Layout
13919 It could be seen as a matter of inconsequence, that the types
13927 described above are not such input types as well.
13928 Because of the special meaning of those types, however, I have implemented
13929 them as ordinary paragraph types with a one letter mark in the left margin.
13930 Moreover, it would affect my feeling of symmetry, if the
13938 type had such a serious different appearance.
13943 The types must be used ahead of the corresponding
13950 \begin_layout Standard
13951 An implementation of these types in a WYSIWYG fashion does not seem to make
13952 sense, because the real appearance of the produced letter does not only
13953 depend on the usage of the particular type, but also on other factors.
13954 For example, a signature entered in the
13958 type will in the standard behavior appear in the produced letter only,
13959 when in the same letter also a
13964 The entered value of the
13968 type will in the standard behavior not appear in the produced letter at
13970 The possibility to design the letter`s heading freely is already indicated
13971 in a footnote above.
13974 \begin_layout Standard
13975 The input types can also be used as empty paragraphs.
13976 This makes sense e.
13977 \begin_inset space \thinspace{}
13981 \begin_inset space \space{}
13993 type is not used at all, in the standard behavior the value of the
13997 type is used as signature, whereas if an empty
14001 type is used, no signature value is defined.
14004 \begin_layout Standard
14005 By using the input types it is possible to write a letter template, containing
14006 filled input types with your personal dates (name, address, etc.) and empty
14007 input types for other dates you want to enter.
14010 \begin_layout Itemize
14015 : sender's name, in the standard behavior appears as a centered paragraph
14016 in small caps in the letter`s heading.
14019 \begin_layout Itemize
14024 : sender's signature, in the standard behavior appears below the
14033 type is used, the value of the
14037 type appears instead.
14040 \begin_layout Itemize
14045 : sender's address, in the standard behavior appears in a centered paragraph
14046 in the letter`s heading below the sender's name.
14049 \begin_layout Itemize
14054 : sender's telephone number, in the standard behavior only sets the LaTeX
14064 \begin_layout Itemize
14069 : place of the letter`s making.
14072 \begin_layout Itemize
14077 : date of the letter`s making.
14086 , in the standard behavior, produce the place and the date in a right-aligned
14087 line below the addressee's field.
14092 type is used, neither place nor date appear, independent of the value of
14102 type is used, the date of the letter `s production is used.
14105 \begin_layout Itemize
14110 : sender`s back address, in the standard behavior appears above the addressee's
14111 field in a small sans serif font.
14114 \begin_layout Itemize
14119 : special mail information, in the standard behavior appears underlined
14120 above the addressee's field below the back address.
14123 \begin_layout Itemize
14128 : additional information, in the standard behavior appears on right side
14129 below the addressee`s field.
14132 \begin_layout Itemize
14137 : the letter's title, in the standard behavior appears in a big, bold, sans
14138 serif font above the subject.
14141 \begin_layout Itemize
14146 : the letter's subject, in the standard behavior appears in a bold font
14154 \begin_layout Standard
14175 produce a business letter like line above the
14179 line containing the fields
14180 \begin_inset Quotes eld
14184 \begin_inset Quotes erd
14188 \begin_inset Quotes eld
14192 \begin_inset Quotes erd
14196 \begin_inset Quotes eld
14200 \begin_inset Quotes erd
14204 \begin_inset Quotes eld
14208 \begin_inset Quotes erd
14212 \begin_inset Quotes eld
14216 \begin_inset Quotes erd
14220 \begin_inset Quotes eld
14224 \begin_inset Quotes erd
14228 For the date field, the value of the
14234 \begin_inset Quotes eld
14237 business letter types
14238 \begin_inset Quotes erd
14241 is used, the value of the
14245 type however does not appear, but only the LaTeX variable
14252 The ordinary output of place and date in a right-aligned line below the
14253 addressee`s field is suppressed.
14254 The types are implemented as input types provided with a label and must
14255 be used ahead of the corresponding
14262 \begin_layout Itemize
14270 \begin_layout Itemize
14278 \begin_layout Itemize
14286 \begin_layout Itemize
14294 \begin_layout Itemize
14302 \begin_layout Subsection
14303 The new letter class: letter (koma-script v.2)
14306 \begin_layout Standard
14312 \begin_layout Standard
14313 \begin_inset VSpace medskip
14319 \begin_layout Standard
14321 Koma-Script version 2.8 has introduced a new letter class
14325 which supersedes the now unsupported
14330 It has — on the LaTeX side — a completely new interface and is not compatible
14331 with the old class.
14332 Therefore, LyX supports both, though it is recommended you use the new
14336 \begin_layout Standard
14337 This class covers the same functionality as
14339 letter (koma-script),
14342 The basic items are
14346 (receiver's address, same as
14350 in the old layout),
14363 will start a new letter (i.
14364 \begin_inset space \thinspace{}
14368 \begin_inset space \space{}
14371 you can write several letters per document).
14372 New elements are sender's
14388 and the possibility to use a
14394 Insert\SpecialChar \menuseparator
14400 \begin_layout Standard
14401 The biggest improvement is, though, that the letter's layout is configurable
14402 to meet almost any needs.
14403 This can be done via the preamble or with a special style file (Letter
14404 Class Option, extension
14408 ), that will be read in as a class option.
14412 \begin_layout Plain Layout
14413 The KOMA package comes with some default
14418 There is, for instance, a
14422 file that follows german typesetting rules, or a
14426 that provides the default layout of the old
14431 The latter can be loaded with the class option
14440 ayout\SpecialChar \menuseparator
14445 ocument\SpecialChar \menuseparator
14457 template that is included in LyX for examples.
14458 A detailed description is to be found in the Koma-Script documentation
14466 \begin_layout Subsection
14470 \begin_layout Standard
14471 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14475 \begin_layout Itemize
14476 The chapter number of a
14480 type appears on a line of its own above the chapter heading instead of
14481 appearing in the same line ahead of it.
14482 The cause for that is the LyX internal behavior for the labeltype
14486 in the layout file.
14489 \begin_layout Itemize
14490 The headings of the types
14498 are only put in the
14499 \begin_inset Quotes eld
14503 \begin_inset Quotes erd
14506 LaTeX table of contents, but not in the LyX table of contents (
14508 Document\SpecialChar \menuseparator
14510 \begin_inset space ~
14514 \begin_inset space ~
14522 \begin_layout Itemize
14523 The paragraphs in a
14527 document class appear in a skip separation mode, not indented.
14528 This is the standard behavior, no special LaTeX commands are needed for
14532 Document\SpecialChar \menuseparator
14535 dialog the corresponding radio button indicates
14544 value always has the effect that extra LaTeX commands are inserted in the
14545 document to produce the gap, which is not what is wanted in this case.
14548 \begin_layout Section
14549 Latex8 (IEEE Conference Papers)
14552 \begin_layout Standard
14558 \begin_layout Subsection
14562 \begin_layout Standard
14563 Since this class is specifically for writing submissions to IEEE sponsored
14564 conferences I strongly recommend that you get a copy of their Authors Kit.
14569 package and associated bibliography style file is included in the kit.
14570 The Authors Kit is usually sent out by email once your initial submission
14572 There is a lot of useful information in the Authors Kit explaining formatting
14573 restrictions and so on and I will assume you have read this since that
14574 means I don't have to repeat it all here.
14577 \begin_layout Subsection
14581 \begin_layout Standard
14582 [AR\SpecialChar \@.
14586 \begin_layout Subsection
14587 Supported Environments
14590 \begin_layout Itemize
14596 \begin_layout Itemize
14602 \begin_layout Itemize
14608 \begin_layout Itemize
14614 \begin_layout Itemize
14620 \begin_layout Itemize
14626 \begin_layout Itemize
14632 \begin_layout Itemize
14638 \begin_layout Itemize
14644 \begin_layout Subsection
14645 Differences Between Screen and Paper
14648 \begin_layout Standard
14649 There are slight differences in appearance mainly with the presentation
14650 of section counters.
14651 On screen the trailing period of the section counter is missing but it
14652 will appear in the output so don't let this worry you.
14655 \begin_layout Section
14659 \begin_layout Standard
14665 \begin_layout Subsection
14669 \begin_layout Standard
14670 Memoir is a very powerful and constantly evolving class.
14671 It has been designed with regard to fictional and non-fictional literature.
14672 Its aim is to let the user have maximum control over the typesetting of
14674 Memoir is based on the standard book class, but it can also emulate the
14675 article class (see below).
14678 \begin_layout Standard
14679 Peter Wilson, the developer of Memoir, is known as the author of lots of
14680 useful packages in the LaTeX world.
14681 Most of them have been merged with Memoir.
14682 Therefore, it is much easier to layout the table of contents, appendices,
14683 chapter designs and such.
14684 LyX, though, does not support all of these goodies natively.
14685 Some of them might be added to forthcoming releases
14689 \begin_layout Plain Layout
14690 You are invited to send suggestions to
14691 \begin_inset Flex URL
14694 \begin_layout Plain Layout
14696 lyx-devel@lists.lyx.org
14706 , lots will probably never, due to the limitations of LyX's framework.
14707 Of course you can still use all features with the help of some native LaTeX
14712 \begin_layout Plain Layout
14717 \begin_layout Plain Layout
14727 \begin_inset space ~
14731 \begin_inset CommandInset ref
14733 reference "sec:Inserting-TeX-Code"
14743 In this section, we can only list those features which are natively supported
14745 For detailed descriptions (and for the rest of features) we recommend you
14746 have a look at the detailed manual of the Memoir class
14750 \begin_layout Plain Layout
14755 \begin_layout Plain Layout
14765 \begin_inset Flex URL
14768 \begin_layout Plain Layout
14770 CTAN:/macros/latex/memoir/memman.pdf
14780 , which is not only a user guide for the class, but also both a comprehensive
14781 description on good typesetting and a superb example for good typesetting
14785 \begin_layout Subsection
14786 Basic features and restrictions
14789 \begin_layout Standard
14790 Memoir supports basically all features of the standard book classes.
14791 There are, however, some differences, as follows:
14794 \begin_layout Description
14796 \begin_inset space ~
14799 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14802 \begin_layout Description
14804 \begin_inset space ~
14807 style: The fancy page style is not supported, due to a command clash between
14808 Memoir and the fancyhdr package (they both define a command with the same
14809 name, which confuses LaTeX).
14810 Instead, Memoir comes with a number of its own page styles (see
14812 Layout\SpecialChar \menuseparator
14813 Document\SpecialChar \menuseparator
14815 \begin_inset space ~
14821 If you want to use these for the chapter pages, you have to use the command
14828 in the main text or in preamble (e.
14829 \begin_inset space \thinspace{}
14833 \begin_inset space \space{}
14840 chapterstyle{companion}
14845 \begin_layout Description
14846 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14847 optional argument in the standard classes.
14848 With this, you can specify an alternative version of the title for the
14849 table of contents and the headers (for instance, if the title is too long).
14850 In LyX, you can do this via
14852 Insert\SpecialChar \menuseparator
14854 \begin_inset space ~
14859 at the beginning of a chapter/section.
14860 Memoir features a second optional argument and thus separates the table
14861 of contents from the header.
14862 You can define three variants of a title with this: one for the main text,
14863 one for the table of contents, and one for the headers.
14864 Simply insert two optional arguments if you need this feature, the first
14865 one containing the short title for the Table of Contents, the second one
14866 containing an alternative short title for the headers.
14869 \begin_layout Description
14870 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14871 of contents, the list of figures and the list of table start a new page
14873 Memoir does not follow this route.
14874 You have to insert a page break yourself, if you want to have one.
14877 \begin_layout Description
14878 Titlepage: For some unknown reason, Memoir uses pagination on the title
14879 page (in the standard classes, title pages are
14880 \begin_inset Quotes eld
14884 \begin_inset Quotes erd
14888 \begin_inset space \thinspace{}
14892 \begin_inset space \space{}
14896 If you want an empty title page, type
14900 aliaspagestyle{title}{empty}
14905 \begin_layout Description
14906 Article: With the class option
14912 Layout\SpecialChar \menuseparator
14913 Document\SpecialChar \menuseparator
14915 \begin_inset space ~
14920 ), you can emulate article style.
14921 That is, counters (footnotes, figures, tables etc.) will not be reset on
14922 new chapters, chapters don't start a new page (but are—in contrary to
14923 \begin_inset Quotes eld
14927 \begin_inset Quotes erd
14930 article classes—still allowed), parts, though, use their own page, as in
14934 \begin_layout Description
14935 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14936 font commands, which have been used in the old LaTeX version 2.09 (e.
14937 \begin_inset space \thinspace{}
14941 \begin_inset space \space{}
14957 It produces an error and stops LaTeX whenever such a command appears.
14962 reallows the commands and spits out warnings instead (which does at least
14964 Since a lot of packages and particularly BibTeX style files are still using
14965 those commands, we have decided to use this option by default.
14968 \begin_layout Subsection
14972 \begin_layout Standard
14973 We will only describe the features supported by LyX (which is not much currently
14975 Please consult the Memoir manual
14979 \begin_layout Plain Layout
14984 \begin_layout Plain Layout
14994 \begin_inset Flex URL
14997 \begin_layout Plain Layout
14999 CTAN:/macros/latex/memoir/memman.pdf
15012 \begin_layout Description
15013 Abstract: You may wonder why an abstract is an extra feature.
15014 Well, it is in book class.
15015 Usually books don't have abstracts.
15016 Memoir, however, has.
15017 You can use it wherever and how often you like.
15020 \begin_layout Description
15021 Chapterprecis: You may know this older typesetting style: The contents of
15022 a chapter are summarized below the title and also in the table of contents
15024 \begin_inset space \thinspace{}
15028 \begin_inset space \space{}
15033 Our hero arrives in Troia; he loses some friends; he finds others
15036 Chapterprecis does exactly this.
15037 It is therefore only sensible below a chapter.
15040 \begin_layout Description
15041 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
15042 The epigraph environment provides an elegant way of typesetting such a
15044 The motto itself (text) and its author (source) are divided by a short
15046 Unfortunately, we have to fool LyX a bit here again, since the environment
15047 needs two arguments (text and source).
15048 In this case, we have to use curly brackets (in TeX mode) between the two
15059 <author of the slogan>.
15062 \begin_layout Description
15063 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
15064 complex figurative poems).
15065 LyX can only support a few of them.
15066 One is poemtitle, which is a centered title for poems, which will also
15067 be added to the table of contents (verse is the standard environment for
15069 Memoir has some enhanced versions of verse, but you need to use TeX code,
15070 because they have to be nested inside regular verse environments, which
15071 is not possible with LyX).
15074 \begin_layout Description
15075 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
15078 \begin_layout Section
15079 Article (mwart), book (mwbk) and report (mwrep)
15080 \begin_inset Argument
15083 \begin_layout Plain Layout
15096 \begin_layout Standard
15102 \begin_layout Standard
15103 The LyX document classes
15119 correspond to the LaTeX document classes
15132 They are replacements for the standard document classes
15144 , resp., and fit better to Polish typography conventions in a number of points.
15148 \begin_layout Standard
15152 \begin_layout Itemize
15153 Unnumbered titles (with star, e.
15154 \begin_inset space \thinspace{}
15158 \begin_inset space \space{}
15165 ) are added into table of contents,
15168 \begin_layout Itemize
15169 Additional page styles:
15173 \begin_layout Description
15174 uheadings header with separated lines,
15177 \begin_layout Description
15178 myheadings custom header, contents headers via commands:
15193 \begin_layout Description
15194 myuheadings custom header with separated lines,
15197 \begin_layout Description
15198 outer page number is placed on outer side of page
15202 \begin_layout Itemize
15207 \begin_layout Description
15208 rmheadings serif titles — default,
15211 \begin_layout Description
15212 sfheadings sansserif titles,
15215 \begin_layout Description
15216 authortitle on title page first placed is author next title — default,
15219 \begin_layout Description
15220 titleauthor on title page first placed is title next author,
15223 \begin_layout Description
15224 withmarginpar reserve place on page for margins.
15228 \begin_layout Section
15232 \begin_layout Standard
15237 provides an alternative to the standard
15242 It provides similar functionality, but you might prefer this layout with
15243 sans serif sections, headings, and more.
15246 \begin_layout Section
15250 \begin_layout Standard
15256 \begin_layout Standard
15257 \begin_inset VSpace bigskip
15263 \begin_layout Standard
15268 \begin_inset space ~
15273 textclass works with the American Physical Sociey's RevTeX 4.0 (the
15274 \begin_inset Formula $\beta$
15277 release of May, 1999) class.
15280 \begin_layout Standard
15285 textclass, which works with RevTeX 3.1.
15286 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15287 That means that it doesn't interact very well with LyX, which requires
15288 LaTeX2e, although it has been kludged to work.
15289 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15293 \begin_inset space ~
15298 textclass should also be pretty easy to use.
15301 \begin_layout Standard
15302 These documents are supposed to be used in
15306 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15307 macros, and assume you'll know what to put in the preamble if necessary.
15310 \begin_layout Subsection
15314 \begin_layout Standard
15315 All you need to do is install RevTeX 4, as described in the package's README
15317 The package can be found at The RevTeX 4 Web Site
15318 \begin_inset Flex URL
15321 \begin_layout Plain Layout
15323 http://publish.aps.org/revtex4/
15329 Install it somewhere that LaTeX can see it.
15330 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15332 \begin_inset space \thinspace{}
15336 \begin_inset space \space{}
15339 not the directory where you installed the class file.) Then, if you reconfigure
15340 LyX, it will find the class file and let you use the RevTeX4 textclass.
15343 \begin_layout Standard
15344 Probably the easiest way to get started is either to import a RevTeX 4 document
15352 \begin_inset space ~
15357 template, found in the templates directory.
15360 \begin_layout Subsection
15364 \begin_layout Standard
15365 Optional arguments to
15372 \begin_inset Quotes eld
15376 \begin_inset Quotes erd
15380 \begin_inset Quotes eld
15384 \begin_inset Quotes erd
15394 \begin_inset space ~
15402 \begin_inset space ~
15408 Remember that in RevTeX, at least one optional argument is required!
15411 \begin_layout Standard
15412 Other preamble matter, like
15419 \begin_inset space ~
15425 \begin_inset space ~
15430 dialog, also as usual.
15433 \begin_layout Subsection
15437 \begin_layout Standard
15438 The layouts basically correspond to the commands in RevTeX4.0.
15439 For example, the Email layout corresponds to
15446 Note that (at least as of RevTeX 4.0 Beta), the
15454 layouts are exactly equivalent, so you shouldn't need to use both.
15458 \begin_layout Plain Layout
15459 In case you're curious, both were included so that
15463 would be able to translate both
15483 \begin_layout Subsection
15487 \begin_layout Standard
15488 There are a couple of important unique aspects of RevTeX 4 which might cause
15489 bugs that will be even more confusing in LyX.
15492 \begin_layout Standard
15510 The LyX equivalent is that there is a separate Thanks layout.
15515 write footnotes in the
15519 layout, or weird things may happen.
15520 See the RevTeX 4 documentation for more details.
15523 \begin_layout Standard
15527 \begin_inset space ~
15535 \begin_inset space ~
15544 layouts must be placed
15552 layout and the corresponding
15569 , the LaTeX won't compile.
15572 \begin_layout Subsection
15576 \begin_layout Standard
15577 The main problem with this layout is that you can't use the optional arguments
15578 to layouts like Email and Title.
15579 (The problem is not unique to this layout; you can't use optional arguments
15580 to the Section layouts either.) This means that after you export that file
15581 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15582 need to edit the LaTeX file with a text editor to add the optional arguments
15584 \begin_inset space \thinspace{}
15588 \begin_inset space \space{}
15591 the running title for the page headers.
15592 Lacking these layouts makes the
15598 (and the equivalent
15604 ) useless, so the corresponding layouts don't exist, and will have to be
15609 \begin_layout Plain Layout
15614 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15615 has not been updated yet to take advantage of it.
15623 \begin_layout Section
15624 Springer Journals (
15631 \begin_layout Standard
15637 \begin_layout Subsection
15641 \begin_layout Standard
15642 These are the layout files for some of the journal formats used by Springer
15643 Verlag and listed on
15644 \begin_inset Flex URL
15647 \begin_layout Plain Layout
15649 http://www.springer.de/author/tex/help-journals.html
15654 , where you should also go to fetch the class files (yes, these are LaTeX2e
15656 It is a modular system: the things common to all journals are implemented
15661 , which journal-specific layout files (such as, e.
15662 \begin_inset space \thinspace{}
15666 \begin_inset space \space{}
15673 for Journal of Geodesy) can include.
15676 \begin_layout Standard
15677 This means that implementing support for any other Springer journal on this
15678 list is as simple as writing your own
15686 file following the outline given in
15694 \begin_layout Standard
15695 It is reasonably well tested only for the Journal of Geodesy.
15704 come with the standard LyX distribution.
15705 Install the relevant class file (downloaded from Springer) in a proper
15706 directory, reconfigure LaTeX (in the teTeX case by running
15710 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15711 and it should work.
15714 \begin_layout Subsection
15718 \begin_layout Standard
15719 A large number of theorem-like styles —
15725 \SpecialChar \ldots{}
15731 \begin_layout Standard
15734 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15735 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15738 See the Springer class file documentation for details.
15741 \begin_layout Subsection
15745 \begin_layout Itemize
15757 \begin_layout Itemize
15760 Probability Theory and Related Fields
15766 — Jean-Marc Lasgouttes
15769 \begin_layout Standard
15770 Add your own, it isn't so hard!
15773 \begin_layout Subsection
15777 \begin_layout Standard
15778 These files are partly based on the older
15782 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15783 file from Springer.
15788 layout, are now defunct.
15789 Jean-Marc Lasgouttes helped out big in making me find my way around the
15790 LyX layout file mechanism.
15793 \begin_layout Subsection
15797 \begin_layout Standard
15799 But probably less than in the old hacked-LaTeX
15806 \begin_layout Standard
15808 \begin_inset space \thinspace{}
15811 g.: does not display the number for theorem-like layouts, just #.
15814 \begin_layout Section
15820 \begin_inset CommandInset label
15829 \begin_layout Standard
15837 \begin_layout Subsection
15841 \begin_layout Standard
15842 This section describes how to use LyX to make slides for overhead projectors.
15843 There are two document classes that can do this: the default slides class
15849 This section documents the former.
15852 \begin_layout Standard
15853 I'm going to say this again, nice and clear, so that there's no misunderstanding
15857 \begin_layout Standard
15858 \begin_inset VSpace bigskip
15864 \begin_layout Standard
15868 This section documents the class
15869 \begin_inset Quotes eld
15877 \begin_inset Quotes erd
15885 \begin_layout Standard
15886 \begin_inset VSpace bigskip
15892 \begin_layout Standard
15893 If you're looking for the documentation for
15894 \begin_inset Quotes eld
15902 \begin_inset Quotes erd
15905 , check out section
15906 \begin_inset space ~
15910 \begin_inset CommandInset ref
15912 reference "sec:foiltex"
15922 \begin_inset Quotes eld
15930 \begin_inset Quotes erd
15933 ] is actually somewhat better than the default
15941 \begin_layout Plain Layout
15942 \SpecialChar \ldots{}
15943 or so I've been told repeatedly by its advocates.
15944 Having never used it, I have no idea if this claim is true or not.
15949 which this section documents.
15952 \begin_layout Standard
15953 This class is the LaTeX2e improvement of the old
15958 Every LaTeX2e distribution includes this class [which I'll just refer to
15960 \begin_inset Quotes eld
15968 \begin_inset Quotes erd
15971 from now on], so you're bound to have it.
15972 As I noted earlier, there are other classes, such as
15976 , which also produce slides for overhead projectors and do a better job
15978 However, there are some things which
15982 can do which the others can't, such as generate overlays.
15983 Read on to learn more!
15986 \begin_layout Subsection
15988 \begin_inset CommandInset label
15990 name "sec:slidesetup"
15997 \begin_layout Standard
15998 Obviously, to use this document class, you need to select
15999 \begin_inset Quotes eld
16007 \begin_inset Quotes erd
16010 from the class list in the
16012 Document\SpecialChar \menuseparator
16016 There are some other special things you should know about this class:
16019 \begin_layout Itemize
16020 Don't bother changing the options
16025 They're not supported by the
16032 \begin_layout Itemize
16036 \begin_inset space ~
16041 behaves a bit differently for this class.
16042 The possible choices and what they do are as follows:
16046 \begin_layout Description
16051 The final output contains page numbers in the lower right corner.
16054 \begin_layout Description
16063 , but also prints out any time markers you've put in.
16064 This is the default.
16067 \begin_layout Description
16072 The final output contains no page numbers, time markers, or alignment markers.
16076 \begin_layout Itemize
16081 class has an extra option:
16087 \begin_inset Quotes eld
16095 \begin_inset Quotes erd
16098 in the extra class options.
16102 \begin_layout Standard
16103 Using this options allows you to add time markers to
16109 \begin_inset space ~
16113 \begin_inset CommandInset ref
16115 reference "sec:slideNote"
16123 \begin_layout Standard
16124 You can also use the template file
16125 \begin_inset Quotes eld
16133 \begin_inset Quotes erd
16136 to automatically set up a document to use the
16142 File\SpecialChar \menuseparator
16144 \begin_inset space ~
16148 \begin_inset space ~
16153 to open your new document].
16154 The template file also contains some examples of the special paragraph
16155 environments used by this class.
16156 I'll describe those next.
16159 \begin_layout Subsection
16160 Paragraph Environments
16163 \begin_layout Subsubsection
16164 Supported Environments
16167 \begin_layout Standard
16168 The first thing you'll notice when you start up a new
16172 document is the font size and type: it's the equivalent of the size
16173 \begin_inset Quotes eld
16181 \begin_inset Quotes erd
16187 \begin_inset space ~
16193 This is also what's used in the output.
16195 \begin_inset Quotes eld
16199 \begin_inset Quotes erd
16202 to remind you that this is a slide.
16203 Your final slides will use a larger font; ergo, you'll have less space.
16204 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16207 \begin_layout Standard
16208 The next thing that becomes obvious is the changes to the paragraph environment
16209 pull-down box [at the far-left end of the toolbar].
16210 Most of the paragraph environments you're used to seeing are missing.
16211 There are also five new ones.
16216 class itself only supports certain paragraph environments:
16219 \begin_layout Itemize
16225 \begin_layout Itemize
16231 \begin_layout Itemize
16237 \begin_layout Itemize
16243 \begin_layout Itemize
16249 \begin_layout Itemize
16255 \begin_layout Itemize
16261 \begin_layout Itemize
16267 \begin_layout Itemize
16273 \begin_layout Itemize
16279 \begin_layout Itemize
16285 \begin_layout Standard
16286 All of the other standard environments, including the section-heading environmen
16287 ts, aren't used in the
16294 \begin_layout Standard
16295 On the other hand, you'll notice the following new environments:
16298 \begin_layout Itemize
16304 \begin_layout Itemize
16310 \begin_layout Itemize
16316 \begin_layout Itemize
16322 \begin_layout Itemize
16328 \begin_layout Standard
16329 These five are kind of quirky, due to a
16330 \begin_inset Quotes eld
16334 \begin_inset Quotes erd
16338 You see, LyX doesn't permit you to nest any other paragraph environment
16339 into an empty environment.
16340 Now, that's fine and dandy, but it means that you wouldn't be able to start
16341 a slide with anything except plain text.
16342 To deal with this, I've performed a little
16343 \begin_inset Quotes eld
16347 \begin_inset Quotes erd
16353 \begin_layout Subsubsection
16354 Quirks of the New Environments
16355 \begin_inset CommandInset label
16357 name "sec:slideQuirk"
16364 \begin_layout Standard
16365 All five of the new paragraph environments are somewhat quirky due to inherent
16366 limitiations in the current version of LyX.
16367 As I just mentioned, LyX forbids environments that begin with another environme
16369 To get around this, the
16373 environment isn't a paragraph environment as described in the
16381 \begin_layout Standard
16382 You should consider
16395 \begin_inset Quotes eld
16398 pseudo-environments.
16399 \begin_inset Quotes erd
16402 They look like a section heading or a
16403 \begin_inset Quotes eld
16411 \begin_inset Quotes erd
16414 but really begin a [and, if necessary, end the previous] paragraph environment.
16424 \begin_inset Quotes eld
16428 \begin_inset Quotes erd
16431 These two perform some action.
16434 \begin_layout Standard
16435 A common feature of all five environments,
16455 , is a rather long-ish label.
16456 The text following this label — ordinarily the contents of the paragraph
16457 environment — is utterly irrelevant for
16478 LyX completely ignores it.
16479 In fact, you can leave these five environments completely empty.
16483 \begin_layout Standard
16488 to put any text after the rather long-ish label, you might want to.
16489 This could be a short description of the contents of the
16494 In that case, enter your descriptive comment and hit
16498 as you normally would.
16501 \begin_layout Standard
16502 If, on the other hand, you don't want to enter any descriptive text, you'll
16503 hit another LyX quirk.
16504 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16505 environment until you put something in the old one.
16509 \begin_layout Itemize
16510 Start entering the text that will
16538 \begin_layout Itemize
16539 Now move to the beginning of that paragraph.
16543 \begin_layout Itemize
16552 \begin_layout Itemize
16553 Finally, change this new, empty paragraph to a
16577 \begin_layout Standard
16578 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16582 \begin_layout Subsection
16583 Making a Presentation with
16596 \begin_layout Subsubsection
16604 \begin_layout Standard
16605 If you're expecting this section to teach you how to actually make a presentatio
16606 n, you'll be sorely disappointed.
16607 Naturally, I'll describe all of the ways the
16611 class can assist you in preparing the materials for a presentation.
16612 Filling in the contents, however, is up to you.
16617 the LyX philosophy.]
16620 \begin_layout Standard
16625 environment [in the manner described in section
16626 \begin_inset space ~
16630 \begin_inset CommandInset ref
16632 reference "sec:slideQuirk"
16636 ] tells LyX to begin a new slide [duh].
16637 The label for this environment/
16638 \begin_inset Quotes erd
16642 \begin_inset Quotes erd
16646 \begin_inset Quotes eld
16650 \begin_inset Quotes erd
16653 in cool blue, followed by the label,
16654 \begin_inset Quotes eld
16658 \begin_inset Quotes erd
16662 Any text or paragraph environments that follow this one go on the new slide.
16666 \begin_layout Standard
16667 Slides are probably the only time you'll need to forcibly end pages in LyX
16668 (this can be specified in the
16673 In fact, you'll want to, once you finish entering the contents of one slide.
16674 If you've entered more text than can physically fit on a slide, the extra
16675 overflows onto a new slide.
16676 I don't recommend doing this, however, since the overflow slide won't have
16677 any page number on it.
16678 Furthermore, it may interfere with any
16682 you've made to accompany the oversized
16689 \begin_layout Standard
16698 environments work the same way as the
16703 They both create an
16704 \begin_inset Quotes eld
16708 \begin_inset Quotes erd
16711 followed by a label [
16712 \begin_inset Quotes eld
16716 \begin_inset Quotes erd
16720 \begin_inset Quotes eld
16724 \begin_inset Quotes erd
16728 The color is a stunning magenta instead of blue, and the
16729 \begin_inset Quotes eld
16733 \begin_inset Quotes erd
16736 will look different, in style and in length.
16737 The label fonts of all three also differ from one another.
16740 \begin_layout Standard
16745 , if the contents of a
16753 exceed the physical size of a slide or sheet of paper, the extra will overflow
16755 Again, you should avoid this.
16756 It defeats the whole purpose of
16767 \begin_layout Subsubsection
16777 \begin_layout Standard
16782 is a slide that sits atop another slide.
16783 Perhaps you wish to discuss a figure on the main
16787 before displaying the text associated with it.
16788 One way to accomplish this is tape a flap of dark paper over the part of
16793 you want to display later.
16794 This method fails, however, if you wish to overlap one graph with another,
16796 You would then have to fumble while speaking to align the two separate,
16801 s to align the two graphs.
16806 environment in both cases makes life much easier.
16809 \begin_layout Standard
16814 receives the page number of its
16815 \begin_inset Quotes eld
16819 \begin_inset Quotes erd
16827 \begin_inset Quotes eld
16835 \begin_inset Quotes erd
16842 \begin_layout Plain Layout
16843 Presumably, mutliple
16848 \begin_inset Quotes eld
16856 \begin_inset Quotes erd
16860 \begin_inset Quotes eld
16868 \begin_inset Quotes erd
16872 \begin_inset Quotes eld
16880 \begin_inset Quotes erd
16884 \begin_inset space ~
16887 appended to the page number of the parent
16897 Clearly, you want the contents of both the
16905 to each fit on a single physical slide! You should probably consider an
16911 \begin_inset Quotes eld
16915 \begin_inset Quotes erd
16927 class provides a visual cue for this: the label at the start of an
16931 is shorter than that at the start of a
16936 Lastly, when you generate printable output, you'll find alignment markers
16937 in all four corners of both the
16941 page and its parent
16946 These will assist you in lining up the two physical slides.
16949 \begin_layout Standard
16950 The major problem in overlaying two slides is aligning the contents of the
16951 two transparencies.
16952 How much space should you leave for that graph on the second slide? Worse
16953 still, what if you want a graph and a sentence on second slide, but there
16954 is text on the main transparency that goes in between them? You could try
16955 and insert vertical space of the right size.
16956 The better way is to use
16967 \begin_layout Standard
16968 As their names imply,
16976 are two command-like paragraph environments that make all subsequent text
16977 invisible and visible, respectively.
16979 \begin_inset space ~
16983 \begin_inset CommandInset ref
16985 reference "sec:slideQuirk"
16989 that you don't place anything
16993 these two environments, however.
16998 , it inserts a centered, sky-blue label into the page reading
16999 \begin_inset Quotes eld
17002 <Invisible Text Follows>
17003 \begin_inset Quotes erd
17007 For paragraphs following this label, the parts of the
17015 ; it doesn't matter which] where they would be contain instead blank space.
17019 \begin_layout Standard
17024 , the corresponding centered label is
17025 \begin_inset Quotes eld
17028 <Visible Text Follows>
17029 \begin_inset Quotes erd
17033 Paragraphs following this label behave normally.
17034 Note that the beginning of a new
17046 automatically shuts off an
17051 It's therefore not necessary to use
17062 \begin_layout Standard
17063 By now, it should be obvious how to create overlay transparencies using
17064 the proper combination of
17083 \begin_layout Enumerate
17088 , including everything that will appear on it, whether on the main slide
17096 \begin_layout Enumerate
17097 Before each figure or paragraph that will appear only on the
17106 If necessary, insert a
17110 environment after the
17117 \begin_layout Enumerate
17122 immediately following the
17129 \begin_layout Enumerate
17130 Copy the contents of this
17141 \begin_layout Enumerate
17146 , change all of the
17157 \begin_layout Standard
17159 You've just made an
17166 \begin_layout Standard
17167 There's one problem with the way I've designed the LyX
17171 class: you can't make text in the middle of a paragraph invisible, nor
17172 make text in the middle of an invisible paragraph visible again.
17173 To accomplish this feat, you'll need to use some inlined LaTeX codes.
17177 \begin_layout Plain Layout
17178 The commands of interest are:
17181 \begin_layout Itemize
17186 invisible \SpecialChar \ldots{}
17190 \begin_layout Itemize
17195 visible \SpecialChar \ldots{}
17199 \begin_layout Plain Layout
17200 \SpecialChar \ldots{}
17201 and need to be marked as TeX.
17203 \begin_inset Quotes eld
17207 \begin_inset Quotes erd
17210 you wish to change goes in between the brackets [and after the
17223 If you don't know how to mark text as TeX, see the appropriate section
17236 \begin_layout Subsubsection
17246 \begin_inset CommandInset label
17248 name "sec:slideNote"
17255 \begin_layout Standard
17264 is associated with a
17265 \begin_inset Quotes eld
17269 \begin_inset Quotes erd
17281 class provides visual cues.
17286 is shorter than that of a
17290 [yet longer than that of an
17294 ] and, like the label of an
17298 is shockingly magenta.
17299 Additionally, the printed
17303 has the page number of its
17304 \begin_inset Quotes eld
17308 \begin_inset Quotes erd
17316 \begin_inset Quotes eld
17324 \begin_inset Quotes erd
17328 \begin_inset Quotes eld
17336 \begin_inset Quotes erd
17340 \begin_inset Quotes eld
17348 \begin_inset Quotes erd
17352 You can have multiple
17356 s associated with a single
17368 , you'll probably want to break up long
17372 s so that they fit on a single sheet of paper.
17375 \begin_layout Standard
17380 is obvious: it contains anything additional you might want to say about
17386 It could also be used as a sheet of reminders for a particular
17391 In the case of the latter, you might want to make use of time markers.
17397 \begin_inset Quotes eld
17401 \begin_inset Quotes erd
17404 support for time markers, a
17409 So, you'll have to resort to using the LaTeX codes.
17412 \begin_layout Standard
17413 To use time markers, you'll need to specify the extra class option
17414 \begin_inset Quotes eld
17422 \begin_inset Quotes erd
17426 \begin_inset space ~
17430 \begin_inset CommandInset ref
17432 reference "sec:slidesetup"
17437 This option turns on timing marks, which will appear in the lower-left-hand
17443 To set what appears in the time marker, you use the LaTeX commands
17444 \begin_inset Quotes eld
17454 \begin_inset Quotes erd
17458 \begin_inset Quotes eld
17468 \begin_inset Quotes erd
17472 The arguments of both commands are time measured in seconds.
17474 \begin_inset Quotes eld
17484 \begin_inset Quotes erd
17487 sets the time marker to a given time.
17489 \begin_inset Quotes eld
17499 \begin_inset Quotes erd
17502 increments the time marker by the specified amount.
17503 Using time markers and
17507 s in this fashion, you can remind yourself how much time to spend on a particula
17515 \begin_layout Standard
17516 There's one last feature to describe.
17517 Clearly, you'd like to print out all of your
17525 s on transparencies while printing all of your
17542 with which it is associated.
17543 What's a person to do?
17546 \begin_layout Standard
17547 Luckily, there are two LaTeX commands that allow you to select what to print
17549 Both must be placed into the preamble of your document.
17551 \begin_inset Quotes eld
17563 \begin_inset Quotes erd
17566 will cause the output to contain only the
17575 Correspondingly, the command
17576 \begin_inset Quotes eld
17588 \begin_inset Quotes erd
17591 prevents the output of anything but
17596 I'd advise placing both commands in the preamble and initially comment
17598 You can then preview your entire presentation as you write.
17599 When you're done writing, you can then uncomment one of the two to select
17600 what you want to print.
17601 I like to uncomment
17602 \begin_inset Quotes eld
17614 \begin_inset Quotes erd
17617 , print to a file with
17618 \begin_inset Quotes eld
17626 \begin_inset Quotes erd
17629 in its name, comment it back out, then uncomment
17630 \begin_inset Quotes eld
17642 \begin_inset Quotes erd
17646 \begin_inset Quotes eld
17654 \begin_inset Quotes erd
17658 I can then send either file to a printer, loading transparencies or plain
17659 paper as appropriate.
17662 \begin_layout Standard
17663 You can also provide other arguments to the
17664 \begin_inset Quotes eld
17674 \begin_inset Quotes erd
17678 \begin_inset Quotes eld
17688 \begin_inset Quotes erd
17692 See a good LaTeX book for details.
17695 \begin_layout Subsection
17700 Class Template File
17703 \begin_layout Standard
17704 I have also provided a template file,
17705 \begin_inset Quotes eld
17713 \begin_inset Quotes erd
17721 To use it, begin your new presentation with
17726 ile\SpecialChar \menuseparator
17728 \begin_inset space ~
17732 \begin_inset space ~
17742 Your new LyX presentation file will contain an example
17763 additionally contain an example of the use of
17772 Lastly, the preamble will contain:
17775 \begin_layout LyX-Code
17776 % Uncomment to print out only slides and overlays
17779 \begin_layout LyX-Code
17783 \begin_layout LyX-Code
17789 \begin_inset Newline newline
17795 \begin_layout LyX-Code
17796 % Uncomment to print out only notes
17799 \begin_layout LyX-Code
17803 \begin_layout LyX-Code
17811 \begin_layout Standard
17812 One final thing: I created this class to support the LaTeX2e
17813 \begin_inset Quotes eld
17821 \begin_inset Quotes erd
17824 class, one of the built-in LaTeX2e classes.
17825 Neither I nor the rest of the LyX Team endorse or oppose the use of this
17826 built-in slide class.
17827 It's here if you want it or need it.
17828 There exist other LaTeX2e classes for creating presentations, such as the
17834 \begin_inset space ~
17838 \begin_inset CommandInset ref
17840 reference "sec:foiltex"
17845 \begin_inset Quotes eld
17853 \begin_inset Quotes erd
17856 package [present on some TeX distributions].
17857 The latter is not yet supported under LyX.
17861 \begin_layout Plain Layout
17862 Perhaps you can take on the task\SpecialChar \ldots{}
17868 I know nothing about these other classes.
17869 Try them out to see what sort of alternative they provide.
17872 \begin_layout Chapter
17873 LyX Features needing Extra Software
17876 \begin_layout Section
17880 \begin_layout Standard
17886 \begin_layout Subsection
17890 \begin_layout Standard
17899 \begin_layout Plain Layout
17904 is not yet available when you are using the LaTeX distribution MiKTeX.
17909 , you'll find in the
17916 \begin_inset space ~
17927 \begin_inset CommandInset href
17929 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17936 \begin_layout Standard
17941 package is a program that was written by
17942 \begin_inset Flex Noun
17945 \begin_layout Plain Layout
17947 \begin_inset space ~
17955 in frustration because some constructs in LaTeX are sometimes non-intuitive,
17956 and easy to forget.
17957 The program runs over your LaTeX file, checks the integrity of the file,
17958 and flags some common errors.
17959 In other technical words, it is
17966 \begin_layout Standard
17967 Well, what is a syntax checker doing in LyX which is supposed to produce
17968 correct LaTeX anyways? The answer is simple: Just as
17972 not only checks the
17976 of C programs, but also does
17980 checks for type-errors,
17984 catches some common
17988 errors, in addition to the syntactical ones.
17993 is capable of detecting several common errors, such as
17996 \begin_layout Itemize
17997 Ellipsis detection:
17998 \begin_inset Newline newline
18001 Use \SpecialChar \ldots{}
18005 \begin_layout Itemize
18006 No space in front of/after parenthesis:
18007 \begin_inset Newline newline
18013 \begin_layout Itemize
18014 Enforcement of normal space after common abbreviations:
18015 \begin_inset Newline newline
18019 \begin_inset space \thinspace{}
18023 \begin_inset space \space{}
18026 is too wide spacing.
18029 \begin_layout Itemize
18030 Enforcement of end-of-sentence space when the last sentence ends with a
18032 \begin_inset Newline newline
18036 And this is wrong spacing.
18039 \begin_layout Itemize
18040 Space in front of labels and similar commands:
18041 \begin_inset Newline newline
18044 The label should stick right up to the text to avoid falling to a wrong
18047 \begin_inset CommandInset label
18057 \begin_layout Plain Layout
18058 This footnote is in danger of falling off to a wrong page
18063 The label is separated too much.
18066 \begin_layout Itemize
18067 Space in front of references, instead of hard spaces:
18068 \begin_inset Newline newline
18071 In you are in bad luck, the text will break right between the referenced
18072 text and reference number, and that's a pity.
18074 \begin_inset CommandInset ref
18076 reference "sec:chktex"
18083 \begin_layout Itemize
18085 \begin_inset Quotes eld
18089 \begin_inset Quotes erd
18093 \begin_inset Formula $\times$
18097 \begin_inset Newline newline
18100 2x2 looks cheap compared to
18101 \begin_inset Formula $2\times2$
18107 \begin_layout Standard
18108 and more \SpecialChar \ldots{}
18109 It is an invaluable tool when you are
18110 \begin_inset Quotes eld
18114 \begin_inset Quotes erd
18117 your document before printing, and you should run it right after the obligatory
18118 spelling check, and before you go fine tuning the typesetting.
18121 \begin_layout Subsection
18125 \begin_layout Standard
18126 If you have the program installed, usage is as simple as choosing
18128 Tools\SpecialChar \menuseparator
18130 \begin_inset space ~
18136 This will make LyX generate a LaTeX file of your document, start
18140 to check it, and then make LyX insert
18141 \begin_inset Quotes eld
18145 \begin_inset Quotes erd
18148 with the warnings from
18152 , if there were any.
18153 The warnings will be placed close to the point of the mistake, and you
18154 can quickly find them by using the
18156 Navigate\SpecialChar \menuseparator
18159 menu item, or the shortcut key
18168 Open the error boxes by clicking on them with the mouse, or use the shortcut
18177 bindings, or the corresponding
18186 Read the warning and correct the mistake, if it is a mistake.
18187 If you have trouble understanding what the warning is about, you can safely
18189 Remember that there is a hidden layer between the document on screen and
18190 the technical details in invoking
18194 , and this gap can make some warnings seem arcane or just right down plain
18198 \begin_layout Standard
18199 This document is an excellent testing bed for the feature, and it should
18200 provide quite a few warnings for you to fiddle with.
18201 Since computers are only so smart, expect most of the warnings to be false
18205 \begin_layout Subsection
18206 How to fine tune it
18209 \begin_layout Standard
18210 Sometimes, you'll find that
18214 makes more noise than suits your mood.
18215 Then you can choose not to use it, wait until your mood changes, or try
18220 to get better along with you.
18221 Another choice in the most desperate situations is to use
18223 View\SpecialChar \menuseparator
18225 \begin_inset space ~
18229 \begin_inset space ~
18233 \begin_inset space ~
18238 , which will get rid of all warnings instantly.
18241 \begin_layout Standard
18250 very configurable and extensible, you shouldn't expect to solve all problems
18256 Since LyX has to generate a somewhat special LaTeX file to be able to match
18257 the line numbers from the
18265 \begin_layout Plain Layout
18266 You can inspect the specific output from
18272 Edit\SpecialChar \menuseparator
18274 \begin_inset space ~
18278 \begin_inset space ~
18292 to the internal document structure, some of the warnings will not seen
18293 to appear correctly.
18294 There are two things you can do about this:
18297 \begin_layout Itemize
18302 invocation command line in
18318 installation configuration file (usually with the file
18323 See below to learn what warnings can be enabled and disabled on the command
18328 \begin_layout Itemize
18329 Export your document as a raw LaTeX file using
18331 File\SpecialChar \menuseparator
18332 Export\SpecialChar \menuseparator
18340 Invoked in this way, it can be a hassle to find the corresponding place
18341 in the document inside LyX, but with a little patience, you should be able
18345 \begin_layout Standard
18346 Here follows the warning messages that can be enabled and disabled in
18355 to disable a warning, and
18359 to enable a warning.
18360 The emphasized entries are disabled by default, because the default is
18363 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18368 \begin_layout Standard
18369 Notice that you should only use the options that enable and disable warnings,
18370 because LyX relies on some of the other command line parameters to be set
18371 in a specific way to have a chance to communicate with
18378 \begin_layout Enumerate
18382 Command terminated with space.
18385 \begin_layout Enumerate
18388 Non-breaking space (
18389 \begin_inset Quotes eld
18397 \begin_inset Quotes erd
18400 ) should have been used.
18403 \begin_layout Enumerate
18407 You should enclose the previous parenthesis with
18408 \begin_inset Quotes eld
18416 \begin_inset Quotes erd
18422 \begin_layout Enumerate
18425 Italic correction (
18426 \begin_inset Quotes eld
18436 \begin_inset Quotes erd
18439 ) found in non-italic buffer.
18442 \begin_layout Enumerate
18445 Italic correction (
18446 \begin_inset Quotes eld
18456 \begin_inset Quotes erd
18459 ) found more than once.
18462 \begin_layout Enumerate
18466 No italic correction (
18467 \begin_inset Quotes eld
18477 \begin_inset Quotes erd
18483 \begin_layout Enumerate
18487 \begin_inset Quotes eld
18495 \begin_inset Quotes erd
18499 \begin_inset Quotes eld
18507 \begin_inset Quotes erd
18513 \begin_layout Enumerate
18516 Wrong length of dash may have been used.
18519 \begin_layout Enumerate
18523 \begin_inset Quotes eld
18531 \begin_inset Quotes erd
18535 \begin_inset Quotes eld
18543 \begin_inset Quotes erd
18549 \begin_layout Enumerate
18553 \begin_inset Quotes eld
18561 \begin_inset Quotes erd
18567 \begin_layout Enumerate
18571 \begin_inset Quotes eld
18579 \begin_inset Quotes erd
18582 to achieve an ellipsis.
18585 \begin_layout Enumerate
18588 Inter-word spacing (
18589 \begin_inset Quotes eld
18599 \begin_inset Quotes eld
18602 ) should perhaps be used.
18605 \begin_layout Enumerate
18608 Inter-sentence spacing (
18609 \begin_inset Quotes eld
18619 \begin_inset Quotes erd
18622 ) should perhaps be used.
18625 \begin_layout Enumerate
18628 Could not find argument for command.
18631 \begin_layout Enumerate
18635 \begin_inset Quotes eld
18643 \begin_inset Quotes erd
18649 \begin_layout Enumerate
18652 Math mode still on at end of LaTeX file.
18655 \begin_layout Enumerate
18659 \begin_inset Quotes eld
18667 \begin_inset Quotes erd
18670 doesn't match the number of
18671 \begin_inset Quotes eld
18679 \begin_inset Quotes erd
18685 \begin_layout Enumerate
18688 You should use either
18691 \begin_inset Quotes eld
18699 \begin_inset Quotes erd
18704 as an alternative to
18705 \begin_inset Quotes eld
18713 \begin_inset Quotes erd
18719 \begin_layout Enumerate
18726 " (ASCII 39) instead of "
18733 \begin_layout Enumerate
18736 User-specified pattern found.
18739 \begin_layout Enumerate
18742 This command might not be intended.
18745 \begin_layout Enumerate
18752 \begin_layout Enumerate
18770 \begin_layout Enumerate
18773 Delete this space to maintain correct page references.
18776 \begin_layout Enumerate
18780 You might wish to put this between a pair of
18781 \begin_inset Quotes eld
18789 \begin_inset Quotes erd
18795 \begin_layout Enumerate
18798 You ought to remove spaces in front of punctuation.
18801 \begin_layout Enumerate
18804 Could not execute LaTeX command.
18807 \begin_layout Enumerate
18816 in front of small punctuation.
18819 \begin_layout Enumerate
18827 may look prettier here.
18830 \begin_layout Enumerate
18834 Multiple spaces detected in output.
18837 \begin_layout Enumerate
18840 This text may be ignored.
18843 \begin_layout Enumerate
18849 \begin_inset Quotes eld
18854 to begin quotation, not
18861 \begin_layout Enumerate
18868 to end quotation, not
18871 \begin_inset Quotes eld
18879 \begin_layout Enumerate
18885 \begin_layout Enumerate
18888 You should perhaps use
18889 \begin_inset Quotes eld
18897 \begin_inset Quotes erd
18903 \begin_layout Enumerate
18906 You should put a space in front of/after parenthesis.
18909 \begin_layout Enumerate
18912 You should avoid spaces in front of/after parenthesis.
18915 \begin_layout Enumerate
18919 You should not use punctuation in front of/after quotes.
18922 \begin_layout Enumerate
18925 Double space found.
18928 \begin_layout Enumerate
18931 You should put punctuation outside inner/inside display math mode.
18934 \begin_layout Enumerate
18937 You ought to not use primitive TeX in LaTeX code.
18940 \begin_layout Enumerate
18943 You should remove spaces in front of
18944 \begin_inset Quotes eld
18952 \begin_inset Quotes erd
18958 \begin_layout Enumerate
18961 \begin_inset Quotes eld
18969 \begin_inset Quotes erd
18972 is normally not followed by
18973 \begin_inset Quotes eld
18981 \begin_inset Quotes erd
18987 \begin_layout Standard
18988 In later versions of LyX, we hope to provide a more complete interface to
18989 this tool (and it's smaller cousin
18993 ) to exploit the full power of it.
18994 But it's not exactly useless as it is now: go try it on one of your existing
18995 documents of a certain length and be surprised.
18998 \begin_layout Section
18999 Version Control in LyX
19002 \begin_layout Standard
19005 Lars Gullik Bjønnes
19012 \begin_layout Subsection
19016 \begin_layout Standard
19017 A friend of mine wanted to try LyX for a group project.
19018 When he didn't find support for version control or file locking, he dropped
19020 This angered me a bit, so I thought that I should at least make support
19021 for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
19022 This has been done.
19023 LyX now supports some of the most basic RCS/CVS/SVN commands.
19024 If you need something a bit more sophisticated you will have to do that
19025 manually in a terminal.
19028 \begin_layout Standard
19029 Before you begin to use the version control features in LyX, you should
19030 be familiar with RCS/CVS/SVN usage before start using it under LyX.
19031 Also note that CVS support is not as good as subversion support so we advice
19033 Good place to start with Subversion is SVN Book
19037 \begin_layout Plain Layout
19038 \begin_inset CommandInset href
19040 target "http://svnbook.red-bean.com/"
19050 In case of RCS you should read
19051 \begin_inset Quotes eld
19055 \begin_inset Quotes erd
19058 (a man file, read it with
19063 This file describes all the basic features of RCS.
19064 You should especially notice the comment about a RCS directory, and the
19065 notion of a master RCS file (the file ending in
19072 \begin_layout Standard
19073 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
19074 package—no guarantees are made for older versions.
19075 Most of the log messages are not currently displayed after operations —
19076 you can check them in Messages pane if unsure.
19079 \begin_layout Standard
19080 For introducing your own external commands consult vc-command in the manual
19084 \begin_layout Subsection
19085 RCS commands in LyX
19088 \begin_layout Standard
19089 The following sections describe the RCS commands supported by LyX.
19090 You can find them in the
19092 File\SpecialChar \menuseparator
19094 \begin_inset space ~
19100 LyX was tested against RCS 5.7.
19103 \begin_layout Subsubsection
19109 \begin_layout Standard
19110 If your document is not under revision control, this is the only item shown
19112 And if it is under revision control, the
19116 item is not visible.
19120 \begin_layout Standard
19121 This command registers your document with RCS (unless you are under the
19122 directory managed by CVS)\SpecialChar \@.
19123 You are asked interactively to supply an initial
19124 description of the document.
19125 The document is now set in Read-Only mode and you have to
19128 \begin_inset space ~
19132 \begin_inset space ~
19136 \begin_inset space ~
19141 , before making any changes to it.
19142 A document under revision control has a
19143 \begin_inset Quotes eld
19146 [RCS:<version> <locker>]
19147 \begin_inset Quotes erd
19150 item tagged to the filename in the minibuffer.
19153 \begin_layout Standard
19154 RCS command that is run:
19156 ci -q -u -i -t-"<initial description>" <file-name>
19159 \begin_layout Standard
19164 to understand the switches.
19168 \begin_layout Subsubsection
19174 \begin_layout Standard
19175 When you are finished editing a file, you check in your changes.
19176 When you do this, you are asked for a description of the changes.
19177 This is stored in the history log.
19178 The version number is bumped, your changes are applied to the master RCS
19179 file, the document is unlocked and set to Read-Only mode.
19183 \begin_layout Standard
19186 ci -q -u -m"<description>" <file-name>
19189 \begin_layout Subsubsection
19195 \begin_layout Standard
19196 By doing this you lock the document so that only you can edit it.
19197 This will also make the document Read-Write only for you.
19198 You will usually continue editing for a while and when you are finished
19199 you check in your changes.
19200 The status line is changed to reflect that you have locked the file.
19204 \begin_layout Standard
19207 co -q -l <file-name>
19210 \begin_layout Subsubsection
19213 Revert To Repository Version
19216 \begin_layout Standard
19217 This will discard all changes made to the document since the last check
19219 You get a warning before changes are discarded.
19222 \begin_layout Standard
19225 co -f -u<version> <file-name>
19228 \begin_layout Subsubsection
19234 \begin_layout Standard
19235 This makes as if the last check in never happened.
19236 No changes are made to the document loaded into LyX, but the last version
19237 is removed from the master RCS file.
19241 \begin_layout Standard
19244 rcs -o<version> <file-name>
19247 \begin_layout Subsubsection
19253 \begin_layout Standard
19254 This shows the complete history of the RCS document.
19259 is shown in a browser.
19267 \begin_layout Subsubsection
19271 \begin_layout Standard
19272 LyX supports RCS version number information (only), see
19273 \begin_inset CommandInset ref
19275 reference "sub:VCS-Revision-Information"
19282 \begin_layout Subsection
19283 CVS commands in LyX
19286 \begin_layout Standard
19287 A subset of CVS operations is supported by LyX.
19288 You can find the commands in the
19290 File\SpecialChar \menuseparator
19292 \begin_inset space ~
19298 The version control system SVN is more powerful, so please use it instead
19299 of CVS if possible.
19302 \begin_layout Subsubsection
19308 \begin_layout Standard
19309 If you start from scratch with CVS you have to create your repository and
19310 checkout the working copy with external tools.
19311 If you're using a client-server setup you may need to login before doing
19312 the first repository checkout.
19315 \begin_layout Standard
19316 If your documents are under revision control and others are using the same
19317 repository problems arise when different changes to the same document at
19318 the same location happen.
19319 Standard CVS repositories doesn't operate with a file locking mechanism.
19320 This may be surprising, but conflicts only occur if people disagree on
19321 the proper content of the same part of a document.
19322 So, if co-workers are used to communicate regularly, these conflicts occur
19324 If they don't communicate they have a fundamental problem anyway.
19325 Nevertheless some people like to work with so called
19326 \begin_inset Quotes eld
19330 \begin_inset Quotes erd
19334 If they do so the working copy of all files is readonly when checked out
19335 first and the user starts editing after using a special command to make
19336 the working copy writable.
19337 When the changes are checked in the working copy returns to readonly state.
19338 With LyX one has to edit the
19339 \begin_inset Flex Code
19342 \begin_layout Plain Layout
19348 file and add the line
19349 \begin_inset Flex Code
19352 \begin_layout Plain Layout
19358 to work with reserved checkouts.
19359 The benefit is the possibility to see who is using a writable copy of some
19361 It's not guaranteed only one user makes a copy writable.
19364 \begin_layout Standard
19365 LyX tries to guess if you're using reserved or non-reserved checkouts.
19366 If your working copy is readonly or it is writable and an additional copy
19367 of your document exists in the CVS/Base sub-directory a reserved otherwise
19368 a non-reserved checkout is assumed.
19369 When a reserved checkout is detected you have to use
19370 \begin_inset Flex MenuItem
19373 \begin_layout Plain Layout
19379 to make your working copy writable if it's readonly.
19381 \begin_inset Flex MenuItem
19384 \begin_layout Plain Layout
19390 operation is possible and that makes your working copy readonly again after
19391 transferring your changes to the repository.
19394 \begin_layout Standard
19395 More information about CVS can be found here
19396 \begin_inset Flex URL
19399 \begin_layout Plain Layout
19401 http://www.nongnu.org/cvs
19407 \begin_inset Flex URL
19410 \begin_layout Plain Layout
19412 http://ximbiot.com/cvs
19420 \begin_layout Standard
19425 to understand the sub-commands and the switches mentioned below.
19428 \begin_layout Subsubsection
19434 \begin_layout Standard
19435 If your document is not under revision control, this is the only item shown
19437 And if it is under revision control, the
19444 item is not visible.
19448 \begin_layout Standard
19449 This command registers in CVS your document
19450 \begin_inset Flex Strong
19453 \begin_layout Plain Layout
19461 in case you have already the documents directory under CVS control (in
19467 This means you have to create or checkout the archive by yourself using
19469 (In case you forget that step LyX registers the document with RCS.)
19472 \begin_layout Standard
19473 Then you are asked interactively to supply an initial description of the
19475 Don't forget that registered file is not yet checked in.
19478 \begin_layout Standard
19479 CVS command that is run:
19481 cvs -q add -m"<entered message>" "<file-name>"
19484 \begin_layout Standard
19489 above and for all other CVS commands is an abbreviation for
19490 \begin_inset Quotes eld
19493 change the current working directory to file location and use the file name
19494 without path component as argument
19495 \begin_inset Quotes erd
19501 \begin_layout Subsubsection
19507 \begin_layout Standard
19508 When you are finished editing a file, you commit your changes.
19509 When you do this and you had changed the document, you are asked for a
19510 description of the changes.
19511 After that changes are written to the repository.
19512 In case you didn't change the document and a reserved checkout is detected
19513 the reservation made on
19514 \begin_inset Flex MenuItem
19517 \begin_layout Plain Layout
19526 \begin_layout Labeling
19527 \labelwidthstring 00.00.0000
19529 \begin_inset space ~
19533 \begin_inset space ~
19537 \begin_inset Newline newline
19541 \begin_inset Flex Code
19544 \begin_layout Plain Layout
19547 -q commit -m"<description>" "<file-name>"
19553 \begin_inset Newline newline
19557 \begin_inset Flex Code
19560 \begin_layout Plain Layout
19571 \begin_layout Subsubsection
19577 \begin_layout Standard
19578 When you are sharing a repository with others, you may have to incorporate
19579 their changes into your working copy.
19582 \begin_layout Standard
19585 cvs -q update "<file-name>"
19588 \begin_layout Standard
19589 If a readonly checkout is detected the working copy is made writable and
19593 \begin_layout Standard
19596 cvs -q edit "<file-name>"
19599 \begin_layout Subsubsection
19602 Revert To Repository Version
19605 \begin_layout Standard
19606 This will discard all changes made to the document since the last check
19608 You get a warning before changes are discarded.
19609 Firstly the file is deleted, secondly CVS update command is run.
19612 \begin_layout Standard
19615 cvs -q update "<file-name>"
19618 \begin_layout Standard
19619 If a reserved checkout is detected and the working copy has no changes only
19620 the reservation is undone.
19623 \begin_layout Standard
19626 cvs -q unedit "<file-name>"
19629 \begin_layout Subsubsection
19630 Update of the local directory checkout from repository
19633 \begin_layout Standard
19634 Once your documents gets more complex, containing sub-documents and pictures,
19636 \begin_inset Flex Code
19639 \begin_layout Plain Layout
19645 files and so on using version control becomes more complicated.
19646 LyX supports updating the whole tree in which resides the document.
19647 This become especially useful once you cooperate with people which neither
19648 have detailed knowledge about CVS usage nor they have ambition to commit
19649 additional material to the repository.
19650 You have to organize the files structure so that all external files are
19651 in the same directory or subdirectories of the document.
19652 It's good practice anyway to store multipart documents in an extra directory.
19655 \begin_layout Standard
19657 \begin_inset Flex Code
19660 \begin_layout Plain Layout
19661 Update local directory from repository
19666 command updates the whole directory.
19667 If local changes are detected user is warned before update starts.
19668 In case of merge conflicts both versions of the conflicting document parts
19669 are placed in the final document.
19670 You have to review and correct the result of the merge.
19671 You'll find the conflicts enclosed in pairs of
19672 \begin_inset Flex Code
19675 \begin_layout Plain Layout
19682 \begin_inset Flex Code
19685 \begin_layout Plain Layout
19692 \begin_inset Flex Code
19695 \begin_layout Plain Layout
19702 The first part is your version as before the update operation with the
19703 document name prepended.
19704 The second one is the repository version with the version number after
19706 \begin_inset Flex Code
19709 \begin_layout Plain Layout
19718 \begin_layout Labeling
19719 \labelwidthstring 00.00.0000
19721 \begin_inset space ~
19725 \begin_inset space ~
19729 \begin_inset Newline newline
19733 \begin_inset Flex Code
19736 \begin_layout Plain Layout
19744 (Ask if changes are detected.)
19745 \begin_inset Newline newline
19749 \begin_inset Flex Code
19752 \begin_layout Plain Layout
19753 cd $path; cvs -q update
19763 \begin_layout Standard
19765 \begin_inset Flex Code
19768 \begin_layout Plain Layout
19774 stands for the path to the document.
19777 \begin_layout Subsubsection
19783 \begin_layout Standard
19784 This shows the complete history of the CVS document.
19787 cvs log "<file-name>"
19789 is shown in a browser.
19792 \begin_layout Subsection
19793 SVN commands in LyX
19796 \begin_layout Standard
19797 SVN is now partially supported by LyX.
19798 You can find the commands in the
19800 File\SpecialChar \menuseparator
19802 \begin_inset space ~
19808 Please note that if you use password protected access to repository via
19809 ssh, you will be asked in terminal window.
19810 LyX was tested against SVN 1.5 and 1.6
19814 \begin_layout Plain Layout
19815 Most of the commands will work with 1.4 too, see
19816 \begin_inset CommandInset ref
19818 reference "sub:SVN-Repo-Update"
19830 \begin_layout Subsubsection
19836 \begin_layout Standard
19837 If your document is not under revision control, this is the only item shown
19839 And if it is under revision control, the
19846 item is not visible.
19850 \begin_layout Standard
19851 This command registers in SVN your document ONLY in case you have already
19852 the documents directory under SVN control (in particular
19857 This means you have to checkout the archive by yourself.
19861 \begin_layout Standard
19862 Then you are asked interactively to supply an initial description of the
19864 Don't forget that registered file is not yet commited.
19867 \begin_layout Standard
19868 SVN command that is run:
19871 \begin_inset Quotes eld
19875 \begin_inset Quotes erd
19881 \begin_layout Standard
19886 to understand the switches.
19890 \begin_layout Subsubsection
19896 \begin_layout Standard
19897 When you are finished editing a file, you commit your changes.
19898 When you do this, you are asked for a description of the changes.
19899 After that changes are commited.
19902 \begin_layout Standard
19907 \begin_layout Plain Layout
19908 In case locking is not enabled.
19910 \begin_inset CommandInset ref
19912 reference "subsec:SVN-File-Locking"
19923 svn commit -q -m"<description>" <file-name>
19926 \begin_layout Subsubsection
19932 \begin_layout Standard
19933 Updates the changes of this file from the repository.
19934 Be sure you understand SVN merging and conflicts resolving before using
19935 this function, because all conflicts has to be resolved manually by you!
19938 \begin_layout Standard
19943 \begin_layout Plain Layout
19951 svn update --non-interactive
19952 \begin_inset Quotes eld
19956 \begin_inset Quotes erd
19962 \begin_layout Subsubsection
19965 Revert To Repository Version
19968 \begin_layout Standard
19969 This will discard all changes made to the document since the last check
19971 You get a warning before changes are discarded.
19975 \begin_layout Standard
19979 \begin_inset Quotes eld
19983 \begin_inset Quotes erd
19989 \begin_layout Subsubsection
19990 \begin_inset CommandInset label
19992 name "sub:SVN-Repo-Update"
19996 Update of the local directory checkout from repository
20000 \begin_layout Plain Layout
20001 Note that this command will work only with subversion
20002 \begin_inset Formula $\geqq1.5$
20013 \begin_layout Standard
20014 All the commands above have one shortcomming - they deal with the current
20016 Once your document contains pictures, includes external
20017 \begin_inset Flex Code
20020 \begin_layout Plain Layout
20026 files and so on administration becomes more complicated.
20027 LyX now supports updating the whole tree in which resides the document
20031 \begin_layout Plain Layout
20032 One need to organize the files structure so that all external files are
20033 in the same directory or subdirectories of the document.
20040 This become especially useful once you cooperate with people which neither
20041 know about subversion management nor they have ambition to commit additional
20042 material to the repository.
20046 \begin_layout Standard
20047 \begin_inset Flex Code
20050 \begin_layout Plain Layout
20051 Update local directory from repository
20056 command updates the whole directory and in case of merge conflicts local
20057 version of the files are left, so no unintended data loss occurs.
20058 If local changes are detected user is warned before update starts.
20061 \begin_layout Labeling
20062 \labelwidthstring 00.00.0000
20064 \begin_inset space ~
20068 \begin_inset space ~
20072 \begin_inset Newline newline
20076 \begin_inset Flex Code
20079 \begin_layout Plain Layout
20085 (Ask if changes are detected.)
20086 \begin_inset Newline newline
20090 \begin_inset Flex Code
20093 \begin_layout Plain Layout
20094 svn update --accept mine-full $path
20102 \begin_layout Standard
20104 \begin_inset Flex Code
20107 \begin_layout Plain Layout
20113 stands for the path to the document.
20116 \begin_layout Subsubsection
20122 \begin_layout Standard
20123 This shows the complete history of the SVN document.
20127 \begin_inset Quotes eld
20131 \begin_inset Quotes erd
20136 is shown in a browser.
20139 \begin_layout Subsubsection
20141 \begin_inset CommandInset label
20143 name "subsec:SVN-File-Locking"
20150 \begin_layout Standard
20151 The file exchange through various revision control systems brings the problem
20152 of merge conflicts in case two different users try to edit the same (parts
20154 When such a conflict happens it needs manual resolving and one reasonable
20155 alternative is to provide some kind of locking mechanism, which guarantees
20156 that only one user is allowed to edit file at the given time.
20159 \begin_layout Standard
20160 SVN has two such mechanisms to provide mutual exclusivity for file access
20161 - locks and automatic setting of write permissions (see sec.
20163 \begin_inset CommandInset ref
20165 reference "subsec:Automatical-Locking-Property"
20170 \begin_inset Flex Code
20173 \begin_layout Plain Layout
20183 \begin_layout Plain Layout
20184 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20190 If this property is detected for a given document LyX starts to use SVN
20191 locks for document editing automatically and the whole check-in/out mechanism
20192 switches to the same regimen as for RCS.
20193 This in particular means there are two different modes of file use in LyX:
20196 \begin_layout Itemize
20198 The loaded file is in the read-only mode.
20199 For editing on needs to check-out.
20204 consists of updating from the repository and gaining write lock.
20205 If the lock is not possible to obtain, we remain in unlocked state.
20208 \begin_layout Itemize
20210 The loaded file is in the 'normal' edit mode.
20211 No other user is allowed to edit the file.
20216 consists of commiting changes and releasing write-lock.
20217 If no changes have been made to the document, no commit will be produced
20221 \begin_layout Plain Layout
20222 Don't be puzzled by the fact that you will be asked for commit message anyway.
20227 and only the write-lock will be released.
20230 \begin_layout Standard
20234 \begin_layout Labeling
20235 \labelwidthstring 00.00.0000
20238 svn commit -q -m"<description>" "<file-name>"
20239 \begin_inset Newline newline
20242 svn unlock "<file-name>"
20245 \begin_layout Labeling
20246 \labelwidthstring 00.00.0000
20249 svn update "<file-name>"
20250 \begin_inset Newline newline
20253 svn lock "<file-name>"
20256 \begin_layout Subsubsection
20259 \begin_inset CommandInset label
20261 name "subsec:Automatical-Locking-Property"
20267 Automatic Locking Property
20270 \begin_layout Standard
20271 The above mentioned automatic setting of write permissions of the .lyx file
20277 ile\SpecialChar \menuseparator
20283 \begin_inset space ~
20286 Control\SpecialChar \menuseparator
20291 oggle locking property
20294 This command is active only when the file is not locked on the svn server
20296 you need to check-out before proceeding).
20299 \begin_layout Labeling
20300 \labelwidthstring 00.00.0000
20302 \begin_inset space ~
20308 \begin_layout Labeling
20309 \labelwidthstring 00.00.0000
20312 svn propset svn:needs-lock ON "<file-name>"
20315 \begin_layout Labeling
20316 \labelwidthstring 00.00.0000
20319 svn propdel svn:needs-lock "<file-name>"
20322 \begin_layout Subsubsection
20323 \begin_inset CommandInset label
20325 name "sub:VCS-Revision-Information"
20329 Revision Information in Documents
20332 \begin_layout Standard
20333 There are more possibilities how to activate revision information in our
20337 \begin_layout Itemize
20338 LyX supports directly:
20342 \begin_layout Itemize
20343 tree revision information (
20344 \begin_inset Flex Code
20347 \begin_layout Plain Layout
20354 The result is the output of the
20355 \begin_inset Flex Code
20358 \begin_layout Plain Layout
20364 command, the following table gives you an idea, how to read the results.
20367 \begin_layout Standard
20369 \begin_inset Tabular
20370 <lyxtabular version="3" rows="6" columns="2">
20371 <features tabularvalignment="middle">
20372 <column alignment="center" valignment="top" width="0">
20373 <column alignment="center" valignment="top" width="0">
20375 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20378 \begin_layout Plain Layout
20384 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20387 \begin_layout Plain Layout
20395 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20398 \begin_layout Plain Layout
20404 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20407 \begin_layout Plain Layout
20408 mixed revision working copy
20415 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20418 \begin_layout Plain Layout
20424 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20427 \begin_layout Plain Layout
20428 modified working copy
20435 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20438 \begin_layout Plain Layout
20444 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20447 \begin_layout Plain Layout
20448 switched working copy
20455 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20458 \begin_layout Plain Layout
20464 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20467 \begin_layout Plain Layout
20468 partial working copy, from a sparse checkout
20475 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20478 \begin_layout Plain Layout
20484 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20487 \begin_layout Plain Layout
20488 mixed revision, modified, switched working copy
20501 \begin_layout Itemize
20502 file revision information.
20503 The result comes from parsing the output of
20504 \begin_inset Flex Code
20507 \begin_layout Plain Layout
20509 \begin_inset space ~
20513 \begin_inset space ~
20517 \begin_inset space ~
20526 Supported flags are:
20530 \begin_layout Itemize
20531 version number of the last commit (
20532 \begin_inset Flex Code
20535 \begin_layout Plain Layout
20544 \begin_layout Itemize
20545 author of the last commit (
20546 \begin_inset Flex Code
20549 \begin_layout Plain Layout
20558 \begin_layout Itemize
20559 date of the last commit (
20560 \begin_inset Flex Code
20563 \begin_layout Plain Layout
20572 \begin_layout Itemize
20573 time of the last commit (
20574 \begin_inset Flex Code
20577 \begin_layout Plain Layout
20587 \begin_layout Standard
20588 You can obtain this info via InsetInfo (e.g.
20590 \begin_inset Flex Code
20593 \begin_layout Plain Layout
20594 info-insert buffer vcs-date
20600 The information will be available only when you have the file stored under
20601 svn managment (i.e.
20603 \begin_inset Flex Code
20606 \begin_layout Plain Layout
20612 directory is available with your document).
20616 \begin_layout Itemize
20617 Another---a hacking one---possibility is to use svn keywords
20621 \begin_layout Plain Layout
20622 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20628 In short -- you set file keywords property (e.g.
20631 svn propset svn:keywords 'Rev' file.lyx
20633 ) and then paste keyword TeX code
20637 \begin_layout Plain Layout
20638 This is an easy way how to ensure that LyX won't break the line in the middle
20644 tag in your document (e.g.
20649 \begin_layout Plain Layout
20657 This way svn client will automatically substitute revision number (e.g.
20662 \begin_layout Plain Layout
20669 ) after each update and commit.
20670 There are more problems with this approach.
20671 Firstly, the '$' character is used in TeX world for math equations, so
20672 any occurence of math formula
20673 \begin_inset Formula $Rev$
20677 \begin_inset Formula $Rev:59$
20680 in your LyX document.
20681 Similarly for other keywords like Id, Date, Author, etc.
20682 Secondly svn output is dependent on your locales, so its very easy that
20683 svn would produce some problematic strings once Date is used.
20684 Thirdly you get the whole 'Rev: 59' string in your document instead of
20686 Until subversion implements user's custom keywords it will be hard to use
20687 this approach reliably or let LyX to support it directly.
20690 \begin_layout Subsection
20691 SVN and Windows Environment
20694 \begin_layout Quote
20695 My inclination is to say that if the user cannot figure out the command
20696 line operations on their own fairly quickly, they would be well advised
20697 to use TortoiseSVN.
20703 \begin_layout Subsubsection
20707 \begin_layout Standard
20708 In addition to installing LyX, and having access to a Subversion repository,
20709 the user will need to install the Subversion client program.
20710 A Windows installer for the client program is available from
20711 \begin_inset CommandInset href
20714 target "http://www.collab.net/nonav/downloads/subversion/"
20719 The user may also want to install
20720 \begin_inset CommandInset href
20723 target "http://tortoisesvn.tigris.org/"
20727 , which integrates Subversion operations into the context (rightclick) menu
20728 of Windows Explorer.
20729 Operations done outside LyX will typically be more convenient using the
20730 Explorer context menu.
20731 Note that TortoiseSVN is not a replacement for the client program, which
20732 is what LyX itself will use.
20735 \begin_layout Subsubsection
20736 Bringing a document under Subversion control
20739 \begin_layout Standard
20740 Before a LyX document can be brought under version control in Subversion,
20741 its parent directory needs to be under version control.
20742 If the document is being added to a project already in the repository,
20743 this is accomplished by checking the project out to the directory where
20744 the new document will be placed.
20745 If the project itself is not yet under version control (for instance, if
20746 this document starts a new project), the directory must be imported into
20748 This is done outside LyX.
20749 Both import and checkout are easily accomplished from the Explorer context
20750 menu using TortoiseSVN, or alternatively can be done using the command
20751 line client at a DOS prompt.
20752 The procedure for importing the project using TortoiseSVN is described
20753 below, assuming an existing repository and a new project being started
20761 For information on using the Subversion client program, run
20768 \begin_layout Enumerate
20775 in Windows Explorer, right click it, and select
20777 TortoiseSVN > Repo-browser
20780 If necessary, adjust the URL for the repository, then click OK.
20783 \begin_layout Enumerate
20784 Right click the level of the repository under which you want to place the
20785 new project folder (typically the top level) and click
20787 Create folder\SpecialChar \ldots{}
20790 Supply a name for the project folder and click OK.
20791 Add a message for the log file if desired, then click OK again.
20792 The new project folder should appear in the repository.
20793 Finally, click OK again to exit the repository browser.
20796 \begin_layout Enumerate
20797 Once again right click
20803 , this time selecting SVN Checkout\SpecialChar \ldots{}
20804 Select the URL of the project folder
20805 you just created in the repository, and set the checkout directory to
20813 You will be warned about a non-empty folder; click OK to proceed.
20814 You should now have a
20825 \begin_layout Enumerate
20826 Create or open your document in LyX and click
20831 ile\SpecialChar \menuseparator
20837 \begin_inset space ~
20840 Control\SpecialChar \menuseparator
20848 Add a log message and click OK to commit the document to version control.
20851 \begin_layout Standard
20852 From this point onward, you should have full functionality in the
20857 ile\SpecialChar \menuseparator
20863 \begin_inset space ~
20869 You also have the option of checking the document in and out, viewing its
20871 using the TortoiseSVN context menu in Windows Explorer or the Subversion
20872 client program from a command prompt.
20875 \begin_layout Subsubsection
20876 SSH tunnel used with SVN under Windows
20879 \begin_layout Standard
20880 Compared with Linux setting up svn client to communicate over ssh under
20881 Windows is a rather troublesome task.
20882 We will at least offer some hints how to setup the client side but prior
20883 knowledge about ssh and the Windows command line is needed, also be prepared
20884 for a great deal of frustration\SpecialChar \ldots{}
20888 \begin_layout Enumerate
20889 Get a svn client for windows, as described in the previous sections.
20890 When it is a fresh install run some svn command (e.g.
20892 \begin_inset Flex Code
20895 \begin_layout Plain Layout
20901 ) to create config files, which you will need to change later on.
20904 \begin_layout Enumerate
20905 Choose a ssh client for Windows.
20906 There are several possibilities, we will use the one from Putty tools
20910 \begin_layout Plain Layout
20911 \begin_inset Flex URL
20914 \begin_layout Plain Layout
20916 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20927 You will need to set the connection up so that the client doesn't ask for
20928 any password from you.
20929 To keep things easy we will use only keys without any additional password
20934 \begin_layout Enumerate
20936 \begin_inset Flex Code
20939 \begin_layout Plain Layout
20946 Save your private .ppk key file and put the public one on the server side.
20947 If the SVN server runs on Linux, note that the format of the public key
20948 is not compatible with Linux openssh and you will need to direcly copy-paste
20951 Public key for pasting into OpenSSH authorized_keys file
20953 :” edit field into the server's
20954 \begin_inset Flex Code
20957 \begin_layout Plain Layout
20958 ~/.ssh/authorized_keys
20964 \begin_inset Flex Code
20967 \begin_layout Plain Layout
20976 \begin_layout Enumerate
20978 \begin_inset Flex Code
20981 \begin_layout Plain Layout
20988 In the SVN config file
20992 \begin_layout Plain Layout
20993 Exact path depends on Windows version, usually somewhere around
20994 \begin_inset Flex Code
20997 \begin_layout Plain Layout
21000 Documents and Settings
21014 \begin_inset Flex Code
21017 \begin_layout Plain Layout
21032 , section [tunnels], setup ssh command, e.g.
21034 \begin_inset Flex Code
21037 \begin_layout Plain Layout
21038 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
21047 \begin_layout Plain Layout
21048 It will usually take a lot of time to get exact command right and it depends
21050 For example do not have some remote server saved as a default session in
21052 If things fail, try to connect via plink without SVN first.
21061 \begin_layout Enumerate
21062 Checkout the SVN archive, e.g.
21064 \begin_inset Flex Code
21067 \begin_layout Plain Layout
21068 svn co svn+ssh://user@server/repository_path
21076 \begin_layout Subsubsection
21077 End-of-Line Conversions
21080 \begin_layout Standard
21081 When the collsraborators are mixing Linux and Windows environments, LyX
21082 will use different line endings inside the .lyx files.
21083 This is not a problem as far as LyX functionality is concerned, but the
21084 commit diffs will be huge and merge-conflicts prone.
21085 Fortunately SVN itself knows
21089 \begin_layout Plain Layout
21090 \begin_inset Flex URL
21093 \begin_layout Plain Layout
21095 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
21105 how to deal with CR/LF problems when switching .lyx files to the
21106 \begin_inset Flex Code
21109 \begin_layout Plain Layout
21119 \begin_layout Plain Layout
21121 \begin_inset Flex Code
21124 \begin_layout Plain Layout
21125 svn propset svn:eol-style native FILE_NAME
21138 \begin_layout Subsection
21142 \begin_layout Standard
21143 With the recent addition of the vc-command function LyX power users are
21144 allowed to create their own commands for revision control.
21147 \begin_layout Standard
21148 As an example you can see how two TortoiseSVN commands could be integrated
21152 \begin_layout Description
21154 \begin_inset Flex Code
21157 \begin_layout Plain Layout
21158 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21166 \begin_layout Description
21168 \begin_inset Flex Code
21171 \begin_layout Plain Layout
21172 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21180 \begin_layout Subsection
21181 Version control and Document comparison
21184 \begin_layout Standard
21185 One of the typical uses of version control is to inspect the changes between
21186 revisions, usually by creating
21187 \begin_inset Flex Code
21190 \begin_layout Plain Layout
21197 While this is useful for plain text files, it is much less useful in the
21198 case of LyX files, which have more complicated structure.
21199 Hence we provide binding to the Document comparison feature.
21200 They are two ways of calling this feature - either by direct call of
21201 \begin_inset Flex Code
21204 \begin_layout Plain Layout
21210 LyX function (for details see LyX functions manual) or by icon/menu item
21212 \begin_inset Flex MenuItem
21215 \begin_layout Plain Layout
21216 Compare with older revision...
21222 One can either compare two chosen revisions of the document or he can simply
21223 compare the current version of edited text with older revisions (where
21225 \begin_inset Flex MenuItem
21228 \begin_layout Plain Layout
21234 ' revisions back means comparison of the edited file with last commited
21239 \begin_layout Standard
21240 This feature is supported for SVN and RCS though due to the more complicated
21241 versioning scheme of RCS there is a constraint -- when addressing the revisions
21242 in dialog, numbers always point to the last number in RCS revision number,
21247 \begin_layout Section
21248 Literate Programming
21251 \begin_layout Standard
21256 (kayvan@sylvan.com)
21260 original documentation written by
21262 Edmar Wienskoski Jr.
21265 (edmar-w-jr@technologist.com)
21268 \begin_layout Subsection
21272 \begin_layout Standard
21273 The main purpose of this documentation is to show you how to use LyX for
21274 literate programming, where it is assumed that you are familiar with this
21275 programming technique, and know what
21276 \begin_inset Quotes eld
21280 \begin_inset Quotes erd
21284 \begin_inset Quotes eld
21288 \begin_inset Quotes erd
21292 If that is not the case, please follow the web links provided in the following
21294 There is a lot of good documentation out there covering old development
21295 history to the latest tools tips.
21298 \begin_layout Standard
21299 It is also assumed that you are familiar with LyX itself to a point that
21300 you are comfortable changing your LyX preferences, and X resources file.
21301 If that is not the case please refer to other LyX documentation to cover
21302 your specific needs.
21305 \begin_layout Subsection
21306 Literate Programming
21309 \begin_layout Standard
21310 From the Literate Programming FAQ:
21313 \begin_layout Quotation
21314 Literate programming is the combination of documentation and source together
21315 in a fashion suited for reading by human beings.
21316 In fact, literate programs should be enjoyable reading, even inviting!
21317 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21318 and documentation in a single file.
21319 Literate programming tools then parse the file to produce either readable
21320 documentation or compilable source.
21321 The WEB style of literate programming was created by D.
21322 \begin_inset space \thinspace{}
21326 Knuth during the development of his TeX typesetting software.
21330 \begin_layout Standard
21331 Another excerpt says:
21334 \begin_layout Quotation
21337 How is literate programming different from verbose commenting?
21340 \begin_layout Quotation
21341 There are three distinguishing characteristics.
21342 In order of importance, they are:
21346 \begin_layout Itemize
21347 flexible order of elaboration
21350 \begin_layout Itemize
21351 automatic support for browsing
21354 \begin_layout Itemize
21355 typeset documentation, especially diagrams and mathematics
21359 \begin_layout Standard
21360 Now that I sparked your curiosity, take a look in the references.
21363 \begin_layout Subsubsection
21367 \begin_layout Standard
21368 The complete Literate Programming FAQ can be found at:
21371 \begin_layout Quote
21372 Literate Programming FAQ
21373 \begin_inset Flex URL
21376 \begin_layout Plain Layout
21378 http://www.literateprogramming.com/lpfaq.pdf
21386 \begin_layout Standard
21387 The FAQ lists 23 (twenty three!) different literate programming tools.
21388 Where some are specialized or
21389 \begin_inset Quotes eld
21393 \begin_inset Quotes erd
21396 for particular programming languages, while other have general scope.
21401 for my own use for several reasons:
21404 \begin_layout Itemize
21405 It can generate the documentation either in LaTeX or HTML.
21408 \begin_layout Itemize
21409 It has a open architecture, i.
21410 \begin_inset space \thinspace{}
21414 \begin_inset space \space{}
21417 it is easy to plug in new filters and to perform special processing that
21422 \begin_layout Itemize
21423 There is a good selection of filters available already (the HTML is one
21427 \begin_layout Itemize
21431 \begin_layout Standard
21432 The Noweb web page can be found at:
21435 \begin_layout Quote
21437 \begin_inset Flex URL
21440 \begin_layout Plain Layout
21442 http://www.cs.virginia.edu/~nr/noweb/
21450 \begin_layout Standard
21451 Starting from there you can reach many other interesting links and even
21452 some literate program examples.
21455 \begin_layout Subsection
21456 LyX and Literate Programming
21459 \begin_layout Standard
21460 The LyX support for Literate Programming is provided by using the generic
21461 LyX converters mechanism.
21462 This support is provided in a
21463 \begin_inset Quotes eld
21467 \begin_inset Quotes erd
21471 \begin_inset space \thinspace{}
21475 \begin_inset space \space{}
21478 you will be able to use this new LyX feature with some other literate programmin
21479 g tool of your choice by just changing your LyX preferences.
21482 \begin_layout Subsubsection
21483 Generating documents and code (weaving and tangling)
21486 \begin_layout Paragraph
21487 Selecting the document class
21490 \begin_layout Standard
21491 If you have installed Noweb and LyX successfully, whenever you open a new
21492 document or try to change the document class of an existing one, you will
21493 find that there are three new document classes available:
21496 \begin_layout Itemize
21500 \begin_layout Itemize
21504 \begin_layout Itemize
21508 \begin_layout Standard
21509 You must select one of them to create your literate documents from.
21513 \begin_layout Standard
21514 Note that literate documents are not limited to these three classes.
21515 New classes can be generated from other styles like letter or in combination
21516 with other class variations like Article (AMS).
21517 If you have special needs that cannot be covered by one of the existing
21518 classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21519 will arrange to insert a new entry, or teach you how to do it.
21523 \begin_layout Plain Layout
21524 It is very simple, it involves the creation of a file with four lines, and
21525 re-running of the auto configuration.
21530 Moreover, if you use a literate tool other than Noweb you may need to create
21531 a new set of document classes for it.
21534 \begin_layout Paragraph
21538 \begin_layout Standard
21539 LyX enables you to write code with a layout named
21547 \begin_layout Plain Layout
21548 The equivalent Noweb term is
21549 \begin_inset Quotes eld
21553 \begin_inset Quotes erd
21557 For historical reasons, I got used to the term
21558 \begin_inset Quotes eld
21562 \begin_inset Quotes erd
21565 introduced by other literate tool named Nuweb, which I used for many years
21566 before rendering myself to Noweb.
21571 Noweb delimits scraps like this:
21574 \begin_layout LyX-Code
21578 \begin_layout LyX-Code
21582 \begin_layout LyX-Code
21586 \begin_layout LyX-Code
21590 \begin_layout LyX-Code
21594 \begin_layout Standard
21595 The problem is that whatever is written in between the << and the
21599 must be taken literally, i.
21600 \begin_inset space \thinspace{}
21604 \begin_inset space \space{}
21607 LyX should be prevented from making any special interpretation of what has
21609 This is handled by a special layout named Scrap, that works like a normal
21610 paragraph but has a free spacing capability.
21613 \begin_layout Standard
21614 The down side of the Scrap paragraph layout is that consecutive paragraphs
21615 of code will be spaced with one empty line in the source code and also
21616 in the printed documentation.
21617 The work around is to enter each line of code within a single Scrap, with
21618 a newline (ctrl-return).
21619 The example above will look like this:
21623 \begin_layout Plain Layout
21624 If you have a printed version of this document you will not see any difference
21625 between the previous example and this one.
21633 \begin_layout LyX-Code
21635 \begin_inset Newline newline
21639 \begin_inset Newline newline
21643 \begin_inset Newline newline
21647 \begin_inset Newline newline
21653 \begin_layout Standard
21654 This layout works fine.
21655 The only real inconvenience is that you have to type ctrl-return instead
21660 \begin_layout Plain Layout
21661 It is in my list of
21662 \begin_inset Quotes eld
21666 \begin_inset Quotes erd
21677 \begin_layout Standard
21678 As a special note, you can also use the
21679 \begin_inset Quotes eld
21683 \begin_inset Quotes erd
21686 construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21690 \begin_layout LyX-Code
21692 \begin_inset Newline newline
21695 def some_function(args):
21696 \begin_inset Newline newline
21699 "This is the doc string for this function."
21700 \begin_inset Newline newline
21703 print "My args: ", args
21706 \begin_layout LyX-Code
21707 @ %def some_function
21710 \begin_layout Standard
21711 For an example of this usage and the resulting cross-reference output, look
21712 at the Literate python program in
21714 LIBDIR/examples/listerrors.lyx
21716 which should make this all clear.
21719 \begin_layout Paragraph
21720 Generating the documentation
21723 \begin_layout Standard
21724 At this point you already have a new document file with a proper document
21725 class, and with some code and text on it.
21726 How do I print it? The answer is simple, you select
21728 View\SpecialChar \menuseparator
21732 Just like you would do for a plain document.
21733 No special procedure is required.
21736 \begin_layout Standard
21737 To help orientate you, I will now explain what happens inside LyX:
21740 \begin_layout Enumerate
21743 Update\SpecialChar \menuseparator
21746 menu option is chosen, a LaTeX file is generated.
21751 \begin_layout Standard
21752 If the document is of any literate class the generated file will be named
21753 with an extension name defined by the
21754 \begin_inset Quotes eld
21758 \begin_inset Quotes erd
21761 format (defined in the Preferences panel), otherwise the file will have
21770 \begin_layout Enumerate
21771 Note that the only difference so far is in the name of the file, no special
21772 processing is required by LyX.
21773 Given that you formatted the code using the Scrap layout that, by itself,
21774 takes care of the business.
21777 \begin_layout Enumerate
21778 If the document is of any literate class LyX will then use the internal
21779 LyX to Noweb converter, followed by the Noweb to LaTeX converter
21783 \begin_layout Plain Layout
21784 The converters are defined in the
21786 Tools\SpecialChar \menuseparator
21790 \begin_inset Quotes eld
21794 \begin_inset Quotes erd
21806 manual for general information about converters.
21811 to generate the LaTeX file.
21815 \begin_layout Standard
21816 Otherwise it will just skip this step.
21820 \begin_layout Enumerate
21821 Finally, LaTeX is invoked and the regular post processing continues as in
21825 \begin_layout Standard
21826 Independence from a particular
21827 \begin_inset Quotes eld
21831 \begin_inset Quotes erd
21834 is easily achieved by changing the commands that are run by the various
21838 \begin_layout Paragraph
21839 Generating the code
21842 \begin_layout Standard
21843 When the build menu option is chosen or the corresponding button in the
21844 toolbar is pressed, a LaTeX file is generated just like step 1 above.
21845 Next, LyX invokes the
21850 This converter needs to be defined by the user and is not installed by
21851 default, though the Program format is.
21852 This converter (like any other converter) will have two parts:
21855 \begin_layout Enumerate
21856 The converter program itself.
21857 This program performs the conversion from the one format to the other (in
21858 this case, from the Noweb format to the Program pseudo-format).
21861 \begin_layout Enumerate
21862 The error log parser.
21863 This is a program whose sole purpose is to rewrite error messages in a
21864 format that LyX understands.
21865 This makes it possible for LyX to place error boxes in the right places
21866 in the file buffer.
21869 \begin_layout Standard
21870 The first part, the
21871 \begin_inset Quotes eld
21875 \begin_inset Quotes erd
21878 setting, should be set to
21879 \begin_inset Quotes eld
21887 \begin_inset Quotes erd
21891 This basically means that LyX will call
21892 \begin_inset Quotes eld
21896 \begin_inset Quotes erd
21899 (a program or script) with the name of the Noweb file (normally a file
21900 in the LyX temp directory).
21904 \begin_layout Standard
21905 This is an implementation of
21906 \begin_inset Quotes eld
21910 \begin_inset Quotes erd
21913 that you can place in a directory on your path:
21916 \begin_layout LyX-Code
21920 \begin_layout LyX-Code
21924 \begin_layout LyX-Code
21925 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
21928 \begin_layout Standard
21929 The next part of the converter setting is the
21930 \begin_inset Quotes eld
21934 \begin_inset Quotes erd
21937 which is to be set to
21938 \begin_inset Quotes eld
21943 parselog=listerrors
21946 \begin_inset Quotes erd
21950 This will run any errors that are generated by the
21951 \begin_inset Quotes eld
21955 \begin_inset Quotes erd
21958 process through the
21959 \begin_inset Quotes eld
21963 \begin_inset Quotes erd
21969 \begin_layout Standard
21970 The converter code looks in
21978 then on the path for the
21979 \begin_inset Quotes eld
21983 \begin_inset Quotes erd
21989 \begin_layout Standard
21990 The build will normally take place in LyX's temporary directory, so the
21991 files produced by the conversion will be in that directory.
21992 LyX will copy out what it regards as the `main' file, but the
21996 conversion may produce several files, and so most of these would then be
21997 deleted when LyX was closed.
21998 The present solution is to use a `copier',
22002 \begin_layout Plain Layout
22011 manual for information on these.
22020 script in its default mode, so that the entire contents of the temporary
22021 directory is copied.
22022 More will get copied than is needed, to be sure, but nothing will be lost.
22023 If, however, you know what extensions the generated files will have, this
22024 can be improved by using the
22033 This option takes a comma-separated list of extensions to copy.
22034 So, for example, if the conversion will generate only files with the extensions
22043 , then the correct definition would be:
22046 \begin_layout LyX-Code
22047 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
22050 \begin_layout Standard
22051 The result will be that only files with these two extensions will be copied
22055 \begin_layout Paragraph
22056 Build instructions in the document
22059 \begin_layout Standard
22060 The last piece of the integration between LyX and noweb is the
22061 \begin_inset Quotes eld
22065 \begin_inset Quotes erd
22069 Generally, the instructions for building your program should be embedded
22070 in a scrap of its own.
22072 \begin_inset Quotes eld
22076 \begin_inset Quotes erd
22079 above uses the notangle command to look for this scrap (called
22080 \begin_inset Quotes eld
22084 \begin_inset Quotes erd
22087 ) and runs its contents through
22088 \begin_inset Quotes eld
22092 \begin_inset Quotes erd
22098 \begin_layout Standard
22099 Typically, such a scrap would look something like this:
22102 \begin_layout LyX-Code
22104 \begin_inset Newline newline
22108 \begin_inset Newline newline
22112 \begin_inset Newline newline
22115 if [ -z "${NOWEB_SOURCE}" ]
22116 \begin_inset Newline newline
22120 \begin_inset Newline newline
22123 NOWEB_SOURCE=myfile.nw
22124 \begin_inset Newline newline
22128 \begin_inset Newline newline
22132 code to extract files ...]
22133 \begin_inset Newline newline
22137 code to compile files ...]
22138 \begin_inset Newline newline
22144 \begin_layout Standard
22147 LIBDIR/examples/listerrors.lyx
22151 LIBDIR/examples/Literate.lyx
22153 which implement two versions of the
22154 \begin_inset Quotes eld
22158 \begin_inset Quotes erd
22161 program for some illustrations of how all of these pieces go together or
22164 LIBDIR/examples/noweb2lyx.lyx.
22167 Interestingly, these three files show off the language-indepence of the
22168 LyX literate programming support since they are written in Python, C and
22172 \begin_layout Subsubsection
22176 \begin_layout Standard
22177 All the Literate Programming support is configured by the
22179 Tools\SpecialChar \menuseparator
22183 \begin_inset Quotes eld
22187 \begin_inset Quotes erd
22191 The important parts are:
22194 \begin_layout Description
22196 \begin_inset space ~
22200 \begin_inset Quotes eld
22204 \begin_inset Quotes erd
22208 \begin_inset space ~
22211 format Set up via the Formats tab, this is where the Noweb-specific pieces
22221 , the file extension is set to
22226 This tells LyX to create a file with a
22230 extension in the first step of the conversion process.
22233 \begin_layout Description
22235 \begin_inset space ~
22243 \begin_inset space ~
22246 format This is an empty format whose sole purpose is to be the endpoint
22247 of a conversion (which then allows us to set up a converter for it).
22250 \begin_layout Description
22259 This converter performs the
22260 \begin_inset Quotes eld
22264 \begin_inset Quotes erd
22267 of the literate document.
22268 For Noweb, it is set to
22269 \begin_inset Quotes eld
22274 noweave -delay -index $$i > $$o
22277 \begin_inset Quotes erd
22283 \begin_layout Description
22293 \begin_inset Quotes eld
22297 \begin_inset Quotes erd
22301 As stated above, the Converter is set to
22302 \begin_inset Quotes eld
22310 \begin_inset Quotes erd
22313 , with Flags set to
22314 \begin_inset Quotes eld
22319 originaldir,parselog=listerrors
22322 \begin_inset Quotes erd
22328 \begin_layout Subsubsection
22332 \begin_layout Standard
22333 There is also a new function implemented in the LyX server, the
22334 \begin_inset Quotes eld
22337 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22341 \begin_layout Standard
22342 When debugging code with ddd/gdb, it is possible to invoke a text editor
22343 at the current execution position with a single key stroke.
22344 The default ddd configuration for that is shift-ctrl-V.
22345 It happens that you can define the editor command line invocation in ddd
22348 Edit\SpecialChar \menuseparator
22349 Preferences\SpecialChar \menuseparator
22352 dialog and changing the "Edit Sources" entry.
22355 \begin_layout Standard
22356 I take advantage of the new created LyX server function and this ddd feature,
22358 \begin_inset Quotes eld
22362 \begin_inset Quotes erd
22368 \begin_layout LyX-Code
22369 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22372 \begin_layout Standard
22373 With this, whenever you are using ddd and find a point in the program that
22374 you want to edit, you just press shift-ctrl-V (in the ddd window), and
22375 ddd you forward this information to LyX through the LyX server and then
22376 the LyX window will show the same file with the cursor at the same position
22377 ddd was pointing to.
22378 No more guessing or long scrolling to locate a point in the program back
22382 \begin_layout Standard
22383 Note however that you must enable the LyX server to get this feature working
22384 (it is disabled by default).
22385 You can enable it in
22397 ) by entering in the
22402 \begin_inset Quotes eld
22407 /home/<your-home-directory>/.lyx/lyxpipe
22410 \begin_inset Quotes erd
22416 \begin_layout Standard
22417 Read the LyX server documentation in the
22419 Customization Manual
22421 for further information.
22424 \begin_layout Subsubsection
22428 \begin_layout Standard
22429 There are six new buttons that can be added to your LyX toolbar.
22430 Five of these buttons are short cuts to layout styles:
22451 The last one is a short cut to the
22452 \begin_inset Quotes eld
22456 \begin_inset Quotes erd
22463 \begin_layout Standard
22464 LyX has a range of buttons that are available for tool bar customization.
22465 In my toolbar I like to combine the six short cuts above with two more:
22470 \SpecialChar \menuseparator
22475 \SpecialChar \menuseparator
22482 View\SpecialChar \menuseparator
22486 Here is how it looks like:
22489 \begin_layout LyX-Code
22493 \begin_layout LyX-Code
22497 \begin_layout LyX-Code
22498 Icon "layout Standard"
22501 \begin_layout LyX-Code
22502 Icon "layout Section"
22505 \begin_layout LyX-Code
22506 Icon "layout LaTeX"
22509 \begin_layout LyX-Code
22510 Icon "layout LyX-Code"
22513 \begin_layout LyX-Code
22514 Icon "layout Scrap"
22517 \begin_layout LyX-Code
22521 \begin_layout LyX-Code
22525 \begin_layout LyX-Code
22526 Icon "buffer-typeset"
22529 \begin_layout LyX-Code
22530 Icon "build-program"
22533 \begin_layout LyX-Code
22537 \begin_layout LyX-Code
22541 \begin_layout LyX-Code
22545 \begin_layout LyX-Code
22549 \begin_layout LyX-Code
22553 \begin_layout Subsubsection
22554 Colors customization
22557 \begin_layout Standard
22558 There are a number of colors in LyX that can be customized in
22563 One of the things that bothers people is the LaTeX font color.
22564 The default color is red, since the scraps uses LaTeX font, and there is
22565 a lot of scraps in literate documents, you may get tired of seeing everything
22567 You can change it by going to the tabs
22576 \begin_layout Standard
22577 The next thing is the visible presence of the newline character in the screen.
22578 You can choose the color of this particular character and make it blend
22580 I recommend you choosing a color that is close to the background but not
22581 equal, that way you still can see it is there, but it is not bothering
22586 \begin_layout Chapter
22587 Secrets of the LaTeX Masters
22588 \begin_inset CommandInset label
22597 \begin_layout Standard
22598 Though LyX is a powerful tool, it cannot hope to support everything that
22599 can be done with pure TeX/LaTeX.
22600 However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
22601 as long as you are not afraid to use that
22602 \begin_inset Quotes eld
22606 \begin_inset Quotes erd
22609 button on the toolbar or add things to the LaTeX preamble.
22610 This section lists some tips, tricks, and otherwise cool ideas to give
22611 your document that extra little flair.
22614 Do try this at home
22616 , just start with something a little smaller and less important than your
22620 \begin_layout Standard
22621 Most ideas in this section require less common files in your LaTeX installation.
22622 If you have a system like TeXLive, most will already be available.
22623 A few, however, will need to be downloaded from one of the CTAN archives.
22624 Often, there are several ways to do something, or several LaTeX style files
22625 which do the same thing.
22626 We do not endorse one choice over another, we simply claim that we have
22627 done a particular task with a particular file.
22628 Put on your wizard hat, keep an eye out for dragons, and let us begin.
22631 \begin_layout Section
22635 \begin_layout Standard
22638 Lars Gullik Bjønnes
22641 \begin_layout Subsection
22645 \begin_layout Standard
22646 The aim for this chapter
22650 \begin_layout Plain Layout
22651 Editor's note: Lars' original chapter was a masterful description of how
22657 However, it was too long to flow smoothly in this document.
22658 I have therefore chosen to excerpt the most important sections here (sorry,
22659 Lars); you can read the original chapter (and more of the story!) in the
22662 examples/multicol.lyx
22670 is to show how the LaTeX package
22674 can be used in a LyX document.
22675 As LyX doesn't support the
22679 package natively yet, we have to use some small hacks.
22680 By reading this section it should be obvious how to do this.
22683 \begin_layout Subsection
22687 \begin_layout Standard
22692 package allows switching between one and multicolumn format on the same
22694 Footnotes are handled correctly (for the most part), but will be placed
22695 at the bottom of the page and not under each column.
22696 LaTeX's float mechanism, however, is partly disabled in the current implementat
22698 At the moment only page-wide floats can be used within the scope of the
22702 \begin_layout Subsection
22706 \begin_layout Subsubsection
22710 \begin_layout Standard
22711 If you want to have two columns in your text, you have use LaTeX mode to
22716 begin{multicols}{2}
22718 at the point where you want the two column layout to start, and then
22724 where you want it to end.
22728 \begin_layout Standard
22732 \begin_layout Plain Layout
22736 begin{multicols}{2}
22744 \begin_layout Standard
22749 The Adventure of the Empty House
22752 \begin_inset Newline newline
22757 Sir Arthur Conan Doyle
22760 \begin_layout Standard
22763 It was in the spring of the year 1894 that all London was interested, and
22764 the fashionable world dismayed, by the murder of the Honourable Ronald
22765 Adair under most unusual and inexplicable circumstances.
22766 The public has already learned those particulars of the crime which came
22767 out in the police investigation, but a good deal was suppressed upon that
22768 occasion, since the case for the prosecution was so overwhelmingly strong
22769 that it was not necessary to bring forward all the facts.
22770 Only now, at the end of nearly ten years, am I allowed to supply those
22771 missing links which make up the whole of that remarkable chain.
22772 The crime was of interest in itself, but that interest was as nothing to
22773 me compared to the inconceivable sequel, which afforded me the greatest
22774 shock and surprise of any event in my adventurous life.
22775 Even now, after this long interval, I find myself thrilling as I think
22776 of it, and feeling once more that sudden flood of joy, amazement, and increduli
22777 ty which utterly submerged my mind.
22778 Let me say to that public, which has shown some interest in those glimpses
22779 which I have occasionally given them of the thoughts and actions of a very
22780 remarkable man, that they are not to blame me if I have not shared my knowledge
22781 with them, for I should have considered it my first duty to do so, had
22782 I not been barred by a positive prohibition from his own lips, which was
22783 only withdrawn upon the third of last month.
22786 \begin_layout Standard
22790 \begin_layout Plain Layout
22802 \begin_layout Subsubsection
22806 \begin_layout Standard
22807 The same pattern is used when you want more than two columns:
22810 \begin_layout Standard
22814 \begin_layout Plain Layout
22818 begin{multicols}{3}
22826 \begin_layout Standard
22829 It can be imagined that my close intimacy with Sherlock Holmes had interested
22830 me deeply in crime, and that after his disappearance I never failed to
22831 read with care the various problems which came before the public.
22832 And I even attempted, more than once, for my own private satisfaction,
22833 to employ his methods in their solution, though with indifferent success.
22834 There was none, however, which appealed to me like this tragedy of Ronald
22836 As I read the evidence at the inquest, which led up to a verdict of willful
22837 murder against some person or persons unknown, I realized more clearly
22838 than I had ever done the loss which the community had sustained by the
22839 death of Sherlock Holmes.
22840 There were points about this strange business which would, I was sure,
22841 have specially appealed to him, and the efforts of the police would have
22842 been supplemented, or more probably anticipated, by the trained observation
22843 and the alert mind of the first criminal agent in Europe.
22844 All day, as I drove upon my round, I turned over the case in my mind and
22845 found no explanation which appeared to me to be adequate.
22846 At the risk of telling a twice-told tale, I will recapitulate the facts
22847 as they were known to the public at the conclusion of the inquest.
22850 \begin_layout Standard
22854 \begin_layout Plain Layout
22866 \begin_layout Standard
22867 You can have more than 3 columns if you want to, but that might not be very
22868 pleasant for the eye.
22871 \begin_layout Subsubsection
22872 Columns inside columns
22875 \begin_layout Standard
22876 You can even have columns inside columns:
22879 \begin_layout Standard
22883 \begin_layout Plain Layout
22887 begin{multicols}{2}
22895 \begin_layout Standard
22898 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22899 at that time governor of one of the Australian colonies.
22900 Adair's mother had returned from Australia to undergo the operation for
22901 cataract, and she, her son Ronald, and her daughter Hilda were living together
22905 \begin_layout Standard
22909 \begin_layout Plain Layout
22913 begin{multicols}{2}
22921 \begin_layout Standard
22924 The youth moved in the best society–had, so far as was known, no enemies
22925 and no particular vices.
22926 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22927 had been broken off by mutual consent some months before, and there was
22928 no sign that it had left any very profound feeling behind it.
22929 For the rest {sic} the man's life moved in a narrow and conventional circle,
22930 for his habits were quiet and his nature unemotional.
22931 Yet it was upon this easy-going young aristocrat that death came, in most
22932 strange and unexpected form, between the hours of ten and eleven-twenty
22933 on the night of March 30, 1894.
22936 \begin_layout Standard
22940 \begin_layout Plain Layout
22952 \begin_layout Standard
22955 Ronald Adair was fond of cards–playing continually, but never for such stakes
22957 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22958 It was shown that, after dinner on the day of his death, he had played
22959 a rubber of whist at the latter club.
22960 He had also played there in the afternoon.
22965 The evidence of those who had played with him– Mr.
22966 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
22967 and that there was a fairly equal fall of the cards.
22968 Adair might have lost five pounds, but not more.
22969 His fortune was a considerable one, and such a loss could not in any way
22971 He had played nearly every day at one club or other, but he was a cautious
22972 player, and usually rose a winner.
22973 It came out in evidence that, in partnership with Colonel Moran, he had
22974 actually won as much as four hundred and twenty pounds in a sitting, some
22975 weeks before, from Godfrey Milner and Lord Balmoral.
22976 So much for his recent history as it came out at the inquest.
22979 \begin_layout Standard
22983 \begin_layout Plain Layout
22995 \begin_layout Standard
22996 Please do read the file
22998 examples/multicol.lyx
23000 for more advanced examples including column and header spacing, vertical
23001 separator lines, and more.
23004 \begin_layout Section
23009 Paragraph Environment
23010 \begin_inset Argument
23013 \begin_layout Plain Layout
23014 Numbering in Enumerate
23022 \begin_layout Standard
23028 \begin_layout Standard
23029 \begin_inset VSpace bigskip
23035 \begin_layout Standard
23037 The default numbering for the
23041 paragraph environment begins with Arabic numbers and ends with uppercase
23043 Suppose, however, you wanted a different type of numbering scheme.
23044 Here's a quickie example of how to change the numbering scheme:
23047 \begin_layout LyX-Code
23057 \begin_layout LyX-Code
23067 \begin_layout LyX-Code
23077 \begin_layout LyX-Code
23087 \begin_layout Standard
23088 \SpecialChar \ldots{}
23089 which changes the numbering scheme to uppercase Roman numerals, uppercase
23090 letters, Arabic numbers, and lowercase letter.
23093 \begin_layout Standard
23094 Additionally, the previous example also adds a little bit extra to the numbering
23096 For example, the first level label actually looks like:
23097 \begin_inset Quotes eld
23101 \begin_inset Quotes erd
23105 For ease of reading, we'll describe what the numbering schemes look like
23106 using a notation something like this: <
23107 \begin_inset Quotes eld
23111 \begin_inset Quotes erd
23115 \begin_inset space ~
23119 \begin_inset Quotes erd
23123 \begin_inset Quotes erd
23127 \begin_inset space ~
23131 \begin_inset Quotes erd
23135 \begin_inset Quotes erd
23139 \begin_inset space ~
23143 \begin_inset Quotes eld
23147 \begin_inset Quotes erd
23154 \begin_layout Standard
23155 As you can see in the example, there is a label command for each nesting
23162 \SpecialChar \ldots{}
23169 , as well as a counter,
23173 \SpecialChar \ldots{}
23179 There are also five
23180 \begin_inset Quotes eld
23184 \begin_inset Quotes erd
23217 , each of which take one counter as an argument.
23218 You can add characters before or after these, but there's no need to add
23222 \begin_layout Standard
23223 You can get really fancy with these.
23227 \begin_layout LyX-Code
23241 \begin_layout LyX-Code
23253 \begin_layout LyX-Code
23263 \begin_layout LyX-Code
23273 \begin_layout Standard
23274 produces the somewhat out of hand numbering scheme: <
23275 \begin_inset Quotes eld
23279 \begin_inset Quotes erd
23283 \begin_inset space ~
23287 \begin_inset Quotes erd
23291 \begin_inset Quotes erd
23295 \begin_inset space ~
23299 \begin_inset Quotes erd
23303 \begin_inset Quotes erd
23307 \begin_inset space ~
23311 \begin_inset Quotes eld
23315 \begin_inset Quotes erd
23322 \begin_layout Section
23326 \begin_layout Standard
23332 \begin_layout Standard
23333 \begin_inset VSpace bigskip
23339 \begin_layout Standard
23344 \begin_layout Plain Layout
23350 tmpfont}{cmr17 scaled 2500}{
23362 \begin_layout Standard
23367 \begin_layout Plain Layout
23378 hose of you who like the style of old books probably also like
23379 \begin_inset Quotes eld
23383 \begin_inset Quotes erd
23386 —those large capital letters which begin each new chapter or section.
23387 Implementing them with plain LyX/LaTeX is straightforward (assuming you
23388 know some plain TeX!) but does require a lot of work and many iterations,
23389 as you can see by all the ugly TeX-mode stuff at the beginning of this
23393 \begin_layout Standard
23397 \begin_layout Plain Layout
23403 bigdrop{-1em}{3}{ptmri}{T}+
23408 here is a much easier way of doing this, of course.
23417 ) package from CTAN allows a simple way to add such letters to your documents.
23418 Since this package is not a standard part of TeXLive, I can't demonstrate
23419 it within this document, but if you copy this paragraph to a new document,
23421 \begin_inset Quotes eld
23431 \begin_inset Quotes erd
23434 and the pluses from the TeX code at the beginning of the paragraph, and
23439 usepackage{dropcaps}
23441 to your LaTeX preamble, you will get a nice Times Roman Italic
23442 \begin_inset Quotes eld
23446 \begin_inset Quotes erd
23449 , whose height is three lines of text and which protrudes 1 em into the
23451 (Make certain you have copied
23452 \begin_inset Quotes eld
23460 \begin_inset Quotes erd
23463 into a directory where TeX can see it.) The first argument is the amount
23464 of indentation; in this case the negative sign moves it into the margin.
23465 The second argument is the height of the letter in number of lines of text.
23466 The third argument is the font name: virtually anything which has a tfm
23467 file should work (wade through the
23469 .../texmf/fonts/tfm
23471 directory for possibilities).
23472 My personal favorite is
23473 \begin_inset Quotes eld
23481 \begin_inset Quotes erd
23484 , a fancy German font specifically designed for dropped capitals.
23485 The fourth argument is the letter (or letters) to be dropped.
23490 package also offers the
23496 command, as well as a slightly simplified
23505 \begin_layout Section
23506 Non-standard Paragraph Shapes
23509 \begin_layout Standard
23515 \begin_layout Standard
23516 \begin_inset VSpace bigskip
23522 \begin_layout Standard
23526 \begin_layout Plain Layout
23538 \begin_layout Standard
23542 \begin_layout Plain Layout
23551 \begin_layout Plain Layout
23565 \begin_layout Standard
23570 \begin_layout Plain Layout
23581 \begin_layout Plain Layout
23590 \begin_layout Plain Layout
23599 \begin_layout Plain Layout
23608 \begin_layout Plain Layout
23617 \begin_layout Plain Layout
23626 \begin_layout Plain Layout
23635 \begin_layout Plain Layout
23644 \begin_layout Plain Layout
23653 \begin_layout Plain Layout
23662 \begin_layout Plain Layout
23671 \begin_layout Plain Layout
23680 \begin_layout Plain Layout
23689 \begin_layout Plain Layout
23698 \begin_layout Plain Layout
23707 \begin_layout Plain Layout
23716 \begin_layout Plain Layout
23725 \begin_layout Plain Layout
23734 \begin_layout Plain Layout
23743 \begin_layout Plain Layout
23749 There are times when the tyranny of rectangular paragraphs must be overthrown.
23750 In such situations, a call to the delightful plain TeX command
23757 As you can see, completely arbitrary shapes can be laid out with a suitable
23758 set of linelength definitions.
23759 While this parshape may look a bit silly and useless, one could conceive
23760 of situations such as finely tuned dropped capitals, word wrapping around
23761 non-rectangular graphics, etc.
23762 which will benefit from such handcrafting.
23765 \begin_layout Standard
23766 \begin_inset VSpace bigskip
23772 \begin_layout Standard
23777 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23784 is the number of lines of text which define the paragraph.
23785 If there turn out to be fewer lines, the shape is truncated; if there are
23786 more, the excess lines have the same dimensions as the last line of the
23796 entries specify the indentation of the line from the left margin, and the
23797 length of the line as measured from that point.
23798 The shape applies only to the current paragraph; everything is reset to
23799 normal for the next paragraph.
23802 \begin_layout Standard
23806 \begin_layout Plain Layout
23818 \begin_layout Section
23822 \begin_layout Standard
23823 As you can see, the examples in this section range from the useful to the
23825 While I don't expect that anyone will ever need the paragraph shape demonstrate
23826 d in the last section, the important point is that you can do almost anything
23827 you want in LyX if you are willing to figure out how to do it in TeX and
23829 TeX is a fantastically powerful typesetting system and all that power is
23830 available to you since LyX uses it as its backend.