1 #LyX 2.0.0svn created this file. For more info see http://www.lyx.org/
7 % DO NOT ALTER THIS PREAMBLE!!!
9 % This preamble is designed to ensure that the manual prints
10 % out as advertised. If you mess with this preamble,
11 % parts of the manual may not print out as expected. If you
12 % have problems LaTeXing this file, please contact
13 % the documentation team
14 % email: lyx-docs@lists.lyx.org
20 % set fonts for nicer pdf view
21 \IfFileExists{lmodern.sty}
22 {\usepackage{lmodern}}{}
24 \fi % end if pdflatex is used
26 % the pages of the TOC are numbered roman
27 % and a PDF-bookmark for the TOC is added
29 \let\myTOC\tableofcontents
30 \renewcommand{\tableofcontents}{%
31 \pdfbookmark[1]{\contentsname}{}
34 \pagenumbering{arabic}}
36 % redefine the \LyX macro for PDF bookmarks
37 \def\LyX{\texorpdfstring{%
38 L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}
41 % used for multi-column text
44 % extra space for tables
45 \newcommand{\extratablespace}[1]{\noalign{\vskip#1}}
47 \options fleqn,liststotoc,bibtotoc,idxtotoc,BCOR7.5mm,titlepage,tablecaptionabove
48 \use_default_options false
54 \maintain_unincluded_children false
57 InsetLayout CharStyle:MenuItem
66 \newcommand*{\menuitem}[1]{{\sffamily #1}}
75 \font_typewriter default
76 \font_default_family default
84 \default_output_format default
86 \bibtex_command default
87 \index_command default
91 \pdf_title "LyX's Additional Features manual"
92 \pdf_author "LyX Team"
93 \pdf_subject "LyX's additional features documentation"
94 \pdf_keywords "LyX, Documentation, Additional"
96 \pdf_bookmarksnumbered true
97 \pdf_bookmarksopen false
98 \pdf_bookmarksopenlevel 1
103 \pdf_pdfusetitle false
104 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false, pdfpagelabels"
114 \paperorientation portrait
123 \paragraph_separation indent
124 \paragraph_indentation default
125 \quotes_language english
128 \paperpagestyle headings
129 \tracking_changes true
130 \output_changes false
135 \author 3 "Stephan Witt"
141 Additional LyX Features
149 \begin_layout Plain Layout
151 Principal maintainer of this file is
156 If you have comments or error corrections, please send them to the LyX
157 Documentation mailing list,
158 \begin_inset Flex Code
161 \begin_layout Plain Layout
163 <lyx-docs@lists.lyx.org>
176 \begin_layout Standard
177 \begin_inset CommandInset toc
178 LatexCommand tableofcontents
185 \begin_layout Chapter
189 \begin_layout Standard
190 This manual is essentially Part II of the
192 User's Guide\SpecialChar \@.
195 The reason for separating this document out is simple: the
199 is already quite lengthy, and it contains information on all of the basic
200 features one needs to know in order to prepare most documents.
201 However, the LyX Team has worked to make LyX extensible through various
202 configuration files and external packages.
203 That means that if you want to support the Fizzwizzle LaTeX package, you
204 can create a layout file (or module) for it without having to alter LyX
206 We've already had contributions of several new features this way, and some
207 of them are documented here.
208 There are also some more `advanced' features, such as how to control the
209 presentation of bibliographies and how to work with multi-part documents,
210 that are not covered in the
214 and are discussed here.
217 \begin_layout Standard
218 This manual also documents some special features, like fax support, version
219 control, and SGML support, which require additional software to work properly.
220 There is also a chapter on LyX's support for HTML.
221 And lastly, there's a chapter of LaTeX tools and tips, things you can use
222 to spruce up your documents by directly using the powerful features of
228 only WYSIWYM and will only ever interface to some, not all, LaTeX features.
231 \begin_layout Standard
232 If you haven't read the
236 yet, you are definitely in the wrong manual.
241 is the first place to go, since it describes the notation and format of
243 You should also be thoroughly familiar with the
247 and all of the basic features of LyX before attempting to read this one.
250 \begin_layout Standard
251 Since many of the topics in this manual depend heavily on LyX's interaction
252 with LaTeX, this first chapter covers the inner workings of LyX and how
253 to direct LyX to generate exactly the LaTeX code you want.
254 It is obviously for more seasoned LyX users.
257 \begin_layout Chapter
261 \begin_layout Section
265 \begin_layout Standard
266 This chapter is for both TeX-nicians and the LaTeX-curious.
267 In it, we'll explain how LyX and LaTeX work together to produce printable
269 This is the only place in any of the manuals where we assume you know something
273 \begin_layout Standard
274 At one time, LyX was called a
275 \begin_inset Quotes eld
278 WYSIWYM frontend to LaTeX,
279 \begin_inset Quotes erd
282 but that's no longer true.
283 There are frontends to LaTeX out there.
287 \begin_layout Plain Layout
288 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
289 There are also the LaTeX modes for vi and emacs, of course.
294 These are basically text editors with the ability to run LaTeX and mark
295 any errors in the file you're editing.
304 run LaTeX, and it also indicates errors in the file, it also does much,
306 For one thing, you don't need to know LaTeX to use LyX effectively.
307 And LyX has added its own extensions to LaTeX.
308 Try the following sometime: select
309 \begin_inset Flex MenuItem
312 \begin_layout Plain Layout
313 Export\SpecialChar \menuseparator
320 \begin_inset Flex MenuItem
323 \begin_layout Plain Layout
330 \begin_inset Flex MenuItem
333 \begin_layout Plain Layout
334 View\SpecialChar \menuseparator
340 ), then look at the preamble of the resulting
341 \begin_inset Flex Code
344 \begin_layout Plain Layout
351 You'll notice a variety of new macros defined specifically by LyX.
352 These macros are defined automatically, according to the features you use
356 \begin_layout Standard
357 There are several commands that automatically invoke LaTeX.
361 \begin_layout Itemize
362 \begin_inset Flex MenuItem
365 \begin_layout Plain Layout
366 View\SpecialChar \menuseparator
375 \begin_layout Itemize
376 \begin_inset Flex MenuItem
379 \begin_layout Plain Layout
380 View\SpecialChar \menuseparator
381 Update\SpecialChar \menuseparator
390 \begin_layout Itemize
391 \begin_inset Flex MenuItem
394 \begin_layout Plain Layout
395 File\SpecialChar \menuseparator
404 \begin_layout Itemize
405 \begin_inset Flex MenuItem
408 \begin_layout Plain Layout
409 File\SpecialChar \menuseparator
418 \begin_layout Standard
419 They will only invoke LaTeX if the file has changed since the last time
424 \begin_layout Standard
425 When LyX runs LaTeX on the file you're editing, it performs these steps:
428 \begin_layout Enumerate
429 Convert the document to LaTeX and save to a file with the extension
430 \begin_inset Flex Code
433 \begin_layout Plain Layout
440 \begin_inset Flex Code
443 \begin_layout Plain Layout
452 \begin_layout Enumerate
454 \begin_inset Flex Code
457 \begin_layout Plain Layout
463 file (maybe several times), and run any other commands (such as
464 \begin_inset Flex Code
467 \begin_layout Plain Layout
474 \begin_inset Flex Code
477 \begin_layout Plain Layout
483 ) needed to compile the LaTeX file.
486 \begin_layout Enumerate
487 If there are any errors, show the error log.
490 \begin_layout Standard
491 If you've run LaTeX using
492 \begin_inset Flex MenuItem
495 \begin_layout Plain Layout
498 \SpecialChar \menuseparator
506 , LyX then runs a DVI viewer to display the DVI-file.
508 \begin_inset Flex MenuItem
511 \begin_layout Plain Layout
514 \SpecialChar \menuseparator
522 , LyX performs further steps:
525 \begin_layout Itemize
527 \begin_inset Flex Code
530 \begin_layout Plain Layout
536 to convert the DVI file to PostScript.
539 \begin_layout Itemize
540 Run a PostScript viewer, such as
541 \begin_inset Flex Code
544 \begin_layout Plain Layout
550 , to display the PostScript file.
553 \begin_layout Standard
554 LyX does similar things when viewing, or exporting, other formats.
557 \begin_layout Section
558 Translating LaTeX files into LyX
561 \begin_layout Standard
562 You can import a LaTeX file into LyX by using the
563 \begin_inset Flex MenuItem
566 \begin_layout Plain Layout
567 File\SpecialChar \menuseparator
568 Import\SpecialChar \menuseparator
575 This will call a program named
576 \begin_inset Flex Code
579 \begin_layout Plain Layout
585 which will create a file
586 \begin_inset Flex Code
589 \begin_layout Plain Layout
596 \begin_inset Flex Code
599 \begin_layout Plain Layout
606 LyX will then open that file.
610 \begin_layout Plain Layout
611 \begin_inset Flex Code
614 \begin_layout Plain Layout
620 can also be run from the command line, of course.
628 \begin_layout Standard
629 \begin_inset Flex Code
632 \begin_layout Plain Layout
638 will translate most legal LaTeX, but not everything.
639 It will put things it doesn't understand into TeX code, so after translating
641 \begin_inset Flex Code
644 \begin_layout Plain Layout
650 , you can look for TeX code and hand-edit it until it looks right.
653 \begin_layout Standard
654 If you don't know what TeX code is, read the next section.
657 \begin_layout Section
658 \begin_inset CommandInset label
660 name "sec:Inserting-TeX-Code"
664 Inserting TeX Code into LyX Documents
667 \begin_layout Standard
668 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
669 You can always insert TeX code into any LyX document.
670 LyX cannot, and will never be able to, display every possible LaTeX construct.
671 If ever you need to insert LaTeX commands into your LyX document, you can
673 \begin_inset Flex Code
676 \begin_layout Plain Layout
682 box, which you can insert into your document with
683 \begin_inset Flex MenuItem
686 \begin_layout Plain Layout
687 Insert\SpecialChar \menuseparator
696 \begin_layout Standard
697 Here's an example of inserting LaTeX commands in a LyX document.
698 The code looks like this:
701 \begin_layout LyX-Code
705 \begin_inset Newline newline
711 \begin_inset Newline newline
714 This is an example for a minipage environment.
716 \begin_inset Newline newline
719 can put nearly everything in it, even (non-floating)
720 \begin_inset Newline newline
725 \begin_inset Newline newline
731 \begin_inset Newline newline
735 \begin_inset Newline newline
741 \begin_inset Newline newline
747 \begin_inset Newline newline
753 \begin_inset Newline newline
758 \begin_inset Newline newline
764 \begin_inset Newline newline
770 \begin_inset Newline newline
776 \begin_inset Newline newline
784 \begin_layout LyX-Code
788 \begin_layout Standard
790 \begin_inset Flex Code
793 \begin_layout Plain Layout
799 box containing this text is directly after this paragraph.
800 Those of you reading the manual in LyX will only see the TeX code inset.
801 Those reading a printed version of the manuals will see the actual results:
804 \begin_layout Standard
808 \begin_layout Plain Layout
815 \begin_layout Plain Layout
822 \begin_layout Plain Layout
824 This is an example for a minipage environment.
825 You can put nearly everything in it, even (non-floating) figures and tables.
829 \begin_layout Plain Layout
836 \begin_layout Plain Layout
841 \begin_layout Plain Layout
848 \begin_layout Plain Layout
855 \begin_layout Plain Layout
862 \begin_layout Plain Layout
868 \begin_layout Plain Layout
875 \begin_layout Plain Layout
882 \begin_layout Plain Layout
889 \begin_layout Plain Layout
901 \begin_layout Standard
902 In addition to using TeX code, you can also create a separate file containing
903 some complex LaTeX structure and then use
904 \begin_inset Flex MenuItem
907 \begin_layout Plain Layout
908 Insert\SpecialChar \menuseparator
918 to include your file (you should select the type
919 \begin_inset Flex Code
922 \begin_layout Plain Layout
929 We recommend that you only do this if you have a
930 \begin_inset Flex Code
933 \begin_layout Plain Layout
944 Otherwise, you'll have a big job tracking down LaTeX errors.
947 \begin_layout Standard
948 There are a few last points to emphasize:
951 \begin_layout Itemize
956 check if your LaTeX code is correct.
959 \begin_layout Itemize
960 Beware reinventing the wheel.
963 \begin_layout Standard
964 On that last point, LyX does have quite a few features tucked into it, and
966 Be sure to check the manuals to make sure that LyX doesn't have such-and-such
967 feature before you decide you have to do it by hand.
968 Moreover, there are numerous LaTeX packages out there to do all sorts of
969 things, from labels to envelopes to fancy multipage tables.
971 \begin_inset CommandInset href
974 target "http://www.ctan.org/"
978 for details, and see chapter
979 \begin_inset CommandInset ref
981 reference "cha:secrets"
988 \begin_layout Standard
989 If you do need to do some wild and fancy things within your document, be
990 sure to check out a good LaTeX book for assistance.
991 There are a number of them listed in the bibliography of the
998 \begin_layout Section
999 LyX and the LaTeX Preamble
1002 \begin_layout Subsection
1003 About the LaTeX Preamble
1006 \begin_layout Standard
1007 If you already know LaTeX, there is no need to explain here what the preamble
1009 If you don't, the following will give you some ideas—we recommend again
1010 that you consult a LaTeX book for further information.
1011 In any case, you should read the points below, because they explain what
1012 you can do and what you don't need to do in the LaTeX preamble of a LyX
1016 \begin_layout Standard
1017 The LaTeX preamble comes at the very beginning of a document,
1025 \begin_layout Itemize
1026 Declare the document class.
1028 \begin_inset Newline newline
1031 LyX already does this for you.
1032 If you're a seasoned LaTeX-nician, and you have a custom document class
1033 you want to use, check out the
1035 Customization Manual
1037 for information on how to make LyX interface to it.
1040 \begin_layout Itemize
1041 Declare the usage of packages.
1043 \begin_inset Newline newline
1046 LaTeX packages provide special commands, which are only available within
1047 a document when the package has been declared in the preamble.
1048 For example, the package
1049 \begin_inset Flex Code
1052 \begin_layout Plain Layout
1058 forces all paragraphs to be indented.
1059 There are other packages for labels, envelopes, margins, etc.
1063 \begin_layout Itemize
1064 Set counters, variables, lengths and widths.
1066 \begin_inset Newline newline
1069 There are several LaTeX counters and variables which
1073 be set globally from within the preamble in order to have the desired effect.
1074 (There are variables which you can set and reset inside the document, too.)
1075 Margins are a good example of something which must be set in the preamble.
1076 Another example is the label format for lists.
1077 You can actually set these just about anywhere, but it's best to do it
1078 just once, inside the preamble.
1081 \begin_layout Itemize
1082 Declare user defined commands (with
1083 \begin_inset Flex Code
1086 \begin_layout Plain Layout
1095 \begin_inset Flex Code
1098 \begin_layout Plain Layout
1107 \begin_inset Newline newline
1110 These are abbreviations for LaTeX commands which appear very often inside
1112 Although the preamble is a good place to declare such commands, they
1116 be declared anywhere (before they are used for the first time, of course).
1117 This can be useful if there is a lot of raw LaTeX code in your document,
1118 which normally should not be the case.
1121 \begin_layout Standard
1122 LyX adds its own set of definitions to the preamble of the
1123 \begin_inset Flex Code
1126 \begin_layout Plain Layout
1133 This makes LaTeX files generated by LyX portable.
1136 \begin_layout Subsection
1137 Changing the Preamble
1140 \begin_layout Standard
1141 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1142 can't change them without patching LyX itself.
1143 You can, however, add your own stuff to the preamble by selecting
1144 \begin_inset Flex MenuItem
1147 \begin_layout Plain Layout
1149 \begin_inset space ~
1158 \begin_inset Flex MenuItem
1161 \begin_layout Plain Layout
1162 Document\SpecialChar \menuseparator
1169 LyX adds anything in the
1170 \begin_inset Flex MenuItem
1173 \begin_layout Plain Layout
1179 dialog to its own built-in preamble.
1180 Before adding your own declarations in the preamble, you should make sure
1181 that LyX doesn't already support what you want to do.
1182 (Remember what we said about reinventing the wheel?) Also,
1184 make sure your preamble code is correct
1187 LyX doesn't check it for you.
1188 If there is an error, you're likely to get an error like
1189 \begin_inset Quotes eld
1193 \begin_inset Flex Code
1196 \begin_layout Plain Layout
1205 \begin_inset Quotes erd
1209 If you see this error, check your preamble.
1212 \begin_layout Subsection
1216 \begin_layout Standard
1217 Here are some examples of what you can add to a preamble, and what they
1221 \begin_layout Subsubsection
1225 \begin_layout Standard
1226 There are two variables under LaTeX that control page position:
1227 \begin_inset Flex Code
1230 \begin_layout Plain Layout
1239 \begin_inset Flex Code
1242 \begin_layout Plain Layout
1251 Their names should be self-explanatory.
1252 These variables are useful if you think for a moment about computer labels.
1253 Sometimes, the size of a print medium and the area of the medium that you
1254 can actually print on aren't the same.
1256 \begin_inset Flex Code
1259 \begin_layout Plain Layout
1268 \begin_inset Flex Code
1271 \begin_layout Plain Layout
1282 \begin_layout Standard
1283 The default values for
1284 \begin_inset Flex Code
1287 \begin_layout Plain Layout
1296 \begin_inset Flex Code
1299 \begin_layout Plain Layout
1308 \begin_inset space \thinspace{}
1312 \begin_inset space \thinspace{}
1316 \begin_inset space \space{}
1319 the page isn't shifted.
1320 Unfortunately, some DVI drivers always seem to shift the page.
1321 We have no idea why, or why the sysadmin hasn't fixed such behavior.
1322 If you're using LyX on a system that you don't personally maintain, and
1323 your sysadmin is a doofus,
1324 \begin_inset Flex Code
1327 \begin_layout Plain Layout
1336 \begin_inset Flex Code
1339 \begin_layout Plain Layout
1348 Suppose your left and top margins are always 0.5
1349 \begin_inset space \thinspace{}
1353 You can add this to the preamble:
1356 \begin_layout LyX-Code
1364 \begin_layout LyX-Code
1372 \begin_layout Standard
1373 and your margins should now be correct.
1376 \begin_layout Subsubsection
1380 \begin_layout Standard
1381 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1382 There's a rather nice package, available at your nearest CTAN archive,
1383 for printing sheets of labels:
1384 \begin_inset Flex Code
1387 \begin_layout Plain Layout
1394 Now, your system may not have this package installed by default.
1395 We leave that up to you to check.
1396 You'll also want to read the documentation for it; we're not going to do
1398 Since this is an example, however, we'll give you an example of how you
1402 \begin_layout Standard
1403 First, make sure you're using the
1404 \begin_inset Flex Code
1407 \begin_layout Plain Layout
1414 Next, you need to put the following in your preamble:
1417 \begin_layout LyX-Code
1423 \begin_layout LyX-Code
1429 \begin_layout LyX-Code
1435 \begin_layout LyX-Code
1441 \begin_layout LyX-Code
1447 \begin_layout LyX-Code
1453 \begin_layout LyX-Code
1459 \begin_layout Standard
1460 This sets things up for Avery label sheets, stock #5360.
1461 You're now ready to print labels, but you'll need to insert LaTeX code,
1462 placing the commands
1463 \begin_inset Flex Code
1466 \begin_layout Plain Layout
1475 \begin_inset Flex Code
1478 \begin_layout Plain Layout
1486 around each label text.
1487 This and other special features of
1488 \begin_inset Flex Code
1491 \begin_layout Plain Layout
1497 are explained in its documentation.
1500 \begin_layout Standard
1501 Someday, someone may write a LyX layout file to support this package directly.
1502 Maybe that someone is you.
1505 \begin_layout Subsubsection
1506 Example #3: Paragraph Indentation
1509 \begin_layout Standard
1510 Americans are trained to indent the first line of
1515 As with all of their other weird quirks, most Americans will whine and
1516 moan until they can have their way and indent the first line of all paragraphs.
1525 \begin_layout Standard
1526 Of course, this behavior isn't standard typography.
1527 In books, you typically only indent the first line of a paragraph
1531 it follows another one.
1532 The idea behind indenting the first line of a paragraph is to distinguish
1533 neighboring paragraphs from one another.
1534 If there is no previous paragraph—for example, if it follows a figure or
1535 is the first paragraph in a section—then there is no need for indentation.
1539 \begin_layout Standard
1540 If you're a typical American (we're still joking!), though, you don't care
1541 about such esoteric things; you want your indentation! Add this to the
1545 \begin_layout LyX-Code
1548 usepackage{indentfirst}
1551 \begin_layout Standard
1552 If your TeX distribution isn't braindead, you'll have this package, and
1553 all of your paragraphs will get the indentation the Founding Fathers intended
1557 \begin_layout Subsubsection
1558 Example #4: This Document
1561 \begin_layout Standard
1562 You can also check out the preamble of this document to get an idea of some
1563 of the advanced things you can do.
1564 Also, there are more examples and an assortment of LaTeX
1565 \begin_inset Quotes eld
1569 \begin_inset Quotes erd
1573 \begin_inset space ~
1577 \begin_inset CommandInset ref
1579 reference "cha:secrets"
1587 \begin_layout Section
1588 LyX and LaTeX Errors
1591 \begin_layout Standard
1592 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1594 It then uses the logfile from the LaTeX run to do a post-mortem.
1595 After analyzing the logfile,LyX displays a dialog listing the errors.
1596 Clicking on any one of them will take you to the position in your LyX file
1597 where the error occurred.
1601 \begin_layout Plain Layout
1603 Analyzing the logfile is a tough job, and LyX doesn't always go to the
1605 There are also cases where LaTeX reports the error on one line, but the
1606 actual error is earlier.
1607 This is not unlike forgetting a closing brace in a program: You'll get
1608 an error, but only later.
1616 \begin_layout Standard
1617 Some folks also like to look at the log file directly: It is available from
1619 \begin_inset Flex MenuItem
1622 \begin_layout Plain Layout
1625 \SpecialChar \menuseparator
1629 \begin_inset space ~
1638 There are some fairly common error messages and warnings.
1639 We'll cover those here.
1640 You should look at a good LaTeX book for a complete listing.
1643 \begin_layout Itemize
1644 \begin_inset Flex Code
1647 \begin_layout Plain Layout
1654 \begin_inset Newline newline
1657 Anything beginning with these words is a warning message for the purpose
1659 \begin_inset Quotes eld
1663 \begin_inset Quotes erd
1666 the LaTeX code itself.
1667 You'll get messages like this if you added or changed cross-references
1668 or bibliography entries, in which case, LaTeX is trying to tell you that
1669 you need to make another run.
1670 You can by-and-large ignore these.
1673 \begin_layout Itemize
1674 \begin_inset Flex Code
1677 \begin_layout Plain Layout
1684 \begin_inset Newline newline
1687 Another warning message, this time about fonts which LaTeX couldn't find.
1688 The rest of the message will often say something about a replacement font
1690 You can safely ignore these, too.
1693 \begin_layout Itemize
1694 \begin_inset Flex Code
1697 \begin_layout Plain Layout
1706 \begin_inset Newline newline
1714 They are warnings about lines that were too long and run past the right
1716 Almost always, this is unnoticeable in the final output.
1717 (It can be just a point or two.) Or, only one or two characters extend past
1719 LaTeX seems to generate at least one of these messages for just about any
1721 \begin_inset Newline newline
1724 You can ignore these messages.
1725 Your eyes will tell you if there's a problem with something that's too
1726 wide; just look at the output.
1730 \begin_layout Plain Layout
1731 You can also enable the `draft' option in
1732 \begin_inset Flex MenuItem
1735 \begin_layout Plain Layout
1738 \SpecialChar \menuseparator
1746 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1754 \begin_layout Itemize
1755 \begin_inset Flex Code
1758 \begin_layout Plain Layout
1767 \begin_inset Newline newline
1770 Not quite as common as its cousin.
1771 LaTeX seems to like to print lines that are a bit too wide as opposed to
1772 ones that are a bit too narrow.
1773 We have no idea why.
1776 \begin_layout Itemize
1777 \begin_inset Flex Code
1780 \begin_layout Plain Layout
1789 \begin_inset Flex Code
1792 \begin_layout Plain Layout
1801 \begin_inset Newline newline
1804 Warnings about troubles breaking the page.
1805 Once again, just look at the output.
1806 Your eyes will tell you where something has gone wrong.
1809 \begin_layout Itemize
1810 \begin_inset Flex Code
1813 \begin_layout Plain Layout
1815 \begin_inset Quotes els
1819 \begin_inset Quotes ers
1828 \begin_inset Newline newline
1832 \begin_inset Quotes eld
1836 \begin_inset Quotes erd
1839 isn't installed on this system.
1840 This usually appears because some package your document needs isn't installed.
1841 If you didn't touch the preamble or didn't use the
1842 \begin_inset Flex Code
1845 \begin_layout Plain Layout
1853 command, then one of the packages LyX tried to load is missing.
1855 \begin_inset Flex MenuItem
1858 \begin_layout Plain Layout
1859 Help\SpecialChar \menuseparator
1865 to get a list of packages that LyX knows about.
1866 This file is updated whenever you reconfigure LyX (using
1867 \begin_inset Flex MenuItem
1870 \begin_layout Plain Layout
1871 Tools\SpecialChar \menuseparator
1877 ) and tells you which packages have been detected and what they do.
1878 \begin_inset Newline newline
1882 \begin_inset Flex Code
1885 \begin_layout Plain Layout
1893 command and the package in question isn't installed, then you'll need to
1894 install it yourself.
1897 \begin_layout Itemize
1898 \begin_inset Flex Code
1901 \begin_layout Plain Layout
1902 LaTeX Error: Unknown option
1908 \begin_inset Newline newline
1911 Error messages beginning with this are trying to tell you that you specified
1912 a bad or undefined option to a package.
1913 Check the package's documentation.
1916 \begin_layout Itemize
1917 \begin_inset Flex Code
1920 \begin_layout Plain Layout
1921 Undefined control sequence
1927 \begin_inset Newline newline
1930 If you've inserted LaTeX code into your document, but made a typo, you'll
1932 You may have forgotten to load a package.
1933 In any case, this error message usually means that you used an undefined
1938 \begin_layout Standard
1939 There are other error and warning messages.
1940 Some are self-explanatory.
1941 These are usually LaTeX messages.
1942 Others are downright cryptic.
1943 These are usually TeX error messages, and we really have
1947 what they mean or how to decipher them.
1951 \begin_layout Standard
1952 There's a general sequence you should follow if you get error messages:
1955 \begin_layout Enumerate
1956 Look at the LaTeX code you inserted for typos.
1959 \begin_layout Enumerate
1960 If there are no typos, check that you used the command(s) correctly.
1963 \begin_layout Enumerate
1964 If you get a bunch of error boxes piled up at the very top of the document—and
1965 especially if you see a
1966 \begin_inset Quotes eld
1970 \begin_inset Flex Code
1973 \begin_layout Plain Layout
1982 \begin_inset Quotes erd
1985 error—it means that there are errors in the preamble.
1986 Start debugging your preamble.
1989 \begin_layout Enumerate
1990 If you didn't add anything to the preamble and didn't add any LaTeX code
1991 to the document, the first suspect is your LaTeX distribution itself.
1992 Check for missing packages and install them.
1995 \begin_layout Enumerate
1996 Okay, so there are no missing packages.
1997 Did you use any of the fine-tuning options in LyX? Specifically, did you
2002 any of them, like trying to manually insert lots of
2003 \begin_inset Flex Code
2006 \begin_layout Plain Layout
2008 \begin_inset space ~
2017 \begin_inset Flex Code
2020 \begin_layout Plain Layout
2027 \begin_inset Flex Code
2030 \begin_layout Plain Layout
2036 ? Did you try to kludge something together with these instead of using the
2037 appropriate paragraph environment?
2040 \begin_layout Enumerate
2041 All right, you didn't use any of the fine-tuning options, you played by
2043 Did you try to pull a fancy maneuver? Did you do something funky inside
2044 a table or an equation, like inserting a graphic into a table cell?
2047 \begin_layout Enumerate
2048 Do you have long sections of text where LaTeX cannot find a place to break
2049 a line? By default, LaTeX is rather strict about how much extra inter-word
2050 spacing it will add in order to break a line.
2051 Preferably, you should rework the paragraph to avoid the problem.
2052 If this isn't an option, you can wrap your text in
2053 \begin_inset Flex Code
2056 \begin_layout Plain Layout
2064 to make LaTeX's line breaking more, well, sloppy.
2067 \begin_layout Enumerate
2068 Did you go overboard with the nesting? LyX (currently) doesn't check to
2069 make sure you're in the limits for nesting environments.
2070 If you nested a bunch of environments to the
2071 \begin_inset Formula $17^{\mathrm{th}}$
2074 level, that's the problem.
2075 (The limit in LaTeX is five.)
2078 \begin_layout Enumerate
2079 Okay, you didn't get any error messages, but your output looks awful.
2080 If you have a table or figure that's too wide or long for the page, you
2085 \begin_layout Enumerate
2086 rescale the figure so it fits.
2089 \begin_layout Enumerate
2090 trim down the table so it fits.
2094 \begin_layout Enumerate
2095 If something else is wrong with the output, and you didn't try to pull anything
2096 fancy or kludge the fine-tuning options, we're not sure what's wrong.
2099 \begin_layout Standard
2100 If all this doesn't help—well, then
2104 you might have found a bug in LyX\SpecialChar \ldots{}
2108 \begin_layout Chapter
2112 \begin_layout Section
2113 Customizing Bibliographies with BibTeX
2116 \begin_layout Standard
2117 The most basic information about how to use BibTeX with LyX is contained
2120 Bibliography databases (BibTeX)
2127 The following subsections explain special bibliography features supported
2131 \begin_layout Subsection
2132 Alternative Citation Styles
2135 \begin_layout Standard
2136 Standard BibTeX uses numbers (e.
2137 \begin_inset space \thinspace{}
2141 \begin_inset space \space{}
2145 \begin_inset Quotes eld
2149 \begin_inset Quotes erd
2152 ) to refer to a cited work.
2153 However, in many scientific disciplines, other citation styles are in use.
2154 The most common one is the author-year style (e.
2155 \begin_inset space \thinspace{}
2159 \begin_inset space \space{}
2163 \begin_inset Quotes eld
2167 \begin_inset Quotes erd
2171 LyX supports two packages that provide this style,
2172 \begin_inset Flex Code
2175 \begin_layout Plain Layout
2182 \begin_inset Flex Code
2185 \begin_layout Plain Layout
2192 Both packages have their pros and cons, which cannot be listed in detail.
2193 If you only want to have simple author-year (or author-numerical) style,
2194 or if you want to use one of the countless style files for
2195 \begin_inset Flex Code
2198 \begin_layout Plain Layout
2204 , than the established
2205 \begin_inset Flex Code
2208 \begin_layout Plain Layout
2214 package is probably your choice.
2215 If you need special features like short title references, ibidem etc., you
2217 \begin_inset Flex Code
2220 \begin_layout Plain Layout
2229 \begin_layout Standard
2230 The handling of both packages in LyX is basically the same.
2232 \begin_inset Flex MenuItem
2235 \begin_layout Plain Layout
2236 Document\SpecialChar \menuseparator
2243 \begin_inset Flex MenuItem
2246 \begin_layout Plain Layout
2253 \begin_inset Flex MenuItem
2256 \begin_layout Plain Layout
2263 \begin_inset Flex MenuItem
2266 \begin_layout Plain Layout
2273 With both packages, you will get some extra features in the citation dialog
2274 and you can select the style of the reference (
2275 \begin_inset Quotes eld
2279 \begin_inset Quotes erd
2283 \begin_inset Quotes eld
2287 \begin_inset Quotes erd
2291 \begin_inset Quotes eld
2295 \begin_inset Quotes erd
2299 \begin_inset Quotes eld
2303 \begin_inset Quotes erd
2307 Note that both packages need specifically designed style files.
2308 They both ship their own, but there are lots of additional style files,
2309 and there is even an interactive style file builder
2313 \begin_layout Plain Layout
2315 \begin_inset Flex URL
2318 \begin_layout Plain Layout
2320 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2331 \begin_inset Flex Code
2334 \begin_layout Plain Layout
2343 \begin_layout Subsection
2344 Sectioned Bibliographies
2347 \begin_layout Standard
2348 Sometimes you might need to divide your bibliography into several sections.
2349 If you are for instance a historian, the possibility to separate sources
2350 and scientific works is most likely a
2351 \begin_inset Quotes eld
2355 \begin_inset Quotes erd
2359 Unfortunately, BibTeX itself does not allow you to do this.
2360 But with the help of some LaTeX packages, BibTeX can be extended to fit
2364 \begin_layout Standard
2365 LyX provides native support for one of these packages,
2373 \begin_layout Plain Layout
2375 \begin_inset Flex URL
2378 \begin_layout Plain Layout
2380 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2390 The advantage of this package (compared to other packages like
2394 ) is that you don't need to define new citation commands.
2395 Instead, you need to prepare different bibliographic databases which include
2396 the entries for the different sections of the bibliography.
2397 For example: If you want to divide your bibliography into the sections
2399 \begin_inset Quotes eld
2403 \begin_inset Quotes erd
2407 \begin_inset Quotes eld
2411 \begin_inset Quotes erd
2414 , you first need to create two bibliographic databases, e.
2415 \begin_inset space \thinspace{}
2419 \begin_inset space \space{}
2423 \begin_inset Flex Code
2426 \begin_layout Plain Layout
2433 \begin_inset Flex Code
2436 \begin_layout Plain Layout
2446 \begin_layout Standard
2448 \begin_inset Flex MenuItem
2451 \begin_layout Plain Layout
2452 Document\SpecialChar \menuseparator
2459 \begin_inset Flex MenuItem
2462 \begin_layout Plain Layout
2469 \begin_inset Flex MenuItem
2472 \begin_layout Plain Layout
2473 Sectioned bibliography
2479 Now you can insert multiple BibTeX bibliographies, one for each section
2480 of your bibliography.
2481 Returning to our example: Insert the BibTeX bibliography
2482 \begin_inset Flex Code
2485 \begin_layout Plain Layout
2491 and a second one for the database
2492 \begin_inset Flex Code
2495 \begin_layout Plain Layout
2502 You are free to use the same or different styles for each section.
2503 Additionally, you can chose if the bibliography section should contain
2505 \begin_inset Quotes eld
2508 all cited references
2509 \begin_inset Quotes erd
2512 of the specified database(s) (which is the default),
2513 \begin_inset Quotes eld
2516 all uncited references
2517 \begin_inset Quotes erd
2521 \begin_inset Quotes eld
2525 \begin_inset Quotes erd
2529 This might be useful if you would like to separate your bibliography into
2531 \begin_inset Quotes eld
2535 \begin_inset Quotes erd
2539 \begin_inset Quotes eld
2543 \begin_inset Quotes erd
2547 \begin_inset Quotes eld
2551 \begin_inset Quotes erd
2555 The titles for the sections can be added as ordinary sections or subsections.
2557 \begin_inset Flex Code
2560 \begin_layout Plain Layout
2566 removes the bibliography title, you have manually re-add that, too (as
2567 a chapter* or section*, for instance).
2570 \begin_layout Subsection
2571 Multiple Bibliographies
2574 \begin_layout Standard
2575 Multiple bibliographies, e.
2576 \begin_inset space \thinspace{}
2580 \begin_inset space \space{}
2583 a bibliography for each section or chapter of the document, are not supported
2586 \begin_inset Flex Code
2589 \begin_layout Plain Layout
2595 package, which is used for the creation of sectioned bibliographies in
2596 LyX (see the previous section), provides an easy way to solve this task,
2597 if you are willing to use some
2598 \begin_inset Flex MenuItem
2601 \begin_layout Plain Layout
2608 \begin_inset space ~
2612 \begin_inset CommandInset ref
2614 reference "sec:Inserting-TeX-Code"
2622 \begin_layout Plain Layout
2623 An alternative approach is to use the
2624 \begin_inset Flex Code
2627 \begin_layout Plain Layout
2634 \begin_inset Flex Code
2637 \begin_layout Plain Layout
2643 package, respectively.
2651 \begin_layout Standard
2653 \begin_inset Flex MenuItem
2656 \begin_layout Plain Layout
2657 Document\SpecialChar \menuseparator
2664 \begin_inset Flex MenuItem
2667 \begin_layout Plain Layout
2674 \begin_inset Flex MenuItem
2677 \begin_layout Plain Layout
2678 Sectioned bibliography
2684 In the document, you have to enclose the sections, which shall contain
2685 their own bibliography (including the BibTeX bibliography itself), between
2687 \begin_inset Flex Code
2690 \begin_layout Plain Layout
2699 \begin_inset Flex Code
2702 \begin_layout Plain Layout
2710 (those commands have to be inserted as TeX code).
2711 The bibliography will contain all references which have been cited in the
2713 \begin_inset Flex Code
2716 \begin_layout Plain Layout
2727 If you are using this approach, then every citation reference has to be
2729 \begin_inset Flex Code
2732 \begin_layout Plain Layout
2740 \begin_inset Flex Code
2743 \begin_layout Plain Layout
2752 \begin_layout Section
2756 \begin_layout Subsection
2760 \begin_layout Standard
2761 When you are working on a large file with many sections, it is often convenient
2762 to break up the document into several files, or perhaps you have something
2763 where a table may change from time to time, but the preceding text does
2765 In these cases, you should seriously consider using multipart documents.
2766 For example, scientific papers often have five major sections: the introduction
2767 , observations, results, discussion, and conclusion.
2768 Each of these could be its own separate LyX file, with one
2769 \begin_inset Quotes eld
2773 \begin_inset Quotes erd
2776 file which contains the title, authors, abstract, references, etc., plus
2777 the five included files.
2778 It is important to note that each of these files is a full LyX file which
2779 can be formatted and printed on its own, as well as included in a master
2781 Each of these files must have the same document class, however—don't attempt
2782 to mix book classes with article classes.
2783 You may also include LaTeX files; however, these files must not have their
2785 \begin_inset space \thinspace{}
2789 \begin_inset space \space{}
2792 everything up to and including the
2793 \begin_inset Flex Code
2796 \begin_layout Plain Layout
2805 \begin_inset Flex Code
2808 \begin_layout Plain Layout
2816 line must be deleted) or else errors will be generated when you try to
2820 \begin_layout Standard
2821 LyX allows you to include files quite easily with
2822 \begin_inset Flex MenuItem
2825 \begin_layout Plain Layout
2826 Insert\SpecialChar \menuseparator
2828 \begin_inset space ~
2837 When you click on this selection a small box is inserted into the file
2838 at the current cursor location.
2839 Clicking on the box raises a dialog which allows you to select the file
2840 to be included, and the method of its inclusion.
2844 \begin_layout Standard
2845 The file selection box should by now be obvious.
2846 The three inclusion methods are
2847 \begin_inset Quotes eld
2851 \begin_inset Quotes erd
2855 \begin_inset Quotes eld
2859 \begin_inset Quotes erd
2863 \begin_inset Quotes eld
2867 \begin_inset Quotes erd
2871 The difference between
2872 \begin_inset Quotes eld
2876 \begin_inset Quotes erd
2880 \begin_inset Quotes eld
2884 \begin_inset Quotes erd
2887 is really only meaningful to LaTeXperts, but the practical difference is
2888 that files which are
2889 \begin_inset Quotes eld
2893 \begin_inset Quotes erd
2896 are typeset beginning on a new page, while files which are
2897 \begin_inset Quotes eld
2901 \begin_inset Quotes erd
2904 are typeset starting on the current page.
2907 \begin_layout Standard
2908 Generally, the master file is converted into a full LaTeX file before typesettin
2909 g, while the included files are converted to LaTeX files which do not have
2910 all the preamble information.
2913 \begin_layout Standard
2915 \begin_inset Quotes eld
2919 \begin_inset Quotes erd
2922 included file allows you to include a file typeset exactly as it appears
2924 \begin_inset space \thinspace{}
2928 \begin_inset space \space{}
2932 \begin_inset Flex Code
2935 \begin_layout Plain Layout
2941 mode, with the characters set in a fixed-width typewriter font.
2942 Normally, spaces in this file are invisible, though two consecutive spaces
2943 are conserved, unlike LyX's normal treatment of spaces.
2944 However, setting the
2945 \begin_inset Flex MenuItem
2948 \begin_layout Plain Layout
2950 \begin_inset space ~
2954 \begin_inset space ~
2958 \begin_inset space ~
2966 checkbox typesets a mark to unambiguously define the presence of a space.
2970 \begin_layout Subsection
2971 Cross-References Between Files
2974 \begin_layout Standard
2975 \begin_inset Box Shadowbox
2985 height_special "totalheight"
2988 \begin_layout Plain Layout
2989 This section is somewhat out of date.
2990 Need to describe default master documents and how children are opened when
3000 \begin_layout Standard
3001 It is possible to set up cross-references between the different files.
3002 First, open all the files in question: let's call them A and B in a two
3003 file example, where B is included in A.
3004 Let's say you insert a label in A, then want to reference it in B.
3005 Open the cross-reference dialog in whilst in document B, and you can select
3007 \begin_inset Quotes eld
3011 \begin_inset Quotes erd
3017 \begin_layout Subsection
3018 Bibliography Lists in all Subdocuments
3021 \begin_layout Standard
3022 \begin_inset Box Frameless
3032 height_special "totalheight"
3035 \begin_layout Plain Layout
3036 This section also needs updating.
3037 There is now material about this on the wiki, and it could be copied here.
3045 \begin_layout Standard
3046 Copy the bibliography list with all entries to all subdocuments and transform
3048 This way LyX will find the
3049 \begin_inset Flex Code
3052 \begin_layout Plain Layout
3058 -files and you can easily insert references without making the bibliography
3062 \begin_layout Standard
3063 As the bibliography list is in a comment, LaTeX won't use use it and the
3064 references will look like this: [?], instead of like this: [1].
3065 One solution is to use the LaTeX-package
3066 \begin_inset Flex Code
3069 \begin_layout Plain Layout
3075 that will only include comments by processing the files separately.
3076 To do this, add in the LaTeX preamble of every subdocument the following:
3079 \begin_layout LyX-Code
3085 \begin_layout LyX-Code
3088 includecomment{comment}
3091 \begin_layout Standard
3093 \begin_inset Flex URL
3096 \begin_layout Plain Layout
3098 http://wiki.lyx.org/FAQ/Unsorted#toc31
3106 \begin_layout Section
3107 Fancy Headers and Footers
3110 \begin_layout Standard
3111 The default page layout is rather plain; for an
3112 \begin_inset Flex Code
3115 \begin_layout Plain Layout
3121 document class, all you get is a centered page number at the bottom of
3123 This document uses KOMA-script's book class, so it appears to be a bit
3125 But to really put on a show, you need to set the document page style to
3127 \begin_inset Quotes eld
3131 \begin_inset Quotes erd
3134 , as mentioned in the
3139 This section describes the LaTeX code you need to insert in your LaTeX
3140 preamble in order to get the desired effects.
3143 \begin_layout Standard
3144 For more information on fancy headers, see the
3145 \begin_inset Flex Code
3148 \begin_layout Plain Layout
3154 package documentation.
3156 \begin_inset Flex URL
3159 \begin_layout Plain Layout
3161 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3169 \begin_layout Standard
3170 The page header is divided into three fields, not surprisingly labeled
3171 \begin_inset Quotes eld
3175 \begin_inset Quotes erd
3179 \begin_inset Quotes eld
3183 \begin_inset Quotes erd
3187 \begin_inset Quotes eld
3191 \begin_inset Quotes erd
3195 The footer is also divided into these three fields.
3196 The LaTeX commands to set these fields in the simplest manner are
3197 \begin_inset Flex Code
3200 \begin_layout Plain Layout
3209 \begin_inset Flex Code
3212 \begin_layout Plain Layout
3221 \begin_inset Flex Code
3224 \begin_layout Plain Layout
3233 \begin_inset Flex Code
3236 \begin_layout Plain Layout
3245 Suppose you wish to put your name in the upper left hand corner of each
3247 Simply insert the following command in the preamble:
3250 \begin_layout Standard
3259 \begin_layout Standard
3260 You will now see your name in the upper left.
3261 If a field has a default entry that you would like to get rid of (often
3262 the page number appears in the central footer, simply include a command
3263 with a blank argument, e.
3264 \begin_inset space \thinspace{}
3270 \begin_layout Standard
3278 \begin_layout Standard
3279 Let's get really fancy: lets put the section number with the word
3280 \begin_inset Quotes eld
3284 \begin_inset Quotes erd
3288 \begin_inset space \thinspace{}
3292 \begin_inset space \space{}
3295 Section 3) in the upper left, the page number (e.
3296 \begin_inset space \thinspace{}
3300 \begin_inset space \space{}
3303 Page 4) in the upper right, your name in the lower left, and the date in
3305 The following commands should now appear in the preamble:
3308 \begin_layout Standard
3318 \begin_layout Standard
3326 \begin_layout Standard
3336 \begin_layout Standard
3345 \begin_layout Standard
3353 \begin_layout Standard
3363 \begin_layout Standard
3365 \begin_inset Flex Code
3368 \begin_layout Plain Layout
3377 \begin_inset Flex Code
3380 \begin_layout Plain Layout
3388 access LaTeX's section and page counters, and so print out the current
3389 section and page numbers.
3391 \begin_inset Flex Code
3394 \begin_layout Plain Layout
3402 simply prints out today's date.
3405 \begin_layout Standard
3406 The thicknesses of the horizontal rules drawn beneath the header and above
3407 the footer can also be modified.
3408 If you don't want one of the rules, set its thickness to 0.
3409 The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3415 \begin_inset Flex Code
3418 \begin_layout Plain Layout
3423 headrulewidth}{0.4pt}
3429 \begin_inset Flex Code
3432 \begin_layout Plain Layout
3437 footrulewidth}{0.4pt}
3442 to set the thicknesses.
3445 \begin_layout Standard
3446 You can switch the header/footer settings on and off for individual pages
3448 \begin_inset Flex Code
3451 \begin_layout Plain Layout
3454 thispagestyle{empty}
3460 \begin_inset Flex Code
3463 \begin_layout Plain Layout
3466 thispagestyle{plain}
3472 \begin_inset Flex Code
3475 \begin_layout Plain Layout
3478 thispagestyle{fancy}
3484 Simply insert them in the text on the page you want changed and mark them
3486 In fact, title pages are marked as plain by default, while following pages
3487 are marked fancy when using the global fancy setting.
3490 \begin_layout Standard
3491 As a final example, it is possible to include an image in the header or
3493 Suppose you want to put a company logo in the upper lefthand corner.
3494 You might try something like
3497 \begin_layout Standard
3506 includegraphics{logo.eps}}}
3509 \begin_layout Standard
3511 (you may need to preface this with
3512 \begin_inset Flex Code
3515 \begin_layout Plain Layout
3519 usepackage{graphics}
3524 if you don't include graphics elsewhere in your document).
3527 \begin_layout Section
3528 Itemize Bullet Selection
3529 \begin_inset CommandInset label
3538 \begin_layout Standard
3544 \begin_layout Subsection
3548 \begin_layout Standard
3549 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3550 Using this dialog you can easily specify what bullet shape to use at each
3551 level of an itemized list.
3552 These settings are document-wide so you won't be able to specify different
3553 sets of bullets for different paragraphs.
3557 \begin_layout Plain Layout
3558 Well, actually you can but you'll have to do it by hand.
3566 \begin_layout Subsection
3570 \begin_layout Standard
3571 Open the dialog by selecting the
3572 \begin_inset Flex MenuItem
3575 \begin_layout Plain Layout
3576 Document\SpecialChar \menuseparator
3582 menu item and then select the
3583 \begin_inset Flex MenuItem
3586 \begin_layout Plain Layout
3595 \begin_layout Standard
3596 The dialog provides you with a table of bullet shapes.
3597 A column of buttons on the left of the table provides access to the six
3598 different panels of bullet shapes.
3599 The row of buttons across the top is used to select which bullet depth
3601 A text entry under the table shows the currently selected bullet shape's
3602 LaTeX equivalent and this can be edited if desired.
3603 If you do modify the text you will also need to specify any needed packages
3604 in the LaTeX preamble.
3607 \begin_layout Standard
3608 The six panels are divided up by the packages they require.
3609 The following table shows the mappings from button name to LaTeX packages.
3612 \begin_layout Standard
3614 \begin_inset Tabular
3615 <lyxtabular version="3" rows="7" columns="2">
3616 <features tabularvalignment="middle">
3617 <column alignment="center" valignment="top" width="0pt">
3618 <column alignment="center" valignment="top" width="0pt">
3620 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3623 \begin_layout Plain Layout
3638 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3641 \begin_layout Plain Layout
3658 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3661 \begin_layout Plain Layout
3676 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3679 \begin_layout Plain Layout
3695 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3698 \begin_layout Plain Layout
3713 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3716 \begin_layout Plain Layout
3733 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3736 \begin_layout Plain Layout
3751 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3754 \begin_layout Plain Layout
3771 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3774 \begin_layout Plain Layout
3789 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3792 \begin_layout Plain Layout
3809 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3812 \begin_layout Plain Layout
3827 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3830 \begin_layout Plain Layout
3847 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3850 \begin_layout Plain Layout
3865 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3868 \begin_layout Plain Layout
3891 \begin_layout Standard
3892 LyX doesn't stop you using bullets from packages you don't have.
3893 If you get errors from LaTeX when you try to view or print the file, then
3894 it is likely you are missing a package.
3898 \begin_layout Plain Layout
3899 LyX doesn't restrict your use since you may be editing locally and exporting
3908 \begin_layout Subsection
3912 \begin_layout Standard
3913 Select which bullet depth you want to change then select the bullet shape
3915 Any changes will not be visible in LyX, but are visible when viewing the
3919 \begin_layout Standard
3920 You can reset a bullet shape to the default simply by clicking your right
3921 mouse button on the appropriate bullet depth button.
3925 \begin_layout Plain Layout
3930 want to have multiple sets of paragraphs with different sets of bullets
3931 in each, then you're going to have to get your hands dirty with TeX code.
3932 The bullet selection dialog can help though because it provides you with
3933 the LaTeX code for a wide range of bullet shapes.
3934 To make your own custom paragraphs you have the following options:
3937 \begin_layout Plain Layout
3941 \begin_layout Plain Layout
3957 \begin_layout Plain Layout
3961 \begin_layout Plain Layout
3983 \begin_layout Itemize
3984 Use the LaTeX command
3985 \begin_inset Flex Code
3988 \begin_layout Plain Layout
3996 to specify a new bullet shape for a given depth.
3997 You'll also need to save the current bullet shape so you can restore it
3999 In this itemized list the following LaTeX code was used to change the bullet
4000 used for the first depth.
4004 \begin_layout LyX-Code
4014 \begin_layout LyX-Code
4031 \begin_layout Itemize
4032 Note that the itemize depth is specified in Roman numerals as part of the
4042 \begin_layout Itemize
4046 \begin_layout Plain Layout
4059 Specify each individual entry by starting each item with the bullet shape
4060 enclosed in square brackets and set as
4061 \begin_inset Flex MenuItem
4064 \begin_layout Plain Layout
4071 For example, this item was started with
4072 \begin_inset Flex Code
4075 \begin_layout Plain Layout
4090 \begin_layout Plain Layout
4094 \begin_layout Plain Layout
4110 \begin_layout Plain Layout
4111 You'll also need to revert the labelitem back to its previous setting for
4112 the global bullet shape settings to remain in effect.
4113 The way used here was:
4116 \begin_layout LyX-Code
4131 \begin_layout Chapter
4132 LyX and the World Wide Web
4135 \begin_layout Standard
4136 LyX has long supported the export of documents to various web-friendly formats,
4138 Before verson 2.0, however, HTML export was always accomplished by the use
4139 of external converters.
4143 \begin_layout Plain Layout
4144 For details on the use of external converters with LyX, see the
4148 section of the Customization manual.
4153 These fall into two large groups: there are converters that use LaTeX as
4154 an intermediate format, such as
4155 \begin_inset Flex Code
4158 \begin_layout Plain Layout
4165 \begin_inset Flex Code
4168 \begin_layout Plain Layout
4175 \begin_inset Flex Code
4178 \begin_layout Plain Layout
4184 , relying upon LyX to produce the LaTeX; and there is a converter that works
4185 directly on LyX files,
4186 \begin_inset Flex Code
4189 \begin_layout Plain Layout
4196 All of these have different advantages and disadvantages.
4200 \begin_layout Standard
4201 The LaTeX-based converters have the advantage that, in principle, they know
4202 everything about the exported document that LaTeX does.
4203 Such converters do not care, for example, if a certain block of code was
4204 produced by LyX or was Evil Red Text.
4205 These converters know about
4206 \begin_inset Flex Code
4209 \begin_layout Plain Layout
4215 files, counters, and references, and can often make use of the
4216 \begin_inset Flex Code
4219 \begin_layout Plain Layout
4225 files generated by BibTeX.
4226 On the other hand, LaTeX is a very hard language to parse---it is sometimes
4227 said that only TeX itself understands TeX---and LaTeX-based converters
4228 will often choke on what seem to be quite simple constructs; complex ones
4229 can throw them completely, and as of this writing, for example, the
4233 manual will not export with
4234 \begin_inset Flex Code
4237 \begin_layout Plain Layout
4243 , though the others will.
4244 The other issue concerns how math is handled.
4245 These converters typically convert the formulae into little pictures that
4246 are then linked from the HTML document.
4247 Since these are actually generated by LaTeX, they are accurate.
4248 But they do not scale well, and just getting them to look as if they are
4249 actually meant to be in your document---so that the font sizes seem to
4250 be roughly the same---can be a challenge.
4253 \begin_layout Standard
4255 \begin_inset Flex Code
4258 \begin_layout Plain Layout
4264 solves some of these problems.
4265 In particular, its rendering of math tends to look better than
4266 \begin_inset Flex Code
4269 \begin_layout Plain Layout
4275 's, at least in simpler cases, since it renders math using a combination
4276 of HTML and CSS rather than converting the formulae to images.
4277 But more complex formula tend to be rendered less well than with
4278 \begin_inset Flex Code
4281 \begin_layout Plain Layout
4287 , since there is no reasonable way of scaling parentheses in HTML, for example.
4288 More importantly (as of version 0.39, at least),
4289 \begin_inset Flex Code
4292 \begin_layout Plain Layout
4298 has no support for math macros, for user-defined paragraph or character
4299 styles, or for tables of contents and figures, and its treatment of cross-refer
4301 These limitations make
4302 \begin_inset Flex Code
4305 \begin_layout Plain Layout
4311 unsuitable for many of the documents more advanced LyX users would produce.
4312 In principle, of course, all of these problems could be solved, but the
4313 LyX developers have decided to follow a different path and have made LyX
4314 itself capable of writing XHTML, just as it is capable of writing LaTeX,
4315 DocBook, and plaintext.
4318 \begin_layout Standard
4319 As of this writing, XHTML output remains under development and should probably
4321 \begin_inset Quotes eld
4325 \begin_inset Quotes erd
4332 \begin_layout Plain Layout
4334 \begin_inset Flex Code
4337 \begin_layout Plain Layout
4338 development/HTML.notes
4343 , which can be found in the LyX source tree or
4344 \begin_inset CommandInset href
4346 name "accessed online"
4347 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4351 , usually contains up-to-date information about the state of XHTML output.
4356 Still, the developers have chosen this approach because it has several
4357 potential advantages over the other two.
4360 \begin_layout Standard
4361 These advantages are primarily due to the fact that the XHTML output routines,
4362 since they are part of LyX, know everything LyX knows about the document
4367 \begin_layout Plain Layout
4368 Another advantege is that, since these routines are internal to LyX, they
4369 are immune to changes in LyX's file format, or to changes in the semantics
4375 So they know about the table of contents (as displayed in the outline),
4376 about the counters associated with different paragraph styles, and about
4377 user-defined styles.
4378 The XHTML output routines know what LyX knows about internationalization,
4379 too, so they will output
4380 \begin_inset Quotes eld
4384 \begin_inset Quotes erd
4388 \begin_inset Quotes eld
4396 \begin_inset Quotes erd
4399 , depending upon the language in effect at the time.
4403 \begin_layout Standard
4404 Quite generally, the output routines know everything LyX knows about document
4405 layout, that is, about how the document is to be rendered on screen.
4406 We use this information when we output the document as XHTML.
4411 generates CSS style information corresponding to the layout information
4412 it uses to render the document on screen: if section headings are supposed
4413 to be sans-serif and bold as seen in LyX, then (by default) they will be
4414 sans-serif and bold when viewed in a web browser, too.
4415 And this is true not just for pre-defined styles, like Section, but for
4416 any style, including user-defined styles.
4417 Indeed, the XHTML output routines make no distinction between user-defined
4418 paragraph and character styles and LyX's own pre-defined styles: in each
4419 case, everything LyX knows about the styles is contained in the layout
4421 And much the same is true as regards pre-defined textual insets, such as
4422 footnotes, and various custom insets.
4426 \begin_layout Standard
4427 The result is that XHTML output can be customized and extended in
4431 the same way LaTeX output can be customized and extended: through layout
4433 See chapter five of the
4437 manual for the details.
4440 \begin_layout Standard
4441 The remainder of this chapter contains more detailed information on XHTML
4442 output, its limitations, and ways to work around those limitations.
4445 \begin_layout Section
4446 Math Output in XHTML
4449 \begin_layout Standard
4450 LyX offers four choices for how math is rendered.
4451 These have various advantages and disadvantages:
4454 \begin_layout Itemize
4456 \begin_inset Newline newline
4459 MathML is a dialect of XML designed specifically for mathematics on the
4460 web, and it typically renders very well in browsers that support it.
4461 The disadvantage is that not all browsers support MathML, and support is
4462 not complete even in the Gecko-based browsers, such as Firefox.
4463 \begin_inset Newline newline
4466 If Lyx is unable to render a formula as MathML---for example, if the formula
4468 \begin_inset Flex Code
4471 \begin_layout Plain Layout
4477 package or ERT---then it will instead output the formula as an image.
4481 \begin_layout Itemize
4483 \begin_inset Newline newline
4487 \begin_inset Flex Code
4490 \begin_layout Plain Layout
4496 outputs math as HTML, styled by CSS.
4500 \begin_layout Plain Layout
4501 LyX has borrowed some of the CSS for its HTML output from
4502 \begin_inset Flex Code
4505 \begin_layout Plain Layout
4516 For simple formulae, this can work quite well, though with more complicated
4517 formulae it tends to break down.
4518 Still, this method has the advantage that it is very widely supported and
4519 so it may be appropriate for documents that contain only a little, fairly
4521 \begin_inset Newline newline
4524 If Lyx is unable to render a formula as MathML---for example, if the formula
4526 \begin_inset Flex Code
4529 \begin_layout Plain Layout
4535 package or ERT---then it will instead output the formula as an image.
4539 \begin_layout Itemize
4541 \begin_inset Newline newline
4545 \begin_inset Flex Code
4548 \begin_layout Plain Layout
4554 , LyX will output formulae as images, the very same images, in fact, that
4555 are used for instant preview.
4559 \begin_layout Plain Layout
4560 Instant preview does
4564 have to be on for images to be output, however.
4569 The advantage to this method is that the images are simply generated by
4570 LaTeX, so they are very accurate.
4571 The disadvantage, as mentioned earlier, is that these are bitmapped images,
4572 so they do not scale terribly well, and one cannot copy them, etc.
4573 \begin_inset Newline newline
4576 The size of the images can be controlled by setting the
4577 \begin_inset Quotes eld
4581 \begin_inset Quotes erd
4585 \begin_inset Flex MenuItem
4588 \begin_layout Plain Layout
4589 Document\SpecialChar \menuseparator
4590 Settings\SpecialChar \menuseparator
4600 \begin_layout Plain Layout
4601 For those who want to know, this controls the resolution of the image in
4602 dots per inch and is based upon a default of 75 dpi.
4608 \begin_inset Newline newline
4611 If LyX for some reason fails to create an image for a formula (e.g., if a
4612 required LaTeX package is not installed), then it will fall back to outputing
4616 \begin_layout Itemize
4618 \begin_inset Newline newline
4621 Finally, LyX will happily output math as LaTeX.
4622 As well as being the output of last resort, this method can be used with
4624 \begin_inset CommandInset href
4627 target "http://www.math.union.edu/~dpvc/jsMath/"
4631 , which uses JavaScript to render LaTeX embedded in HTML documents.
4632 LyX wraps the LaTeX in either a
4633 \begin_inset Flex Code
4636 \begin_layout Plain Layout
4642 (for inline formulas) or
4643 \begin_inset Flex Code
4646 \begin_layout Plain Layout
4652 (for displayed formulas) with
4653 \begin_inset Flex Code
4656 \begin_layout Plain Layout
4662 , as is required for jsMath.
4665 \begin_layout Standard
4666 One of these output methods must be selected under
4667 \begin_inset Flex MenuItem
4670 \begin_layout Plain Layout
4671 Document\SpecialChar \menuseparator
4672 Settings\SpecialChar \menuseparator
4679 By default, LyX outputs MathML.
4680 This is a document-wide setting, therefore.
4683 \begin_layout Standard
4684 Eventually, LyX will offer the user the option to select an alternate output
4685 method for a particular inset, say, one that isn't being rendered very
4690 \begin_layout Plain Layout
4691 That said, since LyX falls back to images if the inset contains ERT, then
4692 one can force output as an image by putting some harmless ERT into the
4694 \begin_inset Formula $a=b\relax$
4705 \begin_layout Section
4706 Bibliography and Citations
4709 \begin_layout Standard
4710 XHTML output fully supports bibliographies and citations.
4714 \begin_layout Standard
4715 Citation labels are generated by the same machinery that generates LyX's
4716 on-screen labels, so the labels will look in the output much as they do
4717 in LyX, though better.
4718 If you are using numerical citations, then LyX will output numerical labels,
4719 such as [1] or [17], rather than simply showing the citation key in square
4720 brackets, as it does on-screen.
4721 If you are using author-year citations, then LyX will add lowercase letters
4722 to the years, just as BibTeX does, if it finds more than one citation for
4723 a given author-year combination.
4724 The labels will be printed with the bibliography entries.
4725 Note that there is, at present, no way to customize the appearance of the
4726 labels, for example, to choose between square brackets and parentheses.
4729 \begin_layout Standard
4730 Bibliography output is handled by the same machinery that handles the presentati
4731 on of reference information in the citation dialog, so you will see in the
4732 XHTML output pretty much what you would see if you were to look at a given
4733 entry in the citation dialog.
4734 The formatting can be customized in your layout file or, preferably, in
4740 manual for the details.
4743 \begin_layout Standard
4744 The main defect at present is that cross-referenced information is printed
4745 with every entry with which it is associated.
4746 So you can see things like this:
4751 \begin_inset Quotes eld
4754 Context and Logical Form
4755 \begin_inset Quotes erd
4760 Language in Context: Selected Essays
4762 (Oxford: Oxford University Press, 2007), pp.
4768 \begin_inset Quotes eld
4771 Semantics in Context
4772 \begin_inset Quotes erd
4777 Language in Context: Selected Essays
4779 (Oxford: Oxford University Press, 2007), pp.
4783 \begin_layout Standard
4784 This should be fixed before long.
4787 \begin_layout Standard
4788 There is no support at present for sectioned bibliographies.
4789 If you have multiple bibliographies, then LyX will print the same bibliography
4793 \begin_layout Section
4797 \begin_layout Standard
4798 LyX will happily export indexes as XHTML, but with certain limitations at
4802 \begin_layout Standard
4803 Index export will be most reliable when you do not attempt to use the fancy
4804 constructs that are described in the section on indexes in the
4812 \begin_layout Plain Layout
4813 The main issue here is that LyX itself does not really handle these.
4814 It just lets you enter what you would have to enter in raw LaTeX.
4819 We'll describe how they are handled using the subsection headings from
4823 \begin_layout Itemize
4824 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
4825 these, but the entries must be separated by
4826 \begin_inset Quotes eld
4830 \begin_inset Quotes erd
4833 , that is, there must be spaces around the exclamation point.
4834 This is because it is otherwise too difficult to check for escaped exclamation
4835 points, ones in math, and so forth.
4838 \begin_layout Itemize
4839 Page Ranges: There is no support at all for page ranges, since these make
4840 no sense with XHMTL.
4841 Instead, you will just get two index entries, one at either end.
4844 \begin_layout Itemize
4845 Cross-referencing: There is no support for cross-referencing.
4846 If LyX finds an entry containing the
4847 \begin_inset Quotes eld
4850 |see\SpecialChar \ldots{}
4852 \begin_inset Quotes erd
4855 construct, it is just dropped, and the rest is treated as an ordinary index
4859 \begin_layout Itemize
4860 Index Entry Order: LyX does support attempts to fix the sorting order.
4861 It will take what is before the first `@' it finds and use that for sorting,
4862 taking what follows the first `@' to be the actual entry.
4863 At present, LyX does not check for escaped `@', so do not try to index
4867 \begin_layout Itemize
4868 Index Entry Layout: You can format entries by using the text style dialog,
4869 or by using any other method available within LyX itself.
4870 There is no support for constructs like:
4871 \begin_inset Quotes eld
4875 \begin_inset Quotes erd
4879 Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
4880 and everything that follows it.
4883 \begin_layout Itemize
4884 Multiple Indexes: There is no support for multiple indexes.
4885 Rather, all index entries will be printed as one large index.
4886 To avoid our printing several versions of the index, we print only the
4887 main index, so make sure you have one.
4890 \begin_layout Section
4891 Nomenclature and Glossary
4894 \begin_layout Standard
4895 There is at present no support for glossaries.
4898 \begin_layout Chapter
4902 \begin_layout Section
4906 \begin_layout Standard
4907 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
4908 and retrieve information about the LyX internal state.
4909 This is only intended for advanced users, but they should find it useful.
4910 It is by writing to the LyX server, for example, that bibliography managers,
4911 such as JabRef, are able to
4912 \begin_inset Quotes eld
4916 \begin_inset Quotes erd
4922 \begin_layout Section
4923 Starting the LyX Server
4926 \begin_layout Standard
4927 The LyX server works through the use of a pair of named pipes.
4928 These are usually located in
4929 \begin_inset Flex Code
4932 \begin_layout Plain Layout
4938 , (except on Windows, where
4942 named pipes are special objects located in
4943 \begin_inset Flex Code
4946 \begin_layout Plain Layout
4958 ) and have the names
4959 \begin_inset Quotes eld
4963 \begin_inset Flex Code
4966 \begin_layout Plain Layout
4973 \begin_inset Quotes erd
4977 \begin_inset Quotes eld
4981 \begin_inset Flex Code
4984 \begin_layout Plain Layout
4991 \begin_inset Quotes erd
4995 External programs write into
4996 \begin_inset Flex Code
4999 \begin_layout Plain Layout
5005 and read back data from
5006 \begin_inset Flex Code
5009 \begin_layout Plain Layout
5016 The stem of the pipe names can be defined in the
5017 \begin_inset Flex MenuItem
5020 \begin_layout Plain Layout
5021 Tools\SpecialChar \menuseparator
5028 \begin_inset Flex Code
5031 \begin_layout Plain Layout
5032 "/home/myhome/lyxpipe"
5038 \begin_inset Flex Code
5041 \begin_layout Plain Layout
5060 configure this manually in order for the server to start.
5063 \begin_layout Standard
5065 \begin_inset Flex Code
5068 \begin_layout Plain Layout
5075 \begin_inset Flex Code
5078 \begin_layout Plain Layout
5084 ' to create the pipes.
5085 If one of the pipes already exists, LyX will assume that another LyX process
5086 is already running and will not start the server.
5087 On POSIX (Unix like) systems, if for some other reason, an unused
5088 \begin_inset Quotes eld
5092 \begin_inset Quotes erd
5095 pipe is left in existence when LyX closes, then LyX will try to delete
5097 If this fails for some reason, you will need to delete the pipes manually
5098 and then restart LyX.
5099 On Windows, pipes are deleted by the OS on program termination or crash,
5101 \begin_inset Quotes eld
5105 \begin_inset Quotes erd
5108 pipes should not be possible.
5111 \begin_layout Standard
5112 To have several LyX processes with servers at the same time, you have to
5113 use different configurations, perhaps by using separate user directories,
5115 \begin_inset Flex Code
5118 \begin_layout Plain Layout
5124 file, for each process.
5127 \begin_layout Standard
5128 If you are developing a client program, you might find it useful to enable
5129 debugging information from the LyX server.
5130 Do this by starting LyX as
5131 \begin_inset Flex Code
5134 \begin_layout Plain Layout
5143 \begin_layout Standard
5144 You can find a complete example client written in C in the source distribution
5146 \begin_inset Flex Code
5149 \begin_layout Plain Layout
5150 development/lyxserver/server_monitor.c
5158 \begin_layout Standard
5159 Another useful tool is command-line based client you will find in
5160 \begin_inset Flex Code
5163 \begin_layout Plain Layout
5164 src/client/lyxclient
5172 \begin_layout Section
5173 Normal communication
5176 \begin_layout Standard
5177 To issue a LyX call, the client writes a line of ASCII text into the input
5179 This line has the following format:
5196 \begin_layout Description
5197 clientname is a name that the client can choose arbitrarily.
5198 Its only use is that LyX will echo it if it sends an answer—so a client
5199 can dispatch results from different requesters.
5202 \begin_layout Description
5203 function is the function you want LyX to perform.
5204 It is the same as the commands you'd use in the minibuffer.
5207 \begin_layout Description
5208 argument is an optional argument which is meaningful only to some functions
5210 \begin_inset Quotes eld
5214 \begin_inset Quotes erd
5217 LFUN will insert the argument as text at the cursor position).
5220 \begin_layout Standard
5221 The answer from LyX will arrive in the output pipe and be of the form
5238 \begin_layout Standard
5247 are just echoed from the command request, while
5251 is more or less useful information filled according to how the command
5252 execution worked out.
5253 Some commands, such as
5254 \begin_inset Quotes eld
5258 \begin_inset Quotes erd
5261 , will return information about the internal state of LyX, while other will
5262 return an empty data-response.
5263 This means that the command execution went fine.
5266 \begin_layout Standard
5267 In case of errors, the response from LyX will have this form
5284 \begin_layout Standard
5289 should contain an explanation of why the command failed.
5292 \begin_layout Standard
5296 \begin_layout LyX-Code
5297 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5298 \begin_inset Newline newline
5301 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5302 \begin_inset Newline newline
5305 read a <~/.lyxpipe.out
5306 \begin_inset Newline newline
5312 \begin_layout Section
5316 \begin_layout Standard
5317 LyX can notify clients of events going on asynchronously.
5318 Currently it will only do this if the user binds a key sequence with the
5320 \begin_inset Quotes eld
5324 \begin_inset Quotes erd
5328 The format of the string LyX sends is as follows:
5332 \begin_inset Flex Code
5335 \begin_layout Plain Layout
5346 \begin_layout Standard
5351 is the printed representation of the key sequence that was actually typed
5355 \begin_layout Standard
5356 This mechanism can be used to extend LyX's command set and implement macros.
5357 Bind some key sequence to
5358 \begin_inset Quotes eld
5362 \begin_inset Quotes erd
5366 Then start a client that listens on the output pipe, dispatches the command
5367 according to the sequence, and starts a function that may use LyX calls
5368 and LyX requests to issue a command or a series of commands to LyX.
5371 \begin_layout Section
5372 The simple LyX Server Protocol
5375 \begin_layout Standard
5376 LyX implements a simple protocol that can be used for session management.
5377 All messages are of the form
5390 \begin_layout Standard
5396 \begin_inset Quotes eld
5400 \begin_inset Quotes erd
5404 \begin_inset Quotes eld
5408 \begin_inset Quotes erd
5413 \begin_inset Quotes eld
5417 \begin_inset Quotes erd
5420 is received from a client, LyX will report back to inform the client that
5421 it's listening to it's messages, while
5422 \begin_inset Quotes eld
5426 \begin_inset Quotes erd
5429 sent from LyX will inform clients that LyX is closing.
5432 \begin_layout Section
5433 Reverse DVI/PDF search
5436 \begin_layout Standard
5437 Some DVI/PDF viewers
5441 \begin_layout Plain Layout
5442 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5443 Skim on Mac OSX and SumatraPDF on Windows.
5452 facility (also called
5457 This means that you can tell LyX to put the cursor to a specific line in
5458 the document by clicking at the respective position in the DVI/PDF output.
5459 To achieve this, the viewer must be able to communicate with LyX.
5460 This is done via the LyX server either by using the named pipe (
5464 ), or the UNIX domain socket (
5468 ) that LyX creates in its temporary directory (this is the way the
5469 \begin_inset Flex Code
5472 \begin_layout Plain Layout
5478 program communicates with LyX).
5479 In some cases, you need a helper script that mediates between the viewer
5480 and LyX, in others, the viewer can communicate with LyX directly.
5481 This depends on the selected viewer and on your operating system.
5482 The same applies to the way viewers need to be configured and the way the
5483 reverse search is actually performed.
5484 In what follows, we will thus describe how to setup reverse search for
5486 Before we turn to this, though, we will explain what needs to be done generally
5487 to enable reverse search in the DVI/PDF output.
5490 \begin_layout Subsection
5492 \change_inserted 2 1274788899
5493 \begin_inset CommandInset label
5495 name "sub:rev-search"
5499 Automatical enabling
5502 \begin_layout Standard
5504 \change_inserted 2 1274789582
5505 In most cases LyX will do the work for you by enabling
5506 \begin_inset Flex MenuItem
5509 \begin_layout Plain Layout
5511 \change_inserted 2 1274789026
5512 Document\SpecialChar \menuseparator
5513 Output\SpecialChar \menuseparator
5520 In such a case LyX will automatically insert SyncTeX macro (for PDF) or
5521 srcltx package (for DVI) respectively.
5522 This option can be easily reached also on
5523 \begin_inset Flex Code
5526 \begin_layout Plain Layout
5528 \change_inserted 2 1274789582
5539 \begin_layout Standard
5541 \change_inserted 2 1274789534
5542 Plase note that including
5543 \begin_inset Flex Code
5546 \begin_layout Plain Layout
5548 \change_inserted 2 1274789498
5557 \begin_inset Flex Code
5560 \begin_layout Plain Layout
5562 \change_inserted 2 1274789484
5570 sometimes have an impact on the typeset and you should switch them off
5571 for the final typesets.
5576 \begin_layout Standard
5578 \change_inserted 2 1274789340
5579 You can also define custom macro in preferences and in case you need some
5580 special tweaks read the next section about manual enabling.
5586 \begin_layout Subsection
5588 \change_inserted 2 1274788680
5594 \begin_layout Standard
5595 LaTeX provides several different methods for reverse search.
5596 Some are built-in in the
5597 \begin_inset Flex Code
5600 \begin_layout Plain Layout
5606 program, some are provided by external packages.
5607 Your choice depends on whether your LaTeX distribution already provides
5608 a given method (the built-in methods are rather new) and whether your viewer
5610 The available methods are described in the following.
5611 \change_inserted 2 1274788557
5615 \begin_layout Subsubsection*
5616 Built-in DVI-search via src-specials (DVI only)
5619 \begin_layout Standard
5620 This method provides the DVI file with the necessary information for reverse
5622 It is available in LaTeX since quite some time (any somewhat recent LaTeX
5623 distribution should include it), and it works reliably.
5624 To enable it, change the
5625 \begin_inset Flex MenuItem
5628 \begin_layout Plain Layout
5633 \begin_layout Plain Layout
5646 \begin_inset Flex MenuItem
5649 \begin_layout Plain Layout
5654 \begin_layout Plain Layout
5661 eX (plain)->DraftDVI
5667 \begin_inset Flex MenuItem
5670 \begin_layout Plain Layout
5671 Preferences\SpecialChar \menuseparator
5672 File Handling\SpecialChar \menuseparator
5679 \begin_inset Flex Code
5682 \begin_layout Plain Layout
5683 latex -src-specials $$i
5689 If this doesn't work, check if your TeX engine needs different options
5690 (the syntax might differ in some distributions).
5693 \begin_layout Subsubsection*
5694 External Packages (PDFSync and scrltx)
5697 \begin_layout Standard
5706 provide reverse search facility for PDF output (via pdflatex) and DVI output,
5708 In order to enable it, load the packages in the LyX preamble:
5711 \begin_layout Itemize
5712 \begin_inset Flex Code
5715 \begin_layout Plain Layout
5723 for reverse PDF search,
5726 \begin_layout Itemize
5728 \begin_inset Flex Code
5731 \begin_layout Plain Layout
5734 usepackage[active]{srcltx}
5739 for reverse DVI search.
5742 \begin_layout Standard
5743 If you want to be able to perform both DVI and PDF reverse searches, you
5744 can also insert in the preamble the following lines
5747 \begin_layout LyX-Code
5751 \begin_inset Newline newline
5757 \begin_inset Newline newline
5763 \begin_inset Newline newline
5769 \begin_inset Newline newline
5774 usepackage[active]{srcltx}
5775 \begin_inset Newline newline
5783 \begin_layout Standard
5784 This way, you can preview the file as either DVI or PDF (pdflatex) and the
5785 right package will be used.
5788 \begin_layout Standard
5789 Note that PDFSync might affect the output layout of your document.
5790 It is therefore advised to disable PDFsync for final documents.
5793 \begin_layout Subsubsection*
5794 Built-in reverse search via SyncTeX (DVI and PDF)
5797 \begin_layout Standard
5799 \begin_inset Flex Code
5802 \begin_layout Plain Layout
5808 have built-in support for both PDF and DVI reverse search.
5813 facility is basically the result of the integration of the PDFSync package
5814 to the pdftex program and its merge with the
5819 You need at least TeXLive 2008 or a recent MikTeX distribution in order
5821 Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
5822 already provide SyncTeX support.
5825 \begin_layout Standard
5826 To enable SyncTeX for DVI output, change the
5827 \begin_inset Flex MenuItem
5830 \begin_layout Plain Layout
5835 \begin_layout Plain Layout
5848 \begin_inset Flex MenuItem
5851 \begin_layout Plain Layout
5856 \begin_layout Plain Layout
5863 eX (plain) -> DraftDVI
5869 \begin_inset Flex MenuItem
5872 \begin_layout Plain Layout
5873 Preferences\SpecialChar \menuseparator
5874 File Handling\SpecialChar \menuseparator
5881 \begin_inset Flex Code
5884 \begin_layout Plain Layout
5885 latex -synctex=1 $$i
5890 , and for PDF output, change the
5891 \begin_inset Flex MenuItem
5894 \begin_layout Plain Layout
5899 \begin_layout Plain Layout
5906 eX (pdflatex) -> PDF (pdflatex)
5912 \begin_inset Flex Code
5915 \begin_layout Plain Layout
5916 pdflatex -synctex=1 $$i
5922 Check the documentation of your viewer whether the viewer needs to be configure
5923 d for the use with SyncTeX.
5927 \begin_layout Plain Layout
5929 \begin_inset Flex Code
5932 \begin_layout Plain Layout
5938 option enables gzip compression.
5939 If your viewer does not support it, you should instead use
5940 \begin_inset Flex Code
5943 \begin_layout Plain Layout
5957 \begin_layout Subsection
5958 Configuring and using specific viewers
5961 \begin_layout Subsubsection*
5962 Xdvi (all platforms)
5965 \begin_layout Standard
5967 \begin_inset Flex Code
5970 \begin_layout Plain Layout
5976 , you don't need to do anything else for performing a reverse DVI search,
5977 as LyX already provides the necessary hooks for automatically using the
5979 \begin_inset Flex Code
5982 \begin_layout Plain Layout
5989 Just setup your document as described above (reverse search is triggered
5990 by Ctrl-click or Alt-click on Mac OSX, respectively).
5993 \begin_layout Standard
5994 However, if for whatever reason you want to use the named pipe instead of
5995 the socket for communicating with LyX, simply change the DVI viewer in
5997 \begin_inset Flex MenuItem
6000 \begin_layout Plain Layout
6001 Preferences\SpecialChar \menuseparator
6002 File Handling\SpecialChar \menuseparator
6012 \begin_layout Plain Layout
6013 On Mac OSX you have to use
6014 \begin_inset Flex Code
6017 \begin_layout Plain Layout
6018 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6029 \begin_inset Flex Code
6032 \begin_layout Plain Layout
6033 xdvi -editor 'lyxeditor.sh %f %l'
6039 \begin_inset Flex Code
6042 \begin_layout Plain Layout
6048 is a suitable script.
6049 For example, a minimal shell script is the following one:
6052 \begin_layout LyX-Code
6054 \begin_inset Newline newline
6057 LYXPIPE="/path/to/lyxpipe"
6058 \begin_inset Newline newline
6061 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6062 \begin_inset Newline newline
6065 echo "$COMMAND" > "${LYXPIPE}".in || exit
6066 \begin_inset Newline newline
6069 read < "${LYXPIPE}".out || exit
6072 \begin_layout Standard
6074 \begin_inset Flex Code
6077 \begin_layout Plain Layout
6087 \begin_layout Plain Layout
6094 XServer pipe path specified in
6095 \begin_inset Flex MenuItem
6098 \begin_layout Plain Layout
6099 Preferences\SpecialChar \menuseparator
6109 \begin_layout Plain Layout
6111 \begin_inset Flex Code
6114 \begin_layout Plain Layout
6120 folder of a source distribution you can find a
6121 \begin_inset Flex Code
6124 \begin_layout Plain Layout
6130 script which is able to locate the
6134 based on your preferences.
6142 \begin_layout Subsubsection*
6146 \begin_layout Standard
6148 \begin_inset Flex Code
6151 \begin_layout Plain Layout
6152 /Applications/MacDviX_Folder/calleditor.script
6157 , add the following lines:
6160 \begin_layout LyX-Code
6165 \begin_layout Plain Layout
6172 X.app/Contents/MacOS/lyxeditor "$2" $1
6173 \begin_inset Newline newline
6179 \begin_layout Standard
6180 Modify the lines accordingly if you install LyX somewhere else than in the
6181 Applications folder.
6184 \begin_layout Standard
6185 Reverse search is triggered by Alt-click (OPTION-click).
6188 \begin_layout Subsubsection*
6192 \begin_layout Standard
6194 \begin_inset Flex Code
6197 \begin_layout Plain Layout
6198 open -a Skim.app $$i
6203 to the viewer setting in
6204 \begin_inset Flex MenuItem
6207 \begin_layout Plain Layout
6208 Preferences\SpecialChar \menuseparator
6209 File Handling\SpecialChar \menuseparator
6210 File formats\SpecialChar \menuseparator
6217 \begin_inset Flex MenuItem
6220 \begin_layout Plain Layout
6221 Skim\SpecialChar \menuseparator
6222 Preferences\SpecialChar \menuseparator
6232 \begin_layout Plain Layout
6242 \begin_layout Standard
6243 Reverse search is triggered by COMMAND-SHIFT-click
6246 \begin_layout Subsubsection*
6250 \begin_layout Standard
6252 \begin_inset Flex MenuItem
6255 \begin_layout Plain Layout
6256 Settings\SpecialChar \menuseparator
6257 Configure Okular\SpecialChar \ldots{}
6258 \SpecialChar \menuseparator
6265 \begin_inset Quotes eld
6269 \begin_inset Quotes erd
6273 \begin_inset Flex Code
6276 \begin_layout Plain Layout
6285 \begin_layout Standard
6286 Reverse search is triggered by SHIFT-click.
6289 \begin_layout Subsubsection*
6293 \begin_layout Standard
6294 Launch yap, choose its
6295 \begin_inset Flex MenuItem
6298 \begin_layout Plain Layout
6299 View\SpecialChar \menuseparator
6306 \begin_inset Quotes eld
6310 \begin_inset Quotes erd
6315 \begin_inset Quotes eld
6318 New\SpecialChar \ldots{}
6320 \begin_inset Quotes erd
6323 button and, in the window that opens, enter
6324 \begin_inset Quotes eld
6328 \begin_inset Quotes erd
6331 (or any other name you like) in the
6332 \begin_inset Quotes eld
6336 \begin_inset Quotes erd
6340 Now click on the button labeled
6341 \begin_inset Quotes eld
6344 \SpecialChar \ldots{}
6346 \begin_inset Quotes erd
6349 to open a file dialog and navigate to the directory containing the batch
6351 \begin_inset Flex Code
6354 \begin_layout Plain Layout
6362 \begin_inset Flex Code
6365 \begin_layout Plain Layout
6371 and then specify the program arguments as
6372 \begin_inset Flex Code
6375 \begin_layout Plain Layout
6383 \begin_inset Flex Code
6386 \begin_layout Plain Layout
6392 wrapper is used for communicating with LyX through the
6399 \begin_layout LyX-Code
6401 \begin_inset Newline newline
6404 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
6413 \begin_inset Newline newline
6427 \begin_layout Standard
6428 Make sure that the LyXServer pipe path you specified in LyX is
6429 \begin_inset Flex Code
6432 \begin_layout Plain Layout
6446 , otherwise change the
6447 \begin_inset Flex Code
6450 \begin_layout Plain Layout
6456 wrapper accordingly.
6459 \begin_layout Standard
6460 In yap, reverse search is triggered by double-click.
6463 \begin_layout Subsubsection*
6464 SumatraPDF (Windows)
6467 \begin_layout Standard
6468 In order to use SumatraPDF for inverse search, enter
6469 \begin_inset Flex Code
6472 \begin_layout Plain Layout
6473 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6478 in the viewer setting in
6479 \begin_inset Flex MenuItem
6482 \begin_layout Plain Layout
6483 Preferences\SpecialChar \menuseparator
6484 File Handling\SpecialChar \menuseparator
6485 File formats\SpecialChar \menuseparator
6492 \begin_inset Flex Code
6495 \begin_layout Plain Layout
6501 is the previous wrapper.
6502 If SumatraPDF.exe is not in your command PATH, use its full file name.
6505 \begin_layout Standard
6506 Reverse search is triggered by double-click.
6509 \begin_layout Subsubsection*
6513 \begin_layout Standard
6514 First of all, make sure that yap is your default DVI viewer in the Windows
6515 environment, then launch it, choose its
6516 \begin_inset Flex MenuItem
6519 \begin_layout Plain Layout
6520 View\SpecialChar \menuseparator
6527 \begin_inset Quotes eld
6531 \begin_inset Quotes erd
6536 \begin_inset Quotes eld
6539 New\SpecialChar \ldots{}
6541 \begin_inset Quotes erd
6544 button and, in the window that opens, enter
6545 \begin_inset Quotes eld
6549 \begin_inset Quotes erd
6552 (or any other name you like) in the
6553 \begin_inset Quotes eld
6557 \begin_inset Quotes erd
6561 Now click on the button labeled
6562 \begin_inset Quotes eld
6565 \SpecialChar \ldots{}
6567 \begin_inset Quotes erd
6570 to open a file dialog and navigate to the directory containing the
6571 \begin_inset Flex Code
6574 \begin_layout Plain Layout
6580 program (which is installed by default on Cygwin along with the LyX executable).
6582 \begin_inset Flex Code
6585 \begin_layout Plain Layout
6591 and then specify the program arguments as
6592 \begin_inset Flex Code
6595 \begin_layout Plain Layout
6602 In this way, you will be using the
6606 for communicating with LyX.
6607 If, for whatever reason, you want to use the
6612 \begin_inset Flex Code
6615 \begin_layout Plain Layout
6621 option and be sure to specify the LyXServer pipe path in the LyX preferences.
6624 \begin_layout Standard
6625 In yap, reverse search is triggered by double-click.
6628 \begin_layout Subsubsection*
6632 \begin_layout Standard
6633 In order to use SumatraPDF for inverse search, enter
6634 \begin_inset Flex Code
6637 \begin_layout Plain Layout
6643 in the viewer setting in
6644 \begin_inset Flex MenuItem
6647 \begin_layout Plain Layout
6648 Preferences\SpecialChar \menuseparator
6649 File Handling\SpecialChar \menuseparator
6650 File formats\SpecialChar \menuseparator
6657 \begin_inset Flex Code
6660 \begin_layout Plain Layout
6666 is the following script (to be placed in your command PATH,
6667 \begin_inset Flex Code
6670 \begin_layout Plain Layout
6676 being the best choice):
6679 \begin_layout LyX-Code
6681 \begin_inset Newline newline
6685 \begin_inset Newline newline
6688 SumatraPDF -inverse-search "lyxeditor -g %f %l" $(basename $1)
6691 \begin_layout Standard
6692 This wrapper script is needed because SumatraPDF is a native Windows application
6693 and does not understand the posix paths used by the Cygwin version of LyX.
6694 If SumatraPDF.exe is not in your command PATH, use its full posix path in
6697 \begin_inset Flex Code
6700 \begin_layout Plain Layout
6706 enables communication via the
6712 \begin_inset Flex Code
6715 \begin_layout Plain Layout
6721 option if you want to use the
6725 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6728 \begin_layout Standard
6729 Reverse search is triggered by double-click.
6730 \change_inserted 1 1271453423
6734 \begin_layout Section
6736 \change_inserted 1 1271453442
6740 \begin_layout Standard
6742 \change_inserted 1 1271454338
6743 To make forward search possible you need to provide generated output PDF/DVI
6744 file with additional information about TeX sources.
6745 This can be done via the methods described in the section
6746 \begin_inset CommandInset ref
6748 reference "sub:rev-search"
6755 \begin_layout Standard
6757 \change_inserted 1 1271454479
6758 Secondly you need to configure LyX for using your viewers in
6759 \begin_inset Flex MenuItem
6762 \begin_layout Plain Layout
6764 \change_inserted 1 1271453866
6765 Preferences\SpecialChar \menuseparator
6766 Output\SpecialChar \menuseparator
6773 Only some of the viewers allows this operation --- yap, xdvi, okular, Sumatra
6778 \begin_layout Plain Layout
6780 \change_inserted 1 1271454273
6781 For Sumatra CMCDDE is needed --- downloadable from http://www.istri.fr/zip/CMCDDE.z
6790 Some other viewers allow at least reloading and positioning to particular
6791 page of the file --- Evince or xpdf --- for these cases you can use external
6793 Please study the prepared examples in the Preferences dialog.
6798 \begin_layout Chapter
6799 Special Document Classes
6802 \begin_layout Section
6806 \begin_layout Standard
6812 \begin_layout Subsection
6816 \begin_layout Standard
6817 This section describes how LyX can be used to write articles for submission
6818 to the scientific journal
6820 Astronomy and Astrophysics
6822 (www.edpsciences.fr/aa/
6823 \begin_inset Flex URL
6826 \begin_layout Plain Layout
6828 http://www.edpsciences.fr/aa/
6833 ) using Version 5.01 of the document class
6838 This package can be downloaded from the ftp site
6841 \begin_layout Standard
6842 \begin_inset VSpace medskip
6848 \begin_layout Standard
6850 \begin_inset Flex URL
6853 \begin_layout Plain Layout
6855 ftp://ftp.edpsciences.org/pub/aa/readme.html
6863 \begin_layout Standard
6864 \begin_inset VSpace medskip
6870 \begin_layout Standard
6871 A manual comes together with that package, and this text is not meant to
6872 replace the original manual but is merely a short guide in how to realize
6873 the correct form of your paper.
6877 \begin_layout Standard
6878 Please note that the publisher of the journal was changed from Springer
6879 to EDP Sciences starting January 1, 2001.
6880 That change involved also some slight changes to the style files, namely
6881 the removal of the thesaurus command.
6882 The LyX class aa supports the newest version of these style files, V 5.01.
6883 If you have an older version installed, please upgrade.
6884 For compatibility, the old (version 4) layout has been kept as
6889 Please refer to the comments in
6891 LyXDir/layouts/aapaper.layout
6896 \begin_layout Subsection
6900 \begin_layout Standard
6901 It is recommended you start from the example template distributed with LyX.
6902 If you are not using a template, note the following settings:
6905 \begin_layout Itemize
6912 Document\SpecialChar \menuseparator
6915 dialog (OK, that one was obvious).
6918 \begin_layout Itemize
6919 Don't change the option
6922 \begin_inset space ~
6932 The whole layout is done by the macros, you shouldn't change anything.
6935 \begin_layout Subsection
6939 \begin_layout Standard
6940 First thing to enter is the header information.
6941 It consists of seven entries, of which some are optional.
6945 \begin_layout Itemize
6953 \begin_layout Itemize
6961 \begin_layout Itemize
6969 \begin_layout Itemize
6977 \begin_layout Itemize
6982 : [optional] if more than one author: whom to contact for offprint requests.
6985 \begin_layout Itemize
6990 : [optional] mail address for contacts.
6993 \begin_layout Itemize
7001 Received: <date>; Accepted <date>
7004 \begin_layout Standard
7005 There is no need to issue the
7011 command, this is done automatically by LyX when the header is finished.
7012 Although the order of the single header entries doesn't matter it is advised
7013 to keep the above sequence, just to get the best optics and meets the layout
7014 of the real document.
7017 \begin_layout Standard
7018 If you want to place footnotes in the header block, e.
7019 \begin_inset space \thinspace{}
7023 \begin_inset space \space{}
7026 to state your present address, just use the standard footnote via the menu
7029 Insert\SpecialChar \menuseparator
7033 LyX will automagically use the term
7042 \begin_layout Standard
7043 In addition to these topics, the macros use three additional LaTeX commands
7044 that have no counterpart in LyX:
7047 \begin_layout Itemize
7054 to separate different names for more than one author and institute, respectivel
7058 \begin_layout Itemize
7065 to mark corresponding author/institute pairs.
7066 The institutes are numbered sequentially as they appear in the
7070 field, so you have to put a marker to each author.
7073 \begin_layout Itemize
7080 to supply an email address for fast contact.
7083 \begin_layout Standard
7084 In all cases, the appropriate command has to be entered in LyX and marked
7090 \begin_layout Subsection
7094 \begin_layout Standard
7095 The abstract should immediately follow the header block.
7096 With version 5 the abstract environment was changed to a command, and there
7097 is now a resctriction to only one paragraph.
7098 In addition, it should contain an entry with the keywords.
7099 This is not yet implemented for LyX, therefore you have to enter the LaTeX
7106 by hand and mark it as LaTeX code.
7107 Refer to the example paper.
7110 \begin_layout Subsection
7111 Supported environments
7114 \begin_layout Standard
7115 The A&A paper layout supports the following environments for structuring
7119 \begin_layout Itemize
7125 \begin_layout Itemize
7131 \begin_layout Itemize
7137 \begin_layout Itemize
7143 \begin_layout Itemize
7149 \begin_layout Itemize
7155 \begin_layout Itemize
7161 \begin_layout Itemize
7167 \begin_layout Itemize
7173 \begin_layout Itemize
7179 \begin_layout Itemize
7185 \begin_layout Itemize
7191 \begin_layout Subsection
7192 Commands not supported by LyX
7195 \begin_layout Standard
7196 Some commands are not yet supported by the
7201 Some have already been mentioned.
7202 For the sake of completeness, they are listed all together here:
7205 \begin_layout Itemize
7213 \begin_layout Itemize
7221 \begin_layout Itemize
7229 \begin_layout Itemize
7237 \begin_layout Itemize
7245 \begin_layout Itemize
7253 \begin_layout Itemize
7261 \begin_layout Itemize
7269 \begin_layout Standard
7270 If you want to use any of these commands, you have to enter them yourself.
7273 Do not forget to mark them as LaTeX code!
7276 \begin_layout Subsection
7277 Figure and Table Floats
7280 \begin_layout Standard
7281 LyX provides support for the necessary float environments
7283 figure, figure*, table
7289 , therefore we won't tell much about it here.
7293 \begin_inset space ~
7299 Just remember that tables should be left-aligned.
7300 For that, select the table and change the alignment in
7302 Edit\SpecialChar \menuseparator
7304 \begin_inset space ~
7310 \begin_layout Standard
7311 There is only one special thing: the figures with caption besides the figure.
7312 To create such a figure, you have to do the following:
7315 \begin_layout Enumerate
7316 Create a wide figure float:
7318 Insert\SpecialChar \menuseparator
7319 Float\SpecialChar \menuseparator
7322 , then right click in the figure and select
7328 \begin_inset space ~
7336 \begin_layout Enumerate
7337 Enter your caption text.
7340 \begin_layout Enumerate
7345 to move the cursor above the caption.
7348 \begin_layout Enumerate
7352 \begin_layout Enumerate
7353 Position the cursor behind the figure and insert a horizontal fill:
7355 Insert\SpecialChar \menuseparator
7357 \begin_inset space ~
7360 Character\SpecialChar \menuseparator
7362 \begin_inset space ~
7370 \begin_layout Enumerate
7371 Switch to LaTeX mode:
7374 \begin_inset space ~
7382 \begin_layout Enumerate
7392 Do not close the brace!
7395 \begin_layout Enumerate
7396 Position the cursor behind the caption text, switch to LaTeX mode and insert
7400 \begin_inset space ~
7412 \begin_layout Standard
7413 Also, refer to the figures in the example paper.
7416 \begin_layout Subsection
7420 \begin_layout Standard
7421 For submission, the paper has to be formated in a special double-spacing
7423 For this purpose, you have to give the option
7427 to the documentclass.
7428 This must be done using the extra class options field in the
7430 Document\SpecialChar \menuseparator
7434 Just enter the string
7441 \begin_layout Subsection
7445 \begin_layout Standard
7450 directory contains an example paper written with LyX.
7451 It is the example paper from the original macro package, translated to
7453 Use it for inspiration, and compare the original LaTeX code with LyX way
7457 \begin_layout Section
7461 \begin_layout Standard
7467 \begin_layout Subsection
7471 \begin_layout Standard
7472 AASTeX is a set of macros produced by the American Astronomical Society
7473 to facilitate electronic manuscript submission to the three journals they
7474 publish: the Astrophysical Journal (including the Letters and Supplement),
7475 the Astronomical Journal, and the Publications of the Astronomical Society
7477 LyX has proven to be an excellent tool for generating these documents,
7478 especially given its equation, citation, and figure handling capabilities.
7479 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7480 is the version described here, or higher.
7481 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7482 incompatible with LyX.
7483 The AASTeX package may be downloaded from the AASTeX Web site
7486 \begin_layout Standard
7487 \begin_inset VSpace medskip
7493 \begin_layout Standard
7495 \begin_inset Flex URL
7498 \begin_layout Plain Layout
7500 http://www.journals.uchicago.edu/AAS/AASTeX
7508 \begin_layout Standard
7509 \begin_inset VSpace medskip
7515 \begin_layout Standard
7516 A complete user guide is contained in that package and you should familiarize
7517 yourself with it thoroughly before embarking on writing a paper in LyX.
7518 LyX will not reduce the need to figure out all the AASTeX commands, it
7519 will only reduce the drudgery of typing everything in.
7520 It is your responsibility to ensure that the final exported LaTeX document
7521 conforms completely to the requirements of the journal to which you are
7522 submitting your paper.
7525 \begin_layout Subsection
7526 Starting a New Paper
7529 \begin_layout Standard
7530 I strongly suggest that you start with the AASTeX template file.
7533 File\SpecialChar \menuseparator
7540 , enter the new file name, then choose the
7545 This will show the most common fields found in a manuscript.
7546 Simply overwrite the existing text (including the brackets,
7550 ) with the correct information.
7551 Many of the AASTeX commands and environments can be implemented directly
7552 in LyX, but some cannot: most noticeably
7564 , which should stick out like a sore thumb if you actually just opened the
7566 For commands such as these, the LaTeX code must be entered directly and
7568 Such commands are referred to as TeX code, or Evil Red Text.
7569 I tried to minimize the amount of TeX code needed in an AASTeX document,
7570 but there is still a bit more required than any of us would like.
7573 \begin_layout Subsection
7574 Finishing Your Paper
7577 \begin_layout Standard
7578 When the paper is finished to your satisfaction and previews/prints correctly,
7580 \begin_inset Quotes eld
7584 \begin_inset Quotes erd
7587 actions which need to be done before you submit it to the journals.
7591 \begin_layout Enumerate
7592 Export your paper as a LaTeX file (
7594 File\SpecialChar \menuseparator
7595 Export\SpecialChar \menuseparator
7602 \begin_layout Enumerate
7607 file with your favorite text editor
7611 \begin_layout Enumerate
7612 remove the comment lines before the
7621 \begin_layout Enumerate
7626 usepackage...{fontenc}
7628 line if it appears (usually just after
7643 \begin_layout Enumerate
7644 remove everything between (and including) the
7656 commands, except for any commands you specifically put into the LaTeX preamble
7657 (which should appear immediately after the
7658 \begin_inset Quotes eld
7661 User specified LaTeX commands
7662 \begin_inset Quotes erd
7673 \begin_layout Enumerate
7674 Run the resulting file through LaTeX to make sure it still processes correctly.
7677 \begin_layout Enumerate
7678 Reread the journal requirements to make sure your filenames and formats
7682 \begin_layout Enumerate
7686 \begin_layout Subsection
7687 Comments On Specific Commands
7690 \begin_layout Standard
7691 I will not describe the detailed usage of the individual AASTeX commands:
7692 the AASTeX User Guide (
7696 ) gives a good description of each.
7697 Thus it's probably easiest for me to go down the list as found in the guide
7698 and offer comments where necessary.
7699 So let's begin \SpecialChar \ldots{}
7703 \begin_layout Subsubsection
7704 Things that work as expected
7707 \begin_layout Standard
7711 \begin_layout Plain Layout
7723 \begin_layout Standard
7724 Because they work as you might expect, I simply list them and the section
7825 begin{thebibliography}
7833 (2.13.2), all the cite commands and their variations (2.13.2), the generic
7834 graphicx figure commands (2.14.1),
7858 (2.15.4, amongst other places),
7885 \begin_layout Standard
7886 The following style options also work correctly:
7907 Simply put them in the
7913 Layout\SpecialChar \menuseparator
7919 \begin_layout Standard
7923 \begin_layout Plain Layout
7935 \begin_layout Subsubsection
7936 Things that work, but require more comment
7939 \begin_layout Standard
7940 The following items work, but require a little more discussion:
7943 \begin_layout Itemize
7944 These items are reserved for use by the journal editors, but you can put
7945 them into the LaTeX preamble if you feel compelled to do so:
7978 \begin_layout Itemize
7979 These items may be placed in the LaTeX preamble, and are included as blanks
7980 in the template file:
8001 \begin_layout Itemize
8008 (2.3) – can only be used
8009 \begin_inset Quotes eld
8013 \begin_inset Quotes erd
8016 , not in the middle of a paragraph.
8017 Use TeX code if you need to embed it.
8020 \begin_layout Itemize
8027 (2.3) – will have extra {} after it.
8028 This should not cause an error.
8031 \begin_layout Itemize
8038 (2.6) – can only be used
8039 \begin_inset Quotes eld
8043 \begin_inset Quotes erd
8046 , not in the middle of a paragraph.
8047 Use TeX code if you need to embed it.
8050 \begin_layout Itemize
8057 (2.8) – can't insert a cross-reference tag, you must type the tag name by
8061 \begin_layout Itemize
8075 \begin_layout Itemize
8082 (2.9) – will have extra {} after it.
8083 This should not cause an error.
8086 \begin_layout Itemize
8093 (2.11) – will have extra {} after it.
8094 This should not cause an error.
8097 \begin_layout Itemize
8104 (2.14.2) – you can insert an optional filename argument by placing the cursor
8105 at the beginning of the text and selecting
8107 Insert\SpecialChar \menuseparator
8112 \begin_inset Quotes eld
8116 \begin_inset Quotes erd
8119 inserts an optional argument of the type needed by
8126 Hopefully it will be renamed someday.
8129 \begin_layout Itemize
8142 for the catalog ID optional parameter
8145 \begin_layout Itemize
8158 for the catalog ID optional parameter
8161 \begin_layout Subsubsection
8162 Things not implemented, use TeX code
8165 \begin_layout Standard
8169 \begin_layout Plain Layout
8181 \begin_layout Standard
8204 setcounter{equation}
8206 (2.12), Journal name abbreviations (2.13.4),
8242 (2.15.4, insert it as the first element in the lefthand cell after where
8244 Don't use any of LyX's rules in the table),
8256 (2.15.5), much of Misc (2.17, except
8307 \begin_layout Standard
8311 \begin_layout Plain Layout
8323 \begin_layout Subsubsection
8324 Things that cannot be implemented
8327 \begin_layout Standard
8328 \SpecialChar \ldots{}
8329 at least in any meaningful sort of way, so I suggest ignoring them.
8330 They are the references environment (2.13.3), and the deluxetable environment
8332 If you really, really need to use deluxetable, I suggest editing it in
8333 a separate file with a text editor, then using
8335 Insert\SpecialChar \menuseparator
8337 \begin_inset space ~
8342 to include it in your LyX document.
8347 file to see an example of this.
8350 \begin_layout Subsection
8351 FAQs, Tips, Tricks, and Other Ruminations
8354 \begin_layout Subsubsection
8355 Getting LyX and AASTeX to cooperate
8358 \begin_layout Standard
8359 It can be a bit tricky to get LyX to recognize a new layout and document
8361 When all else fails, do this:
8364 \begin_layout Enumerate
8365 Make certain that LaTeX can find AASTeX.
8366 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8367 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
8374 \begin_layout Enumerate
8386 \begin_layout Enumerate
8389 Tools\SpecialChar \menuseparator
8392 in LyX, then restart LyX.
8395 \begin_layout Enumerate
8396 Open a regular new file, not from a template.
8397 Does AASTeX appear in the class list in
8399 Document\SpecialChar \menuseparator
8405 \begin_layout Standard
8406 If you get a warning from an existing AASTeX document about not being able
8407 to find the AASTeX layout or a message about
8408 \begin_inset Quotes eld
8411 You should not mix title layouts with normal ones
8412 \begin_inset Quotes erd
8415 , things haven't been installed correctly.
8418 \begin_layout Subsubsection
8419 LaTeX error processing a table
8422 \begin_layout Standard
8423 LyX, by default, attempts to center the table caption/title.
8424 This seems to produce a bad interaction in AASTeX so you should click somewhere
8425 in the caption/title, then select
8427 Edit\SpecialChar \menuseparator
8429 \begin_inset space ~
8443 This took care of it for me.
8446 \begin_layout Subsubsection
8450 \begin_layout Standard
8451 A couple of things: 1) I have noticed some funny spacing in the reference
8452 entries in the text.
8453 When you enter the bibliography item data, make sure their is
8457 space between the last author and the parenthesis setting off the year;
8461 \begin_inset space \thinspace{}
8465 \begin_inset space \space{}
8479 2) Entering the references at all is not obvious.
8480 The easiest thing is to start typing your first reference at the end of
8481 the document, then mark it as type
8486 That will put a small gray box in front of what you just typed.
8487 Click on the box to fill in the rest of the information.
8488 For new references, go to the end of an existing reference and press return.
8489 That will create a new line with its own box, etc.
8492 \begin_layout Subsubsection
8496 \begin_layout Standard
8497 Even though AASTeX provides its own figure commands (
8503 , for example), I much prefer LaTeX's standard figure commands (with the
8512 \begin_inset space ~
8515 commands as TeX code into a Figure Float box if you desire, but I never
8516 have much luck getting the layout right.
8517 With the standard graphics, LyX will insert a
8521 usepackage{graphicx}
8523 command into the LaTeX preamble and handle the figures in the standard
8524 LaTeX2e way, interspersing the figures in the text.
8525 I believe ApJ accepts figures exactly this way now; AJ might still use
8527 \begin_inset Quotes eld
8530 stack everything at the end
8531 \begin_inset Quotes erd
8537 \begin_layout Subsubsection
8538 Things I could have done, but didn't
8541 \begin_layout Standard
8543 \begin_inset Quotes eld
8547 \begin_inset Quotes erd
8550 things I could have implemented, but chose not to.
8551 For instance, I saw no point in double-spacing the text in the LyX window,
8552 even though it is double-spaced in the paper manuscript.
8553 Also, I chose not to make separate layouts for the preprint and preprint2
8555 Since I assume you will spend most of your time in the plain manuscript
8556 mode anyway, I decided not to chew up more disk space with this.
8560 \begin_layout Subsection
8564 \begin_layout Standard
8565 Your mileage may vary.
8566 I've now had papers published by both ApJ and AJ that have had 98% of the
8567 effort done in LyX; the last 2% was the LaTeX post-processing and a few
8569 I have had no trouble with the submission process, and I'm sure the journals
8570 were never aware that there might be a difference.
8571 So, go forth and publish!
8574 \begin_layout Section
8578 \begin_layout Standard
8581 David Johnson; updated by Richard Heck
8584 \begin_layout Standard
8585 \begin_inset VSpace bigskip
8591 \begin_layout Standard
8593 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8594 papers to be submitted to American Mathematical Society publications.
8595 The layouts are not tailored to a specific journal, but easily can be.
8596 You should refer to the AMS documentation for specific instructions for
8597 each journal (usually it will entail only changing a single line in the
8599 That documentation is available on the Web at
8600 \begin_inset Flex URL
8603 \begin_layout Plain Layout
8611 \begin_inset Flex URL
8614 \begin_layout Plain Layout
8616 ftp://ftp.ams.org/pub/tex/amslatex/
8622 These layouts are appropriate, and useful, for any mathematical writing.
8626 \begin_layout Standard
8627 There are two basic AMS LaTeX layouts:
8630 \begin_layout Itemize
8631 amsart: The standard AMS article format.
8634 \begin_layout Itemize
8635 amsbook: the standard AMS book (really, monograph) format.
8639 \begin_layout Standard
8640 The layouts themselves contain only the minimum necessary to use the AMS
8642 They do not, in particular, contain any of the `theorem' environments used
8643 for setting theorems, lemmas, and the like.
8644 These are contained, instead, in the
8645 \begin_inset Flex Code
8648 \begin_layout Plain Layout
8654 module, which is loaded by default when when you select one of the AMS
8656 (It can also be used with other classes and can be removed, if you would
8657 rather use something else.) Less commonly used environments are in the
8658 \begin_inset Flex Code
8661 \begin_layout Plain Layout
8662 Theorems (AMS-Extended)
8667 module, which must be loaded manually.
8670 \begin_layout Standard
8671 By default, theorems and the like are numbered consecutively throughout
8672 the document, but this may be modified by loading the module
8673 \begin_inset Flex Code
8676 \begin_layout Plain Layout
8677 Theorems (Order by Section)
8682 or, if you are using
8683 \begin_inset Flex Code
8686 \begin_layout Plain Layout
8693 \begin_inset Flex Code
8696 \begin_layout Plain Layout
8697 Theorems (Order by Chapter)
8703 These will number the results as
8704 \begin_inset Formula $n.m$
8707 , where the first number refers to the section (or chapter) and the second
8708 refers to the total number of results so far in that section (or chapter).
8709 Many environments are also available unnumbered.
8710 These are indicated by an asterisk at the end.
8711 If you happen to want
8715 unnumbered results, the module
8716 \begin_inset Flex Code
8719 \begin_layout Plain Layout
8725 provides that option.
8728 \begin_layout Standard
8729 Note that these modules do not
8733 to be used with the AMS classes.
8734 It is perfectly possible to use the
8735 \begin_inset Flex Code
8738 \begin_layout Plain Layout
8744 module, and the others mentioned, with other classes, such as
8745 \begin_inset Flex Code
8748 \begin_layout Plain Layout
8755 \begin_inset Flex Code
8758 \begin_layout Plain Layout
8765 \begin_inset Flex Code
8768 \begin_layout Plain Layout
8777 \begin_layout Subsection
8778 What these layouts provide
8781 \begin_layout Standard
8782 There is a long list of included environments provided by these layouts.
8783 In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
8784 variety of `theorem' environments.
8785 However, the AMS recommends the environments that are available in LyX.
8789 \begin_layout Standard
8790 The following environments—as well as the standard environments, such as
8792 \begin_inset Flex Noun
8795 \begin_layout Plain Layout
8802 \begin_inset Flex Noun
8805 \begin_layout Plain Layout
8812 \begin_inset Flex Noun
8815 \begin_layout Plain Layout
8822 \begin_inset Flex Noun
8825 \begin_layout Plain Layout
8832 \begin_inset Flex Noun
8835 \begin_layout Plain Layout
8842 \begin_inset Flex Code
8845 \begin_layout Plain Layout
8852 \begin_inset Flex Code
8855 \begin_layout Plain Layout
8864 \begin_layout Description
8865 Address This should be the author's permanent address.
8868 \begin_layout Description
8870 \begin_inset space ~
8873 Address This should be the author's temporary address at the time of submission,
8874 if different from the Address.
8877 \begin_layout Description
8878 Email Author's e-mail address
8881 \begin_layout Description
8882 URL Author's Web address, if desired.
8885 \begin_layout Description
8886 Keywords Key words or phrases used to identify specific topics discussed
8890 \begin_layout Description
8891 Subjectclass These refer to the AMS Subject Classifications, published and
8894 Mathematical Reviews
8897 These are also available online at the AMS cites listed above.
8900 \begin_layout Description
8904 \begin_layout Description
8908 \begin_layout Description
8912 \begin_layout Standard
8913 The following environments are provided by both the
8914 \begin_inset Flex Code
8917 \begin_layout Plain Layout
8924 \begin_inset Flex Code
8927 \begin_layout Plain Layout
8933 modules, in the latter case in both starred (unnumbered) and unstarred
8934 (numbered) versions.
8935 These same environments are provided only in the starred versions by the
8937 \begin_inset Flex Code
8940 \begin_layout Plain Layout
8949 \begin_layout Theorem
8950 This is typically used for the statements of major results.
8954 \begin_layout Corollary*
8955 This is used for statements which follow fairly directly from previous statement
8957 Again, these can be major results.
8962 These are smaller results needed to prove other statements.
8965 \begin_layout Proposition
8966 These are less major results which (hopefully) add to the general theory
8970 \begin_layout Conjecture
8971 These are statements provided without justification, which the author does
8972 not know how to prove, but which seem to be true (to the author, at least).
8975 \begin_layout Definition*
8976 Guess what this is for.
8977 The font is different for this environment than for the previous ones.
8981 \begin_layout Example*
8982 Used for examples illustrating proven results.
8985 \begin_layout Problem
8986 It's not really known what this is for.
8987 You should figure it out.
8990 \begin_layout Exercise*
8991 Write a description for this one.
8994 \begin_layout Remark
8995 This environment is also a type of theorem, usually a lesser sort of observation.
8998 \begin_layout Claim*
8999 Often used in the course of giving a proof of a larger result.
9003 Generally, these are used to break up long arguments, using specific instances
9009 The numbering scheme for cases is on its own, not together with other numbered
9015 At the end of this environment, a QED symbol (usually a square, but it can
9016 vary with different styles) is placed.
9017 If you want to have other environments within this one—for example, Case
9018 environments—and have the QED symbol appear only after them, then the other
9019 environments need to be nested within the proof environment.
9022 Nesting Environments
9028 for information on nesting.
9031 \begin_layout Standard
9032 And these environments are provided by
9033 \begin_inset Flex Code
9036 \begin_layout Plain Layout
9037 Theorems (AMS-Extended)
9045 \begin_layout Criterion*
9046 A required condition.
9049 \begin_layout Algorithm*
9050 A general procedure to be used.
9053 \begin_layout Axiom*
9054 This is a property or statement taken as true within the system being discussed.
9057 \begin_layout Condition*
9058 Sometimes used to state a condition assumed within the present context of
9063 Similar to a Remark.
9066 \begin_layout Notation*
9067 Used for the explanation of, yes, notation.
9070 \begin_layout Summary
9071 Do we really need to tell you?
9074 \begin_layout Acknowledgement*
9078 \begin_layout Conclusion*
9079 Sometimes used at the end of a long train of argument.
9083 Used in a way similar to Proposition, though perhaps lower on the scale.
9086 \begin_layout Standard
9087 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9089 They need to be available on your system in order to use these environments.
9092 \begin_layout Section
9100 \begin_layout Standard
9106 \begin_layout Subsection
9110 \begin_layout Standard
9111 These are the layout files for some of the journals of the American Geophysical
9113 It is assumed that you have both the AGU's own class files and AGUplus
9114 installed (everything to be found at
9115 \begin_inset Flex URL
9118 \begin_layout Plain Layout
9120 ftp://ftp.agu.org/journals/latex/journals
9128 \begin_layout Subsection
9132 \begin_layout Standard
9142 They are still called this in the LyX GUI, though their LaTeX equivalents
9143 in the AGU classes are
9154 \begin_layout Standard
9155 Newly defined styles are
9192 These are mostly manuscript attributes and defined in the AGU class documentati
9196 \begin_layout Standard
9197 I suspect this is still badly incomplete.
9200 \begin_layout Subsection
9204 \begin_layout Standard
9221 \begin_layout Subsection
9225 \begin_layout Itemize
9228 Journal of Geophysical Research
9237 \begin_layout Standard
9238 Add your own, it isn't so hard! Look at the
9249 \begin_layout Subsection
9250 Bugs and things to remember
9253 \begin_layout Standard
9254 In order to use the new layouts, you must remember to do the following for
9258 \begin_layout Enumerate
9264 This can be done in the
9266 Layout\SpecialChar \menuseparator
9271 Document\SpecialChar \menuseparator
9275 (AGU articles are always in English, right? So
9282 \begin_layout Enumerate
9292 (Yes, this is a bug.)
9295 \begin_layout Enumerate
9296 Make sure you use the
9300 bibliography style, by entering
9304 into the second field of the BibTeX inset.
9305 None of the standard styles will do.
9308 \begin_layout Section
9312 \begin_layout Standard
9318 \begin_layout Subsection
9322 \begin_layout Standard
9323 Broadway is for writing plays.
9324 The format is more decorative than Hollywood, and much less standardized.
9325 This format should be suitable for workshops.
9328 \begin_layout Subsection
9332 \begin_layout Standard
9333 The same as in Hollywood.
9336 \begin_layout Subsection
9340 \begin_layout Standard
9345 names as labels then cross-reference the label to insert the name.
9346 The cross-reference dialog will show the current cast of characters.
9349 \begin_layout Subsection
9350 Paper size and Margins
9353 \begin_layout Standard
9354 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9357 \begin_layout Subsection
9361 \begin_layout Standard
9362 The following environments are available.
9363 You can use broadway.bind to get the bind keys shown at the right.
9366 \begin_layout Itemize
9370 \begin_inset Newline newline
9375 You should not have to use this, but it is here for anything that does not
9379 \begin_layout Itemize
9383 \begin_inset space \hfill{}
9387 \begin_inset Newline newline
9392 Used to describe stage setting and the action.
9393 First use of speaker names in all CAPs.
9396 \begin_layout Itemize
9400 \begin_inset space \hfill{}
9404 \begin_inset Newline newline
9409 Automatically numbered.
9410 On screen it will be arabic, but will print as Roman.
9413 \begin_layout Itemize
9417 \begin_inset space \hfill{}
9421 \begin_inset Newline newline
9431 It is just centered text.
9434 \begin_layout Itemize
9438 \begin_inset space \hfill{}
9442 \begin_inset Newline newline
9447 Not automatically numbered.
9448 You supply the number.
9449 This is because I couldn't figure out how.
9452 \begin_layout Itemize
9456 \begin_inset space \hfill{}
9460 \begin_inset Newline newline
9465 A special case of Narrative to describe the setting and action as the curtain
9469 \begin_layout Itemize
9473 \begin_inset space \hfill{}
9477 \begin_inset Newline newline
9482 The speaker's (actor's) title, centered in all CAPS.
9485 \begin_layout Itemize
9489 \begin_inset space \hfill{}
9493 \begin_inset Newline newline
9498 Instructions to the speaker.
9499 The parentheses are automatically inserted.
9500 The ( will appear on screen, but both will be in the printed play.
9501 This environment is only used within
9508 \begin_layout Itemize
9512 \begin_inset space \hfill{}
9516 \begin_inset Newline newline
9521 What the Speaker says.
9524 \begin_layout Itemize
9528 \begin_inset space \hfill{}
9532 \begin_inset Newline newline
9537 The curtain comes down.
9540 \begin_layout Itemize
9544 \begin_inset space \hfill{}
9550 \begin_layout Itemize
9554 \begin_inset space \hfill{}
9560 \begin_layout Itemize
9564 \begin_inset space \hfill{}
9570 \begin_layout Standard
9574 \begin_layout Section
9578 \begin_layout Standard
9583 can be used to type letters according to German conventions.
9584 A template file is included in
9586 .../lyx/share/templates
9588 for you to use as a starting point.
9591 \begin_layout Section
9599 \begin_layout Standard
9605 \begin_layout Subsection
9609 \begin_layout Standard
9610 This is the layout file for the European Geophysical Society journals.
9615 can be downloaded from the web site of the EGS under
9616 \begin_inset Flex URL
9619 \begin_layout Plain Layout
9629 \begin_layout Subsection
9633 \begin_layout Standard
9636 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9644 The current layout file is unfortunately very unmodular and would benefit
9645 from using the various
9652 \begin_layout Section
9656 \begin_layout Standard
9662 \begin_layout Standard
9663 Elsevier Science Publishers B.V.
9664 provides a standard LaTeX document class (
9668 ) for submitting articles to their various journals.
9669 The style file can be downloaded directly from their web site:
9670 \begin_inset Flex URL
9673 \begin_layout Plain Layout
9675 http://www.elsevier.com/wps/find/authorsview.authors/latex
9681 Instructions are supplied along with the class file, which details the
9682 requirements of the publishers.
9683 LyX includes a package that allows for the use of this class, by a layout
9684 and a template file.
9685 Installation of the class file is the same as for any other LaTeX package;
9686 instructions are provided in the Elsevier documentation.
9689 \begin_layout Standard
9699 As the Elsevier class file is based mainly on the standard article class,
9700 most of the normal functionality is provided.
9701 The Elsevier class defines a number of mathematical environments, which
9702 are similar to the AMS environments.
9703 These commands are all described in the Elsevier documentation, and are
9707 \begin_layout Standard
9708 The easiest way to use the Elsevier style is to base documents on the included
9710 It is best not to use options such as fancy headings or the geometry package,
9711 as elements such as these are defined by Elsevier in their style file.
9712 Ideally, no extra packages except those mentioned in the Elsevier documentation
9714 Essentially, Elsevier require as
9715 \begin_inset Quotes eld
9719 \begin_inset Quotes erd
9722 a LaTeX file as possible, as their intention is to take the supplied file
9723 and replace the class file with one for the particular journal to which
9724 the paper has been submitted.
9725 This also means that not too much time should be spent on the formating
9727 When it comes to be published, this will change anyway.
9728 The rest of the usage for this layout is substantially the same as for
9729 the normal article class.
9730 For details of what Elsevier do and don't allow, refer to their documentation.
9733 \begin_layout Section
9739 \begin_inset CommandInset label
9748 \begin_layout Standard
9754 \begin_layout Subsection
9758 \begin_layout Standard
9759 This section describes how to use LyX to make slides for overhead projectors.
9760 There are two document classes that can do this: the default slides class
9766 This section documents the latter.
9769 \begin_layout Standard
9770 I'm going to say this again, nice and clear, so that there's no misunderstanding
9774 \begin_layout Standard
9775 \begin_inset VSpace bigskip
9781 \begin_layout Standard
9785 This section documents the class
9786 \begin_inset Quotes eld
9794 \begin_inset Quotes erd
9802 \begin_layout Standard
9803 \begin_inset VSpace bigskip
9809 \begin_layout Standard
9810 If you're looking for the documentation for
9811 \begin_inset Quotes eld
9819 \begin_inset Quotes erd
9823 \begin_inset space ~
9827 \begin_inset CommandInset ref
9829 reference "sec:slitex"
9834 If your machine doesn't have the
9839 \begin_inset Quotes eld
9847 \begin_inset Quotes erd
9850 ] installed, you'll probably have to use the default
9854 class, which isn't quite as good as
9859 \begin_layout Standard
9864 class is designed for use with version 2.1 of the
9868 LaTeX class file which is now an integral part of LaTeX2e.
9871 \begin_layout Subsection
9875 \begin_layout Standard
9876 Obviously, to use this document class, you need to select
9877 \begin_inset Quotes eld
9885 \begin_inset Quotes erd
9895 \begin_inset space ~
9901 There are some settings in the
9904 \begin_inset space ~
9909 dialog that you should know about that are specific to this class:
9912 \begin_layout Itemize
9913 Don't change the options
9924 \begin_inset space ~
9930 They're ignored by the
9937 \begin_layout Itemize
9938 The default font size is 20
9939 \begin_inset space \thinspace{}
9942 pt with the other options being 17
9943 \begin_inset space \thinspace{}
9947 \begin_inset space \thinspace{}
9951 \begin_inset space \thinspace{}
9957 \begin_layout Itemize
9966 but all math equations are still typeset in the usual roman font.
9969 \begin_layout Itemize
9974 supports A4 and Letter paper sizes as well as a special size for working
9976 \begin_inset space \thinspace{}
9980 It doesn't support A5, B5, legal or executive paper sizes.
9983 \begin_layout Itemize
9984 Don't bother changing the
9988 settings because they are ignored anyway.
9989 All floats appear where they are defined in the text.
9992 \begin_layout Itemize
9997 setting behaves a bit differently for this class.
10002 provides extensive footer and header capabilities including a user-defined
10005 \begin_inset space ~
10009 \begin_inset CommandInset ref
10011 reference "sec:foilfoot"
10016 The title page is treated differently to all other pages in the document
10025 has the logo centered at the bottom of the page (if one is defined).
10026 The possible page style choices and what they do are as follows:
10030 \begin_layout Labeling
10031 \labelwidthstring MMMMMMM
10038 The final output contains no page numbers, or other headers or footers
10039 (except footnotes of course).
10043 \begin_layout Labeling
10044 \labelwidthstring MMMMMMM
10051 The final output contains page numbers centered at the bottom of the page.
10052 No other headings or footers (other than footnotes).
10055 \begin_layout Labeling
10056 \labelwidthstring MMMMMMM
10061 Page numbers in lower right corner.
10062 Additional headers and footers are also shown.
10063 This is also the default.
10066 \begin_layout Labeling
10067 \labelwidthstring MMMMMMM
10072 Gives you access to the
10076 package although its use with
10080 is discouraged by the writer of the
10084 package because of some potential page layout clashes.
10088 \begin_layout Subsubsection
10092 \begin_layout Standard
10093 The following options may be used in the extra class options in the
10095 Document\SpecialChar \menuseparator
10101 \begin_layout Labeling
10102 \labelwidthstring MMMMMMx
10107 This sets up the page layout for 7.33
10108 \begin_inset space \thinspace{}
10112 \begin_inset space \thinspace{}
10115 in paper, which is about the same aspect ratio as a 35
10116 \begin_inset space \thinspace{}
10119 mm slide, making it a bit easier to work with this medium.
10122 \begin_layout Labeling
10123 \labelwidthstring MMMMMMx
10128 Places a rule across the page below the header on every page except the
10132 \begin_layout Labeling
10133 \labelwidthstring MMMMMMx
10138 Places a rule across the page above the footer on every page except the
10142 \begin_layout Labeling
10143 \labelwidthstring MMMMMMx
10148 This is automatically set each time you create a new
10157 to use the dvips driver to rotate those pages that are set as landscape
10161 \begin_layout Labeling
10162 \labelwidthstring MMMMMMx
10167 Simply changes the page dimensions to those of a landscape page but doesn't
10169 Thus if you use this option you need to use an external program to rotate
10170 each page or feed your paper through your printer as landscape.
10171 Note that this option effectively reverses the roles of the
10179 environments (don't worry these are described in the next section).
10182 \begin_layout Labeling
10183 \labelwidthstring MMMMMMx
10188 Equation numbers on the left.
10191 \begin_layout Labeling
10192 \labelwidthstring MMMMMMx
10197 Flush-left equations.
10200 \begin_layout Subsection
10201 Supported Environments
10204 \begin_layout Standard
10205 Most of the environments commonly supported in other classes are also supported
10211 There are several additional environments provided by
10215 as well as a couple added by LyX.
10216 The following environments are shared with other classes:
10219 \begin_layout Standard
10223 \begin_layout Plain Layout
10227 begin{multicols}{2}
10235 \begin_layout Itemize
10241 \begin_layout Itemize
10247 \begin_layout Itemize
10253 \begin_layout Itemize
10259 \begin_layout Itemize
10265 \begin_layout Itemize
10271 \begin_layout Itemize
10277 \begin_layout Itemize
10283 \begin_layout Itemize
10289 \begin_layout Itemize
10295 \begin_layout Itemize
10301 \begin_layout Itemize
10307 \begin_layout Itemize
10313 \begin_layout Itemize
10319 \begin_layout Itemize
10325 \begin_layout Itemize
10331 \begin_layout Itemize
10337 \begin_layout Itemize
10343 \begin_layout Standard
10347 \begin_layout Plain Layout
10359 \begin_layout Standard
10360 That is, all the major environments apart from the sectioning environments.
10361 Since foils are essentially self-contained sections, with a title and body,
10366 provides specific commands for starting new foils and these are:
10369 \begin_layout Itemize
10375 \begin_layout Itemize
10381 \begin_layout Standard
10382 LyX also provides slightly modified versions of these two environments called:
10385 \begin_layout Itemize
10391 \begin_layout Itemize
10394 ShortRotatefoilhead
10397 \begin_layout Standard
10398 and the differences will be explained in the next section.
10401 \begin_layout Standard
10402 Since foils are often used in presenting ideas or new theorems and such
10407 also provides a comprehensive box of goodies for presenting them:
10410 \begin_layout Standard
10414 \begin_layout Plain Layout
10418 begin{multicols}{2}
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 Standard
10496 \begin_layout Plain Layout
10508 \begin_layout Standard
10509 The starred versions are unnumbered while the unstarred versions are numbered.
10510 There are also two list environments added by LyX and these are:
10513 \begin_layout Itemize
10519 \begin_layout Itemize
10525 \begin_layout Standard
10530 provides some powerful header and footer capabilities that are best set
10531 in the preamble although they may be set at any point in a document.
10532 If you want to change these settings in your document the best place to
10533 do so is at the very top of a foil, i.
10534 \begin_inset space \thinspace{}
10540 \begin_inset space \space{}
10545 straight after the foilhead.
10548 \begin_layout Standard
10549 For this purpose, the following command styles are provided [
10556 \begin_layout Standard
10560 \begin_layout Plain Layout
10564 begin{multicols}{2}
10572 \begin_layout Itemize
10576 \begin_inset space ~
10582 \begin_layout Itemize
10588 \begin_layout Itemize
10592 \begin_inset space ~
10598 \begin_layout Itemize
10602 \begin_inset space ~
10608 \begin_layout Itemize
10612 \begin_inset space ~
10619 \begin_layout Standard
10620 \begin_inset space ~
10627 \begin_layout Standard
10631 \begin_layout Plain Layout
10643 \begin_layout Standard
10644 There are also a few commands provided by
10648 that aren't directly supported by LyX but I'll tell you what they do and
10649 how to use them in section
10650 \begin_inset space ~
10654 \begin_inset CommandInset ref
10656 reference "sec:unsuppfoils"
10663 \begin_layout Subsection
10664 Building a Set of Foils
10667 \begin_layout Standard
10668 This section will give a simple introduction to using the different environments
10669 to build a set of foils.
10670 If you want to see an example set of foils, take a look at the
10674 file you find in LyX's
10681 \begin_layout Subsubsection
10682 Give It a Title Page
10685 \begin_layout Standard
10686 Unlike other classes that provide
10706 creates the title on a page of its own.
10707 If you leave out the
10711 environment LaTeX will substitute the current date (every time you regenerate
10715 \begin_layout Subsubsection
10719 \begin_layout Standard
10720 As I mentioned earlier, there are four ways of starting a new foil.
10721 For portrait foils you should use
10730 The difference between these two environments is the amount of space between
10731 the title of the foil (the foilhead) and the body of the foil.
10734 \begin_layout Standard
10735 Landscape foils are generated using the
10741 ShortRotatefoilhead
10744 Again the only difference is the spacing between foilhead and body.
10745 Both of the short versions have 0.5 inches less separation between the foilhead
10750 \begin_layout Standard
10751 One problem with the support for landscape foils is the requirement that
10752 you have to use the
10756 driver to generate the PostScript output otherwise the foils won't be rotated.
10757 It is possible to get landscape foils even if you haven't got the
10761 driver provided you can feed your foils sideways through your printer ;-)
10764 \begin_layout Subsubsection
10765 Theorems, Lemmas, Proofs and more
10768 \begin_layout Standard
10769 Due to a small bug in LyX you can't have two of the same type of these environme
10770 nts directly following each other.
10771 They must be separated by something.
10772 If you try, you will just be extending the previous environment as if you
10773 had merged the two environments together.
10774 So, how do you get around this problem? The simplest option is to insert
10775 some text between the two environments or add a
10779 environment between the two with just a
10780 \begin_inset Quotes eld
10788 \begin_inset Quotes erd
10792 This will force LyX to produce two separate environments and hence the
10793 correct LaTeX output.
10794 An example is provided in the example file included with the LyX distribution.
10795 Remember, this problem only occurs if you are trying to place two of the
10796 same type of theorem-like environments one directly after the other.
10799 \begin_layout Subsubsection
10803 \begin_layout Standard
10804 You get all the commonly supported list styles found in other classes as
10805 well as two new ones.
10806 I'll only describe the new ones here.
10807 If you want to find out more about the other list environments check out
10813 If you intend to use itemized lists you might also want to read about the
10817 \begin_inset space ~
10821 \begin_inset space ~
10826 dialog described above in section
10827 \begin_inset space ~
10831 \begin_inset CommandInset ref
10833 reference "sec:bullet"
10840 \begin_layout Standard
10841 The two new list styles,
10849 , are designed to make it easier for you to create lists of do's and don'ts
10850 or right and wrong by providing dedicated environments that use a tick
10851 or a cross as the label of the list.
10852 These lists are in fact dedicated variants of the
10857 They do however require that you have the
10861 packages installed.
10864 \begin_layout Subsubsection
10868 \begin_layout Standard
10873 redefines the floating tables and figures so that they appear exactly where
10874 they are in the text rather than pushing them to the top of the page or
10875 to some user specified location.
10876 In fact if you change the float placement settings they are simply ignored.
10879 \begin_layout Subsubsection
10880 Page Headers and Footers
10881 \begin_inset CommandInset label
10883 name "sec:foilfoot"
10890 \begin_layout Standard
10894 \begin_inset space ~
10903 are two commands used to control the left-footer text string.
10904 The first is meant to allow you to include a graphic logo on your foils
10906 \begin_inset Quotes eld
10914 \begin_inset Quotes erd
10918 While the second is meant to provide a classification for the audience,
10922 \begin_inset space \thinspace{}
10928 \begin_inset space \space{}
10932 It is empty by default.
10935 \begin_layout Standard
10936 The remaining page corners can be filled by
10939 \begin_inset space ~
10944 (which defaults to page numbers),
10947 \begin_inset space ~
10955 \begin_inset space ~
10963 \begin_layout Subsection
10969 \begin_inset CommandInset label
10971 name "sec:unsuppfoils"
10978 \begin_layout Standard
10979 All the commands mentioned below need to be set in a
10987 within another environment.
10990 \begin_layout Subsubsection
10994 \begin_layout Standard
10995 All lengths are adjusted using the
11018 should be replaced by the name given to the length you want to change and
11023 is the length value.
11024 All lengths should be specified in units of length such as inches (
11036 ) or relative to some document or font-based length such as
11046 \begin_layout Standard
11047 It's possible to change the spacing between a foilhead and the body of the
11048 foil by adjusting the length specified by
11055 For example, to make
11060 \begin_inset space \space{}
11063 in closer to their bodies put the following in the preamble:
11069 foilheadskip}{-0.5in}
11072 \begin_layout Standard
11073 The spacings around floats can be adjusted by setting these lengths:
11076 \begin_layout Labeling
11077 \labelwidthstring MMMMMMMMMMM
11084 Separation between the text and the top of the float
11087 \begin_layout Labeling
11088 \labelwidthstring MMMMMMMMMMM
11095 Separation between the float and the caption
11098 \begin_layout Labeling
11099 \labelwidthstring MMMMMMMMMMM
11106 Separation between the caption and the following text
11109 \begin_layout Labeling
11110 \labelwidthstring MMMMMMMMMMM
11117 You can make the captions narrower than the surrounding text by adjusting
11119 Best done relative to
11128 \begin_layout Standard
11129 There are also several title page related lengths that you may find useful
11130 if you have a long title or several authors:
11133 \begin_layout Labeling
11134 \labelwidthstring MMMMMMMMMMM
11141 Separation from headers to
11146 \begin_layout Labeling
11147 \labelwidthstring MMMMMMMMMMM
11165 \begin_layout Labeling
11166 \labelwidthstring MMMMMMMMMMM
11180 \begin_layout Labeling
11181 \labelwidthstring MMMMMMMMMMM
11197 \begin_layout Labeling
11198 \labelwidthstring MMMMMMMMMMM
11214 \begin_layout Standard
11215 The last length related command affects all the list environments.
11226 a list environment then all the vertical spacing between the list items
11228 Note that this is a command not a length so it doesn't require
11234 like the stuff mentioned above.
11237 \begin_layout Subsubsection
11238 Headers and Footers
11241 \begin_layout Standard
11254 commands control whether the logo in the
11258 definition appear on a given page.
11265 in the preamble then none of the foils will have the logo on them.
11266 If you don't want the logo on a particular page place the
11272 directly after the foilhead of that page and the
11278 directly after the next foilhead.
11281 \begin_layout Standard
11282 If you decide to use the
11286 page style setting in the
11289 \begin_inset space ~
11294 dialog you should probably add
11304 to your preamble so headers and footers on landscape pages are correctly
11305 placed when rotated.
11306 This is due to some clashes between the page layouts provided by the
11317 \begin_layout Section
11318 Hollywood (Hollywood spec scripts)
11321 \begin_layout Standard
11327 \begin_layout Subsection
11331 \begin_layout Standard
11332 Getting the format of a Hollywood script right is a
11333 \begin_inset Quotes eld
11337 \begin_inset Quotes erd
11340 It is designed to make the readers focus on content and to be easy and
11341 familiar for the actors to read.
11342 Each page of a script should be one minute of film.
11343 Nothing goes in a script that you cannot see or hear on screen.
11344 The courier 12 pt font should be used throughout.
11348 \begin_layout Subsection
11352 \begin_layout Standard
11353 Speakers' lines should NEVER break in mid-sentence.
11354 If a speaker's lines continue over a page break, repeat the
11358 title followed by (Cont'd).
11361 \begin_layout Subsection
11365 \begin_layout Standard
11370 names as labels then cross-reference the label to insert the name.
11371 The cross-reference dialog will show the current cast of characters.
11372 You can use this to insert the speaker name in narratives also.
11375 \begin_layout Subsection
11376 Paper size and Margins
11379 \begin_layout Standard
11380 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11383 \begin_layout Subsection
11387 \begin_layout Standard
11388 The following environments are available.
11389 You can use hollywood.bind to get the bind keys shown at the right.
11392 \begin_layout Itemize
11396 \begin_inset Newline newline
11401 Used where nothing else works.
11405 \begin_layout Itemize
11411 \begin_inset space \hfill{}
11419 \begin_inset Newline newline
11422 Usually followed by something like
11423 \begin_inset Quotes eld
11426 on Sally waking up.
11427 \begin_inset Quotes erd
11433 \begin_layout Itemize
11437 \begin_inset space \hfill{}
11441 \begin_inset Newline newline
11446 Introduces a new INTERIOR camera set-up.
11447 Always followed by DAY or NIGHT, or something similar to define the lighting
11449 Everthing on this line in CAPS.
11452 \begin_layout Itemize
11456 \begin_inset space \hfill{}
11460 \begin_inset Newline newline
11465 Introduces a new EXTERIOR camera set-up.
11466 Everthing on this line in CAPS.
11469 \begin_layout Itemize
11473 \begin_inset space \hfill{}
11477 \begin_inset Newline newline
11482 The character speaking.
11485 \begin_layout Itemize
11489 \begin_inset space \hfill{}
11493 \begin_inset Newline newline
11498 Instructions to the speaker.
11499 The () are automatically inserted, but only the ( will show in LyX.
11500 Both will be printed.
11503 \begin_layout Itemize
11507 \begin_inset space \hfill{}
11511 \begin_inset Newline newline
11523 \begin_layout Itemize
11527 \begin_inset space \hfill{}
11531 \begin_inset Newline newline
11536 Camera movement instruction.
11538 \begin_inset space \thinspace{}
11542 \begin_inset space \space{}
11548 \begin_layout Itemize
11552 \begin_inset space \hfill{}
11558 \begin_layout Itemize
11562 \begin_inset space \hfill{}
11568 \begin_layout Itemize
11572 \begin_inset space \hfill{}
11578 \begin_layout Itemize
11582 \begin_inset space \hfill{}
11588 \begin_layout Subsection
11592 \begin_layout Itemize
11596 \begin_layout Itemize
11600 \begin_layout Itemize
11602 \begin_inset space \thinspace{}
11609 \begin_layout Itemize
11614 \begin_layout Itemize
11615 PAN — camera movement
11618 \begin_layout Itemize
11619 INSERT — cut to close-up of
11622 \begin_layout Section
11626 \begin_layout Standard
11629 Panayotis Papasotiriou
11632 \begin_layout Subsection
11636 \begin_layout Standard
11637 The ijmpc package is a set of macros that facilitates electronic manuscript
11640 International Journal of Modern Physics C
11643 Similarly, the ijmpd package is for creating manuscripts to be submitted
11646 International Journal of Modern Physics D
11649 Both journals are published by World Scientific.
11650 The corresponding document classes are named
11659 These files, together with instructions for the authors, can be downloaded
11661 \begin_inset Flex URL
11664 \begin_layout Plain Layout
11666 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11672 \begin_inset Flex URL
11675 \begin_layout Plain Layout
11677 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11683 Both packages are modified versions of the standard
11684 \begin_inset Quotes eld
11688 \begin_inset Quotes erd
11691 package, and they are almost (but not exactly) identical.
11692 Most of their features are supported by LyX.
11693 I have used LyX successfully to write articles submitted to both journals
11694 without any problem.
11697 \begin_layout Subsection
11701 \begin_layout Standard
11702 As usual, the easiest way to write a paper is to start with a template.
11705 File\SpecialChar \menuseparator
11724 This will give an (almost) empty document that includes the most common
11725 fields found in a manuscript.
11726 Simply overwrite the existing text (including the brackets,
11731 You should keep in mind the following remarks.
11734 \begin_layout Enumerate
11735 LyX won't let you change the font size and the page style of the document,
11736 because such modifications are not allowed by both packages.
11739 \begin_layout Enumerate
11740 The language of the document should not be changed.
11741 Before previewing your paper, be sure that the babel package is not used.
11742 To do this, click on
11744 Tools\SpecialChar \menuseparator
11755 checkbox in the language settings, and click on
11763 , if you wish to make this change permanent).
11766 \begin_layout Enumerate
11768 \begin_inset Quotes eld
11772 \begin_inset Quotes erd
11775 style must be used to define keywords.
11778 \begin_layout Enumerate
11779 The ijmpc package provides a style named
11780 \begin_inset Quotes eld
11783 Classification Codes
11784 \begin_inset Quotes erd
11787 , which can be used to define classification codes, such as PACS numbers.
11788 Note that this facility is not supported by the ijmpd package.
11791 \begin_layout Enumerate
11792 Several new environments are available:
11793 \begin_inset Quotes eld
11797 \begin_inset Quotes erd
11801 \begin_inset Quotes eld
11805 \begin_inset Quotes erd
11809 \begin_inset Quotes eld
11813 \begin_inset Quotes erd
11817 \begin_inset Quotes eld
11821 \begin_inset Quotes erd
11825 \begin_inset Quotes eld
11829 \begin_inset Quotes erd
11833 \begin_inset Quotes eld
11837 \begin_inset Quotes erd
11841 \begin_inset Quotes eld
11845 \begin_inset Quotes erd
11849 \begin_inset Quotes eld
11853 \begin_inset Quotes erd
11857 \begin_inset Quotes eld
11861 \begin_inset Quotes erd
11865 \begin_inset Quotes eld
11869 \begin_inset Quotes erd
11873 \begin_inset Quotes eld
11877 \begin_inset Quotes erd
11881 \begin_inset Quotes eld
11885 \begin_inset Quotes erd
11889 \begin_inset Quotes eld
11893 \begin_inset Quotes erd
11897 \begin_inset Quotes eld
11901 \begin_inset Quotes erd
11905 Their use is more or less obvious.
11906 LyX supports all these environments; it will use the proper label, text
11907 style, and numbering scheme for each of them.
11910 \begin_layout Enumerate
11911 Both packages use basic citations; the natbib package should not be used.
11912 In LyX, citation references are shown as usual; in the output, citations
11913 are shown as superscripts.
11914 If you want to use a citation as normal text, you should use the
11919 \begin_inset space \thinspace{}
11923 \begin_inset space \space{}
11927 \begin_inset Quotes eld
11931 \begin_inset space \space{}
11941 \begin_inset Quotes erd
11947 \begin_layout Enumerate
11949 \begin_inset Quotes eld
11953 \begin_inset Quotes erd
11956 section in both packages.
11957 To put acknowledgments, just use the
11958 \begin_inset Quotes eld
11962 \begin_inset Quotes erd
11968 \begin_layout Enumerate
11969 Appendices may be added to the paper,
11973 the Acknowledgments and
11978 LyX provides a special environment, called
11979 \begin_inset Quotes eld
11983 \begin_inset Quotes erd
11986 which marks the beginning of the appendices.
11987 This environment should be left blank; it just sends a LaTeX command, but
11988 nothing is really printed.
11990 \begin_inset Quotes eld
11994 \begin_inset Quotes erd
11997 is printed with blue letters, as a signal that all sections after that
11998 point are appendices.
11999 To write an appendix, use the
12000 \begin_inset Quotes eld
12004 \begin_inset Quotes erd
12008 LyX will number each appendix with capital letters, as required by both
12011 \begin_inset Quotes eld
12015 \begin_inset Quotes erd
12022 be present before the first appendix; if not, all appendices will be numbered
12023 as normal sections in the output.
12026 \begin_layout Enumerate
12027 The ijmpc and the ijmpd packages use the
12031 command to implement table captions.
12032 As a result, a table created by LyX is printed correctly, but its caption
12034 However, you can use some TeX code to overcome this problem, so that captions
12035 are printed as expected.
12036 To do so, create a float table as usual, remove the caption, and replace
12037 it with the TeX code
12047 (sic); you must also the TeX code
12051 immediately after the tabular material.
12052 Study the example table included in the template files to see how this
12053 trick is implemented.
12054 Alternatively, If you need table captions, you should implement the whole
12059 file, then include this file to the LyX document (
12061 Insert\SpecialChar \menuseparator
12062 File\SpecialChar \menuseparator
12064 \begin_inset space ~
12070 Details on how to create a table float can be found in the files
12078 , included in the corresponding packages.
12081 \begin_layout Subsection
12082 Preparing a paper for submission
12085 \begin_layout Standard
12086 Before you submit your paper you must export the LyX document as a LaTeX
12089 File\SpecialChar \menuseparator
12090 Export\SpecialChar \menuseparator
12097 \begin_layout Plain Layout
12098 Actually you have the choice between LaTeX (plain) and pdflatex.
12099 If you intend to use pdflatex to prepare the paper, you should use the
12100 pdflatex option so that included graphics are converted to PDF format,
12101 ready for use by pdflatex.
12106 , then make the following changes to the resulting
12113 \begin_layout Enumerate
12114 Remove the comment lines before the
12123 \begin_layout Enumerate
12124 Remove everything between (and including) the
12136 commands, except for any commands you specifically put into the LaTeX preamble.
12139 \begin_layout Standard
12144 file should be saved and processed through LaTeX as many times as necessary.
12145 You may also want to check the resulting
12152 \begin_layout Subsection
12156 \begin_layout Standard
12157 The use of TeX code is reduced to two commands, which must be placed at
12158 the top of the document.
12159 If you started writing your paper by using the
12167 template, the TeX code needed is already in its place; you usually don't
12169 You may only modify the first TeX code to specify the information printed
12170 to the top of odd and even pages (authors' names and short paper's title,
12172 This TeX code must have the form
12176 markboth{Authors' Names}{Short Paper's Title}
12181 \begin_layout Section
12185 \begin_layout Standard
12191 \begin_layout Subsection
12195 \begin_layout Standard
12196 The iopart package provides a document class to create electronic manuscript
12197 submission to the journals published by the Institute of Physics.
12198 Instructions for the authors how to create a paper using the iopart class
12199 can be downloaded together with the iopart package from the site
12200 \begin_inset Flex URL
12203 \begin_layout Plain Layout
12205 ftp://ftp.iop.org/pub/journals/latex2e
12213 \begin_layout Subsection
12217 \begin_layout Standard
12218 The easiest way to write a paper is to start with the file
12222 that is available in LyX's examples files folder.
12223 Open this file, save it under a new name, and start writing.
12224 The example file explains how to use the special text environments.
12225 Here are the most important advices:
12228 \begin_layout Itemize
12229 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12232 Use AMS math package
12234 in the document settings under
12241 \begin_layout Itemize
12244 The title environment defines the kind of your paper.
12245 So use one of the following environments for the title:
12249 \begin_layout Itemize
12258 \begin_layout Itemize
12267 \begin_layout Itemize
12273 for a Topical review
12276 \begin_layout Itemize
12285 \begin_layout Itemize
12294 \begin_layout Itemize
12300 for a Paper (same as Title)
12303 \begin_layout Itemize
12309 for a Preliminary communication
12312 \begin_layout Itemize
12318 for a Rapid communication
12321 \begin_layout Itemize
12327 for a Letter to the editor
12331 \begin_layout Itemize
12334 All title environments except of
12338 can have an optional short title.
12341 \begin_layout Itemize
12342 There is a general title environment
12346 which is not directly supported by the LyX.
12347 This can be used as TeX code when your document doesn't fit into one of
12348 the other title types.
12351 \begin_layout Standard
12352 For more informations like hints for special table and formula formatting,
12353 look at the IOP author guidelines.
12356 \begin_layout Section
12360 \begin_layout Standard
12363 Panayotis Papasotiriou
12366 \begin_layout Subsection
12370 \begin_layout Standard
12371 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12372 that facilitates electronic manuscript submission to the journals they
12374 Most known of them (at least in my domain of interest) are
12376 Astrophysics and Space Science
12382 , but there are many others (see a complete list at
12383 \begin_inset Flex URL
12386 \begin_layout Plain Layout
12388 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12394 The Kluwer package may be downloaded from the site
12395 \begin_inset Flex URL
12398 \begin_layout Plain Layout
12400 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12406 A complete user guide is contained in that package (but it can also be
12407 downloaded separately).
12410 \begin_layout Standard
12411 LyX supports many features of the package but not everything.
12412 However, the TeX code needed is reduced to some
12413 \begin_inset Quotes eld
12417 \begin_inset Quotes erd
12420 commands of the package (see
12421 \begin_inset space ~
12425 \begin_inset CommandInset ref
12427 reference "subsec:kluwer_peculiarities"
12432 I have recently used LyX to write an article submitted to the
12434 Astrophysics and Space Science
12436 without any problem.
12439 \begin_layout Subsection
12443 \begin_layout Standard
12444 The easiest way to write a paper is to start with the Kluwer template file.
12447 File\SpecialChar \menuseparator
12459 This will give an (almost) empty document that includes the most common
12460 fields found in a manuscript and a short description of their use.
12461 As in most templates, simply overwrite the existing text (including the
12466 ) with the correct information.
12469 \begin_layout Subsection
12470 Preparing a paper for submission
12473 \begin_layout Standard
12474 As in the AASTeX package, before you submit your paper to a journal you
12476 \begin_inset Quotes eld
12480 \begin_inset Quotes erd
12486 \begin_layout Enumerate
12487 Export your paper as a LaTeX file.
12488 To do this, click on
12490 File\SpecialChar \menuseparator
12491 Export\SpecialChar \menuseparator
12498 \begin_layout Enumerate
12503 file with a text editor and make the following changes
12507 \begin_layout Enumerate
12508 remove the comment lines before the
12517 \begin_layout Enumerate
12518 remove everything between (and including) the
12530 commands, except for any commands you specifically put into the LaTeX preamble.
12533 \begin_layout Standard
12542 \begin_layout Enumerate
12547 file through LaTeX as many times as necessary (usually up to three).
12550 \begin_layout Enumerate
12556 \begin_inset space \thinspace{}
12560 \begin_inset space \space{}
12567 , and check if everything is OK (it should, if you didn't make any mistake).
12570 \begin_layout Subsection
12571 \begin_inset Quotes eld
12575 \begin_inset Quotes erd
12578 of the Kluwer package
12579 \begin_inset CommandInset label
12581 name "subsec:kluwer_peculiarities"
12588 \begin_layout Standard
12589 The Kluwer package has the following
12590 \begin_inset Quotes eld
12594 \begin_inset Quotes erd
12600 \begin_layout Enumerate
12601 It is possible to write multiple articles in the same LaTeX file
12605 \begin_layout Plain Layout
12606 I can't imagine any good reason to do this.
12612 Each article must be included in the environment
12613 \begin_inset Quotes eld
12617 \begin_inset Quotes erd
12621 Unfortunately, this environment cannot be omitted, even if you write just
12623 Therefore, each article starts with the command
12629 and, obviously, ends with the command
12636 Although this can be implemented in LyX, I didn't included it, since it
12637 looks ugly and can confuse the novice user.
12638 Therefore, you need to enter them directly and mark them as LaTeX code
12640 \begin_inset Quotes eld
12644 \begin_inset Quotes erd
12650 \begin_layout Enumerate
12651 Information given at the beginning of the article (i.
12652 \begin_inset space \thinspace{}
12656 \begin_inset space \space{}
12659 title, subtitle, author, institution, running title, running author, abstract
12660 and keywords) must be included in an environment called
12661 \begin_inset Quotes eld
12665 \begin_inset Quotes erd
12669 This is not implemented in LyX, so you must enter title, subtitle etc.
12670 \begin_inset space ~
12673 between two TeX code lines (
12688 \begin_layout Enumerate
12689 According to the user manual, the label of each bibliography item must be
12713 \begin_layout Standard
12718 template takes care of all these
12719 \begin_inset Quotes eld
12723 \begin_inset Quotes erd
12727 If you start a new paper using this template you don't need to do anything
12732 \begin_layout Enumerate
12733 don't delete the TeX code included in the template, and
12736 \begin_layout Enumerate
12737 copy the example bibliography item included in the template and modify it
12738 as necessary to enter new bibliography items.
12741 \begin_layout Section
12745 \begin_layout Standard
12751 \begin_layout Subsection
12755 \begin_layout Standard
12756 The LyX document classes
12758 article (koma-script)
12762 report (koma-script)
12780 correspond to the LaTeX document classes
12797 \begin_inset space ~
12800 of the Koma-Script family.
12801 They are replacements for the standard document classes
12817 , resp., and fit better to European typography conventions in a number of
12821 \begin_layout Itemize
12822 Standard character size is 11pt in
12824 article (koma-script)
12828 report (koma-script)
12836 letter (koma-script)
12841 \begin_layout Itemize
12842 Headings, labels of the description environment, and a number of elements
12845 letter (koma-script)
12847 document class are set in a bold sans serif font.
12851 \begin_layout Plain Layout
12852 There is a big difference between the bold sans serif old cm fonts and new
12853 ec fonts, especially in the appearance of headings.
12854 In comparison, the ec bold sans serif fonts look a bit thin.
12855 Here the LaTeX package
12863 helps to produce the
12864 \begin_inset Quotes eld
12868 \begin_inset Quotes erd
12871 appearance when using the ec fonts.
12876 The numbering of chapter headings is made in the same way as the numbering
12877 of section headings, that is without the extra line
12878 \begin_inset Quotes eld
12881 Chapter\SpecialChar \ldots{}
12883 \begin_inset Quotes erd
12887 In addition, the appearance of the headings can be modified by using a
12888 number of options (in LyX to be entered in the field
12891 \begin_inset space ~
12898 Layout\SpecialChar \menuseparator
12905 \begin_layout Itemize
12906 The main means in the Koma-Script document classes to design the type area
12915 (in LyX to be entered in the extra class options field in the dialog
12917 Document\SpecialChar \menuseparator
12921 They make a clearer modification of page margins possible as do the options
12924 Document\SpecialChar \menuseparator
12931 \begin_layout Itemize
12932 The LaTeX document classes of the Koma-Script family define a number of
12933 additional commands.
12934 Those part of it which makes sense in LyX is implemented in corresponding
12938 \begin_layout Standard
12939 Detailed descriptions of the LaTeX document classes of the Koma-Script family
12940 can be found in the Koma-Script documentation
12951 \begin_layout Subsection
12952 article (koma-script), report (koma-script), and book (koma-script)
12955 \begin_layout Standard
12956 The document classes
12958 article (koma-script)
12962 report (koma-script)
12972 are implemented in the layout files
12985 They contain all the paragraph types of the corresponding standard document
12998 , resp., partly modified, with the exception of the LyX specific
13002 -type, which is replaced by the new
13006 -type having the same functionality.
13011 -Type there is a number of new paragraph types added.
13018 letter (koma-script)
13023 \begin_layout Itemize
13032 : are equivalents to
13040 , resp., additionally inserting an entry in the table of contents.
13049 are not contained in
13051 article (koma-script)
13056 \begin_layout Itemize
13065 : behave exactly as
13073 , resp., additionally clearing running heads.
13078 is not contained in
13080 article (koma-script)
13086 \begin_layout Plain Layout
13099 report (koma-script)
13101 , but since this is identical to
13105 , is has not been implemented in LyX.
13113 \begin_layout Itemize
13118 : generates a heading directly above the following paragraph in the standard
13119 character size without affecting the structure of the document.
13122 \begin_layout Itemize
13131 are special captions which respect the different space settings needed
13132 for captions placed above or below an element (if you follow strict typographic
13133 rules, you might want to place table captions always above the table).
13134 You can also use the class option
13138 , which will switch
13151 You need at least Koma-Script version 2.8q to use this.
13154 \begin_layout Itemize
13159 : can be used to set a bonmot, e.
13160 \begin_inset space \thinspace{}
13164 \begin_inset space \space{}
13167 at the beginning of a chapter.
13168 If you use the optional argument (
13170 Insert\SpecialChar \menuseparator
13172 \begin_inset space ~
13177 ), you can insert the dictum's author there.
13178 Dictum and author are separated by a line.
13179 You need at least Koma-Script version 2.8q to use this.
13184 is not contained in
13186 article (koma-script)
13191 \begin_layout Standard
13192 The following types, together with the standard types
13204 , form the title area of the document.
13205 They must be entered ahead of the first
13206 \begin_inset Quotes eld
13210 \begin_inset Quotes erd
13217 \begin_layout Plain Layout
13218 The corresponding LaTeX commands must appear before the
13229 When such a type is used more than once, the latter usage overwrites the
13230 former one, that means, for every type only the latest usage is valid.
13231 The order of the different types however has, like
13243 , no effect on the appearance of the produced document.
13246 \begin_layout Itemize
13251 : produces a centered paragraph above the ordinary title (
13263 ) for the subject of the document.
13266 \begin_layout Itemize
13271 : produces a centered paragraph below the ordinary title (
13283 ) for the publishers' name.
13286 \begin_layout Itemize
13293 report (koma-script)
13299 produces a centered paragraph on its own page behind the title page, or
13302 article (koma-script)
13304 produces a centered paragraph below the ordinary title (
13320 ) for a dedication.
13323 \begin_layout Itemize
13328 : produces a left aligned paragraph above the ordinary title (
13344 ) for a document`s head.
13347 \begin_layout Itemize
13352 : produces in a double-sided print in
13354 report (koma-script)
13360 a left-aligned paragraph at the top of the title page`s back or has no
13361 effect in a single-sided print or in
13363 article (koma-script)
13368 \begin_layout Itemize
13373 : produces in a double-sided print in
13375 report (koma-script)
13381 a left-aligned paragraph at the bottom of the title page`s back or has
13382 no effect in a single-sided print or in
13384 article (koma-script)
13389 \begin_layout Itemize
13394 : produces a special
13395 \begin_inset Quotes eld
13399 \begin_inset Quotes erd
13402 page ahead of the actual document containing a paragraph without special
13406 \begin_layout Standard
13407 The layout files for the document classes
13409 article (koma-script)
13413 report (koma-script)
13419 do include the file
13424 This is thought of as a place to define your own types.
13429 in your personal layout directory and edit the file!
13432 \begin_layout Subsection
13433 letter (koma-script)
13436 \begin_layout Standard
13440 \begin_layout Plain Layout
13452 \begin_layout Standard
13456 letter (koma-script)
13458 is implemented in the layout file
13463 It contains all the paragraph types of the corresponding standard document
13468 , partly modified, with the exception of the LyX specific types
13480 type, which is replaced by the new
13485 In addition, it contains, in contrast to the standard document class, the
13503 Furthermore, there are a number of new letter specific types.
13506 \begin_layout Standard
13510 \begin_layout Plain Layout
13522 \begin_layout Standard
13523 The appearance of the letter produced by this document class can be controlled
13524 by a number of LaTeX commands, which you can put in the LaTeX preamble.
13528 \begin_layout Plain Layout
13529 For example, the standard appearance of the letter`s heading, consisting
13530 of name and address, is quite self-willed.
13532 \begin_inset Quotes eld
13536 \begin_inset Quotes erd
13539 heading is produced by the following LaTeX commands in the preamble:
13542 \begin_layout LyX-Code
13552 \begin_layout LyX-Code
13568 \begin_layout LyX-Code
13578 \begin_layout LyX-Code
13598 A detailed German description of such LaTeX commands can be found in the
13599 Koma-Script documentation
13604 With it, the letter's author can produce his personal letter layout.
13607 \begin_layout Standard
13616 define the beginning of the letter and must be used in every letter.
13617 To emphasize them in the LyX document class, they are marked with the letter
13627 \begin_inset space ~
13630 in the left margin.
13631 It is possible to write any number of letters in one file.
13636 type produces a new letter using the same addressee and a
13640 type produces a new addressee.
13657 are ordinary paragraph types and can also be used several times in one
13658 and the same letter.
13661 \begin_layout Itemize
13666 : produces a paragraph for the addressee and implicitly defines the beginning
13670 \begin_layout Itemize
13675 : produces a paragraph for the form of address and implicitly produces a
13679 \begin_layout Itemize
13684 : produces a paragraph for a close.
13687 \begin_layout Itemize
13692 : produces a paragraph for a postscript.
13695 \begin_layout Itemize
13700 : produces a paragraph for a distribution list.
13703 \begin_layout Itemize
13708 : produces a paragraph for enclosures.
13711 \begin_layout Standard
13752 are input types provided with a label to enter information, which will
13753 be processed by the document class.
13757 \begin_layout Plain Layout
13758 It could be seen as a matter of inconsequence, that the types
13766 described above are not such input types as well.
13767 Because of the special meaning of those types, however, I have implemented
13768 them as ordinary paragraph types with a one letter mark in the left margin.
13769 Moreover, it would affect my feeling of symmetry, if the
13777 type had such a serious different appearance.
13782 The types must be used ahead of the corresponding
13789 \begin_layout Standard
13790 An implementation of these types in a WYSIWYG fashion does not seem to make
13791 sense, because the real appearance of the produced letter does not only
13792 depend on the usage of the particular type, but also on other factors.
13793 For example, a signature entered in the
13797 type will in the standard behavior appear in the produced letter only,
13798 when in the same letter also a
13803 The entered value of the
13807 type will in the standard behavior not appear in the produced letter at
13809 The possibility to design the letter`s heading freely is already indicated
13810 in a footnote above.
13813 \begin_layout Standard
13814 The input types can also be used as empty paragraphs.
13815 This makes sense e.
13816 \begin_inset space \thinspace{}
13820 \begin_inset space \space{}
13832 type is not used at all, in the standard behavior the value of the
13836 type is used as signature, whereas if an empty
13840 type is used, no signature value is defined.
13843 \begin_layout Standard
13844 By using the input types it is possible to write a letter template, containing
13845 filled input types with your personal dates (name, address, etc.) and empty
13846 input types for other dates you want to enter.
13849 \begin_layout Itemize
13854 : sender's name, in the standard behavior appears as a centered paragraph
13855 in small caps in the letter`s heading.
13858 \begin_layout Itemize
13863 : sender's signature, in the standard behavior appears below the
13872 type is used, the value of the
13876 type appears instead.
13879 \begin_layout Itemize
13884 : sender's address, in the standard behavior appears in a centered paragraph
13885 in the letter`s heading below the sender's name.
13888 \begin_layout Itemize
13893 : sender's telephone number, in the standard behavior only sets the LaTeX
13903 \begin_layout Itemize
13908 : place of the letter`s making.
13911 \begin_layout Itemize
13916 : date of the letter`s making.
13925 , in the standard behavior, produce the place and the date in a right-aligned
13926 line below the addressee's field.
13931 type is used, neither place nor date appear, independent of the value of
13941 type is used, the date of the letter `s production is used.
13944 \begin_layout Itemize
13949 : sender`s back address, in the standard behavior appears above the addressee's
13950 field in a small sans serif font.
13953 \begin_layout Itemize
13958 : special mail information, in the standard behavior appears underlined
13959 above the addressee's field below the back address.
13962 \begin_layout Itemize
13967 : additional information, in the standard behavior appears on right side
13968 below the addressee`s field.
13971 \begin_layout Itemize
13976 : the letter's title, in the standard behavior appears in a big, bold, sans
13977 serif font above the subject.
13980 \begin_layout Itemize
13985 : the letter's subject, in the standard behavior appears in a bold font
13993 \begin_layout Standard
14014 produce a business letter like line above the
14018 line containing the fields
14019 \begin_inset Quotes eld
14023 \begin_inset Quotes erd
14027 \begin_inset Quotes eld
14031 \begin_inset Quotes erd
14035 \begin_inset Quotes eld
14039 \begin_inset Quotes erd
14043 \begin_inset Quotes eld
14047 \begin_inset Quotes erd
14051 \begin_inset Quotes eld
14055 \begin_inset Quotes erd
14059 \begin_inset Quotes eld
14063 \begin_inset Quotes erd
14067 For the date field, the value of the
14073 \begin_inset Quotes eld
14076 business letter types
14077 \begin_inset Quotes erd
14080 is used, the value of the
14084 type however does not appear, but only the LaTeX variable
14091 The ordinary output of place and date in a right-aligned line below the
14092 addressee`s field is suppressed.
14093 The types are implemented as input types provided with a label and must
14094 be used ahead of the corresponding
14101 \begin_layout Itemize
14109 \begin_layout Itemize
14117 \begin_layout Itemize
14125 \begin_layout Itemize
14133 \begin_layout Itemize
14141 \begin_layout Subsection
14142 The new letter class: letter (koma-script v.2)
14145 \begin_layout Standard
14151 \begin_layout Standard
14152 \begin_inset VSpace medskip
14158 \begin_layout Standard
14160 Koma-Script version 2.8 has introduced a new letter class
14164 which supersedes the now unsupported
14169 It has — on the LaTeX side — a completely new interface and is not compatible
14170 with the old class.
14171 Therefore, LyX supports both, though it is recommended you use the new
14175 \begin_layout Standard
14176 This class covers the same functionality as
14178 letter (koma-script),
14181 The basic items are
14185 (receiver's address, same as
14189 in the old layout),
14202 will start a new letter (i.
14203 \begin_inset space \thinspace{}
14207 \begin_inset space \space{}
14210 you can write several letters per document).
14211 New elements are sender's
14227 and the possibility to use a
14233 Insert\SpecialChar \menuseparator
14239 \begin_layout Standard
14240 The biggest improvement is, though, that the letter's layout is configurable
14241 to meet almost any needs.
14242 This can be done via the preamble or with a special style file (Letter
14243 Class Option, extension
14247 ), that will be read in as a class option.
14251 \begin_layout Plain Layout
14252 The KOMA package comes with some default
14257 There is, for instance, a
14261 file that follows german typesetting rules, or a
14265 that provides the default layout of the old
14270 The latter can be loaded with the class option
14279 ayout\SpecialChar \menuseparator
14284 ocument\SpecialChar \menuseparator
14296 template that is included in LyX for examples.
14297 A detailed description is to be found in the Koma-Script documentation
14305 \begin_layout Subsection
14309 \begin_layout Standard
14310 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14314 \begin_layout Itemize
14315 The chapter number of a
14319 type appears on a line of its own above the chapter heading instead of
14320 appearing in the same line ahead of it.
14321 The cause for that is the LyX internal behavior for the labeltype
14325 in the layout file.
14328 \begin_layout Itemize
14329 The headings of the types
14337 are only put in the
14338 \begin_inset Quotes eld
14342 \begin_inset Quotes erd
14345 LaTeX table of contents, but not in the LyX table of contents (
14347 Document\SpecialChar \menuseparator
14349 \begin_inset space ~
14353 \begin_inset space ~
14361 \begin_layout Itemize
14362 The paragraphs in a
14366 document class appear in a skip separation mode, not indented.
14367 This is the standard behavior, no special LaTeX commands are needed for
14371 Document\SpecialChar \menuseparator
14374 dialog the corresponding radio button indicates
14383 value always has the effect that extra LaTeX commands are inserted in the
14384 document to produce the gap, which is not what is wanted in this case.
14387 \begin_layout Section
14388 Latex8 (IEEE Conference Papers)
14391 \begin_layout Standard
14397 \begin_layout Subsection
14401 \begin_layout Standard
14402 Since this class is specifically for writing submissions to IEEE sponsored
14403 conferences I strongly recommend that you get a copy of their Authors Kit.
14408 package and associated bibliography style file is included in the kit.
14409 The Authors Kit is usually sent out by email once your initial submission
14411 There is a lot of useful information in the Authors Kit explaining formatting
14412 restrictions and so on and I will assume you have read this since that
14413 means I don't have to repeat it all here.
14416 \begin_layout Subsection
14420 \begin_layout Standard
14421 [AR\SpecialChar \@.
14425 \begin_layout Subsection
14426 Supported Environments
14429 \begin_layout Itemize
14435 \begin_layout Itemize
14441 \begin_layout Itemize
14447 \begin_layout Itemize
14453 \begin_layout Itemize
14459 \begin_layout Itemize
14465 \begin_layout Itemize
14471 \begin_layout Itemize
14477 \begin_layout Itemize
14483 \begin_layout Subsection
14484 Differences Between Screen and Paper
14487 \begin_layout Standard
14488 There are slight differences in appearance mainly with the presentation
14489 of section counters.
14490 On screen the trailing period of the section counter is missing but it
14491 will appear in the output so don't let this worry you.
14494 \begin_layout Section
14498 \begin_layout Standard
14504 \begin_layout Subsection
14508 \begin_layout Standard
14509 Memoir is a very powerful and constantly evolving class.
14510 It has been designed with regard to fictional and non-fictional literature.
14511 Its aim is to let the user have maximum control over the typesetting of
14513 Memoir is based on the standard book class, but it can also emulate the
14514 article class (see below).
14517 \begin_layout Standard
14518 Peter Wilson, the developer of Memoir, is known as the author of lots of
14519 useful packages in the LaTeX world.
14520 Most of them have been merged with Memoir.
14521 Therefore, it is much easier to layout the table of contents, appendices,
14522 chapter designs and such.
14523 LyX, though, does not support all of these goodies natively.
14524 Some of them might be added to forthcoming releases
14528 \begin_layout Plain Layout
14529 You are invited to send suggestions to
14530 \begin_inset Flex URL
14533 \begin_layout Plain Layout
14535 lyx-devel@lists.lyx.org
14545 , lots will probably never, due to the limitations of LyX's framework.
14546 Of course you can still use all features with the help of some native LaTeX
14551 \begin_layout Plain Layout
14556 \begin_layout Plain Layout
14566 \begin_inset space ~
14570 \begin_inset CommandInset ref
14572 reference "sec:Inserting-TeX-Code"
14582 In this section, we can only list those features which are natively supported
14584 For detailed descriptions (and for the rest of features) we recommend you
14585 have a look at the detailed manual of the Memoir class
14589 \begin_layout Plain Layout
14594 \begin_layout Plain Layout
14604 \begin_inset Flex URL
14607 \begin_layout Plain Layout
14609 CTAN:/macros/latex/memoir/memman.pdf
14619 , which is not only a user guide for the class, but also both a comprehensive
14620 description on good typesetting and a superb example for good typesetting
14624 \begin_layout Subsection
14625 Basic features and restrictions
14628 \begin_layout Standard
14629 Memoir supports basically all features of the standard book classes.
14630 There are, however, some differences, as follows:
14633 \begin_layout Description
14635 \begin_inset space ~
14638 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14641 \begin_layout Description
14643 \begin_inset space ~
14646 style: The fancy page style is not supported, due to a command clash between
14647 Memoir and the fancyhdr package (they both define a command with the same
14648 name, which confuses LaTeX).
14649 Instead, Memoir comes with a number of its own page styles (see
14651 Layout\SpecialChar \menuseparator
14652 Document\SpecialChar \menuseparator
14654 \begin_inset space ~
14660 If you want to use these for the chapter pages, you have to use the command
14667 in the main text or in preamble (e.
14668 \begin_inset space \thinspace{}
14672 \begin_inset space \space{}
14679 chapterstyle{companion}
14684 \begin_layout Description
14685 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14686 optional argument in the standard classes.
14687 With this, you can specify an alternative version of the title for the
14688 table of contents and the headers (for instance, if the title is too long).
14689 In LyX, you can do this via
14691 Insert\SpecialChar \menuseparator
14693 \begin_inset space ~
14698 at the beginning of a chapter/section.
14699 Memoir features a second optional argument and thus separates the table
14700 of contents from the header.
14701 You can define three variants of a title with this: one for the main text,
14702 one for the table of contents, and one for the headers.
14703 Simply insert two optional arguments if you need this feature, the first
14704 one containing the short title for the Table of Contents, the second one
14705 containing an alternative short title for the headers.
14708 \begin_layout Description
14709 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14710 of contents, the list of figures and the list of table start a new page
14712 Memoir does not follow this route.
14713 You have to insert a page break yourself, if you want to have one.
14716 \begin_layout Description
14717 Titlepage: For some unknown reason, Memoir uses pagination on the title
14718 page (in the standard classes, title pages are
14719 \begin_inset Quotes eld
14723 \begin_inset Quotes erd
14727 \begin_inset space \thinspace{}
14731 \begin_inset space \space{}
14735 If you want an empty title page, type
14739 aliaspagestyle{title}{empty}
14744 \begin_layout Description
14745 Article: With the class option
14751 Layout\SpecialChar \menuseparator
14752 Document\SpecialChar \menuseparator
14754 \begin_inset space ~
14759 ), you can emulate article style.
14760 That is, counters (footnotes, figures, tables etc.) will not be reset on
14761 new chapters, chapters don't start a new page (but are—in contrary to
14762 \begin_inset Quotes eld
14766 \begin_inset Quotes erd
14769 article classes—still allowed), parts, though, use their own page, as in
14773 \begin_layout Description
14774 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14775 font commands, which have been used in the old LaTeX version 2.09 (e.
14776 \begin_inset space \thinspace{}
14780 \begin_inset space \space{}
14796 It produces an error and stops LaTeX whenever such a command appears.
14801 reallows the commands and spits out warnings instead (which does at least
14803 Since a lot of packages and particularly BibTeX style files are still using
14804 those commands, we have decided to use this option by default.
14807 \begin_layout Subsection
14811 \begin_layout Standard
14812 We will only describe the features supported by LyX (which is not much currently
14814 Please consult the Memoir manual
14818 \begin_layout Plain Layout
14823 \begin_layout Plain Layout
14833 \begin_inset Flex URL
14836 \begin_layout Plain Layout
14838 CTAN:/macros/latex/memoir/memman.pdf
14851 \begin_layout Description
14852 Abstract: You may wonder why an abstract is an extra feature.
14853 Well, it is in book class.
14854 Usually books don't have abstracts.
14855 Memoir, however, has.
14856 You can use it wherever and how often you like.
14859 \begin_layout Description
14860 Chapterprecis: You may know this older typesetting style: The contents of
14861 a chapter are summarized below the title and also in the table of contents
14863 \begin_inset space \thinspace{}
14867 \begin_inset space \space{}
14872 Our hero arrives in Troia; he loses some friends; he finds others
14875 Chapterprecis does exactly this.
14876 It is therefore only sensible below a chapter.
14879 \begin_layout Description
14880 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14881 The epigraph environment provides an elegant way of typesetting such a
14883 The motto itself (text) and its author (source) are divided by a short
14885 Unfortunately, we have to fool LyX a bit here again, since the environment
14886 needs two arguments (text and source).
14887 In this case, we have to use curly brackets (in TeX mode) between the two
14898 <author of the slogan>.
14901 \begin_layout Description
14902 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14903 complex figurative poems).
14904 LyX can only support a few of them.
14905 One is poemtitle, which is a centered title for poems, which will also
14906 be added to the table of contents (verse is the standard environment for
14908 Memoir has some enhanced versions of verse, but you need to use TeX code,
14909 because they have to be nested inside regular verse environments, which
14910 is not possible with LyX).
14913 \begin_layout Description
14914 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14917 \begin_layout Section
14918 Article (mwart), book (mwbk) and report (mwrep)
14919 \begin_inset Argument
14922 \begin_layout Plain Layout
14935 \begin_layout Standard
14941 \begin_layout Standard
14942 The LyX document classes
14958 correspond to the LaTeX document classes
14971 They are replacements for the standard document classes
14983 , resp., and fit better to Polish typography conventions in a number of points.
14987 \begin_layout Standard
14991 \begin_layout Itemize
14992 Unnumbered titles (with star, e.
14993 \begin_inset space \thinspace{}
14997 \begin_inset space \space{}
15004 ) are added into table of contents,
15007 \begin_layout Itemize
15008 Additional page styles:
15012 \begin_layout Description
15013 uheadings header with separated lines,
15016 \begin_layout Description
15017 myheadings custom header, contents headers via commands:
15032 \begin_layout Description
15033 myuheadings custom header with separated lines,
15036 \begin_layout Description
15037 outer page number is placed on outer side of page
15041 \begin_layout Itemize
15046 \begin_layout Description
15047 rmheadings serif titles — default,
15050 \begin_layout Description
15051 sfheadings sansserif titles,
15054 \begin_layout Description
15055 authortitle on title page first placed is author next title — default,
15058 \begin_layout Description
15059 titleauthor on title page first placed is title next author,
15062 \begin_layout Description
15063 withmarginpar reserve place on page for margins.
15067 \begin_layout Section
15071 \begin_layout Standard
15076 provides an alternative to the standard
15081 It provides similar functionality, but you might prefer this layout with
15082 sans serif sections, headings, and more.
15085 \begin_layout Section
15089 \begin_layout Standard
15095 \begin_layout Standard
15096 \begin_inset VSpace bigskip
15102 \begin_layout Standard
15107 \begin_inset space ~
15112 textclass works with the American Physical Sociey's RevTeX 4.0 (the
15113 \begin_inset Formula $\beta$
15116 release of May, 1999) class.
15119 \begin_layout Standard
15124 textclass, which works with RevTeX 3.1.
15125 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15126 That means that it doesn't interact very well with LyX, which requires
15127 LaTeX2e, although it has been kludged to work.
15128 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15132 \begin_inset space ~
15137 textclass should also be pretty easy to use.
15140 \begin_layout Standard
15141 These documents are supposed to be used in
15145 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15146 macros, and assume you'll know what to put in the preamble if necessary.
15149 \begin_layout Subsection
15153 \begin_layout Standard
15154 All you need to do is install RevTeX 4, as described in the package's README
15156 The package can be found at The RevTeX 4 Web Site
15157 \begin_inset Flex URL
15160 \begin_layout Plain Layout
15162 http://publish.aps.org/revtex4/
15168 Install it somewhere that LaTeX can see it.
15169 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15171 \begin_inset space \thinspace{}
15175 \begin_inset space \space{}
15178 not the directory where you installed the class file.) Then, if you reconfigure
15179 LyX, it will find the class file and let you use the RevTeX4 textclass.
15182 \begin_layout Standard
15183 Probably the easiest way to get started is either to import a RevTeX 4 document
15191 \begin_inset space ~
15196 template, found in the templates directory.
15199 \begin_layout Subsection
15203 \begin_layout Standard
15204 Optional arguments to
15211 \begin_inset Quotes eld
15215 \begin_inset Quotes erd
15219 \begin_inset Quotes eld
15223 \begin_inset Quotes erd
15233 \begin_inset space ~
15241 \begin_inset space ~
15247 Remember that in RevTeX, at least one optional argument is required!
15250 \begin_layout Standard
15251 Other preamble matter, like
15258 \begin_inset space ~
15264 \begin_inset space ~
15269 dialog, also as usual.
15272 \begin_layout Subsection
15276 \begin_layout Standard
15277 The layouts basically correspond to the commands in RevTeX4.0.
15278 For example, the Email layout corresponds to
15285 Note that (at least as of RevTeX 4.0 Beta), the
15293 layouts are exactly equivalent, so you shouldn't need to use both.
15297 \begin_layout Plain Layout
15298 In case you're curious, both were included so that
15302 would be able to translate both
15322 \begin_layout Subsection
15326 \begin_layout Standard
15327 There are a couple of important unique aspects of RevTeX 4 which might cause
15328 bugs that will be even more confusing in LyX.
15331 \begin_layout Standard
15349 The LyX equivalent is that there is a separate Thanks layout.
15354 write footnotes in the
15358 layout, or weird things may happen.
15359 See the RevTeX 4 documentation for more details.
15362 \begin_layout Standard
15366 \begin_inset space ~
15374 \begin_inset space ~
15383 layouts must be placed
15391 layout and the corresponding
15408 , the LaTeX won't compile.
15411 \begin_layout Subsection
15415 \begin_layout Standard
15416 The main problem with this layout is that you can't use the optional arguments
15417 to layouts like Email and Title.
15418 (The problem is not unique to this layout; you can't use optional arguments
15419 to the Section layouts either.) This means that after you export that file
15420 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15421 need to edit the LaTeX file with a text editor to add the optional arguments
15423 \begin_inset space \thinspace{}
15427 \begin_inset space \space{}
15430 the running title for the page headers.
15431 Lacking these layouts makes the
15437 (and the equivalent
15443 ) useless, so the corresponding layouts don't exist, and will have to be
15448 \begin_layout Plain Layout
15453 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15454 has not been updated yet to take advantage of it.
15462 \begin_layout Section
15463 Springer Journals (
15470 \begin_layout Standard
15476 \begin_layout Subsection
15480 \begin_layout Standard
15481 These are the layout files for some of the journal formats used by Springer
15482 Verlag and listed on
15483 \begin_inset Flex URL
15486 \begin_layout Plain Layout
15488 http://www.springer.de/author/tex/help-journals.html
15493 , where you should also go to fetch the class files (yes, these are LaTeX2e
15495 It is a modular system: the things common to all journals are implemented
15500 , which journal-specific layout files (such as, e.
15501 \begin_inset space \thinspace{}
15505 \begin_inset space \space{}
15512 for Journal of Geodesy) can include.
15515 \begin_layout Standard
15516 This means that implementing support for any other Springer journal on this
15517 list is as simple as writing your own
15525 file following the outline given in
15533 \begin_layout Standard
15534 It is reasonably well tested only for the Journal of Geodesy.
15543 come with the standard LyX distribution.
15544 Install the relevant class file (downloaded from Springer) in a proper
15545 directory, reconfigure LaTeX (in the teTeX case by running
15549 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15550 and it should work.
15553 \begin_layout Subsection
15557 \begin_layout Standard
15558 A large number of theorem-like styles —
15564 \SpecialChar \ldots{}
15570 \begin_layout Standard
15573 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15574 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15577 See the Springer class file documentation for details.
15580 \begin_layout Subsection
15584 \begin_layout Itemize
15596 \begin_layout Itemize
15599 Probability Theory and Related Fields
15605 — Jean-Marc Lasgouttes
15608 \begin_layout Standard
15609 Add your own, it isn't so hard!
15612 \begin_layout Subsection
15616 \begin_layout Standard
15617 These files are partly based on the older
15621 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15622 file from Springer.
15627 layout, are now defunct.
15628 Jean-Marc Lasgouttes helped out big in making me find my way around the
15629 LyX layout file mechanism.
15632 \begin_layout Subsection
15636 \begin_layout Standard
15638 But probably less than in the old hacked-LaTeX
15645 \begin_layout Standard
15647 \begin_inset space \thinspace{}
15650 g.: does not display the number for theorem-like layouts, just #.
15653 \begin_layout Section
15659 \begin_inset CommandInset label
15668 \begin_layout Standard
15676 \begin_layout Subsection
15680 \begin_layout Standard
15681 This section describes how to use LyX to make slides for overhead projectors.
15682 There are two document classes that can do this: the default slides class
15688 This section documents the former.
15691 \begin_layout Standard
15692 I'm going to say this again, nice and clear, so that there's no misunderstanding
15696 \begin_layout Standard
15697 \begin_inset VSpace bigskip
15703 \begin_layout Standard
15707 This section documents the class
15708 \begin_inset Quotes eld
15716 \begin_inset Quotes erd
15724 \begin_layout Standard
15725 \begin_inset VSpace bigskip
15731 \begin_layout Standard
15732 If you're looking for the documentation for
15733 \begin_inset Quotes eld
15741 \begin_inset Quotes erd
15744 , check out section
15745 \begin_inset space ~
15749 \begin_inset CommandInset ref
15751 reference "sec:foiltex"
15761 \begin_inset Quotes eld
15769 \begin_inset Quotes erd
15772 ] is actually somewhat better than the default
15780 \begin_layout Plain Layout
15781 \SpecialChar \ldots{}
15782 or so I've been told repeatedly by its advocates.
15783 Having never used it, I have no idea if this claim is true or not.
15788 which this section documents.
15791 \begin_layout Standard
15792 This class is the LaTeX2e improvement of the old
15797 Every LaTeX2e distribution includes this class [which I'll just refer to
15799 \begin_inset Quotes eld
15807 \begin_inset Quotes erd
15810 from now on], so you're bound to have it.
15811 As I noted earlier, there are other classes, such as
15815 , which also produce slides for overhead projectors and do a better job
15817 However, there are some things which
15821 can do which the others can't, such as generate overlays.
15822 Read on to learn more!
15825 \begin_layout Subsection
15827 \begin_inset CommandInset label
15829 name "sec:slidesetup"
15836 \begin_layout Standard
15837 Obviously, to use this document class, you need to select
15838 \begin_inset Quotes eld
15846 \begin_inset Quotes erd
15849 from the class list in the
15851 Document\SpecialChar \menuseparator
15855 There are some other special things you should know about this class:
15858 \begin_layout Itemize
15859 Don't bother changing the options
15864 They're not supported by the
15871 \begin_layout Itemize
15875 \begin_inset space ~
15880 behaves a bit differently for this class.
15881 The possible choices and what they do are as follows:
15885 \begin_layout Description
15890 The final output contains page numbers in the lower right corner.
15893 \begin_layout Description
15902 , but also prints out any time markers you've put in.
15903 This is the default.
15906 \begin_layout Description
15911 The final output contains no page numbers, time markers, or alignment markers.
15915 \begin_layout Itemize
15920 class has an extra option:
15926 \begin_inset Quotes eld
15934 \begin_inset Quotes erd
15937 in the extra class options.
15941 \begin_layout Standard
15942 Using this options allows you to add time markers to
15948 \begin_inset space ~
15952 \begin_inset CommandInset ref
15954 reference "sec:slideNote"
15962 \begin_layout Standard
15963 You can also use the template file
15964 \begin_inset Quotes eld
15972 \begin_inset Quotes erd
15975 to automatically set up a document to use the
15981 File\SpecialChar \menuseparator
15983 \begin_inset space ~
15987 \begin_inset space ~
15992 to open your new document].
15993 The template file also contains some examples of the special paragraph
15994 environments used by this class.
15995 I'll describe those next.
15998 \begin_layout Subsection
15999 Paragraph Environments
16002 \begin_layout Subsubsection
16003 Supported Environments
16006 \begin_layout Standard
16007 The first thing you'll notice when you start up a new
16011 document is the font size and type: it's the equivalent of the size
16012 \begin_inset Quotes eld
16020 \begin_inset Quotes erd
16026 \begin_inset space ~
16032 This is also what's used in the output.
16034 \begin_inset Quotes eld
16038 \begin_inset Quotes erd
16041 to remind you that this is a slide.
16042 Your final slides will use a larger font; ergo, you'll have less space.
16043 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16046 \begin_layout Standard
16047 The next thing that becomes obvious is the changes to the paragraph environment
16048 pull-down box [at the far-left end of the toolbar].
16049 Most of the paragraph environments you're used to seeing are missing.
16050 There are also five new ones.
16055 class itself only supports certain paragraph environments:
16058 \begin_layout Itemize
16064 \begin_layout Itemize
16070 \begin_layout Itemize
16076 \begin_layout Itemize
16082 \begin_layout Itemize
16088 \begin_layout Itemize
16094 \begin_layout Itemize
16100 \begin_layout Itemize
16106 \begin_layout Itemize
16112 \begin_layout Itemize
16118 \begin_layout Itemize
16124 \begin_layout Standard
16125 All of the other standard environments, including the section-heading environmen
16126 ts, aren't used in the
16133 \begin_layout Standard
16134 On the other hand, you'll notice the following new environments:
16137 \begin_layout Itemize
16143 \begin_layout Itemize
16149 \begin_layout Itemize
16155 \begin_layout Itemize
16161 \begin_layout Itemize
16167 \begin_layout Standard
16168 These five are kind of quirky, due to a
16169 \begin_inset Quotes eld
16173 \begin_inset Quotes erd
16177 You see, LyX doesn't permit you to nest any other paragraph environment
16178 into an empty environment.
16179 Now, that's fine and dandy, but it means that you wouldn't be able to start
16180 a slide with anything except plain text.
16181 To deal with this, I've performed a little
16182 \begin_inset Quotes eld
16186 \begin_inset Quotes erd
16192 \begin_layout Subsubsection
16193 Quirks of the New Environments
16194 \begin_inset CommandInset label
16196 name "sec:slideQuirk"
16203 \begin_layout Standard
16204 All five of the new paragraph environments are somewhat quirky due to inherent
16205 limitiations in the current version of LyX.
16206 As I just mentioned, LyX forbids environments that begin with another environme
16208 To get around this, the
16212 environment isn't a paragraph environment as described in the
16220 \begin_layout Standard
16221 You should consider
16234 \begin_inset Quotes eld
16237 pseudo-environments.
16238 \begin_inset Quotes erd
16241 They look like a section heading or a
16242 \begin_inset Quotes eld
16250 \begin_inset Quotes erd
16253 but really begin a [and, if necessary, end the previous] paragraph environment.
16263 \begin_inset Quotes eld
16267 \begin_inset Quotes erd
16270 These two perform some action.
16273 \begin_layout Standard
16274 A common feature of all five environments,
16294 , is a rather long-ish label.
16295 The text following this label — ordinarily the contents of the paragraph
16296 environment — is utterly irrelevant for
16317 LyX completely ignores it.
16318 In fact, you can leave these five environments completely empty.
16322 \begin_layout Standard
16327 to put any text after the rather long-ish label, you might want to.
16328 This could be a short description of the contents of the
16333 In that case, enter your descriptive comment and hit
16337 as you normally would.
16340 \begin_layout Standard
16341 If, on the other hand, you don't want to enter any descriptive text, you'll
16342 hit another LyX quirk.
16343 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16344 environment until you put something in the old one.
16348 \begin_layout Itemize
16349 Start entering the text that will
16377 \begin_layout Itemize
16378 Now move to the beginning of that paragraph.
16382 \begin_layout Itemize
16391 \begin_layout Itemize
16392 Finally, change this new, empty paragraph to a
16416 \begin_layout Standard
16417 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16421 \begin_layout Subsection
16422 Making a Presentation with
16435 \begin_layout Subsubsection
16443 \begin_layout Standard
16444 If you're expecting this section to teach you how to actually make a presentatio
16445 n, you'll be sorely disappointed.
16446 Naturally, I'll describe all of the ways the
16450 class can assist you in preparing the materials for a presentation.
16451 Filling in the contents, however, is up to you.
16456 the LyX philosophy.]
16459 \begin_layout Standard
16464 environment [in the manner described in section
16465 \begin_inset space ~
16469 \begin_inset CommandInset ref
16471 reference "sec:slideQuirk"
16475 ] tells LyX to begin a new slide [duh].
16476 The label for this environment/
16477 \begin_inset Quotes erd
16481 \begin_inset Quotes erd
16485 \begin_inset Quotes eld
16489 \begin_inset Quotes erd
16492 in cool blue, followed by the label,
16493 \begin_inset Quotes eld
16497 \begin_inset Quotes erd
16501 Any text or paragraph environments that follow this one go on the new slide.
16505 \begin_layout Standard
16506 Slides are probably the only time you'll need to forcibly end pages in LyX
16507 (this can be specified in the
16512 In fact, you'll want to, once you finish entering the contents of one slide.
16513 If you've entered more text than can physically fit on a slide, the extra
16514 overflows onto a new slide.
16515 I don't recommend doing this, however, since the overflow slide won't have
16516 any page number on it.
16517 Furthermore, it may interfere with any
16521 you've made to accompany the oversized
16528 \begin_layout Standard
16537 environments work the same way as the
16542 They both create an
16543 \begin_inset Quotes eld
16547 \begin_inset Quotes erd
16550 followed by a label [
16551 \begin_inset Quotes eld
16555 \begin_inset Quotes erd
16559 \begin_inset Quotes eld
16563 \begin_inset Quotes erd
16567 The color is a stunning magenta instead of blue, and the
16568 \begin_inset Quotes eld
16572 \begin_inset Quotes erd
16575 will look different, in style and in length.
16576 The label fonts of all three also differ from one another.
16579 \begin_layout Standard
16584 , if the contents of a
16592 exceed the physical size of a slide or sheet of paper, the extra will overflow
16594 Again, you should avoid this.
16595 It defeats the whole purpose of
16606 \begin_layout Subsubsection
16616 \begin_layout Standard
16621 is a slide that sits atop another slide.
16622 Perhaps you wish to discuss a figure on the main
16626 before displaying the text associated with it.
16627 One way to accomplish this is tape a flap of dark paper over the part of
16632 you want to display later.
16633 This method fails, however, if you wish to overlap one graph with another,
16635 You would then have to fumble while speaking to align the two separate,
16640 s to align the two graphs.
16645 environment in both cases makes life much easier.
16648 \begin_layout Standard
16653 receives the page number of its
16654 \begin_inset Quotes eld
16658 \begin_inset Quotes erd
16666 \begin_inset Quotes eld
16674 \begin_inset Quotes erd
16681 \begin_layout Plain Layout
16682 Presumably, mutliple
16687 \begin_inset Quotes eld
16695 \begin_inset Quotes erd
16699 \begin_inset Quotes eld
16707 \begin_inset Quotes erd
16711 \begin_inset Quotes eld
16719 \begin_inset Quotes erd
16723 \begin_inset space ~
16726 appended to the page number of the parent
16736 Clearly, you want the contents of both the
16744 to each fit on a single physical slide! You should probably consider an
16750 \begin_inset Quotes eld
16754 \begin_inset Quotes erd
16766 class provides a visual cue for this: the label at the start of an
16770 is shorter than that at the start of a
16775 Lastly, when you generate printable output, you'll find alignment markers
16776 in all four corners of both the
16780 page and its parent
16785 These will assist you in lining up the two physical slides.
16788 \begin_layout Standard
16789 The major problem in overlaying two slides is aligning the contents of the
16790 two transparencies.
16791 How much space should you leave for that graph on the second slide? Worse
16792 still, what if you want a graph and a sentence on second slide, but there
16793 is text on the main transparency that goes in between them? You could try
16794 and insert vertical space of the right size.
16795 The better way is to use
16806 \begin_layout Standard
16807 As their names imply,
16815 are two command-like paragraph environments that make all subsequent text
16816 invisible and visible, respectively.
16818 \begin_inset space ~
16822 \begin_inset CommandInset ref
16824 reference "sec:slideQuirk"
16828 that you don't place anything
16832 these two environments, however.
16837 , it inserts a centered, sky-blue label into the page reading
16838 \begin_inset Quotes eld
16841 <Invisible Text Follows>
16842 \begin_inset Quotes erd
16846 For paragraphs following this label, the parts of the
16854 ; it doesn't matter which] where they would be contain instead blank space.
16858 \begin_layout Standard
16863 , the corresponding centered label is
16864 \begin_inset Quotes eld
16867 <Visible Text Follows>
16868 \begin_inset Quotes erd
16872 Paragraphs following this label behave normally.
16873 Note that the beginning of a new
16885 automatically shuts off an
16890 It's therefore not necessary to use
16901 \begin_layout Standard
16902 By now, it should be obvious how to create overlay transparencies using
16903 the proper combination of
16922 \begin_layout Enumerate
16927 , including everything that will appear on it, whether on the main slide
16935 \begin_layout Enumerate
16936 Before each figure or paragraph that will appear only on the
16945 If necessary, insert a
16949 environment after the
16956 \begin_layout Enumerate
16961 immediately following the
16968 \begin_layout Enumerate
16969 Copy the contents of this
16980 \begin_layout Enumerate
16985 , change all of the
16996 \begin_layout Standard
16998 You've just made an
17005 \begin_layout Standard
17006 There's one problem with the way I've designed the LyX
17010 class: you can't make text in the middle of a paragraph invisible, nor
17011 make text in the middle of an invisible paragraph visible again.
17012 To accomplish this feat, you'll need to use some inlined LaTeX codes.
17016 \begin_layout Plain Layout
17017 The commands of interest are:
17020 \begin_layout Itemize
17025 invisible \SpecialChar \ldots{}
17029 \begin_layout Itemize
17034 visible \SpecialChar \ldots{}
17038 \begin_layout Plain Layout
17039 \SpecialChar \ldots{}
17040 and need to be marked as TeX.
17042 \begin_inset Quotes eld
17046 \begin_inset Quotes erd
17049 you wish to change goes in between the brackets [and after the
17062 If you don't know how to mark text as TeX, see the appropriate section
17075 \begin_layout Subsubsection
17085 \begin_inset CommandInset label
17087 name "sec:slideNote"
17094 \begin_layout Standard
17103 is associated with a
17104 \begin_inset Quotes eld
17108 \begin_inset Quotes erd
17120 class provides visual cues.
17125 is shorter than that of a
17129 [yet longer than that of an
17133 ] and, like the label of an
17137 is shockingly magenta.
17138 Additionally, the printed
17142 has the page number of its
17143 \begin_inset Quotes eld
17147 \begin_inset Quotes erd
17155 \begin_inset Quotes eld
17163 \begin_inset Quotes erd
17167 \begin_inset Quotes eld
17175 \begin_inset Quotes erd
17179 \begin_inset Quotes eld
17187 \begin_inset Quotes erd
17191 You can have multiple
17195 s associated with a single
17207 , you'll probably want to break up long
17211 s so that they fit on a single sheet of paper.
17214 \begin_layout Standard
17219 is obvious: it contains anything additional you might want to say about
17225 It could also be used as a sheet of reminders for a particular
17230 In the case of the latter, you might want to make use of time markers.
17236 \begin_inset Quotes eld
17240 \begin_inset Quotes erd
17243 support for time markers, a
17248 So, you'll have to resort to using the LaTeX codes.
17251 \begin_layout Standard
17252 To use time markers, you'll need to specify the extra class option
17253 \begin_inset Quotes eld
17261 \begin_inset Quotes erd
17265 \begin_inset space ~
17269 \begin_inset CommandInset ref
17271 reference "sec:slidesetup"
17276 This option turns on timing marks, which will appear in the lower-left-hand
17282 To set what appears in the time marker, you use the LaTeX commands
17283 \begin_inset Quotes eld
17293 \begin_inset Quotes erd
17297 \begin_inset Quotes eld
17307 \begin_inset Quotes erd
17311 The arguments of both commands are time measured in seconds.
17313 \begin_inset Quotes eld
17323 \begin_inset Quotes erd
17326 sets the time marker to a given time.
17328 \begin_inset Quotes eld
17338 \begin_inset Quotes erd
17341 increments the time marker by the specified amount.
17342 Using time markers and
17346 s in this fashion, you can remind yourself how much time to spend on a particula
17354 \begin_layout Standard
17355 There's one last feature to describe.
17356 Clearly, you'd like to print out all of your
17364 s on transparencies while printing all of your
17381 with which it is associated.
17382 What's a person to do?
17385 \begin_layout Standard
17386 Luckily, there are two LaTeX commands that allow you to select what to print
17388 Both must be placed into the preamble of your document.
17390 \begin_inset Quotes eld
17402 \begin_inset Quotes erd
17405 will cause the output to contain only the
17414 Correspondingly, the command
17415 \begin_inset Quotes eld
17427 \begin_inset Quotes erd
17430 prevents the output of anything but
17435 I'd advise placing both commands in the preamble and initially comment
17437 You can then preview your entire presentation as you write.
17438 When you're done writing, you can then uncomment one of the two to select
17439 what you want to print.
17440 I like to uncomment
17441 \begin_inset Quotes eld
17453 \begin_inset Quotes erd
17456 , print to a file with
17457 \begin_inset Quotes eld
17465 \begin_inset Quotes erd
17468 in its name, comment it back out, then uncomment
17469 \begin_inset Quotes eld
17481 \begin_inset Quotes erd
17485 \begin_inset Quotes eld
17493 \begin_inset Quotes erd
17497 I can then send either file to a printer, loading transparencies or plain
17498 paper as appropriate.
17501 \begin_layout Standard
17502 You can also provide other arguments to the
17503 \begin_inset Quotes eld
17513 \begin_inset Quotes erd
17517 \begin_inset Quotes eld
17527 \begin_inset Quotes erd
17531 See a good LaTeX book for details.
17534 \begin_layout Subsection
17539 Class Template File
17542 \begin_layout Standard
17543 I have also provided a template file,
17544 \begin_inset Quotes eld
17552 \begin_inset Quotes erd
17560 To use it, begin your new presentation with
17565 ile\SpecialChar \menuseparator
17567 \begin_inset space ~
17571 \begin_inset space ~
17581 Your new LyX presentation file will contain an example
17602 additionally contain an example of the use of
17611 Lastly, the preamble will contain:
17614 \begin_layout LyX-Code
17615 % Uncomment to print out only slides and overlays
17618 \begin_layout LyX-Code
17622 \begin_layout LyX-Code
17628 \begin_inset Newline newline
17634 \begin_layout LyX-Code
17635 % Uncomment to print out only notes
17638 \begin_layout LyX-Code
17642 \begin_layout LyX-Code
17650 \begin_layout Standard
17651 One final thing: I created this class to support the LaTeX2e
17652 \begin_inset Quotes eld
17660 \begin_inset Quotes erd
17663 class, one of the built-in LaTeX2e classes.
17664 Neither I nor the rest of the LyX Team endorse or oppose the use of this
17665 built-in slide class.
17666 It's here if you want it or need it.
17667 There exist other LaTeX2e classes for creating presentations, such as the
17673 \begin_inset space ~
17677 \begin_inset CommandInset ref
17679 reference "sec:foiltex"
17684 \begin_inset Quotes eld
17692 \begin_inset Quotes erd
17695 package [present on some TeX distributions].
17696 The latter is not yet supported under LyX.
17700 \begin_layout Plain Layout
17701 Perhaps you can take on the task\SpecialChar \ldots{}
17707 I know nothing about these other classes.
17708 Try them out to see what sort of alternative they provide.
17711 \begin_layout Chapter
17712 LyX Features needing Extra Software
17715 \begin_layout Section
17719 \begin_layout Standard
17725 \begin_layout Subsection
17729 \begin_layout Standard
17738 \begin_layout Plain Layout
17743 is not yet available when you are using the LaTeX distribution MiKTeX.
17748 , you'll find in the
17755 \begin_inset space ~
17766 \begin_inset CommandInset href
17768 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17775 \begin_layout Standard
17780 package is a program that was written by
17781 \begin_inset Flex Noun
17784 \begin_layout Plain Layout
17786 \begin_inset space ~
17794 in frustration because some constructs in LaTeX are sometimes non-intuitive,
17795 and easy to forget.
17796 The program runs over your LaTeX file, checks the integrity of the file,
17797 and flags some common errors.
17798 In other technical words, it is
17805 \begin_layout Standard
17806 Well, what is a syntax checker doing in LyX which is supposed to produce
17807 correct LaTeX anyways? The answer is simple: Just as
17811 not only checks the
17815 of C programs, but also does
17819 checks for type-errors,
17823 catches some common
17827 errors, in addition to the syntactical ones.
17832 is capable of detecting several common errors, such as
17835 \begin_layout Itemize
17836 Ellipsis detection:
17837 \begin_inset Newline newline
17840 Use \SpecialChar \ldots{}
17844 \begin_layout Itemize
17845 No space in front of/after parenthesis:
17846 \begin_inset Newline newline
17852 \begin_layout Itemize
17853 Enforcement of normal space after common abbreviations:
17854 \begin_inset Newline newline
17858 \begin_inset space \thinspace{}
17862 \begin_inset space \space{}
17865 is too wide spacing.
17868 \begin_layout Itemize
17869 Enforcement of end-of-sentence space when the last sentence ends with a
17871 \begin_inset Newline newline
17875 And this is wrong spacing.
17878 \begin_layout Itemize
17879 Space in front of labels and similar commands:
17880 \begin_inset Newline newline
17883 The label should stick right up to the text to avoid falling to a wrong
17886 \begin_inset CommandInset label
17896 \begin_layout Plain Layout
17897 This footnote is in danger of falling off to a wrong page
17902 The label is separated too much.
17905 \begin_layout Itemize
17906 Space in front of references, instead of hard spaces:
17907 \begin_inset Newline newline
17910 In you are in bad luck, the text will break right between the referenced
17911 text and reference number, and that's a pity.
17913 \begin_inset CommandInset ref
17915 reference "sec:chktex"
17922 \begin_layout Itemize
17924 \begin_inset Quotes eld
17928 \begin_inset Quotes erd
17932 \begin_inset Formula $\times$
17936 \begin_inset Newline newline
17939 2x2 looks cheap compared to
17940 \begin_inset Formula $2\times2$
17946 \begin_layout Standard
17947 and more \SpecialChar \ldots{}
17948 It is an invaluable tool when you are
17949 \begin_inset Quotes eld
17953 \begin_inset Quotes erd
17956 your document before printing, and you should run it right after the obligatory
17957 spelling check, and before you go fine tuning the typesetting.
17960 \begin_layout Subsection
17964 \begin_layout Standard
17965 If you have the program installed, usage is as simple as choosing
17967 Tools\SpecialChar \menuseparator
17969 \begin_inset space ~
17975 This will make LyX generate a LaTeX file of your document, start
17979 to check it, and then make LyX insert
17980 \begin_inset Quotes eld
17984 \begin_inset Quotes erd
17987 with the warnings from
17991 , if there were any.
17992 The warnings will be placed close to the point of the mistake, and you
17993 can quickly find them by using the
17995 Navigate\SpecialChar \menuseparator
17998 menu item, or the shortcut key
18007 Open the error boxes by clicking on them with the mouse, or use the shortcut
18016 bindings, or the corresponding
18025 Read the warning and correct the mistake, if it is a mistake.
18026 If you have trouble understanding what the warning is about, you can safely
18028 Remember that there is a hidden layer between the document on screen and
18029 the technical details in invoking
18033 , and this gap can make some warnings seem arcane or just right down plain
18037 \begin_layout Standard
18038 This document is an excellent testing bed for the feature, and it should
18039 provide quite a few warnings for you to fiddle with.
18040 Since computers are only so smart, expect most of the warnings to be false
18044 \begin_layout Subsection
18045 How to fine tune it
18048 \begin_layout Standard
18049 Sometimes, you'll find that
18053 makes more noise than suits your mood.
18054 Then you can choose not to use it, wait until your mood changes, or try
18059 to get better along with you.
18060 Another choice in the most desperate situations is to use
18062 View\SpecialChar \menuseparator
18064 \begin_inset space ~
18068 \begin_inset space ~
18072 \begin_inset space ~
18077 , which will get rid of all warnings instantly.
18080 \begin_layout Standard
18089 very configurable and extensible, you shouldn't expect to solve all problems
18095 Since LyX has to generate a somewhat special LaTeX file to be able to match
18096 the line numbers from the
18104 \begin_layout Plain Layout
18105 You can inspect the specific output from
18111 Edit\SpecialChar \menuseparator
18113 \begin_inset space ~
18117 \begin_inset space ~
18131 to the internal document structure, some of the warnings will not seen
18132 to appear correctly.
18133 There are two things you can do about this:
18136 \begin_layout Itemize
18141 invocation command line in
18157 installation configuration file (usually with the file
18162 See below to learn what warnings can be enabled and disabled on the command
18167 \begin_layout Itemize
18168 Export your document as a raw LaTeX file using
18170 File\SpecialChar \menuseparator
18171 Export\SpecialChar \menuseparator
18179 Invoked in this way, it can be a hassle to find the corresponding place
18180 in the document inside LyX, but with a little patience, you should be able
18184 \begin_layout Standard
18185 Here follows the warning messages that can be enabled and disabled in
18194 to disable a warning, and
18198 to enable a warning.
18199 The emphasized entries are disabled by default, because the default is
18202 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18207 \begin_layout Standard
18208 Notice that you should only use the options that enable and disable warnings,
18209 because LyX relies on some of the other command line parameters to be set
18210 in a specific way to have a chance to communicate with
18217 \begin_layout Enumerate
18221 Command terminated with space.
18224 \begin_layout Enumerate
18227 Non-breaking space (
18228 \begin_inset Quotes eld
18236 \begin_inset Quotes erd
18239 ) should have been used.
18242 \begin_layout Enumerate
18246 You should enclose the previous parenthesis with
18247 \begin_inset Quotes eld
18255 \begin_inset Quotes erd
18261 \begin_layout Enumerate
18264 Italic correction (
18265 \begin_inset Quotes eld
18275 \begin_inset Quotes erd
18278 ) found in non-italic buffer.
18281 \begin_layout Enumerate
18284 Italic correction (
18285 \begin_inset Quotes eld
18295 \begin_inset Quotes erd
18298 ) found more than once.
18301 \begin_layout Enumerate
18305 No italic correction (
18306 \begin_inset Quotes eld
18316 \begin_inset Quotes erd
18322 \begin_layout Enumerate
18326 \begin_inset Quotes eld
18334 \begin_inset Quotes erd
18338 \begin_inset Quotes eld
18346 \begin_inset Quotes erd
18352 \begin_layout Enumerate
18355 Wrong length of dash may have been used.
18358 \begin_layout Enumerate
18362 \begin_inset Quotes eld
18370 \begin_inset Quotes erd
18374 \begin_inset Quotes eld
18382 \begin_inset Quotes erd
18388 \begin_layout Enumerate
18392 \begin_inset Quotes eld
18400 \begin_inset Quotes erd
18406 \begin_layout Enumerate
18410 \begin_inset Quotes eld
18418 \begin_inset Quotes erd
18421 to achieve an ellipsis.
18424 \begin_layout Enumerate
18427 Inter-word spacing (
18428 \begin_inset Quotes eld
18438 \begin_inset Quotes eld
18441 ) should perhaps be used.
18444 \begin_layout Enumerate
18447 Inter-sentence spacing (
18448 \begin_inset Quotes eld
18458 \begin_inset Quotes erd
18461 ) should perhaps be used.
18464 \begin_layout Enumerate
18467 Could not find argument for command.
18470 \begin_layout Enumerate
18474 \begin_inset Quotes eld
18482 \begin_inset Quotes erd
18488 \begin_layout Enumerate
18491 Math mode still on at end of LaTeX file.
18494 \begin_layout Enumerate
18498 \begin_inset Quotes eld
18506 \begin_inset Quotes erd
18509 doesn't match the number of
18510 \begin_inset Quotes eld
18518 \begin_inset Quotes erd
18524 \begin_layout Enumerate
18527 You should use either
18530 \begin_inset Quotes eld
18538 \begin_inset Quotes erd
18543 as an alternative to
18544 \begin_inset Quotes eld
18552 \begin_inset Quotes erd
18558 \begin_layout Enumerate
18565 " (ASCII 39) instead of "
18572 \begin_layout Enumerate
18575 User-specified pattern found.
18578 \begin_layout Enumerate
18581 This command might not be intended.
18584 \begin_layout Enumerate
18591 \begin_layout Enumerate
18609 \begin_layout Enumerate
18612 Delete this space to maintain correct page references.
18615 \begin_layout Enumerate
18619 You might wish to put this between a pair of
18620 \begin_inset Quotes eld
18628 \begin_inset Quotes erd
18634 \begin_layout Enumerate
18637 You ought to remove spaces in front of punctuation.
18640 \begin_layout Enumerate
18643 Could not execute LaTeX command.
18646 \begin_layout Enumerate
18655 in front of small punctuation.
18658 \begin_layout Enumerate
18666 may look prettier here.
18669 \begin_layout Enumerate
18673 Multiple spaces detected in output.
18676 \begin_layout Enumerate
18679 This text may be ignored.
18682 \begin_layout Enumerate
18688 \begin_inset Quotes eld
18693 to begin quotation, not
18700 \begin_layout Enumerate
18707 to end quotation, not
18710 \begin_inset Quotes eld
18718 \begin_layout Enumerate
18724 \begin_layout Enumerate
18727 You should perhaps use
18728 \begin_inset Quotes eld
18736 \begin_inset Quotes erd
18742 \begin_layout Enumerate
18745 You should put a space in front of/after parenthesis.
18748 \begin_layout Enumerate
18751 You should avoid spaces in front of/after parenthesis.
18754 \begin_layout Enumerate
18758 You should not use punctuation in front of/after quotes.
18761 \begin_layout Enumerate
18764 Double space found.
18767 \begin_layout Enumerate
18770 You should put punctuation outside inner/inside display math mode.
18773 \begin_layout Enumerate
18776 You ought to not use primitive TeX in LaTeX code.
18779 \begin_layout Enumerate
18782 You should remove spaces in front of
18783 \begin_inset Quotes eld
18791 \begin_inset Quotes erd
18797 \begin_layout Enumerate
18800 \begin_inset Quotes eld
18808 \begin_inset Quotes erd
18811 is normally not followed by
18812 \begin_inset Quotes eld
18820 \begin_inset Quotes erd
18826 \begin_layout Standard
18827 In later versions of LyX, we hope to provide a more complete interface to
18828 this tool (and it's smaller cousin
18832 ) to exploit the full power of it.
18833 But it's not exactly useless as it is now: go try it on one of your existing
18834 documents of a certain length and be surprised.
18837 \begin_layout Section
18838 Version Control in LyX
18841 \begin_layout Standard
18844 Lars Gullik Bjønnes
18851 \begin_layout Subsection
18855 \begin_layout Standard
18856 A friend of mine wanted to try LyX for a group project.
18857 When he didn't find support for version control or file locking, he dropped
18859 This angered me a bit, so I thought that I should at least make support
18860 for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
18861 This has been done.
18862 LyX now supports some of the most basic RCS/CVS/SVN commands.
18863 If you need something a bit more sophisticated you will have to do that
18864 manually in a terminal.
18867 \begin_layout Standard
18868 Before you begin to use the version control features in LyX, you should
18869 be familiar with RCS/CVS/SVN usage before start using it under LyX.
18870 Also note that CVS support
18871 \change_deleted 3 1288125350
18873 \change_inserted 3 1288125359
18875 \change_deleted 3 1288125367
18876 obsoloted by introducing
18878 subversion support so we advice using SVN instead.
18879 Good place to start with Subversion is SVN Book
18883 \begin_layout Plain Layout
18884 \begin_inset CommandInset href
18886 target "http://svnbook.red-bean.com/"
18896 In case of RCS you should read
18897 \begin_inset Quotes eld
18901 \begin_inset Quotes erd
18904 (a man file, read it with
18909 This file describes all the basic features of RCS.
18910 You should especially notice the comment about a RCS directory, and the
18911 notion of a master RCS file (the file ending in
18918 \begin_layout Standard
18919 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18920 package—no guarantees are made for older versions.
18921 Most of the log messages are not currently displayed after operations
18922 \change_deleted 3 1288125419
18924 \change_inserted 3 1288125419
18927 you can check them in Messages pane if unsure.
18930 \begin_layout Standard
18931 For introducing your own external commands consult vc-command in the manual
18935 \begin_layout Subsection
18936 RCS commands in LyX
18939 \begin_layout Standard
18940 The following sections describe the RCS commands supported by LyX.
18941 You can find them in the
18943 File\SpecialChar \menuseparator
18945 \begin_inset space ~
18951 LyX was tested against RCS 5.7.
18954 \begin_layout Subsubsection
18960 \begin_layout Standard
18961 If your document is not under revision control, this is the only item shown
18963 And if it is under revision control, the
18967 item is not visible.
18971 \begin_layout Standard
18972 This command registers your document with RCS (unless you are under the
18973 directory managed by CVS)\SpecialChar \@.
18974 You are asked interactively to supply an initial
18975 description of the document.
18976 The document is now set in Read-Only mode and you have to
18979 \begin_inset space ~
18983 \begin_inset space ~
18987 \begin_inset space ~
18992 , before making any changes to it.
18993 A document under revision control has a
18994 \begin_inset Quotes eld
18997 [RCS:<version> <locker>]
18998 \begin_inset Quotes erd
19001 item tagged to the filename in the minibuffer.
19004 \begin_layout Standard
19005 RCS command that is run:
19007 ci -q -u -i -t-"<initial description>" <file-name>
19010 \begin_layout Standard
19015 to understand the switches.
19019 \begin_layout Subsubsection
19025 \begin_layout Standard
19026 When you are finished editing a file, you check in your changes.
19027 When you do this, you are asked for a description of the changes.
19028 This is stored in the history log.
19029 The version number is bumped, your changes are applied to the master RCS
19030 file, the document is unlocked and set to Read-Only mode.
19034 \begin_layout Standard
19037 ci -q -u -m"<description>" <file-name>
19040 \begin_layout Subsubsection
19046 \begin_layout Standard
19047 By doing this you lock the document so that only you can edit it.
19048 This will also make the document Read-Write only for you.
19049 You will usually continue editing for a while and when you are finished
19050 you check in your changes.
19051 The status line is changed to reflect that you have locked the file.
19055 \begin_layout Standard
19058 co -q -l <file-name>
19061 \begin_layout Subsubsection
19064 Revert To Repository Version
19067 \begin_layout Standard
19068 This will discard all changes made to the document since the last check
19070 You get a warning before changes are discarded.
19073 \begin_layout Standard
19076 co -f -u<version> <file-name>
19079 \begin_layout Subsubsection
19085 \begin_layout Standard
19086 This makes as if the last check in never happened.
19087 No changes are made to the document loaded into LyX, but the last version
19088 is removed from the master RCS file.
19092 \begin_layout Standard
19095 rcs -o<version> <file-name>
19098 \begin_layout Subsubsection
19104 \begin_layout Standard
19105 This shows the complete history of the RCS document.
19110 is shown in a browser.
19118 \begin_layout Subsubsection
19122 \begin_layout Standard
19123 LyX supports RCS version number information (only), see
19124 \begin_inset CommandInset ref
19126 reference "sub:VCS-Revision-Information"
19133 \begin_layout Subsection
19134 CVS commands in LyX
19137 \begin_layout Standard
19139 \change_inserted 3 1288247612
19143 \change_inserted 3 1288247626
19147 \change_deleted 3 1288243981
19151 You can find the commands in the
19153 File\SpecialChar \menuseparator
19155 \begin_inset space ~
19162 \change_inserted 3 1288244251
19163 The version control system SVN is more powerful
19164 \change_deleted 3 1288244024
19165 Focus of the development moved to SVN support
19167 , so please use it instead of CVS if possible.
19170 \begin_layout Subsubsection
19172 \change_inserted 3 1288247508
19178 \begin_layout Standard
19180 \change_inserted 3 1288250722
19181 If you start from scratch with CVS you have to create your repository and
19182 checkout the working copy with external tools.
19183 If you're using a client-server setup you may need to login before doing
19184 the first repository checkout.
19187 \begin_layout Standard
19189 \change_inserted 3 1288334713
19190 If your documents are under revision control and others are using the same
19191 repository problems arise when different changes to the same document at
19192 the same location happen.
19193 Standard CVS repositories doesn't operate with a file locking mechanism.
19194 This may be surprising, but conflicts only occur if people disagree on
19195 the proper content of the same part of a document.
19196 So, if co-workers are used to communicate regularly, these conflicts occur
19198 If they don't communicate they have a fundamental problem anyway.
19199 Nevertheless some people like to work with so called
19200 \begin_inset Quotes eld
19204 \begin_inset Quotes erd
19208 If they do so the working copy of all files is readonly when checked out
19209 first and the user starts editing after using a special command to make
19210 the working copy writable.
19211 When the changes are checked in the working copy returns to readonly state.
19212 With LyX one has to edit the
19213 \begin_inset Flex Code
19216 \begin_layout Plain Layout
19218 \change_inserted 3 1288249115
19226 file and add the line
19227 \begin_inset Flex Code
19230 \begin_layout Plain Layout
19232 \change_inserted 3 1288249133
19240 to work with reserved checkouts.
19241 The benefit is the possibility to see who is using a writable copy of some
19243 It's not guaranteed only one user makes a copy writable.
19246 \begin_layout Standard
19248 \change_inserted 3 1288335184
19249 LyX tries to guess if you're using reserved or non-reserved checkouts.
19250 If your working copy is readonly or it is writable and an additional copy
19251 of your document exists in the CVS/Base sub-directory a reserved otherwise
19252 a non-reserved checkout is assumed.
19253 When a reserved checkout is detected you have to use
19254 \begin_inset Flex MenuItem
19257 \begin_layout Plain Layout
19259 \change_inserted 3 1288250009
19267 to make your working copy writable if it's readonly.
19269 \begin_inset Flex MenuItem
19272 \begin_layout Plain Layout
19274 \change_inserted 3 1288250087
19282 operation is possible and that makes your working copy readonly again after
19283 transferring your changes to the repository.
19288 \begin_layout Standard
19290 \change_inserted 3 1288334864
19291 More information about CVS can be found here
19292 \begin_inset Flex URL
19295 \begin_layout Plain Layout
19297 \change_inserted 3 1288247651
19299 http://www.nongnu.org/cvs
19305 \begin_inset Flex URL
19308 \begin_layout Plain Layout
19310 \change_inserted 3 1288249216
19312 http://ximbiot.com/cvs
19322 \begin_layout Standard
19324 \change_inserted 3 1288334912
19329 to understand the sub-commands and the switches mentioned below.
19332 \begin_layout Subsubsection
19338 \begin_layout Standard
19339 If your document is not under revision control, this is the only item shown
19341 And if it is under revision control, the
19348 item is not visible.
19352 \begin_layout Standard
19353 This command registers in CVS your document
19354 \change_deleted 3 1288340087
19356 \change_inserted 3 1288340119
19360 \begin_inset Flex Strong
19363 \begin_layout Plain Layout
19365 \change_inserted 3 1288340119
19379 in case you have already the documents directory under CVS control (in
19385 This means you have to
19386 \change_inserted 3 1288244315
19389 checkout the archive by yourself
19390 \change_inserted 3 1288250891
19391 using external tools
19395 \change_inserted 3 1288340303
19396 (In case you forget that step LyX registers the document with RCS.)
19401 \begin_layout Standard
19402 Then you are asked interactively to supply an initial description of the
19404 Don't forget that registered file is not yet
19405 \change_deleted 3 1288335206
19407 \change_inserted 3 1288335207
19413 \begin_layout Standard
19414 CVS command that is run:
19417 \change_deleted 3 1288125821
19419 \begin_inset Quotes erd
19423 \change_inserted 3 1288125838
19427 \change_deleted 3 1288125821
19429 \begin_inset Quotes eld
19433 \change_inserted 3 1288125844
19437 \change_deleted 3 1288125847
19439 \begin_inset Quotes erd
19443 \change_inserted 3 1288125847
19449 \begin_layout Standard
19451 \change_deleted 3 1288334858
19456 to understand the switches.
19457 \change_inserted 3 1288333847
19461 \begin_layout Standard
19463 \change_inserted 3 1288334097
19468 above and for all other CVS commands is an abbreviation for
19469 \begin_inset Quotes eld
19472 change the current working directory to file location and use the file name
19473 without path component as argument
19474 \begin_inset Quotes erd
19479 \change_deleted 3 1288333847
19485 \begin_layout Subsubsection
19491 \begin_layout Standard
19492 When you are finished editing a file, you commit your changes.
19494 \change_inserted 3 1288250244
19495 and you had changed the document
19497 , you are asked for a description of the changes.
19498 After that changes are
19499 \change_deleted 3 1288335277
19501 \change_inserted 3 1288335294
19502 written to the repository
19506 \change_inserted 3 1288339925
19507 In case you didn't change the document and a reserved checkout is detected
19508 the reservation made on
19509 \begin_inset Flex MenuItem
19512 \begin_layout Plain Layout
19514 \change_inserted 3 1288250359
19527 \begin_layout Labeling
19528 \labelwidthstring 00.00.0000
19530 \change_inserted 3 1288250487
19532 \begin_inset space ~
19536 \begin_inset space ~
19540 \begin_inset Newline newline
19544 \begin_inset Flex Code
19547 \begin_layout Plain Layout
19549 \change_inserted 3 1288250469
19552 -q commit -m"<description>" "<file-name>"
19558 \begin_inset Newline newline
19562 \begin_inset Flex Code
19565 \begin_layout Plain Layout
19567 \change_inserted 3 1288250960
19578 \change_deleted 3 1288250529
19581 cvs -q commit -m"<description>" "<file-name>"
19586 \begin_layout Subsubsection
19588 \change_inserted 3 1288246619
19594 \begin_layout Standard
19596 \change_inserted 3 1288249364
19597 When you are sharing a repository with others, you may have to incorporate
19598 their changes into your working copy.
19601 \begin_layout Standard
19603 \change_inserted 3 1288250585
19606 cvs -q update "<file-name>"
19609 \begin_layout Standard
19611 \change_inserted 3 1288334180
19612 If a readonly checkout is detected the working copy is made writable and
19616 \begin_layout Standard
19618 \change_inserted 3 1288250685
19621 cvs -q edit "<file-name>"
19624 \begin_layout Subsubsection
19627 Revert To Repository Version
19630 \begin_layout Standard
19631 This will discard all changes made to the document since the last check
19633 You get a warning before changes are discarded.
19634 Firstly the file is deleted, secondly CVS update command is run.
19637 \begin_layout Standard
19641 \change_inserted 3 1288246762
19645 \change_deleted 3 1288125856
19647 \begin_inset Quotes eld
19651 \change_inserted 3 1288125856
19655 \change_deleted 3 1288125856
19657 \begin_inset Quotes erd
19661 \change_inserted 3 1288251381
19665 \begin_layout Standard
19667 \change_inserted 3 1288334211
19668 If a reserved checkout is detected and the working copy has no changes only
19669 the reservation is undone.
19672 \begin_layout Standard
19674 \change_inserted 3 1288251440
19677 cvs -q unedit "<file-name>"
19682 \begin_layout Subsubsection
19684 \change_inserted 3 1288126016
19685 Update of the local directory checkout from repository
19688 \begin_layout Standard
19690 \change_inserted 3 1288339359
19691 Once your documents gets more complex, containing sub-documents and pictures,
19693 \begin_inset Flex Code
19696 \begin_layout Plain Layout
19698 \change_inserted 3 1288126016
19704 files and so on using version control becomes more complicated.
19705 LyX supports updating the whole tree in which resides the document.
19706 This become especially useful once you cooperate with people which neither
19707 have detailed knowledge about CVS usage nor they have ambition to commit
19708 additional material to the repository.
19709 You have to organize the files structure so that all external files are
19710 in the same directory or subdirectories of the document.
19711 It's good practice anyway to store multipart documents in an extra directory.
19716 \begin_layout Standard
19718 \change_inserted 3 1288341358
19720 \begin_inset Flex Code
19723 \begin_layout Plain Layout
19725 \change_inserted 3 1288126016
19726 Update local directory from repository
19731 command updates the whole directory.
19732 If local changes are detected user is warned before update starts.
19733 In case of merge conflicts both versions of the conflicting document parts
19734 are placed in the final document.
19735 You have to review and correct the result of the merge.
19736 You'll find the conflicts enclosed in pairs of
19737 \begin_inset Flex Code
19740 \begin_layout Plain Layout
19742 \change_inserted 3 1288341002
19751 \begin_inset Flex Code
19754 \begin_layout Plain Layout
19756 \change_inserted 3 1288340987
19765 \begin_inset Flex Code
19768 \begin_layout Plain Layout
19770 \change_inserted 3 1288341043
19779 The first part is your version as before the update operation with the
19780 document name prepended.
19781 The second one is the repository version with the version number after
19783 \begin_inset Flex Code
19786 \begin_layout Plain Layout
19788 \change_inserted 3 1288341281
19801 \begin_layout Labeling
19802 \labelwidthstring 00.00.0000
19804 \change_inserted 3 1288340598
19806 \begin_inset space ~
19810 \begin_inset space ~
19814 \begin_inset Newline newline
19818 \begin_inset Flex Code
19821 \begin_layout Plain Layout
19823 \change_inserted 3 1288334066
19833 (Ask if changes are detected.)
19834 \begin_inset Newline newline
19838 \begin_inset Flex Code
19841 \begin_layout Plain Layout
19843 \change_inserted 3 1288334063
19844 cd $path; cvs -q update
19856 \begin_layout Standard
19858 \change_inserted 3 1288126016
19860 \begin_inset Flex Code
19863 \begin_layout Plain Layout
19865 \change_inserted 3 1288126016
19871 stands for the path to the document.
19874 \begin_layout Subsubsection
19880 \begin_layout Standard
19881 This shows the complete history of the CVS document.
19885 \change_deleted 3 1288125861
19887 \begin_inset Quotes eld
19891 \change_inserted 3 1288125861
19895 \change_deleted 3 1288125864
19897 \begin_inset Quotes erd
19901 \change_inserted 3 1288125864
19906 is shown in a browser.
19909 \begin_layout Subsection
19910 SVN commands in LyX
19913 \begin_layout Standard
19914 SVN is now partially supported by LyX.
19915 You can find the commands in the
19917 File\SpecialChar \menuseparator
19919 \begin_inset space ~
19925 Please note that if you use password protected access to repository via
19926 ssh, you will be asked in terminal window.
19927 LyX was tested against SVN 1.5 and 1.6
19931 \begin_layout Plain Layout
19932 Most of the commands will work with 1.4 too, see
19933 \begin_inset CommandInset ref
19935 reference "sub:SVN-Repo-Update"
19947 \begin_layout Subsubsection
19953 \begin_layout Standard
19954 If your document is not under revision control, this is the only item shown
19956 And if it is under revision control, the
19963 item is not visible.
19967 \begin_layout Standard
19968 This command registers in SVN your document ONLY in case you have already
19969 the documents directory under SVN control (in particular
19974 This means you have to checkout the archive by yourself.
19978 \begin_layout Standard
19979 Then you are asked interactively to supply an initial description of the
19981 Don't forget that registered file is not yet commited.
19984 \begin_layout Standard
19985 SVN command that is run:
19988 \begin_inset Quotes eld
19992 \begin_inset Quotes erd
19998 \begin_layout Standard
20003 to understand the switches.
20007 \begin_layout Subsubsection
20013 \begin_layout Standard
20014 When you are finished editing a file, you commit your changes.
20015 When you do this, you are asked for a description of the changes.
20016 After that changes are commited.
20019 \begin_layout Standard
20024 \begin_layout Plain Layout
20025 In case locking is not enabled.
20027 \begin_inset CommandInset ref
20029 reference "subsec:SVN-File-Locking"
20040 svn commit -q -m"<description>" <file-name>
20043 \begin_layout Subsubsection
20049 \begin_layout Standard
20050 Updates the changes of this file from the repository.
20051 Be sure you understand SVN merging and conflicts resolving before using
20052 this function, because all conflicts has to be resolved manually by you!
20055 \begin_layout Standard
20060 \begin_layout Plain Layout
20068 svn update --non-interactive
20069 \begin_inset Quotes eld
20073 \begin_inset Quotes erd
20079 \begin_layout Subsubsection
20082 Revert To Repository Version
20085 \begin_layout Standard
20086 This will discard all changes made to the document since the last check
20088 You get a warning before changes are discarded.
20092 \begin_layout Standard
20096 \begin_inset Quotes eld
20100 \begin_inset Quotes erd
20106 \begin_layout Subsubsection
20107 \begin_inset CommandInset label
20109 name "sub:SVN-Repo-Update"
20113 Update of the local directory checkout from repository
20117 \begin_layout Plain Layout
20118 Note that this command will work only with subversion
20119 \begin_inset Formula $\geqq1.5$
20130 \begin_layout Standard
20131 All the commands above have one shortcomming - they deal with the current
20133 Once your document contains pictures, includes external
20134 \begin_inset Flex Code
20137 \begin_layout Plain Layout
20143 files and so on administration becomes more complicated.
20144 LyX now supports updating the whole tree in which resides the document
20148 \begin_layout Plain Layout
20149 One need to organize the files structure so that all external files are
20150 in the same directory or subdirectories of the document.
20157 This become especially useful once you cooperate with people which neither
20158 know about subversion management nor they have ambition to commit additional
20159 material to the repository.
20163 \begin_layout Standard
20164 \begin_inset Flex Code
20167 \begin_layout Plain Layout
20168 Update local directory from repository
20173 command updates the whole directory and in case of merge conflicts local
20174 version of the files are left, so no unintended data loss occurs.
20175 If local changes are detected user is warned before update starts.
20178 \begin_layout Labeling
20179 \labelwidthstring 00.00.0000
20181 \begin_inset space ~
20185 \begin_inset space ~
20189 \begin_inset Newline newline
20193 \begin_inset Flex Code
20196 \begin_layout Plain Layout
20202 (Ask if changes are detected.)
20203 \begin_inset Newline newline
20207 \begin_inset Flex Code
20210 \begin_layout Plain Layout
20211 svn update --accept mine-full $path
20219 \begin_layout Standard
20221 \begin_inset Flex Code
20224 \begin_layout Plain Layout
20230 stands for the path to the document.
20233 \begin_layout Subsubsection
20239 \begin_layout Standard
20240 This shows the complete history of the SVN document.
20244 \begin_inset Quotes eld
20248 \begin_inset Quotes erd
20253 is shown in a browser.
20256 \begin_layout Subsubsection
20258 \begin_inset CommandInset label
20260 name "subsec:SVN-File-Locking"
20267 \begin_layout Standard
20268 The file exchange through various revision control systems brings the problem
20269 of merge conflicts in case two different users try to edit the same (parts
20271 When such a conflict happens it needs manual resolving and one reasonable
20272 alternative is to provide some kind of locking mechanism, which guarantees
20273 that only one user is allowed to edit file at the given time.
20276 \begin_layout Standard
20277 SVN has two such mechanisms to provide mutual exclusivity for file access
20278 - locks and automatic setting of write permissions (see sec.
20280 \begin_inset CommandInset ref
20282 reference "subsec:Automatical-Locking-Property"
20287 \begin_inset Flex Code
20290 \begin_layout Plain Layout
20300 \begin_layout Plain Layout
20301 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20307 If this property is detected for a given document LyX starts to use SVN
20308 locks for document editing automatically and the whole check-in/out mechanism
20309 switches to the same regimen as for RCS.
20310 This in particular means there are two different modes of file use in LyX:
20313 \begin_layout Itemize
20315 The loaded file is in the read-only mode.
20316 For editing on needs to check-out.
20321 consists of updating from the repository and gaining write lock.
20322 If the lock is not possible to obtain, we remain in unlocked state.
20325 \begin_layout Itemize
20327 The loaded file is in the 'normal' edit mode.
20328 No other user is allowed to edit the file.
20333 consists of commiting changes and releasing write-lock.
20334 If no changes have been made to the document, no commit will be produced
20338 \begin_layout Plain Layout
20339 Don't be puzzled by the fact that you will be asked for commit message anyway.
20344 and only the write-lock will be released.
20347 \begin_layout Standard
20351 \begin_layout Labeling
20352 \labelwidthstring 00.00.0000
20355 svn commit -q -m"<description>" "<file-name>"
20356 \begin_inset Newline newline
20359 svn unlock "<file-name>"
20362 \begin_layout Labeling
20363 \labelwidthstring 00.00.0000
20366 svn update "<file-name>"
20367 \begin_inset Newline newline
20370 svn lock "<file-name>"
20373 \begin_layout Subsubsection
20376 \begin_inset CommandInset label
20378 name "subsec:Automatical-Locking-Property"
20384 Automatic Locking Property
20387 \begin_layout Standard
20388 The above mentioned automatic setting of write permissions of the .lyx file
20394 ile\SpecialChar \menuseparator
20400 \begin_inset space ~
20403 Control\SpecialChar \menuseparator
20408 oggle locking property
20411 This command is active only when the file is not locked on the svn server
20413 you need to check-out before proceeding).
20416 \begin_layout Labeling
20417 \labelwidthstring 00.00.0000
20419 \begin_inset space ~
20425 \begin_layout Labeling
20426 \labelwidthstring 00.00.0000
20429 svn propset svn:needs-lock ON "<file-name>"
20432 \begin_layout Labeling
20433 \labelwidthstring 00.00.0000
20436 svn propdel svn:needs-lock "<file-name>"
20439 \begin_layout Subsubsection
20440 \begin_inset CommandInset label
20442 name "sub:VCS-Revision-Information"
20446 Revision Information in Documents
20449 \begin_layout Standard
20450 There are more possibilities how to activate revision information in our
20454 \begin_layout Itemize
20455 LyX supports directly:
20459 \begin_layout Itemize
20460 tree revision information (
20461 \begin_inset Flex Code
20464 \begin_layout Plain Layout
20471 The result is the output of the
20472 \begin_inset Flex Code
20475 \begin_layout Plain Layout
20481 command, the following table gives you an idea, how to read the results.
20484 \begin_layout Standard
20486 \begin_inset Tabular
20487 <lyxtabular version="3" rows="6" columns="2">
20488 <features tabularvalignment="middle">
20489 <column alignment="center" valignment="top" width="0">
20490 <column alignment="center" valignment="top" width="0">
20492 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20495 \begin_layout Plain Layout
20501 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20504 \begin_layout Plain Layout
20512 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20515 \begin_layout Plain Layout
20521 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20524 \begin_layout Plain Layout
20525 mixed revision working copy
20532 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20535 \begin_layout Plain Layout
20541 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20544 \begin_layout Plain Layout
20545 modified working copy
20552 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20555 \begin_layout Plain Layout
20561 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20564 \begin_layout Plain Layout
20565 switched working copy
20572 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20575 \begin_layout Plain Layout
20581 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20584 \begin_layout Plain Layout
20585 partial working copy, from a sparse checkout
20592 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20595 \begin_layout Plain Layout
20601 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20604 \begin_layout Plain Layout
20605 mixed revision, modified, switched working copy
20618 \begin_layout Itemize
20619 file revision information.
20620 The result comes from parsing the output of
20621 \begin_inset Flex Code
20624 \begin_layout Plain Layout
20626 \begin_inset space ~
20630 \begin_inset space ~
20634 \begin_inset space ~
20643 Supported flags are:
20647 \begin_layout Itemize
20648 version number of the last commit (
20649 \begin_inset Flex Code
20652 \begin_layout Plain Layout
20661 \begin_layout Itemize
20662 author of the last commit (
20663 \begin_inset Flex Code
20666 \begin_layout Plain Layout
20675 \begin_layout Itemize
20676 date of the last commit (
20677 \begin_inset Flex Code
20680 \begin_layout Plain Layout
20689 \begin_layout Itemize
20690 time of the last commit (
20691 \begin_inset Flex Code
20694 \begin_layout Plain Layout
20704 \begin_layout Standard
20705 You can obtain this info via InsetInfo (e.g.
20707 \begin_inset Flex Code
20710 \begin_layout Plain Layout
20711 info-insert buffer vcs-date
20717 The information will be available only when you have the file stored under
20718 svn managment (i.e.
20720 \begin_inset Flex Code
20723 \begin_layout Plain Layout
20729 directory is available with your document).
20733 \begin_layout Itemize
20734 Another---a hacking one---possibility is to use svn keywords
20738 \begin_layout Plain Layout
20739 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20745 In short -- you set file keywords property (e.g.
20748 svn propset svn:keywords 'Rev' file.lyx
20750 ) and then paste keyword ERT
20754 \begin_layout Plain Layout
20755 This is an easy way how to ensure that LyX won't break the line in the middle
20761 tag in your document (e.g.
20766 \begin_layout Plain Layout
20774 This way svn client will automatically substitute revision number (e.g.
20779 \begin_layout Plain Layout
20786 ) after each update and commit.
20787 There are more problems with this approach.
20788 Firstly, the '$' character is used in TeX world for math equations, so
20789 any occurence of math formula
20790 \begin_inset Formula $Rev$
20794 \begin_inset Formula $Rev:59$
20797 in your LyX document.
20798 Similarly for other keywords like Id, Date, Author, etc.
20799 Secondly svn output is dependent on your locales, so its very easy that
20800 svn would produce some problematic strings once Date is used.
20801 Thirdly you get the whole 'Rev: 59' string in your document instead of
20803 Until subversion implements user's custom keywords it will be hard to use
20804 this approach reliably or let LyX to support it directly.
20807 \begin_layout Subsection
20808 SVN and Windows Environment
20811 \begin_layout Quote
20812 My inclination is to say that if the user cannot figure out the command
20813 line operations on their own fairly quickly, they would be well advised
20814 to use TortoiseSVN.
20820 \begin_layout Subsubsection
20824 \begin_layout Standard
20825 In addition to installing LyX, and having access to a Subversion repository,
20826 the user will need to install the Subversion client program.
20827 A Windows installer for the client program is available from
20828 \begin_inset CommandInset href
20831 target "http://www.collab.net/nonav/downloads/subversion/"
20836 The user may also want to install
20837 \begin_inset CommandInset href
20840 target "http://tortoisesvn.tigris.org/"
20844 , which integrates Subversion operations into the context (rightclick) menu
20845 of Windows Explorer.
20846 Operations done outside LyX will typically be more convenient using the
20847 Explorer context menu.
20848 Note that TortoiseSVN is not a replacement for the client program, which
20849 is what LyX itself will use.
20852 \begin_layout Subsubsection
20853 Bringing a document under Subversion control
20856 \begin_layout Standard
20857 Before a LyX document can be brought under version control in Subversion,
20858 its parent directory needs to be under version control.
20859 If the document is being added to a project already in the repository,
20860 this is accomplished by checking the project out to the directory where
20861 the new document will be placed.
20862 If the project itself is not yet under version control (for instance, if
20863 this document starts a new project), the directory must be imported into
20865 This is done outside LyX.
20866 Both import and checkout are easily accomplished from the Explorer context
20867 menu using TortoiseSVN, or alternatively can be done using the command
20868 line client at a DOS prompt.
20869 The procedure for importing the project using TortoiseSVN is described
20870 below, assuming an existing repository and a new project being started
20878 For information on using the Subversion client program, run
20885 \begin_layout Enumerate
20892 in Windows Explorer, right click it, and select
20894 TortoiseSVN > Repo-browser
20897 If necessary, adjust the URL for the repository, then click OK.
20900 \begin_layout Enumerate
20901 Right click the level of the repository under which you want to place the
20902 new project folder (typically the top level) and click
20904 Create folder\SpecialChar \ldots{}
20907 Supply a name for the project folder and click OK.
20908 Add a message for the log file if desired, then click OK again.
20909 The new project folder should appear in the repository.
20910 Finally, click OK again to exit the repository browser.
20913 \begin_layout Enumerate
20914 Once again right click
20920 , this time selecting SVN Checkout\SpecialChar \ldots{}
20921 Select the URL of the project folder
20922 you just created in the repository, and set the checkout directory to
20930 You will be warned about a non-empty folder; click OK to proceed.
20931 You should now have a
20942 \begin_layout Enumerate
20943 Create or open your document in LyX and click
20948 ile\SpecialChar \menuseparator
20954 \begin_inset space ~
20957 Control\SpecialChar \menuseparator
20965 Add a log message and click OK to commit the document to version control.
20968 \begin_layout Standard
20969 From this point onward, you should have full functionality in the
20974 ile\SpecialChar \menuseparator
20980 \begin_inset space ~
20986 You also have the option of checking the document in and out, viewing its
20988 using the TortoiseSVN context menu in Windows Explorer or the Subversion
20989 client program from a command prompt.
20992 \begin_layout Subsubsection
20994 \change_inserted 3 1288376976
20997 nel used with SVN under Windows
21000 \begin_layout Standard
21001 Compared with Linux setting up svn client to communicate over ssh under
21002 Windows is a rather troublesome task.
21003 We will at least offer some hints how to setup the client side but prior
21004 knowledge about ssh and the Windows command line is needed, also be prepared
21005 for a great deal of frustration\SpecialChar \ldots{}
21009 \begin_layout Enumerate
21010 Get a svn client for windows, as described in the previous sections.
21011 When it is a fresh install run some svn command (e.g.
21013 \begin_inset Flex Code
21016 \begin_layout Plain Layout
21022 ) to create config files, which you will need to change later on.
21025 \begin_layout Enumerate
21026 Choose a ssh client for Windows.
21027 There are several possibilities, we will use the one from Putty tools
21031 \begin_layout Plain Layout
21032 \begin_inset Flex URL
21035 \begin_layout Plain Layout
21037 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
21048 You will need to set the connection up so that the client doesn't ask for
21049 any password from you.
21050 To keep things easy we will use only keys without any additional password
21055 \begin_layout Enumerate
21057 \begin_inset Flex Code
21060 \begin_layout Plain Layout
21067 Save your private .ppk key file and put the public one on the server side.
21068 If the SVN server runs on Linux, note that the format of the public key
21069 is not compatible with Linux openssh and you will need to direcly copy-paste
21072 Public key for pasting into OpenSSH authorized_keys file
21074 :” edit field into the server's
21075 \begin_inset Flex Code
21078 \begin_layout Plain Layout
21079 ~/.ssh/authorized_keys
21085 \begin_inset Flex Code
21088 \begin_layout Plain Layout
21097 \begin_layout Enumerate
21099 \begin_inset Flex Code
21102 \begin_layout Plain Layout
21109 In the SVN config file
21113 \begin_layout Plain Layout
21114 Exact path depends on Windows version, usually somewhere around
21115 \begin_inset Flex Code
21118 \begin_layout Plain Layout
21121 Documents and Settings
21135 \begin_inset Flex Code
21138 \begin_layout Plain Layout
21153 , section [tunnels], setup ssh command, e.g.
21155 \begin_inset Flex Code
21158 \begin_layout Plain Layout
21159 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
21168 \begin_layout Plain Layout
21169 It will usually take a lot of time to get exact command right and it depends
21171 For example do not have some remote server saved as a default session in
21173 If things fail, try to connect via plink without SVN first.
21182 \begin_layout Enumerate
21183 Checkout the SVN archive, e.g.
21185 \begin_inset Flex Code
21188 \begin_layout Plain Layout
21189 svn co svn+ssh://user@server/repository_path
21197 \begin_layout Subsubsection
21198 End-of-Line Conversions
21201 \begin_layout Standard
21202 When the collsraborators are mixing Linux and Windows environments, LyX
21203 will use different line endings inside the .lyx files.
21204 This is not a problem as far as LyX functionality is concerned, but the
21205 commit diffs will be huge and merge-conflicts prone.
21206 Fortunately SVN itself knows
21210 \begin_layout Plain Layout
21211 \begin_inset Flex URL
21214 \begin_layout Plain Layout
21216 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
21226 how to deal with CR/LF problems when switching .lyx files to the
21227 \begin_inset Flex Code
21230 \begin_layout Plain Layout
21240 \begin_layout Plain Layout
21242 \begin_inset Flex Code
21245 \begin_layout Plain Layout
21246 svn propset svn:eol-style native FILE_NAME
21259 \begin_layout Subsection
21263 \begin_layout Standard
21264 With the recent addition of the vc-command function LyX power users are
21265 allowed to create their own commands for revision control.
21268 \begin_layout Standard
21269 As an example you can see how two TortoiseSVN commands could be integrated
21273 \begin_layout Description
21275 \begin_inset Flex Code
21278 \begin_layout Plain Layout
21279 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21287 \begin_layout Description
21289 \begin_inset Flex Code
21292 \begin_layout Plain Layout
21293 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21301 \begin_layout Subsection
21302 Version control and Document comparison
21305 \begin_layout Standard
21306 One of the typical uses of version control is to inspect the changes between
21307 revisions, usually by creating
21308 \begin_inset Flex Code
21311 \begin_layout Plain Layout
21318 While this is useful for plain text files, it is much less useful in the
21319 case of LyX files, which have more complicated structure.
21320 Hence we provide binding to the Document comparison feature.
21321 They are two ways of calling this feature - either by direct call of
21322 \begin_inset Flex Code
21325 \begin_layout Plain Layout
21331 LyX function (for details see LyX functions manual) or by icon/menu item
21333 \begin_inset Flex MenuItem
21336 \begin_layout Plain Layout
21337 Compare with older revision...
21343 One can either compare two chosen revisions of the document or he can simply
21344 compare the current version of edited text with older revisions (where
21346 \begin_inset Flex MenuItem
21349 \begin_layout Plain Layout
21355 ' revisions back means comparison of the edited file with last commited
21360 \begin_layout Standard
21361 This feature is supported for SVN and RCS though due to the more complicated
21362 versioning scheme of RCS there is a constraint -- when addressing the revisions
21363 in dialog, numbers always point to the last number in RCS revision number,
21368 \begin_layout Section
21369 Literate Programming
21372 \begin_layout Standard
21377 (kayvan@sylvan.com)
21381 original documentation written by
21383 Edmar Wienskoski Jr.
21386 (edmar-w-jr@technologist.com)
21389 \begin_layout Subsection
21393 \begin_layout Standard
21394 The main purpose of this documentation is to show you how to use LyX for
21395 literate programming, where it is assumed that you are familiar with this
21396 programming technique, and know what
21397 \begin_inset Quotes eld
21401 \begin_inset Quotes erd
21405 \begin_inset Quotes eld
21409 \begin_inset Quotes erd
21413 If that is not the case, please follow the web links provided in the following
21415 There is a lot of good documentation out there covering old development
21416 history to the latest tools tips.
21419 \begin_layout Standard
21420 It is also assumed that you are familiar with LyX itself to a point that
21421 you are comfortable changing your LyX preferences, and X resources file.
21422 If that is not the case please refer to other LyX documentation to cover
21423 your specific needs.
21426 \begin_layout Subsection
21427 Literate Programming
21430 \begin_layout Standard
21431 From the Literate Programming FAQ:
21434 \begin_layout Quotation
21435 Literate programming is the combination of documentation and source together
21436 in a fashion suited for reading by human beings.
21437 In fact, literate programs should be enjoyable reading, even inviting!
21438 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21439 and documentation in a single file.
21440 Literate programming tools then parse the file to produce either readable
21441 documentation or compilable source.
21442 The WEB style of literate programming was created by D.
21443 \begin_inset space \thinspace{}
21447 Knuth during the development of his TeX typesetting software.
21451 \begin_layout Standard
21452 Another excerpt says:
21455 \begin_layout Quotation
21458 How is literate programming different from verbose commenting?
21461 \begin_layout Quotation
21462 There are three distinguishing characteristics.
21463 In order of importance, they are:
21467 \begin_layout Itemize
21468 flexible order of elaboration
21471 \begin_layout Itemize
21472 automatic support for browsing
21475 \begin_layout Itemize
21476 typeset documentation, especially diagrams and mathematics
21480 \begin_layout Standard
21481 Now that I sparked your curiosity, take a look in the references.
21484 \begin_layout Subsubsection
21488 \begin_layout Standard
21489 The complete Literate Programming FAQ can be found at:
21492 \begin_layout Quote
21493 Literate Programming FAQ
21494 \begin_inset Flex URL
21497 \begin_layout Plain Layout
21499 http://www.literateprogramming.com/lpfaq.pdf
21507 \begin_layout Standard
21508 The FAQ lists 23 (twenty three!) different literate programming tools.
21509 Where some are specialized or
21510 \begin_inset Quotes eld
21514 \begin_inset Quotes erd
21517 for particular programming languages, while other have general scope.
21522 for my own use for several reasons:
21525 \begin_layout Itemize
21526 It can generate the documentation either in LaTeX or HTML.
21529 \begin_layout Itemize
21530 It has a open architecture, i.
21531 \begin_inset space \thinspace{}
21535 \begin_inset space \space{}
21538 it is easy to plug in new filters and to perform special processing that
21543 \begin_layout Itemize
21544 There is a good selection of filters available already (the HTML is one
21548 \begin_layout Itemize
21552 \begin_layout Standard
21553 The Noweb web page can be found at:
21556 \begin_layout Quote
21558 \begin_inset Flex URL
21561 \begin_layout Plain Layout
21563 http://www.cs.virginia.edu/~nr/noweb/
21571 \begin_layout Standard
21572 Starting from there you can reach many other interesting links and even
21573 some literate program examples.
21576 \begin_layout Subsection
21577 LyX and Literate Programming
21580 \begin_layout Standard
21581 The LyX support for Literate Programming is provided by using the generic
21582 LyX converters mechanism.
21583 This support is provided in a
21584 \begin_inset Quotes eld
21588 \begin_inset Quotes erd
21592 \begin_inset space \thinspace{}
21596 \begin_inset space \space{}
21599 you will be able to use this new LyX feature with some other literate programmin
21600 g tool of your choice by just changing your LyX preferences.
21603 \begin_layout Subsubsection
21604 Generating documents and code (weaving and tangling)
21607 \begin_layout Paragraph
21608 Selecting the document class
21611 \begin_layout Standard
21612 If you have installed Noweb and LyX successfully, whenever you open a new
21613 document or try to change the document class of an existing one, you will
21614 find that there are three new document classes available:
21617 \begin_layout Itemize
21621 \begin_layout Itemize
21625 \begin_layout Itemize
21629 \begin_layout Standard
21630 You must select one of them to create your literate documents from.
21634 \begin_layout Standard
21635 Note that literate documents are not limited to these three classes.
21636 New classes can be generated from other styles like letter or in combination
21637 with other class variations like Article (AMS).
21638 If you have special needs that cannot be covered by one of the existing
21639 classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21640 will arrange to insert a new entry, or teach you how to do it.
21644 \begin_layout Plain Layout
21645 It is very simple, it involves the creation of a file with four lines, and
21646 re-running of the auto configuration.
21651 Moreover, if you use a literate tool other than Noweb you may need to create
21652 a new set of document classes for it.
21655 \begin_layout Paragraph
21659 \begin_layout Standard
21660 LyX enables you to write code with a layout named
21668 \begin_layout Plain Layout
21669 The equivalent Noweb term is
21670 \begin_inset Quotes eld
21674 \begin_inset Quotes erd
21678 For historical reasons, I got used to the term
21679 \begin_inset Quotes eld
21683 \begin_inset Quotes erd
21686 introduced by other literate tool named Nuweb, which I used for many years
21687 before rendering myself to Noweb.
21692 Noweb delimits scraps like this:
21695 \begin_layout LyX-Code
21699 \begin_layout LyX-Code
21703 \begin_layout LyX-Code
21707 \begin_layout LyX-Code
21711 \begin_layout LyX-Code
21715 \begin_layout Standard
21716 The problem is that whatever is written in between the << and the
21720 must be taken literally, i.
21721 \begin_inset space \thinspace{}
21725 \begin_inset space \space{}
21728 LyX should be prevented from making any special interpretation of what has
21730 This is handled by a special layout named Scrap, that works like a normal
21731 paragraph but has a free spacing capability.
21734 \begin_layout Standard
21735 The down side of the Scrap paragraph layout is that consecutive paragraphs
21736 of code will be spaced with one empty line in the source code and also
21737 in the printed documentation.
21738 The work around is to enter each line of code within a single Scrap, with
21739 a newline (ctrl-return).
21740 The example above will look like this:
21744 \begin_layout Plain Layout
21745 If you have a printed version of this document you will not see any difference
21746 between the previous example and this one.
21754 \begin_layout LyX-Code
21756 \begin_inset Newline newline
21760 \begin_inset Newline newline
21764 \begin_inset Newline newline
21768 \begin_inset Newline newline
21774 \begin_layout Standard
21775 This layout works fine.
21776 The only real inconvenience is that you have to type ctrl-return instead
21781 \begin_layout Plain Layout
21782 It is in my list of
21783 \begin_inset Quotes eld
21787 \begin_inset Quotes erd
21798 \begin_layout Standard
21799 As a special note, you can also use the
21800 \begin_inset Quotes eld
21804 \begin_inset Quotes erd
21807 construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21811 \begin_layout LyX-Code
21813 \begin_inset Newline newline
21816 def some_function(args):
21817 \begin_inset Newline newline
21820 "This is the doc string for this function."
21821 \begin_inset Newline newline
21824 print "My args: ", args
21827 \begin_layout LyX-Code
21828 @ %def some_function
21831 \begin_layout Standard
21832 For an example of this usage and the resulting cross-reference output, look
21833 at the Literate python program in
21835 LIBDIR/examples/listerrors.lyx
21837 which should make this all clear.
21840 \begin_layout Paragraph
21841 Generating the documentation
21844 \begin_layout Standard
21845 At this point you already have a new document file with a proper document
21846 class, and with some code and text on it.
21847 How do I print it? The answer is simple, you select
21849 View\SpecialChar \menuseparator
21853 Just like you would do for a plain document.
21854 No special procedure is required.
21857 \begin_layout Standard
21858 To help orientate you, I will now explain what happens inside LyX:
21861 \begin_layout Enumerate
21864 Update\SpecialChar \menuseparator
21867 menu option is chosen, a LaTeX file is generated.
21872 \begin_layout Standard
21873 If the document is of any literate class the generated file will be named
21874 with an extension name defined by the
21875 \begin_inset Quotes eld
21879 \begin_inset Quotes erd
21882 format (defined in the Preferences panel), otherwise the file will have
21891 \begin_layout Enumerate
21892 Note that the only difference so far is in the name of the file, no special
21893 processing is required by LyX.
21894 Given that you formatted the code using the Scrap layout that, by itself,
21895 takes care of the business.
21898 \begin_layout Enumerate
21899 If the document is of any literate class LyX will then use the internal
21900 LyX to Noweb converter, followed by the Noweb to LaTeX converter
21904 \begin_layout Plain Layout
21905 The converters are defined in the
21907 Tools\SpecialChar \menuseparator
21911 \begin_inset Quotes eld
21915 \begin_inset Quotes erd
21927 manual for general information about converters.
21932 to generate the LaTeX file.
21936 \begin_layout Standard
21937 Otherwise it will just skip this step.
21941 \begin_layout Enumerate
21942 Finally, LaTeX is invoked and the regular post processing continues as in
21946 \begin_layout Standard
21947 Independence from a particular
21948 \begin_inset Quotes eld
21952 \begin_inset Quotes erd
21955 is easily achieved by changing the commands that are run by the various
21959 \begin_layout Paragraph
21960 Generating the code
21963 \begin_layout Standard
21964 When the build menu option is chosen or the corresponding button in the
21965 toolbar is pressed, a LaTeX file is generated just like step 1 above.
21966 Next, LyX invokes the
21971 This converter needs to be defined by the user and is not installed by
21972 default, though the Program format is.
21973 This converter (like any other converter) will have two parts:
21976 \begin_layout Enumerate
21977 The converter program itself.
21978 This program performs the conversion from the one format to the other (in
21979 this case, from the Noweb format to the Program pseudo-format).
21982 \begin_layout Enumerate
21983 The error log parser.
21984 This is a program whose sole purpose is to rewrite error messages in a
21985 format that LyX understands.
21986 This makes it possible for LyX to place error boxes in the right places
21987 in the file buffer.
21990 \begin_layout Standard
21991 The first part, the
21992 \begin_inset Quotes eld
21996 \begin_inset Quotes erd
21999 setting, should be set to
22000 \begin_inset Quotes eld
22008 \begin_inset Quotes erd
22012 This basically means that LyX will call
22013 \begin_inset Quotes eld
22017 \begin_inset Quotes erd
22020 (a program or script) with the name of the Noweb file (normally a file
22021 in the LyX temp directory).
22025 \begin_layout Standard
22026 This is an implementation of
22027 \begin_inset Quotes eld
22031 \begin_inset Quotes erd
22034 that you can place in a directory on your path:
22037 \begin_layout LyX-Code
22041 \begin_layout LyX-Code
22045 \begin_layout LyX-Code
22046 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
22049 \begin_layout Standard
22050 The next part of the converter setting is the
22051 \begin_inset Quotes eld
22055 \begin_inset Quotes erd
22058 which is to be set to
22059 \begin_inset Quotes eld
22064 parselog=listerrors
22067 \begin_inset Quotes erd
22071 This will run any errors that are generated by the
22072 \begin_inset Quotes eld
22076 \begin_inset Quotes erd
22079 process through the
22080 \begin_inset Quotes eld
22084 \begin_inset Quotes erd
22090 \begin_layout Standard
22091 The converter code looks in
22099 then on the path for the
22100 \begin_inset Quotes eld
22104 \begin_inset Quotes erd
22110 \begin_layout Standard
22111 The build will normally take place in LyX's temporary directory, so the
22112 files produced by the conversion will be in that directory.
22113 LyX will copy out what it regards as the `main' file, but the
22117 conversion may produce several files, and so most of these would then be
22118 deleted when LyX was closed.
22119 The present solution is to use a `copier',
22123 \begin_layout Plain Layout
22132 manual for information on these.
22141 script in its default mode, so that the entire contents of the temporary
22142 directory is copied.
22143 More will get copied than is needed, to be sure, but nothing will be lost.
22144 If, however, you know what extensions the generated files will have, this
22145 can be improved by using the
22154 This option takes a comma-separated list of extensions to copy.
22155 So, for example, if the conversion will generate only files with the extensions
22164 , then the correct definition would be:
22167 \begin_layout LyX-Code
22168 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
22171 \begin_layout Standard
22172 The result will be that only files with these two extensions will be copied
22176 \begin_layout Paragraph
22177 Build instructions in the document
22180 \begin_layout Standard
22181 The last piece of the integration between LyX and noweb is the
22182 \begin_inset Quotes eld
22186 \begin_inset Quotes erd
22190 Generally, the instructions for building your program should be embedded
22191 in a scrap of its own.
22193 \begin_inset Quotes eld
22197 \begin_inset Quotes erd
22200 above uses the notangle command to look for this scrap (called
22201 \begin_inset Quotes eld
22205 \begin_inset Quotes erd
22208 ) and runs its contents through
22209 \begin_inset Quotes eld
22213 \begin_inset Quotes erd
22219 \begin_layout Standard
22220 Typically, such a scrap would look something like this:
22223 \begin_layout LyX-Code
22225 \begin_inset Newline newline
22229 \begin_inset Newline newline
22233 \begin_inset Newline newline
22236 if [ -z "${NOWEB_SOURCE}" ]
22237 \begin_inset Newline newline
22241 \begin_inset Newline newline
22244 NOWEB_SOURCE=myfile.nw
22245 \begin_inset Newline newline
22249 \begin_inset Newline newline
22253 code to extract files ...]
22254 \begin_inset Newline newline
22258 code to compile files ...]
22259 \begin_inset Newline newline
22265 \begin_layout Standard
22268 LIBDIR/examples/listerrors.lyx
22272 LIBDIR/examples/Literate.lyx
22274 which implement two versions of the
22275 \begin_inset Quotes eld
22279 \begin_inset Quotes erd
22282 program for some illustrations of how all of these pieces go together or
22285 LIBDIR/examples/noweb2lyx.lyx.
22288 Interestingly, these three files show off the language-indepence of the
22289 LyX literate programming support since they are written in Python, C and
22293 \begin_layout Subsubsection
22297 \begin_layout Standard
22298 All the Literate Programming support is configured by the
22300 Tools\SpecialChar \menuseparator
22304 \begin_inset Quotes eld
22308 \begin_inset Quotes erd
22312 The important parts are:
22315 \begin_layout Description
22317 \begin_inset space ~
22321 \begin_inset Quotes eld
22325 \begin_inset Quotes erd
22329 \begin_inset space ~
22332 format Set up via the Formats tab, this is where the Noweb-specific pieces
22342 , the file extension is set to
22347 This tells LyX to create a file with a
22351 extension in the first step of the conversion process.
22354 \begin_layout Description
22356 \begin_inset space ~
22364 \begin_inset space ~
22367 format This is an empty format whose sole purpose is to be the endpoint
22368 of a conversion (which then allows us to set up a converter for it).
22371 \begin_layout Description
22380 This converter performs the
22381 \begin_inset Quotes eld
22385 \begin_inset Quotes erd
22388 of the literate document.
22389 For Noweb, it is set to
22390 \begin_inset Quotes eld
22395 noweave -delay -index $$i > $$o
22398 \begin_inset Quotes erd
22404 \begin_layout Description
22414 \begin_inset Quotes eld
22418 \begin_inset Quotes erd
22422 As stated above, the Converter is set to
22423 \begin_inset Quotes eld
22431 \begin_inset Quotes erd
22434 , with Flags set to
22435 \begin_inset Quotes eld
22440 originaldir,parselog=listerrors
22443 \begin_inset Quotes erd
22449 \begin_layout Subsubsection
22453 \begin_layout Standard
22454 There is also a new function implemented in the LyX server, the
22455 \begin_inset Quotes eld
22458 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22462 \begin_layout Standard
22463 When debugging code with ddd/gdb, it is possible to invoke a text editor
22464 at the current execution position with a single key stroke.
22465 The default ddd configuration for that is shift-ctrl-V.
22466 It happens that you can define the editor command line invocation in ddd
22469 Edit\SpecialChar \menuseparator
22470 Preferences\SpecialChar \menuseparator
22473 dialog and changing the "Edit Sources" entry.
22476 \begin_layout Standard
22477 I take advantage of the new created LyX server function and this ddd feature,
22479 \begin_inset Quotes eld
22483 \begin_inset Quotes erd
22489 \begin_layout LyX-Code
22490 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22493 \begin_layout Standard
22494 With this, whenever you are using ddd and find a point in the program that
22495 you want to edit, you just press shift-ctrl-V (in the ddd window), and
22496 ddd you forward this information to LyX through the LyX server and then
22497 the LyX window will show the same file with the cursor at the same position
22498 ddd was pointing to.
22499 No more guessing or long scrolling to locate a point in the program back
22503 \begin_layout Standard
22504 Note however that you must enable the LyX server to get this feature working
22505 (it is disabled by default).
22506 You can enable it in
22518 ) by entering in the
22523 \begin_inset Quotes eld
22528 /home/<your-home-directory>/.lyx/lyxpipe
22531 \begin_inset Quotes erd
22537 \begin_layout Standard
22538 Read the LyX server documentation in the
22540 Customization Manual
22542 for further information.
22545 \begin_layout Subsubsection
22549 \begin_layout Standard
22550 There are six new buttons that can be added to your LyX toolbar.
22551 Five of these buttons are short cuts to layout styles:
22572 The last one is a short cut to the
22573 \begin_inset Quotes eld
22577 \begin_inset Quotes erd
22584 \begin_layout Standard
22585 LyX has a range of buttons that are available for tool bar customization.
22586 In my toolbar I like to combine the six short cuts above with two more:
22591 \SpecialChar \menuseparator
22596 \SpecialChar \menuseparator
22603 View\SpecialChar \menuseparator
22607 Here is how it looks like:
22610 \begin_layout LyX-Code
22614 \begin_layout LyX-Code
22618 \begin_layout LyX-Code
22619 Icon "layout Standard"
22622 \begin_layout LyX-Code
22623 Icon "layout Section"
22626 \begin_layout LyX-Code
22627 Icon "layout LaTeX"
22630 \begin_layout LyX-Code
22631 Icon "layout LyX-Code"
22634 \begin_layout LyX-Code
22635 Icon "layout Scrap"
22638 \begin_layout LyX-Code
22642 \begin_layout LyX-Code
22646 \begin_layout LyX-Code
22647 Icon "buffer-typeset"
22650 \begin_layout LyX-Code
22651 Icon "build-program"
22654 \begin_layout LyX-Code
22658 \begin_layout LyX-Code
22662 \begin_layout LyX-Code
22666 \begin_layout LyX-Code
22670 \begin_layout LyX-Code
22674 \begin_layout Subsubsection
22675 Colors customization
22678 \begin_layout Standard
22679 There are a number of colors in LyX that can be customized in
22684 One of the things that bothers people is the LaTeX font color.
22685 The default color is red, since the scraps uses LaTeX font, and there is
22686 a lot of scraps in literate documents, you may get tired of seeing everything
22688 You can change it by going to the tabs
22697 \begin_layout Standard
22698 The next thing is the visible presence of the newline character in the screen.
22699 You can choose the color of this particular character and make it blend
22701 I recommend you choosing a color that is close to the background but not
22702 equal, that way you still can see it is there, but it is not bothering
22707 \begin_layout Chapter
22708 Secrets of the LaTeX Masters
22709 \begin_inset CommandInset label
22718 \begin_layout Standard
22719 Though LyX is a powerful tool, it cannot hope to support everything that
22720 can be done with pure TeX/LaTeX.
22721 However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
22722 as long as you are not afraid to use that
22723 \begin_inset Quotes eld
22727 \begin_inset Quotes erd
22730 button on the toolbar or add things to the LaTeX preamble.
22731 This section lists some tips, tricks, and otherwise cool ideas to give
22732 your document that extra little flair.
22735 Do try this at home
22737 , just start with something a little smaller and less important than your
22741 \begin_layout Standard
22742 Most ideas in this section require less common files in your LaTeX installation.
22743 If you have a system like TeXLive, most will already be available.
22744 A few, however, will need to be downloaded from one of the CTAN archives.
22745 Often, there are several ways to do something, or several LaTeX style files
22746 which do the same thing.
22747 We do not endorse one choice over another, we simply claim that we have
22748 done a particular task with a particular file.
22749 Put on your wizard hat, keep an eye out for dragons, and let us begin.
22752 \begin_layout Section
22756 \begin_layout Standard
22759 Lars Gullik Bjønnes
22762 \begin_layout Subsection
22766 \begin_layout Standard
22767 The aim for this chapter
22771 \begin_layout Plain Layout
22772 Editor's note: Lars' original chapter was a masterful description of how
22778 However, it was too long to flow smoothly in this document.
22779 I have therefore chosen to excerpt the most important sections here (sorry,
22780 Lars); you can read the original chapter (and more of the story!) in the
22783 examples/multicol.lyx
22791 is to show how the LaTeX package
22795 can be used in a LyX document.
22796 As LyX doesn't support the
22800 package natively yet, we have to use some small hacks.
22801 By reading this section it should be obvious how to do this.
22804 \begin_layout Subsection
22808 \begin_layout Standard
22813 package allows switching between one and multicolumn format on the same
22815 Footnotes are handled correctly (for the most part), but will be placed
22816 at the bottom of the page and not under each column.
22817 LaTeX's float mechanism, however, is partly disabled in the current implementat
22819 At the moment only page-wide floats can be used within the scope of the
22823 \begin_layout Subsection
22827 \begin_layout Subsubsection
22831 \begin_layout Standard
22832 If you want to have two columns in your text, you have use LaTeX mode to
22837 begin{multicols}{2}
22839 at the point where you want the two column layout to start, and then
22845 where you want it to end.
22849 \begin_layout Standard
22853 \begin_layout Plain Layout
22857 begin{multicols}{2}
22865 \begin_layout Standard
22870 The Adventure of the Empty House
22873 \begin_inset Newline newline
22878 Sir Arthur Conan Doyle
22881 \begin_layout Standard
22884 It was in the spring of the year 1894 that all London was interested, and
22885 the fashionable world dismayed, by the murder of the Honourable Ronald
22886 Adair under most unusual and inexplicable circumstances.
22887 The public has already learned those particulars of the crime which came
22888 out in the police investigation, but a good deal was suppressed upon that
22889 occasion, since the case for the prosecution was so overwhelmingly strong
22890 that it was not necessary to bring forward all the facts.
22891 Only now, at the end of nearly ten years, am I allowed to supply those
22892 missing links which make up the whole of that remarkable chain.
22893 The crime was of interest in itself, but that interest was as nothing to
22894 me compared to the inconceivable sequel, which afforded me the greatest
22895 shock and surprise of any event in my adventurous life.
22896 Even now, after this long interval, I find myself thrilling as I think
22897 of it, and feeling once more that sudden flood of joy, amazement, and increduli
22898 ty which utterly submerged my mind.
22899 Let me say to that public, which has shown some interest in those glimpses
22900 which I have occasionally given them of the thoughts and actions of a very
22901 remarkable man, that they are not to blame me if I have not shared my knowledge
22902 with them, for I should have considered it my first duty to do so, had
22903 I not been barred by a positive prohibition from his own lips, which was
22904 only withdrawn upon the third of last month.
22907 \begin_layout Standard
22911 \begin_layout Plain Layout
22923 \begin_layout Subsubsection
22927 \begin_layout Standard
22928 The same pattern is used when you want more than two columns:
22931 \begin_layout Standard
22935 \begin_layout Plain Layout
22939 begin{multicols}{3}
22947 \begin_layout Standard
22950 It can be imagined that my close intimacy with Sherlock Holmes had interested
22951 me deeply in crime, and that after his disappearance I never failed to
22952 read with care the various problems which came before the public.
22953 And I even attempted, more than once, for my own private satisfaction,
22954 to employ his methods in their solution, though with indifferent success.
22955 There was none, however, which appealed to me like this tragedy of Ronald
22957 As I read the evidence at the inquest, which led up to a verdict of willful
22958 murder against some person or persons unknown, I realized more clearly
22959 than I had ever done the loss which the community had sustained by the
22960 death of Sherlock Holmes.
22961 There were points about this strange business which would, I was sure,
22962 have specially appealed to him, and the efforts of the police would have
22963 been supplemented, or more probably anticipated, by the trained observation
22964 and the alert mind of the first criminal agent in Europe.
22965 All day, as I drove upon my round, I turned over the case in my mind and
22966 found no explanation which appeared to me to be adequate.
22967 At the risk of telling a twice-told tale, I will recapitulate the facts
22968 as they were known to the public at the conclusion of the inquest.
22971 \begin_layout Standard
22975 \begin_layout Plain Layout
22987 \begin_layout Standard
22988 You can have more than 3 columns if you want to, but that might not be very
22989 pleasant for the eye.
22992 \begin_layout Subsubsection
22993 Columns inside columns
22996 \begin_layout Standard
22997 You can even have columns inside columns:
23000 \begin_layout Standard
23004 \begin_layout Plain Layout
23008 begin{multicols}{2}
23016 \begin_layout Standard
23019 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
23020 at that time governor of one of the Australian colonies.
23021 Adair's mother had returned from Australia to undergo the operation for
23022 cataract, and she, her son Ronald, and her daughter Hilda were living together
23026 \begin_layout Standard
23030 \begin_layout Plain Layout
23034 begin{multicols}{2}
23042 \begin_layout Standard
23045 The youth moved in the best society–had, so far as was known, no enemies
23046 and no particular vices.
23047 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
23048 had been broken off by mutual consent some months before, and there was
23049 no sign that it had left any very profound feeling behind it.
23050 For the rest {sic} the man's life moved in a narrow and conventional circle,
23051 for his habits were quiet and his nature unemotional.
23052 Yet it was upon this easy-going young aristocrat that death came, in most
23053 strange and unexpected form, between the hours of ten and eleven-twenty
23054 on the night of March 30, 1894.
23057 \begin_layout Standard
23061 \begin_layout Plain Layout
23073 \begin_layout Standard
23076 Ronald Adair was fond of cards–playing continually, but never for such stakes
23078 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
23079 It was shown that, after dinner on the day of his death, he had played
23080 a rubber of whist at the latter club.
23081 He had also played there in the afternoon.
23086 The evidence of those who had played with him– Mr.
23087 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
23088 and that there was a fairly equal fall of the cards.
23089 Adair might have lost five pounds, but not more.
23090 His fortune was a considerable one, and such a loss could not in any way
23092 He had played nearly every day at one club or other, but he was a cautious
23093 player, and usually rose a winner.
23094 It came out in evidence that, in partnership with Colonel Moran, he had
23095 actually won as much as four hundred and twenty pounds in a sitting, some
23096 weeks before, from Godfrey Milner and Lord Balmoral.
23097 So much for his recent history as it came out at the inquest.
23100 \begin_layout Standard
23104 \begin_layout Plain Layout
23116 \begin_layout Standard
23117 Please do read the file
23119 examples/multicol.lyx
23121 for more advanced examples including column and header spacing, vertical
23122 separator lines, and more.
23125 \begin_layout Section
23130 Paragraph Environment
23131 \begin_inset Argument
23134 \begin_layout Plain Layout
23135 Numbering in Enumerate
23143 \begin_layout Standard
23149 \begin_layout Standard
23150 \begin_inset VSpace bigskip
23156 \begin_layout Standard
23158 The default numbering for the
23162 paragraph environment begins with Arabic numbers and ends with uppercase
23164 Suppose, however, you wanted a different type of numbering scheme.
23165 Here's a quickie example of how to change the numbering scheme:
23168 \begin_layout LyX-Code
23178 \begin_layout LyX-Code
23188 \begin_layout LyX-Code
23198 \begin_layout LyX-Code
23208 \begin_layout Standard
23209 \SpecialChar \ldots{}
23210 which changes the numbering scheme to uppercase Roman numerals, uppercase
23211 letters, Arabic numbers, and lowercase letter.
23214 \begin_layout Standard
23215 Additionally, the previous example also adds a little bit extra to the numbering
23217 For example, the first level label actually looks like:
23218 \begin_inset Quotes eld
23222 \begin_inset Quotes erd
23226 For ease of reading, we'll describe what the numbering schemes look like
23227 using a notation something like this: <
23228 \begin_inset Quotes eld
23232 \begin_inset Quotes erd
23236 \begin_inset space ~
23240 \begin_inset Quotes erd
23244 \begin_inset Quotes erd
23248 \begin_inset space ~
23252 \begin_inset Quotes erd
23256 \begin_inset Quotes erd
23260 \begin_inset space ~
23264 \begin_inset Quotes eld
23268 \begin_inset Quotes erd
23275 \begin_layout Standard
23276 As you can see in the example, there is a label command for each nesting
23283 \SpecialChar \ldots{}
23290 , as well as a counter,
23294 \SpecialChar \ldots{}
23300 There are also five
23301 \begin_inset Quotes eld
23305 \begin_inset Quotes erd
23338 , each of which take one counter as an argument.
23339 You can add characters before or after these, but there's no need to add
23343 \begin_layout Standard
23344 You can get really fancy with these.
23348 \begin_layout LyX-Code
23362 \begin_layout LyX-Code
23374 \begin_layout LyX-Code
23384 \begin_layout LyX-Code
23394 \begin_layout Standard
23395 produces the somewhat out of hand numbering scheme: <
23396 \begin_inset Quotes eld
23400 \begin_inset Quotes erd
23404 \begin_inset space ~
23408 \begin_inset Quotes erd
23412 \begin_inset Quotes erd
23416 \begin_inset space ~
23420 \begin_inset Quotes erd
23424 \begin_inset Quotes erd
23428 \begin_inset space ~
23432 \begin_inset Quotes eld
23436 \begin_inset Quotes erd
23443 \begin_layout Section
23447 \begin_layout Standard
23453 \begin_layout Standard
23454 \begin_inset VSpace bigskip
23460 \begin_layout Standard
23465 \begin_layout Plain Layout
23471 tmpfont}{cmr17 scaled 2500}{
23483 \begin_layout Standard
23488 \begin_layout Plain Layout
23499 hose of you who like the style of old books probably also like
23500 \begin_inset Quotes eld
23504 \begin_inset Quotes erd
23507 —those large capital letters which begin each new chapter or section.
23508 Implementing them with plain LyX/LaTeX is straightforward (assuming you
23509 know some plain TeX!) but does require a lot of work and many iterations,
23510 as you can see by all the ugly TeX-mode stuff at the beginning of this
23514 \begin_layout Standard
23518 \begin_layout Plain Layout
23524 bigdrop{-1em}{3}{ptmri}{T}+
23529 here is a much easier way of doing this, of course.
23538 ) package from CTAN allows a simple way to add such letters to your documents.
23539 Since this package is not a standard part of TeXLive, I can't demonstrate
23540 it within this document, but if you copy this paragraph to a new document,
23542 \begin_inset Quotes eld
23552 \begin_inset Quotes erd
23555 and the pluses from the TeX code at the beginning of the paragraph, and
23560 usepackage{dropcaps}
23562 to your LaTeX preamble, you will get a nice Times Roman Italic
23563 \begin_inset Quotes eld
23567 \begin_inset Quotes erd
23570 , whose height is three lines of text and which protrudes 1 em into the
23572 (Make certain you have copied
23573 \begin_inset Quotes eld
23581 \begin_inset Quotes erd
23584 into a directory where TeX can see it.) The first argument is the amount
23585 of indentation; in this case the negative sign moves it into the margin.
23586 The second argument is the height of the letter in number of lines of text.
23587 The third argument is the font name: virtually anything which has a tfm
23588 file should work (wade through the
23590 .../texmf/fonts/tfm
23592 directory for possibilities).
23593 My personal favorite is
23594 \begin_inset Quotes eld
23602 \begin_inset Quotes erd
23605 , a fancy German font specifically designed for dropped capitals.
23606 The fourth argument is the letter (or letters) to be dropped.
23611 package also offers the
23617 command, as well as a slightly simplified
23626 \begin_layout Section
23627 Non-standard Paragraph Shapes
23630 \begin_layout Standard
23636 \begin_layout Standard
23637 \begin_inset VSpace bigskip
23643 \begin_layout Standard
23647 \begin_layout Plain Layout
23659 \begin_layout Standard
23663 \begin_layout Plain Layout
23672 \begin_layout Plain Layout
23686 \begin_layout Standard
23691 \begin_layout Plain Layout
23702 \begin_layout Plain Layout
23711 \begin_layout Plain Layout
23720 \begin_layout Plain Layout
23729 \begin_layout Plain Layout
23738 \begin_layout Plain Layout
23747 \begin_layout Plain Layout
23756 \begin_layout Plain Layout
23765 \begin_layout Plain Layout
23774 \begin_layout Plain Layout
23783 \begin_layout Plain Layout
23792 \begin_layout Plain Layout
23801 \begin_layout Plain Layout
23810 \begin_layout Plain Layout
23819 \begin_layout Plain Layout
23828 \begin_layout Plain Layout
23837 \begin_layout Plain Layout
23846 \begin_layout Plain Layout
23855 \begin_layout Plain Layout
23864 \begin_layout Plain Layout
23870 There are times when the tyranny of rectangular paragraphs must be overthrown.
23871 In such situations, a call to the delightful plain TeX command
23878 As you can see, completely arbitrary shapes can be laid out with a suitable
23879 set of linelength definitions.
23880 While this parshape may look a bit silly and useless, one could conceive
23881 of situations such as finely tuned dropped capitals, word wrapping around
23882 non-rectangular graphics, etc.
23883 which will benefit from such handcrafting.
23886 \begin_layout Standard
23887 \begin_inset VSpace bigskip
23893 \begin_layout Standard
23898 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23905 is the number of lines of text which define the paragraph.
23906 If there turn out to be fewer lines, the shape is truncated; if there are
23907 more, the excess lines have the same dimensions as the last line of the
23917 entries specify the indentation of the line from the left margin, and the
23918 length of the line as measured from that point.
23919 The shape applies only to the current paragraph; everything is reset to
23920 normal for the next paragraph.
23923 \begin_layout Standard
23927 \begin_layout Plain Layout
23939 \begin_layout Section
23943 \begin_layout Standard
23944 As you can see, the examples in this section range from the useful to the
23946 While I don't expect that anyone will ever need the paragraph shape demonstrate
23947 d in the last section, the important point is that you can do almost anything
23948 you want in LyX if you are willing to figure out how to do it in TeX and
23950 TeX is a fantastically powerful typesetting system and all that power is
23951 available to you since LyX uses it as its backend.