1 #LyX 2.0 created this file. For more info see http://www.lyx.org/
7 % DO NOT ALTER THIS PREAMBLE!!!
9 % This preamble is designed to ensure that the manual prints
10 % out as advertised. If you mess with this preamble,
11 % parts of the manual may not print out as expected. If you
12 % have problems LaTeXing this file, please contact
13 % the documentation team
14 % email: lyx-docs@lists.lyx.org
20 % set fonts for nicer pdf view
21 \IfFileExists{lmodern.sty}
22 {\usepackage{lmodern}}{}
24 \fi % end if pdflatex is used
26 % the pages of the TOC are numbered roman
27 % and a PDF-bookmark for the TOC is added
29 \let\myTOC\tableofcontents
30 \renewcommand{\tableofcontents}{%
31 \pdfbookmark[1]{\contentsname}{}
34 \pagenumbering{arabic}}
36 % redefine the \LyX macro for PDF bookmarks
37 \def\LyX{\texorpdfstring{%
38 L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}
41 % used for multi-column text
44 % extra space for tables
45 \newcommand{\extratablespace}[1]{\noalign{\vskip#1}}
47 \options fleqn,liststotoc,bibtotoc,idxtotoc,BCOR7.5mm,titlepage,tablecaptionabove
48 \use_default_options false
54 \maintain_unincluded_children false
57 InsetLayout CharStyle:MenuItem
66 \newcommand*{\menuitem}[1]{{\sffamily #1}}
71 \language_package default
76 \font_typewriter default
77 \font_default_family default
78 \use_non_tex_fonts false
85 \default_output_format default
87 \bibtex_command default
88 \index_command default
92 \pdf_title "LyX's Additional Features manual"
93 \pdf_author "LyX Team"
94 \pdf_subject "LyX's additional features documentation"
95 \pdf_keywords "LyX, Documentation, Additional"
97 \pdf_bookmarksnumbered true
98 \pdf_bookmarksopen false
99 \pdf_bookmarksopenlevel 1
100 \pdf_breaklinks false
104 \pdf_pdfusetitle false
105 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false, pdfpagelabels"
115 \paperorientation portrait
124 \paragraph_separation indent
125 \paragraph_indentation default
126 \quotes_language english
129 \paperpagestyle headings
130 \tracking_changes false
131 \output_changes false
140 Additional LyX Features
148 \begin_layout Plain Layout
150 Principal maintainer of this file is
155 If you have comments or error corrections, please send them to the LyX
156 Documentation mailing list,
157 \begin_inset Flex Code
160 \begin_layout Plain Layout
162 <lyx-docs@lists.lyx.org>
175 \begin_layout Standard
176 \begin_inset CommandInset toc
177 LatexCommand tableofcontents
184 \begin_layout Chapter
188 \begin_layout Standard
189 This manual is essentially Part II of the
191 User's Guide\SpecialChar \@.
194 The reason for separating this document out is simple: the
198 is already quite lengthy, and it contains information on all of the basic
199 features one needs to know in order to prepare most documents.
200 However, the LyX Team has worked to make LyX extensible through various
201 configuration files and external packages.
202 That means that if you want to support the Fizzwizzle LaTeX package, you
203 can create a layout file (or module) for it without having to alter LyX
205 We've already had contributions of several new features this way, and some
206 of them are documented here.
207 There are also some more `advanced' features, such as how to control the
208 presentation of bibliographies and how to work with multi-part documents,
209 that are not covered in the
213 and are discussed here.
216 \begin_layout Standard
217 This manual also documents some special features, like fax support, version
218 control, and SGML support, which require additional software to work properly.
219 There is also a chapter on LyX's support for HTML.
220 And lastly, there's a chapter of LaTeX tools and tips, things you can use
221 to spruce up your documents by directly using the powerful features of
227 only WYSIWYM and will only ever interface to some, not all, LaTeX features.
230 \begin_layout Standard
231 If you haven't read the
235 yet, you are definitely in the wrong manual.
240 is the first place to go, since it describes the notation and format of
242 You should also be thoroughly familiar with the
246 and all of the basic features of LyX before attempting to read this one.
249 \begin_layout Standard
250 Since many of the topics in this manual depend heavily on LyX's interaction
251 with LaTeX, this first chapter covers the inner workings of LyX and how
252 to direct LyX to generate exactly the LaTeX code you want.
253 It is obviously for more seasoned LyX users.
256 \begin_layout Chapter
260 \begin_layout Section
264 \begin_layout Standard
265 This chapter is for both TeX-nicians and the LaTeX-curious.
266 In it, we'll explain how LyX and LaTeX work together to produce printable
268 This is the only place in any of the manuals where we assume you know something
272 \begin_layout Standard
273 At one time, LyX was called a
274 \begin_inset Quotes eld
277 WYSIWYM frontend to LaTeX,
278 \begin_inset Quotes erd
281 but that's no longer true.
282 There are frontends to LaTeX out there.
286 \begin_layout Plain Layout
287 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
288 There are also the LaTeX modes for vi and emacs, of course.
293 These are basically text editors with the ability to run LaTeX and mark
294 any errors in the file you're editing.
303 run LaTeX, and it also indicates errors in the file, it also does much,
305 For one thing, you don't need to know LaTeX to use LyX effectively.
306 And LyX has added its own extensions to LaTeX.
307 Try the following sometime: select
308 \begin_inset Flex MenuItem
311 \begin_layout Plain Layout
312 Export\SpecialChar \menuseparator
319 \begin_inset Flex MenuItem
322 \begin_layout Plain Layout
329 \begin_inset Flex MenuItem
332 \begin_layout Plain Layout
333 View\SpecialChar \menuseparator
339 ), then look at the preamble of the resulting
340 \begin_inset Flex Code
343 \begin_layout Plain Layout
350 You'll notice a variety of new macros defined specifically by LyX.
351 These macros are defined automatically, according to the features you use
355 \begin_layout Standard
356 There are several commands that automatically invoke LaTeX.
360 \begin_layout Itemize
361 \begin_inset Flex MenuItem
364 \begin_layout Plain Layout
365 View\SpecialChar \menuseparator
374 \begin_layout Itemize
375 \begin_inset Flex MenuItem
378 \begin_layout Plain Layout
379 View\SpecialChar \menuseparator
380 Update\SpecialChar \menuseparator
389 \begin_layout Itemize
390 \begin_inset Flex MenuItem
393 \begin_layout Plain Layout
394 File\SpecialChar \menuseparator
403 \begin_layout Itemize
404 \begin_inset Flex MenuItem
407 \begin_layout Plain Layout
408 File\SpecialChar \menuseparator
417 \begin_layout Standard
418 They will only invoke LaTeX if the file has changed since the last time
423 \begin_layout Standard
424 When LyX runs LaTeX on the file you're editing, it performs these steps:
427 \begin_layout Enumerate
428 Convert the document to LaTeX and save to a file with the extension
429 \begin_inset Flex Code
432 \begin_layout Plain Layout
439 \begin_inset Flex Code
442 \begin_layout Plain Layout
451 \begin_layout Enumerate
453 \begin_inset Flex Code
456 \begin_layout Plain Layout
462 file (maybe several times), and run any other commands (such as
463 \begin_inset Flex Code
466 \begin_layout Plain Layout
473 \begin_inset Flex Code
476 \begin_layout Plain Layout
482 ) needed to compile the LaTeX file.
485 \begin_layout Enumerate
486 If there are any errors, show the error log.
489 \begin_layout Standard
490 If you've run LaTeX using
491 \begin_inset Flex MenuItem
494 \begin_layout Plain Layout
497 \SpecialChar \menuseparator
505 , LyX then runs a DVI viewer to display the DVI-file.
507 \begin_inset Flex MenuItem
510 \begin_layout Plain Layout
513 \SpecialChar \menuseparator
521 , LyX performs further steps:
524 \begin_layout Itemize
526 \begin_inset Flex Code
529 \begin_layout Plain Layout
535 to convert the DVI file to PostScript.
538 \begin_layout Itemize
539 Run a PostScript viewer, such as
540 \begin_inset Flex Code
543 \begin_layout Plain Layout
549 , to display the PostScript file.
552 \begin_layout Standard
553 LyX does similar things when viewing, or exporting, other formats.
556 \begin_layout Section
557 Translating LaTeX files into LyX
560 \begin_layout Standard
561 You can import a LaTeX file into LyX by using the
562 \begin_inset Flex MenuItem
565 \begin_layout Plain Layout
566 File\SpecialChar \menuseparator
567 Import\SpecialChar \menuseparator
574 This will call a program named
575 \begin_inset Flex Code
578 \begin_layout Plain Layout
584 which will create a file
585 \begin_inset Flex Code
588 \begin_layout Plain Layout
595 \begin_inset Flex Code
598 \begin_layout Plain Layout
605 LyX will then open that file.
609 \begin_layout Plain Layout
610 \begin_inset Flex Code
613 \begin_layout Plain Layout
619 can also be run from the command line, of course.
627 \begin_layout Standard
628 \begin_inset Flex Code
631 \begin_layout Plain Layout
637 will translate most legal LaTeX, but not everything.
638 It will put things it doesn't understand into TeX code, so after translating
640 \begin_inset Flex Code
643 \begin_layout Plain Layout
649 , you can look for TeX code and hand-edit it until it looks right.
652 \begin_layout Standard
653 If you don't know what TeX code is, read the next section.
656 \begin_layout Section
657 \begin_inset CommandInset label
659 name "sec:Inserting-TeX-Code"
663 Inserting TeX Code into LyX Documents
666 \begin_layout Standard
667 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
668 You can always insert TeX code into any LyX document.
669 LyX cannot, and will never be able to, display every possible LaTeX construct.
670 If ever you need to insert LaTeX commands into your LyX document, you can
672 \begin_inset Flex Code
675 \begin_layout Plain Layout
681 box, which you can insert into your document with
682 \begin_inset Flex MenuItem
685 \begin_layout Plain Layout
686 Insert\SpecialChar \menuseparator
695 \begin_layout Standard
696 Here's an example of inserting LaTeX commands in a LyX document.
697 The code looks like this:
700 \begin_layout LyX-Code
704 \begin_inset Newline newline
710 \begin_inset Newline newline
713 This is an example for a minipage environment.
715 \begin_inset Newline newline
718 can put nearly everything in it, even (non-floating)
719 \begin_inset Newline newline
724 \begin_inset Newline newline
730 \begin_inset Newline newline
734 \begin_inset Newline newline
740 \begin_inset Newline newline
746 \begin_inset Newline newline
752 \begin_inset Newline newline
757 \begin_inset Newline newline
763 \begin_inset Newline newline
769 \begin_inset Newline newline
775 \begin_inset Newline newline
783 \begin_layout LyX-Code
787 \begin_layout Standard
789 \begin_inset Flex Code
792 \begin_layout Plain Layout
798 box containing this text is directly after this paragraph.
799 Those of you reading the manual in LyX will only see the TeX code inset.
800 Those reading a printed version of the manuals will see the actual results:
803 \begin_layout Standard
807 \begin_layout Plain Layout
814 \begin_layout Plain Layout
821 \begin_layout Plain Layout
823 This is an example for a minipage environment.
824 You can put nearly everything in it, even (non-floating) figures and tables.
828 \begin_layout Plain Layout
835 \begin_layout Plain Layout
840 \begin_layout Plain Layout
847 \begin_layout Plain Layout
854 \begin_layout Plain Layout
861 \begin_layout Plain Layout
867 \begin_layout Plain Layout
874 \begin_layout Plain Layout
881 \begin_layout Plain Layout
888 \begin_layout Plain Layout
900 \begin_layout Standard
901 In addition to using TeX code, you can also create a separate file containing
902 some complex LaTeX structure and then use
903 \begin_inset Flex MenuItem
906 \begin_layout Plain Layout
907 Insert\SpecialChar \menuseparator
917 to include your file (you should select the type
918 \begin_inset Flex Code
921 \begin_layout Plain Layout
928 We recommend that you only do this if you have a
929 \begin_inset Flex Code
932 \begin_layout Plain Layout
943 Otherwise, you'll have a big job tracking down LaTeX errors.
946 \begin_layout Standard
947 There are a few last points to emphasize:
950 \begin_layout Itemize
955 check if your LaTeX code is correct.
958 \begin_layout Itemize
959 Beware reinventing the wheel.
962 \begin_layout Standard
963 On that last point, LyX does have quite a few features tucked into it, and
965 Be sure to check the manuals to make sure that LyX doesn't have such-and-such
966 feature before you decide you have to do it by hand.
967 Moreover, there are numerous LaTeX packages out there to do all sorts of
968 things, from labels to envelopes to fancy multipage tables.
970 \begin_inset CommandInset href
973 target "http://www.ctan.org/"
977 for details, and see chapter
978 \begin_inset CommandInset ref
980 reference "cha:secrets"
987 \begin_layout Standard
988 If you do need to do some wild and fancy things within your document, be
989 sure to check out a good LaTeX book for assistance.
990 There are a number of them listed in the bibliography of the
997 \begin_layout Section
998 LyX and the LaTeX Preamble
1001 \begin_layout Subsection
1002 About the LaTeX Preamble
1005 \begin_layout Standard
1006 If you already know LaTeX, there is no need to explain here what the preamble
1008 If you don't, the following will give you some ideas—we recommend again
1009 that you consult a LaTeX book for further information.
1010 In any case, you should read the points below, because they explain what
1011 you can do and what you don't need to do in the LaTeX preamble of a LyX
1015 \begin_layout Standard
1016 The LaTeX preamble comes at the very beginning of a document,
1024 \begin_layout Itemize
1025 Declare the document class.
1027 \begin_inset Newline newline
1030 LyX already does this for you.
1031 If you're a seasoned LaTeX-nician, and you have a custom document class
1032 you want to use, check out the
1034 Customization Manual
1036 for information on how to make LyX interface to it.
1039 \begin_layout Itemize
1040 Declare the usage of packages.
1042 \begin_inset Newline newline
1045 LaTeX packages provide special commands, which are only available within
1046 a document when the package has been declared in the preamble.
1047 For example, the package
1048 \begin_inset Flex Code
1051 \begin_layout Plain Layout
1057 forces all paragraphs to be indented.
1058 There are other packages for labels, envelopes, margins, etc.
1062 \begin_layout Itemize
1063 Set counters, variables, lengths and widths.
1065 \begin_inset Newline newline
1068 There are several LaTeX counters and variables which
1072 be set globally from within the preamble in order to have the desired effect.
1073 (There are variables which you can set and reset inside the document, too.)
1074 Margins are a good example of something which must be set in the preamble.
1075 Another example is the label format for lists.
1076 You can actually set these just about anywhere, but it's best to do it
1077 just once, inside the preamble.
1080 \begin_layout Itemize
1081 Declare user defined commands (with
1082 \begin_inset Flex Code
1085 \begin_layout Plain Layout
1094 \begin_inset Flex Code
1097 \begin_layout Plain Layout
1106 \begin_inset Newline newline
1109 These are abbreviations for LaTeX commands which appear very often inside
1111 Although the preamble is a good place to declare such commands, they
1115 be declared anywhere (before they are used for the first time, of course).
1116 This can be useful if there is a lot of raw LaTeX code in your document,
1117 which normally should not be the case.
1120 \begin_layout Standard
1121 LyX adds its own set of definitions to the preamble of the
1122 \begin_inset Flex Code
1125 \begin_layout Plain Layout
1132 This makes LaTeX files generated by LyX portable.
1135 \begin_layout Subsection
1136 Changing the Preamble
1139 \begin_layout Standard
1140 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1141 can't change them without patching LyX itself.
1142 You can, however, add your own stuff to the preamble by selecting
1143 \begin_inset Flex MenuItem
1146 \begin_layout Plain Layout
1148 \begin_inset space ~
1157 \begin_inset Flex MenuItem
1160 \begin_layout Plain Layout
1161 Document\SpecialChar \menuseparator
1168 LyX adds anything in the
1169 \begin_inset Flex MenuItem
1172 \begin_layout Plain Layout
1178 dialog to its own built-in preamble.
1179 Before adding your own declarations in the preamble, you should make sure
1180 that LyX doesn't already support what you want to do.
1181 (Remember what we said about reinventing the wheel?) Also,
1183 make sure your preamble code is correct
1186 LyX doesn't check it for you.
1187 If there is an error, you're likely to get an error like
1188 \begin_inset Quotes eld
1192 \begin_inset Flex Code
1195 \begin_layout Plain Layout
1204 \begin_inset Quotes erd
1208 If you see this error, check your preamble.
1211 \begin_layout Subsection
1215 \begin_layout Standard
1216 Here are some examples of what you can add to a preamble, and what they
1220 \begin_layout Subsubsection
1224 \begin_layout Standard
1225 There are two variables under LaTeX that control page position:
1226 \begin_inset Flex Code
1229 \begin_layout Plain Layout
1238 \begin_inset Flex Code
1241 \begin_layout Plain Layout
1250 Their names should be self-explanatory.
1251 These variables are useful if you think for a moment about computer labels.
1252 Sometimes, the size of a print medium and the area of the medium that you
1253 can actually print on aren't the same.
1255 \begin_inset Flex Code
1258 \begin_layout Plain Layout
1267 \begin_inset Flex Code
1270 \begin_layout Plain Layout
1281 \begin_layout Standard
1282 The default values for
1283 \begin_inset Flex Code
1286 \begin_layout Plain Layout
1295 \begin_inset Flex Code
1298 \begin_layout Plain Layout
1307 \begin_inset space \thinspace{}
1311 \begin_inset space \thinspace{}
1315 \begin_inset space \space{}
1318 the page isn't shifted.
1319 Unfortunately, some DVI drivers always seem to shift the page.
1320 We have no idea why, or why the sysadmin hasn't fixed such behavior.
1321 If you're using LyX on a system that you don't personally maintain, and
1322 your sysadmin is a doofus,
1323 \begin_inset Flex Code
1326 \begin_layout Plain Layout
1335 \begin_inset Flex Code
1338 \begin_layout Plain Layout
1347 Suppose your left and top margins are always 0.5
1348 \begin_inset space \thinspace{}
1352 You can add this to the preamble:
1355 \begin_layout LyX-Code
1363 \begin_layout LyX-Code
1371 \begin_layout Standard
1372 and your margins should now be correct.
1375 \begin_layout Subsubsection
1379 \begin_layout Standard
1380 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1381 There's a rather nice package, available at your nearest CTAN archive,
1382 for printing sheets of labels:
1383 \begin_inset Flex Code
1386 \begin_layout Plain Layout
1393 Now, your system may not have this package installed by default.
1394 We leave that up to you to check.
1395 You'll also want to read the documentation for it; we're not going to do
1397 Since this is an example, however, we'll give you an example of how you
1401 \begin_layout Standard
1402 First, make sure you're using the
1403 \begin_inset Flex Code
1406 \begin_layout Plain Layout
1413 Next, you need to put the following in your preamble:
1416 \begin_layout LyX-Code
1422 \begin_layout LyX-Code
1428 \begin_layout LyX-Code
1434 \begin_layout LyX-Code
1440 \begin_layout LyX-Code
1446 \begin_layout LyX-Code
1452 \begin_layout LyX-Code
1458 \begin_layout Standard
1459 This sets things up for Avery label sheets, stock #5360.
1460 You're now ready to print labels, but you'll need to insert LaTeX code,
1461 placing the commands
1462 \begin_inset Flex Code
1465 \begin_layout Plain Layout
1474 \begin_inset Flex Code
1477 \begin_layout Plain Layout
1485 around each label text.
1486 This and other special features of
1487 \begin_inset Flex Code
1490 \begin_layout Plain Layout
1496 are explained in its documentation.
1499 \begin_layout Standard
1500 Someday, someone may write a LyX layout file to support this package directly.
1501 Maybe that someone is you.
1504 \begin_layout Subsubsection
1505 Example #3: Paragraph Indentation
1508 \begin_layout Standard
1509 Americans are trained to indent the first line of
1514 As with all of their other weird quirks, most Americans will whine and
1515 moan until they can have their way and indent the first line of all paragraphs.
1524 \begin_layout Standard
1525 Of course, this behavior isn't standard typography.
1526 In books, you typically only indent the first line of a paragraph
1530 it follows another one.
1531 The idea behind indenting the first line of a paragraph is to distinguish
1532 neighboring paragraphs from one another.
1533 If there is no previous paragraph—for example, if it follows a figure or
1534 is the first paragraph in a section—then there is no need for indentation.
1538 \begin_layout Standard
1539 If you're a typical American (we're still joking!), though, you don't care
1540 about such esoteric things; you want your indentation! Add this to the
1544 \begin_layout LyX-Code
1547 usepackage{indentfirst}
1550 \begin_layout Standard
1551 If your TeX distribution isn't braindead, you'll have this package, and
1552 all of your paragraphs will get the indentation the Founding Fathers intended
1556 \begin_layout Subsubsection
1557 Example #4: This Document
1560 \begin_layout Standard
1561 You can also check out the preamble of this document to get an idea of some
1562 of the advanced things you can do.
1563 Also, there are more examples and an assortment of LaTeX
1564 \begin_inset Quotes eld
1568 \begin_inset Quotes erd
1572 \begin_inset space ~
1576 \begin_inset CommandInset ref
1578 reference "cha:secrets"
1586 \begin_layout Section
1587 LyX and LaTeX Errors
1590 \begin_layout Standard
1591 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1593 It then uses the logfile from the LaTeX run to do a post-mortem.
1594 After analyzing the logfile,LyX displays a dialog listing the errors.
1595 Clicking on any one of them will take you to the position in your LyX file
1596 where the error occurred.
1600 \begin_layout Plain Layout
1602 Analyzing the logfile is a tough job, and LyX doesn't always go to the
1604 There are also cases where LaTeX reports the error on one line, but the
1605 actual error is earlier.
1606 This is not unlike forgetting a closing brace in a program: You'll get
1607 an error, but only later.
1615 \begin_layout Standard
1616 Some folks also like to look at the log file directly: It is available from
1618 \begin_inset Flex MenuItem
1621 \begin_layout Plain Layout
1624 \SpecialChar \menuseparator
1628 \begin_inset space ~
1637 There are some fairly common error messages and warnings.
1638 We'll cover those here.
1639 You should look at a good LaTeX book for a complete listing.
1642 \begin_layout Itemize
1643 \begin_inset Flex Code
1646 \begin_layout Plain Layout
1653 \begin_inset Newline newline
1656 Anything beginning with these words is a warning message for the purpose
1658 \begin_inset Quotes eld
1662 \begin_inset Quotes erd
1665 the LaTeX code itself.
1666 You'll get messages like this if you added or changed cross-references
1667 or bibliography entries, in which case, LaTeX is trying to tell you that
1668 you need to make another run.
1669 You can by-and-large ignore these.
1672 \begin_layout Itemize
1673 \begin_inset Flex Code
1676 \begin_layout Plain Layout
1683 \begin_inset Newline newline
1686 Another warning message, this time about fonts which LaTeX couldn't find.
1687 The rest of the message will often say something about a replacement font
1689 You can safely ignore these, too.
1692 \begin_layout Itemize
1693 \begin_inset Flex Code
1696 \begin_layout Plain Layout
1705 \begin_inset Newline newline
1713 They are warnings about lines that were too long and run past the right
1715 Almost always, this is unnoticeable in the final output.
1716 (It can be just a point or two.) Or, only one or two characters extend past
1718 LaTeX seems to generate at least one of these messages for just about any
1720 \begin_inset Newline newline
1723 You can ignore these messages.
1724 Your eyes will tell you if there's a problem with something that's too
1725 wide; just look at the output.
1729 \begin_layout Plain Layout
1730 You can also enable the `draft' option in
1731 \begin_inset Flex MenuItem
1734 \begin_layout Plain Layout
1737 \SpecialChar \menuseparator
1745 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1753 \begin_layout Itemize
1754 \begin_inset Flex Code
1757 \begin_layout Plain Layout
1766 \begin_inset Newline newline
1769 Not quite as common as its cousin.
1770 LaTeX seems to like to print lines that are a bit too wide as opposed to
1771 ones that are a bit too narrow.
1772 We have no idea why.
1775 \begin_layout Itemize
1776 \begin_inset Flex Code
1779 \begin_layout Plain Layout
1788 \begin_inset Flex Code
1791 \begin_layout Plain Layout
1800 \begin_inset Newline newline
1803 Warnings about troubles breaking the page.
1804 Once again, just look at the output.
1805 Your eyes will tell you where something has gone wrong.
1808 \begin_layout Itemize
1809 \begin_inset Flex Code
1812 \begin_layout Plain Layout
1814 \begin_inset Quotes els
1818 \begin_inset Quotes ers
1827 \begin_inset Newline newline
1831 \begin_inset Quotes eld
1835 \begin_inset Quotes erd
1838 isn't installed on this system.
1839 This usually appears because some package your document needs isn't installed.
1840 If you didn't touch the preamble or didn't use the
1841 \begin_inset Flex Code
1844 \begin_layout Plain Layout
1852 command, then one of the packages LyX tried to load is missing.
1854 \begin_inset Flex MenuItem
1857 \begin_layout Plain Layout
1858 Help\SpecialChar \menuseparator
1864 to get a list of packages that LyX knows about.
1865 This file is updated whenever you reconfigure LyX (using
1866 \begin_inset Flex MenuItem
1869 \begin_layout Plain Layout
1870 Tools\SpecialChar \menuseparator
1876 ) and tells you which packages have been detected and what they do.
1877 \begin_inset Newline newline
1881 \begin_inset Flex Code
1884 \begin_layout Plain Layout
1892 command and the package in question isn't installed, then you'll need to
1893 install it yourself.
1896 \begin_layout Itemize
1897 \begin_inset Flex Code
1900 \begin_layout Plain Layout
1901 LaTeX Error: Unknown option
1907 \begin_inset Newline newline
1910 Error messages beginning with this are trying to tell you that you specified
1911 a bad or undefined option to a package.
1912 Check the package's documentation.
1915 \begin_layout Itemize
1916 \begin_inset Flex Code
1919 \begin_layout Plain Layout
1920 Undefined control sequence
1926 \begin_inset Newline newline
1929 If you've inserted LaTeX code into your document, but made a typo, you'll
1931 You may have forgotten to load a package.
1932 In any case, this error message usually means that you used an undefined
1937 \begin_layout Standard
1938 There are other error and warning messages.
1939 Some are self-explanatory.
1940 These are usually LaTeX messages.
1941 Others are downright cryptic.
1942 These are usually TeX error messages, and we really have
1946 what they mean or how to decipher them.
1950 \begin_layout Standard
1951 There's a general sequence you should follow if you get error messages:
1954 \begin_layout Enumerate
1955 Look at the LaTeX code you inserted for typos.
1958 \begin_layout Enumerate
1959 If there are no typos, check that you used the command(s) correctly.
1962 \begin_layout Enumerate
1963 If you get a bunch of error boxes piled up at the very top of the document—and
1964 especially if you see a
1965 \begin_inset Quotes eld
1969 \begin_inset Flex Code
1972 \begin_layout Plain Layout
1981 \begin_inset Quotes erd
1984 error—it means that there are errors in the preamble.
1985 Start debugging your preamble.
1988 \begin_layout Enumerate
1989 If you didn't add anything to the preamble and didn't add any LaTeX code
1990 to the document, the first suspect is your LaTeX distribution itself.
1991 Check for missing packages and install them.
1994 \begin_layout Enumerate
1995 Okay, so there are no missing packages.
1996 Did you use any of the fine-tuning options in LyX? Specifically, did you
2001 any of them, like trying to manually insert lots of
2002 \begin_inset Flex Code
2005 \begin_layout Plain Layout
2007 \begin_inset space ~
2016 \begin_inset Flex Code
2019 \begin_layout Plain Layout
2026 \begin_inset Flex Code
2029 \begin_layout Plain Layout
2035 ? Did you try to kludge something together with these instead of using the
2036 appropriate paragraph environment?
2039 \begin_layout Enumerate
2040 All right, you didn't use any of the fine-tuning options, you played by
2042 Did you try to pull a fancy maneuver? Did you do something funky inside
2043 a table or an equation, like inserting a graphic into a table cell?
2046 \begin_layout Enumerate
2047 Do you have long sections of text where LaTeX cannot find a place to break
2048 a line? By default, LaTeX is rather strict about how much extra inter-word
2049 spacing it will add in order to break a line.
2050 Preferably, you should rework the paragraph to avoid the problem.
2051 If this isn't an option, you can wrap your text in
2052 \begin_inset Flex Code
2055 \begin_layout Plain Layout
2063 to make LaTeX's line breaking more, well, sloppy.
2066 \begin_layout Enumerate
2067 Did you go overboard with the nesting? LyX (currently) doesn't check to
2068 make sure you're in the limits for nesting environments.
2069 If you nested a bunch of environments to the
2070 \begin_inset Formula $17^{\mathrm{th}}$
2073 level, that's the problem.
2074 (The limit in LaTeX is five.)
2077 \begin_layout Enumerate
2078 Okay, you didn't get any error messages, but your output looks awful.
2079 If you have a table or figure that's too wide or long for the page, you
2084 \begin_layout Enumerate
2085 rescale the figure so it fits.
2088 \begin_layout Enumerate
2089 trim down the table so it fits.
2093 \begin_layout Enumerate
2094 If something else is wrong with the output, and you didn't try to pull anything
2095 fancy or kludge the fine-tuning options, we're not sure what's wrong.
2098 \begin_layout Standard
2099 If all this doesn't help—well, then
2103 you might have found a bug in LyX\SpecialChar \ldots{}
2107 \begin_layout Chapter
2111 \begin_layout Section
2112 Customizing Bibliographies with BibTeX
2115 \begin_layout Standard
2116 The most basic information about how to use BibTeX with LyX is contained
2119 Bibliography databases (BibTeX)
2126 The following subsections explain special bibliography features supported
2130 \begin_layout Subsection
2131 Alternative Citation Styles
2134 \begin_layout Standard
2135 Standard BibTeX uses numbers (e.
2136 \begin_inset space \thinspace{}
2140 \begin_inset space \space{}
2144 \begin_inset Quotes eld
2148 \begin_inset Quotes erd
2151 ) to refer to a cited work.
2152 However, in many scientific disciplines, other citation styles are in use.
2153 The most common one is the author-year style (e.
2154 \begin_inset space \thinspace{}
2158 \begin_inset space \space{}
2162 \begin_inset Quotes eld
2166 \begin_inset Quotes erd
2170 LyX supports two packages that provide this style,
2171 \begin_inset Flex Code
2174 \begin_layout Plain Layout
2181 \begin_inset Flex Code
2184 \begin_layout Plain Layout
2191 Both packages have their pros and cons, which cannot be listed in detail.
2192 If you only want to have simple author-year (or author-numerical) style,
2193 or if you want to use one of the countless style files for
2194 \begin_inset Flex Code
2197 \begin_layout Plain Layout
2203 , than the established
2204 \begin_inset Flex Code
2207 \begin_layout Plain Layout
2213 package is probably your choice.
2214 If you need special features like short title references, ibidem etc., you
2216 \begin_inset Flex Code
2219 \begin_layout Plain Layout
2228 \begin_layout Standard
2229 The handling of both packages in LyX is basically the same.
2231 \begin_inset Flex MenuItem
2234 \begin_layout Plain Layout
2235 Document\SpecialChar \menuseparator
2242 \begin_inset Flex MenuItem
2245 \begin_layout Plain Layout
2252 \begin_inset Flex MenuItem
2255 \begin_layout Plain Layout
2262 \begin_inset Flex MenuItem
2265 \begin_layout Plain Layout
2272 With both packages, you will get some extra features in the citation dialog
2273 and you can select the style of the reference (
2274 \begin_inset Quotes eld
2278 \begin_inset Quotes erd
2282 \begin_inset Quotes eld
2286 \begin_inset Quotes erd
2290 \begin_inset Quotes eld
2294 \begin_inset Quotes erd
2298 \begin_inset Quotes eld
2302 \begin_inset Quotes erd
2306 Note that both packages need specifically designed style files.
2307 They both ship their own, but there are lots of additional style files,
2308 and there is even an interactive style file builder
2312 \begin_layout Plain Layout
2314 \begin_inset Flex URL
2317 \begin_layout Plain Layout
2319 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2330 \begin_inset Flex Code
2333 \begin_layout Plain Layout
2342 \begin_layout Subsection
2343 Sectioned Bibliographies
2346 \begin_layout Standard
2347 Sometimes you might need to divide your bibliography into several sections.
2348 If you are for instance a historian, the possibility to separate sources
2349 and scientific works is most likely a
2350 \begin_inset Quotes eld
2354 \begin_inset Quotes erd
2358 Unfortunately, BibTeX itself does not allow you to do this.
2359 But with the help of some LaTeX packages, BibTeX can be extended to fit
2363 \begin_layout Standard
2364 LyX provides native support for one of these packages,
2372 \begin_layout Plain Layout
2374 \begin_inset Flex URL
2377 \begin_layout Plain Layout
2379 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2389 The advantage of this package (compared to other packages like
2393 ) is that you don't need to define new citation commands.
2394 Instead, you need to prepare different bibliographic databases which include
2395 the entries for the different sections of the bibliography.
2396 For example: If you want to divide your bibliography into the sections
2398 \begin_inset Quotes eld
2402 \begin_inset Quotes erd
2406 \begin_inset Quotes eld
2410 \begin_inset Quotes erd
2413 , you first need to create two bibliographic databases, e.
2414 \begin_inset space \thinspace{}
2418 \begin_inset space \space{}
2422 \begin_inset Flex Code
2425 \begin_layout Plain Layout
2432 \begin_inset Flex Code
2435 \begin_layout Plain Layout
2445 \begin_layout Standard
2447 \begin_inset Flex MenuItem
2450 \begin_layout Plain Layout
2451 Document\SpecialChar \menuseparator
2458 \begin_inset Flex MenuItem
2461 \begin_layout Plain Layout
2468 \begin_inset Flex MenuItem
2471 \begin_layout Plain Layout
2472 Sectioned bibliography
2478 Now you can insert multiple BibTeX bibliographies, one for each section
2479 of your bibliography.
2480 Returning to our example: Insert the BibTeX bibliography
2481 \begin_inset Flex Code
2484 \begin_layout Plain Layout
2490 and a second one for the database
2491 \begin_inset Flex Code
2494 \begin_layout Plain Layout
2501 You are free to use the same or different styles for each section.
2502 Additionally, you can chose if the bibliography section should contain
2504 \begin_inset Quotes eld
2507 all cited references
2508 \begin_inset Quotes erd
2511 of the specified database(s) (which is the default),
2512 \begin_inset Quotes eld
2515 all uncited references
2516 \begin_inset Quotes erd
2520 \begin_inset Quotes eld
2524 \begin_inset Quotes erd
2528 This might be useful if you would like to separate your bibliography into
2530 \begin_inset Quotes eld
2534 \begin_inset Quotes erd
2538 \begin_inset Quotes eld
2542 \begin_inset Quotes erd
2546 \begin_inset Quotes eld
2550 \begin_inset Quotes erd
2554 The titles for the sections can be added as ordinary sections or subsections.
2556 \begin_inset Flex Code
2559 \begin_layout Plain Layout
2565 removes the bibliography title, you have manually re-add that, too (as
2566 a chapter* or section*, for instance).
2569 \begin_layout Subsection
2570 Multiple Bibliographies
2573 \begin_layout Standard
2574 Multiple bibliographies, e.
2575 \begin_inset space \thinspace{}
2579 \begin_inset space \space{}
2582 a bibliography for each section or chapter of the document, are not supported
2585 \begin_inset Flex Code
2588 \begin_layout Plain Layout
2594 package, which is used for the creation of sectioned bibliographies in
2595 LyX (see the previous section), provides an easy way to solve this task,
2596 if you are willing to use some
2597 \begin_inset Flex MenuItem
2600 \begin_layout Plain Layout
2607 \begin_inset space ~
2611 \begin_inset CommandInset ref
2613 reference "sec:Inserting-TeX-Code"
2621 \begin_layout Plain Layout
2622 An alternative approach is to use the
2623 \begin_inset Flex Code
2626 \begin_layout Plain Layout
2633 \begin_inset Flex Code
2636 \begin_layout Plain Layout
2642 package, respectively.
2650 \begin_layout Standard
2652 \begin_inset Flex MenuItem
2655 \begin_layout Plain Layout
2656 Document\SpecialChar \menuseparator
2663 \begin_inset Flex MenuItem
2666 \begin_layout Plain Layout
2673 \begin_inset Flex MenuItem
2676 \begin_layout Plain Layout
2677 Sectioned bibliography
2683 In the document, you have to enclose the sections, which shall contain
2684 their own bibliography (including the BibTeX bibliography itself), between
2686 \begin_inset Flex Code
2689 \begin_layout Plain Layout
2698 \begin_inset Flex Code
2701 \begin_layout Plain Layout
2709 (those commands have to be inserted as TeX code).
2710 The bibliography will contain all references which have been cited in the
2712 \begin_inset Flex Code
2715 \begin_layout Plain Layout
2726 If you are using this approach, then every citation reference has to be
2728 \begin_inset Flex Code
2731 \begin_layout Plain Layout
2739 \begin_inset Flex Code
2742 \begin_layout Plain Layout
2751 \begin_layout Section
2755 \begin_layout Subsection
2759 \begin_layout Standard
2760 When you are working on a large file with many sections, it is often convenient
2761 to break up the document into several files, or perhaps you have something
2762 where a table may change from time to time, but the preceding text does
2764 In these cases, you should seriously consider using multipart documents.
2765 For example, scientific papers often have five major sections: the introduction
2766 , observations, results, discussion, and conclusion.
2767 Each of these could be its own separate LyX file, with one
2768 \begin_inset Quotes eld
2772 \begin_inset Quotes erd
2775 file which contains the title, authors, abstract, references, etc., plus
2776 the five included files.
2777 It is important to note that each of these files is a full LyX file which
2778 can be formatted and printed on its own, as well as included in a master
2780 Each of these files must have the same document class, however—don't attempt
2781 to mix book classes with article classes.
2782 You may also include LaTeX files; however, these files must not have their
2784 \begin_inset space \thinspace{}
2788 \begin_inset space \space{}
2791 everything up to and including the
2792 \begin_inset Flex Code
2795 \begin_layout Plain Layout
2804 \begin_inset Flex Code
2807 \begin_layout Plain Layout
2815 line must be deleted) or else errors will be generated when you try to
2819 \begin_layout Standard
2820 LyX allows you to include files quite easily with
2821 \begin_inset Flex MenuItem
2824 \begin_layout Plain Layout
2825 Insert\SpecialChar \menuseparator
2827 \begin_inset space ~
2836 When you click on this selection a small box is inserted into the file
2837 at the current cursor location.
2838 Clicking on the box raises a dialog which allows you to select the file
2839 to be included, and the method of its inclusion.
2843 \begin_layout Standard
2844 The file selection box should by now be obvious.
2845 The three inclusion methods are
2846 \begin_inset Quotes eld
2850 \begin_inset Quotes erd
2854 \begin_inset Quotes eld
2858 \begin_inset Quotes erd
2862 \begin_inset Quotes eld
2866 \begin_inset Quotes erd
2870 The difference between
2871 \begin_inset Quotes eld
2875 \begin_inset Quotes erd
2879 \begin_inset Quotes eld
2883 \begin_inset Quotes erd
2886 is really only meaningful to LaTeXperts, but the practical difference is
2887 that files which are
2888 \begin_inset Quotes eld
2892 \begin_inset Quotes erd
2895 are typeset beginning on a new page, while files which are
2896 \begin_inset Quotes eld
2900 \begin_inset Quotes erd
2903 are typeset starting on the current page.
2906 \begin_layout Standard
2907 Generally, the master file is converted into a full LaTeX file before typesettin
2908 g, while the included files are converted to LaTeX files which do not have
2909 all the preamble information.
2912 \begin_layout Standard
2914 \begin_inset Quotes eld
2918 \begin_inset Quotes erd
2921 included file allows you to include a file typeset exactly as it appears
2923 \begin_inset space \thinspace{}
2927 \begin_inset space \space{}
2931 \begin_inset Flex Code
2934 \begin_layout Plain Layout
2940 mode, with the characters set in a fixed-width typewriter font.
2941 Normally, spaces in this file are invisible, though two consecutive spaces
2942 are conserved, unlike LyX's normal treatment of spaces.
2943 However, setting the
2944 \begin_inset Flex MenuItem
2947 \begin_layout Plain Layout
2949 \begin_inset space ~
2953 \begin_inset space ~
2957 \begin_inset space ~
2965 checkbox typesets a mark to unambiguously define the presence of a space.
2969 \begin_layout Subsection
2970 Cross-References Between Files
2973 \begin_layout Standard
2974 \begin_inset Box Shadowbox
2984 height_special "totalheight"
2987 \begin_layout Plain Layout
2988 This section is somewhat out of date.
2989 Need to describe default master documents and how children are opened when
2999 \begin_layout Standard
3000 It is possible to set up cross-references between the different files.
3001 First, open all the files in question: let's call them A and B in a two
3002 file example, where B is included in A.
3003 Let's say you insert a label in A, then want to reference it in B.
3004 Open the cross-reference dialog in whilst in document B, and you can select
3006 \begin_inset Quotes eld
3010 \begin_inset Quotes erd
3016 \begin_layout Subsection
3017 Bibliography Lists in all Subdocuments
3020 \begin_layout Standard
3021 \begin_inset Box Frameless
3031 height_special "totalheight"
3034 \begin_layout Plain Layout
3035 This section also needs updating.
3036 There is now material about this on the wiki, and it could be copied here.
3044 \begin_layout Standard
3045 Copy the bibliography list with all entries to all subdocuments and transform
3047 This way LyX will find the
3048 \begin_inset Flex Code
3051 \begin_layout Plain Layout
3057 -files and you can easily insert references without making the bibliography
3061 \begin_layout Standard
3062 As the bibliography list is in a comment, LaTeX won't use use it and the
3063 references will look like this: [?], instead of like this: [1].
3064 One solution is to use the LaTeX-package
3065 \begin_inset Flex Code
3068 \begin_layout Plain Layout
3074 that will only include comments by processing the files separately.
3075 To do this, add in the LaTeX preamble of every subdocument the following:
3078 \begin_layout LyX-Code
3084 \begin_layout LyX-Code
3087 includecomment{comment}
3090 \begin_layout Standard
3092 \begin_inset Flex URL
3095 \begin_layout Plain Layout
3097 http://wiki.lyx.org/FAQ/Unsorted#toc31
3105 \begin_layout Section
3106 Fancy Headers and Footers
3109 \begin_layout Standard
3110 The default page layout is rather plain; for an
3111 \begin_inset Flex Code
3114 \begin_layout Plain Layout
3120 document class, all you get is a centered page number at the bottom of
3122 This document uses KOMA-script's book class, so it appears to be a bit
3124 But to really put on a show, you need to set the document page style to
3126 \begin_inset Quotes eld
3130 \begin_inset Quotes erd
3133 , as mentioned in the
3138 This section describes the LaTeX code you need to insert in your LaTeX
3139 preamble in order to get the desired effects.
3142 \begin_layout Standard
3143 For more information on fancy headers, see the
3144 \begin_inset Flex Code
3147 \begin_layout Plain Layout
3153 package documentation.
3155 \begin_inset Flex URL
3158 \begin_layout Plain Layout
3160 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3168 \begin_layout Standard
3169 The page header is divided into three fields, not surprisingly labeled
3170 \begin_inset Quotes eld
3174 \begin_inset Quotes erd
3178 \begin_inset Quotes eld
3182 \begin_inset Quotes erd
3186 \begin_inset Quotes eld
3190 \begin_inset Quotes erd
3194 The footer is also divided into these three fields.
3195 The LaTeX commands to set these fields in the simplest manner are
3196 \begin_inset Flex Code
3199 \begin_layout Plain Layout
3208 \begin_inset Flex Code
3211 \begin_layout Plain Layout
3220 \begin_inset Flex Code
3223 \begin_layout Plain Layout
3232 \begin_inset Flex Code
3235 \begin_layout Plain Layout
3244 Suppose you wish to put your name in the upper left hand corner of each
3246 Simply insert the following command in the preamble:
3249 \begin_layout Standard
3258 \begin_layout Standard
3259 You will now see your name in the upper left.
3260 If a field has a default entry that you would like to get rid of (often
3261 the page number appears in the central footer, simply include a command
3262 with a blank argument, e.
3263 \begin_inset space \thinspace{}
3269 \begin_layout Standard
3277 \begin_layout Standard
3278 Let's get really fancy: lets put the section number with the word
3279 \begin_inset Quotes eld
3283 \begin_inset Quotes erd
3287 \begin_inset space \thinspace{}
3291 \begin_inset space \space{}
3294 Section 3) in the upper left, the page number (e.
3295 \begin_inset space \thinspace{}
3299 \begin_inset space \space{}
3302 Page 4) in the upper right, your name in the lower left, and the date in
3304 The following commands should now appear in the preamble:
3307 \begin_layout Standard
3317 \begin_layout Standard
3325 \begin_layout Standard
3335 \begin_layout Standard
3344 \begin_layout Standard
3352 \begin_layout Standard
3362 \begin_layout Standard
3364 \begin_inset Flex Code
3367 \begin_layout Plain Layout
3376 \begin_inset Flex Code
3379 \begin_layout Plain Layout
3387 access LaTeX's section and page counters, and so print out the current
3388 section and page numbers.
3390 \begin_inset Flex Code
3393 \begin_layout Plain Layout
3401 simply prints out today's date.
3404 \begin_layout Standard
3405 The thicknesses of the horizontal rules drawn beneath the header and above
3406 the footer can also be modified.
3407 If you don't want one of the rules, set its thickness to 0.
3408 The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3414 \begin_inset Flex Code
3417 \begin_layout Plain Layout
3422 headrulewidth}{0.4pt}
3428 \begin_inset Flex Code
3431 \begin_layout Plain Layout
3436 footrulewidth}{0.4pt}
3441 to set the thicknesses.
3444 \begin_layout Standard
3445 You can switch the header/footer settings on and off for individual pages
3447 \begin_inset Flex Code
3450 \begin_layout Plain Layout
3453 thispagestyle{empty}
3459 \begin_inset Flex Code
3462 \begin_layout Plain Layout
3465 thispagestyle{plain}
3471 \begin_inset Flex Code
3474 \begin_layout Plain Layout
3477 thispagestyle{fancy}
3483 Simply insert them in the text on the page you want changed and mark them
3485 In fact, title pages are marked as plain by default, while following pages
3486 are marked fancy when using the global fancy setting.
3489 \begin_layout Standard
3490 As a final example, it is possible to include an image in the header or
3492 Suppose you want to put a company logo in the upper lefthand corner.
3493 You might try something like
3496 \begin_layout Standard
3505 includegraphics{logo.eps}}}
3508 \begin_layout Standard
3510 (you may need to preface this with
3511 \begin_inset Flex Code
3514 \begin_layout Plain Layout
3518 usepackage{graphics}
3523 if you don't include graphics elsewhere in your document).
3526 \begin_layout Section
3527 Itemize Bullet Selection
3528 \begin_inset CommandInset label
3537 \begin_layout Standard
3543 \begin_layout Subsection
3547 \begin_layout Standard
3548 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3549 Using this dialog you can easily specify what bullet shape to use at each
3550 level of an itemized list.
3551 These settings are document-wide so you won't be able to specify different
3552 sets of bullets for different paragraphs.
3556 \begin_layout Plain Layout
3557 Well, actually you can but you'll have to do it by hand.
3565 \begin_layout Subsection
3569 \begin_layout Standard
3570 Open the dialog by selecting the
3571 \begin_inset Flex MenuItem
3574 \begin_layout Plain Layout
3575 Document\SpecialChar \menuseparator
3581 menu item and then select the
3582 \begin_inset Flex MenuItem
3585 \begin_layout Plain Layout
3594 \begin_layout Standard
3595 The dialog provides you with a table of bullet shapes.
3596 A column of buttons on the left of the table provides access to the six
3597 different panels of bullet shapes.
3598 The row of buttons across the top is used to select which bullet depth
3600 A text entry under the table shows the currently selected bullet shape's
3601 LaTeX equivalent and this can be edited if desired.
3602 If you do modify the text you will also need to specify any needed packages
3603 in the LaTeX preamble.
3606 \begin_layout Standard
3607 The six panels are divided up by the packages they require.
3608 The following table shows the mappings from button name to LaTeX packages.
3611 \begin_layout Standard
3613 \begin_inset Tabular
3614 <lyxtabular version="3" rows="7" columns="2">
3615 <features tabularvalignment="middle">
3616 <column alignment="center" valignment="top" width="0pt">
3617 <column alignment="center" valignment="top" width="0pt">
3619 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3622 \begin_layout Plain Layout
3637 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3640 \begin_layout Plain Layout
3657 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3660 \begin_layout Plain Layout
3675 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3678 \begin_layout Plain Layout
3694 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3697 \begin_layout Plain Layout
3712 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3715 \begin_layout Plain Layout
3732 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3735 \begin_layout Plain Layout
3750 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3753 \begin_layout Plain Layout
3770 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3773 \begin_layout Plain Layout
3788 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3791 \begin_layout Plain Layout
3808 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3811 \begin_layout Plain Layout
3826 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3829 \begin_layout Plain Layout
3846 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3849 \begin_layout Plain Layout
3864 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3867 \begin_layout Plain Layout
3890 \begin_layout Standard
3891 LyX doesn't stop you using bullets from packages you don't have.
3892 If you get errors from LaTeX when you try to view or print the file, then
3893 it is likely you are missing a package.
3897 \begin_layout Plain Layout
3898 LyX doesn't restrict your use since you may be editing locally and exporting
3907 \begin_layout Subsection
3911 \begin_layout Standard
3912 Select which bullet depth you want to change then select the bullet shape
3914 Any changes will not be visible in LyX, but are visible when viewing the
3918 \begin_layout Standard
3919 You can reset a bullet shape to the default simply by clicking your right
3920 mouse button on the appropriate bullet depth button.
3924 \begin_layout Plain Layout
3929 want to have multiple sets of paragraphs with different sets of bullets
3930 in each, then you're going to have to get your hands dirty with TeX code.
3931 The bullet selection dialog can help though because it provides you with
3932 the LaTeX code for a wide range of bullet shapes.
3933 To make your own custom paragraphs you have the following options:
3936 \begin_layout Plain Layout
3940 \begin_layout Plain Layout
3956 \begin_layout Plain Layout
3960 \begin_layout Plain Layout
3982 \begin_layout Itemize
3983 Use the LaTeX command
3984 \begin_inset Flex Code
3987 \begin_layout Plain Layout
3995 to specify a new bullet shape for a given depth.
3996 You'll also need to save the current bullet shape so you can restore it
3998 In this itemized list the following LaTeX code was used to change the bullet
3999 used for the first depth.
4003 \begin_layout LyX-Code
4013 \begin_layout LyX-Code
4030 \begin_layout Itemize
4031 Note that the itemize depth is specified in Roman numerals as part of the
4041 \begin_layout Itemize
4045 \begin_layout Plain Layout
4058 Specify each individual entry by starting each item with the bullet shape
4059 enclosed in square brackets and set as
4060 \begin_inset Flex MenuItem
4063 \begin_layout Plain Layout
4070 For example, this item was started with
4071 \begin_inset Flex Code
4074 \begin_layout Plain Layout
4089 \begin_layout Plain Layout
4093 \begin_layout Plain Layout
4109 \begin_layout Plain Layout
4110 You'll also need to revert the labelitem back to its previous setting for
4111 the global bullet shape settings to remain in effect.
4112 The way used here was:
4115 \begin_layout LyX-Code
4130 \begin_layout Chapter
4131 LyX and the World Wide Web
4134 \begin_layout Standard
4135 LyX has long supported the export of documents to various web-friendly formats,
4137 Before verson 2.0, however, HTML export was always accomplished by the use
4138 of external converters.
4142 \begin_layout Plain Layout
4143 For details on the use of external converters with LyX, see the
4147 section of the Customization manual.
4152 These fall into two large groups: there are converters that use LaTeX as
4153 an intermediate format, such as
4154 \begin_inset Flex Code
4157 \begin_layout Plain Layout
4164 \begin_inset Flex Code
4167 \begin_layout Plain Layout
4174 \begin_inset Flex Code
4177 \begin_layout Plain Layout
4183 , relying upon LyX to produce the LaTeX; and there is a converter that works
4184 directly on LyX files,
4185 \begin_inset Flex Code
4188 \begin_layout Plain Layout
4195 All of these have different advantages and disadvantages.
4199 \begin_layout Standard
4200 The LaTeX-based converters have the advantage that, in principle, they know
4201 everything about the exported document that LaTeX does.
4202 Such converters do not care, for example, if a certain block of code was
4203 produced by LyX or was Evil Red Text.
4204 These converters know about
4205 \begin_inset Flex Code
4208 \begin_layout Plain Layout
4214 files, counters, and references, and can often make use of the
4215 \begin_inset Flex Code
4218 \begin_layout Plain Layout
4224 files generated by BibTeX.
4225 On the other hand, LaTeX is a very hard language to parse---it is sometimes
4226 said that only TeX itself understands TeX---and LaTeX-based converters
4227 will often choke on what seem to be quite simple constructs; complex ones
4228 can throw them completely, and as of this writing, for example, the
4232 manual will not export with
4233 \begin_inset Flex Code
4236 \begin_layout Plain Layout
4242 , though the others will.
4243 The other issue concerns how math is handled.
4244 These converters typically convert the formulae into little pictures that
4245 are then linked from the HTML document.
4246 Since these are actually generated by LaTeX, they are accurate.
4247 But they do not scale well, and just getting them to look as if they are
4248 actually meant to be in your document---so that the font sizes seem to
4249 be roughly the same---can be a challenge.
4252 \begin_layout Standard
4254 \begin_inset Flex Code
4257 \begin_layout Plain Layout
4264 \begin_inset CommandInset href
4266 name "http://elyxer.nongnu.org/"
4267 target "http://elyxer.nongnu.org/"
4271 ) solves some of these problems.
4272 In particular, the formulae it produces scale perfectly, since it renders
4273 math using a combination of HTML and CSS rather than converting the formulae
4275 But even moderately complex formula are rendered less well than with
4276 \begin_inset Flex Code
4279 \begin_layout Plain Layout
4285 ; this reflects the limitations of HTML.
4289 \begin_layout Plain Layout
4291 \begin_inset Flex Code
4294 \begin_layout Plain Layout
4300 can also use jsMath and MathJax for equations, but this setting is only
4301 available globally and requires one to have access to a server that runs
4307 More importantly (as of version 1.1.1, at least),
4308 \begin_inset Flex Code
4311 \begin_layout Plain Layout
4317 has limited support for math macros and no support for user-defined paragraph
4318 or character styles.
4319 These limitations make
4320 \begin_inset Flex Code
4323 \begin_layout Plain Layout
4329 unsuitable for many of the documents LyX users produce.
4330 In principle, of course, these problems could be solved, but the LyX developers
4331 have decided to follow a different path and have made LyX itself capable
4332 of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4336 \begin_layout Standard
4337 As of this writing, XHTML output remains under development and should probably
4339 \begin_inset Quotes eld
4343 \begin_inset Quotes erd
4350 \begin_layout Plain Layout
4352 \begin_inset Flex Code
4355 \begin_layout Plain Layout
4356 development/HTML.notes
4361 , which can be found in the LyX source tree or
4362 \begin_inset CommandInset href
4364 name "accessed online"
4365 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4369 , usually contains up-to-date information about the state of XHTML output.
4370 See also the list of XHTML bugs on
4371 \begin_inset CommandInset href
4373 name "the bug tracker"
4374 target "http://www.lyx.org/trac/query?status=reopened&status=assigned&status=new&max=0&component=xhtml+export&order=id&col=id&col=summary&col=reporter&col=keywords&keywords=%21%7Efixedintrunk&desc=1"
4383 Still, the developers have chosen this approach because it has several
4384 potential advantages over the other two.
4387 \begin_layout Standard
4388 These advantages are primarily due to the fact that the XHTML output routines,
4389 since they are part of LyX, know everything LyX knows about the document
4394 \begin_layout Plain Layout
4395 Another advantage is that, since these routines are internal to LyX, they
4396 are immune to changes in LyX's file format, or to changes in the semantics
4402 So they know about the table of contents (as displayed in the outline),
4403 about the counters associated with different paragraph styles, and about
4404 user-defined styles.
4405 The XHTML output routines know what LyX knows about internationalization,
4406 too, so they will output
4407 \begin_inset Quotes eld
4411 \begin_inset Quotes erd
4415 \begin_inset Quotes eld
4423 \begin_inset Quotes erd
4426 , depending upon the language in effect at the time.
4430 \begin_layout Standard
4431 Quite generally, the output routines know what LyX knows about document
4432 layout, that is, about how the document is to be rendered on screen.
4433 We use this information when we output the document as XHTML.
4438 generates CSS style information corresponding to the layout information
4439 it uses to render the document on screen: if section headings are supposed
4440 to be sans-serif and bold as seen in LyX, then (by default) they will be
4441 sans-serif and bold when viewed in a web browser, too.
4442 And this is true not just for pre-defined styles, like Section, but for
4443 any style, including user-defined styles.
4444 Indeed, the XHTML output routines make no distinction between user-defined
4445 paragraph and character styles and LyX's own pre-defined styles: in each
4446 case, everything LyX knows about the styles is contained in the layout
4448 And much the same is true as regards pre-defined textual insets, such as
4449 footnotes, and various custom insets.
4453 \begin_layout Standard
4454 The result is that XHTML output can be customized and extended in exactly
4455 the same way LaTeX output can be customized and extended: through layout
4457 See chapter five of the
4461 manual for the details.
4464 \begin_layout Standard
4465 The remainder of this chapter contains more detailed information on XHTML
4466 output, its limitations, and ways to work around those limitations.
4469 \begin_layout Section
4470 Math Output in XHTML
4473 \begin_layout Standard
4474 LyX offers four choices for how math is rendered.
4475 These have various advantages and disadvantages:
4478 \begin_layout Itemize
4480 \begin_inset Newline newline
4483 MathML is a dialect of XML designed specifically for mathematics on the
4484 web, and it typically renders very well in browsers that support it.
4485 The disadvantage is that not all browsers support MathML, and support is
4486 not complete even in the Gecko-based browsers, such as Firefox.
4487 \begin_inset Newline newline
4490 If LyX is unable to render a formula as MathML---for example, if the formula
4492 \begin_inset Flex Code
4495 \begin_layout Plain Layout
4501 package or ERT---then it will instead output the formula as an image.
4505 \begin_layout Itemize
4507 \begin_inset Newline newline
4511 \begin_inset Flex Code
4514 \begin_layout Plain Layout
4520 outputs math as HTML, styled by CSS.
4524 \begin_layout Plain Layout
4525 LyX has borrowed some of the CSS for its HTML output from
4526 \begin_inset Flex Code
4529 \begin_layout Plain Layout
4540 For simple formulae, this can work quite well, though with more complicated
4541 formulae it tends to break down.
4542 Still, this method has the advantage that it is very widely supported and
4543 so it may be appropriate for documents that contain only a little, fairly
4545 \begin_inset Newline newline
4548 If Lyx is unable to render a formula as HTML---for example, if the formula
4550 \begin_inset Flex Code
4553 \begin_layout Plain Layout
4559 package or ERT---then it will instead output the formula as an image.
4563 \begin_layout Itemize
4565 \begin_inset Newline newline
4569 \begin_inset Flex Code
4572 \begin_layout Plain Layout
4578 , LyX will output formulae as images, the very same images, in fact, that
4579 are used for instant preview.
4583 \begin_layout Plain Layout
4584 Instant preview does
4588 have to be on for images to be output, however.
4593 The advantage to this method is that the images are simply generated by
4594 LaTeX, so they are very accurate.
4595 The disadvantage, as mentioned earlier, is that these are bitmapped images,
4596 so they do not scale terribly well, and one cannot copy them, etc.
4597 (As of this writing, there are also problems about equation numbering.
4599 \begin_inset CommandInset href
4602 target "http://www.lyx.org/trac/ticket/6894"
4607 \begin_inset Newline newline
4610 The size of the images can be controlled by setting the
4611 \begin_inset Quotes eld
4615 \begin_inset Quotes erd
4619 \begin_inset Flex MenuItem
4622 \begin_layout Plain Layout
4623 Document\SpecialChar \menuseparator
4624 Settings\SpecialChar \menuseparator
4634 \begin_layout Plain Layout
4635 For those who want to know, this controls the resolution of the image in
4636 dots per inch and is based upon a default of 75 dpi.
4642 \begin_inset Newline newline
4645 If LyX for some reason fails to create an image for a formula (e.g., if a
4646 required LaTeX package is not installed), then it will fall back to outputing
4650 \begin_layout Itemize
4652 \begin_inset Newline newline
4655 Finally, LyX will happily output math as LaTeX.
4656 As well as being the output of last resort, this method can be used with
4658 \begin_inset CommandInset href
4661 target "http://www.math.union.edu/~dpvc/jsMath/"
4665 , which uses JavaScript to render LaTeX embedded in HTML documents.
4666 LyX wraps the LaTeX in either a
4667 \begin_inset Flex Code
4670 \begin_layout Plain Layout
4676 (for inline formulas) or
4677 \begin_inset Flex Code
4680 \begin_layout Plain Layout
4686 (for displayed formulas) with
4687 \begin_inset Flex Code
4690 \begin_layout Plain Layout
4696 , as is required for jsMath.
4699 \begin_layout Standard
4700 One of these output methods must be selected under
4701 \begin_inset Flex MenuItem
4704 \begin_layout Plain Layout
4705 Document\SpecialChar \menuseparator
4706 Settings\SpecialChar \menuseparator
4713 By default, LyX outputs MathML.
4714 This is a document-wide setting, therefore.
4717 \begin_layout Standard
4718 Eventually, LyX will offer the user the option to select an alternate output
4719 method for a particular inset, say, one that isn't being rendered very
4724 \begin_layout Plain Layout
4725 That said, since LyX falls back to images if the inset contains ERT, then
4726 one can force output as an image by putting some harmless ERT into the
4728 \begin_inset Formula $a=b\relax$
4739 \begin_layout Section
4740 Bibliography and Citations
4743 \begin_layout Standard
4744 XHTML output fully supports bibliographies and citations.
4748 \begin_layout Standard
4749 Citation labels are generated by the same machinery that generates LyX's
4750 on-screen labels, so the labels will look in the output much as they do
4751 in LyX, though better.
4752 If you are using numerical citations, then LyX will output numerical labels,
4753 such as [1] or [17], rather than simply showing the citation key in square
4754 brackets, as it does on-screen.
4755 If you are using author-year citations, then LyX will add lowercase letters
4756 to the years, just as BibTeX does, if it finds more than one citation for
4757 a given author-year combination.
4758 The labels will be printed with the bibliography entries.
4759 Note that there is, at present, no way to customize the appearance of the
4760 labels, for example, to choose between square brackets and parentheses.
4763 \begin_layout Standard
4764 Bibliography output is handled by the same machinery that handles the presentati
4765 on of reference information in the citation dialog, so you will see in the
4766 XHTML output pretty much what you would see if you were to look at a given
4767 entry in the citation dialog.
4768 The formatting can be customized in your layout file or, preferably, in
4774 manual for the details.
4777 \begin_layout Standard
4778 The main defect at present is that cross-referenced information is printed
4779 with every entry with which it is associated.
4780 So you can see things like this:
4785 \begin_inset Quotes eld
4788 Context and Logical Form
4789 \begin_inset Quotes erd
4794 Language in Context: Selected Essays
4796 (Oxford: Oxford University Press, 2007), pp.
4802 \begin_inset Quotes eld
4805 Semantics in Context
4806 \begin_inset Quotes erd
4811 Language in Context: Selected Essays
4813 (Oxford: Oxford University Press, 2007), pp.
4817 \begin_layout Standard
4818 This should be fixed before long.
4821 \begin_layout Standard
4822 There is no support at present for sectioned bibliographies.
4823 If you have multiple bibliographies, then LyX will print the same bibliography
4827 \begin_layout Section
4831 \begin_layout Standard
4832 LyX will happily export indexes as XHTML, but with certain limitations at
4836 \begin_layout Standard
4837 Index export will be most reliable when you do not attempt to use the fancy
4838 constructs that are described in the section on indexes in the
4846 \begin_layout Plain Layout
4847 The main issue here is that LyX itself does not really handle these.
4848 It just lets you enter what you would have to enter in raw LaTeX.
4853 We'll describe how they are handled using the subsection headings from
4857 \begin_layout Itemize
4858 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
4859 these, but the entries must be separated by
4860 \begin_inset Quotes eld
4864 \begin_inset Quotes erd
4867 , that is, there must be spaces around the exclamation point.
4868 This is because it is otherwise too difficult to check for escaped exclamation
4869 points, ones in math, and so forth.
4872 \begin_layout Itemize
4873 Page Ranges: There is no support at all for page ranges, since these make
4874 no sense with XHMTL.
4875 Instead, you will just get two index entries, one at either end.
4878 \begin_layout Itemize
4879 Cross-referencing: There is no support for cross-referencing.
4880 If LyX finds an entry containing the
4881 \begin_inset Quotes eld
4884 |see\SpecialChar \ldots{}
4886 \begin_inset Quotes erd
4889 construct, it is just dropped, and the rest is treated as an ordinary index
4893 \begin_layout Itemize
4894 Index Entry Order: LyX does support attempts to fix the sorting order.
4895 It will take what is before the first `@' it finds and use that for sorting,
4896 taking what follows the first `@' to be the actual entry.
4897 At present, LyX does not check for escaped `@', so do not try to index
4901 \begin_layout Itemize
4902 Index Entry Layout: You can format entries by using the text style dialog,
4903 or by using any other method available within LyX itself.
4904 There is no support for constructs like:
4905 \begin_inset Quotes eld
4909 \begin_inset Quotes erd
4913 Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
4914 and everything that follows it.
4917 \begin_layout Itemize
4918 Multiple Indexes: There is no support for multiple indexes.
4919 Rather, all index entries will be printed as one large index.
4920 To avoid our printing several versions of the index, we print only the
4921 main index, so make sure you have one.
4924 \begin_layout Section
4925 Nomenclature and Glossary
4928 \begin_layout Standard
4929 There is at present no support for glossaries.
4930 Adding it would be fairly trivial, and welcome.
4933 \begin_layout Chapter
4937 \begin_layout Section
4941 \begin_layout Standard
4942 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
4943 and retrieve information about the LyX internal state.
4944 This is only intended for advanced users, but they should find it useful.
4945 It is by writing to the LyX server, for example, that bibliography managers,
4946 such as JabRef, are able to
4947 \begin_inset Quotes eld
4951 \begin_inset Quotes erd
4957 \begin_layout Section
4958 Starting the LyX Server
4961 \begin_layout Standard
4962 The LyX server works through the use of a pair of named pipes.
4963 These are usually located in
4964 \begin_inset Flex Code
4967 \begin_layout Plain Layout
4973 , (except on Windows, where
4977 named pipes are special objects located in
4978 \begin_inset Flex Code
4981 \begin_layout Plain Layout
4993 ) and have the names
4994 \begin_inset Quotes eld
4998 \begin_inset Flex Code
5001 \begin_layout Plain Layout
5008 \begin_inset Quotes erd
5012 \begin_inset Quotes eld
5016 \begin_inset Flex Code
5019 \begin_layout Plain Layout
5026 \begin_inset Quotes erd
5030 External programs write into
5031 \begin_inset Flex Code
5034 \begin_layout Plain Layout
5040 and read back data from
5041 \begin_inset Flex Code
5044 \begin_layout Plain Layout
5051 The stem of the pipe names can be defined in the
5052 \begin_inset Flex MenuItem
5055 \begin_layout Plain Layout
5056 Tools\SpecialChar \menuseparator
5063 \begin_inset Flex Code
5066 \begin_layout Plain Layout
5067 "/home/myhome/lyxpipe"
5073 \begin_inset Flex Code
5076 \begin_layout Plain Layout
5090 on Windows (but any working path can be used).
5095 configure this manually in order for the server to start.
5098 \begin_layout Standard
5100 \begin_inset Flex Code
5103 \begin_layout Plain Layout
5110 \begin_inset Flex Code
5113 \begin_layout Plain Layout
5119 ' to create the pipes.
5120 If one of the pipes already exists, LyX will assume that another LyX process
5121 is already running and will not start the server.
5122 On POSIX (Unix like) systems, if for some other reason, an unused
5123 \begin_inset Quotes eld
5127 \begin_inset Quotes erd
5130 pipe is left in existence when LyX closes, then LyX will try to delete
5132 If this fails for some reason, you will need to delete the pipes manually
5133 and then restart LyX.
5134 On Windows, pipes are deleted by the OS on program termination or crash,
5136 \begin_inset Quotes eld
5140 \begin_inset Quotes erd
5143 pipes should not be possible.
5146 \begin_layout Standard
5147 To have several LyX processes with servers at the same time, you have to
5148 use different configurations, perhaps by using separate user directories,
5150 \begin_inset Flex Code
5153 \begin_layout Plain Layout
5159 file, for each process.
5162 \begin_layout Standard
5163 If you are developing a client program, you might find it useful to enable
5164 debugging information from the LyX server.
5165 Do this by starting LyX as
5166 \begin_inset Flex Code
5169 \begin_layout Plain Layout
5178 \begin_layout Standard
5179 You can find a complete example client written in C in the source distribution
5181 \begin_inset Flex Code
5184 \begin_layout Plain Layout
5185 development/lyxserver/server_monitor.c
5193 \begin_layout Standard
5194 Another useful tool is command-line based client you will find in
5195 \begin_inset Flex Code
5198 \begin_layout Plain Layout
5199 src/client/lyxclient
5207 \begin_layout Section
5208 Normal communication
5211 \begin_layout Standard
5212 To issue a LyX call, the client writes a line of ASCII text into the input
5214 This line has the following format:
5231 \begin_layout Description
5232 clientname is a name that the client can choose arbitrarily.
5233 Its only use is that LyX will echo it if it sends an answer—so a client
5234 can dispatch results from different requesters.
5237 \begin_layout Description
5238 function is the function you want LyX to perform.
5239 It is the same as the commands you'd use in the minibuffer.
5242 \begin_layout Description
5243 argument is an optional argument which is meaningful only to some functions
5245 \begin_inset Quotes eld
5249 \begin_inset Quotes erd
5252 LFUN will insert the argument as text at the cursor position).
5255 \begin_layout Standard
5256 The answer from LyX will arrive in the output pipe and be of the form
5273 \begin_layout Standard
5282 are just echoed from the command request, while
5286 is more or less useful information filled according to how the command
5287 execution worked out.
5288 Some commands, such as
5289 \begin_inset Quotes eld
5293 \begin_inset Quotes erd
5296 , will return information about the internal state of LyX, while other will
5297 return an empty data-response.
5298 This means that the command execution went fine.
5301 \begin_layout Standard
5302 In case of errors, the response from LyX will have this form
5319 \begin_layout Standard
5324 should contain an explanation of why the command failed.
5327 \begin_layout Standard
5331 \begin_layout LyX-Code
5332 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5333 \begin_inset Newline newline
5336 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5337 \begin_inset Newline newline
5340 read a <~/.lyxpipe.out
5341 \begin_inset Newline newline
5347 \begin_layout Section
5351 \begin_layout Standard
5352 LyX can notify clients of events going on asynchronously.
5353 Currently it will only do this if the user binds a key sequence with the
5355 \begin_inset Quotes eld
5359 \begin_inset Quotes erd
5363 The format of the string LyX sends is as follows:
5367 \begin_inset Flex Code
5370 \begin_layout Plain Layout
5381 \begin_layout Standard
5386 is the printed representation of the key sequence that was actually typed
5390 \begin_layout Standard
5391 This mechanism can be used to extend LyX's command set and implement macros.
5392 Bind some key sequence to
5393 \begin_inset Quotes eld
5397 \begin_inset Quotes erd
5401 Then start a client that listens on the output pipe, dispatches the command
5402 according to the sequence, and starts a function that may use LyX calls
5403 and LyX requests to issue a command or a series of commands to LyX.
5406 \begin_layout Section
5407 The simple LyX Server Protocol
5410 \begin_layout Standard
5411 LyX implements a simple protocol that can be used for session management.
5412 All messages are of the form
5425 \begin_layout Standard
5431 \begin_inset Quotes eld
5435 \begin_inset Quotes erd
5439 \begin_inset Quotes eld
5443 \begin_inset Quotes erd
5448 \begin_inset Quotes eld
5452 \begin_inset Quotes erd
5455 is received from a client, LyX will report back to inform the client that
5456 it's listening to it's messages, while
5457 \begin_inset Quotes eld
5461 \begin_inset Quotes erd
5464 sent from LyX will inform clients that LyX is closing.
5467 \begin_layout Section
5468 Reverse DVI/PDF search
5471 \begin_layout Standard
5472 Some DVI/PDF viewers
5476 \begin_layout Plain Layout
5477 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5478 Skim on Mac OSX and SumatraPDF on Windows.
5487 facility (also called
5492 This means that you can tell LyX to put the cursor to a specific line in
5493 the document by clicking at the respective position in the DVI/PDF output.
5494 To achieve this, the viewer must be able to communicate with LyX.
5495 This is done via the LyX server either by using the named pipe (
5499 ), or the UNIX domain socket (
5503 ) that LyX creates in its temporary directory (this is the way the
5504 \begin_inset Flex Code
5507 \begin_layout Plain Layout
5513 program communicates with LyX).
5514 In some cases, you need a helper script that mediates between the viewer
5515 and LyX, in others, the viewer can communicate with LyX directly.
5516 This depends on the selected viewer and on your operating system.
5517 The same applies to the way viewers need to be configured and the way the
5518 reverse search is actually performed.
5519 In what follows, we will thus describe how to setup reverse search for
5521 Before we turn to this, though, we will explain what needs to be done generally
5522 to enable reverse search in the DVI/PDF output.
5525 \begin_layout Subsection
5526 \begin_inset CommandInset label
5528 name "sub:rev-search"
5532 Automatical enabling
5535 \begin_layout Standard
5536 In most cases LyX will do the work for you by enabling
5537 \begin_inset Flex MenuItem
5540 \begin_layout Plain Layout
5541 Document\SpecialChar \menuseparator
5542 Output\SpecialChar \menuseparator
5549 In such a case LyX will automatically insert SyncTeX macro (for PDF) or
5550 srcltx package (for DVI) respectively.
5551 This option can be easily reached also on
5552 \begin_inset Flex Code
5555 \begin_layout Plain Layout
5564 \begin_layout Standard
5565 Plase note that including
5566 \begin_inset Flex Code
5569 \begin_layout Plain Layout
5576 \begin_inset Flex Code
5579 \begin_layout Plain Layout
5585 sometimes have an impact on the typeset and you should switch them off
5586 for the final typesets.
5589 \begin_layout Standard
5590 You can also define custom macro in preferences and in case you need some
5591 special tweaks read the next section about manual enabling.
5595 \begin_layout Subsection
5599 \begin_layout Standard
5600 LaTeX provides several different methods for reverse search.
5601 Some are built-in in the
5602 \begin_inset Flex Code
5605 \begin_layout Plain Layout
5611 program, some are provided by external packages.
5612 Your choice depends on whether your LaTeX distribution already provides
5613 a given method (the built-in methods are rather new) and whether your viewer
5615 The available methods are described in the following.
5618 \begin_layout Subsubsection*
5619 Built-in DVI-search via src-specials (DVI only)
5622 \begin_layout Standard
5623 This method provides the DVI file with the necessary information for reverse
5625 It is available in LaTeX since quite some time (any somewhat recent LaTeX
5626 distribution should include it), and it works reliably.
5627 To enable it, change the
5628 \begin_inset Flex MenuItem
5631 \begin_layout Plain Layout
5636 \begin_layout Plain Layout
5649 \begin_inset Flex MenuItem
5652 \begin_layout Plain Layout
5657 \begin_layout Plain Layout
5664 eX (plain)->DraftDVI
5670 \begin_inset Flex MenuItem
5673 \begin_layout Plain Layout
5674 Preferences\SpecialChar \menuseparator
5675 File Handling\SpecialChar \menuseparator
5682 \begin_inset Flex Code
5685 \begin_layout Plain Layout
5686 latex -src-specials $$i
5692 If this doesn't work, check if your TeX engine needs different options
5693 (the syntax might differ in some distributions).
5696 \begin_layout Subsubsection*
5697 External Packages (PDFSync and scrltx)
5700 \begin_layout Standard
5709 provide reverse search facility for PDF output (via pdflatex) and DVI output,
5711 In order to enable it, load the packages in the LyX preamble:
5714 \begin_layout Itemize
5715 \begin_inset Flex Code
5718 \begin_layout Plain Layout
5726 for reverse PDF search,
5729 \begin_layout Itemize
5731 \begin_inset Flex Code
5734 \begin_layout Plain Layout
5737 usepackage[active]{srcltx}
5742 for reverse DVI search.
5745 \begin_layout Standard
5746 If you want to be able to perform both DVI and PDF reverse searches, you
5747 can also insert in the preamble the following lines
5750 \begin_layout LyX-Code
5754 \begin_inset Newline newline
5760 \begin_inset Newline newline
5766 \begin_inset Newline newline
5772 \begin_inset Newline newline
5777 usepackage[active]{srcltx}
5778 \begin_inset Newline newline
5786 \begin_layout Standard
5787 This way, you can preview the file as either DVI or PDF (pdflatex) and the
5788 right package will be used.
5791 \begin_layout Standard
5792 Note that PDFSync might affect the output layout of your document.
5793 It is therefore advised to disable PDFsync for final documents.
5796 \begin_layout Subsubsection*
5797 Built-in reverse search via SyncTeX (DVI and PDF)
5800 \begin_layout Standard
5802 \begin_inset Flex Code
5805 \begin_layout Plain Layout
5811 have built-in support for both PDF and DVI reverse search.
5816 facility is basically the result of the integration of the PDFSync package
5817 to the pdftex program and its merge with the
5822 You need at least TeXLive 2008 or a recent MikTeX distribution in order
5824 Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
5825 already provide SyncTeX support.
5828 \begin_layout Standard
5829 To enable SyncTeX for DVI output, change the
5830 \begin_inset Flex MenuItem
5833 \begin_layout Plain Layout
5838 \begin_layout Plain Layout
5851 \begin_inset Flex MenuItem
5854 \begin_layout Plain Layout
5859 \begin_layout Plain Layout
5866 eX (plain) -> DraftDVI
5872 \begin_inset Flex MenuItem
5875 \begin_layout Plain Layout
5876 Preferences\SpecialChar \menuseparator
5877 File Handling\SpecialChar \menuseparator
5884 \begin_inset Flex Code
5887 \begin_layout Plain Layout
5888 latex -synctex=1 $$i
5893 , and for PDF output, change the
5894 \begin_inset Flex MenuItem
5897 \begin_layout Plain Layout
5902 \begin_layout Plain Layout
5909 eX (pdflatex) -> PDF (pdflatex)
5915 \begin_inset Flex Code
5918 \begin_layout Plain Layout
5919 pdflatex -synctex=1 $$i
5925 Check the documentation of your viewer whether the viewer needs to be configure
5926 d for the use with SyncTeX.
5930 \begin_layout Plain Layout
5932 \begin_inset Flex Code
5935 \begin_layout Plain Layout
5941 option enables gzip compression.
5942 If your viewer does not support it, you should instead use
5943 \begin_inset Flex Code
5946 \begin_layout Plain Layout
5960 \begin_layout Subsection
5961 Configuring and using specific viewers
5964 \begin_layout Subsubsection*
5965 Xdvi (all platforms)
5968 \begin_layout Standard
5970 \begin_inset Flex Code
5973 \begin_layout Plain Layout
5979 , you don't need to do anything else for performing a reverse DVI search,
5980 as LyX already provides the necessary hooks for automatically using the
5982 \begin_inset Flex Code
5985 \begin_layout Plain Layout
5992 Just setup your document as described above (reverse search is triggered
5993 by Ctrl-click or Alt-click on Mac OSX, respectively).
5996 \begin_layout Standard
5997 However, if for whatever reason you want to use the named pipe instead of
5998 the socket for communicating with LyX, simply change the DVI viewer in
6000 \begin_inset Flex MenuItem
6003 \begin_layout Plain Layout
6004 Preferences\SpecialChar \menuseparator
6005 File Handling\SpecialChar \menuseparator
6015 \begin_layout Plain Layout
6016 On Mac OSX you have to use
6017 \begin_inset Flex Code
6020 \begin_layout Plain Layout
6021 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6032 \begin_inset Flex Code
6035 \begin_layout Plain Layout
6036 xdvi -editor 'lyxeditor.sh %f %l'
6042 \begin_inset Flex Code
6045 \begin_layout Plain Layout
6051 is a suitable script.
6052 For example, a minimal shell script is the following one:
6055 \begin_layout LyX-Code
6057 \begin_inset Newline newline
6060 LYXPIPE="/path/to/lyxpipe"
6061 \begin_inset Newline newline
6064 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6065 \begin_inset Newline newline
6068 echo "$COMMAND" > "${LYXPIPE}".in || exit
6069 \begin_inset Newline newline
6072 read < "${LYXPIPE}".out || exit
6075 \begin_layout Standard
6077 \begin_inset Flex Code
6080 \begin_layout Plain Layout
6090 \begin_layout Plain Layout
6097 XServer pipe path specified in
6098 \begin_inset Flex MenuItem
6101 \begin_layout Plain Layout
6102 Preferences\SpecialChar \menuseparator
6112 \begin_layout Plain Layout
6114 \begin_inset Flex Code
6117 \begin_layout Plain Layout
6123 folder of a source distribution you can find a
6124 \begin_inset Flex Code
6127 \begin_layout Plain Layout
6133 script which is able to locate the
6137 based on your preferences.
6145 \begin_layout Subsubsection*
6149 \begin_layout Standard
6151 \begin_inset Flex Code
6154 \begin_layout Plain Layout
6155 /Applications/MacDviX_Folder/calleditor.script
6160 , add the following lines:
6163 \begin_layout LyX-Code
6168 \begin_layout Plain Layout
6175 X.app/Contents/MacOS/lyxeditor "$2" $1
6176 \begin_inset Newline newline
6182 \begin_layout Standard
6183 Modify the lines accordingly if you install LyX somewhere else than in the
6184 Applications folder.
6187 \begin_layout Standard
6188 Reverse search is triggered by Alt-click (OPTION-click).
6191 \begin_layout Subsubsection*
6195 \begin_layout Standard
6197 \begin_inset Flex Code
6200 \begin_layout Plain Layout
6201 open -a Skim.app $$i
6206 to the viewer setting in
6207 \begin_inset Flex MenuItem
6210 \begin_layout Plain Layout
6211 Preferences\SpecialChar \menuseparator
6212 File Handling\SpecialChar \menuseparator
6213 File formats\SpecialChar \menuseparator
6220 \begin_inset Flex MenuItem
6223 \begin_layout Plain Layout
6224 Skim\SpecialChar \menuseparator
6225 Preferences\SpecialChar \menuseparator
6235 \begin_layout Plain Layout
6245 \begin_layout Standard
6246 Reverse search is triggered by COMMAND-SHIFT-click
6249 \begin_layout Subsubsection*
6253 \begin_layout Standard
6255 \begin_inset Flex MenuItem
6258 \begin_layout Plain Layout
6259 Settings\SpecialChar \menuseparator
6260 Configure Okular\SpecialChar \ldots{}
6261 \SpecialChar \menuseparator
6268 \begin_inset Quotes eld
6272 \begin_inset Quotes erd
6276 \begin_inset Flex Code
6279 \begin_layout Plain Layout
6288 \begin_layout Standard
6289 Reverse search is triggered by SHIFT-click.
6292 \begin_layout Subsubsection*
6296 \begin_layout Standard
6297 Launch yap, choose its
6298 \begin_inset Flex MenuItem
6301 \begin_layout Plain Layout
6302 View\SpecialChar \menuseparator
6309 \begin_inset Quotes eld
6313 \begin_inset Quotes erd
6318 \begin_inset Quotes eld
6321 New\SpecialChar \ldots{}
6323 \begin_inset Quotes erd
6326 button and, in the window that opens, enter
6327 \begin_inset Quotes eld
6331 \begin_inset Quotes erd
6334 (or any other name you like) in the
6335 \begin_inset Quotes eld
6339 \begin_inset Quotes erd
6343 Now click on the button labeled
6344 \begin_inset Quotes eld
6347 \SpecialChar \ldots{}
6349 \begin_inset Quotes erd
6352 to open a file dialog and navigate to the directory containing the batch
6354 \begin_inset Flex Code
6357 \begin_layout Plain Layout
6365 \begin_inset Flex Code
6368 \begin_layout Plain Layout
6374 and then specify the program arguments as
6375 \begin_inset Flex Code
6378 \begin_layout Plain Layout
6386 \begin_inset Flex Code
6389 \begin_layout Plain Layout
6395 wrapper is used for communicating with LyX through the
6402 \begin_layout LyX-Code
6404 \begin_inset Newline newline
6407 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
6416 \begin_inset Newline newline
6430 \begin_layout Standard
6431 Make sure that the LyXServer pipe path you specified in LyX is
6432 \begin_inset Flex Code
6435 \begin_layout Plain Layout
6449 , otherwise change the
6450 \begin_inset Flex Code
6453 \begin_layout Plain Layout
6459 wrapper accordingly.
6462 \begin_layout Standard
6463 In yap, reverse search is triggered by double-click.
6466 \begin_layout Subsubsection*
6467 SumatraPDF (Windows)
6470 \begin_layout Standard
6471 In order to use SumatraPDF for inverse search, enter
6472 \begin_inset Flex Code
6475 \begin_layout Plain Layout
6476 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6481 in the viewer setting in
6482 \begin_inset Flex MenuItem
6485 \begin_layout Plain Layout
6486 Preferences\SpecialChar \menuseparator
6487 File Handling\SpecialChar \menuseparator
6488 File formats\SpecialChar \menuseparator
6495 \begin_inset Flex Code
6498 \begin_layout Plain Layout
6504 is the previous wrapper.
6505 If SumatraPDF.exe is not in your command PATH, use its full file name.
6508 \begin_layout Standard
6509 Reverse search is triggered by double-click.
6512 \begin_layout Subsubsection*
6516 \begin_layout Standard
6517 First of all, make sure that yap is your default DVI viewer in the Windows
6518 environment, then launch it, choose its
6519 \begin_inset Flex MenuItem
6522 \begin_layout Plain Layout
6523 View\SpecialChar \menuseparator
6530 \begin_inset Quotes eld
6534 \begin_inset Quotes erd
6539 \begin_inset Quotes eld
6542 New\SpecialChar \ldots{}
6544 \begin_inset Quotes erd
6547 button and, in the window that opens, enter
6548 \begin_inset Quotes eld
6552 \begin_inset Quotes erd
6555 (or any other name you like) in the
6556 \begin_inset Quotes eld
6560 \begin_inset Quotes erd
6564 Now click on the button labeled
6565 \begin_inset Quotes eld
6568 \SpecialChar \ldots{}
6570 \begin_inset Quotes erd
6573 to open a file dialog and navigate to the directory containing the
6574 \begin_inset Flex Code
6577 \begin_layout Plain Layout
6583 program (which is installed by default on Cygwin along with the LyX executable).
6585 \begin_inset Flex Code
6588 \begin_layout Plain Layout
6594 and then specify the program arguments as
6595 \begin_inset Flex Code
6598 \begin_layout Plain Layout
6605 In this way, you will be using the
6609 for communicating with LyX.
6610 If, for whatever reason, you want to use the
6615 \begin_inset Flex Code
6618 \begin_layout Plain Layout
6624 option and be sure to specify the LyXServer pipe path in the LyX preferences.
6627 \begin_layout Standard
6628 In yap, reverse search is triggered by double-click.
6631 \begin_layout Subsubsection*
6635 \begin_layout Standard
6636 In order to use SumatraPDF for inverse search, enter
6637 \begin_inset Flex Code
6640 \begin_layout Plain Layout
6646 in the viewer setting in
6647 \begin_inset Flex MenuItem
6650 \begin_layout Plain Layout
6651 Preferences\SpecialChar \menuseparator
6652 File Handling\SpecialChar \menuseparator
6653 File formats\SpecialChar \menuseparator
6660 \begin_inset Flex Code
6663 \begin_layout Plain Layout
6669 is the following script (to be placed in your command PATH,
6670 \begin_inset Flex Code
6673 \begin_layout Plain Layout
6679 being the best choice):
6682 \begin_layout LyX-Code
6684 \begin_inset Newline newline
6688 \begin_inset Newline newline
6691 SumatraPDF -inverse-search "lyxeditor -g %f %l" $(basename $1)
6694 \begin_layout Standard
6695 This wrapper script is needed because SumatraPDF is a native Windows application
6696 and does not understand the posix paths used by the Cygwin version of LyX.
6697 If SumatraPDF.exe is not in your command PATH, use its full posix path in
6700 \begin_inset Flex Code
6703 \begin_layout Plain Layout
6709 enables communication via the
6715 \begin_inset Flex Code
6718 \begin_layout Plain Layout
6724 option if you want to use the
6728 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6731 \begin_layout Standard
6732 Reverse search is triggered by double-click.
6735 \begin_layout Section
6739 \begin_layout Standard
6740 To make forward search possible you need to provide generated output PDF/DVI
6741 file with additional information about TeX sources.
6742 This can be done via the methods described in the section
6743 \begin_inset CommandInset ref
6745 reference "sub:rev-search"
6752 \begin_layout Standard
6753 Secondly you need to configure LyX for using your viewers in
6754 \begin_inset Flex MenuItem
6757 \begin_layout Plain Layout
6758 Preferences\SpecialChar \menuseparator
6759 Output\SpecialChar \menuseparator
6766 Only some of the viewers allows this operation --- yap, xdvi, okular, Sumatra
6771 \begin_layout Plain Layout
6772 For Sumatra CMCDDE is needed --- downloadable from http://www.istri.fr/zip/CMCDDE.z
6779 Some other viewers allow at least reloading and positioning to particular
6780 page of the file --- Evince or xpdf --- for these cases you can use external
6782 Please study the prepared examples in the Preferences dialog.
6783 The values replaced in the setting:
6784 \begin_inset Flex Code
6787 \begin_layout Plain Layout
6794 \begin_inset Flex Code
6797 \begin_layout Plain Layout
6803 for exported temporary .tex file,
6804 \begin_inset Flex Code
6807 \begin_layout Plain Layout
6813 exported output file (either dvi or pdf, depending on which one exists
6818 \begin_layout Standard
6819 When viewing, LyX dynamically choose proper preview format based on the
6820 presence of .dvi or .pdf file in the temporary directory (i.e.
6821 what format have you used for viewing this particular document).
6825 \begin_layout Chapter
6826 Special Document Classes
6829 \begin_layout Section
6833 \begin_layout Standard
6839 \begin_layout Subsection
6843 \begin_layout Standard
6844 This section describes how LyX can be used to write articles for submission
6845 to the scientific journal
6847 Astronomy and Astrophysics
6849 (www.edpsciences.fr/aa/
6850 \begin_inset Flex URL
6853 \begin_layout Plain Layout
6855 http://www.edpsciences.fr/aa/
6860 ) using Version 5.01 of the document class
6865 This package can be downloaded from the ftp site
6868 \begin_layout Standard
6869 \begin_inset VSpace medskip
6875 \begin_layout Standard
6877 \begin_inset Flex URL
6880 \begin_layout Plain Layout
6882 ftp://ftp.edpsciences.org/pub/aa/readme.html
6890 \begin_layout Standard
6891 \begin_inset VSpace medskip
6897 \begin_layout Standard
6898 A manual comes together with that package, and this text is not meant to
6899 replace the original manual but is merely a short guide in how to realize
6900 the correct form of your paper.
6904 \begin_layout Standard
6905 Please note that the publisher of the journal was changed from Springer
6906 to EDP Sciences starting January 1, 2001.
6907 That change involved also some slight changes to the style files, namely
6908 the removal of the thesaurus command.
6909 The LyX class aa supports the newest version of these style files, V 5.01.
6910 If you have an older version installed, please upgrade.
6911 For compatibility, the old (version 4) layout has been kept as
6916 Please refer to the comments in
6918 LyXDir/layouts/aapaper.layout
6923 \begin_layout Subsection
6927 \begin_layout Standard
6928 It is recommended you start from the example template distributed with LyX.
6929 If you are not using a template, note the following settings:
6932 \begin_layout Itemize
6939 Document\SpecialChar \menuseparator
6942 dialog (OK, that one was obvious).
6945 \begin_layout Itemize
6946 Don't change the option
6949 \begin_inset space ~
6959 The whole layout is done by the macros, you shouldn't change anything.
6962 \begin_layout Subsection
6966 \begin_layout Standard
6967 First thing to enter is the header information.
6968 It consists of seven entries, of which some are optional.
6972 \begin_layout Itemize
6980 \begin_layout Itemize
6988 \begin_layout Itemize
6996 \begin_layout Itemize
7004 \begin_layout Itemize
7009 : [optional] if more than one author: whom to contact for offprint requests.
7012 \begin_layout Itemize
7017 : [optional] mail address for contacts.
7020 \begin_layout Itemize
7028 Received: <date>; Accepted <date>
7031 \begin_layout Standard
7032 There is no need to issue the
7038 command, this is done automatically by LyX when the header is finished.
7039 Although the order of the single header entries doesn't matter it is advised
7040 to keep the above sequence, just to get the best optics and meets the layout
7041 of the real document.
7044 \begin_layout Standard
7045 If you want to place footnotes in the header block, e.
7046 \begin_inset space \thinspace{}
7050 \begin_inset space \space{}
7053 to state your present address, just use the standard footnote via the menu
7056 Insert\SpecialChar \menuseparator
7060 LyX will automagically use the term
7069 \begin_layout Standard
7070 In addition to these topics, the macros use three additional LaTeX commands
7071 that have no counterpart in LyX:
7074 \begin_layout Itemize
7081 to separate different names for more than one author and institute, respectivel
7085 \begin_layout Itemize
7092 to mark corresponding author/institute pairs.
7093 The institutes are numbered sequentially as they appear in the
7097 field, so you have to put a marker to each author.
7100 \begin_layout Itemize
7107 to supply an email address for fast contact.
7110 \begin_layout Standard
7111 In all cases, the appropriate command has to be entered in LyX and marked
7117 \begin_layout Subsection
7121 \begin_layout Standard
7122 The abstract should immediately follow the header block.
7123 With version 5 the abstract environment was changed to a command, and there
7124 is now a resctriction to only one paragraph.
7125 In addition, it should contain an entry with the keywords.
7126 This is not yet implemented for LyX, therefore you have to enter the LaTeX
7133 by hand and mark it as LaTeX code.
7134 Refer to the example paper.
7137 \begin_layout Subsection
7138 Supported environments
7141 \begin_layout Standard
7142 The A&A paper layout supports the following environments for structuring
7146 \begin_layout Itemize
7152 \begin_layout Itemize
7158 \begin_layout Itemize
7164 \begin_layout Itemize
7170 \begin_layout Itemize
7176 \begin_layout Itemize
7182 \begin_layout Itemize
7188 \begin_layout Itemize
7194 \begin_layout Itemize
7200 \begin_layout Itemize
7206 \begin_layout Itemize
7212 \begin_layout Itemize
7218 \begin_layout Subsection
7219 Commands not supported by LyX
7222 \begin_layout Standard
7223 Some commands are not yet supported by the
7228 Some have already been mentioned.
7229 For the sake of completeness, they are listed all together here:
7232 \begin_layout Itemize
7240 \begin_layout Itemize
7248 \begin_layout Itemize
7256 \begin_layout Itemize
7264 \begin_layout Itemize
7272 \begin_layout Itemize
7280 \begin_layout Itemize
7288 \begin_layout Itemize
7296 \begin_layout Standard
7297 If you want to use any of these commands, you have to enter them yourself.
7300 Do not forget to mark them as LaTeX code!
7303 \begin_layout Subsection
7304 Figure and Table Floats
7307 \begin_layout Standard
7308 LyX provides support for the necessary float environments
7310 figure, figure*, table
7316 , therefore we won't tell much about it here.
7320 \begin_inset space ~
7326 Just remember that tables should be left-aligned.
7327 For that, select the table and change the alignment in
7329 Edit\SpecialChar \menuseparator
7331 \begin_inset space ~
7337 \begin_layout Standard
7338 There is only one special thing: the figures with caption besides the figure.
7339 To create such a figure, you have to do the following:
7342 \begin_layout Enumerate
7343 Create a wide figure float:
7345 Insert\SpecialChar \menuseparator
7346 Float\SpecialChar \menuseparator
7349 , then right click in the figure and select
7355 \begin_inset space ~
7363 \begin_layout Enumerate
7364 Enter your caption text.
7367 \begin_layout Enumerate
7372 to move the cursor above the caption.
7375 \begin_layout Enumerate
7379 \begin_layout Enumerate
7380 Position the cursor behind the figure and insert a horizontal fill:
7382 Insert\SpecialChar \menuseparator
7384 \begin_inset space ~
7387 Character\SpecialChar \menuseparator
7389 \begin_inset space ~
7397 \begin_layout Enumerate
7398 Switch to LaTeX mode:
7401 \begin_inset space ~
7409 \begin_layout Enumerate
7419 Do not close the brace!
7422 \begin_layout Enumerate
7423 Position the cursor behind the caption text, switch to LaTeX mode and insert
7427 \begin_inset space ~
7439 \begin_layout Standard
7440 Also, refer to the figures in the example paper.
7443 \begin_layout Subsection
7447 \begin_layout Standard
7448 For submission, the paper has to be formated in a special double-spacing
7450 For this purpose, you have to give the option
7454 to the documentclass.
7455 This must be done using the extra class options field in the
7457 Document\SpecialChar \menuseparator
7461 Just enter the string
7468 \begin_layout Subsection
7472 \begin_layout Standard
7477 directory contains an example paper written with LyX.
7478 It is the example paper from the original macro package, translated to
7480 Use it for inspiration, and compare the original LaTeX code with LyX way
7484 \begin_layout Section
7488 \begin_layout Standard
7494 \begin_layout Subsection
7498 \begin_layout Standard
7499 AASTeX is a set of macros produced by the American Astronomical Society
7500 to facilitate electronic manuscript submission to the three journals they
7501 publish: the Astrophysical Journal (including the Letters and Supplement),
7502 the Astronomical Journal, and the Publications of the Astronomical Society
7504 LyX has proven to be an excellent tool for generating these documents,
7505 especially given its equation, citation, and figure handling capabilities.
7506 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7507 is the version described here, or higher.
7508 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7509 incompatible with LyX.
7510 The AASTeX package may be downloaded from the AASTeX Web site
7513 \begin_layout Standard
7514 \begin_inset VSpace medskip
7520 \begin_layout Standard
7522 \begin_inset Flex URL
7525 \begin_layout Plain Layout
7527 http://www.journals.uchicago.edu/AAS/AASTeX
7535 \begin_layout Standard
7536 \begin_inset VSpace medskip
7542 \begin_layout Standard
7543 A complete user guide is contained in that package and you should familiarize
7544 yourself with it thoroughly before embarking on writing a paper in LyX.
7545 LyX will not reduce the need to figure out all the AASTeX commands, it
7546 will only reduce the drudgery of typing everything in.
7547 It is your responsibility to ensure that the final exported LaTeX document
7548 conforms completely to the requirements of the journal to which you are
7549 submitting your paper.
7552 \begin_layout Subsection
7553 Starting a New Paper
7556 \begin_layout Standard
7557 I strongly suggest that you start with the AASTeX template file.
7560 File\SpecialChar \menuseparator
7567 , enter the new file name, then choose the
7572 This will show the most common fields found in a manuscript.
7573 Simply overwrite the existing text (including the brackets,
7577 ) with the correct information.
7578 Many of the AASTeX commands and environments can be implemented directly
7579 in LyX, but some cannot: most noticeably
7591 , which should stick out like a sore thumb if you actually just opened the
7593 For commands such as these, the LaTeX code must be entered directly and
7595 Such commands are referred to as TeX code, or Evil Red Text.
7596 I tried to minimize the amount of TeX code needed in an AASTeX document,
7597 but there is still a bit more required than any of us would like.
7600 \begin_layout Subsection
7601 Finishing Your Paper
7604 \begin_layout Standard
7605 When the paper is finished to your satisfaction and previews/prints correctly,
7607 \begin_inset Quotes eld
7611 \begin_inset Quotes erd
7614 actions which need to be done before you submit it to the journals.
7618 \begin_layout Enumerate
7619 Export your paper as a LaTeX file (
7621 File\SpecialChar \menuseparator
7622 Export\SpecialChar \menuseparator
7629 \begin_layout Enumerate
7634 file with your favorite text editor
7638 \begin_layout Enumerate
7639 remove the comment lines before the
7648 \begin_layout Enumerate
7653 usepackage...{fontenc}
7655 line if it appears (usually just after
7670 \begin_layout Enumerate
7671 remove everything between (and including) the
7683 commands, except for any commands you specifically put into the LaTeX preamble
7684 (which should appear immediately after the
7685 \begin_inset Quotes eld
7688 User specified LaTeX commands
7689 \begin_inset Quotes erd
7700 \begin_layout Enumerate
7701 Run the resulting file through LaTeX to make sure it still processes correctly.
7704 \begin_layout Enumerate
7705 Reread the journal requirements to make sure your filenames and formats
7709 \begin_layout Enumerate
7713 \begin_layout Subsection
7714 Comments On Specific Commands
7717 \begin_layout Standard
7718 I will not describe the detailed usage of the individual AASTeX commands:
7719 the AASTeX User Guide (
7723 ) gives a good description of each.
7724 Thus it's probably easiest for me to go down the list as found in the guide
7725 and offer comments where necessary.
7726 So let's begin \SpecialChar \ldots{}
7730 \begin_layout Subsubsection
7731 Things that work as expected
7734 \begin_layout Standard
7738 \begin_layout Plain Layout
7750 \begin_layout Standard
7751 Because they work as you might expect, I simply list them and the section
7852 begin{thebibliography}
7860 (2.13.2), all the cite commands and their variations (2.13.2), the generic
7861 graphicx figure commands (2.14.1),
7885 (2.15.4, amongst other places),
7912 \begin_layout Standard
7913 The following style options also work correctly:
7934 Simply put them in the
7940 Layout\SpecialChar \menuseparator
7946 \begin_layout Standard
7950 \begin_layout Plain Layout
7962 \begin_layout Subsubsection
7963 Things that work, but require more comment
7966 \begin_layout Standard
7967 The following items work, but require a little more discussion:
7970 \begin_layout Itemize
7971 These items are reserved for use by the journal editors, but you can put
7972 them into the LaTeX preamble if you feel compelled to do so:
8005 \begin_layout Itemize
8006 These items may be placed in the LaTeX preamble, and are included as blanks
8007 in the template file:
8028 \begin_layout Itemize
8035 (2.3) – can only be used
8036 \begin_inset Quotes eld
8040 \begin_inset Quotes erd
8043 , not in the middle of a paragraph.
8044 Use TeX code if you need to embed it.
8047 \begin_layout Itemize
8054 (2.3) – will have extra {} after it.
8055 This should not cause an error.
8058 \begin_layout Itemize
8065 (2.6) – can only be used
8066 \begin_inset Quotes eld
8070 \begin_inset Quotes erd
8073 , not in the middle of a paragraph.
8074 Use TeX code if you need to embed it.
8077 \begin_layout Itemize
8084 (2.8) – can't insert a cross-reference tag, you must type the tag name by
8088 \begin_layout Itemize
8102 \begin_layout Itemize
8109 (2.9) – will have extra {} after it.
8110 This should not cause an error.
8113 \begin_layout Itemize
8120 (2.11) – will have extra {} after it.
8121 This should not cause an error.
8124 \begin_layout Itemize
8131 (2.14.2) – you can insert an optional filename argument by placing the cursor
8132 at the beginning of the text and selecting
8134 Insert\SpecialChar \menuseparator
8139 \begin_inset Quotes eld
8143 \begin_inset Quotes erd
8146 inserts an optional argument of the type needed by
8153 Hopefully it will be renamed someday.
8156 \begin_layout Itemize
8169 for the catalog ID optional parameter
8172 \begin_layout Itemize
8185 for the catalog ID optional parameter
8188 \begin_layout Subsubsection
8189 Things not implemented, use TeX code
8192 \begin_layout Standard
8196 \begin_layout Plain Layout
8208 \begin_layout Standard
8231 setcounter{equation}
8233 (2.12), Journal name abbreviations (2.13.4),
8269 (2.15.4, insert it as the first element in the lefthand cell after where
8271 Don't use any of LyX's rules in the table),
8283 (2.15.5), much of Misc (2.17, except
8334 \begin_layout Standard
8338 \begin_layout Plain Layout
8350 \begin_layout Subsubsection
8351 Things that cannot be implemented
8354 \begin_layout Standard
8355 \SpecialChar \ldots{}
8356 at least in any meaningful sort of way, so I suggest ignoring them.
8357 They are the references environment (2.13.3), and the deluxetable environment
8359 If you really, really need to use deluxetable, I suggest editing it in
8360 a separate file with a text editor, then using
8362 Insert\SpecialChar \menuseparator
8364 \begin_inset space ~
8369 to include it in your LyX document.
8374 file to see an example of this.
8377 \begin_layout Subsection
8378 FAQs, Tips, Tricks, and Other Ruminations
8381 \begin_layout Subsubsection
8382 Getting LyX and AASTeX to cooperate
8385 \begin_layout Standard
8386 It can be a bit tricky to get LyX to recognize a new layout and document
8388 When all else fails, do this:
8391 \begin_layout Enumerate
8392 Make certain that LaTeX can find AASTeX.
8393 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8394 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
8401 \begin_layout Enumerate
8413 \begin_layout Enumerate
8416 Tools\SpecialChar \menuseparator
8419 in LyX, then restart LyX.
8422 \begin_layout Enumerate
8423 Open a regular new file, not from a template.
8424 Does AASTeX appear in the class list in
8426 Document\SpecialChar \menuseparator
8432 \begin_layout Standard
8433 If you get a warning from an existing AASTeX document about not being able
8434 to find the AASTeX layout or a message about
8435 \begin_inset Quotes eld
8438 You should not mix title layouts with normal ones
8439 \begin_inset Quotes erd
8442 , things haven't been installed correctly.
8445 \begin_layout Subsubsection
8446 LaTeX error processing a table
8449 \begin_layout Standard
8450 LyX, by default, attempts to center the table caption/title.
8451 This seems to produce a bad interaction in AASTeX so you should click somewhere
8452 in the caption/title, then select
8454 Edit\SpecialChar \menuseparator
8456 \begin_inset space ~
8470 This took care of it for me.
8473 \begin_layout Subsubsection
8477 \begin_layout Standard
8478 A couple of things: 1) I have noticed some funny spacing in the reference
8479 entries in the text.
8480 When you enter the bibliography item data, make sure their is
8484 space between the last author and the parenthesis setting off the year;
8488 \begin_inset space \thinspace{}
8492 \begin_inset space \space{}
8506 2) Entering the references at all is not obvious.
8507 The easiest thing is to start typing your first reference at the end of
8508 the document, then mark it as type
8513 That will put a small gray box in front of what you just typed.
8514 Click on the box to fill in the rest of the information.
8515 For new references, go to the end of an existing reference and press return.
8516 That will create a new line with its own box, etc.
8519 \begin_layout Subsubsection
8523 \begin_layout Standard
8524 Even though AASTeX provides its own figure commands (
8530 , for example), I much prefer LaTeX's standard figure commands (with the
8539 \begin_inset space ~
8542 commands as TeX code into a Figure Float box if you desire, but I never
8543 have much luck getting the layout right.
8544 With the standard graphics, LyX will insert a
8548 usepackage{graphicx}
8550 command into the LaTeX preamble and handle the figures in the standard
8551 LaTeX2e way, interspersing the figures in the text.
8552 I believe ApJ accepts figures exactly this way now; AJ might still use
8554 \begin_inset Quotes eld
8557 stack everything at the end
8558 \begin_inset Quotes erd
8564 \begin_layout Subsubsection
8565 Things I could have done, but didn't
8568 \begin_layout Standard
8570 \begin_inset Quotes eld
8574 \begin_inset Quotes erd
8577 things I could have implemented, but chose not to.
8578 For instance, I saw no point in double-spacing the text in the LyX window,
8579 even though it is double-spaced in the paper manuscript.
8580 Also, I chose not to make separate layouts for the preprint and preprint2
8582 Since I assume you will spend most of your time in the plain manuscript
8583 mode anyway, I decided not to chew up more disk space with this.
8587 \begin_layout Subsection
8591 \begin_layout Standard
8592 Your mileage may vary.
8593 I've now had papers published by both ApJ and AJ that have had 98% of the
8594 effort done in LyX; the last 2% was the LaTeX post-processing and a few
8596 I have had no trouble with the submission process, and I'm sure the journals
8597 were never aware that there might be a difference.
8598 So, go forth and publish!
8601 \begin_layout Section
8605 \begin_layout Standard
8608 David Johnson; updated by Richard Heck
8611 \begin_layout Standard
8612 \begin_inset VSpace bigskip
8618 \begin_layout Standard
8620 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8621 papers to be submitted to American Mathematical Society publications.
8622 The layouts are not tailored to a specific journal, but easily can be.
8623 You should refer to the AMS documentation for specific instructions for
8624 each journal (usually it will entail only changing a single line in the
8626 That documentation is available on the Web at
8627 \begin_inset Flex URL
8630 \begin_layout Plain Layout
8638 \begin_inset Flex URL
8641 \begin_layout Plain Layout
8643 ftp://ftp.ams.org/pub/tex/amslatex/
8649 These layouts are appropriate, and useful, for any mathematical writing.
8653 \begin_layout Standard
8654 There are two basic AMS LaTeX layouts:
8657 \begin_layout Itemize
8658 amsart: The standard AMS article format.
8661 \begin_layout Itemize
8662 amsbook: the standard AMS book (really, monograph) format.
8666 \begin_layout Standard
8667 The layouts themselves contain only the minimum necessary to use the AMS
8669 They do not, in particular, contain any of the `theorem' environments used
8670 for setting theorems, lemmas, and the like.
8671 These are contained, instead, in the
8672 \begin_inset Flex Code
8675 \begin_layout Plain Layout
8681 module, which is loaded by default when when you select one of the AMS
8683 (It can also be used with other classes and can be removed, if you would
8684 rather use something else.) Less commonly used environments are in the
8685 \begin_inset Flex Code
8688 \begin_layout Plain Layout
8689 Theorems (AMS-Extended)
8694 module, which must be loaded manually.
8697 \begin_layout Standard
8698 By default, theorems and the like are numbered consecutively throughout
8699 the document, but this may be modified by loading the module
8700 \begin_inset Flex Code
8703 \begin_layout Plain Layout
8704 Theorems (Order by Section)
8709 or, if you are using
8710 \begin_inset Flex Code
8713 \begin_layout Plain Layout
8720 \begin_inset Flex Code
8723 \begin_layout Plain Layout
8724 Theorems (Order by Chapter)
8730 These will number the results as
8731 \begin_inset Formula $n.m$
8734 , where the first number refers to the section (or chapter) and the second
8735 refers to the total number of results so far in that section (or chapter).
8736 Many environments are also available unnumbered.
8737 These are indicated by an asterisk at the end.
8738 If you happen to want
8742 unnumbered results, the module
8743 \begin_inset Flex Code
8746 \begin_layout Plain Layout
8752 provides that option.
8755 \begin_layout Standard
8756 Note that these modules do not
8760 to be used with the AMS classes.
8761 It is perfectly possible to use the
8762 \begin_inset Flex Code
8765 \begin_layout Plain Layout
8771 module, and the others mentioned, with other classes, such as
8772 \begin_inset Flex Code
8775 \begin_layout Plain Layout
8782 \begin_inset Flex Code
8785 \begin_layout Plain Layout
8792 \begin_inset Flex Code
8795 \begin_layout Plain Layout
8804 \begin_layout Subsection
8805 What these layouts provide
8808 \begin_layout Standard
8809 There is a long list of included environments provided by these layouts.
8810 In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
8811 variety of `theorem' environments.
8812 However, the AMS recommends the environments that are available in LyX.
8816 \begin_layout Standard
8817 The following environments—as well as the standard environments, such as
8819 \begin_inset Flex Noun
8822 \begin_layout Plain Layout
8829 \begin_inset Flex Noun
8832 \begin_layout Plain Layout
8839 \begin_inset Flex Noun
8842 \begin_layout Plain Layout
8849 \begin_inset Flex Noun
8852 \begin_layout Plain Layout
8859 \begin_inset Flex Noun
8862 \begin_layout Plain Layout
8869 \begin_inset Flex Code
8872 \begin_layout Plain Layout
8879 \begin_inset Flex Code
8882 \begin_layout Plain Layout
8891 \begin_layout Description
8892 Address This should be the author's permanent address.
8895 \begin_layout Description
8897 \begin_inset space ~
8900 Address This should be the author's temporary address at the time of submission,
8901 if different from the Address.
8904 \begin_layout Description
8905 Email Author's e-mail address
8908 \begin_layout Description
8909 URL Author's Web address, if desired.
8912 \begin_layout Description
8913 Keywords Key words or phrases used to identify specific topics discussed
8917 \begin_layout Description
8918 Subjectclass These refer to the AMS Subject Classifications, published and
8921 Mathematical Reviews
8924 These are also available online at the AMS cites listed above.
8927 \begin_layout Description
8931 \begin_layout Description
8935 \begin_layout Description
8939 \begin_layout Standard
8940 The following environments are provided by both the
8941 \begin_inset Flex Code
8944 \begin_layout Plain Layout
8951 \begin_inset Flex Code
8954 \begin_layout Plain Layout
8960 modules, in the latter case in both starred (unnumbered) and unstarred
8961 (numbered) versions.
8962 These same environments are provided only in the starred versions by the
8964 \begin_inset Flex Code
8967 \begin_layout Plain Layout
8976 \begin_layout Theorem
8977 This is typically used for the statements of major results.
8981 \begin_layout Corollary*
8982 This is used for statements which follow fairly directly from previous statement
8984 Again, these can be major results.
8989 These are smaller results needed to prove other statements.
8992 \begin_layout Proposition
8993 These are less major results which (hopefully) add to the general theory
8997 \begin_layout Conjecture
8998 These are statements provided without justification, which the author does
8999 not know how to prove, but which seem to be true (to the author, at least).
9002 \begin_layout Definition*
9003 Guess what this is for.
9004 The font is different for this environment than for the previous ones.
9008 \begin_layout Example*
9009 Used for examples illustrating proven results.
9012 \begin_layout Problem
9013 It's not really known what this is for.
9014 You should figure it out.
9017 \begin_layout Exercise*
9018 Write a description for this one.
9021 \begin_layout Remark
9022 This environment is also a type of theorem, usually a lesser sort of observation.
9025 \begin_layout Claim*
9026 Often used in the course of giving a proof of a larger result.
9030 Generally, these are used to break up long arguments, using specific instances
9036 The numbering scheme for cases is on its own, not together with other numbered
9042 At the end of this environment, a QED symbol (usually a square, but it can
9043 vary with different styles) is placed.
9044 If you want to have other environments within this one—for example, Case
9045 environments—and have the QED symbol appear only after them, then the other
9046 environments need to be nested within the proof environment.
9049 Nesting Environments
9055 for information on nesting.
9058 \begin_layout Standard
9059 And these environments are provided by
9060 \begin_inset Flex Code
9063 \begin_layout Plain Layout
9064 Theorems (AMS-Extended)
9072 \begin_layout Criterion*
9073 A required condition.
9076 \begin_layout Algorithm*
9077 A general procedure to be used.
9080 \begin_layout Axiom*
9081 This is a property or statement taken as true within the system being discussed.
9084 \begin_layout Condition*
9085 Sometimes used to state a condition assumed within the present context of
9090 Similar to a Remark.
9093 \begin_layout Notation*
9094 Used for the explanation of, yes, notation.
9097 \begin_layout Summary
9098 Do we really need to tell you?
9101 \begin_layout Acknowledgement*
9105 \begin_layout Conclusion*
9106 Sometimes used at the end of a long train of argument.
9110 Used in a way similar to Proposition, though perhaps lower on the scale.
9113 \begin_layout Standard
9114 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9116 They need to be available on your system in order to use these environments.
9119 \begin_layout Section
9127 \begin_layout Standard
9133 \begin_layout Subsection
9137 \begin_layout Standard
9138 These are the layout files for some of the journals of the American Geophysical
9140 It is assumed that you have both the AGU's own class files and AGUplus
9141 installed (everything to be found at
9142 \begin_inset Flex URL
9145 \begin_layout Plain Layout
9147 ftp://ftp.agu.org/journals/latex/journals
9155 \begin_layout Subsection
9159 \begin_layout Standard
9169 They are still called this in the LyX GUI, though their LaTeX equivalents
9170 in the AGU classes are
9181 \begin_layout Standard
9182 Newly defined styles are
9219 These are mostly manuscript attributes and defined in the AGU class documentati
9223 \begin_layout Standard
9224 I suspect this is still badly incomplete.
9227 \begin_layout Subsection
9231 \begin_layout Standard
9248 \begin_layout Subsection
9252 \begin_layout Itemize
9255 Journal of Geophysical Research
9264 \begin_layout Standard
9265 Add your own, it isn't so hard! Look at the
9276 \begin_layout Subsection
9277 Bugs and things to remember
9280 \begin_layout Standard
9281 In order to use the new layouts, you must remember to do the following for
9285 \begin_layout Enumerate
9291 This can be done in the
9293 Layout\SpecialChar \menuseparator
9298 Document\SpecialChar \menuseparator
9302 (AGU articles are always in English, right? So
9309 \begin_layout Enumerate
9319 (Yes, this is a bug.)
9322 \begin_layout Enumerate
9323 Make sure you use the
9327 bibliography style, by entering
9331 into the second field of the BibTeX inset.
9332 None of the standard styles will do.
9335 \begin_layout Section
9339 \begin_layout Standard
9345 \begin_layout Subsection
9349 \begin_layout Standard
9350 Broadway is for writing plays.
9351 The format is more decorative than Hollywood, and much less standardized.
9352 This format should be suitable for workshops.
9355 \begin_layout Subsection
9359 \begin_layout Standard
9360 The same as in Hollywood.
9363 \begin_layout Subsection
9367 \begin_layout Standard
9372 names as labels then cross-reference the label to insert the name.
9373 The cross-reference dialog will show the current cast of characters.
9376 \begin_layout Subsection
9377 Paper size and Margins
9380 \begin_layout Standard
9381 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9384 \begin_layout Subsection
9388 \begin_layout Standard
9389 The following environments are available.
9390 You can use broadway.bind to get the bind keys shown at the right.
9393 \begin_layout Itemize
9397 \begin_inset Newline newline
9402 You should not have to use this, but it is here for anything that does not
9406 \begin_layout Itemize
9410 \begin_inset space \hfill{}
9414 \begin_inset Newline newline
9419 Used to describe stage setting and the action.
9420 First use of speaker names in all CAPs.
9423 \begin_layout Itemize
9427 \begin_inset space \hfill{}
9431 \begin_inset Newline newline
9436 Automatically numbered.
9437 On screen it will be arabic, but will print as Roman.
9440 \begin_layout Itemize
9444 \begin_inset space \hfill{}
9448 \begin_inset Newline newline
9458 It is just centered text.
9461 \begin_layout Itemize
9465 \begin_inset space \hfill{}
9469 \begin_inset Newline newline
9474 Not automatically numbered.
9475 You supply the number.
9476 This is because I couldn't figure out how.
9479 \begin_layout Itemize
9483 \begin_inset space \hfill{}
9487 \begin_inset Newline newline
9492 A special case of Narrative to describe the setting and action as the curtain
9496 \begin_layout Itemize
9500 \begin_inset space \hfill{}
9504 \begin_inset Newline newline
9509 The speaker's (actor's) title, centered in all CAPS.
9512 \begin_layout Itemize
9516 \begin_inset space \hfill{}
9520 \begin_inset Newline newline
9525 Instructions to the speaker.
9526 The parentheses are automatically inserted.
9527 The ( will appear on screen, but both will be in the printed play.
9528 This environment is only used within
9535 \begin_layout Itemize
9539 \begin_inset space \hfill{}
9543 \begin_inset Newline newline
9548 What the Speaker says.
9551 \begin_layout Itemize
9555 \begin_inset space \hfill{}
9559 \begin_inset Newline newline
9564 The curtain comes down.
9567 \begin_layout Itemize
9571 \begin_inset space \hfill{}
9577 \begin_layout Itemize
9581 \begin_inset space \hfill{}
9587 \begin_layout Itemize
9591 \begin_inset space \hfill{}
9597 \begin_layout Standard
9601 \begin_layout Section
9605 \begin_layout Standard
9610 can be used to type letters according to German conventions.
9611 A template file is included in
9613 .../lyx/share/templates
9615 for you to use as a starting point.
9618 \begin_layout Section
9626 \begin_layout Standard
9632 \begin_layout Subsection
9636 \begin_layout Standard
9637 This is the layout file for the European Geophysical Society journals.
9642 can be downloaded from the web site of the EGS under
9643 \begin_inset Flex URL
9646 \begin_layout Plain Layout
9656 \begin_layout Subsection
9660 \begin_layout Standard
9663 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9671 The current layout file is unfortunately very unmodular and would benefit
9672 from using the various
9679 \begin_layout Section
9683 \begin_layout Standard
9689 \begin_layout Standard
9690 Elsevier Science Publishers B.V.
9691 provides a standard LaTeX document class (
9695 ) for submitting articles to their various journals.
9696 The style file can be downloaded directly from their web site:
9697 \begin_inset Flex URL
9700 \begin_layout Plain Layout
9702 http://www.elsevier.com/wps/find/authorsview.authors/latex
9708 Instructions are supplied along with the class file, which details the
9709 requirements of the publishers.
9710 LyX includes a package that allows for the use of this class, by a layout
9711 and a template file.
9712 Installation of the class file is the same as for any other LaTeX package;
9713 instructions are provided in the Elsevier documentation.
9716 \begin_layout Standard
9726 As the Elsevier class file is based mainly on the standard article class,
9727 most of the normal functionality is provided.
9728 The Elsevier class defines a number of mathematical environments, which
9729 are similar to the AMS environments.
9730 These commands are all described in the Elsevier documentation, and are
9734 \begin_layout Standard
9735 The easiest way to use the Elsevier style is to base documents on the included
9737 It is best not to use options such as fancy headings or the geometry package,
9738 as elements such as these are defined by Elsevier in their style file.
9739 Ideally, no extra packages except those mentioned in the Elsevier documentation
9741 Essentially, Elsevier require as
9742 \begin_inset Quotes eld
9746 \begin_inset Quotes erd
9749 a LaTeX file as possible, as their intention is to take the supplied file
9750 and replace the class file with one for the particular journal to which
9751 the paper has been submitted.
9752 This also means that not too much time should be spent on the formating
9754 When it comes to be published, this will change anyway.
9755 The rest of the usage for this layout is substantially the same as for
9756 the normal article class.
9757 For details of what Elsevier do and don't allow, refer to their documentation.
9760 \begin_layout Section
9766 \begin_inset CommandInset label
9775 \begin_layout Standard
9781 \begin_layout Subsection
9785 \begin_layout Standard
9786 This section describes how to use LyX to make slides for overhead projectors.
9787 There are two document classes that can do this: the default slides class
9793 This section documents the latter.
9796 \begin_layout Standard
9797 I'm going to say this again, nice and clear, so that there's no misunderstanding
9801 \begin_layout Standard
9802 \begin_inset VSpace bigskip
9808 \begin_layout Standard
9812 This section documents the class
9813 \begin_inset Quotes eld
9821 \begin_inset Quotes erd
9829 \begin_layout Standard
9830 \begin_inset VSpace bigskip
9836 \begin_layout Standard
9837 If you're looking for the documentation for
9838 \begin_inset Quotes eld
9846 \begin_inset Quotes erd
9850 \begin_inset space ~
9854 \begin_inset CommandInset ref
9856 reference "sec:slitex"
9861 If your machine doesn't have the
9866 \begin_inset Quotes eld
9874 \begin_inset Quotes erd
9877 ] installed, you'll probably have to use the default
9881 class, which isn't quite as good as
9886 \begin_layout Standard
9891 class is designed for use with version 2.1 of the
9895 LaTeX class file which is now an integral part of LaTeX2e.
9898 \begin_layout Subsection
9902 \begin_layout Standard
9903 Obviously, to use this document class, you need to select
9904 \begin_inset Quotes eld
9912 \begin_inset Quotes erd
9922 \begin_inset space ~
9928 There are some settings in the
9931 \begin_inset space ~
9936 dialog that you should know about that are specific to this class:
9939 \begin_layout Itemize
9940 Don't change the options
9951 \begin_inset space ~
9957 They're ignored by the
9964 \begin_layout Itemize
9965 The default font size is 20
9966 \begin_inset space \thinspace{}
9969 pt with the other options being 17
9970 \begin_inset space \thinspace{}
9974 \begin_inset space \thinspace{}
9978 \begin_inset space \thinspace{}
9984 \begin_layout Itemize
9993 but all math equations are still typeset in the usual roman font.
9996 \begin_layout Itemize
10001 supports A4 and Letter paper sizes as well as a special size for working
10003 \begin_inset space \thinspace{}
10007 It doesn't support A5, B5, legal or executive paper sizes.
10010 \begin_layout Itemize
10011 Don't bother changing the
10015 settings because they are ignored anyway.
10016 All floats appear where they are defined in the text.
10019 \begin_layout Itemize
10024 setting behaves a bit differently for this class.
10029 provides extensive footer and header capabilities including a user-defined
10032 \begin_inset space ~
10036 \begin_inset CommandInset ref
10038 reference "sec:foilfoot"
10043 The title page is treated differently to all other pages in the document
10052 has the logo centered at the bottom of the page (if one is defined).
10053 The possible page style choices and what they do are as follows:
10057 \begin_layout Labeling
10058 \labelwidthstring MMMMMMM
10065 The final output contains no page numbers, or other headers or footers
10066 (except footnotes of course).
10070 \begin_layout Labeling
10071 \labelwidthstring MMMMMMM
10078 The final output contains page numbers centered at the bottom of the page.
10079 No other headings or footers (other than footnotes).
10082 \begin_layout Labeling
10083 \labelwidthstring MMMMMMM
10088 Page numbers in lower right corner.
10089 Additional headers and footers are also shown.
10090 This is also the default.
10093 \begin_layout Labeling
10094 \labelwidthstring MMMMMMM
10099 Gives you access to the
10103 package although its use with
10107 is discouraged by the writer of the
10111 package because of some potential page layout clashes.
10115 \begin_layout Subsubsection
10119 \begin_layout Standard
10120 The following options may be used in the extra class options in the
10122 Document\SpecialChar \menuseparator
10128 \begin_layout Labeling
10129 \labelwidthstring MMMMMMx
10134 This sets up the page layout for 7.33
10135 \begin_inset space \thinspace{}
10139 \begin_inset space \thinspace{}
10142 in paper, which is about the same aspect ratio as a 35
10143 \begin_inset space \thinspace{}
10146 mm slide, making it a bit easier to work with this medium.
10149 \begin_layout Labeling
10150 \labelwidthstring MMMMMMx
10155 Places a rule across the page below the header on every page except the
10159 \begin_layout Labeling
10160 \labelwidthstring MMMMMMx
10165 Places a rule across the page above the footer on every page except the
10169 \begin_layout Labeling
10170 \labelwidthstring MMMMMMx
10175 This is automatically set each time you create a new
10184 to use the dvips driver to rotate those pages that are set as landscape
10188 \begin_layout Labeling
10189 \labelwidthstring MMMMMMx
10194 Simply changes the page dimensions to those of a landscape page but doesn't
10196 Thus if you use this option you need to use an external program to rotate
10197 each page or feed your paper through your printer as landscape.
10198 Note that this option effectively reverses the roles of the
10206 environments (don't worry these are described in the next section).
10209 \begin_layout Labeling
10210 \labelwidthstring MMMMMMx
10215 Equation numbers on the left.
10218 \begin_layout Labeling
10219 \labelwidthstring MMMMMMx
10224 Flush-left equations.
10227 \begin_layout Subsection
10228 Supported Environments
10231 \begin_layout Standard
10232 Most of the environments commonly supported in other classes are also supported
10238 There are several additional environments provided by
10242 as well as a couple added by LyX.
10243 The following environments are shared with other classes:
10246 \begin_layout Standard
10250 \begin_layout Plain Layout
10254 begin{multicols}{2}
10262 \begin_layout Itemize
10268 \begin_layout Itemize
10274 \begin_layout Itemize
10280 \begin_layout Itemize
10286 \begin_layout Itemize
10292 \begin_layout Itemize
10298 \begin_layout Itemize
10304 \begin_layout Itemize
10310 \begin_layout Itemize
10316 \begin_layout Itemize
10322 \begin_layout Itemize
10328 \begin_layout Itemize
10334 \begin_layout Itemize
10340 \begin_layout Itemize
10346 \begin_layout Itemize
10352 \begin_layout Itemize
10358 \begin_layout Itemize
10364 \begin_layout Itemize
10370 \begin_layout Standard
10374 \begin_layout Plain Layout
10386 \begin_layout Standard
10387 That is, all the major environments apart from the sectioning environments.
10388 Since foils are essentially self-contained sections, with a title and body,
10393 provides specific commands for starting new foils and these are:
10396 \begin_layout Itemize
10402 \begin_layout Itemize
10408 \begin_layout Standard
10409 LyX also provides slightly modified versions of these two environments called:
10412 \begin_layout Itemize
10418 \begin_layout Itemize
10421 ShortRotatefoilhead
10424 \begin_layout Standard
10425 and the differences will be explained in the next section.
10428 \begin_layout Standard
10429 Since foils are often used in presenting ideas or new theorems and such
10434 also provides a comprehensive box of goodies for presenting them:
10437 \begin_layout Standard
10441 \begin_layout Plain Layout
10445 begin{multicols}{2}
10453 \begin_layout Itemize
10459 \begin_layout Itemize
10465 \begin_layout Itemize
10471 \begin_layout Itemize
10477 \begin_layout Itemize
10483 \begin_layout Itemize
10489 \begin_layout Itemize
10495 \begin_layout Itemize
10501 \begin_layout Itemize
10507 \begin_layout Itemize
10513 \begin_layout Itemize
10519 \begin_layout Standard
10523 \begin_layout Plain Layout
10535 \begin_layout Standard
10536 The starred versions are unnumbered while the unstarred versions are numbered.
10537 There are also two list environments added by LyX and these are:
10540 \begin_layout Itemize
10546 \begin_layout Itemize
10552 \begin_layout Standard
10557 provides some powerful header and footer capabilities that are best set
10558 in the preamble although they may be set at any point in a document.
10559 If you want to change these settings in your document the best place to
10560 do so is at the very top of a foil, i.
10561 \begin_inset space \thinspace{}
10567 \begin_inset space \space{}
10572 straight after the foilhead.
10575 \begin_layout Standard
10576 For this purpose, the following command styles are provided [
10583 \begin_layout Standard
10587 \begin_layout Plain Layout
10591 begin{multicols}{2}
10599 \begin_layout Itemize
10603 \begin_inset space ~
10609 \begin_layout Itemize
10615 \begin_layout Itemize
10619 \begin_inset space ~
10625 \begin_layout Itemize
10629 \begin_inset space ~
10635 \begin_layout Itemize
10639 \begin_inset space ~
10646 \begin_layout Standard
10647 \begin_inset space ~
10654 \begin_layout Standard
10658 \begin_layout Plain Layout
10670 \begin_layout Standard
10671 There are also a few commands provided by
10675 that aren't directly supported by LyX but I'll tell you what they do and
10676 how to use them in section
10677 \begin_inset space ~
10681 \begin_inset CommandInset ref
10683 reference "sec:unsuppfoils"
10690 \begin_layout Subsection
10691 Building a Set of Foils
10694 \begin_layout Standard
10695 This section will give a simple introduction to using the different environments
10696 to build a set of foils.
10697 If you want to see an example set of foils, take a look at the
10701 file you find in LyX's
10708 \begin_layout Subsubsection
10709 Give It a Title Page
10712 \begin_layout Standard
10713 Unlike other classes that provide
10733 creates the title on a page of its own.
10734 If you leave out the
10738 environment LaTeX will substitute the current date (every time you regenerate
10742 \begin_layout Subsubsection
10746 \begin_layout Standard
10747 As I mentioned earlier, there are four ways of starting a new foil.
10748 For portrait foils you should use
10757 The difference between these two environments is the amount of space between
10758 the title of the foil (the foilhead) and the body of the foil.
10761 \begin_layout Standard
10762 Landscape foils are generated using the
10768 ShortRotatefoilhead
10771 Again the only difference is the spacing between foilhead and body.
10772 Both of the short versions have 0.5 inches less separation between the foilhead
10777 \begin_layout Standard
10778 One problem with the support for landscape foils is the requirement that
10779 you have to use the
10783 driver to generate the PostScript output otherwise the foils won't be rotated.
10784 It is possible to get landscape foils even if you haven't got the
10788 driver provided you can feed your foils sideways through your printer ;-)
10791 \begin_layout Subsubsection
10792 Theorems, Lemmas, Proofs and more
10795 \begin_layout Standard
10796 Due to a small bug in LyX you can't have two of the same type of these environme
10797 nts directly following each other.
10798 They must be separated by something.
10799 If you try, you will just be extending the previous environment as if you
10800 had merged the two environments together.
10801 So, how do you get around this problem? The simplest option is to insert
10802 some text between the two environments or add a
10806 environment between the two with just a
10807 \begin_inset Quotes eld
10815 \begin_inset Quotes erd
10819 This will force LyX to produce two separate environments and hence the
10820 correct LaTeX output.
10821 An example is provided in the example file included with the LyX distribution.
10822 Remember, this problem only occurs if you are trying to place two of the
10823 same type of theorem-like environments one directly after the other.
10826 \begin_layout Subsubsection
10830 \begin_layout Standard
10831 You get all the commonly supported list styles found in other classes as
10832 well as two new ones.
10833 I'll only describe the new ones here.
10834 If you want to find out more about the other list environments check out
10840 If you intend to use itemized lists you might also want to read about the
10844 \begin_inset space ~
10848 \begin_inset space ~
10853 dialog described above in section
10854 \begin_inset space ~
10858 \begin_inset CommandInset ref
10860 reference "sec:bullet"
10867 \begin_layout Standard
10868 The two new list styles,
10876 , are designed to make it easier for you to create lists of do's and don'ts
10877 or right and wrong by providing dedicated environments that use a tick
10878 or a cross as the label of the list.
10879 These lists are in fact dedicated variants of the
10884 They do however require that you have the
10888 packages installed.
10891 \begin_layout Subsubsection
10895 \begin_layout Standard
10900 redefines the floating tables and figures so that they appear exactly where
10901 they are in the text rather than pushing them to the top of the page or
10902 to some user specified location.
10903 In fact if you change the float placement settings they are simply ignored.
10906 \begin_layout Subsubsection
10907 Page Headers and Footers
10908 \begin_inset CommandInset label
10910 name "sec:foilfoot"
10917 \begin_layout Standard
10921 \begin_inset space ~
10930 are two commands used to control the left-footer text string.
10931 The first is meant to allow you to include a graphic logo on your foils
10933 \begin_inset Quotes eld
10941 \begin_inset Quotes erd
10945 While the second is meant to provide a classification for the audience,
10949 \begin_inset space \thinspace{}
10955 \begin_inset space \space{}
10959 It is empty by default.
10962 \begin_layout Standard
10963 The remaining page corners can be filled by
10966 \begin_inset space ~
10971 (which defaults to page numbers),
10974 \begin_inset space ~
10982 \begin_inset space ~
10990 \begin_layout Subsection
10996 \begin_inset CommandInset label
10998 name "sec:unsuppfoils"
11005 \begin_layout Standard
11006 All the commands mentioned below need to be set in a
11014 within another environment.
11017 \begin_layout Subsubsection
11021 \begin_layout Standard
11022 All lengths are adjusted using the
11045 should be replaced by the name given to the length you want to change and
11050 is the length value.
11051 All lengths should be specified in units of length such as inches (
11063 ) or relative to some document or font-based length such as
11073 \begin_layout Standard
11074 It's possible to change the spacing between a foilhead and the body of the
11075 foil by adjusting the length specified by
11082 For example, to make
11087 \begin_inset space \space{}
11090 in closer to their bodies put the following in the preamble:
11096 foilheadskip}{-0.5in}
11099 \begin_layout Standard
11100 The spacings around floats can be adjusted by setting these lengths:
11103 \begin_layout Labeling
11104 \labelwidthstring MMMMMMMMMMM
11111 Separation between the text and the top of the float
11114 \begin_layout Labeling
11115 \labelwidthstring MMMMMMMMMMM
11122 Separation between the float and the caption
11125 \begin_layout Labeling
11126 \labelwidthstring MMMMMMMMMMM
11133 Separation between the caption and the following text
11136 \begin_layout Labeling
11137 \labelwidthstring MMMMMMMMMMM
11144 You can make the captions narrower than the surrounding text by adjusting
11146 Best done relative to
11155 \begin_layout Standard
11156 There are also several title page related lengths that you may find useful
11157 if you have a long title or several authors:
11160 \begin_layout Labeling
11161 \labelwidthstring MMMMMMMMMMM
11168 Separation from headers to
11173 \begin_layout Labeling
11174 \labelwidthstring MMMMMMMMMMM
11192 \begin_layout Labeling
11193 \labelwidthstring MMMMMMMMMMM
11207 \begin_layout Labeling
11208 \labelwidthstring MMMMMMMMMMM
11224 \begin_layout Labeling
11225 \labelwidthstring MMMMMMMMMMM
11241 \begin_layout Standard
11242 The last length related command affects all the list environments.
11253 a list environment then all the vertical spacing between the list items
11255 Note that this is a command not a length so it doesn't require
11261 like the stuff mentioned above.
11264 \begin_layout Subsubsection
11265 Headers and Footers
11268 \begin_layout Standard
11281 commands control whether the logo in the
11285 definition appear on a given page.
11292 in the preamble then none of the foils will have the logo on them.
11293 If you don't want the logo on a particular page place the
11299 directly after the foilhead of that page and the
11305 directly after the next foilhead.
11308 \begin_layout Standard
11309 If you decide to use the
11313 page style setting in the
11316 \begin_inset space ~
11321 dialog you should probably add
11331 to your preamble so headers and footers on landscape pages are correctly
11332 placed when rotated.
11333 This is due to some clashes between the page layouts provided by the
11344 \begin_layout Section
11345 Hollywood (Hollywood spec scripts)
11348 \begin_layout Standard
11354 \begin_layout Subsection
11358 \begin_layout Standard
11359 Getting the format of a Hollywood script right is a
11360 \begin_inset Quotes eld
11364 \begin_inset Quotes erd
11367 It is designed to make the readers focus on content and to be easy and
11368 familiar for the actors to read.
11369 Each page of a script should be one minute of film.
11370 Nothing goes in a script that you cannot see or hear on screen.
11371 The courier 12 pt font should be used throughout.
11375 \begin_layout Subsection
11379 \begin_layout Standard
11380 Speakers' lines should NEVER break in mid-sentence.
11381 If a speaker's lines continue over a page break, repeat the
11385 title followed by (Cont'd).
11388 \begin_layout Subsection
11392 \begin_layout Standard
11397 names as labels then cross-reference the label to insert the name.
11398 The cross-reference dialog will show the current cast of characters.
11399 You can use this to insert the speaker name in narratives also.
11402 \begin_layout Subsection
11403 Paper size and Margins
11406 \begin_layout Standard
11407 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11410 \begin_layout Subsection
11414 \begin_layout Standard
11415 The following environments are available.
11416 You can use hollywood.bind to get the bind keys shown at the right.
11419 \begin_layout Itemize
11423 \begin_inset Newline newline
11428 Used where nothing else works.
11432 \begin_layout Itemize
11438 \begin_inset space \hfill{}
11446 \begin_inset Newline newline
11449 Usually followed by something like
11450 \begin_inset Quotes eld
11453 on Sally waking up.
11454 \begin_inset Quotes erd
11460 \begin_layout Itemize
11464 \begin_inset space \hfill{}
11468 \begin_inset Newline newline
11473 Introduces a new INTERIOR camera set-up.
11474 Always followed by DAY or NIGHT, or something similar to define the lighting
11476 Everthing on this line in CAPS.
11479 \begin_layout Itemize
11483 \begin_inset space \hfill{}
11487 \begin_inset Newline newline
11492 Introduces a new EXTERIOR camera set-up.
11493 Everthing on this line in CAPS.
11496 \begin_layout Itemize
11500 \begin_inset space \hfill{}
11504 \begin_inset Newline newline
11509 The character speaking.
11512 \begin_layout Itemize
11516 \begin_inset space \hfill{}
11520 \begin_inset Newline newline
11525 Instructions to the speaker.
11526 The () are automatically inserted, but only the ( will show in LyX.
11527 Both will be printed.
11530 \begin_layout Itemize
11534 \begin_inset space \hfill{}
11538 \begin_inset Newline newline
11550 \begin_layout Itemize
11554 \begin_inset space \hfill{}
11558 \begin_inset Newline newline
11563 Camera movement instruction.
11565 \begin_inset space \thinspace{}
11569 \begin_inset space \space{}
11575 \begin_layout Itemize
11579 \begin_inset space \hfill{}
11585 \begin_layout Itemize
11589 \begin_inset space \hfill{}
11595 \begin_layout Itemize
11599 \begin_inset space \hfill{}
11605 \begin_layout Itemize
11609 \begin_inset space \hfill{}
11615 \begin_layout Subsection
11619 \begin_layout Itemize
11623 \begin_layout Itemize
11627 \begin_layout Itemize
11629 \begin_inset space \thinspace{}
11636 \begin_layout Itemize
11641 \begin_layout Itemize
11642 PAN — camera movement
11645 \begin_layout Itemize
11646 INSERT — cut to close-up of
11649 \begin_layout Section
11653 \begin_layout Standard
11656 Panayotis Papasotiriou
11659 \begin_layout Subsection
11663 \begin_layout Standard
11664 The ijmpc package is a set of macros that facilitates electronic manuscript
11667 International Journal of Modern Physics C
11670 Similarly, the ijmpd package is for creating manuscripts to be submitted
11673 International Journal of Modern Physics D
11676 Both journals are published by World Scientific.
11677 The corresponding document classes are named
11686 These files, together with instructions for the authors, can be downloaded
11688 \begin_inset Flex URL
11691 \begin_layout Plain Layout
11693 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11699 \begin_inset Flex URL
11702 \begin_layout Plain Layout
11704 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11710 Both packages are modified versions of the standard
11711 \begin_inset Quotes eld
11715 \begin_inset Quotes erd
11718 package, and they are almost (but not exactly) identical.
11719 Most of their features are supported by LyX.
11720 I have used LyX successfully to write articles submitted to both journals
11721 without any problem.
11724 \begin_layout Subsection
11728 \begin_layout Standard
11729 As usual, the easiest way to write a paper is to start with a template.
11732 File\SpecialChar \menuseparator
11751 This will give an (almost) empty document that includes the most common
11752 fields found in a manuscript.
11753 Simply overwrite the existing text (including the brackets,
11758 You should keep in mind the following remarks.
11761 \begin_layout Enumerate
11762 LyX won't let you change the font size and the page style of the document,
11763 because such modifications are not allowed by both packages.
11766 \begin_layout Enumerate
11767 The language of the document should not be changed.
11768 Before previewing your paper, be sure that the babel package is not used.
11769 To do this, click on
11771 Tools\SpecialChar \menuseparator
11782 checkbox in the language settings, and click on
11790 , if you wish to make this change permanent).
11793 \begin_layout Enumerate
11795 \begin_inset Quotes eld
11799 \begin_inset Quotes erd
11802 style must be used to define keywords.
11805 \begin_layout Enumerate
11806 The ijmpc package provides a style named
11807 \begin_inset Quotes eld
11810 Classification Codes
11811 \begin_inset Quotes erd
11814 , which can be used to define classification codes, such as PACS numbers.
11815 Note that this facility is not supported by the ijmpd package.
11818 \begin_layout Enumerate
11819 Several new environments are available:
11820 \begin_inset Quotes eld
11824 \begin_inset Quotes erd
11828 \begin_inset Quotes eld
11832 \begin_inset Quotes erd
11836 \begin_inset Quotes eld
11840 \begin_inset Quotes erd
11844 \begin_inset Quotes eld
11848 \begin_inset Quotes erd
11852 \begin_inset Quotes eld
11856 \begin_inset Quotes erd
11860 \begin_inset Quotes eld
11864 \begin_inset Quotes erd
11868 \begin_inset Quotes eld
11872 \begin_inset Quotes erd
11876 \begin_inset Quotes eld
11880 \begin_inset Quotes erd
11884 \begin_inset Quotes eld
11888 \begin_inset Quotes erd
11892 \begin_inset Quotes eld
11896 \begin_inset Quotes erd
11900 \begin_inset Quotes eld
11904 \begin_inset Quotes erd
11908 \begin_inset Quotes eld
11912 \begin_inset Quotes erd
11916 \begin_inset Quotes eld
11920 \begin_inset Quotes erd
11924 \begin_inset Quotes eld
11928 \begin_inset Quotes erd
11932 Their use is more or less obvious.
11933 LyX supports all these environments; it will use the proper label, text
11934 style, and numbering scheme for each of them.
11937 \begin_layout Enumerate
11938 Both packages use basic citations; the natbib package should not be used.
11939 In LyX, citation references are shown as usual; in the output, citations
11940 are shown as superscripts.
11941 If you want to use a citation as normal text, you should use the
11946 \begin_inset space \thinspace{}
11950 \begin_inset space \space{}
11954 \begin_inset Quotes eld
11958 \begin_inset space \space{}
11968 \begin_inset Quotes erd
11974 \begin_layout Enumerate
11976 \begin_inset Quotes eld
11980 \begin_inset Quotes erd
11983 section in both packages.
11984 To put acknowledgments, just use the
11985 \begin_inset Quotes eld
11989 \begin_inset Quotes erd
11995 \begin_layout Enumerate
11996 Appendices may be added to the paper,
12000 the Acknowledgments and
12005 LyX provides a special environment, called
12006 \begin_inset Quotes eld
12010 \begin_inset Quotes erd
12013 which marks the beginning of the appendices.
12014 This environment should be left blank; it just sends a LaTeX command, but
12015 nothing is really printed.
12017 \begin_inset Quotes eld
12021 \begin_inset Quotes erd
12024 is printed with blue letters, as a signal that all sections after that
12025 point are appendices.
12026 To write an appendix, use the
12027 \begin_inset Quotes eld
12031 \begin_inset Quotes erd
12035 LyX will number each appendix with capital letters, as required by both
12038 \begin_inset Quotes eld
12042 \begin_inset Quotes erd
12049 be present before the first appendix; if not, all appendices will be numbered
12050 as normal sections in the output.
12053 \begin_layout Enumerate
12054 The ijmpc and the ijmpd packages use the
12058 command to implement table captions.
12059 As a result, a table created by LyX is printed correctly, but its caption
12061 However, you can use some TeX code to overcome this problem, so that captions
12062 are printed as expected.
12063 To do so, create a float table as usual, remove the caption, and replace
12064 it with the TeX code
12074 (sic); you must also the TeX code
12078 immediately after the tabular material.
12079 Study the example table included in the template files to see how this
12080 trick is implemented.
12081 Alternatively, If you need table captions, you should implement the whole
12086 file, then include this file to the LyX document (
12088 Insert\SpecialChar \menuseparator
12089 File\SpecialChar \menuseparator
12091 \begin_inset space ~
12097 Details on how to create a table float can be found in the files
12105 , included in the corresponding packages.
12108 \begin_layout Subsection
12109 Preparing a paper for submission
12112 \begin_layout Standard
12113 Before you submit your paper you must export the LyX document as a LaTeX
12116 File\SpecialChar \menuseparator
12117 Export\SpecialChar \menuseparator
12124 \begin_layout Plain Layout
12125 Actually you have the choice between LaTeX (plain) and pdflatex.
12126 If you intend to use pdflatex to prepare the paper, you should use the
12127 pdflatex option so that included graphics are converted to PDF format,
12128 ready for use by pdflatex.
12133 , then make the following changes to the resulting
12140 \begin_layout Enumerate
12141 Remove the comment lines before the
12150 \begin_layout Enumerate
12151 Remove everything between (and including) the
12163 commands, except for any commands you specifically put into the LaTeX preamble.
12166 \begin_layout Standard
12171 file should be saved and processed through LaTeX as many times as necessary.
12172 You may also want to check the resulting
12179 \begin_layout Subsection
12183 \begin_layout Standard
12184 The use of TeX code is reduced to two commands, which must be placed at
12185 the top of the document.
12186 If you started writing your paper by using the
12194 template, the TeX code needed is already in its place; you usually don't
12196 You may only modify the first TeX code to specify the information printed
12197 to the top of odd and even pages (authors' names and short paper's title,
12199 This TeX code must have the form
12203 markboth{Authors' Names}{Short Paper's Title}
12208 \begin_layout Section
12212 \begin_layout Standard
12218 \begin_layout Subsection
12222 \begin_layout Standard
12223 The iopart package provides a document class to create electronic manuscript
12224 submission to the journals published by the Institute of Physics.
12225 Instructions for the authors how to create a paper using the iopart class
12226 can be downloaded together with the iopart package from the site
12227 \begin_inset Flex URL
12230 \begin_layout Plain Layout
12232 ftp://ftp.iop.org/pub/journals/latex2e
12240 \begin_layout Subsection
12244 \begin_layout Standard
12245 The easiest way to write a paper is to start with the file
12249 that is available in LyX's examples files folder.
12250 Open this file, save it under a new name, and start writing.
12251 The example file explains how to use the special text environments.
12252 Here are the most important advices:
12255 \begin_layout Itemize
12256 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12259 Use AMS math package
12261 in the document settings under
12268 \begin_layout Itemize
12271 The title environment defines the kind of your paper.
12272 So use one of the following environments for the title:
12276 \begin_layout Itemize
12285 \begin_layout Itemize
12294 \begin_layout Itemize
12300 for a Topical review
12303 \begin_layout Itemize
12312 \begin_layout Itemize
12321 \begin_layout Itemize
12327 for a Paper (same as Title)
12330 \begin_layout Itemize
12336 for a Preliminary communication
12339 \begin_layout Itemize
12345 for a Rapid communication
12348 \begin_layout Itemize
12354 for a Letter to the editor
12358 \begin_layout Itemize
12361 All title environments except of
12365 can have an optional short title.
12368 \begin_layout Itemize
12369 There is a general title environment
12373 which is not directly supported by the LyX.
12374 This can be used as TeX code when your document doesn't fit into one of
12375 the other title types.
12378 \begin_layout Standard
12379 For more informations like hints for special table and formula formatting,
12380 look at the IOP author guidelines.
12383 \begin_layout Section
12387 \begin_layout Standard
12390 Panayotis Papasotiriou
12393 \begin_layout Subsection
12397 \begin_layout Standard
12398 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12399 that facilitates electronic manuscript submission to the journals they
12401 Most known of them (at least in my domain of interest) are
12403 Astrophysics and Space Science
12409 , but there are many others (see a complete list at
12410 \begin_inset Flex URL
12413 \begin_layout Plain Layout
12415 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12421 The Kluwer package may be downloaded from the site
12422 \begin_inset Flex URL
12425 \begin_layout Plain Layout
12427 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12433 A complete user guide is contained in that package (but it can also be
12434 downloaded separately).
12437 \begin_layout Standard
12438 LyX supports many features of the package but not everything.
12439 However, the TeX code needed is reduced to some
12440 \begin_inset Quotes eld
12444 \begin_inset Quotes erd
12447 commands of the package (see
12448 \begin_inset space ~
12452 \begin_inset CommandInset ref
12454 reference "subsec:kluwer_peculiarities"
12459 I have recently used LyX to write an article submitted to the
12461 Astrophysics and Space Science
12463 without any problem.
12466 \begin_layout Subsection
12470 \begin_layout Standard
12471 The easiest way to write a paper is to start with the Kluwer template file.
12474 File\SpecialChar \menuseparator
12486 This will give an (almost) empty document that includes the most common
12487 fields found in a manuscript and a short description of their use.
12488 As in most templates, simply overwrite the existing text (including the
12493 ) with the correct information.
12496 \begin_layout Subsection
12497 Preparing a paper for submission
12500 \begin_layout Standard
12501 As in the AASTeX package, before you submit your paper to a journal you
12503 \begin_inset Quotes eld
12507 \begin_inset Quotes erd
12513 \begin_layout Enumerate
12514 Export your paper as a LaTeX file.
12515 To do this, click on
12517 File\SpecialChar \menuseparator
12518 Export\SpecialChar \menuseparator
12525 \begin_layout Enumerate
12530 file with a text editor and make the following changes
12534 \begin_layout Enumerate
12535 remove the comment lines before the
12544 \begin_layout Enumerate
12545 remove everything between (and including) the
12557 commands, except for any commands you specifically put into the LaTeX preamble.
12560 \begin_layout Standard
12569 \begin_layout Enumerate
12574 file through LaTeX as many times as necessary (usually up to three).
12577 \begin_layout Enumerate
12583 \begin_inset space \thinspace{}
12587 \begin_inset space \space{}
12594 , and check if everything is OK (it should, if you didn't make any mistake).
12597 \begin_layout Subsection
12598 \begin_inset Quotes eld
12602 \begin_inset Quotes erd
12605 of the Kluwer package
12606 \begin_inset CommandInset label
12608 name "subsec:kluwer_peculiarities"
12615 \begin_layout Standard
12616 The Kluwer package has the following
12617 \begin_inset Quotes eld
12621 \begin_inset Quotes erd
12627 \begin_layout Enumerate
12628 It is possible to write multiple articles in the same LaTeX file
12632 \begin_layout Plain Layout
12633 I can't imagine any good reason to do this.
12639 Each article must be included in the environment
12640 \begin_inset Quotes eld
12644 \begin_inset Quotes erd
12648 Unfortunately, this environment cannot be omitted, even if you write just
12650 Therefore, each article starts with the command
12656 and, obviously, ends with the command
12663 Although this can be implemented in LyX, I didn't included it, since it
12664 looks ugly and can confuse the novice user.
12665 Therefore, you need to enter them directly and mark them as LaTeX code
12667 \begin_inset Quotes eld
12671 \begin_inset Quotes erd
12677 \begin_layout Enumerate
12678 Information given at the beginning of the article (i.
12679 \begin_inset space \thinspace{}
12683 \begin_inset space \space{}
12686 title, subtitle, author, institution, running title, running author, abstract
12687 and keywords) must be included in an environment called
12688 \begin_inset Quotes eld
12692 \begin_inset Quotes erd
12696 This is not implemented in LyX, so you must enter title, subtitle etc.
12697 \begin_inset space ~
12700 between two TeX code lines (
12715 \begin_layout Enumerate
12716 According to the user manual, the label of each bibliography item must be
12740 \begin_layout Standard
12745 template takes care of all these
12746 \begin_inset Quotes eld
12750 \begin_inset Quotes erd
12754 If you start a new paper using this template you don't need to do anything
12759 \begin_layout Enumerate
12760 don't delete the TeX code included in the template, and
12763 \begin_layout Enumerate
12764 copy the example bibliography item included in the template and modify it
12765 as necessary to enter new bibliography items.
12768 \begin_layout Section
12772 \begin_layout Standard
12778 \begin_layout Subsection
12782 \begin_layout Standard
12783 The LyX document classes
12785 article (koma-script)
12789 report (koma-script)
12807 correspond to the LaTeX document classes
12824 \begin_inset space ~
12827 of the Koma-Script family.
12828 They are replacements for the standard document classes
12844 , resp., and fit better to European typography conventions in a number of
12848 \begin_layout Itemize
12849 Standard character size is 11pt in
12851 article (koma-script)
12855 report (koma-script)
12863 letter (koma-script)
12868 \begin_layout Itemize
12869 Headings, labels of the description environment, and a number of elements
12872 letter (koma-script)
12874 document class are set in a bold sans serif font.
12878 \begin_layout Plain Layout
12879 There is a big difference between the bold sans serif old cm fonts and new
12880 ec fonts, especially in the appearance of headings.
12881 In comparison, the ec bold sans serif fonts look a bit thin.
12882 Here the LaTeX package
12890 helps to produce the
12891 \begin_inset Quotes eld
12895 \begin_inset Quotes erd
12898 appearance when using the ec fonts.
12903 The numbering of chapter headings is made in the same way as the numbering
12904 of section headings, that is without the extra line
12905 \begin_inset Quotes eld
12908 Chapter\SpecialChar \ldots{}
12910 \begin_inset Quotes erd
12914 In addition, the appearance of the headings can be modified by using a
12915 number of options (in LyX to be entered in the field
12918 \begin_inset space ~
12925 Layout\SpecialChar \menuseparator
12932 \begin_layout Itemize
12933 The main means in the Koma-Script document classes to design the type area
12942 (in LyX to be entered in the extra class options field in the dialog
12944 Document\SpecialChar \menuseparator
12948 They make a clearer modification of page margins possible as do the options
12951 Document\SpecialChar \menuseparator
12958 \begin_layout Itemize
12959 The LaTeX document classes of the Koma-Script family define a number of
12960 additional commands.
12961 Those part of it which makes sense in LyX is implemented in corresponding
12965 \begin_layout Standard
12966 Detailed descriptions of the LaTeX document classes of the Koma-Script family
12967 can be found in the Koma-Script documentation
12978 \begin_layout Subsection
12979 article (koma-script), report (koma-script), and book (koma-script)
12982 \begin_layout Standard
12983 The document classes
12985 article (koma-script)
12989 report (koma-script)
12999 are implemented in the layout files
13012 They contain all the paragraph types of the corresponding standard document
13025 , resp., partly modified, with the exception of the LyX specific
13029 -type, which is replaced by the new
13033 -type having the same functionality.
13038 -Type there is a number of new paragraph types added.
13045 letter (koma-script)
13050 \begin_layout Itemize
13059 : are equivalents to
13067 , resp., additionally inserting an entry in the table of contents.
13076 are not contained in
13078 article (koma-script)
13083 \begin_layout Itemize
13092 : behave exactly as
13100 , resp., additionally clearing running heads.
13105 is not contained in
13107 article (koma-script)
13113 \begin_layout Plain Layout
13126 report (koma-script)
13128 , but since this is identical to
13132 , is has not been implemented in LyX.
13140 \begin_layout Itemize
13145 : generates a heading directly above the following paragraph in the standard
13146 character size without affecting the structure of the document.
13149 \begin_layout Itemize
13158 are special captions which respect the different space settings needed
13159 for captions placed above or below an element (if you follow strict typographic
13160 rules, you might want to place table captions always above the table).
13161 You can also use the class option
13165 , which will switch
13178 You need at least Koma-Script version 2.8q to use this.
13181 \begin_layout Itemize
13186 : can be used to set a bonmot, e.
13187 \begin_inset space \thinspace{}
13191 \begin_inset space \space{}
13194 at the beginning of a chapter.
13195 If you use the optional argument (
13197 Insert\SpecialChar \menuseparator
13199 \begin_inset space ~
13204 ), you can insert the dictum's author there.
13205 Dictum and author are separated by a line.
13206 You need at least Koma-Script version 2.8q to use this.
13211 is not contained in
13213 article (koma-script)
13218 \begin_layout Standard
13219 The following types, together with the standard types
13231 , form the title area of the document.
13232 They must be entered ahead of the first
13233 \begin_inset Quotes eld
13237 \begin_inset Quotes erd
13244 \begin_layout Plain Layout
13245 The corresponding LaTeX commands must appear before the
13256 When such a type is used more than once, the latter usage overwrites the
13257 former one, that means, for every type only the latest usage is valid.
13258 The order of the different types however has, like
13270 , no effect on the appearance of the produced document.
13273 \begin_layout Itemize
13278 : produces a centered paragraph above the ordinary title (
13290 ) for the subject of the document.
13293 \begin_layout Itemize
13298 : produces a centered paragraph below the ordinary title (
13310 ) for the publishers' name.
13313 \begin_layout Itemize
13320 report (koma-script)
13326 produces a centered paragraph on its own page behind the title page, or
13329 article (koma-script)
13331 produces a centered paragraph below the ordinary title (
13347 ) for a dedication.
13350 \begin_layout Itemize
13355 : produces a left aligned paragraph above the ordinary title (
13371 ) for a document`s head.
13374 \begin_layout Itemize
13379 : produces in a double-sided print in
13381 report (koma-script)
13387 a left-aligned paragraph at the top of the title page`s back or has no
13388 effect in a single-sided print or in
13390 article (koma-script)
13395 \begin_layout Itemize
13400 : produces in a double-sided print in
13402 report (koma-script)
13408 a left-aligned paragraph at the bottom of the title page`s back or has
13409 no effect in a single-sided print or in
13411 article (koma-script)
13416 \begin_layout Itemize
13421 : produces a special
13422 \begin_inset Quotes eld
13426 \begin_inset Quotes erd
13429 page ahead of the actual document containing a paragraph without special
13433 \begin_layout Standard
13434 The layout files for the document classes
13436 article (koma-script)
13440 report (koma-script)
13446 do include the file
13451 This is thought of as a place to define your own types.
13456 in your personal layout directory and edit the file!
13459 \begin_layout Subsection
13460 letter (koma-script)
13463 \begin_layout Standard
13467 \begin_layout Plain Layout
13479 \begin_layout Standard
13483 letter (koma-script)
13485 is implemented in the layout file
13490 It contains all the paragraph types of the corresponding standard document
13495 , partly modified, with the exception of the LyX specific types
13507 type, which is replaced by the new
13512 In addition, it contains, in contrast to the standard document class, the
13530 Furthermore, there are a number of new letter specific types.
13533 \begin_layout Standard
13537 \begin_layout Plain Layout
13549 \begin_layout Standard
13550 The appearance of the letter produced by this document class can be controlled
13551 by a number of LaTeX commands, which you can put in the LaTeX preamble.
13555 \begin_layout Plain Layout
13556 For example, the standard appearance of the letter`s heading, consisting
13557 of name and address, is quite self-willed.
13559 \begin_inset Quotes eld
13563 \begin_inset Quotes erd
13566 heading is produced by the following LaTeX commands in the preamble:
13569 \begin_layout LyX-Code
13579 \begin_layout LyX-Code
13595 \begin_layout LyX-Code
13605 \begin_layout LyX-Code
13625 A detailed German description of such LaTeX commands can be found in the
13626 Koma-Script documentation
13631 With it, the letter's author can produce his personal letter layout.
13634 \begin_layout Standard
13643 define the beginning of the letter and must be used in every letter.
13644 To emphasize them in the LyX document class, they are marked with the letter
13654 \begin_inset space ~
13657 in the left margin.
13658 It is possible to write any number of letters in one file.
13663 type produces a new letter using the same addressee and a
13667 type produces a new addressee.
13684 are ordinary paragraph types and can also be used several times in one
13685 and the same letter.
13688 \begin_layout Itemize
13693 : produces a paragraph for the addressee and implicitly defines the beginning
13697 \begin_layout Itemize
13702 : produces a paragraph for the form of address and implicitly produces a
13706 \begin_layout Itemize
13711 : produces a paragraph for a close.
13714 \begin_layout Itemize
13719 : produces a paragraph for a postscript.
13722 \begin_layout Itemize
13727 : produces a paragraph for a distribution list.
13730 \begin_layout Itemize
13735 : produces a paragraph for enclosures.
13738 \begin_layout Standard
13779 are input types provided with a label to enter information, which will
13780 be processed by the document class.
13784 \begin_layout Plain Layout
13785 It could be seen as a matter of inconsequence, that the types
13793 described above are not such input types as well.
13794 Because of the special meaning of those types, however, I have implemented
13795 them as ordinary paragraph types with a one letter mark in the left margin.
13796 Moreover, it would affect my feeling of symmetry, if the
13804 type had such a serious different appearance.
13809 The types must be used ahead of the corresponding
13816 \begin_layout Standard
13817 An implementation of these types in a WYSIWYG fashion does not seem to make
13818 sense, because the real appearance of the produced letter does not only
13819 depend on the usage of the particular type, but also on other factors.
13820 For example, a signature entered in the
13824 type will in the standard behavior appear in the produced letter only,
13825 when in the same letter also a
13830 The entered value of the
13834 type will in the standard behavior not appear in the produced letter at
13836 The possibility to design the letter`s heading freely is already indicated
13837 in a footnote above.
13840 \begin_layout Standard
13841 The input types can also be used as empty paragraphs.
13842 This makes sense e.
13843 \begin_inset space \thinspace{}
13847 \begin_inset space \space{}
13859 type is not used at all, in the standard behavior the value of the
13863 type is used as signature, whereas if an empty
13867 type is used, no signature value is defined.
13870 \begin_layout Standard
13871 By using the input types it is possible to write a letter template, containing
13872 filled input types with your personal dates (name, address, etc.) and empty
13873 input types for other dates you want to enter.
13876 \begin_layout Itemize
13881 : sender's name, in the standard behavior appears as a centered paragraph
13882 in small caps in the letter`s heading.
13885 \begin_layout Itemize
13890 : sender's signature, in the standard behavior appears below the
13899 type is used, the value of the
13903 type appears instead.
13906 \begin_layout Itemize
13911 : sender's address, in the standard behavior appears in a centered paragraph
13912 in the letter`s heading below the sender's name.
13915 \begin_layout Itemize
13920 : sender's telephone number, in the standard behavior only sets the LaTeX
13930 \begin_layout Itemize
13935 : place of the letter`s making.
13938 \begin_layout Itemize
13943 : date of the letter`s making.
13952 , in the standard behavior, produce the place and the date in a right-aligned
13953 line below the addressee's field.
13958 type is used, neither place nor date appear, independent of the value of
13968 type is used, the date of the letter `s production is used.
13971 \begin_layout Itemize
13976 : sender`s back address, in the standard behavior appears above the addressee's
13977 field in a small sans serif font.
13980 \begin_layout Itemize
13985 : special mail information, in the standard behavior appears underlined
13986 above the addressee's field below the back address.
13989 \begin_layout Itemize
13994 : additional information, in the standard behavior appears on right side
13995 below the addressee`s field.
13998 \begin_layout Itemize
14003 : the letter's title, in the standard behavior appears in a big, bold, sans
14004 serif font above the subject.
14007 \begin_layout Itemize
14012 : the letter's subject, in the standard behavior appears in a bold font
14020 \begin_layout Standard
14041 produce a business letter like line above the
14045 line containing the fields
14046 \begin_inset Quotes eld
14050 \begin_inset Quotes erd
14054 \begin_inset Quotes eld
14058 \begin_inset Quotes erd
14062 \begin_inset Quotes eld
14066 \begin_inset Quotes erd
14070 \begin_inset Quotes eld
14074 \begin_inset Quotes erd
14078 \begin_inset Quotes eld
14082 \begin_inset Quotes erd
14086 \begin_inset Quotes eld
14090 \begin_inset Quotes erd
14094 For the date field, the value of the
14100 \begin_inset Quotes eld
14103 business letter types
14104 \begin_inset Quotes erd
14107 is used, the value of the
14111 type however does not appear, but only the LaTeX variable
14118 The ordinary output of place and date in a right-aligned line below the
14119 addressee`s field is suppressed.
14120 The types are implemented as input types provided with a label and must
14121 be used ahead of the corresponding
14128 \begin_layout Itemize
14136 \begin_layout Itemize
14144 \begin_layout Itemize
14152 \begin_layout Itemize
14160 \begin_layout Itemize
14168 \begin_layout Subsection
14169 The new letter class: letter (koma-script v.2)
14172 \begin_layout Standard
14178 \begin_layout Standard
14179 \begin_inset VSpace medskip
14185 \begin_layout Standard
14187 Koma-Script version 2.8 has introduced a new letter class
14191 which supersedes the now unsupported
14196 It has — on the LaTeX side — a completely new interface and is not compatible
14197 with the old class.
14198 Therefore, LyX supports both, though it is recommended you use the new
14202 \begin_layout Standard
14203 This class covers the same functionality as
14205 letter (koma-script),
14208 The basic items are
14212 (receiver's address, same as
14216 in the old layout),
14229 will start a new letter (i.
14230 \begin_inset space \thinspace{}
14234 \begin_inset space \space{}
14237 you can write several letters per document).
14238 New elements are sender's
14254 and the possibility to use a
14260 Insert\SpecialChar \menuseparator
14266 \begin_layout Standard
14267 The biggest improvement is, though, that the letter's layout is configurable
14268 to meet almost any needs.
14269 This can be done via the preamble or with a special style file (Letter
14270 Class Option, extension
14274 ), that will be read in as a class option.
14278 \begin_layout Plain Layout
14279 The KOMA package comes with some default
14284 There is, for instance, a
14288 file that follows german typesetting rules, or a
14292 that provides the default layout of the old
14297 The latter can be loaded with the class option
14306 ayout\SpecialChar \menuseparator
14311 ocument\SpecialChar \menuseparator
14323 template that is included in LyX for examples.
14324 A detailed description is to be found in the Koma-Script documentation
14332 \begin_layout Subsection
14336 \begin_layout Standard
14337 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14341 \begin_layout Itemize
14342 The chapter number of a
14346 type appears on a line of its own above the chapter heading instead of
14347 appearing in the same line ahead of it.
14348 The cause for that is the LyX internal behavior for the labeltype
14352 in the layout file.
14355 \begin_layout Itemize
14356 The headings of the types
14364 are only put in the
14365 \begin_inset Quotes eld
14369 \begin_inset Quotes erd
14372 LaTeX table of contents, but not in the LyX table of contents (
14374 Document\SpecialChar \menuseparator
14376 \begin_inset space ~
14380 \begin_inset space ~
14388 \begin_layout Itemize
14389 The paragraphs in a
14393 document class appear in a skip separation mode, not indented.
14394 This is the standard behavior, no special LaTeX commands are needed for
14398 Document\SpecialChar \menuseparator
14401 dialog the corresponding radio button indicates
14410 value always has the effect that extra LaTeX commands are inserted in the
14411 document to produce the gap, which is not what is wanted in this case.
14414 \begin_layout Section
14415 Latex8 (IEEE Conference Papers)
14418 \begin_layout Standard
14424 \begin_layout Subsection
14428 \begin_layout Standard
14429 Since this class is specifically for writing submissions to IEEE sponsored
14430 conferences I strongly recommend that you get a copy of their Authors Kit.
14435 package and associated bibliography style file is included in the kit.
14436 The Authors Kit is usually sent out by email once your initial submission
14438 There is a lot of useful information in the Authors Kit explaining formatting
14439 restrictions and so on and I will assume you have read this since that
14440 means I don't have to repeat it all here.
14443 \begin_layout Subsection
14447 \begin_layout Standard
14448 [AR\SpecialChar \@.
14452 \begin_layout Subsection
14453 Supported Environments
14456 \begin_layout Itemize
14462 \begin_layout Itemize
14468 \begin_layout Itemize
14474 \begin_layout Itemize
14480 \begin_layout Itemize
14486 \begin_layout Itemize
14492 \begin_layout Itemize
14498 \begin_layout Itemize
14504 \begin_layout Itemize
14510 \begin_layout Subsection
14511 Differences Between Screen and Paper
14514 \begin_layout Standard
14515 There are slight differences in appearance mainly with the presentation
14516 of section counters.
14517 On screen the trailing period of the section counter is missing but it
14518 will appear in the output so don't let this worry you.
14521 \begin_layout Section
14525 \begin_layout Standard
14531 \begin_layout Subsection
14535 \begin_layout Standard
14536 Memoir is a very powerful and constantly evolving class.
14537 It has been designed with regard to fictional and non-fictional literature.
14538 Its aim is to let the user have maximum control over the typesetting of
14540 Memoir is based on the standard book class, but it can also emulate the
14541 article class (see below).
14544 \begin_layout Standard
14545 Peter Wilson, the developer of Memoir, is known as the author of lots of
14546 useful packages in the LaTeX world.
14547 Most of them have been merged with Memoir.
14548 Therefore, it is much easier to layout the table of contents, appendices,
14549 chapter designs and such.
14550 LyX, though, does not support all of these goodies natively.
14551 Some of them might be added to forthcoming releases
14555 \begin_layout Plain Layout
14556 You are invited to send suggestions to
14557 \begin_inset Flex URL
14560 \begin_layout Plain Layout
14562 lyx-devel@lists.lyx.org
14572 , lots will probably never, due to the limitations of LyX's framework.
14573 Of course you can still use all features with the help of some native LaTeX
14578 \begin_layout Plain Layout
14583 \begin_layout Plain Layout
14593 \begin_inset space ~
14597 \begin_inset CommandInset ref
14599 reference "sec:Inserting-TeX-Code"
14609 In this section, we can only list those features which are natively supported
14611 For detailed descriptions (and for the rest of features) we recommend you
14612 have a look at the detailed manual of the Memoir class
14616 \begin_layout Plain Layout
14621 \begin_layout Plain Layout
14631 \begin_inset Flex URL
14634 \begin_layout Plain Layout
14636 CTAN:/macros/latex/memoir/memman.pdf
14646 , which is not only a user guide for the class, but also both a comprehensive
14647 description on good typesetting and a superb example for good typesetting
14651 \begin_layout Subsection
14652 Basic features and restrictions
14655 \begin_layout Standard
14656 Memoir supports basically all features of the standard book classes.
14657 There are, however, some differences, as follows:
14660 \begin_layout Description
14662 \begin_inset space ~
14665 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14668 \begin_layout Description
14670 \begin_inset space ~
14673 style: The fancy page style is not supported, due to a command clash between
14674 Memoir and the fancyhdr package (they both define a command with the same
14675 name, which confuses LaTeX).
14676 Instead, Memoir comes with a number of its own page styles (see
14678 Layout\SpecialChar \menuseparator
14679 Document\SpecialChar \menuseparator
14681 \begin_inset space ~
14687 If you want to use these for the chapter pages, you have to use the command
14694 in the main text or in preamble (e.
14695 \begin_inset space \thinspace{}
14699 \begin_inset space \space{}
14706 chapterstyle{companion}
14711 \begin_layout Description
14712 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14713 optional argument in the standard classes.
14714 With this, you can specify an alternative version of the title for the
14715 table of contents and the headers (for instance, if the title is too long).
14716 In LyX, you can do this via
14718 Insert\SpecialChar \menuseparator
14720 \begin_inset space ~
14725 at the beginning of a chapter/section.
14726 Memoir features a second optional argument and thus separates the table
14727 of contents from the header.
14728 You can define three variants of a title with this: one for the main text,
14729 one for the table of contents, and one for the headers.
14730 Simply insert two optional arguments if you need this feature, the first
14731 one containing the short title for the Table of Contents, the second one
14732 containing an alternative short title for the headers.
14735 \begin_layout Description
14736 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14737 of contents, the list of figures and the list of table start a new page
14739 Memoir does not follow this route.
14740 You have to insert a page break yourself, if you want to have one.
14743 \begin_layout Description
14744 Titlepage: For some unknown reason, Memoir uses pagination on the title
14745 page (in the standard classes, title pages are
14746 \begin_inset Quotes eld
14750 \begin_inset Quotes erd
14754 \begin_inset space \thinspace{}
14758 \begin_inset space \space{}
14762 If you want an empty title page, type
14766 aliaspagestyle{title}{empty}
14771 \begin_layout Description
14772 Article: With the class option
14778 Layout\SpecialChar \menuseparator
14779 Document\SpecialChar \menuseparator
14781 \begin_inset space ~
14786 ), you can emulate article style.
14787 That is, counters (footnotes, figures, tables etc.) will not be reset on
14788 new chapters, chapters don't start a new page (but are—in contrary to
14789 \begin_inset Quotes eld
14793 \begin_inset Quotes erd
14796 article classes—still allowed), parts, though, use their own page, as in
14800 \begin_layout Description
14801 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14802 font commands, which have been used in the old LaTeX version 2.09 (e.
14803 \begin_inset space \thinspace{}
14807 \begin_inset space \space{}
14823 It produces an error and stops LaTeX whenever such a command appears.
14828 reallows the commands and spits out warnings instead (which does at least
14830 Since a lot of packages and particularly BibTeX style files are still using
14831 those commands, we have decided to use this option by default.
14834 \begin_layout Subsection
14838 \begin_layout Standard
14839 We will only describe the features supported by LyX (which is not much currently
14841 Please consult the Memoir manual
14845 \begin_layout Plain Layout
14850 \begin_layout Plain Layout
14860 \begin_inset Flex URL
14863 \begin_layout Plain Layout
14865 CTAN:/macros/latex/memoir/memman.pdf
14878 \begin_layout Description
14879 Abstract: You may wonder why an abstract is an extra feature.
14880 Well, it is in book class.
14881 Usually books don't have abstracts.
14882 Memoir, however, has.
14883 You can use it wherever and how often you like.
14886 \begin_layout Description
14887 Chapterprecis: You may know this older typesetting style: The contents of
14888 a chapter are summarized below the title and also in the table of contents
14890 \begin_inset space \thinspace{}
14894 \begin_inset space \space{}
14899 Our hero arrives in Troia; he loses some friends; he finds others
14902 Chapterprecis does exactly this.
14903 It is therefore only sensible below a chapter.
14906 \begin_layout Description
14907 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14908 The epigraph environment provides an elegant way of typesetting such a
14910 The motto itself (text) and its author (source) are divided by a short
14912 Unfortunately, we have to fool LyX a bit here again, since the environment
14913 needs two arguments (text and source).
14914 In this case, we have to use curly brackets (in TeX mode) between the two
14925 <author of the slogan>.
14928 \begin_layout Description
14929 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14930 complex figurative poems).
14931 LyX can only support a few of them.
14932 One is poemtitle, which is a centered title for poems, which will also
14933 be added to the table of contents (verse is the standard environment for
14935 Memoir has some enhanced versions of verse, but you need to use TeX code,
14936 because they have to be nested inside regular verse environments, which
14937 is not possible with LyX).
14940 \begin_layout Description
14941 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14944 \begin_layout Section
14945 Article (mwart), book (mwbk) and report (mwrep)
14946 \begin_inset Argument
14949 \begin_layout Plain Layout
14962 \begin_layout Standard
14968 \begin_layout Standard
14969 The LyX document classes
14985 correspond to the LaTeX document classes
14998 They are replacements for the standard document classes
15010 , resp., and fit better to Polish typography conventions in a number of points.
15014 \begin_layout Standard
15018 \begin_layout Itemize
15019 Unnumbered titles (with star, e.
15020 \begin_inset space \thinspace{}
15024 \begin_inset space \space{}
15031 ) are added into table of contents,
15034 \begin_layout Itemize
15035 Additional page styles:
15039 \begin_layout Description
15040 uheadings header with separated lines,
15043 \begin_layout Description
15044 myheadings custom header, contents headers via commands:
15059 \begin_layout Description
15060 myuheadings custom header with separated lines,
15063 \begin_layout Description
15064 outer page number is placed on outer side of page
15068 \begin_layout Itemize
15073 \begin_layout Description
15074 rmheadings serif titles — default,
15077 \begin_layout Description
15078 sfheadings sansserif titles,
15081 \begin_layout Description
15082 authortitle on title page first placed is author next title — default,
15085 \begin_layout Description
15086 titleauthor on title page first placed is title next author,
15089 \begin_layout Description
15090 withmarginpar reserve place on page for margins.
15094 \begin_layout Section
15098 \begin_layout Standard
15103 provides an alternative to the standard
15108 It provides similar functionality, but you might prefer this layout with
15109 sans serif sections, headings, and more.
15112 \begin_layout Section
15116 \begin_layout Standard
15122 \begin_layout Standard
15123 \begin_inset VSpace bigskip
15129 \begin_layout Standard
15134 \begin_inset space ~
15139 textclass works with the American Physical Sociey's RevTeX 4.0 (the
15140 \begin_inset Formula $\beta$
15143 release of May, 1999) class.
15146 \begin_layout Standard
15151 textclass, which works with RevTeX 3.1.
15152 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15153 That means that it doesn't interact very well with LyX, which requires
15154 LaTeX2e, although it has been kludged to work.
15155 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15159 \begin_inset space ~
15164 textclass should also be pretty easy to use.
15167 \begin_layout Standard
15168 These documents are supposed to be used in
15172 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15173 macros, and assume you'll know what to put in the preamble if necessary.
15176 \begin_layout Subsection
15180 \begin_layout Standard
15181 All you need to do is install RevTeX 4, as described in the package's README
15183 The package can be found at The RevTeX 4 Web Site
15184 \begin_inset Flex URL
15187 \begin_layout Plain Layout
15189 http://publish.aps.org/revtex4/
15195 Install it somewhere that LaTeX can see it.
15196 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15198 \begin_inset space \thinspace{}
15202 \begin_inset space \space{}
15205 not the directory where you installed the class file.) Then, if you reconfigure
15206 LyX, it will find the class file and let you use the RevTeX4 textclass.
15209 \begin_layout Standard
15210 Probably the easiest way to get started is either to import a RevTeX 4 document
15218 \begin_inset space ~
15223 template, found in the templates directory.
15226 \begin_layout Subsection
15230 \begin_layout Standard
15231 Optional arguments to
15238 \begin_inset Quotes eld
15242 \begin_inset Quotes erd
15246 \begin_inset Quotes eld
15250 \begin_inset Quotes erd
15260 \begin_inset space ~
15268 \begin_inset space ~
15274 Remember that in RevTeX, at least one optional argument is required!
15277 \begin_layout Standard
15278 Other preamble matter, like
15285 \begin_inset space ~
15291 \begin_inset space ~
15296 dialog, also as usual.
15299 \begin_layout Subsection
15303 \begin_layout Standard
15304 The layouts basically correspond to the commands in RevTeX4.0.
15305 For example, the Email layout corresponds to
15312 Note that (at least as of RevTeX 4.0 Beta), the
15320 layouts are exactly equivalent, so you shouldn't need to use both.
15324 \begin_layout Plain Layout
15325 In case you're curious, both were included so that
15329 would be able to translate both
15349 \begin_layout Subsection
15353 \begin_layout Standard
15354 There are a couple of important unique aspects of RevTeX 4 which might cause
15355 bugs that will be even more confusing in LyX.
15358 \begin_layout Standard
15376 The LyX equivalent is that there is a separate Thanks layout.
15381 write footnotes in the
15385 layout, or weird things may happen.
15386 See the RevTeX 4 documentation for more details.
15389 \begin_layout Standard
15393 \begin_inset space ~
15401 \begin_inset space ~
15410 layouts must be placed
15418 layout and the corresponding
15435 , the LaTeX won't compile.
15438 \begin_layout Subsection
15442 \begin_layout Standard
15443 The main problem with this layout is that you can't use the optional arguments
15444 to layouts like Email and Title.
15445 (The problem is not unique to this layout; you can't use optional arguments
15446 to the Section layouts either.) This means that after you export that file
15447 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15448 need to edit the LaTeX file with a text editor to add the optional arguments
15450 \begin_inset space \thinspace{}
15454 \begin_inset space \space{}
15457 the running title for the page headers.
15458 Lacking these layouts makes the
15464 (and the equivalent
15470 ) useless, so the corresponding layouts don't exist, and will have to be
15475 \begin_layout Plain Layout
15480 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15481 has not been updated yet to take advantage of it.
15489 \begin_layout Section
15490 Springer Journals (
15497 \begin_layout Standard
15503 \begin_layout Subsection
15507 \begin_layout Standard
15508 These are the layout files for some of the journal formats used by Springer
15509 Verlag and listed on
15510 \begin_inset Flex URL
15513 \begin_layout Plain Layout
15515 http://www.springer.de/author/tex/help-journals.html
15520 , where you should also go to fetch the class files (yes, these are LaTeX2e
15522 It is a modular system: the things common to all journals are implemented
15527 , which journal-specific layout files (such as, e.
15528 \begin_inset space \thinspace{}
15532 \begin_inset space \space{}
15539 for Journal of Geodesy) can include.
15542 \begin_layout Standard
15543 This means that implementing support for any other Springer journal on this
15544 list is as simple as writing your own
15552 file following the outline given in
15560 \begin_layout Standard
15561 It is reasonably well tested only for the Journal of Geodesy.
15570 come with the standard LyX distribution.
15571 Install the relevant class file (downloaded from Springer) in a proper
15572 directory, reconfigure LaTeX (in the teTeX case by running
15576 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15577 and it should work.
15580 \begin_layout Subsection
15584 \begin_layout Standard
15585 A large number of theorem-like styles —
15591 \SpecialChar \ldots{}
15597 \begin_layout Standard
15600 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15601 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15604 See the Springer class file documentation for details.
15607 \begin_layout Subsection
15611 \begin_layout Itemize
15623 \begin_layout Itemize
15626 Probability Theory and Related Fields
15632 — Jean-Marc Lasgouttes
15635 \begin_layout Standard
15636 Add your own, it isn't so hard!
15639 \begin_layout Subsection
15643 \begin_layout Standard
15644 These files are partly based on the older
15648 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15649 file from Springer.
15654 layout, are now defunct.
15655 Jean-Marc Lasgouttes helped out big in making me find my way around the
15656 LyX layout file mechanism.
15659 \begin_layout Subsection
15663 \begin_layout Standard
15665 But probably less than in the old hacked-LaTeX
15672 \begin_layout Standard
15674 \begin_inset space \thinspace{}
15677 g.: does not display the number for theorem-like layouts, just #.
15680 \begin_layout Section
15686 \begin_inset CommandInset label
15695 \begin_layout Standard
15703 \begin_layout Subsection
15707 \begin_layout Standard
15708 This section describes how to use LyX to make slides for overhead projectors.
15709 There are two document classes that can do this: the default slides class
15715 This section documents the former.
15718 \begin_layout Standard
15719 I'm going to say this again, nice and clear, so that there's no misunderstanding
15723 \begin_layout Standard
15724 \begin_inset VSpace bigskip
15730 \begin_layout Standard
15734 This section documents the class
15735 \begin_inset Quotes eld
15743 \begin_inset Quotes erd
15751 \begin_layout Standard
15752 \begin_inset VSpace bigskip
15758 \begin_layout Standard
15759 If you're looking for the documentation for
15760 \begin_inset Quotes eld
15768 \begin_inset Quotes erd
15771 , check out section
15772 \begin_inset space ~
15776 \begin_inset CommandInset ref
15778 reference "sec:foiltex"
15788 \begin_inset Quotes eld
15796 \begin_inset Quotes erd
15799 ] is actually somewhat better than the default
15807 \begin_layout Plain Layout
15808 \SpecialChar \ldots{}
15809 or so I've been told repeatedly by its advocates.
15810 Having never used it, I have no idea if this claim is true or not.
15815 which this section documents.
15818 \begin_layout Standard
15819 This class is the LaTeX2e improvement of the old
15824 Every LaTeX2e distribution includes this class [which I'll just refer to
15826 \begin_inset Quotes eld
15834 \begin_inset Quotes erd
15837 from now on], so you're bound to have it.
15838 As I noted earlier, there are other classes, such as
15842 , which also produce slides for overhead projectors and do a better job
15844 However, there are some things which
15848 can do which the others can't, such as generate overlays.
15849 Read on to learn more!
15852 \begin_layout Subsection
15854 \begin_inset CommandInset label
15856 name "sec:slidesetup"
15863 \begin_layout Standard
15864 Obviously, to use this document class, you need to select
15865 \begin_inset Quotes eld
15873 \begin_inset Quotes erd
15876 from the class list in the
15878 Document\SpecialChar \menuseparator
15882 There are some other special things you should know about this class:
15885 \begin_layout Itemize
15886 Don't bother changing the options
15891 They're not supported by the
15898 \begin_layout Itemize
15902 \begin_inset space ~
15907 behaves a bit differently for this class.
15908 The possible choices and what they do are as follows:
15912 \begin_layout Description
15917 The final output contains page numbers in the lower right corner.
15920 \begin_layout Description
15929 , but also prints out any time markers you've put in.
15930 This is the default.
15933 \begin_layout Description
15938 The final output contains no page numbers, time markers, or alignment markers.
15942 \begin_layout Itemize
15947 class has an extra option:
15953 \begin_inset Quotes eld
15961 \begin_inset Quotes erd
15964 in the extra class options.
15968 \begin_layout Standard
15969 Using this options allows you to add time markers to
15975 \begin_inset space ~
15979 \begin_inset CommandInset ref
15981 reference "sec:slideNote"
15989 \begin_layout Standard
15990 You can also use the template file
15991 \begin_inset Quotes eld
15999 \begin_inset Quotes erd
16002 to automatically set up a document to use the
16008 File\SpecialChar \menuseparator
16010 \begin_inset space ~
16014 \begin_inset space ~
16019 to open your new document].
16020 The template file also contains some examples of the special paragraph
16021 environments used by this class.
16022 I'll describe those next.
16025 \begin_layout Subsection
16026 Paragraph Environments
16029 \begin_layout Subsubsection
16030 Supported Environments
16033 \begin_layout Standard
16034 The first thing you'll notice when you start up a new
16038 document is the font size and type: it's the equivalent of the size
16039 \begin_inset Quotes eld
16047 \begin_inset Quotes erd
16053 \begin_inset space ~
16059 This is also what's used in the output.
16061 \begin_inset Quotes eld
16065 \begin_inset Quotes erd
16068 to remind you that this is a slide.
16069 Your final slides will use a larger font; ergo, you'll have less space.
16070 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16073 \begin_layout Standard
16074 The next thing that becomes obvious is the changes to the paragraph environment
16075 pull-down box [at the far-left end of the toolbar].
16076 Most of the paragraph environments you're used to seeing are missing.
16077 There are also five new ones.
16082 class itself only supports certain paragraph environments:
16085 \begin_layout Itemize
16091 \begin_layout Itemize
16097 \begin_layout Itemize
16103 \begin_layout Itemize
16109 \begin_layout Itemize
16115 \begin_layout Itemize
16121 \begin_layout Itemize
16127 \begin_layout Itemize
16133 \begin_layout Itemize
16139 \begin_layout Itemize
16145 \begin_layout Itemize
16151 \begin_layout Standard
16152 All of the other standard environments, including the section-heading environmen
16153 ts, aren't used in the
16160 \begin_layout Standard
16161 On the other hand, you'll notice the following new environments:
16164 \begin_layout Itemize
16170 \begin_layout Itemize
16176 \begin_layout Itemize
16182 \begin_layout Itemize
16188 \begin_layout Itemize
16194 \begin_layout Standard
16195 These five are kind of quirky, due to a
16196 \begin_inset Quotes eld
16200 \begin_inset Quotes erd
16204 You see, LyX doesn't permit you to nest any other paragraph environment
16205 into an empty environment.
16206 Now, that's fine and dandy, but it means that you wouldn't be able to start
16207 a slide with anything except plain text.
16208 To deal with this, I've performed a little
16209 \begin_inset Quotes eld
16213 \begin_inset Quotes erd
16219 \begin_layout Subsubsection
16220 Quirks of the New Environments
16221 \begin_inset CommandInset label
16223 name "sec:slideQuirk"
16230 \begin_layout Standard
16231 All five of the new paragraph environments are somewhat quirky due to inherent
16232 limitiations in the current version of LyX.
16233 As I just mentioned, LyX forbids environments that begin with another environme
16235 To get around this, the
16239 environment isn't a paragraph environment as described in the
16247 \begin_layout Standard
16248 You should consider
16261 \begin_inset Quotes eld
16264 pseudo-environments.
16265 \begin_inset Quotes erd
16268 They look like a section heading or a
16269 \begin_inset Quotes eld
16277 \begin_inset Quotes erd
16280 but really begin a [and, if necessary, end the previous] paragraph environment.
16290 \begin_inset Quotes eld
16294 \begin_inset Quotes erd
16297 These two perform some action.
16300 \begin_layout Standard
16301 A common feature of all five environments,
16321 , is a rather long-ish label.
16322 The text following this label — ordinarily the contents of the paragraph
16323 environment — is utterly irrelevant for
16344 LyX completely ignores it.
16345 In fact, you can leave these five environments completely empty.
16349 \begin_layout Standard
16354 to put any text after the rather long-ish label, you might want to.
16355 This could be a short description of the contents of the
16360 In that case, enter your descriptive comment and hit
16364 as you normally would.
16367 \begin_layout Standard
16368 If, on the other hand, you don't want to enter any descriptive text, you'll
16369 hit another LyX quirk.
16370 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16371 environment until you put something in the old one.
16375 \begin_layout Itemize
16376 Start entering the text that will
16404 \begin_layout Itemize
16405 Now move to the beginning of that paragraph.
16409 \begin_layout Itemize
16418 \begin_layout Itemize
16419 Finally, change this new, empty paragraph to a
16443 \begin_layout Standard
16444 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16448 \begin_layout Subsection
16449 Making a Presentation with
16462 \begin_layout Subsubsection
16470 \begin_layout Standard
16471 If you're expecting this section to teach you how to actually make a presentatio
16472 n, you'll be sorely disappointed.
16473 Naturally, I'll describe all of the ways the
16477 class can assist you in preparing the materials for a presentation.
16478 Filling in the contents, however, is up to you.
16483 the LyX philosophy.]
16486 \begin_layout Standard
16491 environment [in the manner described in section
16492 \begin_inset space ~
16496 \begin_inset CommandInset ref
16498 reference "sec:slideQuirk"
16502 ] tells LyX to begin a new slide [duh].
16503 The label for this environment/
16504 \begin_inset Quotes erd
16508 \begin_inset Quotes erd
16512 \begin_inset Quotes eld
16516 \begin_inset Quotes erd
16519 in cool blue, followed by the label,
16520 \begin_inset Quotes eld
16524 \begin_inset Quotes erd
16528 Any text or paragraph environments that follow this one go on the new slide.
16532 \begin_layout Standard
16533 Slides are probably the only time you'll need to forcibly end pages in LyX
16534 (this can be specified in the
16539 In fact, you'll want to, once you finish entering the contents of one slide.
16540 If you've entered more text than can physically fit on a slide, the extra
16541 overflows onto a new slide.
16542 I don't recommend doing this, however, since the overflow slide won't have
16543 any page number on it.
16544 Furthermore, it may interfere with any
16548 you've made to accompany the oversized
16555 \begin_layout Standard
16564 environments work the same way as the
16569 They both create an
16570 \begin_inset Quotes eld
16574 \begin_inset Quotes erd
16577 followed by a label [
16578 \begin_inset Quotes eld
16582 \begin_inset Quotes erd
16586 \begin_inset Quotes eld
16590 \begin_inset Quotes erd
16594 The color is a stunning magenta instead of blue, and the
16595 \begin_inset Quotes eld
16599 \begin_inset Quotes erd
16602 will look different, in style and in length.
16603 The label fonts of all three also differ from one another.
16606 \begin_layout Standard
16611 , if the contents of a
16619 exceed the physical size of a slide or sheet of paper, the extra will overflow
16621 Again, you should avoid this.
16622 It defeats the whole purpose of
16633 \begin_layout Subsubsection
16643 \begin_layout Standard
16648 is a slide that sits atop another slide.
16649 Perhaps you wish to discuss a figure on the main
16653 before displaying the text associated with it.
16654 One way to accomplish this is tape a flap of dark paper over the part of
16659 you want to display later.
16660 This method fails, however, if you wish to overlap one graph with another,
16662 You would then have to fumble while speaking to align the two separate,
16667 s to align the two graphs.
16672 environment in both cases makes life much easier.
16675 \begin_layout Standard
16680 receives the page number of its
16681 \begin_inset Quotes eld
16685 \begin_inset Quotes erd
16693 \begin_inset Quotes eld
16701 \begin_inset Quotes erd
16708 \begin_layout Plain Layout
16709 Presumably, mutliple
16714 \begin_inset Quotes eld
16722 \begin_inset Quotes erd
16726 \begin_inset Quotes eld
16734 \begin_inset Quotes erd
16738 \begin_inset Quotes eld
16746 \begin_inset Quotes erd
16750 \begin_inset space ~
16753 appended to the page number of the parent
16763 Clearly, you want the contents of both the
16771 to each fit on a single physical slide! You should probably consider an
16777 \begin_inset Quotes eld
16781 \begin_inset Quotes erd
16793 class provides a visual cue for this: the label at the start of an
16797 is shorter than that at the start of a
16802 Lastly, when you generate printable output, you'll find alignment markers
16803 in all four corners of both the
16807 page and its parent
16812 These will assist you in lining up the two physical slides.
16815 \begin_layout Standard
16816 The major problem in overlaying two slides is aligning the contents of the
16817 two transparencies.
16818 How much space should you leave for that graph on the second slide? Worse
16819 still, what if you want a graph and a sentence on second slide, but there
16820 is text on the main transparency that goes in between them? You could try
16821 and insert vertical space of the right size.
16822 The better way is to use
16833 \begin_layout Standard
16834 As their names imply,
16842 are two command-like paragraph environments that make all subsequent text
16843 invisible and visible, respectively.
16845 \begin_inset space ~
16849 \begin_inset CommandInset ref
16851 reference "sec:slideQuirk"
16855 that you don't place anything
16859 these two environments, however.
16864 , it inserts a centered, sky-blue label into the page reading
16865 \begin_inset Quotes eld
16868 <Invisible Text Follows>
16869 \begin_inset Quotes erd
16873 For paragraphs following this label, the parts of the
16881 ; it doesn't matter which] where they would be contain instead blank space.
16885 \begin_layout Standard
16890 , the corresponding centered label is
16891 \begin_inset Quotes eld
16894 <Visible Text Follows>
16895 \begin_inset Quotes erd
16899 Paragraphs following this label behave normally.
16900 Note that the beginning of a new
16912 automatically shuts off an
16917 It's therefore not necessary to use
16928 \begin_layout Standard
16929 By now, it should be obvious how to create overlay transparencies using
16930 the proper combination of
16949 \begin_layout Enumerate
16954 , including everything that will appear on it, whether on the main slide
16962 \begin_layout Enumerate
16963 Before each figure or paragraph that will appear only on the
16972 If necessary, insert a
16976 environment after the
16983 \begin_layout Enumerate
16988 immediately following the
16995 \begin_layout Enumerate
16996 Copy the contents of this
17007 \begin_layout Enumerate
17012 , change all of the
17023 \begin_layout Standard
17025 You've just made an
17032 \begin_layout Standard
17033 There's one problem with the way I've designed the LyX
17037 class: you can't make text in the middle of a paragraph invisible, nor
17038 make text in the middle of an invisible paragraph visible again.
17039 To accomplish this feat, you'll need to use some inlined LaTeX codes.
17043 \begin_layout Plain Layout
17044 The commands of interest are:
17047 \begin_layout Itemize
17052 invisible \SpecialChar \ldots{}
17056 \begin_layout Itemize
17061 visible \SpecialChar \ldots{}
17065 \begin_layout Plain Layout
17066 \SpecialChar \ldots{}
17067 and need to be marked as TeX.
17069 \begin_inset Quotes eld
17073 \begin_inset Quotes erd
17076 you wish to change goes in between the brackets [and after the
17089 If you don't know how to mark text as TeX, see the appropriate section
17102 \begin_layout Subsubsection
17112 \begin_inset CommandInset label
17114 name "sec:slideNote"
17121 \begin_layout Standard
17130 is associated with a
17131 \begin_inset Quotes eld
17135 \begin_inset Quotes erd
17147 class provides visual cues.
17152 is shorter than that of a
17156 [yet longer than that of an
17160 ] and, like the label of an
17164 is shockingly magenta.
17165 Additionally, the printed
17169 has the page number of its
17170 \begin_inset Quotes eld
17174 \begin_inset Quotes erd
17182 \begin_inset Quotes eld
17190 \begin_inset Quotes erd
17194 \begin_inset Quotes eld
17202 \begin_inset Quotes erd
17206 \begin_inset Quotes eld
17214 \begin_inset Quotes erd
17218 You can have multiple
17222 s associated with a single
17234 , you'll probably want to break up long
17238 s so that they fit on a single sheet of paper.
17241 \begin_layout Standard
17246 is obvious: it contains anything additional you might want to say about
17252 It could also be used as a sheet of reminders for a particular
17257 In the case of the latter, you might want to make use of time markers.
17263 \begin_inset Quotes eld
17267 \begin_inset Quotes erd
17270 support for time markers, a
17275 So, you'll have to resort to using the LaTeX codes.
17278 \begin_layout Standard
17279 To use time markers, you'll need to specify the extra class option
17280 \begin_inset Quotes eld
17288 \begin_inset Quotes erd
17292 \begin_inset space ~
17296 \begin_inset CommandInset ref
17298 reference "sec:slidesetup"
17303 This option turns on timing marks, which will appear in the lower-left-hand
17309 To set what appears in the time marker, you use the LaTeX commands
17310 \begin_inset Quotes eld
17320 \begin_inset Quotes erd
17324 \begin_inset Quotes eld
17334 \begin_inset Quotes erd
17338 The arguments of both commands are time measured in seconds.
17340 \begin_inset Quotes eld
17350 \begin_inset Quotes erd
17353 sets the time marker to a given time.
17355 \begin_inset Quotes eld
17365 \begin_inset Quotes erd
17368 increments the time marker by the specified amount.
17369 Using time markers and
17373 s in this fashion, you can remind yourself how much time to spend on a particula
17381 \begin_layout Standard
17382 There's one last feature to describe.
17383 Clearly, you'd like to print out all of your
17391 s on transparencies while printing all of your
17408 with which it is associated.
17409 What's a person to do?
17412 \begin_layout Standard
17413 Luckily, there are two LaTeX commands that allow you to select what to print
17415 Both must be placed into the preamble of your document.
17417 \begin_inset Quotes eld
17429 \begin_inset Quotes erd
17432 will cause the output to contain only the
17441 Correspondingly, the command
17442 \begin_inset Quotes eld
17454 \begin_inset Quotes erd
17457 prevents the output of anything but
17462 I'd advise placing both commands in the preamble and initially comment
17464 You can then preview your entire presentation as you write.
17465 When you're done writing, you can then uncomment one of the two to select
17466 what you want to print.
17467 I like to uncomment
17468 \begin_inset Quotes eld
17480 \begin_inset Quotes erd
17483 , print to a file with
17484 \begin_inset Quotes eld
17492 \begin_inset Quotes erd
17495 in its name, comment it back out, then uncomment
17496 \begin_inset Quotes eld
17508 \begin_inset Quotes erd
17512 \begin_inset Quotes eld
17520 \begin_inset Quotes erd
17524 I can then send either file to a printer, loading transparencies or plain
17525 paper as appropriate.
17528 \begin_layout Standard
17529 You can also provide other arguments to the
17530 \begin_inset Quotes eld
17540 \begin_inset Quotes erd
17544 \begin_inset Quotes eld
17554 \begin_inset Quotes erd
17558 See a good LaTeX book for details.
17561 \begin_layout Subsection
17566 Class Template File
17569 \begin_layout Standard
17570 I have also provided a template file,
17571 \begin_inset Quotes eld
17579 \begin_inset Quotes erd
17587 To use it, begin your new presentation with
17592 ile\SpecialChar \menuseparator
17594 \begin_inset space ~
17598 \begin_inset space ~
17608 Your new LyX presentation file will contain an example
17629 additionally contain an example of the use of
17638 Lastly, the preamble will contain:
17641 \begin_layout LyX-Code
17642 % Uncomment to print out only slides and overlays
17645 \begin_layout LyX-Code
17649 \begin_layout LyX-Code
17655 \begin_inset Newline newline
17661 \begin_layout LyX-Code
17662 % Uncomment to print out only notes
17665 \begin_layout LyX-Code
17669 \begin_layout LyX-Code
17677 \begin_layout Standard
17678 One final thing: I created this class to support the LaTeX2e
17679 \begin_inset Quotes eld
17687 \begin_inset Quotes erd
17690 class, one of the built-in LaTeX2e classes.
17691 Neither I nor the rest of the LyX Team endorse or oppose the use of this
17692 built-in slide class.
17693 It's here if you want it or need it.
17694 There exist other LaTeX2e classes for creating presentations, such as the
17700 \begin_inset space ~
17704 \begin_inset CommandInset ref
17706 reference "sec:foiltex"
17711 \begin_inset Quotes eld
17719 \begin_inset Quotes erd
17722 package [present on some TeX distributions].
17723 The latter is not yet supported under LyX.
17727 \begin_layout Plain Layout
17728 Perhaps you can take on the task\SpecialChar \ldots{}
17734 I know nothing about these other classes.
17735 Try them out to see what sort of alternative they provide.
17738 \begin_layout Chapter
17739 LyX Features needing Extra Software
17742 \begin_layout Section
17746 \begin_layout Standard
17752 \begin_layout Subsection
17756 \begin_layout Standard
17765 \begin_layout Plain Layout
17770 is not yet available when you are using the LaTeX distribution MiKTeX.
17775 , you'll find in the
17782 \begin_inset space ~
17793 \begin_inset CommandInset href
17795 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17802 \begin_layout Standard
17807 package is a program that was written by
17808 \begin_inset Flex Noun
17811 \begin_layout Plain Layout
17813 \begin_inset space ~
17821 in frustration because some constructs in LaTeX are sometimes non-intuitive,
17822 and easy to forget.
17823 The program runs over your LaTeX file, checks the integrity of the file,
17824 and flags some common errors.
17825 In other technical words, it is
17832 \begin_layout Standard
17833 Well, what is a syntax checker doing in LyX which is supposed to produce
17834 correct LaTeX anyways? The answer is simple: Just as
17838 not only checks the
17842 of C programs, but also does
17846 checks for type-errors,
17850 catches some common
17854 errors, in addition to the syntactical ones.
17859 is capable of detecting several common errors, such as
17862 \begin_layout Itemize
17863 Ellipsis detection:
17864 \begin_inset Newline newline
17867 Use \SpecialChar \ldots{}
17871 \begin_layout Itemize
17872 No space in front of/after parenthesis:
17873 \begin_inset Newline newline
17879 \begin_layout Itemize
17880 Enforcement of normal space after common abbreviations:
17881 \begin_inset Newline newline
17885 \begin_inset space \thinspace{}
17889 \begin_inset space \space{}
17892 is too wide spacing.
17895 \begin_layout Itemize
17896 Enforcement of end-of-sentence space when the last sentence ends with a
17898 \begin_inset Newline newline
17902 And this is wrong spacing.
17905 \begin_layout Itemize
17906 Space in front of labels and similar commands:
17907 \begin_inset Newline newline
17910 The label should stick right up to the text to avoid falling to a wrong
17913 \begin_inset CommandInset label
17923 \begin_layout Plain Layout
17924 This footnote is in danger of falling off to a wrong page
17929 The label is separated too much.
17932 \begin_layout Itemize
17933 Space in front of references, instead of hard spaces:
17934 \begin_inset Newline newline
17937 In you are in bad luck, the text will break right between the referenced
17938 text and reference number, and that's a pity.
17940 \begin_inset CommandInset ref
17942 reference "sec:chktex"
17949 \begin_layout Itemize
17951 \begin_inset Quotes eld
17955 \begin_inset Quotes erd
17959 \begin_inset Formula $\times$
17963 \begin_inset Newline newline
17966 2x2 looks cheap compared to
17967 \begin_inset Formula $2\times2$
17973 \begin_layout Standard
17974 and more \SpecialChar \ldots{}
17975 It is an invaluable tool when you are
17976 \begin_inset Quotes eld
17980 \begin_inset Quotes erd
17983 your document before printing, and you should run it right after the obligatory
17984 spelling check, and before you go fine tuning the typesetting.
17987 \begin_layout Subsection
17991 \begin_layout Standard
17992 If you have the program installed, usage is as simple as choosing
17994 Tools\SpecialChar \menuseparator
17996 \begin_inset space ~
18002 This will make LyX generate a LaTeX file of your document, start
18006 to check it, and then make LyX insert
18007 \begin_inset Quotes eld
18011 \begin_inset Quotes erd
18014 with the warnings from
18018 , if there were any.
18019 The warnings will be placed close to the point of the mistake, and you
18020 can quickly find them by using the
18022 Navigate\SpecialChar \menuseparator
18025 menu item, or the shortcut key
18034 Open the error boxes by clicking on them with the mouse, or use the shortcut
18043 bindings, or the corresponding
18052 Read the warning and correct the mistake, if it is a mistake.
18053 If you have trouble understanding what the warning is about, you can safely
18055 Remember that there is a hidden layer between the document on screen and
18056 the technical details in invoking
18060 , and this gap can make some warnings seem arcane or just right down plain
18064 \begin_layout Standard
18065 This document is an excellent testing bed for the feature, and it should
18066 provide quite a few warnings for you to fiddle with.
18067 Since computers are only so smart, expect most of the warnings to be false
18071 \begin_layout Subsection
18072 How to fine tune it
18075 \begin_layout Standard
18076 Sometimes, you'll find that
18080 makes more noise than suits your mood.
18081 Then you can choose not to use it, wait until your mood changes, or try
18086 to get better along with you.
18087 Another choice in the most desperate situations is to use
18089 View\SpecialChar \menuseparator
18091 \begin_inset space ~
18095 \begin_inset space ~
18099 \begin_inset space ~
18104 , which will get rid of all warnings instantly.
18107 \begin_layout Standard
18116 very configurable and extensible, you shouldn't expect to solve all problems
18122 Since LyX has to generate a somewhat special LaTeX file to be able to match
18123 the line numbers from the
18131 \begin_layout Plain Layout
18132 You can inspect the specific output from
18138 Edit\SpecialChar \menuseparator
18140 \begin_inset space ~
18144 \begin_inset space ~
18158 to the internal document structure, some of the warnings will not seen
18159 to appear correctly.
18160 There are two things you can do about this:
18163 \begin_layout Itemize
18168 invocation command line in
18184 installation configuration file (usually with the file
18189 See below to learn what warnings can be enabled and disabled on the command
18194 \begin_layout Itemize
18195 Export your document as a raw LaTeX file using
18197 File\SpecialChar \menuseparator
18198 Export\SpecialChar \menuseparator
18206 Invoked in this way, it can be a hassle to find the corresponding place
18207 in the document inside LyX, but with a little patience, you should be able
18211 \begin_layout Standard
18212 Here follows the warning messages that can be enabled and disabled in
18221 to disable a warning, and
18225 to enable a warning.
18226 The emphasized entries are disabled by default, because the default is
18229 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18234 \begin_layout Standard
18235 Notice that you should only use the options that enable and disable warnings,
18236 because LyX relies on some of the other command line parameters to be set
18237 in a specific way to have a chance to communicate with
18244 \begin_layout Enumerate
18248 Command terminated with space.
18251 \begin_layout Enumerate
18254 Non-breaking space (
18255 \begin_inset Quotes eld
18263 \begin_inset Quotes erd
18266 ) should have been used.
18269 \begin_layout Enumerate
18273 You should enclose the previous parenthesis with
18274 \begin_inset Quotes eld
18282 \begin_inset Quotes erd
18288 \begin_layout Enumerate
18291 Italic correction (
18292 \begin_inset Quotes eld
18302 \begin_inset Quotes erd
18305 ) found in non-italic buffer.
18308 \begin_layout Enumerate
18311 Italic correction (
18312 \begin_inset Quotes eld
18322 \begin_inset Quotes erd
18325 ) found more than once.
18328 \begin_layout Enumerate
18332 No italic correction (
18333 \begin_inset Quotes eld
18343 \begin_inset Quotes erd
18349 \begin_layout Enumerate
18353 \begin_inset Quotes eld
18361 \begin_inset Quotes erd
18365 \begin_inset Quotes eld
18373 \begin_inset Quotes erd
18379 \begin_layout Enumerate
18382 Wrong length of dash may have been used.
18385 \begin_layout Enumerate
18389 \begin_inset Quotes eld
18397 \begin_inset Quotes erd
18401 \begin_inset Quotes eld
18409 \begin_inset Quotes erd
18415 \begin_layout Enumerate
18419 \begin_inset Quotes eld
18427 \begin_inset Quotes erd
18433 \begin_layout Enumerate
18437 \begin_inset Quotes eld
18445 \begin_inset Quotes erd
18448 to achieve an ellipsis.
18451 \begin_layout Enumerate
18454 Inter-word spacing (
18455 \begin_inset Quotes eld
18465 \begin_inset Quotes eld
18468 ) should perhaps be used.
18471 \begin_layout Enumerate
18474 Inter-sentence spacing (
18475 \begin_inset Quotes eld
18485 \begin_inset Quotes erd
18488 ) should perhaps be used.
18491 \begin_layout Enumerate
18494 Could not find argument for command.
18497 \begin_layout Enumerate
18501 \begin_inset Quotes eld
18509 \begin_inset Quotes erd
18515 \begin_layout Enumerate
18518 Math mode still on at end of LaTeX file.
18521 \begin_layout Enumerate
18525 \begin_inset Quotes eld
18533 \begin_inset Quotes erd
18536 doesn't match the number of
18537 \begin_inset Quotes eld
18545 \begin_inset Quotes erd
18551 \begin_layout Enumerate
18554 You should use either
18557 \begin_inset Quotes eld
18565 \begin_inset Quotes erd
18570 as an alternative to
18571 \begin_inset Quotes eld
18579 \begin_inset Quotes erd
18585 \begin_layout Enumerate
18592 " (ASCII 39) instead of "
18599 \begin_layout Enumerate
18602 User-specified pattern found.
18605 \begin_layout Enumerate
18608 This command might not be intended.
18611 \begin_layout Enumerate
18618 \begin_layout Enumerate
18636 \begin_layout Enumerate
18639 Delete this space to maintain correct page references.
18642 \begin_layout Enumerate
18646 You might wish to put this between a pair of
18647 \begin_inset Quotes eld
18655 \begin_inset Quotes erd
18661 \begin_layout Enumerate
18664 You ought to remove spaces in front of punctuation.
18667 \begin_layout Enumerate
18670 Could not execute LaTeX command.
18673 \begin_layout Enumerate
18682 in front of small punctuation.
18685 \begin_layout Enumerate
18693 may look prettier here.
18696 \begin_layout Enumerate
18700 Multiple spaces detected in output.
18703 \begin_layout Enumerate
18706 This text may be ignored.
18709 \begin_layout Enumerate
18715 \begin_inset Quotes eld
18720 to begin quotation, not
18727 \begin_layout Enumerate
18734 to end quotation, not
18737 \begin_inset Quotes eld
18745 \begin_layout Enumerate
18751 \begin_layout Enumerate
18754 You should perhaps use
18755 \begin_inset Quotes eld
18763 \begin_inset Quotes erd
18769 \begin_layout Enumerate
18772 You should put a space in front of/after parenthesis.
18775 \begin_layout Enumerate
18778 You should avoid spaces in front of/after parenthesis.
18781 \begin_layout Enumerate
18785 You should not use punctuation in front of/after quotes.
18788 \begin_layout Enumerate
18791 Double space found.
18794 \begin_layout Enumerate
18797 You should put punctuation outside inner/inside display math mode.
18800 \begin_layout Enumerate
18803 You ought to not use primitive TeX in LaTeX code.
18806 \begin_layout Enumerate
18809 You should remove spaces in front of
18810 \begin_inset Quotes eld
18818 \begin_inset Quotes erd
18824 \begin_layout Enumerate
18827 \begin_inset Quotes eld
18835 \begin_inset Quotes erd
18838 is normally not followed by
18839 \begin_inset Quotes eld
18847 \begin_inset Quotes erd
18853 \begin_layout Standard
18854 In later versions of LyX, we hope to provide a more complete interface to
18855 this tool (and it's smaller cousin
18859 ) to exploit the full power of it.
18860 But it's not exactly useless as it is now: go try it on one of your existing
18861 documents of a certain length and be surprised.
18864 \begin_layout Section
18865 Version Control in LyX
18868 \begin_layout Standard
18871 Lars Gullik Bjønnes
18878 \begin_layout Subsection
18882 \begin_layout Standard
18883 A friend of mine wanted to try LyX for a group project.
18884 When he didn't find support for version control or file locking, he dropped
18886 This angered me a bit, so I thought that I should at least make support
18887 for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
18888 This has been done.
18889 LyX now supports some of the most basic RCS/CVS/SVN commands.
18890 If you need something a bit more sophisticated you will have to do that
18891 manually in a terminal.
18894 \begin_layout Standard
18895 Before you begin to use the version control features in LyX, you should
18896 be familiar with RCS/CVS/SVN usage before start using it under LyX.
18897 Also note that CVS support is not as good as subversion support so we advice
18899 Good place to start with Subversion is SVN Book
18903 \begin_layout Plain Layout
18904 \begin_inset CommandInset href
18906 target "http://svnbook.red-bean.com/"
18916 In case of RCS you should read
18917 \begin_inset Quotes eld
18921 \begin_inset Quotes erd
18924 (a man file, read it with
18929 This file describes all the basic features of RCS.
18930 You should especially notice the comment about a RCS directory, and the
18931 notion of a master RCS file (the file ending in
18938 \begin_layout Standard
18939 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18940 package—no guarantees are made for older versions.
18941 Most of the log messages are not currently displayed after operations —
18942 you can check them in Messages pane if unsure.
18945 \begin_layout Standard
18946 For introducing your own external commands consult vc-command in the manual
18950 \begin_layout Subsection
18951 RCS commands in LyX
18954 \begin_layout Standard
18955 The following sections describe the RCS commands supported by LyX.
18956 You can find them in the
18958 File\SpecialChar \menuseparator
18960 \begin_inset space ~
18966 LyX was tested against RCS 5.7.
18969 \begin_layout Subsubsection
18975 \begin_layout Standard
18976 If your document is not under revision control, this is the only item shown
18978 And if it is under revision control, the
18982 item is not visible.
18986 \begin_layout Standard
18987 This command registers your document with RCS (unless you are under the
18988 directory managed by CVS)\SpecialChar \@.
18989 You are asked interactively to supply an initial
18990 description of the document.
18991 The document is now set in Read-Only mode and you have to
18994 \begin_inset space ~
18998 \begin_inset space ~
19002 \begin_inset space ~
19007 , before making any changes to it.
19008 A document under revision control has a
19009 \begin_inset Quotes eld
19012 [RCS:<version> <locker>]
19013 \begin_inset Quotes erd
19016 item tagged to the filename in the minibuffer.
19019 \begin_layout Standard
19020 RCS command that is run:
19022 ci -q -u -i -t-"<initial description>" <file-name>
19025 \begin_layout Standard
19030 to understand the switches.
19034 \begin_layout Subsubsection
19040 \begin_layout Standard
19041 When you are finished editing a file, you check in your changes.
19042 When you do this, you are asked for a description of the changes.
19043 This is stored in the history log.
19044 The version number is bumped, your changes are applied to the master RCS
19045 file, the document is unlocked and set to Read-Only mode.
19049 \begin_layout Standard
19052 ci -q -u -m"<description>" <file-name>
19055 \begin_layout Subsubsection
19061 \begin_layout Standard
19062 By doing this you lock the document so that only you can edit it.
19063 This will also make the document Read-Write only for you.
19064 You will usually continue editing for a while and when you are finished
19065 you check in your changes.
19066 The status line is changed to reflect that you have locked the file.
19070 \begin_layout Standard
19073 co -q -l <file-name>
19076 \begin_layout Subsubsection
19079 Revert To Repository Version
19082 \begin_layout Standard
19083 This will discard all changes made to the document since the last check
19085 You get a warning before changes are discarded.
19088 \begin_layout Standard
19091 co -f -u<version> <file-name>
19094 \begin_layout Subsubsection
19100 \begin_layout Standard
19101 This makes as if the last check in never happened.
19102 No changes are made to the document loaded into LyX, but the last version
19103 is removed from the master RCS file.
19107 \begin_layout Standard
19110 rcs -o<version> <file-name>
19113 \begin_layout Subsubsection
19119 \begin_layout Standard
19120 This shows the complete history of the RCS document.
19125 is shown in a browser.
19133 \begin_layout Subsubsection
19137 \begin_layout Standard
19138 LyX supports RCS version number information (only), see
19139 \begin_inset CommandInset ref
19141 reference "sub:VCS-Revision-Information"
19148 \begin_layout Subsection
19149 CVS commands in LyX
19152 \begin_layout Standard
19153 A subset of CVS operations is supported by LyX.
19154 You can find the commands in the
19156 File\SpecialChar \menuseparator
19158 \begin_inset space ~
19164 The version control system SVN is more powerful, so please use it instead
19165 of CVS if possible.
19168 \begin_layout Subsubsection
19174 \begin_layout Standard
19175 If you start from scratch with CVS you have to create your repository and
19176 checkout the working copy with external tools.
19177 If you're using a client-server setup you may need to login before doing
19178 the first repository checkout.
19181 \begin_layout Standard
19182 If your documents are under revision control and others are using the same
19183 repository problems arise when different changes to the same document at
19184 the same location happen.
19185 Standard CVS repositories doesn't operate with a file locking mechanism.
19186 This may be surprising, but conflicts only occur if people disagree on
19187 the proper content of the same part of a document.
19188 So, if co-workers are used to communicate regularly, these conflicts occur
19190 If they don't communicate they have a fundamental problem anyway.
19191 Nevertheless some people like to work with so called
19192 \begin_inset Quotes eld
19196 \begin_inset Quotes erd
19200 If they do so the working copy of all files is readonly when checked out
19201 first and the user starts editing after using a special command to make
19202 the working copy writable.
19203 When the changes are checked in the working copy returns to readonly state.
19204 With LyX one has to edit the
19205 \begin_inset Flex Code
19208 \begin_layout Plain Layout
19214 file and add the line
19215 \begin_inset Flex Code
19218 \begin_layout Plain Layout
19224 to work with reserved checkouts.
19225 The benefit is the possibility to see who is using a writable copy of some
19227 It's not guaranteed only one user makes a copy writable.
19230 \begin_layout Standard
19231 LyX tries to guess if you're using reserved or non-reserved checkouts.
19232 If your working copy is readonly or it is writable and an additional copy
19233 of your document exists in the CVS/Base sub-directory a reserved otherwise
19234 a non-reserved checkout is assumed.
19235 When a reserved checkout is detected you have to use
19236 \begin_inset Flex MenuItem
19239 \begin_layout Plain Layout
19245 to make your working copy writable if it's readonly.
19247 \begin_inset Flex MenuItem
19250 \begin_layout Plain Layout
19256 operation is possible and that makes your working copy readonly again after
19257 transferring your changes to the repository.
19260 \begin_layout Standard
19261 More information about CVS can be found here
19262 \begin_inset Flex URL
19265 \begin_layout Plain Layout
19267 http://www.nongnu.org/cvs
19273 \begin_inset Flex URL
19276 \begin_layout Plain Layout
19278 http://ximbiot.com/cvs
19286 \begin_layout Standard
19291 to understand the sub-commands and the switches mentioned below.
19294 \begin_layout Subsubsection
19300 \begin_layout Standard
19301 If your document is not under revision control, this is the only item shown
19303 And if it is under revision control, the
19310 item is not visible.
19314 \begin_layout Standard
19315 This command registers in CVS your document
19318 \begin_inset Flex Strong
19321 \begin_layout Plain Layout
19331 in case you have already the documents directory under CVS control (in
19337 This means you have to create or checkout the archive by yourself using
19339 (In case you forget that step LyX registers the document with RCS.)
19342 \begin_layout Standard
19343 Then you are asked interactively to supply an initial description of the
19345 Don't forget that registered file is not yet checked in.
19348 \begin_layout Standard
19349 CVS command that is run:
19351 cvs -q add -m"<entered message>" "<file-name>"
19354 \begin_layout Standard
19359 above and for all other CVS commands is an abbreviation for
19360 \begin_inset Quotes eld
19363 change the current working directory to file location and use the file name
19364 without path component as argument
19365 \begin_inset Quotes erd
19371 \begin_layout Subsubsection
19377 \begin_layout Standard
19378 When you are finished editing a file, you commit your changes.
19379 When you do this and you had changed the document, you are asked for a
19380 description of the changes.
19381 After that changes are written to the repository.
19382 In case you didn't change the document and a reserved checkout is detected
19383 the reservation made on
19384 \begin_inset Flex MenuItem
19387 \begin_layout Plain Layout
19396 \begin_layout Labeling
19397 \labelwidthstring 00.00.0000
19399 \begin_inset space ~
19403 \begin_inset space ~
19407 \begin_inset Newline newline
19411 \begin_inset Flex Code
19414 \begin_layout Plain Layout
19417 -q commit -m"<description>" "<file-name>"
19423 \begin_inset Newline newline
19427 \begin_inset Flex Code
19430 \begin_layout Plain Layout
19441 \begin_layout Subsubsection
19447 \begin_layout Standard
19448 When you are sharing a repository with others, you may have to incorporate
19449 their changes into your working copy.
19452 \begin_layout Standard
19455 cvs -q update "<file-name>"
19458 \begin_layout Standard
19459 If a readonly checkout is detected the working copy is made writable and
19463 \begin_layout Standard
19466 cvs -q edit "<file-name>"
19469 \begin_layout Subsubsection
19472 Revert To Repository Version
19475 \begin_layout Standard
19476 This will discard all changes made to the document since the last check
19478 You get a warning before changes are discarded.
19479 Firstly the file is deleted, secondly CVS update command is run.
19482 \begin_layout Standard
19485 cvs -q update "<file-name>"
19488 \begin_layout Standard
19489 If a reserved checkout is detected and the working copy has no changes only
19490 the reservation is undone.
19493 \begin_layout Standard
19496 cvs -q unedit "<file-name>"
19499 \begin_layout Subsubsection
19500 Update of the local directory checkout from repository
19503 \begin_layout Standard
19504 Once your documents gets more complex, containing sub-documents and pictures,
19506 \begin_inset Flex Code
19509 \begin_layout Plain Layout
19515 files and so on using version control becomes more complicated.
19516 LyX supports updating the whole tree in which resides the document.
19517 This become especially useful once you cooperate with people which neither
19518 have detailed knowledge about CVS usage nor they have ambition to commit
19519 additional material to the repository.
19520 You have to organize the files structure so that all external files are
19521 in the same directory or subdirectories of the document.
19522 It's good practice anyway to store multipart documents in an extra directory.
19525 \begin_layout Standard
19527 \begin_inset Flex Code
19530 \begin_layout Plain Layout
19531 Update local directory from repository
19536 command updates the whole directory.
19537 If local changes are detected user is warned before update starts.
19538 In case of merge conflicts both versions of the conflicting document parts
19539 are placed in the final document.
19540 You have to review and correct the result of the merge.
19541 You'll find the conflicts enclosed in pairs of
19542 \begin_inset Flex Code
19545 \begin_layout Plain Layout
19552 \begin_inset Flex Code
19555 \begin_layout Plain Layout
19562 \begin_inset Flex Code
19565 \begin_layout Plain Layout
19572 The first part is your version as before the update operation with the
19573 document name prepended.
19574 The second one is the repository version with the version number after
19576 \begin_inset Flex Code
19579 \begin_layout Plain Layout
19588 \begin_layout Labeling
19589 \labelwidthstring 00.00.0000
19591 \begin_inset space ~
19595 \begin_inset space ~
19599 \begin_inset Newline newline
19603 \begin_inset Flex Code
19606 \begin_layout Plain Layout
19614 (Ask if changes are detected.)
19615 \begin_inset Newline newline
19619 \begin_inset Flex Code
19622 \begin_layout Plain Layout
19623 cd $path; cvs -q update
19633 \begin_layout Standard
19635 \begin_inset Flex Code
19638 \begin_layout Plain Layout
19644 stands for the path to the document.
19647 \begin_layout Subsubsection
19653 \begin_layout Standard
19654 This shows the complete history of the CVS document.
19657 cvs log "<file-name>"
19659 is shown in a browser.
19662 \begin_layout Subsection
19663 SVN commands in LyX
19666 \begin_layout Standard
19667 SVN is now partially supported by LyX.
19668 You can find the commands in the
19670 File\SpecialChar \menuseparator
19672 \begin_inset space ~
19678 Please note that if you use password protected access to repository via
19679 ssh, you will be asked in terminal window.
19680 LyX was tested against SVN 1.5 and 1.6
19684 \begin_layout Plain Layout
19685 Most of the commands will work with 1.4 too, see
19686 \begin_inset CommandInset ref
19688 reference "sub:SVN-Repo-Update"
19700 \begin_layout Subsubsection
19706 \begin_layout Standard
19707 If your document is not under revision control, this is the only item shown
19709 And if it is under revision control, the
19716 item is not visible.
19720 \begin_layout Standard
19721 This command registers in SVN your document ONLY in case you have already
19722 the documents directory under SVN control (in particular
19727 This means you have to checkout the archive by yourself.
19731 \begin_layout Standard
19732 Then you are asked interactively to supply an initial description of the
19734 Don't forget that registered file is not yet commited.
19737 \begin_layout Standard
19738 SVN command that is run:
19741 \begin_inset Quotes eld
19745 \begin_inset Quotes erd
19751 \begin_layout Standard
19756 to understand the switches.
19760 \begin_layout Subsubsection
19766 \begin_layout Standard
19767 When you are finished editing a file, you commit your changes.
19768 When you do this, you are asked for a description of the changes.
19769 After that changes are commited.
19772 \begin_layout Standard
19777 \begin_layout Plain Layout
19778 In case locking is not enabled.
19780 \begin_inset CommandInset ref
19782 reference "subsec:SVN-File-Locking"
19793 svn commit -q -m"<description>" <file-name>
19796 \begin_layout Subsubsection
19802 \begin_layout Standard
19803 Updates the changes of this file from the repository.
19804 Be sure you understand SVN merging and conflicts resolving before using
19805 this function, because all conflicts has to be resolved manually by you!
19808 \begin_layout Standard
19813 \begin_layout Plain Layout
19821 svn update --non-interactive
19822 \begin_inset Quotes eld
19826 \begin_inset Quotes erd
19832 \begin_layout Subsubsection
19835 Revert To Repository Version
19838 \begin_layout Standard
19839 This will discard all changes made to the document since the last check
19841 You get a warning before changes are discarded.
19845 \begin_layout Standard
19849 \begin_inset Quotes eld
19853 \begin_inset Quotes erd
19859 \begin_layout Subsubsection
19860 \begin_inset CommandInset label
19862 name "sub:SVN-Repo-Update"
19866 Update of the local directory checkout from repository
19870 \begin_layout Plain Layout
19871 Note that this command will work only with subversion
19872 \begin_inset Formula $\geqq1.5$
19883 \begin_layout Standard
19884 All the commands above have one shortcomming - they deal with the current
19886 Once your document contains pictures, includes external
19887 \begin_inset Flex Code
19890 \begin_layout Plain Layout
19896 files and so on administration becomes more complicated.
19897 LyX now supports updating the whole tree in which resides the document
19901 \begin_layout Plain Layout
19902 One need to organize the files structure so that all external files are
19903 in the same directory or subdirectories of the document.
19910 This become especially useful once you cooperate with people which neither
19911 know about subversion management nor they have ambition to commit additional
19912 material to the repository.
19916 \begin_layout Standard
19917 \begin_inset Flex Code
19920 \begin_layout Plain Layout
19921 Update local directory from repository
19926 command updates the whole directory and in case of merge conflicts local
19927 version of the files are left, so no unintended data loss occurs.
19928 If local changes are detected user is warned before update starts.
19931 \begin_layout Labeling
19932 \labelwidthstring 00.00.0000
19934 \begin_inset space ~
19938 \begin_inset space ~
19942 \begin_inset Newline newline
19946 \begin_inset Flex Code
19949 \begin_layout Plain Layout
19955 (Ask if changes are detected.)
19956 \begin_inset Newline newline
19960 \begin_inset Flex Code
19963 \begin_layout Plain Layout
19964 svn update --accept mine-full $path
19972 \begin_layout Standard
19974 \begin_inset Flex Code
19977 \begin_layout Plain Layout
19983 stands for the path to the document.
19986 \begin_layout Subsubsection
19992 \begin_layout Standard
19993 This shows the complete history of the SVN document.
19997 \begin_inset Quotes eld
20001 \begin_inset Quotes erd
20006 is shown in a browser.
20009 \begin_layout Subsubsection
20011 \begin_inset CommandInset label
20013 name "subsec:SVN-File-Locking"
20020 \begin_layout Standard
20021 The file exchange through various revision control systems brings the problem
20022 of merge conflicts in case two different users try to edit the same (parts
20024 When such a conflict happens it needs manual resolving and one reasonable
20025 alternative is to provide some kind of locking mechanism, which guarantees
20026 that only one user is allowed to edit file at the given time.
20029 \begin_layout Standard
20030 SVN has two such mechanisms to provide mutual exclusivity for file access
20031 - locks and automatic setting of write permissions (see sec.
20033 \begin_inset CommandInset ref
20035 reference "subsec:Automatical-Locking-Property"
20040 \begin_inset Flex Code
20043 \begin_layout Plain Layout
20053 \begin_layout Plain Layout
20054 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20060 If this property is detected for a given document LyX starts to use SVN
20061 locks for document editing automatically and the whole check-in/out mechanism
20062 switches to the same regimen as for RCS.
20063 This in particular means there are two different modes of file use in LyX:
20066 \begin_layout Itemize
20068 The loaded file is in the read-only mode.
20069 For editing on needs to check-out.
20074 consists of updating from the repository and gaining write lock.
20075 If the lock is not possible to obtain, we remain in unlocked state.
20078 \begin_layout Itemize
20080 The loaded file is in the 'normal' edit mode.
20081 No other user is allowed to edit the file.
20086 consists of commiting changes and releasing write-lock.
20087 If no changes have been made to the document, no commit will be produced
20091 \begin_layout Plain Layout
20092 Don't be puzzled by the fact that you will be asked for commit message anyway.
20097 and only the write-lock will be released.
20100 \begin_layout Standard
20104 \begin_layout Labeling
20105 \labelwidthstring 00.00.0000
20108 svn commit -q -m"<description>" "<file-name>"
20109 \begin_inset Newline newline
20112 svn unlock "<file-name>"
20115 \begin_layout Labeling
20116 \labelwidthstring 00.00.0000
20119 svn update "<file-name>"
20120 \begin_inset Newline newline
20123 svn lock "<file-name>"
20126 \begin_layout Subsubsection
20129 \begin_inset CommandInset label
20131 name "subsec:Automatical-Locking-Property"
20137 Automatic Locking Property
20140 \begin_layout Standard
20141 The above mentioned automatic setting of write permissions of the .lyx file
20147 ile\SpecialChar \menuseparator
20153 \begin_inset space ~
20156 Control\SpecialChar \menuseparator
20161 oggle locking property
20164 This command is active only when the file is not locked on the svn server
20166 you need to check-out before proceeding).
20169 \begin_layout Labeling
20170 \labelwidthstring 00.00.0000
20172 \begin_inset space ~
20178 \begin_layout Labeling
20179 \labelwidthstring 00.00.0000
20182 svn propset svn:needs-lock ON "<file-name>"
20185 \begin_layout Labeling
20186 \labelwidthstring 00.00.0000
20189 svn propdel svn:needs-lock "<file-name>"
20192 \begin_layout Subsubsection
20193 \begin_inset CommandInset label
20195 name "sub:VCS-Revision-Information"
20199 Revision Information in Documents
20202 \begin_layout Standard
20203 There are more possibilities how to activate revision information in our
20207 \begin_layout Itemize
20208 LyX supports directly:
20212 \begin_layout Itemize
20213 tree revision information (
20214 \begin_inset Flex Code
20217 \begin_layout Plain Layout
20224 The result is the output of the
20225 \begin_inset Flex Code
20228 \begin_layout Plain Layout
20234 command, the following table gives you an idea, how to read the results.
20237 \begin_layout Standard
20239 \begin_inset Tabular
20240 <lyxtabular version="3" rows="6" columns="2">
20241 <features tabularvalignment="middle">
20242 <column alignment="center" valignment="top" width="0">
20243 <column alignment="center" valignment="top" width="0">
20245 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20248 \begin_layout Plain Layout
20254 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20257 \begin_layout Plain Layout
20265 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20268 \begin_layout Plain Layout
20274 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20277 \begin_layout Plain Layout
20278 mixed revision working copy
20285 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20288 \begin_layout Plain Layout
20294 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20297 \begin_layout Plain Layout
20298 modified working copy
20305 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20308 \begin_layout Plain Layout
20314 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20317 \begin_layout Plain Layout
20318 switched working copy
20325 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20328 \begin_layout Plain Layout
20334 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20337 \begin_layout Plain Layout
20338 partial working copy, from a sparse checkout
20345 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20348 \begin_layout Plain Layout
20354 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20357 \begin_layout Plain Layout
20358 mixed revision, modified, switched working copy
20371 \begin_layout Itemize
20372 file revision information.
20373 The result comes from parsing the output of
20374 \begin_inset Flex Code
20377 \begin_layout Plain Layout
20379 \begin_inset space ~
20383 \begin_inset space ~
20387 \begin_inset space ~
20396 Supported flags are:
20400 \begin_layout Itemize
20401 version number of the last commit (
20402 \begin_inset Flex Code
20405 \begin_layout Plain Layout
20414 \begin_layout Itemize
20415 author of the last commit (
20416 \begin_inset Flex Code
20419 \begin_layout Plain Layout
20428 \begin_layout Itemize
20429 date of the last commit (
20430 \begin_inset Flex Code
20433 \begin_layout Plain Layout
20442 \begin_layout Itemize
20443 time of the last commit (
20444 \begin_inset Flex Code
20447 \begin_layout Plain Layout
20457 \begin_layout Standard
20458 You can obtain this info via InsetInfo (e.g.
20460 \begin_inset Flex Code
20463 \begin_layout Plain Layout
20464 info-insert buffer vcs-date
20470 The information will be available only when you have the file stored under
20471 svn managment (i.e.
20473 \begin_inset Flex Code
20476 \begin_layout Plain Layout
20482 directory is available with your document).
20486 \begin_layout Itemize
20487 Another---a hacking one---possibility is to use svn keywords
20491 \begin_layout Plain Layout
20492 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20498 In short -- you set file keywords property (e.g.
20501 svn propset svn:keywords 'Rev' file.lyx
20503 ) and then paste keyword TeX code
20507 \begin_layout Plain Layout
20508 This is an easy way how to ensure that LyX won't break the line in the middle
20514 tag in your document (e.g.
20519 \begin_layout Plain Layout
20527 This way svn client will automatically substitute revision number (e.g.
20532 \begin_layout Plain Layout
20539 ) after each update and commit.
20540 There are more problems with this approach.
20541 Firstly, the '$' character is used in TeX world for math equations, so
20542 any occurence of math formula
20543 \begin_inset Formula $Rev$
20547 \begin_inset Formula $Rev:59$
20550 in your LyX document.
20551 Similarly for other keywords like Id, Date, Author, etc.
20552 Secondly svn output is dependent on your locales, so its very easy that
20553 svn would produce some problematic strings once Date is used.
20554 Thirdly you get the whole 'Rev: 59' string in your document instead of
20556 Until subversion implements user's custom keywords it will be hard to use
20557 this approach reliably or let LyX to support it directly.
20560 \begin_layout Subsection
20561 SVN and Windows Environment
20564 \begin_layout Quote
20565 My inclination is to say that if the user cannot figure out the command
20566 line operations on their own fairly quickly, they would be well advised
20567 to use TortoiseSVN.
20573 \begin_layout Subsubsection
20577 \begin_layout Standard
20578 In addition to installing LyX, and having access to a Subversion repository,
20579 the user will need to install the Subversion client program.
20580 A Windows installer for the client program is available from
20581 \begin_inset CommandInset href
20584 target "http://www.collab.net/nonav/downloads/subversion/"
20589 The user may also want to install
20590 \begin_inset CommandInset href
20593 target "http://tortoisesvn.tigris.org/"
20597 , which integrates Subversion operations into the context (rightclick) menu
20598 of Windows Explorer.
20599 Operations done outside LyX will typically be more convenient using the
20600 Explorer context menu.
20601 Note that TortoiseSVN is not a replacement for the client program, which
20602 is what LyX itself will use.
20605 \begin_layout Subsubsection
20606 Bringing a document under Subversion control
20609 \begin_layout Standard
20610 Before a LyX document can be brought under version control in Subversion,
20611 its parent directory needs to be under version control.
20612 If the document is being added to a project already in the repository,
20613 this is accomplished by checking the project out to the directory where
20614 the new document will be placed.
20615 If the project itself is not yet under version control (for instance, if
20616 this document starts a new project), the directory must be imported into
20618 This is done outside LyX.
20619 Both import and checkout are easily accomplished from the Explorer context
20620 menu using TortoiseSVN, or alternatively can be done using the command
20621 line client at a DOS prompt.
20622 The procedure for importing the project using TortoiseSVN is described
20623 below, assuming an existing repository and a new project being started
20631 For information on using the Subversion client program, run
20638 \begin_layout Enumerate
20645 in Windows Explorer, right click it, and select
20647 TortoiseSVN > Repo-browser
20650 If necessary, adjust the URL for the repository, then click OK.
20653 \begin_layout Enumerate
20654 Right click the level of the repository under which you want to place the
20655 new project folder (typically the top level) and click
20657 Create folder\SpecialChar \ldots{}
20660 Supply a name for the project folder and click OK.
20661 Add a message for the log file if desired, then click OK again.
20662 The new project folder should appear in the repository.
20663 Finally, click OK again to exit the repository browser.
20666 \begin_layout Enumerate
20667 Once again right click
20673 , this time selecting SVN Checkout\SpecialChar \ldots{}
20674 Select the URL of the project folder
20675 you just created in the repository, and set the checkout directory to
20683 You will be warned about a non-empty folder; click OK to proceed.
20684 You should now have a
20695 \begin_layout Enumerate
20696 Create or open your document in LyX and click
20701 ile\SpecialChar \menuseparator
20707 \begin_inset space ~
20710 Control\SpecialChar \menuseparator
20718 Add a log message and click OK to commit the document to version control.
20721 \begin_layout Standard
20722 From this point onward, you should have full functionality in the
20727 ile\SpecialChar \menuseparator
20733 \begin_inset space ~
20739 You also have the option of checking the document in and out, viewing its
20741 using the TortoiseSVN context menu in Windows Explorer or the Subversion
20742 client program from a command prompt.
20745 \begin_layout Subsubsection
20746 SSH tunnel used with SVN under Windows
20749 \begin_layout Standard
20750 Compared with Linux setting up svn client to communicate over ssh under
20751 Windows is a rather troublesome task.
20752 We will at least offer some hints how to setup the client side but prior
20753 knowledge about ssh and the Windows command line is needed, also be prepared
20754 for a great deal of frustration\SpecialChar \ldots{}
20758 \begin_layout Enumerate
20759 Get a svn client for windows, as described in the previous sections.
20760 When it is a fresh install run some svn command (e.g.
20762 \begin_inset Flex Code
20765 \begin_layout Plain Layout
20771 ) to create config files, which you will need to change later on.
20774 \begin_layout Enumerate
20775 Choose a ssh client for Windows.
20776 There are several possibilities, we will use the one from Putty tools
20780 \begin_layout Plain Layout
20781 \begin_inset Flex URL
20784 \begin_layout Plain Layout
20786 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20797 You will need to set the connection up so that the client doesn't ask for
20798 any password from you.
20799 To keep things easy we will use only keys without any additional password
20804 \begin_layout Enumerate
20806 \begin_inset Flex Code
20809 \begin_layout Plain Layout
20816 Save your private .ppk key file and put the public one on the server side.
20817 If the SVN server runs on Linux, note that the format of the public key
20818 is not compatible with Linux openssh and you will need to direcly copy-paste
20821 Public key for pasting into OpenSSH authorized_keys file
20823 :” edit field into the server's
20824 \begin_inset Flex Code
20827 \begin_layout Plain Layout
20828 ~/.ssh/authorized_keys
20834 \begin_inset Flex Code
20837 \begin_layout Plain Layout
20846 \begin_layout Enumerate
20848 \begin_inset Flex Code
20851 \begin_layout Plain Layout
20858 In the SVN config file
20862 \begin_layout Plain Layout
20863 Exact path depends on Windows version, usually somewhere around
20864 \begin_inset Flex Code
20867 \begin_layout Plain Layout
20870 Documents and Settings
20884 \begin_inset Flex Code
20887 \begin_layout Plain Layout
20902 , section [tunnels], setup ssh command, e.g.
20904 \begin_inset Flex Code
20907 \begin_layout Plain Layout
20908 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20917 \begin_layout Plain Layout
20918 It will usually take a lot of time to get exact command right and it depends
20920 For example do not have some remote server saved as a default session in
20922 If things fail, try to connect via plink without SVN first.
20931 \begin_layout Enumerate
20932 Checkout the SVN archive, e.g.
20934 \begin_inset Flex Code
20937 \begin_layout Plain Layout
20938 svn co svn+ssh://user@server/repository_path
20946 \begin_layout Subsubsection
20947 End-of-Line Conversions
20950 \begin_layout Standard
20951 When the collsraborators are mixing Linux and Windows environments, LyX
20952 will use different line endings inside the .lyx files.
20953 This is not a problem as far as LyX functionality is concerned, but the
20954 commit diffs will be huge and merge-conflicts prone.
20955 Fortunately SVN itself knows
20959 \begin_layout Plain Layout
20960 \begin_inset Flex URL
20963 \begin_layout Plain Layout
20965 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
20975 how to deal with CR/LF problems when switching .lyx files to the
20976 \begin_inset Flex Code
20979 \begin_layout Plain Layout
20989 \begin_layout Plain Layout
20991 \begin_inset Flex Code
20994 \begin_layout Plain Layout
20995 svn propset svn:eol-style native FILE_NAME
21008 \begin_layout Subsection
21012 \begin_layout Standard
21013 With the recent addition of the vc-command function LyX power users are
21014 allowed to create their own commands for revision control.
21017 \begin_layout Standard
21018 As an example you can see how two TortoiseSVN commands could be integrated
21022 \begin_layout Description
21024 \begin_inset Flex Code
21027 \begin_layout Plain Layout
21028 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21036 \begin_layout Description
21038 \begin_inset Flex Code
21041 \begin_layout Plain Layout
21042 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21050 \begin_layout Subsection
21051 Version control and Document comparison
21054 \begin_layout Standard
21055 One of the typical uses of version control is to inspect the changes between
21056 revisions, usually by creating
21057 \begin_inset Flex Code
21060 \begin_layout Plain Layout
21067 While this is useful for plain text files, it is much less useful in the
21068 case of LyX files, which have more complicated structure.
21069 Hence we provide binding to the Document comparison feature.
21070 They are two ways of calling this feature - either by direct call of
21071 \begin_inset Flex Code
21074 \begin_layout Plain Layout
21080 LyX function (for details see LyX functions manual) or by icon/menu item
21082 \begin_inset Flex MenuItem
21085 \begin_layout Plain Layout
21086 Compare with older revision...
21092 One can either compare two chosen revisions of the document or he can simply
21093 compare the current version of edited text with older revisions (where
21095 \begin_inset Flex MenuItem
21098 \begin_layout Plain Layout
21104 ' revisions back means comparison of the edited file with last commited
21109 \begin_layout Standard
21110 This feature is supported for SVN and RCS though due to the more complicated
21111 versioning scheme of RCS there is a constraint -- when addressing the revisions
21112 in dialog, numbers always point to the last number in RCS revision number,
21117 \begin_layout Section
21118 Literate Programming
21121 \begin_layout Standard
21126 (kayvan@sylvan.com)
21130 original documentation written by
21132 Edmar Wienskoski Jr.
21135 (edmar-w-jr@technologist.com)
21138 \begin_layout Subsection
21142 \begin_layout Standard
21143 The main purpose of this documentation is to show you how to use LyX for
21144 literate programming, where it is assumed that you are familiar with this
21145 programming technique, and know what
21146 \begin_inset Quotes eld
21150 \begin_inset Quotes erd
21154 \begin_inset Quotes eld
21158 \begin_inset Quotes erd
21162 If that is not the case, please follow the web links provided in the following
21164 There is a lot of good documentation out there covering old development
21165 history to the latest tools tips.
21168 \begin_layout Standard
21169 It is also assumed that you are familiar with LyX itself to a point that
21170 you are comfortable changing your LyX preferences, and X resources file.
21171 If that is not the case please refer to other LyX documentation to cover
21172 your specific needs.
21175 \begin_layout Subsection
21176 Literate Programming
21179 \begin_layout Standard
21180 From the Literate Programming FAQ:
21183 \begin_layout Quotation
21184 Literate programming is the combination of documentation and source together
21185 in a fashion suited for reading by human beings.
21186 In fact, literate programs should be enjoyable reading, even inviting!
21187 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21188 and documentation in a single file.
21189 Literate programming tools then parse the file to produce either readable
21190 documentation or compilable source.
21191 The WEB style of literate programming was created by D.
21192 \begin_inset space \thinspace{}
21196 Knuth during the development of his TeX typesetting software.
21200 \begin_layout Standard
21201 Another excerpt says:
21204 \begin_layout Quotation
21207 How is literate programming different from verbose commenting?
21210 \begin_layout Quotation
21211 There are three distinguishing characteristics.
21212 In order of importance, they are:
21216 \begin_layout Itemize
21217 flexible order of elaboration
21220 \begin_layout Itemize
21221 automatic support for browsing
21224 \begin_layout Itemize
21225 typeset documentation, especially diagrams and mathematics
21229 \begin_layout Standard
21230 Now that I sparked your curiosity, take a look in the references.
21233 \begin_layout Subsubsection
21237 \begin_layout Standard
21238 The complete Literate Programming FAQ can be found at:
21241 \begin_layout Quote
21242 Literate Programming FAQ
21243 \begin_inset Flex URL
21246 \begin_layout Plain Layout
21248 http://www.literateprogramming.com/lpfaq.pdf
21256 \begin_layout Standard
21257 The FAQ lists 23 (twenty three!) different literate programming tools.
21258 Where some are specialized or
21259 \begin_inset Quotes eld
21263 \begin_inset Quotes erd
21266 for particular programming languages, while other have general scope.
21271 for my own use for several reasons:
21274 \begin_layout Itemize
21275 It can generate the documentation either in LaTeX or HTML.
21278 \begin_layout Itemize
21279 It has a open architecture, i.
21280 \begin_inset space \thinspace{}
21284 \begin_inset space \space{}
21287 it is easy to plug in new filters and to perform special processing that
21292 \begin_layout Itemize
21293 There is a good selection of filters available already (the HTML is one
21297 \begin_layout Itemize
21301 \begin_layout Standard
21302 The Noweb web page can be found at:
21305 \begin_layout Quote
21307 \begin_inset Flex URL
21310 \begin_layout Plain Layout
21312 http://www.cs.virginia.edu/~nr/noweb/
21320 \begin_layout Standard
21321 Starting from there you can reach many other interesting links and even
21322 some literate program examples.
21325 \begin_layout Subsection
21326 LyX and Literate Programming
21329 \begin_layout Standard
21330 The LyX support for Literate Programming is provided by using the generic
21331 LyX converters mechanism.
21332 This support is provided in a
21333 \begin_inset Quotes eld
21337 \begin_inset Quotes erd
21341 \begin_inset space \thinspace{}
21345 \begin_inset space \space{}
21348 you will be able to use this new LyX feature with some other literate programmin
21349 g tool of your choice by just changing your LyX preferences.
21352 \begin_layout Subsubsection
21353 Generating documents and code (weaving and tangling)
21356 \begin_layout Paragraph
21357 Selecting the document class
21360 \begin_layout Standard
21361 If you have installed Noweb and LyX successfully, whenever you open a new
21362 document or try to change the document class of an existing one, you will
21363 find that there are three new document classes available:
21366 \begin_layout Itemize
21370 \begin_layout Itemize
21374 \begin_layout Itemize
21378 \begin_layout Standard
21379 You must select one of them to create your literate documents from.
21383 \begin_layout Standard
21384 Note that literate documents are not limited to these three classes.
21385 New classes can be generated from other styles like letter or in combination
21386 with other class variations like Article (AMS).
21387 If you have special needs that cannot be covered by one of the existing
21388 classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21389 will arrange to insert a new entry, or teach you how to do it.
21393 \begin_layout Plain Layout
21394 It is very simple, it involves the creation of a file with four lines, and
21395 re-running of the auto configuration.
21400 Moreover, if you use a literate tool other than Noweb you may need to create
21401 a new set of document classes for it.
21404 \begin_layout Paragraph
21408 \begin_layout Standard
21409 LyX enables you to write code with a layout named
21417 \begin_layout Plain Layout
21418 The equivalent Noweb term is
21419 \begin_inset Quotes eld
21423 \begin_inset Quotes erd
21427 For historical reasons, I got used to the term
21428 \begin_inset Quotes eld
21432 \begin_inset Quotes erd
21435 introduced by other literate tool named Nuweb, which I used for many years
21436 before rendering myself to Noweb.
21441 Noweb delimits scraps like this:
21444 \begin_layout LyX-Code
21448 \begin_layout LyX-Code
21452 \begin_layout LyX-Code
21456 \begin_layout LyX-Code
21460 \begin_layout LyX-Code
21464 \begin_layout Standard
21465 The problem is that whatever is written in between the << and the
21469 must be taken literally, i.
21470 \begin_inset space \thinspace{}
21474 \begin_inset space \space{}
21477 LyX should be prevented from making any special interpretation of what has
21479 This is handled by a special layout named Scrap, that works like a normal
21480 paragraph but has a free spacing capability.
21483 \begin_layout Standard
21484 The down side of the Scrap paragraph layout is that consecutive paragraphs
21485 of code will be spaced with one empty line in the source code and also
21486 in the printed documentation.
21487 The work around is to enter each line of code within a single Scrap, with
21488 a newline (ctrl-return).
21489 The example above will look like this:
21493 \begin_layout Plain Layout
21494 If you have a printed version of this document you will not see any difference
21495 between the previous example and this one.
21503 \begin_layout LyX-Code
21505 \begin_inset Newline newline
21509 \begin_inset Newline newline
21513 \begin_inset Newline newline
21517 \begin_inset Newline newline
21523 \begin_layout Standard
21524 This layout works fine.
21525 The only real inconvenience is that you have to type ctrl-return instead
21530 \begin_layout Plain Layout
21531 It is in my list of
21532 \begin_inset Quotes eld
21536 \begin_inset Quotes erd
21547 \begin_layout Standard
21548 As a special note, you can also use the
21549 \begin_inset Quotes eld
21553 \begin_inset Quotes erd
21556 construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21560 \begin_layout LyX-Code
21562 \begin_inset Newline newline
21565 def some_function(args):
21566 \begin_inset Newline newline
21569 "This is the doc string for this function."
21570 \begin_inset Newline newline
21573 print "My args: ", args
21576 \begin_layout LyX-Code
21577 @ %def some_function
21580 \begin_layout Standard
21581 For an example of this usage and the resulting cross-reference output, look
21582 at the Literate python program in
21584 LIBDIR/examples/listerrors.lyx
21586 which should make this all clear.
21589 \begin_layout Paragraph
21590 Generating the documentation
21593 \begin_layout Standard
21594 At this point you already have a new document file with a proper document
21595 class, and with some code and text on it.
21596 How do I print it? The answer is simple, you select
21598 View\SpecialChar \menuseparator
21602 Just like you would do for a plain document.
21603 No special procedure is required.
21606 \begin_layout Standard
21607 To help orientate you, I will now explain what happens inside LyX:
21610 \begin_layout Enumerate
21613 Update\SpecialChar \menuseparator
21616 menu option is chosen, a LaTeX file is generated.
21621 \begin_layout Standard
21622 If the document is of any literate class the generated file will be named
21623 with an extension name defined by the
21624 \begin_inset Quotes eld
21628 \begin_inset Quotes erd
21631 format (defined in the Preferences panel), otherwise the file will have
21640 \begin_layout Enumerate
21641 Note that the only difference so far is in the name of the file, no special
21642 processing is required by LyX.
21643 Given that you formatted the code using the Scrap layout that, by itself,
21644 takes care of the business.
21647 \begin_layout Enumerate
21648 If the document is of any literate class LyX will then use the internal
21649 LyX to Noweb converter, followed by the Noweb to LaTeX converter
21653 \begin_layout Plain Layout
21654 The converters are defined in the
21656 Tools\SpecialChar \menuseparator
21660 \begin_inset Quotes eld
21664 \begin_inset Quotes erd
21676 manual for general information about converters.
21681 to generate the LaTeX file.
21685 \begin_layout Standard
21686 Otherwise it will just skip this step.
21690 \begin_layout Enumerate
21691 Finally, LaTeX is invoked and the regular post processing continues as in
21695 \begin_layout Standard
21696 Independence from a particular
21697 \begin_inset Quotes eld
21701 \begin_inset Quotes erd
21704 is easily achieved by changing the commands that are run by the various
21708 \begin_layout Paragraph
21709 Generating the code
21712 \begin_layout Standard
21713 When the build menu option is chosen or the corresponding button in the
21714 toolbar is pressed, a LaTeX file is generated just like step 1 above.
21715 Next, LyX invokes the
21720 This converter needs to be defined by the user and is not installed by
21721 default, though the Program format is.
21722 This converter (like any other converter) will have two parts:
21725 \begin_layout Enumerate
21726 The converter program itself.
21727 This program performs the conversion from the one format to the other (in
21728 this case, from the Noweb format to the Program pseudo-format).
21731 \begin_layout Enumerate
21732 The error log parser.
21733 This is a program whose sole purpose is to rewrite error messages in a
21734 format that LyX understands.
21735 This makes it possible for LyX to place error boxes in the right places
21736 in the file buffer.
21739 \begin_layout Standard
21740 The first part, the
21741 \begin_inset Quotes eld
21745 \begin_inset Quotes erd
21748 setting, should be set to
21749 \begin_inset Quotes eld
21757 \begin_inset Quotes erd
21761 This basically means that LyX will call
21762 \begin_inset Quotes eld
21766 \begin_inset Quotes erd
21769 (a program or script) with the name of the Noweb file (normally a file
21770 in the LyX temp directory).
21774 \begin_layout Standard
21775 This is an implementation of
21776 \begin_inset Quotes eld
21780 \begin_inset Quotes erd
21783 that you can place in a directory on your path:
21786 \begin_layout LyX-Code
21790 \begin_layout LyX-Code
21794 \begin_layout LyX-Code
21795 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
21798 \begin_layout Standard
21799 The next part of the converter setting is the
21800 \begin_inset Quotes eld
21804 \begin_inset Quotes erd
21807 which is to be set to
21808 \begin_inset Quotes eld
21813 parselog=listerrors
21816 \begin_inset Quotes erd
21820 This will run any errors that are generated by the
21821 \begin_inset Quotes eld
21825 \begin_inset Quotes erd
21828 process through the
21829 \begin_inset Quotes eld
21833 \begin_inset Quotes erd
21839 \begin_layout Standard
21840 The converter code looks in
21848 then on the path for the
21849 \begin_inset Quotes eld
21853 \begin_inset Quotes erd
21859 \begin_layout Standard
21860 The build will normally take place in LyX's temporary directory, so the
21861 files produced by the conversion will be in that directory.
21862 LyX will copy out what it regards as the `main' file, but the
21866 conversion may produce several files, and so most of these would then be
21867 deleted when LyX was closed.
21868 The present solution is to use a `copier',
21872 \begin_layout Plain Layout
21881 manual for information on these.
21890 script in its default mode, so that the entire contents of the temporary
21891 directory is copied.
21892 More will get copied than is needed, to be sure, but nothing will be lost.
21893 If, however, you know what extensions the generated files will have, this
21894 can be improved by using the
21903 This option takes a comma-separated list of extensions to copy.
21904 So, for example, if the conversion will generate only files with the extensions
21913 , then the correct definition would be:
21916 \begin_layout LyX-Code
21917 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
21920 \begin_layout Standard
21921 The result will be that only files with these two extensions will be copied
21925 \begin_layout Paragraph
21926 Build instructions in the document
21929 \begin_layout Standard
21930 The last piece of the integration between LyX and noweb is the
21931 \begin_inset Quotes eld
21935 \begin_inset Quotes erd
21939 Generally, the instructions for building your program should be embedded
21940 in a scrap of its own.
21942 \begin_inset Quotes eld
21946 \begin_inset Quotes erd
21949 above uses the notangle command to look for this scrap (called
21950 \begin_inset Quotes eld
21954 \begin_inset Quotes erd
21957 ) and runs its contents through
21958 \begin_inset Quotes eld
21962 \begin_inset Quotes erd
21968 \begin_layout Standard
21969 Typically, such a scrap would look something like this:
21972 \begin_layout LyX-Code
21974 \begin_inset Newline newline
21978 \begin_inset Newline newline
21982 \begin_inset Newline newline
21985 if [ -z "${NOWEB_SOURCE}" ]
21986 \begin_inset Newline newline
21990 \begin_inset Newline newline
21993 NOWEB_SOURCE=myfile.nw
21994 \begin_inset Newline newline
21998 \begin_inset Newline newline
22002 code to extract files ...]
22003 \begin_inset Newline newline
22007 code to compile files ...]
22008 \begin_inset Newline newline
22014 \begin_layout Standard
22017 LIBDIR/examples/listerrors.lyx
22021 LIBDIR/examples/Literate.lyx
22023 which implement two versions of the
22024 \begin_inset Quotes eld
22028 \begin_inset Quotes erd
22031 program for some illustrations of how all of these pieces go together or
22034 LIBDIR/examples/noweb2lyx.lyx.
22037 Interestingly, these three files show off the language-indepence of the
22038 LyX literate programming support since they are written in Python, C and
22042 \begin_layout Subsubsection
22046 \begin_layout Standard
22047 All the Literate Programming support is configured by the
22049 Tools\SpecialChar \menuseparator
22053 \begin_inset Quotes eld
22057 \begin_inset Quotes erd
22061 The important parts are:
22064 \begin_layout Description
22066 \begin_inset space ~
22070 \begin_inset Quotes eld
22074 \begin_inset Quotes erd
22078 \begin_inset space ~
22081 format Set up via the Formats tab, this is where the Noweb-specific pieces
22091 , the file extension is set to
22096 This tells LyX to create a file with a
22100 extension in the first step of the conversion process.
22103 \begin_layout Description
22105 \begin_inset space ~
22113 \begin_inset space ~
22116 format This is an empty format whose sole purpose is to be the endpoint
22117 of a conversion (which then allows us to set up a converter for it).
22120 \begin_layout Description
22129 This converter performs the
22130 \begin_inset Quotes eld
22134 \begin_inset Quotes erd
22137 of the literate document.
22138 For Noweb, it is set to
22139 \begin_inset Quotes eld
22144 noweave -delay -index $$i > $$o
22147 \begin_inset Quotes erd
22153 \begin_layout Description
22163 \begin_inset Quotes eld
22167 \begin_inset Quotes erd
22171 As stated above, the Converter is set to
22172 \begin_inset Quotes eld
22180 \begin_inset Quotes erd
22183 , with Flags set to
22184 \begin_inset Quotes eld
22189 originaldir,parselog=listerrors
22192 \begin_inset Quotes erd
22198 \begin_layout Subsubsection
22202 \begin_layout Standard
22203 There is also a new function implemented in the LyX server, the
22204 \begin_inset Quotes eld
22207 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22211 \begin_layout Standard
22212 When debugging code with ddd/gdb, it is possible to invoke a text editor
22213 at the current execution position with a single key stroke.
22214 The default ddd configuration for that is shift-ctrl-V.
22215 It happens that you can define the editor command line invocation in ddd
22218 Edit\SpecialChar \menuseparator
22219 Preferences\SpecialChar \menuseparator
22222 dialog and changing the "Edit Sources" entry.
22225 \begin_layout Standard
22226 I take advantage of the new created LyX server function and this ddd feature,
22228 \begin_inset Quotes eld
22232 \begin_inset Quotes erd
22238 \begin_layout LyX-Code
22239 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22242 \begin_layout Standard
22243 With this, whenever you are using ddd and find a point in the program that
22244 you want to edit, you just press shift-ctrl-V (in the ddd window), and
22245 ddd you forward this information to LyX through the LyX server and then
22246 the LyX window will show the same file with the cursor at the same position
22247 ddd was pointing to.
22248 No more guessing or long scrolling to locate a point in the program back
22252 \begin_layout Standard
22253 Note however that you must enable the LyX server to get this feature working
22254 (it is disabled by default).
22255 You can enable it in
22267 ) by entering in the
22272 \begin_inset Quotes eld
22277 /home/<your-home-directory>/.lyx/lyxpipe
22280 \begin_inset Quotes erd
22286 \begin_layout Standard
22287 Read the LyX server documentation in the
22289 Customization Manual
22291 for further information.
22294 \begin_layout Subsubsection
22298 \begin_layout Standard
22299 There are six new buttons that can be added to your LyX toolbar.
22300 Five of these buttons are short cuts to layout styles:
22321 The last one is a short cut to the
22322 \begin_inset Quotes eld
22326 \begin_inset Quotes erd
22333 \begin_layout Standard
22334 LyX has a range of buttons that are available for tool bar customization.
22335 In my toolbar I like to combine the six short cuts above with two more:
22340 \SpecialChar \menuseparator
22345 \SpecialChar \menuseparator
22352 View\SpecialChar \menuseparator
22356 Here is how it looks like:
22359 \begin_layout LyX-Code
22363 \begin_layout LyX-Code
22367 \begin_layout LyX-Code
22368 Icon "layout Standard"
22371 \begin_layout LyX-Code
22372 Icon "layout Section"
22375 \begin_layout LyX-Code
22376 Icon "layout LaTeX"
22379 \begin_layout LyX-Code
22380 Icon "layout LyX-Code"
22383 \begin_layout LyX-Code
22384 Icon "layout Scrap"
22387 \begin_layout LyX-Code
22391 \begin_layout LyX-Code
22395 \begin_layout LyX-Code
22396 Icon "buffer-typeset"
22399 \begin_layout LyX-Code
22400 Icon "build-program"
22403 \begin_layout LyX-Code
22407 \begin_layout LyX-Code
22411 \begin_layout LyX-Code
22415 \begin_layout LyX-Code
22419 \begin_layout LyX-Code
22423 \begin_layout Subsubsection
22424 Colors customization
22427 \begin_layout Standard
22428 There are a number of colors in LyX that can be customized in
22433 One of the things that bothers people is the LaTeX font color.
22434 The default color is red, since the scraps uses LaTeX font, and there is
22435 a lot of scraps in literate documents, you may get tired of seeing everything
22437 You can change it by going to the tabs
22446 \begin_layout Standard
22447 The next thing is the visible presence of the newline character in the screen.
22448 You can choose the color of this particular character and make it blend
22450 I recommend you choosing a color that is close to the background but not
22451 equal, that way you still can see it is there, but it is not bothering
22456 \begin_layout Chapter
22457 Secrets of the LaTeX Masters
22458 \begin_inset CommandInset label
22467 \begin_layout Standard
22468 Though LyX is a powerful tool, it cannot hope to support everything that
22469 can be done with pure TeX/LaTeX.
22470 However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
22471 as long as you are not afraid to use that
22472 \begin_inset Quotes eld
22476 \begin_inset Quotes erd
22479 button on the toolbar or add things to the LaTeX preamble.
22480 This section lists some tips, tricks, and otherwise cool ideas to give
22481 your document that extra little flair.
22484 Do try this at home
22486 , just start with something a little smaller and less important than your
22490 \begin_layout Standard
22491 Most ideas in this section require less common files in your LaTeX installation.
22492 If you have a system like TeXLive, most will already be available.
22493 A few, however, will need to be downloaded from one of the CTAN archives.
22494 Often, there are several ways to do something, or several LaTeX style files
22495 which do the same thing.
22496 We do not endorse one choice over another, we simply claim that we have
22497 done a particular task with a particular file.
22498 Put on your wizard hat, keep an eye out for dragons, and let us begin.
22501 \begin_layout Section
22505 \begin_layout Standard
22508 Lars Gullik Bjønnes
22511 \begin_layout Subsection
22515 \begin_layout Standard
22516 The aim for this chapter
22520 \begin_layout Plain Layout
22521 Editor's note: Lars' original chapter was a masterful description of how
22527 However, it was too long to flow smoothly in this document.
22528 I have therefore chosen to excerpt the most important sections here (sorry,
22529 Lars); you can read the original chapter (and more of the story!) in the
22532 examples/multicol.lyx
22540 is to show how the LaTeX package
22544 can be used in a LyX document.
22545 As LyX doesn't support the
22549 package natively yet, we have to use some small hacks.
22550 By reading this section it should be obvious how to do this.
22553 \begin_layout Subsection
22557 \begin_layout Standard
22562 package allows switching between one and multicolumn format on the same
22564 Footnotes are handled correctly (for the most part), but will be placed
22565 at the bottom of the page and not under each column.
22566 LaTeX's float mechanism, however, is partly disabled in the current implementat
22568 At the moment only page-wide floats can be used within the scope of the
22572 \begin_layout Subsection
22576 \begin_layout Subsubsection
22580 \begin_layout Standard
22581 If you want to have two columns in your text, you have use LaTeX mode to
22586 begin{multicols}{2}
22588 at the point where you want the two column layout to start, and then
22594 where you want it to end.
22598 \begin_layout Standard
22602 \begin_layout Plain Layout
22606 begin{multicols}{2}
22614 \begin_layout Standard
22619 The Adventure of the Empty House
22622 \begin_inset Newline newline
22627 Sir Arthur Conan Doyle
22630 \begin_layout Standard
22633 It was in the spring of the year 1894 that all London was interested, and
22634 the fashionable world dismayed, by the murder of the Honourable Ronald
22635 Adair under most unusual and inexplicable circumstances.
22636 The public has already learned those particulars of the crime which came
22637 out in the police investigation, but a good deal was suppressed upon that
22638 occasion, since the case for the prosecution was so overwhelmingly strong
22639 that it was not necessary to bring forward all the facts.
22640 Only now, at the end of nearly ten years, am I allowed to supply those
22641 missing links which make up the whole of that remarkable chain.
22642 The crime was of interest in itself, but that interest was as nothing to
22643 me compared to the inconceivable sequel, which afforded me the greatest
22644 shock and surprise of any event in my adventurous life.
22645 Even now, after this long interval, I find myself thrilling as I think
22646 of it, and feeling once more that sudden flood of joy, amazement, and increduli
22647 ty which utterly submerged my mind.
22648 Let me say to that public, which has shown some interest in those glimpses
22649 which I have occasionally given them of the thoughts and actions of a very
22650 remarkable man, that they are not to blame me if I have not shared my knowledge
22651 with them, for I should have considered it my first duty to do so, had
22652 I not been barred by a positive prohibition from his own lips, which was
22653 only withdrawn upon the third of last month.
22656 \begin_layout Standard
22660 \begin_layout Plain Layout
22672 \begin_layout Subsubsection
22676 \begin_layout Standard
22677 The same pattern is used when you want more than two columns:
22680 \begin_layout Standard
22684 \begin_layout Plain Layout
22688 begin{multicols}{3}
22696 \begin_layout Standard
22699 It can be imagined that my close intimacy with Sherlock Holmes had interested
22700 me deeply in crime, and that after his disappearance I never failed to
22701 read with care the various problems which came before the public.
22702 And I even attempted, more than once, for my own private satisfaction,
22703 to employ his methods in their solution, though with indifferent success.
22704 There was none, however, which appealed to me like this tragedy of Ronald
22706 As I read the evidence at the inquest, which led up to a verdict of willful
22707 murder against some person or persons unknown, I realized more clearly
22708 than I had ever done the loss which the community had sustained by the
22709 death of Sherlock Holmes.
22710 There were points about this strange business which would, I was sure,
22711 have specially appealed to him, and the efforts of the police would have
22712 been supplemented, or more probably anticipated, by the trained observation
22713 and the alert mind of the first criminal agent in Europe.
22714 All day, as I drove upon my round, I turned over the case in my mind and
22715 found no explanation which appeared to me to be adequate.
22716 At the risk of telling a twice-told tale, I will recapitulate the facts
22717 as they were known to the public at the conclusion of the inquest.
22720 \begin_layout Standard
22724 \begin_layout Plain Layout
22736 \begin_layout Standard
22737 You can have more than 3 columns if you want to, but that might not be very
22738 pleasant for the eye.
22741 \begin_layout Subsubsection
22742 Columns inside columns
22745 \begin_layout Standard
22746 You can even have columns inside columns:
22749 \begin_layout Standard
22753 \begin_layout Plain Layout
22757 begin{multicols}{2}
22765 \begin_layout Standard
22768 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22769 at that time governor of one of the Australian colonies.
22770 Adair's mother had returned from Australia to undergo the operation for
22771 cataract, and she, her son Ronald, and her daughter Hilda were living together
22775 \begin_layout Standard
22779 \begin_layout Plain Layout
22783 begin{multicols}{2}
22791 \begin_layout Standard
22794 The youth moved in the best society–had, so far as was known, no enemies
22795 and no particular vices.
22796 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22797 had been broken off by mutual consent some months before, and there was
22798 no sign that it had left any very profound feeling behind it.
22799 For the rest {sic} the man's life moved in a narrow and conventional circle,
22800 for his habits were quiet and his nature unemotional.
22801 Yet it was upon this easy-going young aristocrat that death came, in most
22802 strange and unexpected form, between the hours of ten and eleven-twenty
22803 on the night of March 30, 1894.
22806 \begin_layout Standard
22810 \begin_layout Plain Layout
22822 \begin_layout Standard
22825 Ronald Adair was fond of cards–playing continually, but never for such stakes
22827 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22828 It was shown that, after dinner on the day of his death, he had played
22829 a rubber of whist at the latter club.
22830 He had also played there in the afternoon.
22835 The evidence of those who had played with him– Mr.
22836 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
22837 and that there was a fairly equal fall of the cards.
22838 Adair might have lost five pounds, but not more.
22839 His fortune was a considerable one, and such a loss could not in any way
22841 He had played nearly every day at one club or other, but he was a cautious
22842 player, and usually rose a winner.
22843 It came out in evidence that, in partnership with Colonel Moran, he had
22844 actually won as much as four hundred and twenty pounds in a sitting, some
22845 weeks before, from Godfrey Milner and Lord Balmoral.
22846 So much for his recent history as it came out at the inquest.
22849 \begin_layout Standard
22853 \begin_layout Plain Layout
22865 \begin_layout Standard
22866 Please do read the file
22868 examples/multicol.lyx
22870 for more advanced examples including column and header spacing, vertical
22871 separator lines, and more.
22874 \begin_layout Section
22879 Paragraph Environment
22880 \begin_inset Argument
22883 \begin_layout Plain Layout
22884 Numbering in Enumerate
22892 \begin_layout Standard
22898 \begin_layout Standard
22899 \begin_inset VSpace bigskip
22905 \begin_layout Standard
22907 The default numbering for the
22911 paragraph environment begins with Arabic numbers and ends with uppercase
22913 Suppose, however, you wanted a different type of numbering scheme.
22914 Here's a quickie example of how to change the numbering scheme:
22917 \begin_layout LyX-Code
22927 \begin_layout LyX-Code
22937 \begin_layout LyX-Code
22947 \begin_layout LyX-Code
22957 \begin_layout Standard
22958 \SpecialChar \ldots{}
22959 which changes the numbering scheme to uppercase Roman numerals, uppercase
22960 letters, Arabic numbers, and lowercase letter.
22963 \begin_layout Standard
22964 Additionally, the previous example also adds a little bit extra to the numbering
22966 For example, the first level label actually looks like:
22967 \begin_inset Quotes eld
22971 \begin_inset Quotes erd
22975 For ease of reading, we'll describe what the numbering schemes look like
22976 using a notation something like this: <
22977 \begin_inset Quotes eld
22981 \begin_inset Quotes erd
22985 \begin_inset space ~
22989 \begin_inset Quotes erd
22993 \begin_inset Quotes erd
22997 \begin_inset space ~
23001 \begin_inset Quotes erd
23005 \begin_inset Quotes erd
23009 \begin_inset space ~
23013 \begin_inset Quotes eld
23017 \begin_inset Quotes erd
23024 \begin_layout Standard
23025 As you can see in the example, there is a label command for each nesting
23032 \SpecialChar \ldots{}
23039 , as well as a counter,
23043 \SpecialChar \ldots{}
23049 There are also five
23050 \begin_inset Quotes eld
23054 \begin_inset Quotes erd
23087 , each of which take one counter as an argument.
23088 You can add characters before or after these, but there's no need to add
23092 \begin_layout Standard
23093 You can get really fancy with these.
23097 \begin_layout LyX-Code
23111 \begin_layout LyX-Code
23123 \begin_layout LyX-Code
23133 \begin_layout LyX-Code
23143 \begin_layout Standard
23144 produces the somewhat out of hand numbering scheme: <
23145 \begin_inset Quotes eld
23149 \begin_inset Quotes erd
23153 \begin_inset space ~
23157 \begin_inset Quotes erd
23161 \begin_inset Quotes erd
23165 \begin_inset space ~
23169 \begin_inset Quotes erd
23173 \begin_inset Quotes erd
23177 \begin_inset space ~
23181 \begin_inset Quotes eld
23185 \begin_inset Quotes erd
23192 \begin_layout Section
23196 \begin_layout Standard
23202 \begin_layout Standard
23203 \begin_inset VSpace bigskip
23209 \begin_layout Standard
23214 \begin_layout Plain Layout
23220 tmpfont}{cmr17 scaled 2500}{
23232 \begin_layout Standard
23237 \begin_layout Plain Layout
23248 hose of you who like the style of old books probably also like
23249 \begin_inset Quotes eld
23253 \begin_inset Quotes erd
23256 —those large capital letters which begin each new chapter or section.
23257 Implementing them with plain LyX/LaTeX is straightforward (assuming you
23258 know some plain TeX!) but does require a lot of work and many iterations,
23259 as you can see by all the ugly TeX-mode stuff at the beginning of this
23263 \begin_layout Standard
23267 \begin_layout Plain Layout
23273 bigdrop{-1em}{3}{ptmri}{T}+
23278 here is a much easier way of doing this, of course.
23287 ) package from CTAN allows a simple way to add such letters to your documents.
23288 Since this package is not a standard part of TeXLive, I can't demonstrate
23289 it within this document, but if you copy this paragraph to a new document,
23291 \begin_inset Quotes eld
23301 \begin_inset Quotes erd
23304 and the pluses from the TeX code at the beginning of the paragraph, and
23309 usepackage{dropcaps}
23311 to your LaTeX preamble, you will get a nice Times Roman Italic
23312 \begin_inset Quotes eld
23316 \begin_inset Quotes erd
23319 , whose height is three lines of text and which protrudes 1 em into the
23321 (Make certain you have copied
23322 \begin_inset Quotes eld
23330 \begin_inset Quotes erd
23333 into a directory where TeX can see it.) The first argument is the amount
23334 of indentation; in this case the negative sign moves it into the margin.
23335 The second argument is the height of the letter in number of lines of text.
23336 The third argument is the font name: virtually anything which has a tfm
23337 file should work (wade through the
23339 .../texmf/fonts/tfm
23341 directory for possibilities).
23342 My personal favorite is
23343 \begin_inset Quotes eld
23351 \begin_inset Quotes erd
23354 , a fancy German font specifically designed for dropped capitals.
23355 The fourth argument is the letter (or letters) to be dropped.
23360 package also offers the
23366 command, as well as a slightly simplified
23375 \begin_layout Section
23376 Non-standard Paragraph Shapes
23379 \begin_layout Standard
23385 \begin_layout Standard
23386 \begin_inset VSpace bigskip
23392 \begin_layout Standard
23396 \begin_layout Plain Layout
23408 \begin_layout Standard
23412 \begin_layout Plain Layout
23421 \begin_layout Plain Layout
23435 \begin_layout Standard
23440 \begin_layout Plain Layout
23451 \begin_layout Plain Layout
23460 \begin_layout Plain Layout
23469 \begin_layout Plain Layout
23478 \begin_layout Plain Layout
23487 \begin_layout Plain Layout
23496 \begin_layout Plain Layout
23505 \begin_layout Plain Layout
23514 \begin_layout Plain Layout
23523 \begin_layout Plain Layout
23532 \begin_layout Plain Layout
23541 \begin_layout Plain Layout
23550 \begin_layout Plain Layout
23559 \begin_layout Plain Layout
23568 \begin_layout Plain Layout
23577 \begin_layout Plain Layout
23586 \begin_layout Plain Layout
23595 \begin_layout Plain Layout
23604 \begin_layout Plain Layout
23613 \begin_layout Plain Layout
23619 There are times when the tyranny of rectangular paragraphs must be overthrown.
23620 In such situations, a call to the delightful plain TeX command
23627 As you can see, completely arbitrary shapes can be laid out with a suitable
23628 set of linelength definitions.
23629 While this parshape may look a bit silly and useless, one could conceive
23630 of situations such as finely tuned dropped capitals, word wrapping around
23631 non-rectangular graphics, etc.
23632 which will benefit from such handcrafting.
23635 \begin_layout Standard
23636 \begin_inset VSpace bigskip
23642 \begin_layout Standard
23647 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23654 is the number of lines of text which define the paragraph.
23655 If there turn out to be fewer lines, the shape is truncated; if there are
23656 more, the excess lines have the same dimensions as the last line of the
23666 entries specify the indentation of the line from the left margin, and the
23667 length of the line as measured from that point.
23668 The shape applies only to the current paragraph; everything is reset to
23669 normal for the next paragraph.
23672 \begin_layout Standard
23676 \begin_layout Plain Layout
23688 \begin_layout Section
23692 \begin_layout Standard
23693 As you can see, the examples in this section range from the useful to the
23695 While I don't expect that anyone will ever need the paragraph shape demonstrate
23696 d in the last section, the important point is that you can do almost anything
23697 you want in LyX if you are willing to figure out how to do it in TeX and
23699 TeX is a fantastically powerful typesetting system and all that power is
23700 available to you since LyX uses it as its backend.