1 #LyX 2.0.0svn created this file. For more info see http://www.lyx.org/
7 % DO NOT ALTER THIS PREAMBLE!!!
9 % This preamble is designed to ensure that the manual prints
10 % out as advertised. If you mess with this preamble,
11 % parts of the manual may not print out as expected. If you
12 % have problems LaTeXing this file, please contact
13 % the documentation team
14 % email: lyx-docs@lists.lyx.org
20 % set fonts for nicer pdf view
21 \IfFileExists{lmodern.sty}
22 {\usepackage{lmodern}}{}
24 \fi % end if pdflatex is used
26 % the pages of the TOC are numbered roman
27 % and a PDF-bookmark for the TOC is added
29 \let\myTOC\tableofcontents
30 \renewcommand{\tableofcontents}{%
31 \pdfbookmark[1]{\contentsname}{}
34 \pagenumbering{arabic}}
36 % redefine the \LyX macro for PDF bookmarks
37 \def\LyX{\texorpdfstring{%
38 L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}
41 % used for multi-column text
44 % extra space for tables
45 \newcommand{\extratablespace}[1]{\noalign{\vskip#1}}
47 \options fleqn,liststotoc,bibtotoc,idxtotoc,BCOR7.5mm,titlepage,tablecaptionabove
48 \use_default_options false
54 \maintain_unincluded_children false
57 InsetLayout CharStyle:MenuItem
66 \newcommand*{\menuitem}[1]{{\sffamily #1}}
75 \font_typewriter default
76 \font_default_family default
77 \use_non_tex_fonts false
84 \default_output_format default
86 \bibtex_command default
87 \index_command default
91 \pdf_title "LyX's Additional Features manual"
92 \pdf_author "LyX Team"
93 \pdf_subject "LyX's additional features documentation"
94 \pdf_keywords "LyX, Documentation, Additional"
96 \pdf_bookmarksnumbered true
97 \pdf_bookmarksopen false
98 \pdf_bookmarksopenlevel 1
103 \pdf_pdfusetitle false
104 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false, pdfpagelabels"
114 \paperorientation portrait
123 \paragraph_separation indent
124 \paragraph_indentation default
125 \quotes_language english
128 \paperpagestyle headings
129 \tracking_changes false
130 \output_changes false
138 Additional LyX Features
146 \begin_layout Plain Layout
148 Principal maintainer of this file is
153 If you have comments or error corrections, please send them to the LyX
154 Documentation mailing list,
155 \begin_inset Flex Code
158 \begin_layout Plain Layout
160 <lyx-docs@lists.lyx.org>
173 \begin_layout Standard
174 \begin_inset CommandInset toc
175 LatexCommand tableofcontents
182 \begin_layout Chapter
186 \begin_layout Standard
187 This manual is essentially Part II of the
189 User's Guide\SpecialChar \@.
192 The reason for separating this document out is simple: the
196 is already quite lengthy, and it contains information on all of the basic
197 features one needs to know in order to prepare most documents.
198 However, the LyX Team has worked to make LyX extensible through various
199 configuration files and external packages.
200 That means that if you want to support the Fizzwizzle LaTeX package, you
201 can create a layout file (or module) for it without having to alter LyX
203 We've already had contributions of several new features this way, and some
204 of them are documented here.
205 There are also some more `advanced' features, such as how to control the
206 presentation of bibliographies and how to work with multi-part documents,
207 that are not covered in the
211 and are discussed here.
214 \begin_layout Standard
215 This manual also documents some special features, like fax support, version
216 control, and SGML support, which require additional software to work properly.
217 There is also a chapter on LyX's support for HTML.
218 And lastly, there's a chapter of LaTeX tools and tips, things you can use
219 to spruce up your documents by directly using the powerful features of
225 only WYSIWYM and will only ever interface to some, not all, LaTeX features.
228 \begin_layout Standard
229 If you haven't read the
233 yet, you are definitely in the wrong manual.
238 is the first place to go, since it describes the notation and format of
240 You should also be thoroughly familiar with the
244 and all of the basic features of LyX before attempting to read this one.
247 \begin_layout Standard
248 Since many of the topics in this manual depend heavily on LyX's interaction
249 with LaTeX, this first chapter covers the inner workings of LyX and how
250 to direct LyX to generate exactly the LaTeX code you want.
251 It is obviously for more seasoned LyX users.
254 \begin_layout Chapter
258 \begin_layout Section
262 \begin_layout Standard
263 This chapter is for both TeX-nicians and the LaTeX-curious.
264 In it, we'll explain how LyX and LaTeX work together to produce printable
266 This is the only place in any of the manuals where we assume you know something
270 \begin_layout Standard
271 At one time, LyX was called a
272 \begin_inset Quotes eld
275 WYSIWYM frontend to LaTeX,
276 \begin_inset Quotes erd
279 but that's no longer true.
280 There are frontends to LaTeX out there.
284 \begin_layout Plain Layout
285 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
286 There are also the LaTeX modes for vi and emacs, of course.
291 These are basically text editors with the ability to run LaTeX and mark
292 any errors in the file you're editing.
301 run LaTeX, and it also indicates errors in the file, it also does much,
303 For one thing, you don't need to know LaTeX to use LyX effectively.
304 And LyX has added its own extensions to LaTeX.
305 Try the following sometime: select
306 \begin_inset Flex MenuItem
309 \begin_layout Plain Layout
310 Export\SpecialChar \menuseparator
317 \begin_inset Flex MenuItem
320 \begin_layout Plain Layout
327 \begin_inset Flex MenuItem
330 \begin_layout Plain Layout
331 View\SpecialChar \menuseparator
337 ), then look at the preamble of the resulting
338 \begin_inset Flex Code
341 \begin_layout Plain Layout
348 You'll notice a variety of new macros defined specifically by LyX.
349 These macros are defined automatically, according to the features you use
353 \begin_layout Standard
354 There are several commands that automatically invoke LaTeX.
358 \begin_layout Itemize
359 \begin_inset Flex MenuItem
362 \begin_layout Plain Layout
363 View\SpecialChar \menuseparator
372 \begin_layout Itemize
373 \begin_inset Flex MenuItem
376 \begin_layout Plain Layout
377 View\SpecialChar \menuseparator
378 Update\SpecialChar \menuseparator
387 \begin_layout Itemize
388 \begin_inset Flex MenuItem
391 \begin_layout Plain Layout
392 File\SpecialChar \menuseparator
401 \begin_layout Itemize
402 \begin_inset Flex MenuItem
405 \begin_layout Plain Layout
406 File\SpecialChar \menuseparator
415 \begin_layout Standard
416 They will only invoke LaTeX if the file has changed since the last time
421 \begin_layout Standard
422 When LyX runs LaTeX on the file you're editing, it performs these steps:
425 \begin_layout Enumerate
426 Convert the document to LaTeX and save to a file with the extension
427 \begin_inset Flex Code
430 \begin_layout Plain Layout
437 \begin_inset Flex Code
440 \begin_layout Plain Layout
449 \begin_layout Enumerate
451 \begin_inset Flex Code
454 \begin_layout Plain Layout
460 file (maybe several times), and run any other commands (such as
461 \begin_inset Flex Code
464 \begin_layout Plain Layout
471 \begin_inset Flex Code
474 \begin_layout Plain Layout
480 ) needed to compile the LaTeX file.
483 \begin_layout Enumerate
484 If there are any errors, show the error log.
487 \begin_layout Standard
488 If you've run LaTeX using
489 \begin_inset Flex MenuItem
492 \begin_layout Plain Layout
495 \SpecialChar \menuseparator
503 , LyX then runs a DVI viewer to display the DVI-file.
505 \begin_inset Flex MenuItem
508 \begin_layout Plain Layout
511 \SpecialChar \menuseparator
519 , LyX performs further steps:
522 \begin_layout Itemize
524 \begin_inset Flex Code
527 \begin_layout Plain Layout
533 to convert the DVI file to PostScript.
536 \begin_layout Itemize
537 Run a PostScript viewer, such as
538 \begin_inset Flex Code
541 \begin_layout Plain Layout
547 , to display the PostScript file.
550 \begin_layout Standard
551 LyX does similar things when viewing, or exporting, other formats.
554 \begin_layout Section
555 Translating LaTeX files into LyX
558 \begin_layout Standard
559 You can import a LaTeX file into LyX by using the
560 \begin_inset Flex MenuItem
563 \begin_layout Plain Layout
564 File\SpecialChar \menuseparator
565 Import\SpecialChar \menuseparator
572 This will call a program named
573 \begin_inset Flex Code
576 \begin_layout Plain Layout
582 which will create a file
583 \begin_inset Flex Code
586 \begin_layout Plain Layout
593 \begin_inset Flex Code
596 \begin_layout Plain Layout
603 LyX will then open that file.
607 \begin_layout Plain Layout
608 \begin_inset Flex Code
611 \begin_layout Plain Layout
617 can also be run from the command line, of course.
625 \begin_layout Standard
626 \begin_inset Flex Code
629 \begin_layout Plain Layout
635 will translate most legal LaTeX, but not everything.
636 It will put things it doesn't understand into TeX code, so after translating
638 \begin_inset Flex Code
641 \begin_layout Plain Layout
647 , you can look for TeX code and hand-edit it until it looks right.
650 \begin_layout Standard
651 If you don't know what TeX code is, read the next section.
654 \begin_layout Section
655 \begin_inset CommandInset label
657 name "sec:Inserting-TeX-Code"
661 Inserting TeX Code into LyX Documents
664 \begin_layout Standard
665 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
666 You can always insert TeX code into any LyX document.
667 LyX cannot, and will never be able to, display every possible LaTeX construct.
668 If ever you need to insert LaTeX commands into your LyX document, you can
670 \begin_inset Flex Code
673 \begin_layout Plain Layout
679 box, which you can insert into your document with
680 \begin_inset Flex MenuItem
683 \begin_layout Plain Layout
684 Insert\SpecialChar \menuseparator
693 \begin_layout Standard
694 Here's an example of inserting LaTeX commands in a LyX document.
695 The code looks like this:
698 \begin_layout LyX-Code
702 \begin_inset Newline newline
708 \begin_inset Newline newline
711 This is an example for a minipage environment.
713 \begin_inset Newline newline
716 can put nearly everything in it, even (non-floating)
717 \begin_inset Newline newline
722 \begin_inset Newline newline
728 \begin_inset Newline newline
732 \begin_inset Newline newline
738 \begin_inset Newline newline
744 \begin_inset Newline newline
750 \begin_inset Newline newline
755 \begin_inset Newline newline
761 \begin_inset Newline newline
767 \begin_inset Newline newline
773 \begin_inset Newline newline
781 \begin_layout LyX-Code
785 \begin_layout Standard
787 \begin_inset Flex Code
790 \begin_layout Plain Layout
796 box containing this text is directly after this paragraph.
797 Those of you reading the manual in LyX will only see the TeX code inset.
798 Those reading a printed version of the manuals will see the actual results:
801 \begin_layout Standard
805 \begin_layout Plain Layout
812 \begin_layout Plain Layout
819 \begin_layout Plain Layout
821 This is an example for a minipage environment.
822 You can put nearly everything in it, even (non-floating) figures and tables.
826 \begin_layout Plain Layout
833 \begin_layout Plain Layout
838 \begin_layout Plain Layout
845 \begin_layout Plain Layout
852 \begin_layout Plain Layout
859 \begin_layout Plain Layout
865 \begin_layout Plain Layout
872 \begin_layout Plain Layout
879 \begin_layout Plain Layout
886 \begin_layout Plain Layout
898 \begin_layout Standard
899 In addition to using TeX code, you can also create a separate file containing
900 some complex LaTeX structure and then use
901 \begin_inset Flex MenuItem
904 \begin_layout Plain Layout
905 Insert\SpecialChar \menuseparator
915 to include your file (you should select the type
916 \begin_inset Flex Code
919 \begin_layout Plain Layout
926 We recommend that you only do this if you have a
927 \begin_inset Flex Code
930 \begin_layout Plain Layout
941 Otherwise, you'll have a big job tracking down LaTeX errors.
944 \begin_layout Standard
945 There are a few last points to emphasize:
948 \begin_layout Itemize
953 check if your LaTeX code is correct.
956 \begin_layout Itemize
957 Beware reinventing the wheel.
960 \begin_layout Standard
961 On that last point, LyX does have quite a few features tucked into it, and
963 Be sure to check the manuals to make sure that LyX doesn't have such-and-such
964 feature before you decide you have to do it by hand.
965 Moreover, there are numerous LaTeX packages out there to do all sorts of
966 things, from labels to envelopes to fancy multipage tables.
968 \begin_inset CommandInset href
971 target "http://www.ctan.org/"
975 for details, and see chapter
976 \begin_inset CommandInset ref
978 reference "cha:secrets"
985 \begin_layout Standard
986 If you do need to do some wild and fancy things within your document, be
987 sure to check out a good LaTeX book for assistance.
988 There are a number of them listed in the bibliography of the
995 \begin_layout Section
996 LyX and the LaTeX Preamble
999 \begin_layout Subsection
1000 About the LaTeX Preamble
1003 \begin_layout Standard
1004 If you already know LaTeX, there is no need to explain here what the preamble
1006 If you don't, the following will give you some ideas—we recommend again
1007 that you consult a LaTeX book for further information.
1008 In any case, you should read the points below, because they explain what
1009 you can do and what you don't need to do in the LaTeX preamble of a LyX
1013 \begin_layout Standard
1014 The LaTeX preamble comes at the very beginning of a document,
1022 \begin_layout Itemize
1023 Declare the document class.
1025 \begin_inset Newline newline
1028 LyX already does this for you.
1029 If you're a seasoned LaTeX-nician, and you have a custom document class
1030 you want to use, check out the
1032 Customization Manual
1034 for information on how to make LyX interface to it.
1037 \begin_layout Itemize
1038 Declare the usage of packages.
1040 \begin_inset Newline newline
1043 LaTeX packages provide special commands, which are only available within
1044 a document when the package has been declared in the preamble.
1045 For example, the package
1046 \begin_inset Flex Code
1049 \begin_layout Plain Layout
1055 forces all paragraphs to be indented.
1056 There are other packages for labels, envelopes, margins, etc.
1060 \begin_layout Itemize
1061 Set counters, variables, lengths and widths.
1063 \begin_inset Newline newline
1066 There are several LaTeX counters and variables which
1070 be set globally from within the preamble in order to have the desired effect.
1071 (There are variables which you can set and reset inside the document, too.)
1072 Margins are a good example of something which must be set in the preamble.
1073 Another example is the label format for lists.
1074 You can actually set these just about anywhere, but it's best to do it
1075 just once, inside the preamble.
1078 \begin_layout Itemize
1079 Declare user defined commands (with
1080 \begin_inset Flex Code
1083 \begin_layout Plain Layout
1092 \begin_inset Flex Code
1095 \begin_layout Plain Layout
1104 \begin_inset Newline newline
1107 These are abbreviations for LaTeX commands which appear very often inside
1109 Although the preamble is a good place to declare such commands, they
1113 be declared anywhere (before they are used for the first time, of course).
1114 This can be useful if there is a lot of raw LaTeX code in your document,
1115 which normally should not be the case.
1118 \begin_layout Standard
1119 LyX adds its own set of definitions to the preamble of the
1120 \begin_inset Flex Code
1123 \begin_layout Plain Layout
1130 This makes LaTeX files generated by LyX portable.
1133 \begin_layout Subsection
1134 Changing the Preamble
1137 \begin_layout Standard
1138 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1139 can't change them without patching LyX itself.
1140 You can, however, add your own stuff to the preamble by selecting
1141 \begin_inset Flex MenuItem
1144 \begin_layout Plain Layout
1146 \begin_inset space ~
1155 \begin_inset Flex MenuItem
1158 \begin_layout Plain Layout
1159 Document\SpecialChar \menuseparator
1166 LyX adds anything in the
1167 \begin_inset Flex MenuItem
1170 \begin_layout Plain Layout
1176 dialog to its own built-in preamble.
1177 Before adding your own declarations in the preamble, you should make sure
1178 that LyX doesn't already support what you want to do.
1179 (Remember what we said about reinventing the wheel?) Also,
1181 make sure your preamble code is correct
1184 LyX doesn't check it for you.
1185 If there is an error, you're likely to get an error like
1186 \begin_inset Quotes eld
1190 \begin_inset Flex Code
1193 \begin_layout Plain Layout
1202 \begin_inset Quotes erd
1206 If you see this error, check your preamble.
1209 \begin_layout Subsection
1213 \begin_layout Standard
1214 Here are some examples of what you can add to a preamble, and what they
1218 \begin_layout Subsubsection
1222 \begin_layout Standard
1223 There are two variables under LaTeX that control page position:
1224 \begin_inset Flex Code
1227 \begin_layout Plain Layout
1236 \begin_inset Flex Code
1239 \begin_layout Plain Layout
1248 Their names should be self-explanatory.
1249 These variables are useful if you think for a moment about computer labels.
1250 Sometimes, the size of a print medium and the area of the medium that you
1251 can actually print on aren't the same.
1253 \begin_inset Flex Code
1256 \begin_layout Plain Layout
1265 \begin_inset Flex Code
1268 \begin_layout Plain Layout
1279 \begin_layout Standard
1280 The default values for
1281 \begin_inset Flex Code
1284 \begin_layout Plain Layout
1293 \begin_inset Flex Code
1296 \begin_layout Plain Layout
1305 \begin_inset space \thinspace{}
1309 \begin_inset space \thinspace{}
1313 \begin_inset space \space{}
1316 the page isn't shifted.
1317 Unfortunately, some DVI drivers always seem to shift the page.
1318 We have no idea why, or why the sysadmin hasn't fixed such behavior.
1319 If you're using LyX on a system that you don't personally maintain, and
1320 your sysadmin is a doofus,
1321 \begin_inset Flex Code
1324 \begin_layout Plain Layout
1333 \begin_inset Flex Code
1336 \begin_layout Plain Layout
1345 Suppose your left and top margins are always 0.5
1346 \begin_inset space \thinspace{}
1350 You can add this to the preamble:
1353 \begin_layout LyX-Code
1361 \begin_layout LyX-Code
1369 \begin_layout Standard
1370 and your margins should now be correct.
1373 \begin_layout Subsubsection
1377 \begin_layout Standard
1378 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1379 There's a rather nice package, available at your nearest CTAN archive,
1380 for printing sheets of labels:
1381 \begin_inset Flex Code
1384 \begin_layout Plain Layout
1391 Now, your system may not have this package installed by default.
1392 We leave that up to you to check.
1393 You'll also want to read the documentation for it; we're not going to do
1395 Since this is an example, however, we'll give you an example of how you
1399 \begin_layout Standard
1400 First, make sure you're using the
1401 \begin_inset Flex Code
1404 \begin_layout Plain Layout
1411 Next, you need to put the following in your preamble:
1414 \begin_layout LyX-Code
1420 \begin_layout LyX-Code
1426 \begin_layout LyX-Code
1432 \begin_layout LyX-Code
1438 \begin_layout LyX-Code
1444 \begin_layout LyX-Code
1450 \begin_layout LyX-Code
1456 \begin_layout Standard
1457 This sets things up for Avery label sheets, stock #5360.
1458 You're now ready to print labels, but you'll need to insert LaTeX code,
1459 placing the commands
1460 \begin_inset Flex Code
1463 \begin_layout Plain Layout
1472 \begin_inset Flex Code
1475 \begin_layout Plain Layout
1483 around each label text.
1484 This and other special features of
1485 \begin_inset Flex Code
1488 \begin_layout Plain Layout
1494 are explained in its documentation.
1497 \begin_layout Standard
1498 Someday, someone may write a LyX layout file to support this package directly.
1499 Maybe that someone is you.
1502 \begin_layout Subsubsection
1503 Example #3: Paragraph Indentation
1506 \begin_layout Standard
1507 Americans are trained to indent the first line of
1512 As with all of their other weird quirks, most Americans will whine and
1513 moan until they can have their way and indent the first line of all paragraphs.
1522 \begin_layout Standard
1523 Of course, this behavior isn't standard typography.
1524 In books, you typically only indent the first line of a paragraph
1528 it follows another one.
1529 The idea behind indenting the first line of a paragraph is to distinguish
1530 neighboring paragraphs from one another.
1531 If there is no previous paragraph—for example, if it follows a figure or
1532 is the first paragraph in a section—then there is no need for indentation.
1536 \begin_layout Standard
1537 If you're a typical American (we're still joking!), though, you don't care
1538 about such esoteric things; you want your indentation! Add this to the
1542 \begin_layout LyX-Code
1545 usepackage{indentfirst}
1548 \begin_layout Standard
1549 If your TeX distribution isn't braindead, you'll have this package, and
1550 all of your paragraphs will get the indentation the Founding Fathers intended
1554 \begin_layout Subsubsection
1555 Example #4: This Document
1558 \begin_layout Standard
1559 You can also check out the preamble of this document to get an idea of some
1560 of the advanced things you can do.
1561 Also, there are more examples and an assortment of LaTeX
1562 \begin_inset Quotes eld
1566 \begin_inset Quotes erd
1570 \begin_inset space ~
1574 \begin_inset CommandInset ref
1576 reference "cha:secrets"
1584 \begin_layout Section
1585 LyX and LaTeX Errors
1588 \begin_layout Standard
1589 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1591 It then uses the logfile from the LaTeX run to do a post-mortem.
1592 After analyzing the logfile,LyX displays a dialog listing the errors.
1593 Clicking on any one of them will take you to the position in your LyX file
1594 where the error occurred.
1598 \begin_layout Plain Layout
1600 Analyzing the logfile is a tough job, and LyX doesn't always go to the
1602 There are also cases where LaTeX reports the error on one line, but the
1603 actual error is earlier.
1604 This is not unlike forgetting a closing brace in a program: You'll get
1605 an error, but only later.
1613 \begin_layout Standard
1614 Some folks also like to look at the log file directly: It is available from
1616 \begin_inset Flex MenuItem
1619 \begin_layout Plain Layout
1622 \SpecialChar \menuseparator
1626 \begin_inset space ~
1635 There are some fairly common error messages and warnings.
1636 We'll cover those here.
1637 You should look at a good LaTeX book for a complete listing.
1640 \begin_layout Itemize
1641 \begin_inset Flex Code
1644 \begin_layout Plain Layout
1651 \begin_inset Newline newline
1654 Anything beginning with these words is a warning message for the purpose
1656 \begin_inset Quotes eld
1660 \begin_inset Quotes erd
1663 the LaTeX code itself.
1664 You'll get messages like this if you added or changed cross-references
1665 or bibliography entries, in which case, LaTeX is trying to tell you that
1666 you need to make another run.
1667 You can by-and-large ignore these.
1670 \begin_layout Itemize
1671 \begin_inset Flex Code
1674 \begin_layout Plain Layout
1681 \begin_inset Newline newline
1684 Another warning message, this time about fonts which LaTeX couldn't find.
1685 The rest of the message will often say something about a replacement font
1687 You can safely ignore these, too.
1690 \begin_layout Itemize
1691 \begin_inset Flex Code
1694 \begin_layout Plain Layout
1703 \begin_inset Newline newline
1711 They are warnings about lines that were too long and run past the right
1713 Almost always, this is unnoticeable in the final output.
1714 (It can be just a point or two.) Or, only one or two characters extend past
1716 LaTeX seems to generate at least one of these messages for just about any
1718 \begin_inset Newline newline
1721 You can ignore these messages.
1722 Your eyes will tell you if there's a problem with something that's too
1723 wide; just look at the output.
1727 \begin_layout Plain Layout
1728 You can also enable the `draft' option in
1729 \begin_inset Flex MenuItem
1732 \begin_layout Plain Layout
1735 \SpecialChar \menuseparator
1743 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1751 \begin_layout Itemize
1752 \begin_inset Flex Code
1755 \begin_layout Plain Layout
1764 \begin_inset Newline newline
1767 Not quite as common as its cousin.
1768 LaTeX seems to like to print lines that are a bit too wide as opposed to
1769 ones that are a bit too narrow.
1770 We have no idea why.
1773 \begin_layout Itemize
1774 \begin_inset Flex Code
1777 \begin_layout Plain Layout
1786 \begin_inset Flex Code
1789 \begin_layout Plain Layout
1798 \begin_inset Newline newline
1801 Warnings about troubles breaking the page.
1802 Once again, just look at the output.
1803 Your eyes will tell you where something has gone wrong.
1806 \begin_layout Itemize
1807 \begin_inset Flex Code
1810 \begin_layout Plain Layout
1812 \begin_inset Quotes els
1816 \begin_inset Quotes ers
1825 \begin_inset Newline newline
1829 \begin_inset Quotes eld
1833 \begin_inset Quotes erd
1836 isn't installed on this system.
1837 This usually appears because some package your document needs isn't installed.
1838 If you didn't touch the preamble or didn't use the
1839 \begin_inset Flex Code
1842 \begin_layout Plain Layout
1850 command, then one of the packages LyX tried to load is missing.
1852 \begin_inset Flex MenuItem
1855 \begin_layout Plain Layout
1856 Help\SpecialChar \menuseparator
1862 to get a list of packages that LyX knows about.
1863 This file is updated whenever you reconfigure LyX (using
1864 \begin_inset Flex MenuItem
1867 \begin_layout Plain Layout
1868 Tools\SpecialChar \menuseparator
1874 ) and tells you which packages have been detected and what they do.
1875 \begin_inset Newline newline
1879 \begin_inset Flex Code
1882 \begin_layout Plain Layout
1890 command and the package in question isn't installed, then you'll need to
1891 install it yourself.
1894 \begin_layout Itemize
1895 \begin_inset Flex Code
1898 \begin_layout Plain Layout
1899 LaTeX Error: Unknown option
1905 \begin_inset Newline newline
1908 Error messages beginning with this are trying to tell you that you specified
1909 a bad or undefined option to a package.
1910 Check the package's documentation.
1913 \begin_layout Itemize
1914 \begin_inset Flex Code
1917 \begin_layout Plain Layout
1918 Undefined control sequence
1924 \begin_inset Newline newline
1927 If you've inserted LaTeX code into your document, but made a typo, you'll
1929 You may have forgotten to load a package.
1930 In any case, this error message usually means that you used an undefined
1935 \begin_layout Standard
1936 There are other error and warning messages.
1937 Some are self-explanatory.
1938 These are usually LaTeX messages.
1939 Others are downright cryptic.
1940 These are usually TeX error messages, and we really have
1944 what they mean or how to decipher them.
1948 \begin_layout Standard
1949 There's a general sequence you should follow if you get error messages:
1952 \begin_layout Enumerate
1953 Look at the LaTeX code you inserted for typos.
1956 \begin_layout Enumerate
1957 If there are no typos, check that you used the command(s) correctly.
1960 \begin_layout Enumerate
1961 If you get a bunch of error boxes piled up at the very top of the document—and
1962 especially if you see a
1963 \begin_inset Quotes eld
1967 \begin_inset Flex Code
1970 \begin_layout Plain Layout
1979 \begin_inset Quotes erd
1982 error—it means that there are errors in the preamble.
1983 Start debugging your preamble.
1986 \begin_layout Enumerate
1987 If you didn't add anything to the preamble and didn't add any LaTeX code
1988 to the document, the first suspect is your LaTeX distribution itself.
1989 Check for missing packages and install them.
1992 \begin_layout Enumerate
1993 Okay, so there are no missing packages.
1994 Did you use any of the fine-tuning options in LyX? Specifically, did you
1999 any of them, like trying to manually insert lots of
2000 \begin_inset Flex Code
2003 \begin_layout Plain Layout
2005 \begin_inset space ~
2014 \begin_inset Flex Code
2017 \begin_layout Plain Layout
2024 \begin_inset Flex Code
2027 \begin_layout Plain Layout
2033 ? Did you try to kludge something together with these instead of using the
2034 appropriate paragraph environment?
2037 \begin_layout Enumerate
2038 All right, you didn't use any of the fine-tuning options, you played by
2040 Did you try to pull a fancy maneuver? Did you do something funky inside
2041 a table or an equation, like inserting a graphic into a table cell?
2044 \begin_layout Enumerate
2045 Do you have long sections of text where LaTeX cannot find a place to break
2046 a line? By default, LaTeX is rather strict about how much extra inter-word
2047 spacing it will add in order to break a line.
2048 Preferably, you should rework the paragraph to avoid the problem.
2049 If this isn't an option, you can wrap your text in
2050 \begin_inset Flex Code
2053 \begin_layout Plain Layout
2061 to make LaTeX's line breaking more, well, sloppy.
2064 \begin_layout Enumerate
2065 Did you go overboard with the nesting? LyX (currently) doesn't check to
2066 make sure you're in the limits for nesting environments.
2067 If you nested a bunch of environments to the
2068 \begin_inset Formula $17^{\mathrm{th}}$
2071 level, that's the problem.
2072 (The limit in LaTeX is five.)
2075 \begin_layout Enumerate
2076 Okay, you didn't get any error messages, but your output looks awful.
2077 If you have a table or figure that's too wide or long for the page, you
2082 \begin_layout Enumerate
2083 rescale the figure so it fits.
2086 \begin_layout Enumerate
2087 trim down the table so it fits.
2091 \begin_layout Enumerate
2092 If something else is wrong with the output, and you didn't try to pull anything
2093 fancy or kludge the fine-tuning options, we're not sure what's wrong.
2096 \begin_layout Standard
2097 If all this doesn't help—well, then
2101 you might have found a bug in LyX\SpecialChar \ldots{}
2105 \begin_layout Chapter
2109 \begin_layout Section
2110 Customizing Bibliographies with BibTeX
2113 \begin_layout Standard
2114 The most basic information about how to use BibTeX with LyX is contained
2117 Bibliography databases (BibTeX)
2124 The following subsections explain special bibliography features supported
2128 \begin_layout Subsection
2129 Alternative Citation Styles
2132 \begin_layout Standard
2133 Standard BibTeX uses numbers (e.
2134 \begin_inset space \thinspace{}
2138 \begin_inset space \space{}
2142 \begin_inset Quotes eld
2146 \begin_inset Quotes erd
2149 ) to refer to a cited work.
2150 However, in many scientific disciplines, other citation styles are in use.
2151 The most common one is the author-year style (e.
2152 \begin_inset space \thinspace{}
2156 \begin_inset space \space{}
2160 \begin_inset Quotes eld
2164 \begin_inset Quotes erd
2168 LyX supports two packages that provide this style,
2169 \begin_inset Flex Code
2172 \begin_layout Plain Layout
2179 \begin_inset Flex Code
2182 \begin_layout Plain Layout
2189 Both packages have their pros and cons, which cannot be listed in detail.
2190 If you only want to have simple author-year (or author-numerical) style,
2191 or if you want to use one of the countless style files for
2192 \begin_inset Flex Code
2195 \begin_layout Plain Layout
2201 , than the established
2202 \begin_inset Flex Code
2205 \begin_layout Plain Layout
2211 package is probably your choice.
2212 If you need special features like short title references, ibidem etc., you
2214 \begin_inset Flex Code
2217 \begin_layout Plain Layout
2226 \begin_layout Standard
2227 The handling of both packages in LyX is basically the same.
2229 \begin_inset Flex MenuItem
2232 \begin_layout Plain Layout
2233 Document\SpecialChar \menuseparator
2240 \begin_inset Flex MenuItem
2243 \begin_layout Plain Layout
2250 \begin_inset Flex MenuItem
2253 \begin_layout Plain Layout
2260 \begin_inset Flex MenuItem
2263 \begin_layout Plain Layout
2270 With both packages, you will get some extra features in the citation dialog
2271 and you can select the style of the reference (
2272 \begin_inset Quotes eld
2276 \begin_inset Quotes erd
2280 \begin_inset Quotes eld
2284 \begin_inset Quotes erd
2288 \begin_inset Quotes eld
2292 \begin_inset Quotes erd
2296 \begin_inset Quotes eld
2300 \begin_inset Quotes erd
2304 Note that both packages need specifically designed style files.
2305 They both ship their own, but there are lots of additional style files,
2306 and there is even an interactive style file builder
2310 \begin_layout Plain Layout
2312 \begin_inset Flex URL
2315 \begin_layout Plain Layout
2317 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2328 \begin_inset Flex Code
2331 \begin_layout Plain Layout
2340 \begin_layout Subsection
2341 Sectioned Bibliographies
2344 \begin_layout Standard
2345 Sometimes you might need to divide your bibliography into several sections.
2346 If you are for instance a historian, the possibility to separate sources
2347 and scientific works is most likely a
2348 \begin_inset Quotes eld
2352 \begin_inset Quotes erd
2356 Unfortunately, BibTeX itself does not allow you to do this.
2357 But with the help of some LaTeX packages, BibTeX can be extended to fit
2361 \begin_layout Standard
2362 LyX provides native support for one of these packages,
2370 \begin_layout Plain Layout
2372 \begin_inset Flex URL
2375 \begin_layout Plain Layout
2377 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2387 The advantage of this package (compared to other packages like
2391 ) is that you don't need to define new citation commands.
2392 Instead, you need to prepare different bibliographic databases which include
2393 the entries for the different sections of the bibliography.
2394 For example: If you want to divide your bibliography into the sections
2396 \begin_inset Quotes eld
2400 \begin_inset Quotes erd
2404 \begin_inset Quotes eld
2408 \begin_inset Quotes erd
2411 , you first need to create two bibliographic databases, e.
2412 \begin_inset space \thinspace{}
2416 \begin_inset space \space{}
2420 \begin_inset Flex Code
2423 \begin_layout Plain Layout
2430 \begin_inset Flex Code
2433 \begin_layout Plain Layout
2443 \begin_layout Standard
2445 \begin_inset Flex MenuItem
2448 \begin_layout Plain Layout
2449 Document\SpecialChar \menuseparator
2456 \begin_inset Flex MenuItem
2459 \begin_layout Plain Layout
2466 \begin_inset Flex MenuItem
2469 \begin_layout Plain Layout
2470 Sectioned bibliography
2476 Now you can insert multiple BibTeX bibliographies, one for each section
2477 of your bibliography.
2478 Returning to our example: Insert the BibTeX bibliography
2479 \begin_inset Flex Code
2482 \begin_layout Plain Layout
2488 and a second one for the database
2489 \begin_inset Flex Code
2492 \begin_layout Plain Layout
2499 You are free to use the same or different styles for each section.
2500 Additionally, you can chose if the bibliography section should contain
2502 \begin_inset Quotes eld
2505 all cited references
2506 \begin_inset Quotes erd
2509 of the specified database(s) (which is the default),
2510 \begin_inset Quotes eld
2513 all uncited references
2514 \begin_inset Quotes erd
2518 \begin_inset Quotes eld
2522 \begin_inset Quotes erd
2526 This might be useful if you would like to separate your bibliography into
2528 \begin_inset Quotes eld
2532 \begin_inset Quotes erd
2536 \begin_inset Quotes eld
2540 \begin_inset Quotes erd
2544 \begin_inset Quotes eld
2548 \begin_inset Quotes erd
2552 The titles for the sections can be added as ordinary sections or subsections.
2554 \begin_inset Flex Code
2557 \begin_layout Plain Layout
2563 removes the bibliography title, you have manually re-add that, too (as
2564 a chapter* or section*, for instance).
2567 \begin_layout Subsection
2568 Multiple Bibliographies
2571 \begin_layout Standard
2572 Multiple bibliographies, e.
2573 \begin_inset space \thinspace{}
2577 \begin_inset space \space{}
2580 a bibliography for each section or chapter of the document, are not supported
2583 \begin_inset Flex Code
2586 \begin_layout Plain Layout
2592 package, which is used for the creation of sectioned bibliographies in
2593 LyX (see the previous section), provides an easy way to solve this task,
2594 if you are willing to use some
2595 \begin_inset Flex MenuItem
2598 \begin_layout Plain Layout
2605 \begin_inset space ~
2609 \begin_inset CommandInset ref
2611 reference "sec:Inserting-TeX-Code"
2619 \begin_layout Plain Layout
2620 An alternative approach is to use the
2621 \begin_inset Flex Code
2624 \begin_layout Plain Layout
2631 \begin_inset Flex Code
2634 \begin_layout Plain Layout
2640 package, respectively.
2648 \begin_layout Standard
2650 \begin_inset Flex MenuItem
2653 \begin_layout Plain Layout
2654 Document\SpecialChar \menuseparator
2661 \begin_inset Flex MenuItem
2664 \begin_layout Plain Layout
2671 \begin_inset Flex MenuItem
2674 \begin_layout Plain Layout
2675 Sectioned bibliography
2681 In the document, you have to enclose the sections, which shall contain
2682 their own bibliography (including the BibTeX bibliography itself), between
2684 \begin_inset Flex Code
2687 \begin_layout Plain Layout
2696 \begin_inset Flex Code
2699 \begin_layout Plain Layout
2707 (those commands have to be inserted as TeX code).
2708 The bibliography will contain all references which have been cited in the
2710 \begin_inset Flex Code
2713 \begin_layout Plain Layout
2724 If you are using this approach, then every citation reference has to be
2726 \begin_inset Flex Code
2729 \begin_layout Plain Layout
2737 \begin_inset Flex Code
2740 \begin_layout Plain Layout
2749 \begin_layout Section
2753 \begin_layout Subsection
2757 \begin_layout Standard
2758 When you are working on a large file with many sections, it is often convenient
2759 to break up the document into several files, or perhaps you have something
2760 where a table may change from time to time, but the preceding text does
2762 In these cases, you should seriously consider using multipart documents.
2763 For example, scientific papers often have five major sections: the introduction
2764 , observations, results, discussion, and conclusion.
2765 Each of these could be its own separate LyX file, with one
2766 \begin_inset Quotes eld
2770 \begin_inset Quotes erd
2773 file which contains the title, authors, abstract, references, etc., plus
2774 the five included files.
2775 It is important to note that each of these files is a full LyX file which
2776 can be formatted and printed on its own, as well as included in a master
2778 Each of these files must have the same document class, however—don't attempt
2779 to mix book classes with article classes.
2780 You may also include LaTeX files; however, these files must not have their
2782 \begin_inset space \thinspace{}
2786 \begin_inset space \space{}
2789 everything up to and including the
2790 \begin_inset Flex Code
2793 \begin_layout Plain Layout
2802 \begin_inset Flex Code
2805 \begin_layout Plain Layout
2813 line must be deleted) or else errors will be generated when you try to
2817 \begin_layout Standard
2818 LyX allows you to include files quite easily with
2819 \begin_inset Flex MenuItem
2822 \begin_layout Plain Layout
2823 Insert\SpecialChar \menuseparator
2825 \begin_inset space ~
2834 When you click on this selection a small box is inserted into the file
2835 at the current cursor location.
2836 Clicking on the box raises a dialog which allows you to select the file
2837 to be included, and the method of its inclusion.
2841 \begin_layout Standard
2842 The file selection box should by now be obvious.
2843 The three inclusion methods are
2844 \begin_inset Quotes eld
2848 \begin_inset Quotes erd
2852 \begin_inset Quotes eld
2856 \begin_inset Quotes erd
2860 \begin_inset Quotes eld
2864 \begin_inset Quotes erd
2868 The difference between
2869 \begin_inset Quotes eld
2873 \begin_inset Quotes erd
2877 \begin_inset Quotes eld
2881 \begin_inset Quotes erd
2884 is really only meaningful to LaTeXperts, but the practical difference is
2885 that files which are
2886 \begin_inset Quotes eld
2890 \begin_inset Quotes erd
2893 are typeset beginning on a new page, while files which are
2894 \begin_inset Quotes eld
2898 \begin_inset Quotes erd
2901 are typeset starting on the current page.
2904 \begin_layout Standard
2905 Generally, the master file is converted into a full LaTeX file before typesettin
2906 g, while the included files are converted to LaTeX files which do not have
2907 all the preamble information.
2910 \begin_layout Standard
2912 \begin_inset Quotes eld
2916 \begin_inset Quotes erd
2919 included file allows you to include a file typeset exactly as it appears
2921 \begin_inset space \thinspace{}
2925 \begin_inset space \space{}
2929 \begin_inset Flex Code
2932 \begin_layout Plain Layout
2938 mode, with the characters set in a fixed-width typewriter font.
2939 Normally, spaces in this file are invisible, though two consecutive spaces
2940 are conserved, unlike LyX's normal treatment of spaces.
2941 However, setting the
2942 \begin_inset Flex MenuItem
2945 \begin_layout Plain Layout
2947 \begin_inset space ~
2951 \begin_inset space ~
2955 \begin_inset space ~
2963 checkbox typesets a mark to unambiguously define the presence of a space.
2967 \begin_layout Subsection
2968 Cross-References Between Files
2971 \begin_layout Standard
2972 \begin_inset Box Shadowbox
2982 height_special "totalheight"
2985 \begin_layout Plain Layout
2986 This section is somewhat out of date.
2987 Need to describe default master documents and how children are opened when
2997 \begin_layout Standard
2998 It is possible to set up cross-references between the different files.
2999 First, open all the files in question: let's call them A and B in a two
3000 file example, where B is included in A.
3001 Let's say you insert a label in A, then want to reference it in B.
3002 Open the cross-reference dialog in whilst in document B, and you can select
3004 \begin_inset Quotes eld
3008 \begin_inset Quotes erd
3014 \begin_layout Subsection
3015 Bibliography Lists in all Subdocuments
3018 \begin_layout Standard
3019 \begin_inset Box Frameless
3029 height_special "totalheight"
3032 \begin_layout Plain Layout
3033 This section also needs updating.
3034 There is now material about this on the wiki, and it could be copied here.
3042 \begin_layout Standard
3043 Copy the bibliography list with all entries to all subdocuments and transform
3045 This way LyX will find the
3046 \begin_inset Flex Code
3049 \begin_layout Plain Layout
3055 -files and you can easily insert references without making the bibliography
3059 \begin_layout Standard
3060 As the bibliography list is in a comment, LaTeX won't use use it and the
3061 references will look like this: [?], instead of like this: [1].
3062 One solution is to use the LaTeX-package
3063 \begin_inset Flex Code
3066 \begin_layout Plain Layout
3072 that will only include comments by processing the files separately.
3073 To do this, add in the LaTeX preamble of every subdocument the following:
3076 \begin_layout LyX-Code
3082 \begin_layout LyX-Code
3085 includecomment{comment}
3088 \begin_layout Standard
3090 \begin_inset Flex URL
3093 \begin_layout Plain Layout
3095 http://wiki.lyx.org/FAQ/Unsorted#toc31
3103 \begin_layout Section
3104 Fancy Headers and Footers
3107 \begin_layout Standard
3108 The default page layout is rather plain; for an
3109 \begin_inset Flex Code
3112 \begin_layout Plain Layout
3118 document class, all you get is a centered page number at the bottom of
3120 This document uses KOMA-script's book class, so it appears to be a bit
3122 But to really put on a show, you need to set the document page style to
3124 \begin_inset Quotes eld
3128 \begin_inset Quotes erd
3131 , as mentioned in the
3136 This section describes the LaTeX code you need to insert in your LaTeX
3137 preamble in order to get the desired effects.
3140 \begin_layout Standard
3141 For more information on fancy headers, see the
3142 \begin_inset Flex Code
3145 \begin_layout Plain Layout
3151 package documentation.
3153 \begin_inset Flex URL
3156 \begin_layout Plain Layout
3158 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3166 \begin_layout Standard
3167 The page header is divided into three fields, not surprisingly labeled
3168 \begin_inset Quotes eld
3172 \begin_inset Quotes erd
3176 \begin_inset Quotes eld
3180 \begin_inset Quotes erd
3184 \begin_inset Quotes eld
3188 \begin_inset Quotes erd
3192 The footer is also divided into these three fields.
3193 The LaTeX commands to set these fields in the simplest manner are
3194 \begin_inset Flex Code
3197 \begin_layout Plain Layout
3206 \begin_inset Flex Code
3209 \begin_layout Plain Layout
3218 \begin_inset Flex Code
3221 \begin_layout Plain Layout
3230 \begin_inset Flex Code
3233 \begin_layout Plain Layout
3242 Suppose you wish to put your name in the upper left hand corner of each
3244 Simply insert the following command in the preamble:
3247 \begin_layout Standard
3256 \begin_layout Standard
3257 You will now see your name in the upper left.
3258 If a field has a default entry that you would like to get rid of (often
3259 the page number appears in the central footer, simply include a command
3260 with a blank argument, e.
3261 \begin_inset space \thinspace{}
3267 \begin_layout Standard
3275 \begin_layout Standard
3276 Let's get really fancy: lets put the section number with the word
3277 \begin_inset Quotes eld
3281 \begin_inset Quotes erd
3285 \begin_inset space \thinspace{}
3289 \begin_inset space \space{}
3292 Section 3) in the upper left, the page number (e.
3293 \begin_inset space \thinspace{}
3297 \begin_inset space \space{}
3300 Page 4) in the upper right, your name in the lower left, and the date in
3302 The following commands should now appear in the preamble:
3305 \begin_layout Standard
3315 \begin_layout Standard
3323 \begin_layout Standard
3333 \begin_layout Standard
3342 \begin_layout Standard
3350 \begin_layout Standard
3360 \begin_layout Standard
3362 \begin_inset Flex Code
3365 \begin_layout Plain Layout
3374 \begin_inset Flex Code
3377 \begin_layout Plain Layout
3385 access LaTeX's section and page counters, and so print out the current
3386 section and page numbers.
3388 \begin_inset Flex Code
3391 \begin_layout Plain Layout
3399 simply prints out today's date.
3402 \begin_layout Standard
3403 The thicknesses of the horizontal rules drawn beneath the header and above
3404 the footer can also be modified.
3405 If you don't want one of the rules, set its thickness to 0.
3406 The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3412 \begin_inset Flex Code
3415 \begin_layout Plain Layout
3420 headrulewidth}{0.4pt}
3426 \begin_inset Flex Code
3429 \begin_layout Plain Layout
3434 footrulewidth}{0.4pt}
3439 to set the thicknesses.
3442 \begin_layout Standard
3443 You can switch the header/footer settings on and off for individual pages
3445 \begin_inset Flex Code
3448 \begin_layout Plain Layout
3451 thispagestyle{empty}
3457 \begin_inset Flex Code
3460 \begin_layout Plain Layout
3463 thispagestyle{plain}
3469 \begin_inset Flex Code
3472 \begin_layout Plain Layout
3475 thispagestyle{fancy}
3481 Simply insert them in the text on the page you want changed and mark them
3483 In fact, title pages are marked as plain by default, while following pages
3484 are marked fancy when using the global fancy setting.
3487 \begin_layout Standard
3488 As a final example, it is possible to include an image in the header or
3490 Suppose you want to put a company logo in the upper lefthand corner.
3491 You might try something like
3494 \begin_layout Standard
3503 includegraphics{logo.eps}}}
3506 \begin_layout Standard
3508 (you may need to preface this with
3509 \begin_inset Flex Code
3512 \begin_layout Plain Layout
3516 usepackage{graphics}
3521 if you don't include graphics elsewhere in your document).
3524 \begin_layout Section
3525 Itemize Bullet Selection
3526 \begin_inset CommandInset label
3535 \begin_layout Standard
3541 \begin_layout Subsection
3545 \begin_layout Standard
3546 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3547 Using this dialog you can easily specify what bullet shape to use at each
3548 level of an itemized list.
3549 These settings are document-wide so you won't be able to specify different
3550 sets of bullets for different paragraphs.
3554 \begin_layout Plain Layout
3555 Well, actually you can but you'll have to do it by hand.
3563 \begin_layout Subsection
3567 \begin_layout Standard
3568 Open the dialog by selecting the
3569 \begin_inset Flex MenuItem
3572 \begin_layout Plain Layout
3573 Document\SpecialChar \menuseparator
3579 menu item and then select the
3580 \begin_inset Flex MenuItem
3583 \begin_layout Plain Layout
3592 \begin_layout Standard
3593 The dialog provides you with a table of bullet shapes.
3594 A column of buttons on the left of the table provides access to the six
3595 different panels of bullet shapes.
3596 The row of buttons across the top is used to select which bullet depth
3598 A text entry under the table shows the currently selected bullet shape's
3599 LaTeX equivalent and this can be edited if desired.
3600 If you do modify the text you will also need to specify any needed packages
3601 in the LaTeX preamble.
3604 \begin_layout Standard
3605 The six panels are divided up by the packages they require.
3606 The following table shows the mappings from button name to LaTeX packages.
3609 \begin_layout Standard
3611 \begin_inset Tabular
3612 <lyxtabular version="3" rows="7" columns="2">
3613 <features tabularvalignment="middle">
3614 <column alignment="center" valignment="top" width="0pt">
3615 <column alignment="center" valignment="top" width="0pt">
3617 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3620 \begin_layout Plain Layout
3635 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3638 \begin_layout Plain Layout
3655 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3658 \begin_layout Plain Layout
3673 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3676 \begin_layout Plain Layout
3692 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3695 \begin_layout Plain Layout
3710 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3713 \begin_layout Plain Layout
3730 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3733 \begin_layout Plain Layout
3748 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3751 \begin_layout Plain Layout
3768 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3771 \begin_layout Plain Layout
3786 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3789 \begin_layout Plain Layout
3806 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3809 \begin_layout Plain Layout
3824 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3827 \begin_layout Plain Layout
3844 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3847 \begin_layout Plain Layout
3862 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3865 \begin_layout Plain Layout
3888 \begin_layout Standard
3889 LyX doesn't stop you using bullets from packages you don't have.
3890 If you get errors from LaTeX when you try to view or print the file, then
3891 it is likely you are missing a package.
3895 \begin_layout Plain Layout
3896 LyX doesn't restrict your use since you may be editing locally and exporting
3905 \begin_layout Subsection
3909 \begin_layout Standard
3910 Select which bullet depth you want to change then select the bullet shape
3912 Any changes will not be visible in LyX, but are visible when viewing the
3916 \begin_layout Standard
3917 You can reset a bullet shape to the default simply by clicking your right
3918 mouse button on the appropriate bullet depth button.
3922 \begin_layout Plain Layout
3927 want to have multiple sets of paragraphs with different sets of bullets
3928 in each, then you're going to have to get your hands dirty with TeX code.
3929 The bullet selection dialog can help though because it provides you with
3930 the LaTeX code for a wide range of bullet shapes.
3931 To make your own custom paragraphs you have the following options:
3934 \begin_layout Plain Layout
3938 \begin_layout Plain Layout
3954 \begin_layout Plain Layout
3958 \begin_layout Plain Layout
3980 \begin_layout Itemize
3981 Use the LaTeX command
3982 \begin_inset Flex Code
3985 \begin_layout Plain Layout
3993 to specify a new bullet shape for a given depth.
3994 You'll also need to save the current bullet shape so you can restore it
3996 In this itemized list the following LaTeX code was used to change the bullet
3997 used for the first depth.
4001 \begin_layout LyX-Code
4011 \begin_layout LyX-Code
4028 \begin_layout Itemize
4029 Note that the itemize depth is specified in Roman numerals as part of the
4039 \begin_layout Itemize
4043 \begin_layout Plain Layout
4056 Specify each individual entry by starting each item with the bullet shape
4057 enclosed in square brackets and set as
4058 \begin_inset Flex MenuItem
4061 \begin_layout Plain Layout
4068 For example, this item was started with
4069 \begin_inset Flex Code
4072 \begin_layout Plain Layout
4087 \begin_layout Plain Layout
4091 \begin_layout Plain Layout
4107 \begin_layout Plain Layout
4108 You'll also need to revert the labelitem back to its previous setting for
4109 the global bullet shape settings to remain in effect.
4110 The way used here was:
4113 \begin_layout LyX-Code
4128 \begin_layout Chapter
4129 LyX and the World Wide Web
4132 \begin_layout Standard
4133 LyX has long supported the export of documents to various web-friendly formats,
4135 Before verson 2.0, however, HTML export was always accomplished by the use
4136 of external converters.
4140 \begin_layout Plain Layout
4141 For details on the use of external converters with LyX, see the
4145 section of the Customization manual.
4150 These fall into two large groups: there are converters that use LaTeX as
4151 an intermediate format, such as
4152 \begin_inset Flex Code
4155 \begin_layout Plain Layout
4162 \begin_inset Flex Code
4165 \begin_layout Plain Layout
4172 \begin_inset Flex Code
4175 \begin_layout Plain Layout
4181 , relying upon LyX to produce the LaTeX; and there is a converter that works
4182 directly on LyX files,
4183 \begin_inset Flex Code
4186 \begin_layout Plain Layout
4193 All of these have different advantages and disadvantages.
4197 \begin_layout Standard
4198 The LaTeX-based converters have the advantage that, in principle, they know
4199 everything about the exported document that LaTeX does.
4200 Such converters do not care, for example, if a certain block of code was
4201 produced by LyX or was Evil Red Text.
4202 These converters know about
4203 \begin_inset Flex Code
4206 \begin_layout Plain Layout
4212 files, counters, and references, and can often make use of the
4213 \begin_inset Flex Code
4216 \begin_layout Plain Layout
4222 files generated by BibTeX.
4223 On the other hand, LaTeX is a very hard language to parse---it is sometimes
4224 said that only TeX itself understands TeX---and LaTeX-based converters
4225 will often choke on what seem to be quite simple constructs; complex ones
4226 can throw them completely, and as of this writing, for example, the
4230 manual will not export with
4231 \begin_inset Flex Code
4234 \begin_layout Plain Layout
4240 , though the others will.
4241 The other issue concerns how math is handled.
4242 These converters typically convert the formulae into little pictures that
4243 are then linked from the HTML document.
4244 Since these are actually generated by LaTeX, they are accurate.
4245 But they do not scale well, and just getting them to look as if they are
4246 actually meant to be in your document---so that the font sizes seem to
4247 be roughly the same---can be a challenge.
4250 \begin_layout Standard
4252 \begin_inset Flex Code
4255 \begin_layout Plain Layout
4262 \begin_inset CommandInset href
4264 name "http://elyxer.nongnu.org/"
4265 target "http://elyxer.nongnu.org/"
4269 ) solves some of these problems.
4270 In particular, the formulae it produces scale perfectly, since it renders
4271 math using a combination of HTML and CSS rather than converting the formulae
4273 But even moderately complex formula are rendered less well than with
4274 \begin_inset Flex Code
4277 \begin_layout Plain Layout
4283 ; this reflects the limitations of HTML.
4287 \begin_layout Plain Layout
4289 \begin_inset Flex Code
4292 \begin_layout Plain Layout
4298 can also use jsMath and MathJax for equations, but this setting is only
4299 available globally and requires one to have access to a server that runs
4305 More importantly (as of version 1.1.1, at least),
4306 \begin_inset Flex Code
4309 \begin_layout Plain Layout
4315 has limited support for math macros and no support for user-defined paragraph
4316 or character styles.
4317 These limitations make
4318 \begin_inset Flex Code
4321 \begin_layout Plain Layout
4327 unsuitable for many of the documents LyX users produce.
4328 In principle, of course, these problems could be solved, but the LyX developers
4329 have decided to follow a different path and have made LyX itself capable
4330 of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4334 \begin_layout Standard
4335 As of this writing, XHTML output remains under development and should probably
4337 \begin_inset Quotes eld
4341 \begin_inset Quotes erd
4348 \begin_layout Plain Layout
4350 \begin_inset Flex Code
4353 \begin_layout Plain Layout
4354 development/HTML.notes
4359 , which can be found in the LyX source tree or
4360 \begin_inset CommandInset href
4362 name "accessed online"
4363 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4367 , usually contains up-to-date information about the state of XHTML output.
4368 See also the list of XHTML bugs on
4369 \begin_inset CommandInset href
4371 name "the bug tracker"
4372 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"
4381 Still, the developers have chosen this approach because it has several
4382 potential advantages over the other two.
4385 \begin_layout Standard
4386 These advantages are primarily due to the fact that the XHTML output routines,
4387 since they are part of LyX, know everything LyX knows about the document
4392 \begin_layout Plain Layout
4393 Another advantage is that, since these routines are internal to LyX, they
4394 are immune to changes in LyX's file format, or to changes in the semantics
4400 So they know about the table of contents (as displayed in the outline),
4401 about the counters associated with different paragraph styles, and about
4402 user-defined styles.
4403 The XHTML output routines know what LyX knows about internationalization,
4404 too, so they will output
4405 \begin_inset Quotes eld
4409 \begin_inset Quotes erd
4413 \begin_inset Quotes eld
4421 \begin_inset Quotes erd
4424 , depending upon the language in effect at the time.
4428 \begin_layout Standard
4429 Quite generally, the output routines know what LyX knows about document
4430 layout, that is, about how the document is to be rendered on screen.
4431 We use this information when we output the document as XHTML.
4436 generates CSS style information corresponding to the layout information
4437 it uses to render the document on screen: if section headings are supposed
4438 to be sans-serif and bold as seen in LyX, then (by default) they will be
4439 sans-serif and bold when viewed in a web browser, too.
4440 And this is true not just for pre-defined styles, like Section, but for
4441 any style, including user-defined styles.
4442 Indeed, the XHTML output routines make no distinction between user-defined
4443 paragraph and character styles and LyX's own pre-defined styles: in each
4444 case, everything LyX knows about the styles is contained in the layout
4446 And much the same is true as regards pre-defined textual insets, such as
4447 footnotes, and various custom insets.
4451 \begin_layout Standard
4452 The result is that XHTML output can be customized and extended in exactly
4453 the same way LaTeX output can be customized and extended: through layout
4455 See chapter five of the
4459 manual for the details.
4462 \begin_layout Standard
4463 The remainder of this chapter contains more detailed information on XHTML
4464 output, its limitations, and ways to work around those limitations.
4467 \begin_layout Section
4468 Math Output in XHTML
4471 \begin_layout Standard
4472 LyX offers four choices for how math is rendered.
4473 These have various advantages and disadvantages:
4476 \begin_layout Itemize
4478 \begin_inset Newline newline
4481 MathML is a dialect of XML designed specifically for mathematics on the
4482 web, and it typically renders very well in browsers that support it.
4483 The disadvantage is that not all browsers support MathML, and support is
4484 not complete even in the Gecko-based browsers, such as Firefox.
4485 \begin_inset Newline newline
4488 If LyX is unable to render a formula as MathML---for example, if the formula
4490 \begin_inset Flex Code
4493 \begin_layout Plain Layout
4499 package or ERT---then it will instead output the formula as an image.
4503 \begin_layout Itemize
4505 \begin_inset Newline newline
4509 \begin_inset Flex Code
4512 \begin_layout Plain Layout
4518 outputs math as HTML, styled by CSS.
4522 \begin_layout Plain Layout
4523 LyX has borrowed some of the CSS for its HTML output from
4524 \begin_inset Flex Code
4527 \begin_layout Plain Layout
4538 For simple formulae, this can work quite well, though with more complicated
4539 formulae it tends to break down.
4540 Still, this method has the advantage that it is very widely supported and
4541 so it may be appropriate for documents that contain only a little, fairly
4543 \begin_inset Newline newline
4546 If Lyx is unable to render a formula as HTML---for example, if the formula
4548 \begin_inset Flex Code
4551 \begin_layout Plain Layout
4557 package or ERT---then it will instead output the formula as an image.
4561 \begin_layout Itemize
4563 \begin_inset Newline newline
4567 \begin_inset Flex Code
4570 \begin_layout Plain Layout
4576 , LyX will output formulae as images, the very same images, in fact, that
4577 are used for instant preview.
4581 \begin_layout Plain Layout
4582 Instant preview does
4586 have to be on for images to be output, however.
4591 The advantage to this method is that the images are simply generated by
4592 LaTeX, so they are very accurate.
4593 The disadvantage, as mentioned earlier, is that these are bitmapped images,
4594 so they do not scale terribly well, and one cannot copy them, etc.
4595 (As of this writing, there are also problems about equation numbering.
4597 \begin_inset CommandInset href
4600 target "http://www.lyx.org/trac/ticket/6894"
4605 \begin_inset Newline newline
4608 The size of the images can be controlled by setting the
4609 \begin_inset Quotes eld
4613 \begin_inset Quotes erd
4617 \begin_inset Flex MenuItem
4620 \begin_layout Plain Layout
4621 Document\SpecialChar \menuseparator
4622 Settings\SpecialChar \menuseparator
4632 \begin_layout Plain Layout
4633 For those who want to know, this controls the resolution of the image in
4634 dots per inch and is based upon a default of 75 dpi.
4640 \begin_inset Newline newline
4643 If LyX for some reason fails to create an image for a formula (e.g., if a
4644 required LaTeX package is not installed), then it will fall back to outputing
4648 \begin_layout Itemize
4650 \begin_inset Newline newline
4653 Finally, LyX will happily output math as LaTeX.
4654 As well as being the output of last resort, this method can be used with
4656 \begin_inset CommandInset href
4659 target "http://www.math.union.edu/~dpvc/jsMath/"
4663 , which uses JavaScript to render LaTeX embedded in HTML documents.
4664 LyX wraps the LaTeX in either a
4665 \begin_inset Flex Code
4668 \begin_layout Plain Layout
4674 (for inline formulas) or
4675 \begin_inset Flex Code
4678 \begin_layout Plain Layout
4684 (for displayed formulas) with
4685 \begin_inset Flex Code
4688 \begin_layout Plain Layout
4694 , as is required for jsMath.
4697 \begin_layout Standard
4698 One of these output methods must be selected under
4699 \begin_inset Flex MenuItem
4702 \begin_layout Plain Layout
4703 Document\SpecialChar \menuseparator
4704 Settings\SpecialChar \menuseparator
4711 By default, LyX outputs MathML.
4712 This is a document-wide setting, therefore.
4715 \begin_layout Standard
4716 Eventually, LyX will offer the user the option to select an alternate output
4717 method for a particular inset, say, one that isn't being rendered very
4722 \begin_layout Plain Layout
4723 That said, since LyX falls back to images if the inset contains ERT, then
4724 one can force output as an image by putting some harmless ERT into the
4726 \begin_inset Formula $a=b\relax$
4737 \begin_layout Section
4738 Bibliography and Citations
4741 \begin_layout Standard
4742 XHTML output fully supports bibliographies and citations.
4746 \begin_layout Standard
4747 Citation labels are generated by the same machinery that generates LyX's
4748 on-screen labels, so the labels will look in the output much as they do
4749 in LyX, though better.
4750 If you are using numerical citations, then LyX will output numerical labels,
4751 such as [1] or [17], rather than simply showing the citation key in square
4752 brackets, as it does on-screen.
4753 If you are using author-year citations, then LyX will add lowercase letters
4754 to the years, just as BibTeX does, if it finds more than one citation for
4755 a given author-year combination.
4756 The labels will be printed with the bibliography entries.
4757 Note that there is, at present, no way to customize the appearance of the
4758 labels, for example, to choose between square brackets and parentheses.
4761 \begin_layout Standard
4762 Bibliography output is handled by the same machinery that handles the presentati
4763 on of reference information in the citation dialog, so you will see in the
4764 XHTML output pretty much what you would see if you were to look at a given
4765 entry in the citation dialog.
4766 The formatting can be customized in your layout file or, preferably, in
4772 manual for the details.
4775 \begin_layout Standard
4776 The main defect at present is that cross-referenced information is printed
4777 with every entry with which it is associated.
4778 So you can see things like this:
4783 \begin_inset Quotes eld
4786 Context and Logical Form
4787 \begin_inset Quotes erd
4792 Language in Context: Selected Essays
4794 (Oxford: Oxford University Press, 2007), pp.
4800 \begin_inset Quotes eld
4803 Semantics in Context
4804 \begin_inset Quotes erd
4809 Language in Context: Selected Essays
4811 (Oxford: Oxford University Press, 2007), pp.
4815 \begin_layout Standard
4816 This should be fixed before long.
4819 \begin_layout Standard
4820 There is no support at present for sectioned bibliographies.
4821 If you have multiple bibliographies, then LyX will print the same bibliography
4825 \begin_layout Section
4829 \begin_layout Standard
4830 LyX will happily export indexes as XHTML, but with certain limitations at
4834 \begin_layout Standard
4835 Index export will be most reliable when you do not attempt to use the fancy
4836 constructs that are described in the section on indexes in the
4844 \begin_layout Plain Layout
4845 The main issue here is that LyX itself does not really handle these.
4846 It just lets you enter what you would have to enter in raw LaTeX.
4851 We'll describe how they are handled using the subsection headings from
4855 \begin_layout Itemize
4856 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
4857 these, but the entries must be separated by
4858 \begin_inset Quotes eld
4862 \begin_inset Quotes erd
4865 , that is, there must be spaces around the exclamation point.
4866 This is because it is otherwise too difficult to check for escaped exclamation
4867 points, ones in math, and so forth.
4870 \begin_layout Itemize
4871 Page Ranges: There is no support at all for page ranges, since these make
4872 no sense with XHMTL.
4873 Instead, you will just get two index entries, one at either end.
4876 \begin_layout Itemize
4877 Cross-referencing: There is no support for cross-referencing.
4878 If LyX finds an entry containing the
4879 \begin_inset Quotes eld
4882 |see\SpecialChar \ldots{}
4884 \begin_inset Quotes erd
4887 construct, it is just dropped, and the rest is treated as an ordinary index
4891 \begin_layout Itemize
4892 Index Entry Order: LyX does support attempts to fix the sorting order.
4893 It will take what is before the first `@' it finds and use that for sorting,
4894 taking what follows the first `@' to be the actual entry.
4895 At present, LyX does not check for escaped `@', so do not try to index
4899 \begin_layout Itemize
4900 Index Entry Layout: You can format entries by using the text style dialog,
4901 or by using any other method available within LyX itself.
4902 There is no support for constructs like:
4903 \begin_inset Quotes eld
4907 \begin_inset Quotes erd
4911 Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
4912 and everything that follows it.
4915 \begin_layout Itemize
4916 Multiple Indexes: There is no support for multiple indexes.
4917 Rather, all index entries will be printed as one large index.
4918 To avoid our printing several versions of the index, we print only the
4919 main index, so make sure you have one.
4922 \begin_layout Section
4923 Nomenclature and Glossary
4926 \begin_layout Standard
4927 There is at present no support for glossaries.
4928 Adding it would be fairly trivial, and welcome.
4931 \begin_layout Chapter
4935 \begin_layout Section
4939 \begin_layout Standard
4940 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
4941 and retrieve information about the LyX internal state.
4942 This is only intended for advanced users, but they should find it useful.
4943 It is by writing to the LyX server, for example, that bibliography managers,
4944 such as JabRef, are able to
4945 \begin_inset Quotes eld
4949 \begin_inset Quotes erd
4955 \begin_layout Section
4956 Starting the LyX Server
4959 \begin_layout Standard
4960 The LyX server works through the use of a pair of named pipes.
4961 These are usually located in
4962 \begin_inset Flex Code
4965 \begin_layout Plain Layout
4971 , (except on Windows, where
4975 named pipes are special objects located in
4976 \begin_inset Flex Code
4979 \begin_layout Plain Layout
4991 ) and have the names
4992 \begin_inset Quotes eld
4996 \begin_inset Flex Code
4999 \begin_layout Plain Layout
5006 \begin_inset Quotes erd
5010 \begin_inset Quotes eld
5014 \begin_inset Flex Code
5017 \begin_layout Plain Layout
5024 \begin_inset Quotes erd
5028 External programs write into
5029 \begin_inset Flex Code
5032 \begin_layout Plain Layout
5038 and read back data from
5039 \begin_inset Flex Code
5042 \begin_layout Plain Layout
5049 The stem of the pipe names can be defined in the
5050 \begin_inset Flex MenuItem
5053 \begin_layout Plain Layout
5054 Tools\SpecialChar \menuseparator
5061 \begin_inset Flex Code
5064 \begin_layout Plain Layout
5065 "/home/myhome/lyxpipe"
5071 \begin_inset Flex Code
5074 \begin_layout Plain Layout
5093 configure this manually in order for the server to start.
5096 \begin_layout Standard
5098 \begin_inset Flex Code
5101 \begin_layout Plain Layout
5108 \begin_inset Flex Code
5111 \begin_layout Plain Layout
5117 ' to create the pipes.
5118 If one of the pipes already exists, LyX will assume that another LyX process
5119 is already running and will not start the server.
5120 On POSIX (Unix like) systems, if for some other reason, an unused
5121 \begin_inset Quotes eld
5125 \begin_inset Quotes erd
5128 pipe is left in existence when LyX closes, then LyX will try to delete
5130 If this fails for some reason, you will need to delete the pipes manually
5131 and then restart LyX.
5132 On Windows, pipes are deleted by the OS on program termination or crash,
5134 \begin_inset Quotes eld
5138 \begin_inset Quotes erd
5141 pipes should not be possible.
5144 \begin_layout Standard
5145 To have several LyX processes with servers at the same time, you have to
5146 use different configurations, perhaps by using separate user directories,
5148 \begin_inset Flex Code
5151 \begin_layout Plain Layout
5157 file, for each process.
5160 \begin_layout Standard
5161 If you are developing a client program, you might find it useful to enable
5162 debugging information from the LyX server.
5163 Do this by starting LyX as
5164 \begin_inset Flex Code
5167 \begin_layout Plain Layout
5176 \begin_layout Standard
5177 You can find a complete example client written in C in the source distribution
5179 \begin_inset Flex Code
5182 \begin_layout Plain Layout
5183 development/lyxserver/server_monitor.c
5191 \begin_layout Standard
5192 Another useful tool is command-line based client you will find in
5193 \begin_inset Flex Code
5196 \begin_layout Plain Layout
5197 src/client/lyxclient
5205 \begin_layout Section
5206 Normal communication
5209 \begin_layout Standard
5210 To issue a LyX call, the client writes a line of ASCII text into the input
5212 This line has the following format:
5229 \begin_layout Description
5230 clientname is a name that the client can choose arbitrarily.
5231 Its only use is that LyX will echo it if it sends an answer—so a client
5232 can dispatch results from different requesters.
5235 \begin_layout Description
5236 function is the function you want LyX to perform.
5237 It is the same as the commands you'd use in the minibuffer.
5240 \begin_layout Description
5241 argument is an optional argument which is meaningful only to some functions
5243 \begin_inset Quotes eld
5247 \begin_inset Quotes erd
5250 LFUN will insert the argument as text at the cursor position).
5253 \begin_layout Standard
5254 The answer from LyX will arrive in the output pipe and be of the form
5271 \begin_layout Standard
5280 are just echoed from the command request, while
5284 is more or less useful information filled according to how the command
5285 execution worked out.
5286 Some commands, such as
5287 \begin_inset Quotes eld
5291 \begin_inset Quotes erd
5294 , will return information about the internal state of LyX, while other will
5295 return an empty data-response.
5296 This means that the command execution went fine.
5299 \begin_layout Standard
5300 In case of errors, the response from LyX will have this form
5317 \begin_layout Standard
5322 should contain an explanation of why the command failed.
5325 \begin_layout Standard
5329 \begin_layout LyX-Code
5330 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5331 \begin_inset Newline newline
5334 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5335 \begin_inset Newline newline
5338 read a <~/.lyxpipe.out
5339 \begin_inset Newline newline
5345 \begin_layout Section
5349 \begin_layout Standard
5350 LyX can notify clients of events going on asynchronously.
5351 Currently it will only do this if the user binds a key sequence with the
5353 \begin_inset Quotes eld
5357 \begin_inset Quotes erd
5361 The format of the string LyX sends is as follows:
5365 \begin_inset Flex Code
5368 \begin_layout Plain Layout
5379 \begin_layout Standard
5384 is the printed representation of the key sequence that was actually typed
5388 \begin_layout Standard
5389 This mechanism can be used to extend LyX's command set and implement macros.
5390 Bind some key sequence to
5391 \begin_inset Quotes eld
5395 \begin_inset Quotes erd
5399 Then start a client that listens on the output pipe, dispatches the command
5400 according to the sequence, and starts a function that may use LyX calls
5401 and LyX requests to issue a command or a series of commands to LyX.
5404 \begin_layout Section
5405 The simple LyX Server Protocol
5408 \begin_layout Standard
5409 LyX implements a simple protocol that can be used for session management.
5410 All messages are of the form
5423 \begin_layout Standard
5429 \begin_inset Quotes eld
5433 \begin_inset Quotes erd
5437 \begin_inset Quotes eld
5441 \begin_inset Quotes erd
5446 \begin_inset Quotes eld
5450 \begin_inset Quotes erd
5453 is received from a client, LyX will report back to inform the client that
5454 it's listening to it's messages, while
5455 \begin_inset Quotes eld
5459 \begin_inset Quotes erd
5462 sent from LyX will inform clients that LyX is closing.
5465 \begin_layout Section
5466 Reverse DVI/PDF search
5469 \begin_layout Standard
5470 Some DVI/PDF viewers
5474 \begin_layout Plain Layout
5475 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5476 Skim on Mac OSX and SumatraPDF on Windows.
5485 facility (also called
5490 This means that you can tell LyX to put the cursor to a specific line in
5491 the document by clicking at the respective position in the DVI/PDF output.
5492 To achieve this, the viewer must be able to communicate with LyX.
5493 This is done via the LyX server either by using the named pipe (
5497 ), or the UNIX domain socket (
5501 ) that LyX creates in its temporary directory (this is the way the
5502 \begin_inset Flex Code
5505 \begin_layout Plain Layout
5511 program communicates with LyX).
5512 In some cases, you need a helper script that mediates between the viewer
5513 and LyX, in others, the viewer can communicate with LyX directly.
5514 This depends on the selected viewer and on your operating system.
5515 The same applies to the way viewers need to be configured and the way the
5516 reverse search is actually performed.
5517 In what follows, we will thus describe how to setup reverse search for
5519 Before we turn to this, though, we will explain what needs to be done generally
5520 to enable reverse search in the DVI/PDF output.
5523 \begin_layout Subsection
5524 \begin_inset CommandInset label
5526 name "sub:rev-search"
5530 Automatical enabling
5533 \begin_layout Standard
5534 In most cases LyX will do the work for you by enabling
5535 \begin_inset Flex MenuItem
5538 \begin_layout Plain Layout
5539 Document\SpecialChar \menuseparator
5540 Output\SpecialChar \menuseparator
5547 In such a case LyX will automatically insert SyncTeX macro (for PDF) or
5548 srcltx package (for DVI) respectively.
5549 This option can be easily reached also on
5550 \begin_inset Flex Code
5553 \begin_layout Plain Layout
5562 \begin_layout Standard
5563 Plase note that including
5564 \begin_inset Flex Code
5567 \begin_layout Plain Layout
5574 \begin_inset Flex Code
5577 \begin_layout Plain Layout
5583 sometimes have an impact on the typeset and you should switch them off
5584 for the final typesets.
5587 \begin_layout Standard
5588 You can also define custom macro in preferences and in case you need some
5589 special tweaks read the next section about manual enabling.
5593 \begin_layout Subsection
5597 \begin_layout Standard
5598 LaTeX provides several different methods for reverse search.
5599 Some are built-in in the
5600 \begin_inset Flex Code
5603 \begin_layout Plain Layout
5609 program, some are provided by external packages.
5610 Your choice depends on whether your LaTeX distribution already provides
5611 a given method (the built-in methods are rather new) and whether your viewer
5613 The available methods are described in the following.
5616 \begin_layout Subsubsection*
5617 Built-in DVI-search via src-specials (DVI only)
5620 \begin_layout Standard
5621 This method provides the DVI file with the necessary information for reverse
5623 It is available in LaTeX since quite some time (any somewhat recent LaTeX
5624 distribution should include it), and it works reliably.
5625 To enable it, change the
5626 \begin_inset Flex MenuItem
5629 \begin_layout Plain Layout
5634 \begin_layout Plain Layout
5647 \begin_inset Flex MenuItem
5650 \begin_layout Plain Layout
5655 \begin_layout Plain Layout
5662 eX (plain)->DraftDVI
5668 \begin_inset Flex MenuItem
5671 \begin_layout Plain Layout
5672 Preferences\SpecialChar \menuseparator
5673 File Handling\SpecialChar \menuseparator
5680 \begin_inset Flex Code
5683 \begin_layout Plain Layout
5684 latex -src-specials $$i
5690 If this doesn't work, check if your TeX engine needs different options
5691 (the syntax might differ in some distributions).
5694 \begin_layout Subsubsection*
5695 External Packages (PDFSync and scrltx)
5698 \begin_layout Standard
5707 provide reverse search facility for PDF output (via pdflatex) and DVI output,
5709 In order to enable it, load the packages in the LyX preamble:
5712 \begin_layout Itemize
5713 \begin_inset Flex Code
5716 \begin_layout Plain Layout
5724 for reverse PDF search,
5727 \begin_layout Itemize
5729 \begin_inset Flex Code
5732 \begin_layout Plain Layout
5735 usepackage[active]{srcltx}
5740 for reverse DVI search.
5743 \begin_layout Standard
5744 If you want to be able to perform both DVI and PDF reverse searches, you
5745 can also insert in the preamble the following lines
5748 \begin_layout LyX-Code
5752 \begin_inset Newline newline
5758 \begin_inset Newline newline
5764 \begin_inset Newline newline
5770 \begin_inset Newline newline
5775 usepackage[active]{srcltx}
5776 \begin_inset Newline newline
5784 \begin_layout Standard
5785 This way, you can preview the file as either DVI or PDF (pdflatex) and the
5786 right package will be used.
5789 \begin_layout Standard
5790 Note that PDFSync might affect the output layout of your document.
5791 It is therefore advised to disable PDFsync for final documents.
5794 \begin_layout Subsubsection*
5795 Built-in reverse search via SyncTeX (DVI and PDF)
5798 \begin_layout Standard
5800 \begin_inset Flex Code
5803 \begin_layout Plain Layout
5809 have built-in support for both PDF and DVI reverse search.
5814 facility is basically the result of the integration of the PDFSync package
5815 to the pdftex program and its merge with the
5820 You need at least TeXLive 2008 or a recent MikTeX distribution in order
5822 Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
5823 already provide SyncTeX support.
5826 \begin_layout Standard
5827 To enable SyncTeX for DVI output, change the
5828 \begin_inset Flex MenuItem
5831 \begin_layout Plain Layout
5836 \begin_layout Plain Layout
5849 \begin_inset Flex MenuItem
5852 \begin_layout Plain Layout
5857 \begin_layout Plain Layout
5864 eX (plain) -> DraftDVI
5870 \begin_inset Flex MenuItem
5873 \begin_layout Plain Layout
5874 Preferences\SpecialChar \menuseparator
5875 File Handling\SpecialChar \menuseparator
5882 \begin_inset Flex Code
5885 \begin_layout Plain Layout
5886 latex -synctex=1 $$i
5891 , and for PDF output, change the
5892 \begin_inset Flex MenuItem
5895 \begin_layout Plain Layout
5900 \begin_layout Plain Layout
5907 eX (pdflatex) -> PDF (pdflatex)
5913 \begin_inset Flex Code
5916 \begin_layout Plain Layout
5917 pdflatex -synctex=1 $$i
5923 Check the documentation of your viewer whether the viewer needs to be configure
5924 d for the use with SyncTeX.
5928 \begin_layout Plain Layout
5930 \begin_inset Flex Code
5933 \begin_layout Plain Layout
5939 option enables gzip compression.
5940 If your viewer does not support it, you should instead use
5941 \begin_inset Flex Code
5944 \begin_layout Plain Layout
5958 \begin_layout Subsection
5959 Configuring and using specific viewers
5962 \begin_layout Subsubsection*
5963 Xdvi (all platforms)
5966 \begin_layout Standard
5968 \begin_inset Flex Code
5971 \begin_layout Plain Layout
5977 , you don't need to do anything else for performing a reverse DVI search,
5978 as LyX already provides the necessary hooks for automatically using the
5980 \begin_inset Flex Code
5983 \begin_layout Plain Layout
5990 Just setup your document as described above (reverse search is triggered
5991 by Ctrl-click or Alt-click on Mac OSX, respectively).
5994 \begin_layout Standard
5995 However, if for whatever reason you want to use the named pipe instead of
5996 the socket for communicating with LyX, simply change the DVI viewer in
5998 \begin_inset Flex MenuItem
6001 \begin_layout Plain Layout
6002 Preferences\SpecialChar \menuseparator
6003 File Handling\SpecialChar \menuseparator
6013 \begin_layout Plain Layout
6014 On Mac OSX you have to use
6015 \begin_inset Flex Code
6018 \begin_layout Plain Layout
6019 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6030 \begin_inset Flex Code
6033 \begin_layout Plain Layout
6034 xdvi -editor 'lyxeditor.sh %f %l'
6040 \begin_inset Flex Code
6043 \begin_layout Plain Layout
6049 is a suitable script.
6050 For example, a minimal shell script is the following one:
6053 \begin_layout LyX-Code
6055 \begin_inset Newline newline
6058 LYXPIPE="/path/to/lyxpipe"
6059 \begin_inset Newline newline
6062 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6063 \begin_inset Newline newline
6066 echo "$COMMAND" > "${LYXPIPE}".in || exit
6067 \begin_inset Newline newline
6070 read < "${LYXPIPE}".out || exit
6073 \begin_layout Standard
6075 \begin_inset Flex Code
6078 \begin_layout Plain Layout
6088 \begin_layout Plain Layout
6095 XServer pipe path specified in
6096 \begin_inset Flex MenuItem
6099 \begin_layout Plain Layout
6100 Preferences\SpecialChar \menuseparator
6110 \begin_layout Plain Layout
6112 \begin_inset Flex Code
6115 \begin_layout Plain Layout
6121 folder of a source distribution you can find a
6122 \begin_inset Flex Code
6125 \begin_layout Plain Layout
6131 script which is able to locate the
6135 based on your preferences.
6143 \begin_layout Subsubsection*
6147 \begin_layout Standard
6149 \begin_inset Flex Code
6152 \begin_layout Plain Layout
6153 /Applications/MacDviX_Folder/calleditor.script
6158 , add the following lines:
6161 \begin_layout LyX-Code
6166 \begin_layout Plain Layout
6173 X.app/Contents/MacOS/lyxeditor "$2" $1
6174 \begin_inset Newline newline
6180 \begin_layout Standard
6181 Modify the lines accordingly if you install LyX somewhere else than in the
6182 Applications folder.
6185 \begin_layout Standard
6186 Reverse search is triggered by Alt-click (OPTION-click).
6189 \begin_layout Subsubsection*
6193 \begin_layout Standard
6195 \begin_inset Flex Code
6198 \begin_layout Plain Layout
6199 open -a Skim.app $$i
6204 to the viewer setting in
6205 \begin_inset Flex MenuItem
6208 \begin_layout Plain Layout
6209 Preferences\SpecialChar \menuseparator
6210 File Handling\SpecialChar \menuseparator
6211 File formats\SpecialChar \menuseparator
6218 \begin_inset Flex MenuItem
6221 \begin_layout Plain Layout
6222 Skim\SpecialChar \menuseparator
6223 Preferences\SpecialChar \menuseparator
6233 \begin_layout Plain Layout
6243 \begin_layout Standard
6244 Reverse search is triggered by COMMAND-SHIFT-click
6247 \begin_layout Subsubsection*
6251 \begin_layout Standard
6253 \begin_inset Flex MenuItem
6256 \begin_layout Plain Layout
6257 Settings\SpecialChar \menuseparator
6258 Configure Okular\SpecialChar \ldots{}
6259 \SpecialChar \menuseparator
6266 \begin_inset Quotes eld
6270 \begin_inset Quotes erd
6274 \begin_inset Flex Code
6277 \begin_layout Plain Layout
6286 \begin_layout Standard
6287 Reverse search is triggered by SHIFT-click.
6290 \begin_layout Subsubsection*
6294 \begin_layout Standard
6295 Launch yap, choose its
6296 \begin_inset Flex MenuItem
6299 \begin_layout Plain Layout
6300 View\SpecialChar \menuseparator
6307 \begin_inset Quotes eld
6311 \begin_inset Quotes erd
6316 \begin_inset Quotes eld
6319 New\SpecialChar \ldots{}
6321 \begin_inset Quotes erd
6324 button and, in the window that opens, enter
6325 \begin_inset Quotes eld
6329 \begin_inset Quotes erd
6332 (or any other name you like) in the
6333 \begin_inset Quotes eld
6337 \begin_inset Quotes erd
6341 Now click on the button labeled
6342 \begin_inset Quotes eld
6345 \SpecialChar \ldots{}
6347 \begin_inset Quotes erd
6350 to open a file dialog and navigate to the directory containing the batch
6352 \begin_inset Flex Code
6355 \begin_layout Plain Layout
6363 \begin_inset Flex Code
6366 \begin_layout Plain Layout
6372 and then specify the program arguments as
6373 \begin_inset Flex Code
6376 \begin_layout Plain Layout
6384 \begin_inset Flex Code
6387 \begin_layout Plain Layout
6393 wrapper is used for communicating with LyX through the
6400 \begin_layout LyX-Code
6402 \begin_inset Newline newline
6405 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
6414 \begin_inset Newline newline
6428 \begin_layout Standard
6429 Make sure that the LyXServer pipe path you specified in LyX is
6430 \begin_inset Flex Code
6433 \begin_layout Plain Layout
6447 , otherwise change the
6448 \begin_inset Flex Code
6451 \begin_layout Plain Layout
6457 wrapper accordingly.
6460 \begin_layout Standard
6461 In yap, reverse search is triggered by double-click.
6464 \begin_layout Subsubsection*
6465 SumatraPDF (Windows)
6468 \begin_layout Standard
6469 In order to use SumatraPDF for inverse search, enter
6470 \begin_inset Flex Code
6473 \begin_layout Plain Layout
6474 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6479 in the viewer setting in
6480 \begin_inset Flex MenuItem
6483 \begin_layout Plain Layout
6484 Preferences\SpecialChar \menuseparator
6485 File Handling\SpecialChar \menuseparator
6486 File formats\SpecialChar \menuseparator
6493 \begin_inset Flex Code
6496 \begin_layout Plain Layout
6502 is the previous wrapper.
6503 If SumatraPDF.exe is not in your command PATH, use its full file name.
6506 \begin_layout Standard
6507 Reverse search is triggered by double-click.
6510 \begin_layout Subsubsection*
6514 \begin_layout Standard
6515 First of all, make sure that yap is your default DVI viewer in the Windows
6516 environment, then launch it, choose its
6517 \begin_inset Flex MenuItem
6520 \begin_layout Plain Layout
6521 View\SpecialChar \menuseparator
6528 \begin_inset Quotes eld
6532 \begin_inset Quotes erd
6537 \begin_inset Quotes eld
6540 New\SpecialChar \ldots{}
6542 \begin_inset Quotes erd
6545 button and, in the window that opens, enter
6546 \begin_inset Quotes eld
6550 \begin_inset Quotes erd
6553 (or any other name you like) in the
6554 \begin_inset Quotes eld
6558 \begin_inset Quotes erd
6562 Now click on the button labeled
6563 \begin_inset Quotes eld
6566 \SpecialChar \ldots{}
6568 \begin_inset Quotes erd
6571 to open a file dialog and navigate to the directory containing the
6572 \begin_inset Flex Code
6575 \begin_layout Plain Layout
6581 program (which is installed by default on Cygwin along with the LyX executable).
6583 \begin_inset Flex Code
6586 \begin_layout Plain Layout
6592 and then specify the program arguments as
6593 \begin_inset Flex Code
6596 \begin_layout Plain Layout
6603 In this way, you will be using the
6607 for communicating with LyX.
6608 If, for whatever reason, you want to use the
6613 \begin_inset Flex Code
6616 \begin_layout Plain Layout
6622 option and be sure to specify the LyXServer pipe path in the LyX preferences.
6625 \begin_layout Standard
6626 In yap, reverse search is triggered by double-click.
6629 \begin_layout Subsubsection*
6633 \begin_layout Standard
6634 In order to use SumatraPDF for inverse search, enter
6635 \begin_inset Flex Code
6638 \begin_layout Plain Layout
6644 in the viewer setting in
6645 \begin_inset Flex MenuItem
6648 \begin_layout Plain Layout
6649 Preferences\SpecialChar \menuseparator
6650 File Handling\SpecialChar \menuseparator
6651 File formats\SpecialChar \menuseparator
6658 \begin_inset Flex Code
6661 \begin_layout Plain Layout
6667 is the following script (to be placed in your command PATH,
6668 \begin_inset Flex Code
6671 \begin_layout Plain Layout
6677 being the best choice):
6680 \begin_layout LyX-Code
6682 \begin_inset Newline newline
6686 \begin_inset Newline newline
6689 SumatraPDF -inverse-search "lyxeditor -g %f %l" $(basename $1)
6692 \begin_layout Standard
6693 This wrapper script is needed because SumatraPDF is a native Windows application
6694 and does not understand the posix paths used by the Cygwin version of LyX.
6695 If SumatraPDF.exe is not in your command PATH, use its full posix path in
6698 \begin_inset Flex Code
6701 \begin_layout Plain Layout
6707 enables communication via the
6713 \begin_inset Flex Code
6716 \begin_layout Plain Layout
6722 option if you want to use the
6726 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6729 \begin_layout Standard
6730 Reverse search is triggered by double-click.
6733 \begin_layout Section
6737 \begin_layout Standard
6738 To make forward search possible you need to provide generated output PDF/DVI
6739 file with additional information about TeX sources.
6740 This can be done via the methods described in the section
6741 \begin_inset CommandInset ref
6743 reference "sub:rev-search"
6750 \begin_layout Standard
6751 Secondly you need to configure LyX for using your viewers in
6752 \begin_inset Flex MenuItem
6755 \begin_layout Plain Layout
6756 Preferences\SpecialChar \menuseparator
6757 Output\SpecialChar \menuseparator
6764 Only some of the viewers allows this operation --- yap, xdvi, okular, Sumatra
6769 \begin_layout Plain Layout
6770 For Sumatra CMCDDE is needed --- downloadable from http://www.istri.fr/zip/CMCDDE.z
6777 Some other viewers allow at least reloading and positioning to particular
6778 page of the file --- Evince or xpdf --- for these cases you can use external
6780 Please study the prepared examples in the Preferences dialog.
6781 The values replaced in the setting:
6782 \begin_inset Flex Code
6785 \begin_layout Plain Layout
6792 \begin_inset Flex Code
6795 \begin_layout Plain Layout
6801 for exported temporary .tex file,
6802 \begin_inset Flex Code
6805 \begin_layout Plain Layout
6811 exported output file (either dvi or pdf, depending on which one exists
6816 \begin_layout Standard
6817 When viewing, LyX dynamically choose proper preview format based on the
6818 presence of .dvi or .pdf file in the temporary directory (i.e.
6819 what format have you used for viewing this particular document).
6823 \begin_layout Chapter
6824 Special Document Classes
6827 \begin_layout Section
6831 \begin_layout Standard
6837 \begin_layout Subsection
6841 \begin_layout Standard
6842 This section describes how LyX can be used to write articles for submission
6843 to the scientific journal
6845 Astronomy and Astrophysics
6847 (www.edpsciences.fr/aa/
6848 \begin_inset Flex URL
6851 \begin_layout Plain Layout
6853 http://www.edpsciences.fr/aa/
6858 ) using Version 5.01 of the document class
6863 This package can be downloaded from the ftp site
6866 \begin_layout Standard
6867 \begin_inset VSpace medskip
6873 \begin_layout Standard
6875 \begin_inset Flex URL
6878 \begin_layout Plain Layout
6880 ftp://ftp.edpsciences.org/pub/aa/readme.html
6888 \begin_layout Standard
6889 \begin_inset VSpace medskip
6895 \begin_layout Standard
6896 A manual comes together with that package, and this text is not meant to
6897 replace the original manual but is merely a short guide in how to realize
6898 the correct form of your paper.
6902 \begin_layout Standard
6903 Please note that the publisher of the journal was changed from Springer
6904 to EDP Sciences starting January 1, 2001.
6905 That change involved also some slight changes to the style files, namely
6906 the removal of the thesaurus command.
6907 The LyX class aa supports the newest version of these style files, V 5.01.
6908 If you have an older version installed, please upgrade.
6909 For compatibility, the old (version 4) layout has been kept as
6914 Please refer to the comments in
6916 LyXDir/layouts/aapaper.layout
6921 \begin_layout Subsection
6925 \begin_layout Standard
6926 It is recommended you start from the example template distributed with LyX.
6927 If you are not using a template, note the following settings:
6930 \begin_layout Itemize
6937 Document\SpecialChar \menuseparator
6940 dialog (OK, that one was obvious).
6943 \begin_layout Itemize
6944 Don't change the option
6947 \begin_inset space ~
6957 The whole layout is done by the macros, you shouldn't change anything.
6960 \begin_layout Subsection
6964 \begin_layout Standard
6965 First thing to enter is the header information.
6966 It consists of seven entries, of which some are optional.
6970 \begin_layout Itemize
6978 \begin_layout Itemize
6986 \begin_layout Itemize
6994 \begin_layout Itemize
7002 \begin_layout Itemize
7007 : [optional] if more than one author: whom to contact for offprint requests.
7010 \begin_layout Itemize
7015 : [optional] mail address for contacts.
7018 \begin_layout Itemize
7026 Received: <date>; Accepted <date>
7029 \begin_layout Standard
7030 There is no need to issue the
7036 command, this is done automatically by LyX when the header is finished.
7037 Although the order of the single header entries doesn't matter it is advised
7038 to keep the above sequence, just to get the best optics and meets the layout
7039 of the real document.
7042 \begin_layout Standard
7043 If you want to place footnotes in the header block, e.
7044 \begin_inset space \thinspace{}
7048 \begin_inset space \space{}
7051 to state your present address, just use the standard footnote via the menu
7054 Insert\SpecialChar \menuseparator
7058 LyX will automagically use the term
7067 \begin_layout Standard
7068 In addition to these topics, the macros use three additional LaTeX commands
7069 that have no counterpart in LyX:
7072 \begin_layout Itemize
7079 to separate different names for more than one author and institute, respectivel
7083 \begin_layout Itemize
7090 to mark corresponding author/institute pairs.
7091 The institutes are numbered sequentially as they appear in the
7095 field, so you have to put a marker to each author.
7098 \begin_layout Itemize
7105 to supply an email address for fast contact.
7108 \begin_layout Standard
7109 In all cases, the appropriate command has to be entered in LyX and marked
7115 \begin_layout Subsection
7119 \begin_layout Standard
7120 The abstract should immediately follow the header block.
7121 With version 5 the abstract environment was changed to a command, and there
7122 is now a resctriction to only one paragraph.
7123 In addition, it should contain an entry with the keywords.
7124 This is not yet implemented for LyX, therefore you have to enter the LaTeX
7131 by hand and mark it as LaTeX code.
7132 Refer to the example paper.
7135 \begin_layout Subsection
7136 Supported environments
7139 \begin_layout Standard
7140 The A&A paper layout supports the following environments for structuring
7144 \begin_layout Itemize
7150 \begin_layout Itemize
7156 \begin_layout Itemize
7162 \begin_layout Itemize
7168 \begin_layout Itemize
7174 \begin_layout Itemize
7180 \begin_layout Itemize
7186 \begin_layout Itemize
7192 \begin_layout Itemize
7198 \begin_layout Itemize
7204 \begin_layout Itemize
7210 \begin_layout Itemize
7216 \begin_layout Subsection
7217 Commands not supported by LyX
7220 \begin_layout Standard
7221 Some commands are not yet supported by the
7226 Some have already been mentioned.
7227 For the sake of completeness, they are listed all together here:
7230 \begin_layout Itemize
7238 \begin_layout Itemize
7246 \begin_layout Itemize
7254 \begin_layout Itemize
7262 \begin_layout Itemize
7270 \begin_layout Itemize
7278 \begin_layout Itemize
7286 \begin_layout Itemize
7294 \begin_layout Standard
7295 If you want to use any of these commands, you have to enter them yourself.
7298 Do not forget to mark them as LaTeX code!
7301 \begin_layout Subsection
7302 Figure and Table Floats
7305 \begin_layout Standard
7306 LyX provides support for the necessary float environments
7308 figure, figure*, table
7314 , therefore we won't tell much about it here.
7318 \begin_inset space ~
7324 Just remember that tables should be left-aligned.
7325 For that, select the table and change the alignment in
7327 Edit\SpecialChar \menuseparator
7329 \begin_inset space ~
7335 \begin_layout Standard
7336 There is only one special thing: the figures with caption besides the figure.
7337 To create such a figure, you have to do the following:
7340 \begin_layout Enumerate
7341 Create a wide figure float:
7343 Insert\SpecialChar \menuseparator
7344 Float\SpecialChar \menuseparator
7347 , then right click in the figure and select
7353 \begin_inset space ~
7361 \begin_layout Enumerate
7362 Enter your caption text.
7365 \begin_layout Enumerate
7370 to move the cursor above the caption.
7373 \begin_layout Enumerate
7377 \begin_layout Enumerate
7378 Position the cursor behind the figure and insert a horizontal fill:
7380 Insert\SpecialChar \menuseparator
7382 \begin_inset space ~
7385 Character\SpecialChar \menuseparator
7387 \begin_inset space ~
7395 \begin_layout Enumerate
7396 Switch to LaTeX mode:
7399 \begin_inset space ~
7407 \begin_layout Enumerate
7417 Do not close the brace!
7420 \begin_layout Enumerate
7421 Position the cursor behind the caption text, switch to LaTeX mode and insert
7425 \begin_inset space ~
7437 \begin_layout Standard
7438 Also, refer to the figures in the example paper.
7441 \begin_layout Subsection
7445 \begin_layout Standard
7446 For submission, the paper has to be formated in a special double-spacing
7448 For this purpose, you have to give the option
7452 to the documentclass.
7453 This must be done using the extra class options field in the
7455 Document\SpecialChar \menuseparator
7459 Just enter the string
7466 \begin_layout Subsection
7470 \begin_layout Standard
7475 directory contains an example paper written with LyX.
7476 It is the example paper from the original macro package, translated to
7478 Use it for inspiration, and compare the original LaTeX code with LyX way
7482 \begin_layout Section
7486 \begin_layout Standard
7492 \begin_layout Subsection
7496 \begin_layout Standard
7497 AASTeX is a set of macros produced by the American Astronomical Society
7498 to facilitate electronic manuscript submission to the three journals they
7499 publish: the Astrophysical Journal (including the Letters and Supplement),
7500 the Astronomical Journal, and the Publications of the Astronomical Society
7502 LyX has proven to be an excellent tool for generating these documents,
7503 especially given its equation, citation, and figure handling capabilities.
7504 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7505 is the version described here, or higher.
7506 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7507 incompatible with LyX.
7508 The AASTeX package may be downloaded from the AASTeX Web site
7511 \begin_layout Standard
7512 \begin_inset VSpace medskip
7518 \begin_layout Standard
7520 \begin_inset Flex URL
7523 \begin_layout Plain Layout
7525 http://www.journals.uchicago.edu/AAS/AASTeX
7533 \begin_layout Standard
7534 \begin_inset VSpace medskip
7540 \begin_layout Standard
7541 A complete user guide is contained in that package and you should familiarize
7542 yourself with it thoroughly before embarking on writing a paper in LyX.
7543 LyX will not reduce the need to figure out all the AASTeX commands, it
7544 will only reduce the drudgery of typing everything in.
7545 It is your responsibility to ensure that the final exported LaTeX document
7546 conforms completely to the requirements of the journal to which you are
7547 submitting your paper.
7550 \begin_layout Subsection
7551 Starting a New Paper
7554 \begin_layout Standard
7555 I strongly suggest that you start with the AASTeX template file.
7558 File\SpecialChar \menuseparator
7565 , enter the new file name, then choose the
7570 This will show the most common fields found in a manuscript.
7571 Simply overwrite the existing text (including the brackets,
7575 ) with the correct information.
7576 Many of the AASTeX commands and environments can be implemented directly
7577 in LyX, but some cannot: most noticeably
7589 , which should stick out like a sore thumb if you actually just opened the
7591 For commands such as these, the LaTeX code must be entered directly and
7593 Such commands are referred to as TeX code, or Evil Red Text.
7594 I tried to minimize the amount of TeX code needed in an AASTeX document,
7595 but there is still a bit more required than any of us would like.
7598 \begin_layout Subsection
7599 Finishing Your Paper
7602 \begin_layout Standard
7603 When the paper is finished to your satisfaction and previews/prints correctly,
7605 \begin_inset Quotes eld
7609 \begin_inset Quotes erd
7612 actions which need to be done before you submit it to the journals.
7616 \begin_layout Enumerate
7617 Export your paper as a LaTeX file (
7619 File\SpecialChar \menuseparator
7620 Export\SpecialChar \menuseparator
7627 \begin_layout Enumerate
7632 file with your favorite text editor
7636 \begin_layout Enumerate
7637 remove the comment lines before the
7646 \begin_layout Enumerate
7651 usepackage...{fontenc}
7653 line if it appears (usually just after
7668 \begin_layout Enumerate
7669 remove everything between (and including) the
7681 commands, except for any commands you specifically put into the LaTeX preamble
7682 (which should appear immediately after the
7683 \begin_inset Quotes eld
7686 User specified LaTeX commands
7687 \begin_inset Quotes erd
7698 \begin_layout Enumerate
7699 Run the resulting file through LaTeX to make sure it still processes correctly.
7702 \begin_layout Enumerate
7703 Reread the journal requirements to make sure your filenames and formats
7707 \begin_layout Enumerate
7711 \begin_layout Subsection
7712 Comments On Specific Commands
7715 \begin_layout Standard
7716 I will not describe the detailed usage of the individual AASTeX commands:
7717 the AASTeX User Guide (
7721 ) gives a good description of each.
7722 Thus it's probably easiest for me to go down the list as found in the guide
7723 and offer comments where necessary.
7724 So let's begin \SpecialChar \ldots{}
7728 \begin_layout Subsubsection
7729 Things that work as expected
7732 \begin_layout Standard
7736 \begin_layout Plain Layout
7748 \begin_layout Standard
7749 Because they work as you might expect, I simply list them and the section
7850 begin{thebibliography}
7858 (2.13.2), all the cite commands and their variations (2.13.2), the generic
7859 graphicx figure commands (2.14.1),
7883 (2.15.4, amongst other places),
7910 \begin_layout Standard
7911 The following style options also work correctly:
7932 Simply put them in the
7938 Layout\SpecialChar \menuseparator
7944 \begin_layout Standard
7948 \begin_layout Plain Layout
7960 \begin_layout Subsubsection
7961 Things that work, but require more comment
7964 \begin_layout Standard
7965 The following items work, but require a little more discussion:
7968 \begin_layout Itemize
7969 These items are reserved for use by the journal editors, but you can put
7970 them into the LaTeX preamble if you feel compelled to do so:
8003 \begin_layout Itemize
8004 These items may be placed in the LaTeX preamble, and are included as blanks
8005 in the template file:
8026 \begin_layout Itemize
8033 (2.3) – can only be used
8034 \begin_inset Quotes eld
8038 \begin_inset Quotes erd
8041 , not in the middle of a paragraph.
8042 Use TeX code if you need to embed it.
8045 \begin_layout Itemize
8052 (2.3) – will have extra {} after it.
8053 This should not cause an error.
8056 \begin_layout Itemize
8063 (2.6) – can only be used
8064 \begin_inset Quotes eld
8068 \begin_inset Quotes erd
8071 , not in the middle of a paragraph.
8072 Use TeX code if you need to embed it.
8075 \begin_layout Itemize
8082 (2.8) – can't insert a cross-reference tag, you must type the tag name by
8086 \begin_layout Itemize
8100 \begin_layout Itemize
8107 (2.9) – will have extra {} after it.
8108 This should not cause an error.
8111 \begin_layout Itemize
8118 (2.11) – will have extra {} after it.
8119 This should not cause an error.
8122 \begin_layout Itemize
8129 (2.14.2) – you can insert an optional filename argument by placing the cursor
8130 at the beginning of the text and selecting
8132 Insert\SpecialChar \menuseparator
8137 \begin_inset Quotes eld
8141 \begin_inset Quotes erd
8144 inserts an optional argument of the type needed by
8151 Hopefully it will be renamed someday.
8154 \begin_layout Itemize
8167 for the catalog ID optional parameter
8170 \begin_layout Itemize
8183 for the catalog ID optional parameter
8186 \begin_layout Subsubsection
8187 Things not implemented, use TeX code
8190 \begin_layout Standard
8194 \begin_layout Plain Layout
8206 \begin_layout Standard
8229 setcounter{equation}
8231 (2.12), Journal name abbreviations (2.13.4),
8267 (2.15.4, insert it as the first element in the lefthand cell after where
8269 Don't use any of LyX's rules in the table),
8281 (2.15.5), much of Misc (2.17, except
8332 \begin_layout Standard
8336 \begin_layout Plain Layout
8348 \begin_layout Subsubsection
8349 Things that cannot be implemented
8352 \begin_layout Standard
8353 \SpecialChar \ldots{}
8354 at least in any meaningful sort of way, so I suggest ignoring them.
8355 They are the references environment (2.13.3), and the deluxetable environment
8357 If you really, really need to use deluxetable, I suggest editing it in
8358 a separate file with a text editor, then using
8360 Insert\SpecialChar \menuseparator
8362 \begin_inset space ~
8367 to include it in your LyX document.
8372 file to see an example of this.
8375 \begin_layout Subsection
8376 FAQs, Tips, Tricks, and Other Ruminations
8379 \begin_layout Subsubsection
8380 Getting LyX and AASTeX to cooperate
8383 \begin_layout Standard
8384 It can be a bit tricky to get LyX to recognize a new layout and document
8386 When all else fails, do this:
8389 \begin_layout Enumerate
8390 Make certain that LaTeX can find AASTeX.
8391 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8392 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
8399 \begin_layout Enumerate
8411 \begin_layout Enumerate
8414 Tools\SpecialChar \menuseparator
8417 in LyX, then restart LyX.
8420 \begin_layout Enumerate
8421 Open a regular new file, not from a template.
8422 Does AASTeX appear in the class list in
8424 Document\SpecialChar \menuseparator
8430 \begin_layout Standard
8431 If you get a warning from an existing AASTeX document about not being able
8432 to find the AASTeX layout or a message about
8433 \begin_inset Quotes eld
8436 You should not mix title layouts with normal ones
8437 \begin_inset Quotes erd
8440 , things haven't been installed correctly.
8443 \begin_layout Subsubsection
8444 LaTeX error processing a table
8447 \begin_layout Standard
8448 LyX, by default, attempts to center the table caption/title.
8449 This seems to produce a bad interaction in AASTeX so you should click somewhere
8450 in the caption/title, then select
8452 Edit\SpecialChar \menuseparator
8454 \begin_inset space ~
8468 This took care of it for me.
8471 \begin_layout Subsubsection
8475 \begin_layout Standard
8476 A couple of things: 1) I have noticed some funny spacing in the reference
8477 entries in the text.
8478 When you enter the bibliography item data, make sure their is
8482 space between the last author and the parenthesis setting off the year;
8486 \begin_inset space \thinspace{}
8490 \begin_inset space \space{}
8504 2) Entering the references at all is not obvious.
8505 The easiest thing is to start typing your first reference at the end of
8506 the document, then mark it as type
8511 That will put a small gray box in front of what you just typed.
8512 Click on the box to fill in the rest of the information.
8513 For new references, go to the end of an existing reference and press return.
8514 That will create a new line with its own box, etc.
8517 \begin_layout Subsubsection
8521 \begin_layout Standard
8522 Even though AASTeX provides its own figure commands (
8528 , for example), I much prefer LaTeX's standard figure commands (with the
8537 \begin_inset space ~
8540 commands as TeX code into a Figure Float box if you desire, but I never
8541 have much luck getting the layout right.
8542 With the standard graphics, LyX will insert a
8546 usepackage{graphicx}
8548 command into the LaTeX preamble and handle the figures in the standard
8549 LaTeX2e way, interspersing the figures in the text.
8550 I believe ApJ accepts figures exactly this way now; AJ might still use
8552 \begin_inset Quotes eld
8555 stack everything at the end
8556 \begin_inset Quotes erd
8562 \begin_layout Subsubsection
8563 Things I could have done, but didn't
8566 \begin_layout Standard
8568 \begin_inset Quotes eld
8572 \begin_inset Quotes erd
8575 things I could have implemented, but chose not to.
8576 For instance, I saw no point in double-spacing the text in the LyX window,
8577 even though it is double-spaced in the paper manuscript.
8578 Also, I chose not to make separate layouts for the preprint and preprint2
8580 Since I assume you will spend most of your time in the plain manuscript
8581 mode anyway, I decided not to chew up more disk space with this.
8585 \begin_layout Subsection
8589 \begin_layout Standard
8590 Your mileage may vary.
8591 I've now had papers published by both ApJ and AJ that have had 98% of the
8592 effort done in LyX; the last 2% was the LaTeX post-processing and a few
8594 I have had no trouble with the submission process, and I'm sure the journals
8595 were never aware that there might be a difference.
8596 So, go forth and publish!
8599 \begin_layout Section
8603 \begin_layout Standard
8606 David Johnson; updated by Richard Heck
8609 \begin_layout Standard
8610 \begin_inset VSpace bigskip
8616 \begin_layout Standard
8618 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8619 papers to be submitted to American Mathematical Society publications.
8620 The layouts are not tailored to a specific journal, but easily can be.
8621 You should refer to the AMS documentation for specific instructions for
8622 each journal (usually it will entail only changing a single line in the
8624 That documentation is available on the Web at
8625 \begin_inset Flex URL
8628 \begin_layout Plain Layout
8636 \begin_inset Flex URL
8639 \begin_layout Plain Layout
8641 ftp://ftp.ams.org/pub/tex/amslatex/
8647 These layouts are appropriate, and useful, for any mathematical writing.
8651 \begin_layout Standard
8652 There are two basic AMS LaTeX layouts:
8655 \begin_layout Itemize
8656 amsart: The standard AMS article format.
8659 \begin_layout Itemize
8660 amsbook: the standard AMS book (really, monograph) format.
8664 \begin_layout Standard
8665 The layouts themselves contain only the minimum necessary to use the AMS
8667 They do not, in particular, contain any of the `theorem' environments used
8668 for setting theorems, lemmas, and the like.
8669 These are contained, instead, in the
8670 \begin_inset Flex Code
8673 \begin_layout Plain Layout
8679 module, which is loaded by default when when you select one of the AMS
8681 (It can also be used with other classes and can be removed, if you would
8682 rather use something else.) Less commonly used environments are in the
8683 \begin_inset Flex Code
8686 \begin_layout Plain Layout
8687 Theorems (AMS-Extended)
8692 module, which must be loaded manually.
8695 \begin_layout Standard
8696 By default, theorems and the like are numbered consecutively throughout
8697 the document, but this may be modified by loading the module
8698 \begin_inset Flex Code
8701 \begin_layout Plain Layout
8702 Theorems (Order by Section)
8707 or, if you are using
8708 \begin_inset Flex Code
8711 \begin_layout Plain Layout
8718 \begin_inset Flex Code
8721 \begin_layout Plain Layout
8722 Theorems (Order by Chapter)
8728 These will number the results as
8729 \begin_inset Formula $n.m$
8732 , where the first number refers to the section (or chapter) and the second
8733 refers to the total number of results so far in that section (or chapter).
8734 Many environments are also available unnumbered.
8735 These are indicated by an asterisk at the end.
8736 If you happen to want
8740 unnumbered results, the module
8741 \begin_inset Flex Code
8744 \begin_layout Plain Layout
8750 provides that option.
8753 \begin_layout Standard
8754 Note that these modules do not
8758 to be used with the AMS classes.
8759 It is perfectly possible to use the
8760 \begin_inset Flex Code
8763 \begin_layout Plain Layout
8769 module, and the others mentioned, with other classes, such as
8770 \begin_inset Flex Code
8773 \begin_layout Plain Layout
8780 \begin_inset Flex Code
8783 \begin_layout Plain Layout
8790 \begin_inset Flex Code
8793 \begin_layout Plain Layout
8802 \begin_layout Subsection
8803 What these layouts provide
8806 \begin_layout Standard
8807 There is a long list of included environments provided by these layouts.
8808 In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
8809 variety of `theorem' environments.
8810 However, the AMS recommends the environments that are available in LyX.
8814 \begin_layout Standard
8815 The following environments—as well as the standard environments, such as
8817 \begin_inset Flex Noun
8820 \begin_layout Plain Layout
8827 \begin_inset Flex Noun
8830 \begin_layout Plain Layout
8837 \begin_inset Flex Noun
8840 \begin_layout Plain Layout
8847 \begin_inset Flex Noun
8850 \begin_layout Plain Layout
8857 \begin_inset Flex Noun
8860 \begin_layout Plain Layout
8867 \begin_inset Flex Code
8870 \begin_layout Plain Layout
8877 \begin_inset Flex Code
8880 \begin_layout Plain Layout
8889 \begin_layout Description
8890 Address This should be the author's permanent address.
8893 \begin_layout Description
8895 \begin_inset space ~
8898 Address This should be the author's temporary address at the time of submission,
8899 if different from the Address.
8902 \begin_layout Description
8903 Email Author's e-mail address
8906 \begin_layout Description
8907 URL Author's Web address, if desired.
8910 \begin_layout Description
8911 Keywords Key words or phrases used to identify specific topics discussed
8915 \begin_layout Description
8916 Subjectclass These refer to the AMS Subject Classifications, published and
8919 Mathematical Reviews
8922 These are also available online at the AMS cites listed above.
8925 \begin_layout Description
8929 \begin_layout Description
8933 \begin_layout Description
8937 \begin_layout Standard
8938 The following environments are provided by both the
8939 \begin_inset Flex Code
8942 \begin_layout Plain Layout
8949 \begin_inset Flex Code
8952 \begin_layout Plain Layout
8958 modules, in the latter case in both starred (unnumbered) and unstarred
8959 (numbered) versions.
8960 These same environments are provided only in the starred versions by the
8962 \begin_inset Flex Code
8965 \begin_layout Plain Layout
8974 \begin_layout Theorem
8975 This is typically used for the statements of major results.
8979 \begin_layout Corollary*
8980 This is used for statements which follow fairly directly from previous statement
8982 Again, these can be major results.
8987 These are smaller results needed to prove other statements.
8990 \begin_layout Proposition
8991 These are less major results which (hopefully) add to the general theory
8995 \begin_layout Conjecture
8996 These are statements provided without justification, which the author does
8997 not know how to prove, but which seem to be true (to the author, at least).
9000 \begin_layout Definition*
9001 Guess what this is for.
9002 The font is different for this environment than for the previous ones.
9006 \begin_layout Example*
9007 Used for examples illustrating proven results.
9010 \begin_layout Problem
9011 It's not really known what this is for.
9012 You should figure it out.
9015 \begin_layout Exercise*
9016 Write a description for this one.
9019 \begin_layout Remark
9020 This environment is also a type of theorem, usually a lesser sort of observation.
9023 \begin_layout Claim*
9024 Often used in the course of giving a proof of a larger result.
9028 Generally, these are used to break up long arguments, using specific instances
9034 The numbering scheme for cases is on its own, not together with other numbered
9040 At the end of this environment, a QED symbol (usually a square, but it can
9041 vary with different styles) is placed.
9042 If you want to have other environments within this one—for example, Case
9043 environments—and have the QED symbol appear only after them, then the other
9044 environments need to be nested within the proof environment.
9047 Nesting Environments
9053 for information on nesting.
9056 \begin_layout Standard
9057 And these environments are provided by
9058 \begin_inset Flex Code
9061 \begin_layout Plain Layout
9062 Theorems (AMS-Extended)
9070 \begin_layout Criterion*
9071 A required condition.
9074 \begin_layout Algorithm*
9075 A general procedure to be used.
9078 \begin_layout Axiom*
9079 This is a property or statement taken as true within the system being discussed.
9082 \begin_layout Condition*
9083 Sometimes used to state a condition assumed within the present context of
9088 Similar to a Remark.
9091 \begin_layout Notation*
9092 Used for the explanation of, yes, notation.
9095 \begin_layout Summary
9096 Do we really need to tell you?
9099 \begin_layout Acknowledgement*
9103 \begin_layout Conclusion*
9104 Sometimes used at the end of a long train of argument.
9108 Used in a way similar to Proposition, though perhaps lower on the scale.
9111 \begin_layout Standard
9112 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9114 They need to be available on your system in order to use these environments.
9117 \begin_layout Section
9125 \begin_layout Standard
9131 \begin_layout Subsection
9135 \begin_layout Standard
9136 These are the layout files for some of the journals of the American Geophysical
9138 It is assumed that you have both the AGU's own class files and AGUplus
9139 installed (everything to be found at
9140 \begin_inset Flex URL
9143 \begin_layout Plain Layout
9145 ftp://ftp.agu.org/journals/latex/journals
9153 \begin_layout Subsection
9157 \begin_layout Standard
9167 They are still called this in the LyX GUI, though their LaTeX equivalents
9168 in the AGU classes are
9179 \begin_layout Standard
9180 Newly defined styles are
9217 These are mostly manuscript attributes and defined in the AGU class documentati
9221 \begin_layout Standard
9222 I suspect this is still badly incomplete.
9225 \begin_layout Subsection
9229 \begin_layout Standard
9246 \begin_layout Subsection
9250 \begin_layout Itemize
9253 Journal of Geophysical Research
9262 \begin_layout Standard
9263 Add your own, it isn't so hard! Look at the
9274 \begin_layout Subsection
9275 Bugs and things to remember
9278 \begin_layout Standard
9279 In order to use the new layouts, you must remember to do the following for
9283 \begin_layout Enumerate
9289 This can be done in the
9291 Layout\SpecialChar \menuseparator
9296 Document\SpecialChar \menuseparator
9300 (AGU articles are always in English, right? So
9307 \begin_layout Enumerate
9317 (Yes, this is a bug.)
9320 \begin_layout Enumerate
9321 Make sure you use the
9325 bibliography style, by entering
9329 into the second field of the BibTeX inset.
9330 None of the standard styles will do.
9333 \begin_layout Section
9337 \begin_layout Standard
9343 \begin_layout Subsection
9347 \begin_layout Standard
9348 Broadway is for writing plays.
9349 The format is more decorative than Hollywood, and much less standardized.
9350 This format should be suitable for workshops.
9353 \begin_layout Subsection
9357 \begin_layout Standard
9358 The same as in Hollywood.
9361 \begin_layout Subsection
9365 \begin_layout Standard
9370 names as labels then cross-reference the label to insert the name.
9371 The cross-reference dialog will show the current cast of characters.
9374 \begin_layout Subsection
9375 Paper size and Margins
9378 \begin_layout Standard
9379 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9382 \begin_layout Subsection
9386 \begin_layout Standard
9387 The following environments are available.
9388 You can use broadway.bind to get the bind keys shown at the right.
9391 \begin_layout Itemize
9395 \begin_inset Newline newline
9400 You should not have to use this, but it is here for anything that does not
9404 \begin_layout Itemize
9408 \begin_inset space \hfill{}
9412 \begin_inset Newline newline
9417 Used to describe stage setting and the action.
9418 First use of speaker names in all CAPs.
9421 \begin_layout Itemize
9425 \begin_inset space \hfill{}
9429 \begin_inset Newline newline
9434 Automatically numbered.
9435 On screen it will be arabic, but will print as Roman.
9438 \begin_layout Itemize
9442 \begin_inset space \hfill{}
9446 \begin_inset Newline newline
9456 It is just centered text.
9459 \begin_layout Itemize
9463 \begin_inset space \hfill{}
9467 \begin_inset Newline newline
9472 Not automatically numbered.
9473 You supply the number.
9474 This is because I couldn't figure out how.
9477 \begin_layout Itemize
9481 \begin_inset space \hfill{}
9485 \begin_inset Newline newline
9490 A special case of Narrative to describe the setting and action as the curtain
9494 \begin_layout Itemize
9498 \begin_inset space \hfill{}
9502 \begin_inset Newline newline
9507 The speaker's (actor's) title, centered in all CAPS.
9510 \begin_layout Itemize
9514 \begin_inset space \hfill{}
9518 \begin_inset Newline newline
9523 Instructions to the speaker.
9524 The parentheses are automatically inserted.
9525 The ( will appear on screen, but both will be in the printed play.
9526 This environment is only used within
9533 \begin_layout Itemize
9537 \begin_inset space \hfill{}
9541 \begin_inset Newline newline
9546 What the Speaker says.
9549 \begin_layout Itemize
9553 \begin_inset space \hfill{}
9557 \begin_inset Newline newline
9562 The curtain comes down.
9565 \begin_layout Itemize
9569 \begin_inset space \hfill{}
9575 \begin_layout Itemize
9579 \begin_inset space \hfill{}
9585 \begin_layout Itemize
9589 \begin_inset space \hfill{}
9595 \begin_layout Standard
9599 \begin_layout Section
9603 \begin_layout Standard
9608 can be used to type letters according to German conventions.
9609 A template file is included in
9611 .../lyx/share/templates
9613 for you to use as a starting point.
9616 \begin_layout Section
9624 \begin_layout Standard
9630 \begin_layout Subsection
9634 \begin_layout Standard
9635 This is the layout file for the European Geophysical Society journals.
9640 can be downloaded from the web site of the EGS under
9641 \begin_inset Flex URL
9644 \begin_layout Plain Layout
9654 \begin_layout Subsection
9658 \begin_layout Standard
9661 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9669 The current layout file is unfortunately very unmodular and would benefit
9670 from using the various
9677 \begin_layout Section
9681 \begin_layout Standard
9687 \begin_layout Standard
9688 Elsevier Science Publishers B.V.
9689 provides a standard LaTeX document class (
9693 ) for submitting articles to their various journals.
9694 The style file can be downloaded directly from their web site:
9695 \begin_inset Flex URL
9698 \begin_layout Plain Layout
9700 http://www.elsevier.com/wps/find/authorsview.authors/latex
9706 Instructions are supplied along with the class file, which details the
9707 requirements of the publishers.
9708 LyX includes a package that allows for the use of this class, by a layout
9709 and a template file.
9710 Installation of the class file is the same as for any other LaTeX package;
9711 instructions are provided in the Elsevier documentation.
9714 \begin_layout Standard
9724 As the Elsevier class file is based mainly on the standard article class,
9725 most of the normal functionality is provided.
9726 The Elsevier class defines a number of mathematical environments, which
9727 are similar to the AMS environments.
9728 These commands are all described in the Elsevier documentation, and are
9732 \begin_layout Standard
9733 The easiest way to use the Elsevier style is to base documents on the included
9735 It is best not to use options such as fancy headings or the geometry package,
9736 as elements such as these are defined by Elsevier in their style file.
9737 Ideally, no extra packages except those mentioned in the Elsevier documentation
9739 Essentially, Elsevier require as
9740 \begin_inset Quotes eld
9744 \begin_inset Quotes erd
9747 a LaTeX file as possible, as their intention is to take the supplied file
9748 and replace the class file with one for the particular journal to which
9749 the paper has been submitted.
9750 This also means that not too much time should be spent on the formating
9752 When it comes to be published, this will change anyway.
9753 The rest of the usage for this layout is substantially the same as for
9754 the normal article class.
9755 For details of what Elsevier do and don't allow, refer to their documentation.
9758 \begin_layout Section
9764 \begin_inset CommandInset label
9773 \begin_layout Standard
9779 \begin_layout Subsection
9783 \begin_layout Standard
9784 This section describes how to use LyX to make slides for overhead projectors.
9785 There are two document classes that can do this: the default slides class
9791 This section documents the latter.
9794 \begin_layout Standard
9795 I'm going to say this again, nice and clear, so that there's no misunderstanding
9799 \begin_layout Standard
9800 \begin_inset VSpace bigskip
9806 \begin_layout Standard
9810 This section documents the class
9811 \begin_inset Quotes eld
9819 \begin_inset Quotes erd
9827 \begin_layout Standard
9828 \begin_inset VSpace bigskip
9834 \begin_layout Standard
9835 If you're looking for the documentation for
9836 \begin_inset Quotes eld
9844 \begin_inset Quotes erd
9848 \begin_inset space ~
9852 \begin_inset CommandInset ref
9854 reference "sec:slitex"
9859 If your machine doesn't have the
9864 \begin_inset Quotes eld
9872 \begin_inset Quotes erd
9875 ] installed, you'll probably have to use the default
9879 class, which isn't quite as good as
9884 \begin_layout Standard
9889 class is designed for use with version 2.1 of the
9893 LaTeX class file which is now an integral part of LaTeX2e.
9896 \begin_layout Subsection
9900 \begin_layout Standard
9901 Obviously, to use this document class, you need to select
9902 \begin_inset Quotes eld
9910 \begin_inset Quotes erd
9920 \begin_inset space ~
9926 There are some settings in the
9929 \begin_inset space ~
9934 dialog that you should know about that are specific to this class:
9937 \begin_layout Itemize
9938 Don't change the options
9949 \begin_inset space ~
9955 They're ignored by the
9962 \begin_layout Itemize
9963 The default font size is 20
9964 \begin_inset space \thinspace{}
9967 pt with the other options being 17
9968 \begin_inset space \thinspace{}
9972 \begin_inset space \thinspace{}
9976 \begin_inset space \thinspace{}
9982 \begin_layout Itemize
9991 but all math equations are still typeset in the usual roman font.
9994 \begin_layout Itemize
9999 supports A4 and Letter paper sizes as well as a special size for working
10001 \begin_inset space \thinspace{}
10005 It doesn't support A5, B5, legal or executive paper sizes.
10008 \begin_layout Itemize
10009 Don't bother changing the
10013 settings because they are ignored anyway.
10014 All floats appear where they are defined in the text.
10017 \begin_layout Itemize
10022 setting behaves a bit differently for this class.
10027 provides extensive footer and header capabilities including a user-defined
10030 \begin_inset space ~
10034 \begin_inset CommandInset ref
10036 reference "sec:foilfoot"
10041 The title page is treated differently to all other pages in the document
10050 has the logo centered at the bottom of the page (if one is defined).
10051 The possible page style choices and what they do are as follows:
10055 \begin_layout Labeling
10056 \labelwidthstring MMMMMMM
10063 The final output contains no page numbers, or other headers or footers
10064 (except footnotes of course).
10068 \begin_layout Labeling
10069 \labelwidthstring MMMMMMM
10076 The final output contains page numbers centered at the bottom of the page.
10077 No other headings or footers (other than footnotes).
10080 \begin_layout Labeling
10081 \labelwidthstring MMMMMMM
10086 Page numbers in lower right corner.
10087 Additional headers and footers are also shown.
10088 This is also the default.
10091 \begin_layout Labeling
10092 \labelwidthstring MMMMMMM
10097 Gives you access to the
10101 package although its use with
10105 is discouraged by the writer of the
10109 package because of some potential page layout clashes.
10113 \begin_layout Subsubsection
10117 \begin_layout Standard
10118 The following options may be used in the extra class options in the
10120 Document\SpecialChar \menuseparator
10126 \begin_layout Labeling
10127 \labelwidthstring MMMMMMx
10132 This sets up the page layout for 7.33
10133 \begin_inset space \thinspace{}
10137 \begin_inset space \thinspace{}
10140 in paper, which is about the same aspect ratio as a 35
10141 \begin_inset space \thinspace{}
10144 mm slide, making it a bit easier to work with this medium.
10147 \begin_layout Labeling
10148 \labelwidthstring MMMMMMx
10153 Places a rule across the page below the header on every page except the
10157 \begin_layout Labeling
10158 \labelwidthstring MMMMMMx
10163 Places a rule across the page above the footer on every page except the
10167 \begin_layout Labeling
10168 \labelwidthstring MMMMMMx
10173 This is automatically set each time you create a new
10182 to use the dvips driver to rotate those pages that are set as landscape
10186 \begin_layout Labeling
10187 \labelwidthstring MMMMMMx
10192 Simply changes the page dimensions to those of a landscape page but doesn't
10194 Thus if you use this option you need to use an external program to rotate
10195 each page or feed your paper through your printer as landscape.
10196 Note that this option effectively reverses the roles of the
10204 environments (don't worry these are described in the next section).
10207 \begin_layout Labeling
10208 \labelwidthstring MMMMMMx
10213 Equation numbers on the left.
10216 \begin_layout Labeling
10217 \labelwidthstring MMMMMMx
10222 Flush-left equations.
10225 \begin_layout Subsection
10226 Supported Environments
10229 \begin_layout Standard
10230 Most of the environments commonly supported in other classes are also supported
10236 There are several additional environments provided by
10240 as well as a couple added by LyX.
10241 The following environments are shared with other classes:
10244 \begin_layout Standard
10248 \begin_layout Plain Layout
10252 begin{multicols}{2}
10260 \begin_layout Itemize
10266 \begin_layout Itemize
10272 \begin_layout Itemize
10278 \begin_layout Itemize
10284 \begin_layout Itemize
10290 \begin_layout Itemize
10296 \begin_layout Itemize
10302 \begin_layout Itemize
10308 \begin_layout Itemize
10314 \begin_layout Itemize
10320 \begin_layout Itemize
10326 \begin_layout Itemize
10332 \begin_layout Itemize
10338 \begin_layout Itemize
10344 \begin_layout Itemize
10350 \begin_layout Itemize
10356 \begin_layout Itemize
10362 \begin_layout Itemize
10368 \begin_layout Standard
10372 \begin_layout Plain Layout
10384 \begin_layout Standard
10385 That is, all the major environments apart from the sectioning environments.
10386 Since foils are essentially self-contained sections, with a title and body,
10391 provides specific commands for starting new foils and these are:
10394 \begin_layout Itemize
10400 \begin_layout Itemize
10406 \begin_layout Standard
10407 LyX also provides slightly modified versions of these two environments called:
10410 \begin_layout Itemize
10416 \begin_layout Itemize
10419 ShortRotatefoilhead
10422 \begin_layout Standard
10423 and the differences will be explained in the next section.
10426 \begin_layout Standard
10427 Since foils are often used in presenting ideas or new theorems and such
10432 also provides a comprehensive box of goodies for presenting them:
10435 \begin_layout Standard
10439 \begin_layout Plain Layout
10443 begin{multicols}{2}
10451 \begin_layout Itemize
10457 \begin_layout Itemize
10463 \begin_layout Itemize
10469 \begin_layout Itemize
10475 \begin_layout Itemize
10481 \begin_layout Itemize
10487 \begin_layout Itemize
10493 \begin_layout Itemize
10499 \begin_layout Itemize
10505 \begin_layout Itemize
10511 \begin_layout Itemize
10517 \begin_layout Standard
10521 \begin_layout Plain Layout
10533 \begin_layout Standard
10534 The starred versions are unnumbered while the unstarred versions are numbered.
10535 There are also two list environments added by LyX and these are:
10538 \begin_layout Itemize
10544 \begin_layout Itemize
10550 \begin_layout Standard
10555 provides some powerful header and footer capabilities that are best set
10556 in the preamble although they may be set at any point in a document.
10557 If you want to change these settings in your document the best place to
10558 do so is at the very top of a foil, i.
10559 \begin_inset space \thinspace{}
10565 \begin_inset space \space{}
10570 straight after the foilhead.
10573 \begin_layout Standard
10574 For this purpose, the following command styles are provided [
10581 \begin_layout Standard
10585 \begin_layout Plain Layout
10589 begin{multicols}{2}
10597 \begin_layout Itemize
10601 \begin_inset space ~
10607 \begin_layout Itemize
10613 \begin_layout Itemize
10617 \begin_inset space ~
10623 \begin_layout Itemize
10627 \begin_inset space ~
10633 \begin_layout Itemize
10637 \begin_inset space ~
10644 \begin_layout Standard
10645 \begin_inset space ~
10652 \begin_layout Standard
10656 \begin_layout Plain Layout
10668 \begin_layout Standard
10669 There are also a few commands provided by
10673 that aren't directly supported by LyX but I'll tell you what they do and
10674 how to use them in section
10675 \begin_inset space ~
10679 \begin_inset CommandInset ref
10681 reference "sec:unsuppfoils"
10688 \begin_layout Subsection
10689 Building a Set of Foils
10692 \begin_layout Standard
10693 This section will give a simple introduction to using the different environments
10694 to build a set of foils.
10695 If you want to see an example set of foils, take a look at the
10699 file you find in LyX's
10706 \begin_layout Subsubsection
10707 Give It a Title Page
10710 \begin_layout Standard
10711 Unlike other classes that provide
10731 creates the title on a page of its own.
10732 If you leave out the
10736 environment LaTeX will substitute the current date (every time you regenerate
10740 \begin_layout Subsubsection
10744 \begin_layout Standard
10745 As I mentioned earlier, there are four ways of starting a new foil.
10746 For portrait foils you should use
10755 The difference between these two environments is the amount of space between
10756 the title of the foil (the foilhead) and the body of the foil.
10759 \begin_layout Standard
10760 Landscape foils are generated using the
10766 ShortRotatefoilhead
10769 Again the only difference is the spacing between foilhead and body.
10770 Both of the short versions have 0.5 inches less separation between the foilhead
10775 \begin_layout Standard
10776 One problem with the support for landscape foils is the requirement that
10777 you have to use the
10781 driver to generate the PostScript output otherwise the foils won't be rotated.
10782 It is possible to get landscape foils even if you haven't got the
10786 driver provided you can feed your foils sideways through your printer ;-)
10789 \begin_layout Subsubsection
10790 Theorems, Lemmas, Proofs and more
10793 \begin_layout Standard
10794 Due to a small bug in LyX you can't have two of the same type of these environme
10795 nts directly following each other.
10796 They must be separated by something.
10797 If you try, you will just be extending the previous environment as if you
10798 had merged the two environments together.
10799 So, how do you get around this problem? The simplest option is to insert
10800 some text between the two environments or add a
10804 environment between the two with just a
10805 \begin_inset Quotes eld
10813 \begin_inset Quotes erd
10817 This will force LyX to produce two separate environments and hence the
10818 correct LaTeX output.
10819 An example is provided in the example file included with the LyX distribution.
10820 Remember, this problem only occurs if you are trying to place two of the
10821 same type of theorem-like environments one directly after the other.
10824 \begin_layout Subsubsection
10828 \begin_layout Standard
10829 You get all the commonly supported list styles found in other classes as
10830 well as two new ones.
10831 I'll only describe the new ones here.
10832 If you want to find out more about the other list environments check out
10838 If you intend to use itemized lists you might also want to read about the
10842 \begin_inset space ~
10846 \begin_inset space ~
10851 dialog described above in section
10852 \begin_inset space ~
10856 \begin_inset CommandInset ref
10858 reference "sec:bullet"
10865 \begin_layout Standard
10866 The two new list styles,
10874 , are designed to make it easier for you to create lists of do's and don'ts
10875 or right and wrong by providing dedicated environments that use a tick
10876 or a cross as the label of the list.
10877 These lists are in fact dedicated variants of the
10882 They do however require that you have the
10886 packages installed.
10889 \begin_layout Subsubsection
10893 \begin_layout Standard
10898 redefines the floating tables and figures so that they appear exactly where
10899 they are in the text rather than pushing them to the top of the page or
10900 to some user specified location.
10901 In fact if you change the float placement settings they are simply ignored.
10904 \begin_layout Subsubsection
10905 Page Headers and Footers
10906 \begin_inset CommandInset label
10908 name "sec:foilfoot"
10915 \begin_layout Standard
10919 \begin_inset space ~
10928 are two commands used to control the left-footer text string.
10929 The first is meant to allow you to include a graphic logo on your foils
10931 \begin_inset Quotes eld
10939 \begin_inset Quotes erd
10943 While the second is meant to provide a classification for the audience,
10947 \begin_inset space \thinspace{}
10953 \begin_inset space \space{}
10957 It is empty by default.
10960 \begin_layout Standard
10961 The remaining page corners can be filled by
10964 \begin_inset space ~
10969 (which defaults to page numbers),
10972 \begin_inset space ~
10980 \begin_inset space ~
10988 \begin_layout Subsection
10994 \begin_inset CommandInset label
10996 name "sec:unsuppfoils"
11003 \begin_layout Standard
11004 All the commands mentioned below need to be set in a
11012 within another environment.
11015 \begin_layout Subsubsection
11019 \begin_layout Standard
11020 All lengths are adjusted using the
11043 should be replaced by the name given to the length you want to change and
11048 is the length value.
11049 All lengths should be specified in units of length such as inches (
11061 ) or relative to some document or font-based length such as
11071 \begin_layout Standard
11072 It's possible to change the spacing between a foilhead and the body of the
11073 foil by adjusting the length specified by
11080 For example, to make
11085 \begin_inset space \space{}
11088 in closer to their bodies put the following in the preamble:
11094 foilheadskip}{-0.5in}
11097 \begin_layout Standard
11098 The spacings around floats can be adjusted by setting these lengths:
11101 \begin_layout Labeling
11102 \labelwidthstring MMMMMMMMMMM
11109 Separation between the text and the top of the float
11112 \begin_layout Labeling
11113 \labelwidthstring MMMMMMMMMMM
11120 Separation between the float and the caption
11123 \begin_layout Labeling
11124 \labelwidthstring MMMMMMMMMMM
11131 Separation between the caption and the following text
11134 \begin_layout Labeling
11135 \labelwidthstring MMMMMMMMMMM
11142 You can make the captions narrower than the surrounding text by adjusting
11144 Best done relative to
11153 \begin_layout Standard
11154 There are also several title page related lengths that you may find useful
11155 if you have a long title or several authors:
11158 \begin_layout Labeling
11159 \labelwidthstring MMMMMMMMMMM
11166 Separation from headers to
11171 \begin_layout Labeling
11172 \labelwidthstring MMMMMMMMMMM
11190 \begin_layout Labeling
11191 \labelwidthstring MMMMMMMMMMM
11205 \begin_layout Labeling
11206 \labelwidthstring MMMMMMMMMMM
11222 \begin_layout Labeling
11223 \labelwidthstring MMMMMMMMMMM
11239 \begin_layout Standard
11240 The last length related command affects all the list environments.
11251 a list environment then all the vertical spacing between the list items
11253 Note that this is a command not a length so it doesn't require
11259 like the stuff mentioned above.
11262 \begin_layout Subsubsection
11263 Headers and Footers
11266 \begin_layout Standard
11279 commands control whether the logo in the
11283 definition appear on a given page.
11290 in the preamble then none of the foils will have the logo on them.
11291 If you don't want the logo on a particular page place the
11297 directly after the foilhead of that page and the
11303 directly after the next foilhead.
11306 \begin_layout Standard
11307 If you decide to use the
11311 page style setting in the
11314 \begin_inset space ~
11319 dialog you should probably add
11329 to your preamble so headers and footers on landscape pages are correctly
11330 placed when rotated.
11331 This is due to some clashes between the page layouts provided by the
11342 \begin_layout Section
11343 Hollywood (Hollywood spec scripts)
11346 \begin_layout Standard
11352 \begin_layout Subsection
11356 \begin_layout Standard
11357 Getting the format of a Hollywood script right is a
11358 \begin_inset Quotes eld
11362 \begin_inset Quotes erd
11365 It is designed to make the readers focus on content and to be easy and
11366 familiar for the actors to read.
11367 Each page of a script should be one minute of film.
11368 Nothing goes in a script that you cannot see or hear on screen.
11369 The courier 12 pt font should be used throughout.
11373 \begin_layout Subsection
11377 \begin_layout Standard
11378 Speakers' lines should NEVER break in mid-sentence.
11379 If a speaker's lines continue over a page break, repeat the
11383 title followed by (Cont'd).
11386 \begin_layout Subsection
11390 \begin_layout Standard
11395 names as labels then cross-reference the label to insert the name.
11396 The cross-reference dialog will show the current cast of characters.
11397 You can use this to insert the speaker name in narratives also.
11400 \begin_layout Subsection
11401 Paper size and Margins
11404 \begin_layout Standard
11405 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11408 \begin_layout Subsection
11412 \begin_layout Standard
11413 The following environments are available.
11414 You can use hollywood.bind to get the bind keys shown at the right.
11417 \begin_layout Itemize
11421 \begin_inset Newline newline
11426 Used where nothing else works.
11430 \begin_layout Itemize
11436 \begin_inset space \hfill{}
11444 \begin_inset Newline newline
11447 Usually followed by something like
11448 \begin_inset Quotes eld
11451 on Sally waking up.
11452 \begin_inset Quotes erd
11458 \begin_layout Itemize
11462 \begin_inset space \hfill{}
11466 \begin_inset Newline newline
11471 Introduces a new INTERIOR camera set-up.
11472 Always followed by DAY or NIGHT, or something similar to define the lighting
11474 Everthing on this line in CAPS.
11477 \begin_layout Itemize
11481 \begin_inset space \hfill{}
11485 \begin_inset Newline newline
11490 Introduces a new EXTERIOR camera set-up.
11491 Everthing on this line in CAPS.
11494 \begin_layout Itemize
11498 \begin_inset space \hfill{}
11502 \begin_inset Newline newline
11507 The character speaking.
11510 \begin_layout Itemize
11514 \begin_inset space \hfill{}
11518 \begin_inset Newline newline
11523 Instructions to the speaker.
11524 The () are automatically inserted, but only the ( will show in LyX.
11525 Both will be printed.
11528 \begin_layout Itemize
11532 \begin_inset space \hfill{}
11536 \begin_inset Newline newline
11548 \begin_layout Itemize
11552 \begin_inset space \hfill{}
11556 \begin_inset Newline newline
11561 Camera movement instruction.
11563 \begin_inset space \thinspace{}
11567 \begin_inset space \space{}
11573 \begin_layout Itemize
11577 \begin_inset space \hfill{}
11583 \begin_layout Itemize
11587 \begin_inset space \hfill{}
11593 \begin_layout Itemize
11597 \begin_inset space \hfill{}
11603 \begin_layout Itemize
11607 \begin_inset space \hfill{}
11613 \begin_layout Subsection
11617 \begin_layout Itemize
11621 \begin_layout Itemize
11625 \begin_layout Itemize
11627 \begin_inset space \thinspace{}
11634 \begin_layout Itemize
11639 \begin_layout Itemize
11640 PAN — camera movement
11643 \begin_layout Itemize
11644 INSERT — cut to close-up of
11647 \begin_layout Section
11651 \begin_layout Standard
11654 Panayotis Papasotiriou
11657 \begin_layout Subsection
11661 \begin_layout Standard
11662 The ijmpc package is a set of macros that facilitates electronic manuscript
11665 International Journal of Modern Physics C
11668 Similarly, the ijmpd package is for creating manuscripts to be submitted
11671 International Journal of Modern Physics D
11674 Both journals are published by World Scientific.
11675 The corresponding document classes are named
11684 These files, together with instructions for the authors, can be downloaded
11686 \begin_inset Flex URL
11689 \begin_layout Plain Layout
11691 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11697 \begin_inset Flex URL
11700 \begin_layout Plain Layout
11702 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11708 Both packages are modified versions of the standard
11709 \begin_inset Quotes eld
11713 \begin_inset Quotes erd
11716 package, and they are almost (but not exactly) identical.
11717 Most of their features are supported by LyX.
11718 I have used LyX successfully to write articles submitted to both journals
11719 without any problem.
11722 \begin_layout Subsection
11726 \begin_layout Standard
11727 As usual, the easiest way to write a paper is to start with a template.
11730 File\SpecialChar \menuseparator
11749 This will give an (almost) empty document that includes the most common
11750 fields found in a manuscript.
11751 Simply overwrite the existing text (including the brackets,
11756 You should keep in mind the following remarks.
11759 \begin_layout Enumerate
11760 LyX won't let you change the font size and the page style of the document,
11761 because such modifications are not allowed by both packages.
11764 \begin_layout Enumerate
11765 The language of the document should not be changed.
11766 Before previewing your paper, be sure that the babel package is not used.
11767 To do this, click on
11769 Tools\SpecialChar \menuseparator
11780 checkbox in the language settings, and click on
11788 , if you wish to make this change permanent).
11791 \begin_layout Enumerate
11793 \begin_inset Quotes eld
11797 \begin_inset Quotes erd
11800 style must be used to define keywords.
11803 \begin_layout Enumerate
11804 The ijmpc package provides a style named
11805 \begin_inset Quotes eld
11808 Classification Codes
11809 \begin_inset Quotes erd
11812 , which can be used to define classification codes, such as PACS numbers.
11813 Note that this facility is not supported by the ijmpd package.
11816 \begin_layout Enumerate
11817 Several new environments are available:
11818 \begin_inset Quotes eld
11822 \begin_inset Quotes erd
11826 \begin_inset Quotes eld
11830 \begin_inset Quotes erd
11834 \begin_inset Quotes eld
11838 \begin_inset Quotes erd
11842 \begin_inset Quotes eld
11846 \begin_inset Quotes erd
11850 \begin_inset Quotes eld
11854 \begin_inset Quotes erd
11858 \begin_inset Quotes eld
11862 \begin_inset Quotes erd
11866 \begin_inset Quotes eld
11870 \begin_inset Quotes erd
11874 \begin_inset Quotes eld
11878 \begin_inset Quotes erd
11882 \begin_inset Quotes eld
11886 \begin_inset Quotes erd
11890 \begin_inset Quotes eld
11894 \begin_inset Quotes erd
11898 \begin_inset Quotes eld
11902 \begin_inset Quotes erd
11906 \begin_inset Quotes eld
11910 \begin_inset Quotes erd
11914 \begin_inset Quotes eld
11918 \begin_inset Quotes erd
11922 \begin_inset Quotes eld
11926 \begin_inset Quotes erd
11930 Their use is more or less obvious.
11931 LyX supports all these environments; it will use the proper label, text
11932 style, and numbering scheme for each of them.
11935 \begin_layout Enumerate
11936 Both packages use basic citations; the natbib package should not be used.
11937 In LyX, citation references are shown as usual; in the output, citations
11938 are shown as superscripts.
11939 If you want to use a citation as normal text, you should use the
11944 \begin_inset space \thinspace{}
11948 \begin_inset space \space{}
11952 \begin_inset Quotes eld
11956 \begin_inset space \space{}
11966 \begin_inset Quotes erd
11972 \begin_layout Enumerate
11974 \begin_inset Quotes eld
11978 \begin_inset Quotes erd
11981 section in both packages.
11982 To put acknowledgments, just use the
11983 \begin_inset Quotes eld
11987 \begin_inset Quotes erd
11993 \begin_layout Enumerate
11994 Appendices may be added to the paper,
11998 the Acknowledgments and
12003 LyX provides a special environment, called
12004 \begin_inset Quotes eld
12008 \begin_inset Quotes erd
12011 which marks the beginning of the appendices.
12012 This environment should be left blank; it just sends a LaTeX command, but
12013 nothing is really printed.
12015 \begin_inset Quotes eld
12019 \begin_inset Quotes erd
12022 is printed with blue letters, as a signal that all sections after that
12023 point are appendices.
12024 To write an appendix, use the
12025 \begin_inset Quotes eld
12029 \begin_inset Quotes erd
12033 LyX will number each appendix with capital letters, as required by both
12036 \begin_inset Quotes eld
12040 \begin_inset Quotes erd
12047 be present before the first appendix; if not, all appendices will be numbered
12048 as normal sections in the output.
12051 \begin_layout Enumerate
12052 The ijmpc and the ijmpd packages use the
12056 command to implement table captions.
12057 As a result, a table created by LyX is printed correctly, but its caption
12059 However, you can use some TeX code to overcome this problem, so that captions
12060 are printed as expected.
12061 To do so, create a float table as usual, remove the caption, and replace
12062 it with the TeX code
12072 (sic); you must also the TeX code
12076 immediately after the tabular material.
12077 Study the example table included in the template files to see how this
12078 trick is implemented.
12079 Alternatively, If you need table captions, you should implement the whole
12084 file, then include this file to the LyX document (
12086 Insert\SpecialChar \menuseparator
12087 File\SpecialChar \menuseparator
12089 \begin_inset space ~
12095 Details on how to create a table float can be found in the files
12103 , included in the corresponding packages.
12106 \begin_layout Subsection
12107 Preparing a paper for submission
12110 \begin_layout Standard
12111 Before you submit your paper you must export the LyX document as a LaTeX
12114 File\SpecialChar \menuseparator
12115 Export\SpecialChar \menuseparator
12122 \begin_layout Plain Layout
12123 Actually you have the choice between LaTeX (plain) and pdflatex.
12124 If you intend to use pdflatex to prepare the paper, you should use the
12125 pdflatex option so that included graphics are converted to PDF format,
12126 ready for use by pdflatex.
12131 , then make the following changes to the resulting
12138 \begin_layout Enumerate
12139 Remove the comment lines before the
12148 \begin_layout Enumerate
12149 Remove everything between (and including) the
12161 commands, except for any commands you specifically put into the LaTeX preamble.
12164 \begin_layout Standard
12169 file should be saved and processed through LaTeX as many times as necessary.
12170 You may also want to check the resulting
12177 \begin_layout Subsection
12181 \begin_layout Standard
12182 The use of TeX code is reduced to two commands, which must be placed at
12183 the top of the document.
12184 If you started writing your paper by using the
12192 template, the TeX code needed is already in its place; you usually don't
12194 You may only modify the first TeX code to specify the information printed
12195 to the top of odd and even pages (authors' names and short paper's title,
12197 This TeX code must have the form
12201 markboth{Authors' Names}{Short Paper's Title}
12206 \begin_layout Section
12210 \begin_layout Standard
12216 \begin_layout Subsection
12220 \begin_layout Standard
12221 The iopart package provides a document class to create electronic manuscript
12222 submission to the journals published by the Institute of Physics.
12223 Instructions for the authors how to create a paper using the iopart class
12224 can be downloaded together with the iopart package from the site
12225 \begin_inset Flex URL
12228 \begin_layout Plain Layout
12230 ftp://ftp.iop.org/pub/journals/latex2e
12238 \begin_layout Subsection
12242 \begin_layout Standard
12243 The easiest way to write a paper is to start with the file
12247 that is available in LyX's examples files folder.
12248 Open this file, save it under a new name, and start writing.
12249 The example file explains how to use the special text environments.
12250 Here are the most important advices:
12253 \begin_layout Itemize
12254 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12257 Use AMS math package
12259 in the document settings under
12266 \begin_layout Itemize
12269 The title environment defines the kind of your paper.
12270 So use one of the following environments for the title:
12274 \begin_layout Itemize
12283 \begin_layout Itemize
12292 \begin_layout Itemize
12298 for a Topical review
12301 \begin_layout Itemize
12310 \begin_layout Itemize
12319 \begin_layout Itemize
12325 for a Paper (same as Title)
12328 \begin_layout Itemize
12334 for a Preliminary communication
12337 \begin_layout Itemize
12343 for a Rapid communication
12346 \begin_layout Itemize
12352 for a Letter to the editor
12356 \begin_layout Itemize
12359 All title environments except of
12363 can have an optional short title.
12366 \begin_layout Itemize
12367 There is a general title environment
12371 which is not directly supported by the LyX.
12372 This can be used as TeX code when your document doesn't fit into one of
12373 the other title types.
12376 \begin_layout Standard
12377 For more informations like hints for special table and formula formatting,
12378 look at the IOP author guidelines.
12381 \begin_layout Section
12385 \begin_layout Standard
12388 Panayotis Papasotiriou
12391 \begin_layout Subsection
12395 \begin_layout Standard
12396 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12397 that facilitates electronic manuscript submission to the journals they
12399 Most known of them (at least in my domain of interest) are
12401 Astrophysics and Space Science
12407 , but there are many others (see a complete list at
12408 \begin_inset Flex URL
12411 \begin_layout Plain Layout
12413 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12419 The Kluwer package may be downloaded from the site
12420 \begin_inset Flex URL
12423 \begin_layout Plain Layout
12425 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12431 A complete user guide is contained in that package (but it can also be
12432 downloaded separately).
12435 \begin_layout Standard
12436 LyX supports many features of the package but not everything.
12437 However, the TeX code needed is reduced to some
12438 \begin_inset Quotes eld
12442 \begin_inset Quotes erd
12445 commands of the package (see
12446 \begin_inset space ~
12450 \begin_inset CommandInset ref
12452 reference "subsec:kluwer_peculiarities"
12457 I have recently used LyX to write an article submitted to the
12459 Astrophysics and Space Science
12461 without any problem.
12464 \begin_layout Subsection
12468 \begin_layout Standard
12469 The easiest way to write a paper is to start with the Kluwer template file.
12472 File\SpecialChar \menuseparator
12484 This will give an (almost) empty document that includes the most common
12485 fields found in a manuscript and a short description of their use.
12486 As in most templates, simply overwrite the existing text (including the
12491 ) with the correct information.
12494 \begin_layout Subsection
12495 Preparing a paper for submission
12498 \begin_layout Standard
12499 As in the AASTeX package, before you submit your paper to a journal you
12501 \begin_inset Quotes eld
12505 \begin_inset Quotes erd
12511 \begin_layout Enumerate
12512 Export your paper as a LaTeX file.
12513 To do this, click on
12515 File\SpecialChar \menuseparator
12516 Export\SpecialChar \menuseparator
12523 \begin_layout Enumerate
12528 file with a text editor and make the following changes
12532 \begin_layout Enumerate
12533 remove the comment lines before the
12542 \begin_layout Enumerate
12543 remove everything between (and including) the
12555 commands, except for any commands you specifically put into the LaTeX preamble.
12558 \begin_layout Standard
12567 \begin_layout Enumerate
12572 file through LaTeX as many times as necessary (usually up to three).
12575 \begin_layout Enumerate
12581 \begin_inset space \thinspace{}
12585 \begin_inset space \space{}
12592 , and check if everything is OK (it should, if you didn't make any mistake).
12595 \begin_layout Subsection
12596 \begin_inset Quotes eld
12600 \begin_inset Quotes erd
12603 of the Kluwer package
12604 \begin_inset CommandInset label
12606 name "subsec:kluwer_peculiarities"
12613 \begin_layout Standard
12614 The Kluwer package has the following
12615 \begin_inset Quotes eld
12619 \begin_inset Quotes erd
12625 \begin_layout Enumerate
12626 It is possible to write multiple articles in the same LaTeX file
12630 \begin_layout Plain Layout
12631 I can't imagine any good reason to do this.
12637 Each article must be included in the environment
12638 \begin_inset Quotes eld
12642 \begin_inset Quotes erd
12646 Unfortunately, this environment cannot be omitted, even if you write just
12648 Therefore, each article starts with the command
12654 and, obviously, ends with the command
12661 Although this can be implemented in LyX, I didn't included it, since it
12662 looks ugly and can confuse the novice user.
12663 Therefore, you need to enter them directly and mark them as LaTeX code
12665 \begin_inset Quotes eld
12669 \begin_inset Quotes erd
12675 \begin_layout Enumerate
12676 Information given at the beginning of the article (i.
12677 \begin_inset space \thinspace{}
12681 \begin_inset space \space{}
12684 title, subtitle, author, institution, running title, running author, abstract
12685 and keywords) must be included in an environment called
12686 \begin_inset Quotes eld
12690 \begin_inset Quotes erd
12694 This is not implemented in LyX, so you must enter title, subtitle etc.
12695 \begin_inset space ~
12698 between two TeX code lines (
12713 \begin_layout Enumerate
12714 According to the user manual, the label of each bibliography item must be
12738 \begin_layout Standard
12743 template takes care of all these
12744 \begin_inset Quotes eld
12748 \begin_inset Quotes erd
12752 If you start a new paper using this template you don't need to do anything
12757 \begin_layout Enumerate
12758 don't delete the TeX code included in the template, and
12761 \begin_layout Enumerate
12762 copy the example bibliography item included in the template and modify it
12763 as necessary to enter new bibliography items.
12766 \begin_layout Section
12770 \begin_layout Standard
12776 \begin_layout Subsection
12780 \begin_layout Standard
12781 The LyX document classes
12783 article (koma-script)
12787 report (koma-script)
12805 correspond to the LaTeX document classes
12822 \begin_inset space ~
12825 of the Koma-Script family.
12826 They are replacements for the standard document classes
12842 , resp., and fit better to European typography conventions in a number of
12846 \begin_layout Itemize
12847 Standard character size is 11pt in
12849 article (koma-script)
12853 report (koma-script)
12861 letter (koma-script)
12866 \begin_layout Itemize
12867 Headings, labels of the description environment, and a number of elements
12870 letter (koma-script)
12872 document class are set in a bold sans serif font.
12876 \begin_layout Plain Layout
12877 There is a big difference between the bold sans serif old cm fonts and new
12878 ec fonts, especially in the appearance of headings.
12879 In comparison, the ec bold sans serif fonts look a bit thin.
12880 Here the LaTeX package
12888 helps to produce the
12889 \begin_inset Quotes eld
12893 \begin_inset Quotes erd
12896 appearance when using the ec fonts.
12901 The numbering of chapter headings is made in the same way as the numbering
12902 of section headings, that is without the extra line
12903 \begin_inset Quotes eld
12906 Chapter\SpecialChar \ldots{}
12908 \begin_inset Quotes erd
12912 In addition, the appearance of the headings can be modified by using a
12913 number of options (in LyX to be entered in the field
12916 \begin_inset space ~
12923 Layout\SpecialChar \menuseparator
12930 \begin_layout Itemize
12931 The main means in the Koma-Script document classes to design the type area
12940 (in LyX to be entered in the extra class options field in the dialog
12942 Document\SpecialChar \menuseparator
12946 They make a clearer modification of page margins possible as do the options
12949 Document\SpecialChar \menuseparator
12956 \begin_layout Itemize
12957 The LaTeX document classes of the Koma-Script family define a number of
12958 additional commands.
12959 Those part of it which makes sense in LyX is implemented in corresponding
12963 \begin_layout Standard
12964 Detailed descriptions of the LaTeX document classes of the Koma-Script family
12965 can be found in the Koma-Script documentation
12976 \begin_layout Subsection
12977 article (koma-script), report (koma-script), and book (koma-script)
12980 \begin_layout Standard
12981 The document classes
12983 article (koma-script)
12987 report (koma-script)
12997 are implemented in the layout files
13010 They contain all the paragraph types of the corresponding standard document
13023 , resp., partly modified, with the exception of the LyX specific
13027 -type, which is replaced by the new
13031 -type having the same functionality.
13036 -Type there is a number of new paragraph types added.
13043 letter (koma-script)
13048 \begin_layout Itemize
13057 : are equivalents to
13065 , resp., additionally inserting an entry in the table of contents.
13074 are not contained in
13076 article (koma-script)
13081 \begin_layout Itemize
13090 : behave exactly as
13098 , resp., additionally clearing running heads.
13103 is not contained in
13105 article (koma-script)
13111 \begin_layout Plain Layout
13124 report (koma-script)
13126 , but since this is identical to
13130 , is has not been implemented in LyX.
13138 \begin_layout Itemize
13143 : generates a heading directly above the following paragraph in the standard
13144 character size without affecting the structure of the document.
13147 \begin_layout Itemize
13156 are special captions which respect the different space settings needed
13157 for captions placed above or below an element (if you follow strict typographic
13158 rules, you might want to place table captions always above the table).
13159 You can also use the class option
13163 , which will switch
13176 You need at least Koma-Script version 2.8q to use this.
13179 \begin_layout Itemize
13184 : can be used to set a bonmot, e.
13185 \begin_inset space \thinspace{}
13189 \begin_inset space \space{}
13192 at the beginning of a chapter.
13193 If you use the optional argument (
13195 Insert\SpecialChar \menuseparator
13197 \begin_inset space ~
13202 ), you can insert the dictum's author there.
13203 Dictum and author are separated by a line.
13204 You need at least Koma-Script version 2.8q to use this.
13209 is not contained in
13211 article (koma-script)
13216 \begin_layout Standard
13217 The following types, together with the standard types
13229 , form the title area of the document.
13230 They must be entered ahead of the first
13231 \begin_inset Quotes eld
13235 \begin_inset Quotes erd
13242 \begin_layout Plain Layout
13243 The corresponding LaTeX commands must appear before the
13254 When such a type is used more than once, the latter usage overwrites the
13255 former one, that means, for every type only the latest usage is valid.
13256 The order of the different types however has, like
13268 , no effect on the appearance of the produced document.
13271 \begin_layout Itemize
13276 : produces a centered paragraph above the ordinary title (
13288 ) for the subject of the document.
13291 \begin_layout Itemize
13296 : produces a centered paragraph below the ordinary title (
13308 ) for the publishers' name.
13311 \begin_layout Itemize
13318 report (koma-script)
13324 produces a centered paragraph on its own page behind the title page, or
13327 article (koma-script)
13329 produces a centered paragraph below the ordinary title (
13345 ) for a dedication.
13348 \begin_layout Itemize
13353 : produces a left aligned paragraph above the ordinary title (
13369 ) for a document`s head.
13372 \begin_layout Itemize
13377 : produces in a double-sided print in
13379 report (koma-script)
13385 a left-aligned paragraph at the top of the title page`s back or has no
13386 effect in a single-sided print or in
13388 article (koma-script)
13393 \begin_layout Itemize
13398 : produces in a double-sided print in
13400 report (koma-script)
13406 a left-aligned paragraph at the bottom of the title page`s back or has
13407 no effect in a single-sided print or in
13409 article (koma-script)
13414 \begin_layout Itemize
13419 : produces a special
13420 \begin_inset Quotes eld
13424 \begin_inset Quotes erd
13427 page ahead of the actual document containing a paragraph without special
13431 \begin_layout Standard
13432 The layout files for the document classes
13434 article (koma-script)
13438 report (koma-script)
13444 do include the file
13449 This is thought of as a place to define your own types.
13454 in your personal layout directory and edit the file!
13457 \begin_layout Subsection
13458 letter (koma-script)
13461 \begin_layout Standard
13465 \begin_layout Plain Layout
13477 \begin_layout Standard
13481 letter (koma-script)
13483 is implemented in the layout file
13488 It contains all the paragraph types of the corresponding standard document
13493 , partly modified, with the exception of the LyX specific types
13505 type, which is replaced by the new
13510 In addition, it contains, in contrast to the standard document class, the
13528 Furthermore, there are a number of new letter specific types.
13531 \begin_layout Standard
13535 \begin_layout Plain Layout
13547 \begin_layout Standard
13548 The appearance of the letter produced by this document class can be controlled
13549 by a number of LaTeX commands, which you can put in the LaTeX preamble.
13553 \begin_layout Plain Layout
13554 For example, the standard appearance of the letter`s heading, consisting
13555 of name and address, is quite self-willed.
13557 \begin_inset Quotes eld
13561 \begin_inset Quotes erd
13564 heading is produced by the following LaTeX commands in the preamble:
13567 \begin_layout LyX-Code
13577 \begin_layout LyX-Code
13593 \begin_layout LyX-Code
13603 \begin_layout LyX-Code
13623 A detailed German description of such LaTeX commands can be found in the
13624 Koma-Script documentation
13629 With it, the letter's author can produce his personal letter layout.
13632 \begin_layout Standard
13641 define the beginning of the letter and must be used in every letter.
13642 To emphasize them in the LyX document class, they are marked with the letter
13652 \begin_inset space ~
13655 in the left margin.
13656 It is possible to write any number of letters in one file.
13661 type produces a new letter using the same addressee and a
13665 type produces a new addressee.
13682 are ordinary paragraph types and can also be used several times in one
13683 and the same letter.
13686 \begin_layout Itemize
13691 : produces a paragraph for the addressee and implicitly defines the beginning
13695 \begin_layout Itemize
13700 : produces a paragraph for the form of address and implicitly produces a
13704 \begin_layout Itemize
13709 : produces a paragraph for a close.
13712 \begin_layout Itemize
13717 : produces a paragraph for a postscript.
13720 \begin_layout Itemize
13725 : produces a paragraph for a distribution list.
13728 \begin_layout Itemize
13733 : produces a paragraph for enclosures.
13736 \begin_layout Standard
13777 are input types provided with a label to enter information, which will
13778 be processed by the document class.
13782 \begin_layout Plain Layout
13783 It could be seen as a matter of inconsequence, that the types
13791 described above are not such input types as well.
13792 Because of the special meaning of those types, however, I have implemented
13793 them as ordinary paragraph types with a one letter mark in the left margin.
13794 Moreover, it would affect my feeling of symmetry, if the
13802 type had such a serious different appearance.
13807 The types must be used ahead of the corresponding
13814 \begin_layout Standard
13815 An implementation of these types in a WYSIWYG fashion does not seem to make
13816 sense, because the real appearance of the produced letter does not only
13817 depend on the usage of the particular type, but also on other factors.
13818 For example, a signature entered in the
13822 type will in the standard behavior appear in the produced letter only,
13823 when in the same letter also a
13828 The entered value of the
13832 type will in the standard behavior not appear in the produced letter at
13834 The possibility to design the letter`s heading freely is already indicated
13835 in a footnote above.
13838 \begin_layout Standard
13839 The input types can also be used as empty paragraphs.
13840 This makes sense e.
13841 \begin_inset space \thinspace{}
13845 \begin_inset space \space{}
13857 type is not used at all, in the standard behavior the value of the
13861 type is used as signature, whereas if an empty
13865 type is used, no signature value is defined.
13868 \begin_layout Standard
13869 By using the input types it is possible to write a letter template, containing
13870 filled input types with your personal dates (name, address, etc.) and empty
13871 input types for other dates you want to enter.
13874 \begin_layout Itemize
13879 : sender's name, in the standard behavior appears as a centered paragraph
13880 in small caps in the letter`s heading.
13883 \begin_layout Itemize
13888 : sender's signature, in the standard behavior appears below the
13897 type is used, the value of the
13901 type appears instead.
13904 \begin_layout Itemize
13909 : sender's address, in the standard behavior appears in a centered paragraph
13910 in the letter`s heading below the sender's name.
13913 \begin_layout Itemize
13918 : sender's telephone number, in the standard behavior only sets the LaTeX
13928 \begin_layout Itemize
13933 : place of the letter`s making.
13936 \begin_layout Itemize
13941 : date of the letter`s making.
13950 , in the standard behavior, produce the place and the date in a right-aligned
13951 line below the addressee's field.
13956 type is used, neither place nor date appear, independent of the value of
13966 type is used, the date of the letter `s production is used.
13969 \begin_layout Itemize
13974 : sender`s back address, in the standard behavior appears above the addressee's
13975 field in a small sans serif font.
13978 \begin_layout Itemize
13983 : special mail information, in the standard behavior appears underlined
13984 above the addressee's field below the back address.
13987 \begin_layout Itemize
13992 : additional information, in the standard behavior appears on right side
13993 below the addressee`s field.
13996 \begin_layout Itemize
14001 : the letter's title, in the standard behavior appears in a big, bold, sans
14002 serif font above the subject.
14005 \begin_layout Itemize
14010 : the letter's subject, in the standard behavior appears in a bold font
14018 \begin_layout Standard
14039 produce a business letter like line above the
14043 line containing the fields
14044 \begin_inset Quotes eld
14048 \begin_inset Quotes erd
14052 \begin_inset Quotes eld
14056 \begin_inset Quotes erd
14060 \begin_inset Quotes eld
14064 \begin_inset Quotes erd
14068 \begin_inset Quotes eld
14072 \begin_inset Quotes erd
14076 \begin_inset Quotes eld
14080 \begin_inset Quotes erd
14084 \begin_inset Quotes eld
14088 \begin_inset Quotes erd
14092 For the date field, the value of the
14098 \begin_inset Quotes eld
14101 business letter types
14102 \begin_inset Quotes erd
14105 is used, the value of the
14109 type however does not appear, but only the LaTeX variable
14116 The ordinary output of place and date in a right-aligned line below the
14117 addressee`s field is suppressed.
14118 The types are implemented as input types provided with a label and must
14119 be used ahead of the corresponding
14126 \begin_layout Itemize
14134 \begin_layout Itemize
14142 \begin_layout Itemize
14150 \begin_layout Itemize
14158 \begin_layout Itemize
14166 \begin_layout Subsection
14167 The new letter class: letter (koma-script v.2)
14170 \begin_layout Standard
14176 \begin_layout Standard
14177 \begin_inset VSpace medskip
14183 \begin_layout Standard
14185 Koma-Script version 2.8 has introduced a new letter class
14189 which supersedes the now unsupported
14194 It has — on the LaTeX side — a completely new interface and is not compatible
14195 with the old class.
14196 Therefore, LyX supports both, though it is recommended you use the new
14200 \begin_layout Standard
14201 This class covers the same functionality as
14203 letter (koma-script),
14206 The basic items are
14210 (receiver's address, same as
14214 in the old layout),
14227 will start a new letter (i.
14228 \begin_inset space \thinspace{}
14232 \begin_inset space \space{}
14235 you can write several letters per document).
14236 New elements are sender's
14252 and the possibility to use a
14258 Insert\SpecialChar \menuseparator
14264 \begin_layout Standard
14265 The biggest improvement is, though, that the letter's layout is configurable
14266 to meet almost any needs.
14267 This can be done via the preamble or with a special style file (Letter
14268 Class Option, extension
14272 ), that will be read in as a class option.
14276 \begin_layout Plain Layout
14277 The KOMA package comes with some default
14282 There is, for instance, a
14286 file that follows german typesetting rules, or a
14290 that provides the default layout of the old
14295 The latter can be loaded with the class option
14304 ayout\SpecialChar \menuseparator
14309 ocument\SpecialChar \menuseparator
14321 template that is included in LyX for examples.
14322 A detailed description is to be found in the Koma-Script documentation
14330 \begin_layout Subsection
14334 \begin_layout Standard
14335 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14339 \begin_layout Itemize
14340 The chapter number of a
14344 type appears on a line of its own above the chapter heading instead of
14345 appearing in the same line ahead of it.
14346 The cause for that is the LyX internal behavior for the labeltype
14350 in the layout file.
14353 \begin_layout Itemize
14354 The headings of the types
14362 are only put in the
14363 \begin_inset Quotes eld
14367 \begin_inset Quotes erd
14370 LaTeX table of contents, but not in the LyX table of contents (
14372 Document\SpecialChar \menuseparator
14374 \begin_inset space ~
14378 \begin_inset space ~
14386 \begin_layout Itemize
14387 The paragraphs in a
14391 document class appear in a skip separation mode, not indented.
14392 This is the standard behavior, no special LaTeX commands are needed for
14396 Document\SpecialChar \menuseparator
14399 dialog the corresponding radio button indicates
14408 value always has the effect that extra LaTeX commands are inserted in the
14409 document to produce the gap, which is not what is wanted in this case.
14412 \begin_layout Section
14413 Latex8 (IEEE Conference Papers)
14416 \begin_layout Standard
14422 \begin_layout Subsection
14426 \begin_layout Standard
14427 Since this class is specifically for writing submissions to IEEE sponsored
14428 conferences I strongly recommend that you get a copy of their Authors Kit.
14433 package and associated bibliography style file is included in the kit.
14434 The Authors Kit is usually sent out by email once your initial submission
14436 There is a lot of useful information in the Authors Kit explaining formatting
14437 restrictions and so on and I will assume you have read this since that
14438 means I don't have to repeat it all here.
14441 \begin_layout Subsection
14445 \begin_layout Standard
14446 [AR\SpecialChar \@.
14450 \begin_layout Subsection
14451 Supported Environments
14454 \begin_layout Itemize
14460 \begin_layout Itemize
14466 \begin_layout Itemize
14472 \begin_layout Itemize
14478 \begin_layout Itemize
14484 \begin_layout Itemize
14490 \begin_layout Itemize
14496 \begin_layout Itemize
14502 \begin_layout Itemize
14508 \begin_layout Subsection
14509 Differences Between Screen and Paper
14512 \begin_layout Standard
14513 There are slight differences in appearance mainly with the presentation
14514 of section counters.
14515 On screen the trailing period of the section counter is missing but it
14516 will appear in the output so don't let this worry you.
14519 \begin_layout Section
14523 \begin_layout Standard
14529 \begin_layout Subsection
14533 \begin_layout Standard
14534 Memoir is a very powerful and constantly evolving class.
14535 It has been designed with regard to fictional and non-fictional literature.
14536 Its aim is to let the user have maximum control over the typesetting of
14538 Memoir is based on the standard book class, but it can also emulate the
14539 article class (see below).
14542 \begin_layout Standard
14543 Peter Wilson, the developer of Memoir, is known as the author of lots of
14544 useful packages in the LaTeX world.
14545 Most of them have been merged with Memoir.
14546 Therefore, it is much easier to layout the table of contents, appendices,
14547 chapter designs and such.
14548 LyX, though, does not support all of these goodies natively.
14549 Some of them might be added to forthcoming releases
14553 \begin_layout Plain Layout
14554 You are invited to send suggestions to
14555 \begin_inset Flex URL
14558 \begin_layout Plain Layout
14560 lyx-devel@lists.lyx.org
14570 , lots will probably never, due to the limitations of LyX's framework.
14571 Of course you can still use all features with the help of some native LaTeX
14576 \begin_layout Plain Layout
14581 \begin_layout Plain Layout
14591 \begin_inset space ~
14595 \begin_inset CommandInset ref
14597 reference "sec:Inserting-TeX-Code"
14607 In this section, we can only list those features which are natively supported
14609 For detailed descriptions (and for the rest of features) we recommend you
14610 have a look at the detailed manual of the Memoir class
14614 \begin_layout Plain Layout
14619 \begin_layout Plain Layout
14629 \begin_inset Flex URL
14632 \begin_layout Plain Layout
14634 CTAN:/macros/latex/memoir/memman.pdf
14644 , which is not only a user guide for the class, but also both a comprehensive
14645 description on good typesetting and a superb example for good typesetting
14649 \begin_layout Subsection
14650 Basic features and restrictions
14653 \begin_layout Standard
14654 Memoir supports basically all features of the standard book classes.
14655 There are, however, some differences, as follows:
14658 \begin_layout Description
14660 \begin_inset space ~
14663 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14666 \begin_layout Description
14668 \begin_inset space ~
14671 style: The fancy page style is not supported, due to a command clash between
14672 Memoir and the fancyhdr package (they both define a command with the same
14673 name, which confuses LaTeX).
14674 Instead, Memoir comes with a number of its own page styles (see
14676 Layout\SpecialChar \menuseparator
14677 Document\SpecialChar \menuseparator
14679 \begin_inset space ~
14685 If you want to use these for the chapter pages, you have to use the command
14692 in the main text or in preamble (e.
14693 \begin_inset space \thinspace{}
14697 \begin_inset space \space{}
14704 chapterstyle{companion}
14709 \begin_layout Description
14710 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14711 optional argument in the standard classes.
14712 With this, you can specify an alternative version of the title for the
14713 table of contents and the headers (for instance, if the title is too long).
14714 In LyX, you can do this via
14716 Insert\SpecialChar \menuseparator
14718 \begin_inset space ~
14723 at the beginning of a chapter/section.
14724 Memoir features a second optional argument and thus separates the table
14725 of contents from the header.
14726 You can define three variants of a title with this: one for the main text,
14727 one for the table of contents, and one for the headers.
14728 Simply insert two optional arguments if you need this feature, the first
14729 one containing the short title for the Table of Contents, the second one
14730 containing an alternative short title for the headers.
14733 \begin_layout Description
14734 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14735 of contents, the list of figures and the list of table start a new page
14737 Memoir does not follow this route.
14738 You have to insert a page break yourself, if you want to have one.
14741 \begin_layout Description
14742 Titlepage: For some unknown reason, Memoir uses pagination on the title
14743 page (in the standard classes, title pages are
14744 \begin_inset Quotes eld
14748 \begin_inset Quotes erd
14752 \begin_inset space \thinspace{}
14756 \begin_inset space \space{}
14760 If you want an empty title page, type
14764 aliaspagestyle{title}{empty}
14769 \begin_layout Description
14770 Article: With the class option
14776 Layout\SpecialChar \menuseparator
14777 Document\SpecialChar \menuseparator
14779 \begin_inset space ~
14784 ), you can emulate article style.
14785 That is, counters (footnotes, figures, tables etc.) will not be reset on
14786 new chapters, chapters don't start a new page (but are—in contrary to
14787 \begin_inset Quotes eld
14791 \begin_inset Quotes erd
14794 article classes—still allowed), parts, though, use their own page, as in
14798 \begin_layout Description
14799 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14800 font commands, which have been used in the old LaTeX version 2.09 (e.
14801 \begin_inset space \thinspace{}
14805 \begin_inset space \space{}
14821 It produces an error and stops LaTeX whenever such a command appears.
14826 reallows the commands and spits out warnings instead (which does at least
14828 Since a lot of packages and particularly BibTeX style files are still using
14829 those commands, we have decided to use this option by default.
14832 \begin_layout Subsection
14836 \begin_layout Standard
14837 We will only describe the features supported by LyX (which is not much currently
14839 Please consult the Memoir manual
14843 \begin_layout Plain Layout
14848 \begin_layout Plain Layout
14858 \begin_inset Flex URL
14861 \begin_layout Plain Layout
14863 CTAN:/macros/latex/memoir/memman.pdf
14876 \begin_layout Description
14877 Abstract: You may wonder why an abstract is an extra feature.
14878 Well, it is in book class.
14879 Usually books don't have abstracts.
14880 Memoir, however, has.
14881 You can use it wherever and how often you like.
14884 \begin_layout Description
14885 Chapterprecis: You may know this older typesetting style: The contents of
14886 a chapter are summarized below the title and also in the table of contents
14888 \begin_inset space \thinspace{}
14892 \begin_inset space \space{}
14897 Our hero arrives in Troia; he loses some friends; he finds others
14900 Chapterprecis does exactly this.
14901 It is therefore only sensible below a chapter.
14904 \begin_layout Description
14905 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14906 The epigraph environment provides an elegant way of typesetting such a
14908 The motto itself (text) and its author (source) are divided by a short
14910 Unfortunately, we have to fool LyX a bit here again, since the environment
14911 needs two arguments (text and source).
14912 In this case, we have to use curly brackets (in TeX mode) between the two
14923 <author of the slogan>.
14926 \begin_layout Description
14927 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14928 complex figurative poems).
14929 LyX can only support a few of them.
14930 One is poemtitle, which is a centered title for poems, which will also
14931 be added to the table of contents (verse is the standard environment for
14933 Memoir has some enhanced versions of verse, but you need to use TeX code,
14934 because they have to be nested inside regular verse environments, which
14935 is not possible with LyX).
14938 \begin_layout Description
14939 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14942 \begin_layout Section
14943 Article (mwart), book (mwbk) and report (mwrep)
14944 \begin_inset Argument
14947 \begin_layout Plain Layout
14960 \begin_layout Standard
14966 \begin_layout Standard
14967 The LyX document classes
14983 correspond to the LaTeX document classes
14996 They are replacements for the standard document classes
15008 , resp., and fit better to Polish typography conventions in a number of points.
15012 \begin_layout Standard
15016 \begin_layout Itemize
15017 Unnumbered titles (with star, e.
15018 \begin_inset space \thinspace{}
15022 \begin_inset space \space{}
15029 ) are added into table of contents,
15032 \begin_layout Itemize
15033 Additional page styles:
15037 \begin_layout Description
15038 uheadings header with separated lines,
15041 \begin_layout Description
15042 myheadings custom header, contents headers via commands:
15057 \begin_layout Description
15058 myuheadings custom header with separated lines,
15061 \begin_layout Description
15062 outer page number is placed on outer side of page
15066 \begin_layout Itemize
15071 \begin_layout Description
15072 rmheadings serif titles — default,
15075 \begin_layout Description
15076 sfheadings sansserif titles,
15079 \begin_layout Description
15080 authortitle on title page first placed is author next title — default,
15083 \begin_layout Description
15084 titleauthor on title page first placed is title next author,
15087 \begin_layout Description
15088 withmarginpar reserve place on page for margins.
15092 \begin_layout Section
15096 \begin_layout Standard
15101 provides an alternative to the standard
15106 It provides similar functionality, but you might prefer this layout with
15107 sans serif sections, headings, and more.
15110 \begin_layout Section
15114 \begin_layout Standard
15120 \begin_layout Standard
15121 \begin_inset VSpace bigskip
15127 \begin_layout Standard
15132 \begin_inset space ~
15137 textclass works with the American Physical Sociey's RevTeX 4.0 (the
15138 \begin_inset Formula $\beta$
15141 release of May, 1999) class.
15144 \begin_layout Standard
15149 textclass, which works with RevTeX 3.1.
15150 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15151 That means that it doesn't interact very well with LyX, which requires
15152 LaTeX2e, although it has been kludged to work.
15153 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15157 \begin_inset space ~
15162 textclass should also be pretty easy to use.
15165 \begin_layout Standard
15166 These documents are supposed to be used in
15170 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15171 macros, and assume you'll know what to put in the preamble if necessary.
15174 \begin_layout Subsection
15178 \begin_layout Standard
15179 All you need to do is install RevTeX 4, as described in the package's README
15181 The package can be found at The RevTeX 4 Web Site
15182 \begin_inset Flex URL
15185 \begin_layout Plain Layout
15187 http://publish.aps.org/revtex4/
15193 Install it somewhere that LaTeX can see it.
15194 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15196 \begin_inset space \thinspace{}
15200 \begin_inset space \space{}
15203 not the directory where you installed the class file.) Then, if you reconfigure
15204 LyX, it will find the class file and let you use the RevTeX4 textclass.
15207 \begin_layout Standard
15208 Probably the easiest way to get started is either to import a RevTeX 4 document
15216 \begin_inset space ~
15221 template, found in the templates directory.
15224 \begin_layout Subsection
15228 \begin_layout Standard
15229 Optional arguments to
15236 \begin_inset Quotes eld
15240 \begin_inset Quotes erd
15244 \begin_inset Quotes eld
15248 \begin_inset Quotes erd
15258 \begin_inset space ~
15266 \begin_inset space ~
15272 Remember that in RevTeX, at least one optional argument is required!
15275 \begin_layout Standard
15276 Other preamble matter, like
15283 \begin_inset space ~
15289 \begin_inset space ~
15294 dialog, also as usual.
15297 \begin_layout Subsection
15301 \begin_layout Standard
15302 The layouts basically correspond to the commands in RevTeX4.0.
15303 For example, the Email layout corresponds to
15310 Note that (at least as of RevTeX 4.0 Beta), the
15318 layouts are exactly equivalent, so you shouldn't need to use both.
15322 \begin_layout Plain Layout
15323 In case you're curious, both were included so that
15327 would be able to translate both
15347 \begin_layout Subsection
15351 \begin_layout Standard
15352 There are a couple of important unique aspects of RevTeX 4 which might cause
15353 bugs that will be even more confusing in LyX.
15356 \begin_layout Standard
15374 The LyX equivalent is that there is a separate Thanks layout.
15379 write footnotes in the
15383 layout, or weird things may happen.
15384 See the RevTeX 4 documentation for more details.
15387 \begin_layout Standard
15391 \begin_inset space ~
15399 \begin_inset space ~
15408 layouts must be placed
15416 layout and the corresponding
15433 , the LaTeX won't compile.
15436 \begin_layout Subsection
15440 \begin_layout Standard
15441 The main problem with this layout is that you can't use the optional arguments
15442 to layouts like Email and Title.
15443 (The problem is not unique to this layout; you can't use optional arguments
15444 to the Section layouts either.) This means that after you export that file
15445 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15446 need to edit the LaTeX file with a text editor to add the optional arguments
15448 \begin_inset space \thinspace{}
15452 \begin_inset space \space{}
15455 the running title for the page headers.
15456 Lacking these layouts makes the
15462 (and the equivalent
15468 ) useless, so the corresponding layouts don't exist, and will have to be
15473 \begin_layout Plain Layout
15478 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15479 has not been updated yet to take advantage of it.
15487 \begin_layout Section
15488 Springer Journals (
15495 \begin_layout Standard
15501 \begin_layout Subsection
15505 \begin_layout Standard
15506 These are the layout files for some of the journal formats used by Springer
15507 Verlag and listed on
15508 \begin_inset Flex URL
15511 \begin_layout Plain Layout
15513 http://www.springer.de/author/tex/help-journals.html
15518 , where you should also go to fetch the class files (yes, these are LaTeX2e
15520 It is a modular system: the things common to all journals are implemented
15525 , which journal-specific layout files (such as, e.
15526 \begin_inset space \thinspace{}
15530 \begin_inset space \space{}
15537 for Journal of Geodesy) can include.
15540 \begin_layout Standard
15541 This means that implementing support for any other Springer journal on this
15542 list is as simple as writing your own
15550 file following the outline given in
15558 \begin_layout Standard
15559 It is reasonably well tested only for the Journal of Geodesy.
15568 come with the standard LyX distribution.
15569 Install the relevant class file (downloaded from Springer) in a proper
15570 directory, reconfigure LaTeX (in the teTeX case by running
15574 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15575 and it should work.
15578 \begin_layout Subsection
15582 \begin_layout Standard
15583 A large number of theorem-like styles —
15589 \SpecialChar \ldots{}
15595 \begin_layout Standard
15598 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15599 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15602 See the Springer class file documentation for details.
15605 \begin_layout Subsection
15609 \begin_layout Itemize
15621 \begin_layout Itemize
15624 Probability Theory and Related Fields
15630 — Jean-Marc Lasgouttes
15633 \begin_layout Standard
15634 Add your own, it isn't so hard!
15637 \begin_layout Subsection
15641 \begin_layout Standard
15642 These files are partly based on the older
15646 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15647 file from Springer.
15652 layout, are now defunct.
15653 Jean-Marc Lasgouttes helped out big in making me find my way around the
15654 LyX layout file mechanism.
15657 \begin_layout Subsection
15661 \begin_layout Standard
15663 But probably less than in the old hacked-LaTeX
15670 \begin_layout Standard
15672 \begin_inset space \thinspace{}
15675 g.: does not display the number for theorem-like layouts, just #.
15678 \begin_layout Section
15684 \begin_inset CommandInset label
15693 \begin_layout Standard
15701 \begin_layout Subsection
15705 \begin_layout Standard
15706 This section describes how to use LyX to make slides for overhead projectors.
15707 There are two document classes that can do this: the default slides class
15713 This section documents the former.
15716 \begin_layout Standard
15717 I'm going to say this again, nice and clear, so that there's no misunderstanding
15721 \begin_layout Standard
15722 \begin_inset VSpace bigskip
15728 \begin_layout Standard
15732 This section documents the class
15733 \begin_inset Quotes eld
15741 \begin_inset Quotes erd
15749 \begin_layout Standard
15750 \begin_inset VSpace bigskip
15756 \begin_layout Standard
15757 If you're looking for the documentation for
15758 \begin_inset Quotes eld
15766 \begin_inset Quotes erd
15769 , check out section
15770 \begin_inset space ~
15774 \begin_inset CommandInset ref
15776 reference "sec:foiltex"
15786 \begin_inset Quotes eld
15794 \begin_inset Quotes erd
15797 ] is actually somewhat better than the default
15805 \begin_layout Plain Layout
15806 \SpecialChar \ldots{}
15807 or so I've been told repeatedly by its advocates.
15808 Having never used it, I have no idea if this claim is true or not.
15813 which this section documents.
15816 \begin_layout Standard
15817 This class is the LaTeX2e improvement of the old
15822 Every LaTeX2e distribution includes this class [which I'll just refer to
15824 \begin_inset Quotes eld
15832 \begin_inset Quotes erd
15835 from now on], so you're bound to have it.
15836 As I noted earlier, there are other classes, such as
15840 , which also produce slides for overhead projectors and do a better job
15842 However, there are some things which
15846 can do which the others can't, such as generate overlays.
15847 Read on to learn more!
15850 \begin_layout Subsection
15852 \begin_inset CommandInset label
15854 name "sec:slidesetup"
15861 \begin_layout Standard
15862 Obviously, to use this document class, you need to select
15863 \begin_inset Quotes eld
15871 \begin_inset Quotes erd
15874 from the class list in the
15876 Document\SpecialChar \menuseparator
15880 There are some other special things you should know about this class:
15883 \begin_layout Itemize
15884 Don't bother changing the options
15889 They're not supported by the
15896 \begin_layout Itemize
15900 \begin_inset space ~
15905 behaves a bit differently for this class.
15906 The possible choices and what they do are as follows:
15910 \begin_layout Description
15915 The final output contains page numbers in the lower right corner.
15918 \begin_layout Description
15927 , but also prints out any time markers you've put in.
15928 This is the default.
15931 \begin_layout Description
15936 The final output contains no page numbers, time markers, or alignment markers.
15940 \begin_layout Itemize
15945 class has an extra option:
15951 \begin_inset Quotes eld
15959 \begin_inset Quotes erd
15962 in the extra class options.
15966 \begin_layout Standard
15967 Using this options allows you to add time markers to
15973 \begin_inset space ~
15977 \begin_inset CommandInset ref
15979 reference "sec:slideNote"
15987 \begin_layout Standard
15988 You can also use the template file
15989 \begin_inset Quotes eld
15997 \begin_inset Quotes erd
16000 to automatically set up a document to use the
16006 File\SpecialChar \menuseparator
16008 \begin_inset space ~
16012 \begin_inset space ~
16017 to open your new document].
16018 The template file also contains some examples of the special paragraph
16019 environments used by this class.
16020 I'll describe those next.
16023 \begin_layout Subsection
16024 Paragraph Environments
16027 \begin_layout Subsubsection
16028 Supported Environments
16031 \begin_layout Standard
16032 The first thing you'll notice when you start up a new
16036 document is the font size and type: it's the equivalent of the size
16037 \begin_inset Quotes eld
16045 \begin_inset Quotes erd
16051 \begin_inset space ~
16057 This is also what's used in the output.
16059 \begin_inset Quotes eld
16063 \begin_inset Quotes erd
16066 to remind you that this is a slide.
16067 Your final slides will use a larger font; ergo, you'll have less space.
16068 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16071 \begin_layout Standard
16072 The next thing that becomes obvious is the changes to the paragraph environment
16073 pull-down box [at the far-left end of the toolbar].
16074 Most of the paragraph environments you're used to seeing are missing.
16075 There are also five new ones.
16080 class itself only supports certain paragraph environments:
16083 \begin_layout Itemize
16089 \begin_layout Itemize
16095 \begin_layout Itemize
16101 \begin_layout Itemize
16107 \begin_layout Itemize
16113 \begin_layout Itemize
16119 \begin_layout Itemize
16125 \begin_layout Itemize
16131 \begin_layout Itemize
16137 \begin_layout Itemize
16143 \begin_layout Itemize
16149 \begin_layout Standard
16150 All of the other standard environments, including the section-heading environmen
16151 ts, aren't used in the
16158 \begin_layout Standard
16159 On the other hand, you'll notice the following new environments:
16162 \begin_layout Itemize
16168 \begin_layout Itemize
16174 \begin_layout Itemize
16180 \begin_layout Itemize
16186 \begin_layout Itemize
16192 \begin_layout Standard
16193 These five are kind of quirky, due to a
16194 \begin_inset Quotes eld
16198 \begin_inset Quotes erd
16202 You see, LyX doesn't permit you to nest any other paragraph environment
16203 into an empty environment.
16204 Now, that's fine and dandy, but it means that you wouldn't be able to start
16205 a slide with anything except plain text.
16206 To deal with this, I've performed a little
16207 \begin_inset Quotes eld
16211 \begin_inset Quotes erd
16217 \begin_layout Subsubsection
16218 Quirks of the New Environments
16219 \begin_inset CommandInset label
16221 name "sec:slideQuirk"
16228 \begin_layout Standard
16229 All five of the new paragraph environments are somewhat quirky due to inherent
16230 limitiations in the current version of LyX.
16231 As I just mentioned, LyX forbids environments that begin with another environme
16233 To get around this, the
16237 environment isn't a paragraph environment as described in the
16245 \begin_layout Standard
16246 You should consider
16259 \begin_inset Quotes eld
16262 pseudo-environments.
16263 \begin_inset Quotes erd
16266 They look like a section heading or a
16267 \begin_inset Quotes eld
16275 \begin_inset Quotes erd
16278 but really begin a [and, if necessary, end the previous] paragraph environment.
16288 \begin_inset Quotes eld
16292 \begin_inset Quotes erd
16295 These two perform some action.
16298 \begin_layout Standard
16299 A common feature of all five environments,
16319 , is a rather long-ish label.
16320 The text following this label — ordinarily the contents of the paragraph
16321 environment — is utterly irrelevant for
16342 LyX completely ignores it.
16343 In fact, you can leave these five environments completely empty.
16347 \begin_layout Standard
16352 to put any text after the rather long-ish label, you might want to.
16353 This could be a short description of the contents of the
16358 In that case, enter your descriptive comment and hit
16362 as you normally would.
16365 \begin_layout Standard
16366 If, on the other hand, you don't want to enter any descriptive text, you'll
16367 hit another LyX quirk.
16368 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16369 environment until you put something in the old one.
16373 \begin_layout Itemize
16374 Start entering the text that will
16402 \begin_layout Itemize
16403 Now move to the beginning of that paragraph.
16407 \begin_layout Itemize
16416 \begin_layout Itemize
16417 Finally, change this new, empty paragraph to a
16441 \begin_layout Standard
16442 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16446 \begin_layout Subsection
16447 Making a Presentation with
16460 \begin_layout Subsubsection
16468 \begin_layout Standard
16469 If you're expecting this section to teach you how to actually make a presentatio
16470 n, you'll be sorely disappointed.
16471 Naturally, I'll describe all of the ways the
16475 class can assist you in preparing the materials for a presentation.
16476 Filling in the contents, however, is up to you.
16481 the LyX philosophy.]
16484 \begin_layout Standard
16489 environment [in the manner described in section
16490 \begin_inset space ~
16494 \begin_inset CommandInset ref
16496 reference "sec:slideQuirk"
16500 ] tells LyX to begin a new slide [duh].
16501 The label for this environment/
16502 \begin_inset Quotes erd
16506 \begin_inset Quotes erd
16510 \begin_inset Quotes eld
16514 \begin_inset Quotes erd
16517 in cool blue, followed by the label,
16518 \begin_inset Quotes eld
16522 \begin_inset Quotes erd
16526 Any text or paragraph environments that follow this one go on the new slide.
16530 \begin_layout Standard
16531 Slides are probably the only time you'll need to forcibly end pages in LyX
16532 (this can be specified in the
16537 In fact, you'll want to, once you finish entering the contents of one slide.
16538 If you've entered more text than can physically fit on a slide, the extra
16539 overflows onto a new slide.
16540 I don't recommend doing this, however, since the overflow slide won't have
16541 any page number on it.
16542 Furthermore, it may interfere with any
16546 you've made to accompany the oversized
16553 \begin_layout Standard
16562 environments work the same way as the
16567 They both create an
16568 \begin_inset Quotes eld
16572 \begin_inset Quotes erd
16575 followed by a label [
16576 \begin_inset Quotes eld
16580 \begin_inset Quotes erd
16584 \begin_inset Quotes eld
16588 \begin_inset Quotes erd
16592 The color is a stunning magenta instead of blue, and the
16593 \begin_inset Quotes eld
16597 \begin_inset Quotes erd
16600 will look different, in style and in length.
16601 The label fonts of all three also differ from one another.
16604 \begin_layout Standard
16609 , if the contents of a
16617 exceed the physical size of a slide or sheet of paper, the extra will overflow
16619 Again, you should avoid this.
16620 It defeats the whole purpose of
16631 \begin_layout Subsubsection
16641 \begin_layout Standard
16646 is a slide that sits atop another slide.
16647 Perhaps you wish to discuss a figure on the main
16651 before displaying the text associated with it.
16652 One way to accomplish this is tape a flap of dark paper over the part of
16657 you want to display later.
16658 This method fails, however, if you wish to overlap one graph with another,
16660 You would then have to fumble while speaking to align the two separate,
16665 s to align the two graphs.
16670 environment in both cases makes life much easier.
16673 \begin_layout Standard
16678 receives the page number of its
16679 \begin_inset Quotes eld
16683 \begin_inset Quotes erd
16691 \begin_inset Quotes eld
16699 \begin_inset Quotes erd
16706 \begin_layout Plain Layout
16707 Presumably, mutliple
16712 \begin_inset Quotes eld
16720 \begin_inset Quotes erd
16724 \begin_inset Quotes eld
16732 \begin_inset Quotes erd
16736 \begin_inset Quotes eld
16744 \begin_inset Quotes erd
16748 \begin_inset space ~
16751 appended to the page number of the parent
16761 Clearly, you want the contents of both the
16769 to each fit on a single physical slide! You should probably consider an
16775 \begin_inset Quotes eld
16779 \begin_inset Quotes erd
16791 class provides a visual cue for this: the label at the start of an
16795 is shorter than that at the start of a
16800 Lastly, when you generate printable output, you'll find alignment markers
16801 in all four corners of both the
16805 page and its parent
16810 These will assist you in lining up the two physical slides.
16813 \begin_layout Standard
16814 The major problem in overlaying two slides is aligning the contents of the
16815 two transparencies.
16816 How much space should you leave for that graph on the second slide? Worse
16817 still, what if you want a graph and a sentence on second slide, but there
16818 is text on the main transparency that goes in between them? You could try
16819 and insert vertical space of the right size.
16820 The better way is to use
16831 \begin_layout Standard
16832 As their names imply,
16840 are two command-like paragraph environments that make all subsequent text
16841 invisible and visible, respectively.
16843 \begin_inset space ~
16847 \begin_inset CommandInset ref
16849 reference "sec:slideQuirk"
16853 that you don't place anything
16857 these two environments, however.
16862 , it inserts a centered, sky-blue label into the page reading
16863 \begin_inset Quotes eld
16866 <Invisible Text Follows>
16867 \begin_inset Quotes erd
16871 For paragraphs following this label, the parts of the
16879 ; it doesn't matter which] where they would be contain instead blank space.
16883 \begin_layout Standard
16888 , the corresponding centered label is
16889 \begin_inset Quotes eld
16892 <Visible Text Follows>
16893 \begin_inset Quotes erd
16897 Paragraphs following this label behave normally.
16898 Note that the beginning of a new
16910 automatically shuts off an
16915 It's therefore not necessary to use
16926 \begin_layout Standard
16927 By now, it should be obvious how to create overlay transparencies using
16928 the proper combination of
16947 \begin_layout Enumerate
16952 , including everything that will appear on it, whether on the main slide
16960 \begin_layout Enumerate
16961 Before each figure or paragraph that will appear only on the
16970 If necessary, insert a
16974 environment after the
16981 \begin_layout Enumerate
16986 immediately following the
16993 \begin_layout Enumerate
16994 Copy the contents of this
17005 \begin_layout Enumerate
17010 , change all of the
17021 \begin_layout Standard
17023 You've just made an
17030 \begin_layout Standard
17031 There's one problem with the way I've designed the LyX
17035 class: you can't make text in the middle of a paragraph invisible, nor
17036 make text in the middle of an invisible paragraph visible again.
17037 To accomplish this feat, you'll need to use some inlined LaTeX codes.
17041 \begin_layout Plain Layout
17042 The commands of interest are:
17045 \begin_layout Itemize
17050 invisible \SpecialChar \ldots{}
17054 \begin_layout Itemize
17059 visible \SpecialChar \ldots{}
17063 \begin_layout Plain Layout
17064 \SpecialChar \ldots{}
17065 and need to be marked as TeX.
17067 \begin_inset Quotes eld
17071 \begin_inset Quotes erd
17074 you wish to change goes in between the brackets [and after the
17087 If you don't know how to mark text as TeX, see the appropriate section
17100 \begin_layout Subsubsection
17110 \begin_inset CommandInset label
17112 name "sec:slideNote"
17119 \begin_layout Standard
17128 is associated with a
17129 \begin_inset Quotes eld
17133 \begin_inset Quotes erd
17145 class provides visual cues.
17150 is shorter than that of a
17154 [yet longer than that of an
17158 ] and, like the label of an
17162 is shockingly magenta.
17163 Additionally, the printed
17167 has the page number of its
17168 \begin_inset Quotes eld
17172 \begin_inset Quotes erd
17180 \begin_inset Quotes eld
17188 \begin_inset Quotes erd
17192 \begin_inset Quotes eld
17200 \begin_inset Quotes erd
17204 \begin_inset Quotes eld
17212 \begin_inset Quotes erd
17216 You can have multiple
17220 s associated with a single
17232 , you'll probably want to break up long
17236 s so that they fit on a single sheet of paper.
17239 \begin_layout Standard
17244 is obvious: it contains anything additional you might want to say about
17250 It could also be used as a sheet of reminders for a particular
17255 In the case of the latter, you might want to make use of time markers.
17261 \begin_inset Quotes eld
17265 \begin_inset Quotes erd
17268 support for time markers, a
17273 So, you'll have to resort to using the LaTeX codes.
17276 \begin_layout Standard
17277 To use time markers, you'll need to specify the extra class option
17278 \begin_inset Quotes eld
17286 \begin_inset Quotes erd
17290 \begin_inset space ~
17294 \begin_inset CommandInset ref
17296 reference "sec:slidesetup"
17301 This option turns on timing marks, which will appear in the lower-left-hand
17307 To set what appears in the time marker, you use the LaTeX commands
17308 \begin_inset Quotes eld
17318 \begin_inset Quotes erd
17322 \begin_inset Quotes eld
17332 \begin_inset Quotes erd
17336 The arguments of both commands are time measured in seconds.
17338 \begin_inset Quotes eld
17348 \begin_inset Quotes erd
17351 sets the time marker to a given time.
17353 \begin_inset Quotes eld
17363 \begin_inset Quotes erd
17366 increments the time marker by the specified amount.
17367 Using time markers and
17371 s in this fashion, you can remind yourself how much time to spend on a particula
17379 \begin_layout Standard
17380 There's one last feature to describe.
17381 Clearly, you'd like to print out all of your
17389 s on transparencies while printing all of your
17406 with which it is associated.
17407 What's a person to do?
17410 \begin_layout Standard
17411 Luckily, there are two LaTeX commands that allow you to select what to print
17413 Both must be placed into the preamble of your document.
17415 \begin_inset Quotes eld
17427 \begin_inset Quotes erd
17430 will cause the output to contain only the
17439 Correspondingly, the command
17440 \begin_inset Quotes eld
17452 \begin_inset Quotes erd
17455 prevents the output of anything but
17460 I'd advise placing both commands in the preamble and initially comment
17462 You can then preview your entire presentation as you write.
17463 When you're done writing, you can then uncomment one of the two to select
17464 what you want to print.
17465 I like to uncomment
17466 \begin_inset Quotes eld
17478 \begin_inset Quotes erd
17481 , print to a file with
17482 \begin_inset Quotes eld
17490 \begin_inset Quotes erd
17493 in its name, comment it back out, then uncomment
17494 \begin_inset Quotes eld
17506 \begin_inset Quotes erd
17510 \begin_inset Quotes eld
17518 \begin_inset Quotes erd
17522 I can then send either file to a printer, loading transparencies or plain
17523 paper as appropriate.
17526 \begin_layout Standard
17527 You can also provide other arguments to the
17528 \begin_inset Quotes eld
17538 \begin_inset Quotes erd
17542 \begin_inset Quotes eld
17552 \begin_inset Quotes erd
17556 See a good LaTeX book for details.
17559 \begin_layout Subsection
17564 Class Template File
17567 \begin_layout Standard
17568 I have also provided a template file,
17569 \begin_inset Quotes eld
17577 \begin_inset Quotes erd
17585 To use it, begin your new presentation with
17590 ile\SpecialChar \menuseparator
17592 \begin_inset space ~
17596 \begin_inset space ~
17606 Your new LyX presentation file will contain an example
17627 additionally contain an example of the use of
17636 Lastly, the preamble will contain:
17639 \begin_layout LyX-Code
17640 % Uncomment to print out only slides and overlays
17643 \begin_layout LyX-Code
17647 \begin_layout LyX-Code
17653 \begin_inset Newline newline
17659 \begin_layout LyX-Code
17660 % Uncomment to print out only notes
17663 \begin_layout LyX-Code
17667 \begin_layout LyX-Code
17675 \begin_layout Standard
17676 One final thing: I created this class to support the LaTeX2e
17677 \begin_inset Quotes eld
17685 \begin_inset Quotes erd
17688 class, one of the built-in LaTeX2e classes.
17689 Neither I nor the rest of the LyX Team endorse or oppose the use of this
17690 built-in slide class.
17691 It's here if you want it or need it.
17692 There exist other LaTeX2e classes for creating presentations, such as the
17698 \begin_inset space ~
17702 \begin_inset CommandInset ref
17704 reference "sec:foiltex"
17709 \begin_inset Quotes eld
17717 \begin_inset Quotes erd
17720 package [present on some TeX distributions].
17721 The latter is not yet supported under LyX.
17725 \begin_layout Plain Layout
17726 Perhaps you can take on the task\SpecialChar \ldots{}
17732 I know nothing about these other classes.
17733 Try them out to see what sort of alternative they provide.
17736 \begin_layout Chapter
17737 LyX Features needing Extra Software
17740 \begin_layout Section
17744 \begin_layout Standard
17750 \begin_layout Subsection
17754 \begin_layout Standard
17763 \begin_layout Plain Layout
17768 is not yet available when you are using the LaTeX distribution MiKTeX.
17773 , you'll find in the
17780 \begin_inset space ~
17791 \begin_inset CommandInset href
17793 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17800 \begin_layout Standard
17805 package is a program that was written by
17806 \begin_inset Flex Noun
17809 \begin_layout Plain Layout
17811 \begin_inset space ~
17819 in frustration because some constructs in LaTeX are sometimes non-intuitive,
17820 and easy to forget.
17821 The program runs over your LaTeX file, checks the integrity of the file,
17822 and flags some common errors.
17823 In other technical words, it is
17830 \begin_layout Standard
17831 Well, what is a syntax checker doing in LyX which is supposed to produce
17832 correct LaTeX anyways? The answer is simple: Just as
17836 not only checks the
17840 of C programs, but also does
17844 checks for type-errors,
17848 catches some common
17852 errors, in addition to the syntactical ones.
17857 is capable of detecting several common errors, such as
17860 \begin_layout Itemize
17861 Ellipsis detection:
17862 \begin_inset Newline newline
17865 Use \SpecialChar \ldots{}
17869 \begin_layout Itemize
17870 No space in front of/after parenthesis:
17871 \begin_inset Newline newline
17877 \begin_layout Itemize
17878 Enforcement of normal space after common abbreviations:
17879 \begin_inset Newline newline
17883 \begin_inset space \thinspace{}
17887 \begin_inset space \space{}
17890 is too wide spacing.
17893 \begin_layout Itemize
17894 Enforcement of end-of-sentence space when the last sentence ends with a
17896 \begin_inset Newline newline
17900 And this is wrong spacing.
17903 \begin_layout Itemize
17904 Space in front of labels and similar commands:
17905 \begin_inset Newline newline
17908 The label should stick right up to the text to avoid falling to a wrong
17911 \begin_inset CommandInset label
17921 \begin_layout Plain Layout
17922 This footnote is in danger of falling off to a wrong page
17927 The label is separated too much.
17930 \begin_layout Itemize
17931 Space in front of references, instead of hard spaces:
17932 \begin_inset Newline newline
17935 In you are in bad luck, the text will break right between the referenced
17936 text and reference number, and that's a pity.
17938 \begin_inset CommandInset ref
17940 reference "sec:chktex"
17947 \begin_layout Itemize
17949 \begin_inset Quotes eld
17953 \begin_inset Quotes erd
17957 \begin_inset Formula $\times$
17961 \begin_inset Newline newline
17964 2x2 looks cheap compared to
17965 \begin_inset Formula $2\times2$
17971 \begin_layout Standard
17972 and more \SpecialChar \ldots{}
17973 It is an invaluable tool when you are
17974 \begin_inset Quotes eld
17978 \begin_inset Quotes erd
17981 your document before printing, and you should run it right after the obligatory
17982 spelling check, and before you go fine tuning the typesetting.
17985 \begin_layout Subsection
17989 \begin_layout Standard
17990 If you have the program installed, usage is as simple as choosing
17992 Tools\SpecialChar \menuseparator
17994 \begin_inset space ~
18000 This will make LyX generate a LaTeX file of your document, start
18004 to check it, and then make LyX insert
18005 \begin_inset Quotes eld
18009 \begin_inset Quotes erd
18012 with the warnings from
18016 , if there were any.
18017 The warnings will be placed close to the point of the mistake, and you
18018 can quickly find them by using the
18020 Navigate\SpecialChar \menuseparator
18023 menu item, or the shortcut key
18032 Open the error boxes by clicking on them with the mouse, or use the shortcut
18041 bindings, or the corresponding
18050 Read the warning and correct the mistake, if it is a mistake.
18051 If you have trouble understanding what the warning is about, you can safely
18053 Remember that there is a hidden layer between the document on screen and
18054 the technical details in invoking
18058 , and this gap can make some warnings seem arcane or just right down plain
18062 \begin_layout Standard
18063 This document is an excellent testing bed for the feature, and it should
18064 provide quite a few warnings for you to fiddle with.
18065 Since computers are only so smart, expect most of the warnings to be false
18069 \begin_layout Subsection
18070 How to fine tune it
18073 \begin_layout Standard
18074 Sometimes, you'll find that
18078 makes more noise than suits your mood.
18079 Then you can choose not to use it, wait until your mood changes, or try
18084 to get better along with you.
18085 Another choice in the most desperate situations is to use
18087 View\SpecialChar \menuseparator
18089 \begin_inset space ~
18093 \begin_inset space ~
18097 \begin_inset space ~
18102 , which will get rid of all warnings instantly.
18105 \begin_layout Standard
18114 very configurable and extensible, you shouldn't expect to solve all problems
18120 Since LyX has to generate a somewhat special LaTeX file to be able to match
18121 the line numbers from the
18129 \begin_layout Plain Layout
18130 You can inspect the specific output from
18136 Edit\SpecialChar \menuseparator
18138 \begin_inset space ~
18142 \begin_inset space ~
18156 to the internal document structure, some of the warnings will not seen
18157 to appear correctly.
18158 There are two things you can do about this:
18161 \begin_layout Itemize
18166 invocation command line in
18182 installation configuration file (usually with the file
18187 See below to learn what warnings can be enabled and disabled on the command
18192 \begin_layout Itemize
18193 Export your document as a raw LaTeX file using
18195 File\SpecialChar \menuseparator
18196 Export\SpecialChar \menuseparator
18204 Invoked in this way, it can be a hassle to find the corresponding place
18205 in the document inside LyX, but with a little patience, you should be able
18209 \begin_layout Standard
18210 Here follows the warning messages that can be enabled and disabled in
18219 to disable a warning, and
18223 to enable a warning.
18224 The emphasized entries are disabled by default, because the default is
18227 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18232 \begin_layout Standard
18233 Notice that you should only use the options that enable and disable warnings,
18234 because LyX relies on some of the other command line parameters to be set
18235 in a specific way to have a chance to communicate with
18242 \begin_layout Enumerate
18246 Command terminated with space.
18249 \begin_layout Enumerate
18252 Non-breaking space (
18253 \begin_inset Quotes eld
18261 \begin_inset Quotes erd
18264 ) should have been used.
18267 \begin_layout Enumerate
18271 You should enclose the previous parenthesis with
18272 \begin_inset Quotes eld
18280 \begin_inset Quotes erd
18286 \begin_layout Enumerate
18289 Italic correction (
18290 \begin_inset Quotes eld
18300 \begin_inset Quotes erd
18303 ) found in non-italic buffer.
18306 \begin_layout Enumerate
18309 Italic correction (
18310 \begin_inset Quotes eld
18320 \begin_inset Quotes erd
18323 ) found more than once.
18326 \begin_layout Enumerate
18330 No italic correction (
18331 \begin_inset Quotes eld
18341 \begin_inset Quotes erd
18347 \begin_layout Enumerate
18351 \begin_inset Quotes eld
18359 \begin_inset Quotes erd
18363 \begin_inset Quotes eld
18371 \begin_inset Quotes erd
18377 \begin_layout Enumerate
18380 Wrong length of dash may have been used.
18383 \begin_layout Enumerate
18387 \begin_inset Quotes eld
18395 \begin_inset Quotes erd
18399 \begin_inset Quotes eld
18407 \begin_inset Quotes erd
18413 \begin_layout Enumerate
18417 \begin_inset Quotes eld
18425 \begin_inset Quotes erd
18431 \begin_layout Enumerate
18435 \begin_inset Quotes eld
18443 \begin_inset Quotes erd
18446 to achieve an ellipsis.
18449 \begin_layout Enumerate
18452 Inter-word spacing (
18453 \begin_inset Quotes eld
18463 \begin_inset Quotes eld
18466 ) should perhaps be used.
18469 \begin_layout Enumerate
18472 Inter-sentence spacing (
18473 \begin_inset Quotes eld
18483 \begin_inset Quotes erd
18486 ) should perhaps be used.
18489 \begin_layout Enumerate
18492 Could not find argument for command.
18495 \begin_layout Enumerate
18499 \begin_inset Quotes eld
18507 \begin_inset Quotes erd
18513 \begin_layout Enumerate
18516 Math mode still on at end of LaTeX file.
18519 \begin_layout Enumerate
18523 \begin_inset Quotes eld
18531 \begin_inset Quotes erd
18534 doesn't match the number of
18535 \begin_inset Quotes eld
18543 \begin_inset Quotes erd
18549 \begin_layout Enumerate
18552 You should use either
18555 \begin_inset Quotes eld
18563 \begin_inset Quotes erd
18568 as an alternative to
18569 \begin_inset Quotes eld
18577 \begin_inset Quotes erd
18583 \begin_layout Enumerate
18590 " (ASCII 39) instead of "
18597 \begin_layout Enumerate
18600 User-specified pattern found.
18603 \begin_layout Enumerate
18606 This command might not be intended.
18609 \begin_layout Enumerate
18616 \begin_layout Enumerate
18634 \begin_layout Enumerate
18637 Delete this space to maintain correct page references.
18640 \begin_layout Enumerate
18644 You might wish to put this between a pair of
18645 \begin_inset Quotes eld
18653 \begin_inset Quotes erd
18659 \begin_layout Enumerate
18662 You ought to remove spaces in front of punctuation.
18665 \begin_layout Enumerate
18668 Could not execute LaTeX command.
18671 \begin_layout Enumerate
18680 in front of small punctuation.
18683 \begin_layout Enumerate
18691 may look prettier here.
18694 \begin_layout Enumerate
18698 Multiple spaces detected in output.
18701 \begin_layout Enumerate
18704 This text may be ignored.
18707 \begin_layout Enumerate
18713 \begin_inset Quotes eld
18718 to begin quotation, not
18725 \begin_layout Enumerate
18732 to end quotation, not
18735 \begin_inset Quotes eld
18743 \begin_layout Enumerate
18749 \begin_layout Enumerate
18752 You should perhaps use
18753 \begin_inset Quotes eld
18761 \begin_inset Quotes erd
18767 \begin_layout Enumerate
18770 You should put a space in front of/after parenthesis.
18773 \begin_layout Enumerate
18776 You should avoid spaces in front of/after parenthesis.
18779 \begin_layout Enumerate
18783 You should not use punctuation in front of/after quotes.
18786 \begin_layout Enumerate
18789 Double space found.
18792 \begin_layout Enumerate
18795 You should put punctuation outside inner/inside display math mode.
18798 \begin_layout Enumerate
18801 You ought to not use primitive TeX in LaTeX code.
18804 \begin_layout Enumerate
18807 You should remove spaces in front of
18808 \begin_inset Quotes eld
18816 \begin_inset Quotes erd
18822 \begin_layout Enumerate
18825 \begin_inset Quotes eld
18833 \begin_inset Quotes erd
18836 is normally not followed by
18837 \begin_inset Quotes eld
18845 \begin_inset Quotes erd
18851 \begin_layout Standard
18852 In later versions of LyX, we hope to provide a more complete interface to
18853 this tool (and it's smaller cousin
18857 ) to exploit the full power of it.
18858 But it's not exactly useless as it is now: go try it on one of your existing
18859 documents of a certain length and be surprised.
18862 \begin_layout Section
18863 Version Control in LyX
18866 \begin_layout Standard
18869 Lars Gullik Bjønnes
18876 \begin_layout Subsection
18880 \begin_layout Standard
18881 A friend of mine wanted to try LyX for a group project.
18882 When he didn't find support for version control or file locking, he dropped
18884 This angered me a bit, so I thought that I should at least make support
18885 for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
18886 This has been done.
18887 LyX now supports some of the most basic RCS/CVS/SVN commands.
18888 If you need something a bit more sophisticated you will have to do that
18889 manually in a terminal.
18892 \begin_layout Standard
18893 Before you begin to use the version control features in LyX, you should
18894 be familiar with RCS/CVS/SVN usage before start using it under LyX.
18895 Also note that CVS support is not as good as subversion support so we advice
18897 Good place to start with Subversion is SVN Book
18901 \begin_layout Plain Layout
18902 \begin_inset CommandInset href
18904 target "http://svnbook.red-bean.com/"
18914 In case of RCS you should read
18915 \begin_inset Quotes eld
18919 \begin_inset Quotes erd
18922 (a man file, read it with
18927 This file describes all the basic features of RCS.
18928 You should especially notice the comment about a RCS directory, and the
18929 notion of a master RCS file (the file ending in
18936 \begin_layout Standard
18937 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18938 package—no guarantees are made for older versions.
18939 Most of the log messages are not currently displayed after operations —
18940 you can check them in Messages pane if unsure.
18943 \begin_layout Standard
18944 For introducing your own external commands consult vc-command in the manual
18948 \begin_layout Subsection
18949 RCS commands in LyX
18952 \begin_layout Standard
18953 The following sections describe the RCS commands supported by LyX.
18954 You can find them in the
18956 File\SpecialChar \menuseparator
18958 \begin_inset space ~
18964 LyX was tested against RCS 5.7.
18967 \begin_layout Subsubsection
18973 \begin_layout Standard
18974 If your document is not under revision control, this is the only item shown
18976 And if it is under revision control, the
18980 item is not visible.
18984 \begin_layout Standard
18985 This command registers your document with RCS (unless you are under the
18986 directory managed by CVS)\SpecialChar \@.
18987 You are asked interactively to supply an initial
18988 description of the document.
18989 The document is now set in Read-Only mode and you have to
18992 \begin_inset space ~
18996 \begin_inset space ~
19000 \begin_inset space ~
19005 , before making any changes to it.
19006 A document under revision control has a
19007 \begin_inset Quotes eld
19010 [RCS:<version> <locker>]
19011 \begin_inset Quotes erd
19014 item tagged to the filename in the minibuffer.
19017 \begin_layout Standard
19018 RCS command that is run:
19020 ci -q -u -i -t-"<initial description>" <file-name>
19023 \begin_layout Standard
19028 to understand the switches.
19032 \begin_layout Subsubsection
19038 \begin_layout Standard
19039 When you are finished editing a file, you check in your changes.
19040 When you do this, you are asked for a description of the changes.
19041 This is stored in the history log.
19042 The version number is bumped, your changes are applied to the master RCS
19043 file, the document is unlocked and set to Read-Only mode.
19047 \begin_layout Standard
19050 ci -q -u -m"<description>" <file-name>
19053 \begin_layout Subsubsection
19059 \begin_layout Standard
19060 By doing this you lock the document so that only you can edit it.
19061 This will also make the document Read-Write only for you.
19062 You will usually continue editing for a while and when you are finished
19063 you check in your changes.
19064 The status line is changed to reflect that you have locked the file.
19068 \begin_layout Standard
19071 co -q -l <file-name>
19074 \begin_layout Subsubsection
19077 Revert To Repository Version
19080 \begin_layout Standard
19081 This will discard all changes made to the document since the last check
19083 You get a warning before changes are discarded.
19086 \begin_layout Standard
19089 co -f -u<version> <file-name>
19092 \begin_layout Subsubsection
19098 \begin_layout Standard
19099 This makes as if the last check in never happened.
19100 No changes are made to the document loaded into LyX, but the last version
19101 is removed from the master RCS file.
19105 \begin_layout Standard
19108 rcs -o<version> <file-name>
19111 \begin_layout Subsubsection
19117 \begin_layout Standard
19118 This shows the complete history of the RCS document.
19123 is shown in a browser.
19131 \begin_layout Subsubsection
19135 \begin_layout Standard
19136 LyX supports RCS version number information (only), see
19137 \begin_inset CommandInset ref
19139 reference "sub:VCS-Revision-Information"
19146 \begin_layout Subsection
19147 CVS commands in LyX
19150 \begin_layout Standard
19151 A subset of CVS operations is supported by LyX.
19152 You can find the commands in the
19154 File\SpecialChar \menuseparator
19156 \begin_inset space ~
19162 The version control system SVN is more powerful, so please use it instead
19163 of CVS if possible.
19166 \begin_layout Subsubsection
19172 \begin_layout Standard
19173 If you start from scratch with CVS you have to create your repository and
19174 checkout the working copy with external tools.
19175 If you're using a client-server setup you may need to login before doing
19176 the first repository checkout.
19179 \begin_layout Standard
19180 If your documents are under revision control and others are using the same
19181 repository problems arise when different changes to the same document at
19182 the same location happen.
19183 Standard CVS repositories doesn't operate with a file locking mechanism.
19184 This may be surprising, but conflicts only occur if people disagree on
19185 the proper content of the same part of a document.
19186 So, if co-workers are used to communicate regularly, these conflicts occur
19188 If they don't communicate they have a fundamental problem anyway.
19189 Nevertheless some people like to work with so called
19190 \begin_inset Quotes eld
19194 \begin_inset Quotes erd
19198 If they do so the working copy of all files is readonly when checked out
19199 first and the user starts editing after using a special command to make
19200 the working copy writable.
19201 When the changes are checked in the working copy returns to readonly state.
19202 With LyX one has to edit the
19203 \begin_inset Flex Code
19206 \begin_layout Plain Layout
19212 file and add the line
19213 \begin_inset Flex Code
19216 \begin_layout Plain Layout
19222 to work with reserved checkouts.
19223 The benefit is the possibility to see who is using a writable copy of some
19225 It's not guaranteed only one user makes a copy writable.
19228 \begin_layout Standard
19229 LyX tries to guess if you're using reserved or non-reserved checkouts.
19230 If your working copy is readonly or it is writable and an additional copy
19231 of your document exists in the CVS/Base sub-directory a reserved otherwise
19232 a non-reserved checkout is assumed.
19233 When a reserved checkout is detected you have to use
19234 \begin_inset Flex MenuItem
19237 \begin_layout Plain Layout
19243 to make your working copy writable if it's readonly.
19245 \begin_inset Flex MenuItem
19248 \begin_layout Plain Layout
19254 operation is possible and that makes your working copy readonly again after
19255 transferring your changes to the repository.
19258 \begin_layout Standard
19259 More information about CVS can be found here
19260 \begin_inset Flex URL
19263 \begin_layout Plain Layout
19265 http://www.nongnu.org/cvs
19271 \begin_inset Flex URL
19274 \begin_layout Plain Layout
19276 http://ximbiot.com/cvs
19284 \begin_layout Standard
19289 to understand the sub-commands and the switches mentioned below.
19292 \begin_layout Subsubsection
19298 \begin_layout Standard
19299 If your document is not under revision control, this is the only item shown
19301 And if it is under revision control, the
19308 item is not visible.
19312 \begin_layout Standard
19313 This command registers in CVS your document
19316 \begin_inset Flex Strong
19319 \begin_layout Plain Layout
19329 in case you have already the documents directory under CVS control (in
19335 This means you have to create or checkout the archive by yourself using
19337 (In case you forget that step LyX registers the document with RCS.)
19340 \begin_layout Standard
19341 Then you are asked interactively to supply an initial description of the
19343 Don't forget that registered file is not yet checked in.
19346 \begin_layout Standard
19347 CVS command that is run:
19349 cvs -q add -m"<entered message>" "<file-name>"
19352 \begin_layout Standard
19357 above and for all other CVS commands is an abbreviation for
19358 \begin_inset Quotes eld
19361 change the current working directory to file location and use the file name
19362 without path component as argument
19363 \begin_inset Quotes erd
19369 \begin_layout Subsubsection
19375 \begin_layout Standard
19376 When you are finished editing a file, you commit your changes.
19377 When you do this and you had changed the document, you are asked for a
19378 description of the changes.
19379 After that changes are written to the repository.
19380 In case you didn't change the document and a reserved checkout is detected
19381 the reservation made on
19382 \begin_inset Flex MenuItem
19385 \begin_layout Plain Layout
19394 \begin_layout Labeling
19395 \labelwidthstring 00.00.0000
19397 \begin_inset space ~
19401 \begin_inset space ~
19405 \begin_inset Newline newline
19409 \begin_inset Flex Code
19412 \begin_layout Plain Layout
19415 -q commit -m"<description>" "<file-name>"
19421 \begin_inset Newline newline
19425 \begin_inset Flex Code
19428 \begin_layout Plain Layout
19439 \begin_layout Subsubsection
19445 \begin_layout Standard
19446 When you are sharing a repository with others, you may have to incorporate
19447 their changes into your working copy.
19450 \begin_layout Standard
19453 cvs -q update "<file-name>"
19456 \begin_layout Standard
19457 If a readonly checkout is detected the working copy is made writable and
19461 \begin_layout Standard
19464 cvs -q edit "<file-name>"
19467 \begin_layout Subsubsection
19470 Revert To Repository Version
19473 \begin_layout Standard
19474 This will discard all changes made to the document since the last check
19476 You get a warning before changes are discarded.
19477 Firstly the file is deleted, secondly CVS update command is run.
19480 \begin_layout Standard
19483 cvs -q update "<file-name>"
19486 \begin_layout Standard
19487 If a reserved checkout is detected and the working copy has no changes only
19488 the reservation is undone.
19491 \begin_layout Standard
19494 cvs -q unedit "<file-name>"
19497 \begin_layout Subsubsection
19498 Update of the local directory checkout from repository
19501 \begin_layout Standard
19502 Once your documents gets more complex, containing sub-documents and pictures,
19504 \begin_inset Flex Code
19507 \begin_layout Plain Layout
19513 files and so on using version control becomes more complicated.
19514 LyX supports updating the whole tree in which resides the document.
19515 This become especially useful once you cooperate with people which neither
19516 have detailed knowledge about CVS usage nor they have ambition to commit
19517 additional material to the repository.
19518 You have to organize the files structure so that all external files are
19519 in the same directory or subdirectories of the document.
19520 It's good practice anyway to store multipart documents in an extra directory.
19523 \begin_layout Standard
19525 \begin_inset Flex Code
19528 \begin_layout Plain Layout
19529 Update local directory from repository
19534 command updates the whole directory.
19535 If local changes are detected user is warned before update starts.
19536 In case of merge conflicts both versions of the conflicting document parts
19537 are placed in the final document.
19538 You have to review and correct the result of the merge.
19539 You'll find the conflicts enclosed in pairs of
19540 \begin_inset Flex Code
19543 \begin_layout Plain Layout
19550 \begin_inset Flex Code
19553 \begin_layout Plain Layout
19560 \begin_inset Flex Code
19563 \begin_layout Plain Layout
19570 The first part is your version as before the update operation with the
19571 document name prepended.
19572 The second one is the repository version with the version number after
19574 \begin_inset Flex Code
19577 \begin_layout Plain Layout
19586 \begin_layout Labeling
19587 \labelwidthstring 00.00.0000
19589 \begin_inset space ~
19593 \begin_inset space ~
19597 \begin_inset Newline newline
19601 \begin_inset Flex Code
19604 \begin_layout Plain Layout
19612 (Ask if changes are detected.)
19613 \begin_inset Newline newline
19617 \begin_inset Flex Code
19620 \begin_layout Plain Layout
19621 cd $path; cvs -q update
19631 \begin_layout Standard
19633 \begin_inset Flex Code
19636 \begin_layout Plain Layout
19642 stands for the path to the document.
19645 \begin_layout Subsubsection
19651 \begin_layout Standard
19652 This shows the complete history of the CVS document.
19655 cvs log "<file-name>"
19657 is shown in a browser.
19660 \begin_layout Subsection
19661 SVN commands in LyX
19664 \begin_layout Standard
19665 SVN is now partially supported by LyX.
19666 You can find the commands in the
19668 File\SpecialChar \menuseparator
19670 \begin_inset space ~
19676 Please note that if you use password protected access to repository via
19677 ssh, you will be asked in terminal window.
19678 LyX was tested against SVN 1.5 and 1.6
19682 \begin_layout Plain Layout
19683 Most of the commands will work with 1.4 too, see
19684 \begin_inset CommandInset ref
19686 reference "sub:SVN-Repo-Update"
19698 \begin_layout Subsubsection
19704 \begin_layout Standard
19705 If your document is not under revision control, this is the only item shown
19707 And if it is under revision control, the
19714 item is not visible.
19718 \begin_layout Standard
19719 This command registers in SVN your document ONLY in case you have already
19720 the documents directory under SVN control (in particular
19725 This means you have to checkout the archive by yourself.
19729 \begin_layout Standard
19730 Then you are asked interactively to supply an initial description of the
19732 Don't forget that registered file is not yet commited.
19735 \begin_layout Standard
19736 SVN command that is run:
19739 \begin_inset Quotes eld
19743 \begin_inset Quotes erd
19749 \begin_layout Standard
19754 to understand the switches.
19758 \begin_layout Subsubsection
19764 \begin_layout Standard
19765 When you are finished editing a file, you commit your changes.
19766 When you do this, you are asked for a description of the changes.
19767 After that changes are commited.
19770 \begin_layout Standard
19775 \begin_layout Plain Layout
19776 In case locking is not enabled.
19778 \begin_inset CommandInset ref
19780 reference "subsec:SVN-File-Locking"
19791 svn commit -q -m"<description>" <file-name>
19794 \begin_layout Subsubsection
19800 \begin_layout Standard
19801 Updates the changes of this file from the repository.
19802 Be sure you understand SVN merging and conflicts resolving before using
19803 this function, because all conflicts has to be resolved manually by you!
19806 \begin_layout Standard
19811 \begin_layout Plain Layout
19819 svn update --non-interactive
19820 \begin_inset Quotes eld
19824 \begin_inset Quotes erd
19830 \begin_layout Subsubsection
19833 Revert To Repository Version
19836 \begin_layout Standard
19837 This will discard all changes made to the document since the last check
19839 You get a warning before changes are discarded.
19843 \begin_layout Standard
19847 \begin_inset Quotes eld
19851 \begin_inset Quotes erd
19857 \begin_layout Subsubsection
19858 \begin_inset CommandInset label
19860 name "sub:SVN-Repo-Update"
19864 Update of the local directory checkout from repository
19868 \begin_layout Plain Layout
19869 Note that this command will work only with subversion
19870 \begin_inset Formula $\geqq1.5$
19881 \begin_layout Standard
19882 All the commands above have one shortcomming - they deal with the current
19884 Once your document contains pictures, includes external
19885 \begin_inset Flex Code
19888 \begin_layout Plain Layout
19894 files and so on administration becomes more complicated.
19895 LyX now supports updating the whole tree in which resides the document
19899 \begin_layout Plain Layout
19900 One need to organize the files structure so that all external files are
19901 in the same directory or subdirectories of the document.
19908 This become especially useful once you cooperate with people which neither
19909 know about subversion management nor they have ambition to commit additional
19910 material to the repository.
19914 \begin_layout Standard
19915 \begin_inset Flex Code
19918 \begin_layout Plain Layout
19919 Update local directory from repository
19924 command updates the whole directory and in case of merge conflicts local
19925 version of the files are left, so no unintended data loss occurs.
19926 If local changes are detected user is warned before update starts.
19929 \begin_layout Labeling
19930 \labelwidthstring 00.00.0000
19932 \begin_inset space ~
19936 \begin_inset space ~
19940 \begin_inset Newline newline
19944 \begin_inset Flex Code
19947 \begin_layout Plain Layout
19953 (Ask if changes are detected.)
19954 \begin_inset Newline newline
19958 \begin_inset Flex Code
19961 \begin_layout Plain Layout
19962 svn update --accept mine-full $path
19970 \begin_layout Standard
19972 \begin_inset Flex Code
19975 \begin_layout Plain Layout
19981 stands for the path to the document.
19984 \begin_layout Subsubsection
19990 \begin_layout Standard
19991 This shows the complete history of the SVN document.
19995 \begin_inset Quotes eld
19999 \begin_inset Quotes erd
20004 is shown in a browser.
20007 \begin_layout Subsubsection
20009 \begin_inset CommandInset label
20011 name "subsec:SVN-File-Locking"
20018 \begin_layout Standard
20019 The file exchange through various revision control systems brings the problem
20020 of merge conflicts in case two different users try to edit the same (parts
20022 When such a conflict happens it needs manual resolving and one reasonable
20023 alternative is to provide some kind of locking mechanism, which guarantees
20024 that only one user is allowed to edit file at the given time.
20027 \begin_layout Standard
20028 SVN has two such mechanisms to provide mutual exclusivity for file access
20029 - locks and automatic setting of write permissions (see sec.
20031 \begin_inset CommandInset ref
20033 reference "subsec:Automatical-Locking-Property"
20038 \begin_inset Flex Code
20041 \begin_layout Plain Layout
20051 \begin_layout Plain Layout
20052 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20058 If this property is detected for a given document LyX starts to use SVN
20059 locks for document editing automatically and the whole check-in/out mechanism
20060 switches to the same regimen as for RCS.
20061 This in particular means there are two different modes of file use in LyX:
20064 \begin_layout Itemize
20066 The loaded file is in the read-only mode.
20067 For editing on needs to check-out.
20072 consists of updating from the repository and gaining write lock.
20073 If the lock is not possible to obtain, we remain in unlocked state.
20076 \begin_layout Itemize
20078 The loaded file is in the 'normal' edit mode.
20079 No other user is allowed to edit the file.
20084 consists of commiting changes and releasing write-lock.
20085 If no changes have been made to the document, no commit will be produced
20089 \begin_layout Plain Layout
20090 Don't be puzzled by the fact that you will be asked for commit message anyway.
20095 and only the write-lock will be released.
20098 \begin_layout Standard
20102 \begin_layout Labeling
20103 \labelwidthstring 00.00.0000
20106 svn commit -q -m"<description>" "<file-name>"
20107 \begin_inset Newline newline
20110 svn unlock "<file-name>"
20113 \begin_layout Labeling
20114 \labelwidthstring 00.00.0000
20117 svn update "<file-name>"
20118 \begin_inset Newline newline
20121 svn lock "<file-name>"
20124 \begin_layout Subsubsection
20127 \begin_inset CommandInset label
20129 name "subsec:Automatical-Locking-Property"
20135 Automatic Locking Property
20138 \begin_layout Standard
20139 The above mentioned automatic setting of write permissions of the .lyx file
20145 ile\SpecialChar \menuseparator
20151 \begin_inset space ~
20154 Control\SpecialChar \menuseparator
20159 oggle locking property
20162 This command is active only when the file is not locked on the svn server
20164 you need to check-out before proceeding).
20167 \begin_layout Labeling
20168 \labelwidthstring 00.00.0000
20170 \begin_inset space ~
20176 \begin_layout Labeling
20177 \labelwidthstring 00.00.0000
20180 svn propset svn:needs-lock ON "<file-name>"
20183 \begin_layout Labeling
20184 \labelwidthstring 00.00.0000
20187 svn propdel svn:needs-lock "<file-name>"
20190 \begin_layout Subsubsection
20191 \begin_inset CommandInset label
20193 name "sub:VCS-Revision-Information"
20197 Revision Information in Documents
20200 \begin_layout Standard
20201 There are more possibilities how to activate revision information in our
20205 \begin_layout Itemize
20206 LyX supports directly:
20210 \begin_layout Itemize
20211 tree revision information (
20212 \begin_inset Flex Code
20215 \begin_layout Plain Layout
20222 The result is the output of the
20223 \begin_inset Flex Code
20226 \begin_layout Plain Layout
20232 command, the following table gives you an idea, how to read the results.
20235 \begin_layout Standard
20237 \begin_inset Tabular
20238 <lyxtabular version="3" rows="6" columns="2">
20239 <features tabularvalignment="middle">
20240 <column alignment="center" valignment="top" width="0">
20241 <column alignment="center" valignment="top" width="0">
20243 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20246 \begin_layout Plain Layout
20252 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20255 \begin_layout Plain Layout
20263 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20266 \begin_layout Plain Layout
20272 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20275 \begin_layout Plain Layout
20276 mixed revision working copy
20283 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20286 \begin_layout Plain Layout
20292 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20295 \begin_layout Plain Layout
20296 modified working copy
20303 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20306 \begin_layout Plain Layout
20312 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20315 \begin_layout Plain Layout
20316 switched working copy
20323 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20326 \begin_layout Plain Layout
20332 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20335 \begin_layout Plain Layout
20336 partial working copy, from a sparse checkout
20343 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20346 \begin_layout Plain Layout
20352 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20355 \begin_layout Plain Layout
20356 mixed revision, modified, switched working copy
20369 \begin_layout Itemize
20370 file revision information.
20371 The result comes from parsing the output of
20372 \begin_inset Flex Code
20375 \begin_layout Plain Layout
20377 \begin_inset space ~
20381 \begin_inset space ~
20385 \begin_inset space ~
20394 Supported flags are:
20398 \begin_layout Itemize
20399 version number of the last commit (
20400 \begin_inset Flex Code
20403 \begin_layout Plain Layout
20412 \begin_layout Itemize
20413 author of the last commit (
20414 \begin_inset Flex Code
20417 \begin_layout Plain Layout
20426 \begin_layout Itemize
20427 date of the last commit (
20428 \begin_inset Flex Code
20431 \begin_layout Plain Layout
20440 \begin_layout Itemize
20441 time of the last commit (
20442 \begin_inset Flex Code
20445 \begin_layout Plain Layout
20455 \begin_layout Standard
20456 You can obtain this info via InsetInfo (e.g.
20458 \begin_inset Flex Code
20461 \begin_layout Plain Layout
20462 info-insert buffer vcs-date
20468 The information will be available only when you have the file stored under
20469 svn managment (i.e.
20471 \begin_inset Flex Code
20474 \begin_layout Plain Layout
20480 directory is available with your document).
20484 \begin_layout Itemize
20485 Another---a hacking one---possibility is to use svn keywords
20489 \begin_layout Plain Layout
20490 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20496 In short -- you set file keywords property (e.g.
20499 svn propset svn:keywords 'Rev' file.lyx
20501 ) and then paste keyword TeX code
20505 \begin_layout Plain Layout
20506 This is an easy way how to ensure that LyX won't break the line in the middle
20512 tag in your document (e.g.
20517 \begin_layout Plain Layout
20525 This way svn client will automatically substitute revision number (e.g.
20530 \begin_layout Plain Layout
20537 ) after each update and commit.
20538 There are more problems with this approach.
20539 Firstly, the '$' character is used in TeX world for math equations, so
20540 any occurence of math formula
20541 \begin_inset Formula $Rev$
20545 \begin_inset Formula $Rev:59$
20548 in your LyX document.
20549 Similarly for other keywords like Id, Date, Author, etc.
20550 Secondly svn output is dependent on your locales, so its very easy that
20551 svn would produce some problematic strings once Date is used.
20552 Thirdly you get the whole 'Rev: 59' string in your document instead of
20554 Until subversion implements user's custom keywords it will be hard to use
20555 this approach reliably or let LyX to support it directly.
20558 \begin_layout Subsection
20559 SVN and Windows Environment
20562 \begin_layout Quote
20563 My inclination is to say that if the user cannot figure out the command
20564 line operations on their own fairly quickly, they would be well advised
20565 to use TortoiseSVN.
20571 \begin_layout Subsubsection
20575 \begin_layout Standard
20576 In addition to installing LyX, and having access to a Subversion repository,
20577 the user will need to install the Subversion client program.
20578 A Windows installer for the client program is available from
20579 \begin_inset CommandInset href
20582 target "http://www.collab.net/nonav/downloads/subversion/"
20587 The user may also want to install
20588 \begin_inset CommandInset href
20591 target "http://tortoisesvn.tigris.org/"
20595 , which integrates Subversion operations into the context (rightclick) menu
20596 of Windows Explorer.
20597 Operations done outside LyX will typically be more convenient using the
20598 Explorer context menu.
20599 Note that TortoiseSVN is not a replacement for the client program, which
20600 is what LyX itself will use.
20603 \begin_layout Subsubsection
20604 Bringing a document under Subversion control
20607 \begin_layout Standard
20608 Before a LyX document can be brought under version control in Subversion,
20609 its parent directory needs to be under version control.
20610 If the document is being added to a project already in the repository,
20611 this is accomplished by checking the project out to the directory where
20612 the new document will be placed.
20613 If the project itself is not yet under version control (for instance, if
20614 this document starts a new project), the directory must be imported into
20616 This is done outside LyX.
20617 Both import and checkout are easily accomplished from the Explorer context
20618 menu using TortoiseSVN, or alternatively can be done using the command
20619 line client at a DOS prompt.
20620 The procedure for importing the project using TortoiseSVN is described
20621 below, assuming an existing repository and a new project being started
20629 For information on using the Subversion client program, run
20636 \begin_layout Enumerate
20643 in Windows Explorer, right click it, and select
20645 TortoiseSVN > Repo-browser
20648 If necessary, adjust the URL for the repository, then click OK.
20651 \begin_layout Enumerate
20652 Right click the level of the repository under which you want to place the
20653 new project folder (typically the top level) and click
20655 Create folder\SpecialChar \ldots{}
20658 Supply a name for the project folder and click OK.
20659 Add a message for the log file if desired, then click OK again.
20660 The new project folder should appear in the repository.
20661 Finally, click OK again to exit the repository browser.
20664 \begin_layout Enumerate
20665 Once again right click
20671 , this time selecting SVN Checkout\SpecialChar \ldots{}
20672 Select the URL of the project folder
20673 you just created in the repository, and set the checkout directory to
20681 You will be warned about a non-empty folder; click OK to proceed.
20682 You should now have a
20693 \begin_layout Enumerate
20694 Create or open your document in LyX and click
20699 ile\SpecialChar \menuseparator
20705 \begin_inset space ~
20708 Control\SpecialChar \menuseparator
20716 Add a log message and click OK to commit the document to version control.
20719 \begin_layout Standard
20720 From this point onward, you should have full functionality in the
20725 ile\SpecialChar \menuseparator
20731 \begin_inset space ~
20737 You also have the option of checking the document in and out, viewing its
20739 using the TortoiseSVN context menu in Windows Explorer or the Subversion
20740 client program from a command prompt.
20743 \begin_layout Subsubsection
20744 SSH tunnel used with SVN under Windows
20747 \begin_layout Standard
20748 Compared with Linux setting up svn client to communicate over ssh under
20749 Windows is a rather troublesome task.
20750 We will at least offer some hints how to setup the client side but prior
20751 knowledge about ssh and the Windows command line is needed, also be prepared
20752 for a great deal of frustration\SpecialChar \ldots{}
20756 \begin_layout Enumerate
20757 Get a svn client for windows, as described in the previous sections.
20758 When it is a fresh install run some svn command (e.g.
20760 \begin_inset Flex Code
20763 \begin_layout Plain Layout
20769 ) to create config files, which you will need to change later on.
20772 \begin_layout Enumerate
20773 Choose a ssh client for Windows.
20774 There are several possibilities, we will use the one from Putty tools
20778 \begin_layout Plain Layout
20779 \begin_inset Flex URL
20782 \begin_layout Plain Layout
20784 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20795 You will need to set the connection up so that the client doesn't ask for
20796 any password from you.
20797 To keep things easy we will use only keys without any additional password
20802 \begin_layout Enumerate
20804 \begin_inset Flex Code
20807 \begin_layout Plain Layout
20814 Save your private .ppk key file and put the public one on the server side.
20815 If the SVN server runs on Linux, note that the format of the public key
20816 is not compatible with Linux openssh and you will need to direcly copy-paste
20819 Public key for pasting into OpenSSH authorized_keys file
20821 :” edit field into the server's
20822 \begin_inset Flex Code
20825 \begin_layout Plain Layout
20826 ~/.ssh/authorized_keys
20832 \begin_inset Flex Code
20835 \begin_layout Plain Layout
20844 \begin_layout Enumerate
20846 \begin_inset Flex Code
20849 \begin_layout Plain Layout
20856 In the SVN config file
20860 \begin_layout Plain Layout
20861 Exact path depends on Windows version, usually somewhere around
20862 \begin_inset Flex Code
20865 \begin_layout Plain Layout
20868 Documents and Settings
20882 \begin_inset Flex Code
20885 \begin_layout Plain Layout
20900 , section [tunnels], setup ssh command, e.g.
20902 \begin_inset Flex Code
20905 \begin_layout Plain Layout
20906 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20915 \begin_layout Plain Layout
20916 It will usually take a lot of time to get exact command right and it depends
20918 For example do not have some remote server saved as a default session in
20920 If things fail, try to connect via plink without SVN first.
20929 \begin_layout Enumerate
20930 Checkout the SVN archive, e.g.
20932 \begin_inset Flex Code
20935 \begin_layout Plain Layout
20936 svn co svn+ssh://user@server/repository_path
20944 \begin_layout Subsubsection
20945 End-of-Line Conversions
20948 \begin_layout Standard
20949 When the collsraborators are mixing Linux and Windows environments, LyX
20950 will use different line endings inside the .lyx files.
20951 This is not a problem as far as LyX functionality is concerned, but the
20952 commit diffs will be huge and merge-conflicts prone.
20953 Fortunately SVN itself knows
20957 \begin_layout Plain Layout
20958 \begin_inset Flex URL
20961 \begin_layout Plain Layout
20963 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
20973 how to deal with CR/LF problems when switching .lyx files to the
20974 \begin_inset Flex Code
20977 \begin_layout Plain Layout
20987 \begin_layout Plain Layout
20989 \begin_inset Flex Code
20992 \begin_layout Plain Layout
20993 svn propset svn:eol-style native FILE_NAME
21006 \begin_layout Subsection
21010 \begin_layout Standard
21011 With the recent addition of the vc-command function LyX power users are
21012 allowed to create their own commands for revision control.
21015 \begin_layout Standard
21016 As an example you can see how two TortoiseSVN commands could be integrated
21020 \begin_layout Description
21022 \begin_inset Flex Code
21025 \begin_layout Plain Layout
21026 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21034 \begin_layout Description
21036 \begin_inset Flex Code
21039 \begin_layout Plain Layout
21040 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21048 \begin_layout Subsection
21049 Version control and Document comparison
21052 \begin_layout Standard
21053 One of the typical uses of version control is to inspect the changes between
21054 revisions, usually by creating
21055 \begin_inset Flex Code
21058 \begin_layout Plain Layout
21065 While this is useful for plain text files, it is much less useful in the
21066 case of LyX files, which have more complicated structure.
21067 Hence we provide binding to the Document comparison feature.
21068 They are two ways of calling this feature - either by direct call of
21069 \begin_inset Flex Code
21072 \begin_layout Plain Layout
21078 LyX function (for details see LyX functions manual) or by icon/menu item
21080 \begin_inset Flex MenuItem
21083 \begin_layout Plain Layout
21084 Compare with older revision...
21090 One can either compare two chosen revisions of the document or he can simply
21091 compare the current version of edited text with older revisions (where
21093 \begin_inset Flex MenuItem
21096 \begin_layout Plain Layout
21102 ' revisions back means comparison of the edited file with last commited
21107 \begin_layout Standard
21108 This feature is supported for SVN and RCS though due to the more complicated
21109 versioning scheme of RCS there is a constraint -- when addressing the revisions
21110 in dialog, numbers always point to the last number in RCS revision number,
21115 \begin_layout Section
21116 Literate Programming
21119 \begin_layout Standard
21124 (kayvan@sylvan.com)
21128 original documentation written by
21130 Edmar Wienskoski Jr.
21133 (edmar-w-jr@technologist.com)
21136 \begin_layout Subsection
21140 \begin_layout Standard
21141 The main purpose of this documentation is to show you how to use LyX for
21142 literate programming, where it is assumed that you are familiar with this
21143 programming technique, and know what
21144 \begin_inset Quotes eld
21148 \begin_inset Quotes erd
21152 \begin_inset Quotes eld
21156 \begin_inset Quotes erd
21160 If that is not the case, please follow the web links provided in the following
21162 There is a lot of good documentation out there covering old development
21163 history to the latest tools tips.
21166 \begin_layout Standard
21167 It is also assumed that you are familiar with LyX itself to a point that
21168 you are comfortable changing your LyX preferences, and X resources file.
21169 If that is not the case please refer to other LyX documentation to cover
21170 your specific needs.
21173 \begin_layout Subsection
21174 Literate Programming
21177 \begin_layout Standard
21178 From the Literate Programming FAQ:
21181 \begin_layout Quotation
21182 Literate programming is the combination of documentation and source together
21183 in a fashion suited for reading by human beings.
21184 In fact, literate programs should be enjoyable reading, even inviting!
21185 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21186 and documentation in a single file.
21187 Literate programming tools then parse the file to produce either readable
21188 documentation or compilable source.
21189 The WEB style of literate programming was created by D.
21190 \begin_inset space \thinspace{}
21194 Knuth during the development of his TeX typesetting software.
21198 \begin_layout Standard
21199 Another excerpt says:
21202 \begin_layout Quotation
21205 How is literate programming different from verbose commenting?
21208 \begin_layout Quotation
21209 There are three distinguishing characteristics.
21210 In order of importance, they are:
21214 \begin_layout Itemize
21215 flexible order of elaboration
21218 \begin_layout Itemize
21219 automatic support for browsing
21222 \begin_layout Itemize
21223 typeset documentation, especially diagrams and mathematics
21227 \begin_layout Standard
21228 Now that I sparked your curiosity, take a look in the references.
21231 \begin_layout Subsubsection
21235 \begin_layout Standard
21236 The complete Literate Programming FAQ can be found at:
21239 \begin_layout Quote
21240 Literate Programming FAQ
21241 \begin_inset Flex URL
21244 \begin_layout Plain Layout
21246 http://www.literateprogramming.com/lpfaq.pdf
21254 \begin_layout Standard
21255 The FAQ lists 23 (twenty three!) different literate programming tools.
21256 Where some are specialized or
21257 \begin_inset Quotes eld
21261 \begin_inset Quotes erd
21264 for particular programming languages, while other have general scope.
21269 for my own use for several reasons:
21272 \begin_layout Itemize
21273 It can generate the documentation either in LaTeX or HTML.
21276 \begin_layout Itemize
21277 It has a open architecture, i.
21278 \begin_inset space \thinspace{}
21282 \begin_inset space \space{}
21285 it is easy to plug in new filters and to perform special processing that
21290 \begin_layout Itemize
21291 There is a good selection of filters available already (the HTML is one
21295 \begin_layout Itemize
21299 \begin_layout Standard
21300 The Noweb web page can be found at:
21303 \begin_layout Quote
21305 \begin_inset Flex URL
21308 \begin_layout Plain Layout
21310 http://www.cs.virginia.edu/~nr/noweb/
21318 \begin_layout Standard
21319 Starting from there you can reach many other interesting links and even
21320 some literate program examples.
21323 \begin_layout Subsection
21324 LyX and Literate Programming
21327 \begin_layout Standard
21328 The LyX support for Literate Programming is provided by using the generic
21329 LyX converters mechanism.
21330 This support is provided in a
21331 \begin_inset Quotes eld
21335 \begin_inset Quotes erd
21339 \begin_inset space \thinspace{}
21343 \begin_inset space \space{}
21346 you will be able to use this new LyX feature with some other literate programmin
21347 g tool of your choice by just changing your LyX preferences.
21350 \begin_layout Subsubsection
21351 Generating documents and code (weaving and tangling)
21354 \begin_layout Paragraph
21355 Selecting the document class
21358 \begin_layout Standard
21359 If you have installed Noweb and LyX successfully, whenever you open a new
21360 document or try to change the document class of an existing one, you will
21361 find that there are three new document classes available:
21364 \begin_layout Itemize
21368 \begin_layout Itemize
21372 \begin_layout Itemize
21376 \begin_layout Standard
21377 You must select one of them to create your literate documents from.
21381 \begin_layout Standard
21382 Note that literate documents are not limited to these three classes.
21383 New classes can be generated from other styles like letter or in combination
21384 with other class variations like Article (AMS).
21385 If you have special needs that cannot be covered by one of the existing
21386 classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21387 will arrange to insert a new entry, or teach you how to do it.
21391 \begin_layout Plain Layout
21392 It is very simple, it involves the creation of a file with four lines, and
21393 re-running of the auto configuration.
21398 Moreover, if you use a literate tool other than Noweb you may need to create
21399 a new set of document classes for it.
21402 \begin_layout Paragraph
21406 \begin_layout Standard
21407 LyX enables you to write code with a layout named
21415 \begin_layout Plain Layout
21416 The equivalent Noweb term is
21417 \begin_inset Quotes eld
21421 \begin_inset Quotes erd
21425 For historical reasons, I got used to the term
21426 \begin_inset Quotes eld
21430 \begin_inset Quotes erd
21433 introduced by other literate tool named Nuweb, which I used for many years
21434 before rendering myself to Noweb.
21439 Noweb delimits scraps like this:
21442 \begin_layout LyX-Code
21446 \begin_layout LyX-Code
21450 \begin_layout LyX-Code
21454 \begin_layout LyX-Code
21458 \begin_layout LyX-Code
21462 \begin_layout Standard
21463 The problem is that whatever is written in between the << and the
21467 must be taken literally, i.
21468 \begin_inset space \thinspace{}
21472 \begin_inset space \space{}
21475 LyX should be prevented from making any special interpretation of what has
21477 This is handled by a special layout named Scrap, that works like a normal
21478 paragraph but has a free spacing capability.
21481 \begin_layout Standard
21482 The down side of the Scrap paragraph layout is that consecutive paragraphs
21483 of code will be spaced with one empty line in the source code and also
21484 in the printed documentation.
21485 The work around is to enter each line of code within a single Scrap, with
21486 a newline (ctrl-return).
21487 The example above will look like this:
21491 \begin_layout Plain Layout
21492 If you have a printed version of this document you will not see any difference
21493 between the previous example and this one.
21501 \begin_layout LyX-Code
21503 \begin_inset Newline newline
21507 \begin_inset Newline newline
21511 \begin_inset Newline newline
21515 \begin_inset Newline newline
21521 \begin_layout Standard
21522 This layout works fine.
21523 The only real inconvenience is that you have to type ctrl-return instead
21528 \begin_layout Plain Layout
21529 It is in my list of
21530 \begin_inset Quotes eld
21534 \begin_inset Quotes erd
21545 \begin_layout Standard
21546 As a special note, you can also use the
21547 \begin_inset Quotes eld
21551 \begin_inset Quotes erd
21554 construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21558 \begin_layout LyX-Code
21560 \begin_inset Newline newline
21563 def some_function(args):
21564 \begin_inset Newline newline
21567 "This is the doc string for this function."
21568 \begin_inset Newline newline
21571 print "My args: ", args
21574 \begin_layout LyX-Code
21575 @ %def some_function
21578 \begin_layout Standard
21579 For an example of this usage and the resulting cross-reference output, look
21580 at the Literate python program in
21582 LIBDIR/examples/listerrors.lyx
21584 which should make this all clear.
21587 \begin_layout Paragraph
21588 Generating the documentation
21591 \begin_layout Standard
21592 At this point you already have a new document file with a proper document
21593 class, and with some code and text on it.
21594 How do I print it? The answer is simple, you select
21596 View\SpecialChar \menuseparator
21600 Just like you would do for a plain document.
21601 No special procedure is required.
21604 \begin_layout Standard
21605 To help orientate you, I will now explain what happens inside LyX:
21608 \begin_layout Enumerate
21611 Update\SpecialChar \menuseparator
21614 menu option is chosen, a LaTeX file is generated.
21619 \begin_layout Standard
21620 If the document is of any literate class the generated file will be named
21621 with an extension name defined by the
21622 \begin_inset Quotes eld
21626 \begin_inset Quotes erd
21629 format (defined in the Preferences panel), otherwise the file will have
21638 \begin_layout Enumerate
21639 Note that the only difference so far is in the name of the file, no special
21640 processing is required by LyX.
21641 Given that you formatted the code using the Scrap layout that, by itself,
21642 takes care of the business.
21645 \begin_layout Enumerate
21646 If the document is of any literate class LyX will then use the internal
21647 LyX to Noweb converter, followed by the Noweb to LaTeX converter
21651 \begin_layout Plain Layout
21652 The converters are defined in the
21654 Tools\SpecialChar \menuseparator
21658 \begin_inset Quotes eld
21662 \begin_inset Quotes erd
21674 manual for general information about converters.
21679 to generate the LaTeX file.
21683 \begin_layout Standard
21684 Otherwise it will just skip this step.
21688 \begin_layout Enumerate
21689 Finally, LaTeX is invoked and the regular post processing continues as in
21693 \begin_layout Standard
21694 Independence from a particular
21695 \begin_inset Quotes eld
21699 \begin_inset Quotes erd
21702 is easily achieved by changing the commands that are run by the various
21706 \begin_layout Paragraph
21707 Generating the code
21710 \begin_layout Standard
21711 When the build menu option is chosen or the corresponding button in the
21712 toolbar is pressed, a LaTeX file is generated just like step 1 above.
21713 Next, LyX invokes the
21718 This converter needs to be defined by the user and is not installed by
21719 default, though the Program format is.
21720 This converter (like any other converter) will have two parts:
21723 \begin_layout Enumerate
21724 The converter program itself.
21725 This program performs the conversion from the one format to the other (in
21726 this case, from the Noweb format to the Program pseudo-format).
21729 \begin_layout Enumerate
21730 The error log parser.
21731 This is a program whose sole purpose is to rewrite error messages in a
21732 format that LyX understands.
21733 This makes it possible for LyX to place error boxes in the right places
21734 in the file buffer.
21737 \begin_layout Standard
21738 The first part, the
21739 \begin_inset Quotes eld
21743 \begin_inset Quotes erd
21746 setting, should be set to
21747 \begin_inset Quotes eld
21755 \begin_inset Quotes erd
21759 This basically means that LyX will call
21760 \begin_inset Quotes eld
21764 \begin_inset Quotes erd
21767 (a program or script) with the name of the Noweb file (normally a file
21768 in the LyX temp directory).
21772 \begin_layout Standard
21773 This is an implementation of
21774 \begin_inset Quotes eld
21778 \begin_inset Quotes erd
21781 that you can place in a directory on your path:
21784 \begin_layout LyX-Code
21788 \begin_layout LyX-Code
21792 \begin_layout LyX-Code
21793 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
21796 \begin_layout Standard
21797 The next part of the converter setting is the
21798 \begin_inset Quotes eld
21802 \begin_inset Quotes erd
21805 which is to be set to
21806 \begin_inset Quotes eld
21811 parselog=listerrors
21814 \begin_inset Quotes erd
21818 This will run any errors that are generated by the
21819 \begin_inset Quotes eld
21823 \begin_inset Quotes erd
21826 process through the
21827 \begin_inset Quotes eld
21831 \begin_inset Quotes erd
21837 \begin_layout Standard
21838 The converter code looks in
21846 then on the path for the
21847 \begin_inset Quotes eld
21851 \begin_inset Quotes erd
21857 \begin_layout Standard
21858 The build will normally take place in LyX's temporary directory, so the
21859 files produced by the conversion will be in that directory.
21860 LyX will copy out what it regards as the `main' file, but the
21864 conversion may produce several files, and so most of these would then be
21865 deleted when LyX was closed.
21866 The present solution is to use a `copier',
21870 \begin_layout Plain Layout
21879 manual for information on these.
21888 script in its default mode, so that the entire contents of the temporary
21889 directory is copied.
21890 More will get copied than is needed, to be sure, but nothing will be lost.
21891 If, however, you know what extensions the generated files will have, this
21892 can be improved by using the
21901 This option takes a comma-separated list of extensions to copy.
21902 So, for example, if the conversion will generate only files with the extensions
21911 , then the correct definition would be:
21914 \begin_layout LyX-Code
21915 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
21918 \begin_layout Standard
21919 The result will be that only files with these two extensions will be copied
21923 \begin_layout Paragraph
21924 Build instructions in the document
21927 \begin_layout Standard
21928 The last piece of the integration between LyX and noweb is the
21929 \begin_inset Quotes eld
21933 \begin_inset Quotes erd
21937 Generally, the instructions for building your program should be embedded
21938 in a scrap of its own.
21940 \begin_inset Quotes eld
21944 \begin_inset Quotes erd
21947 above uses the notangle command to look for this scrap (called
21948 \begin_inset Quotes eld
21952 \begin_inset Quotes erd
21955 ) and runs its contents through
21956 \begin_inset Quotes eld
21960 \begin_inset Quotes erd
21966 \begin_layout Standard
21967 Typically, such a scrap would look something like this:
21970 \begin_layout LyX-Code
21972 \begin_inset Newline newline
21976 \begin_inset Newline newline
21980 \begin_inset Newline newline
21983 if [ -z "${NOWEB_SOURCE}" ]
21984 \begin_inset Newline newline
21988 \begin_inset Newline newline
21991 NOWEB_SOURCE=myfile.nw
21992 \begin_inset Newline newline
21996 \begin_inset Newline newline
22000 code to extract files ...]
22001 \begin_inset Newline newline
22005 code to compile files ...]
22006 \begin_inset Newline newline
22012 \begin_layout Standard
22015 LIBDIR/examples/listerrors.lyx
22019 LIBDIR/examples/Literate.lyx
22021 which implement two versions of the
22022 \begin_inset Quotes eld
22026 \begin_inset Quotes erd
22029 program for some illustrations of how all of these pieces go together or
22032 LIBDIR/examples/noweb2lyx.lyx.
22035 Interestingly, these three files show off the language-indepence of the
22036 LyX literate programming support since they are written in Python, C and
22040 \begin_layout Subsubsection
22044 \begin_layout Standard
22045 All the Literate Programming support is configured by the
22047 Tools\SpecialChar \menuseparator
22051 \begin_inset Quotes eld
22055 \begin_inset Quotes erd
22059 The important parts are:
22062 \begin_layout Description
22064 \begin_inset space ~
22068 \begin_inset Quotes eld
22072 \begin_inset Quotes erd
22076 \begin_inset space ~
22079 format Set up via the Formats tab, this is where the Noweb-specific pieces
22089 , the file extension is set to
22094 This tells LyX to create a file with a
22098 extension in the first step of the conversion process.
22101 \begin_layout Description
22103 \begin_inset space ~
22111 \begin_inset space ~
22114 format This is an empty format whose sole purpose is to be the endpoint
22115 of a conversion (which then allows us to set up a converter for it).
22118 \begin_layout Description
22127 This converter performs the
22128 \begin_inset Quotes eld
22132 \begin_inset Quotes erd
22135 of the literate document.
22136 For Noweb, it is set to
22137 \begin_inset Quotes eld
22142 noweave -delay -index $$i > $$o
22145 \begin_inset Quotes erd
22151 \begin_layout Description
22161 \begin_inset Quotes eld
22165 \begin_inset Quotes erd
22169 As stated above, the Converter is set to
22170 \begin_inset Quotes eld
22178 \begin_inset Quotes erd
22181 , with Flags set to
22182 \begin_inset Quotes eld
22187 originaldir,parselog=listerrors
22190 \begin_inset Quotes erd
22196 \begin_layout Subsubsection
22200 \begin_layout Standard
22201 There is also a new function implemented in the LyX server, the
22202 \begin_inset Quotes eld
22205 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22209 \begin_layout Standard
22210 When debugging code with ddd/gdb, it is possible to invoke a text editor
22211 at the current execution position with a single key stroke.
22212 The default ddd configuration for that is shift-ctrl-V.
22213 It happens that you can define the editor command line invocation in ddd
22216 Edit\SpecialChar \menuseparator
22217 Preferences\SpecialChar \menuseparator
22220 dialog and changing the "Edit Sources" entry.
22223 \begin_layout Standard
22224 I take advantage of the new created LyX server function and this ddd feature,
22226 \begin_inset Quotes eld
22230 \begin_inset Quotes erd
22236 \begin_layout LyX-Code
22237 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22240 \begin_layout Standard
22241 With this, whenever you are using ddd and find a point in the program that
22242 you want to edit, you just press shift-ctrl-V (in the ddd window), and
22243 ddd you forward this information to LyX through the LyX server and then
22244 the LyX window will show the same file with the cursor at the same position
22245 ddd was pointing to.
22246 No more guessing or long scrolling to locate a point in the program back
22250 \begin_layout Standard
22251 Note however that you must enable the LyX server to get this feature working
22252 (it is disabled by default).
22253 You can enable it in
22265 ) by entering in the
22270 \begin_inset Quotes eld
22275 /home/<your-home-directory>/.lyx/lyxpipe
22278 \begin_inset Quotes erd
22284 \begin_layout Standard
22285 Read the LyX server documentation in the
22287 Customization Manual
22289 for further information.
22292 \begin_layout Subsubsection
22296 \begin_layout Standard
22297 There are six new buttons that can be added to your LyX toolbar.
22298 Five of these buttons are short cuts to layout styles:
22319 The last one is a short cut to the
22320 \begin_inset Quotes eld
22324 \begin_inset Quotes erd
22331 \begin_layout Standard
22332 LyX has a range of buttons that are available for tool bar customization.
22333 In my toolbar I like to combine the six short cuts above with two more:
22338 \SpecialChar \menuseparator
22343 \SpecialChar \menuseparator
22350 View\SpecialChar \menuseparator
22354 Here is how it looks like:
22357 \begin_layout LyX-Code
22361 \begin_layout LyX-Code
22365 \begin_layout LyX-Code
22366 Icon "layout Standard"
22369 \begin_layout LyX-Code
22370 Icon "layout Section"
22373 \begin_layout LyX-Code
22374 Icon "layout LaTeX"
22377 \begin_layout LyX-Code
22378 Icon "layout LyX-Code"
22381 \begin_layout LyX-Code
22382 Icon "layout Scrap"
22385 \begin_layout LyX-Code
22389 \begin_layout LyX-Code
22393 \begin_layout LyX-Code
22394 Icon "buffer-typeset"
22397 \begin_layout LyX-Code
22398 Icon "build-program"
22401 \begin_layout LyX-Code
22405 \begin_layout LyX-Code
22409 \begin_layout LyX-Code
22413 \begin_layout LyX-Code
22417 \begin_layout LyX-Code
22421 \begin_layout Subsubsection
22422 Colors customization
22425 \begin_layout Standard
22426 There are a number of colors in LyX that can be customized in
22431 One of the things that bothers people is the LaTeX font color.
22432 The default color is red, since the scraps uses LaTeX font, and there is
22433 a lot of scraps in literate documents, you may get tired of seeing everything
22435 You can change it by going to the tabs
22444 \begin_layout Standard
22445 The next thing is the visible presence of the newline character in the screen.
22446 You can choose the color of this particular character and make it blend
22448 I recommend you choosing a color that is close to the background but not
22449 equal, that way you still can see it is there, but it is not bothering
22454 \begin_layout Chapter
22455 Secrets of the LaTeX Masters
22456 \begin_inset CommandInset label
22465 \begin_layout Standard
22466 Though LyX is a powerful tool, it cannot hope to support everything that
22467 can be done with pure TeX/LaTeX.
22468 However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
22469 as long as you are not afraid to use that
22470 \begin_inset Quotes eld
22474 \begin_inset Quotes erd
22477 button on the toolbar or add things to the LaTeX preamble.
22478 This section lists some tips, tricks, and otherwise cool ideas to give
22479 your document that extra little flair.
22482 Do try this at home
22484 , just start with something a little smaller and less important than your
22488 \begin_layout Standard
22489 Most ideas in this section require less common files in your LaTeX installation.
22490 If you have a system like TeXLive, most will already be available.
22491 A few, however, will need to be downloaded from one of the CTAN archives.
22492 Often, there are several ways to do something, or several LaTeX style files
22493 which do the same thing.
22494 We do not endorse one choice over another, we simply claim that we have
22495 done a particular task with a particular file.
22496 Put on your wizard hat, keep an eye out for dragons, and let us begin.
22499 \begin_layout Section
22503 \begin_layout Standard
22506 Lars Gullik Bjønnes
22509 \begin_layout Subsection
22513 \begin_layout Standard
22514 The aim for this chapter
22518 \begin_layout Plain Layout
22519 Editor's note: Lars' original chapter was a masterful description of how
22525 However, it was too long to flow smoothly in this document.
22526 I have therefore chosen to excerpt the most important sections here (sorry,
22527 Lars); you can read the original chapter (and more of the story!) in the
22530 examples/multicol.lyx
22538 is to show how the LaTeX package
22542 can be used in a LyX document.
22543 As LyX doesn't support the
22547 package natively yet, we have to use some small hacks.
22548 By reading this section it should be obvious how to do this.
22551 \begin_layout Subsection
22555 \begin_layout Standard
22560 package allows switching between one and multicolumn format on the same
22562 Footnotes are handled correctly (for the most part), but will be placed
22563 at the bottom of the page and not under each column.
22564 LaTeX's float mechanism, however, is partly disabled in the current implementat
22566 At the moment only page-wide floats can be used within the scope of the
22570 \begin_layout Subsection
22574 \begin_layout Subsubsection
22578 \begin_layout Standard
22579 If you want to have two columns in your text, you have use LaTeX mode to
22584 begin{multicols}{2}
22586 at the point where you want the two column layout to start, and then
22592 where you want it to end.
22596 \begin_layout Standard
22600 \begin_layout Plain Layout
22604 begin{multicols}{2}
22612 \begin_layout Standard
22617 The Adventure of the Empty House
22620 \begin_inset Newline newline
22625 Sir Arthur Conan Doyle
22628 \begin_layout Standard
22631 It was in the spring of the year 1894 that all London was interested, and
22632 the fashionable world dismayed, by the murder of the Honourable Ronald
22633 Adair under most unusual and inexplicable circumstances.
22634 The public has already learned those particulars of the crime which came
22635 out in the police investigation, but a good deal was suppressed upon that
22636 occasion, since the case for the prosecution was so overwhelmingly strong
22637 that it was not necessary to bring forward all the facts.
22638 Only now, at the end of nearly ten years, am I allowed to supply those
22639 missing links which make up the whole of that remarkable chain.
22640 The crime was of interest in itself, but that interest was as nothing to
22641 me compared to the inconceivable sequel, which afforded me the greatest
22642 shock and surprise of any event in my adventurous life.
22643 Even now, after this long interval, I find myself thrilling as I think
22644 of it, and feeling once more that sudden flood of joy, amazement, and increduli
22645 ty which utterly submerged my mind.
22646 Let me say to that public, which has shown some interest in those glimpses
22647 which I have occasionally given them of the thoughts and actions of a very
22648 remarkable man, that they are not to blame me if I have not shared my knowledge
22649 with them, for I should have considered it my first duty to do so, had
22650 I not been barred by a positive prohibition from his own lips, which was
22651 only withdrawn upon the third of last month.
22654 \begin_layout Standard
22658 \begin_layout Plain Layout
22670 \begin_layout Subsubsection
22674 \begin_layout Standard
22675 The same pattern is used when you want more than two columns:
22678 \begin_layout Standard
22682 \begin_layout Plain Layout
22686 begin{multicols}{3}
22694 \begin_layout Standard
22697 It can be imagined that my close intimacy with Sherlock Holmes had interested
22698 me deeply in crime, and that after his disappearance I never failed to
22699 read with care the various problems which came before the public.
22700 And I even attempted, more than once, for my own private satisfaction,
22701 to employ his methods in their solution, though with indifferent success.
22702 There was none, however, which appealed to me like this tragedy of Ronald
22704 As I read the evidence at the inquest, which led up to a verdict of willful
22705 murder against some person or persons unknown, I realized more clearly
22706 than I had ever done the loss which the community had sustained by the
22707 death of Sherlock Holmes.
22708 There were points about this strange business which would, I was sure,
22709 have specially appealed to him, and the efforts of the police would have
22710 been supplemented, or more probably anticipated, by the trained observation
22711 and the alert mind of the first criminal agent in Europe.
22712 All day, as I drove upon my round, I turned over the case in my mind and
22713 found no explanation which appeared to me to be adequate.
22714 At the risk of telling a twice-told tale, I will recapitulate the facts
22715 as they were known to the public at the conclusion of the inquest.
22718 \begin_layout Standard
22722 \begin_layout Plain Layout
22734 \begin_layout Standard
22735 You can have more than 3 columns if you want to, but that might not be very
22736 pleasant for the eye.
22739 \begin_layout Subsubsection
22740 Columns inside columns
22743 \begin_layout Standard
22744 You can even have columns inside columns:
22747 \begin_layout Standard
22751 \begin_layout Plain Layout
22755 begin{multicols}{2}
22763 \begin_layout Standard
22766 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22767 at that time governor of one of the Australian colonies.
22768 Adair's mother had returned from Australia to undergo the operation for
22769 cataract, and she, her son Ronald, and her daughter Hilda were living together
22773 \begin_layout Standard
22777 \begin_layout Plain Layout
22781 begin{multicols}{2}
22789 \begin_layout Standard
22792 The youth moved in the best society–had, so far as was known, no enemies
22793 and no particular vices.
22794 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22795 had been broken off by mutual consent some months before, and there was
22796 no sign that it had left any very profound feeling behind it.
22797 For the rest {sic} the man's life moved in a narrow and conventional circle,
22798 for his habits were quiet and his nature unemotional.
22799 Yet it was upon this easy-going young aristocrat that death came, in most
22800 strange and unexpected form, between the hours of ten and eleven-twenty
22801 on the night of March 30, 1894.
22804 \begin_layout Standard
22808 \begin_layout Plain Layout
22820 \begin_layout Standard
22823 Ronald Adair was fond of cards–playing continually, but never for such stakes
22825 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22826 It was shown that, after dinner on the day of his death, he had played
22827 a rubber of whist at the latter club.
22828 He had also played there in the afternoon.
22833 The evidence of those who had played with him– Mr.
22834 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
22835 and that there was a fairly equal fall of the cards.
22836 Adair might have lost five pounds, but not more.
22837 His fortune was a considerable one, and such a loss could not in any way
22839 He had played nearly every day at one club or other, but he was a cautious
22840 player, and usually rose a winner.
22841 It came out in evidence that, in partnership with Colonel Moran, he had
22842 actually won as much as four hundred and twenty pounds in a sitting, some
22843 weeks before, from Godfrey Milner and Lord Balmoral.
22844 So much for his recent history as it came out at the inquest.
22847 \begin_layout Standard
22851 \begin_layout Plain Layout
22863 \begin_layout Standard
22864 Please do read the file
22866 examples/multicol.lyx
22868 for more advanced examples including column and header spacing, vertical
22869 separator lines, and more.
22872 \begin_layout Section
22877 Paragraph Environment
22878 \begin_inset Argument
22881 \begin_layout Plain Layout
22882 Numbering in Enumerate
22890 \begin_layout Standard
22896 \begin_layout Standard
22897 \begin_inset VSpace bigskip
22903 \begin_layout Standard
22905 The default numbering for the
22909 paragraph environment begins with Arabic numbers and ends with uppercase
22911 Suppose, however, you wanted a different type of numbering scheme.
22912 Here's a quickie example of how to change the numbering scheme:
22915 \begin_layout LyX-Code
22925 \begin_layout LyX-Code
22935 \begin_layout LyX-Code
22945 \begin_layout LyX-Code
22955 \begin_layout Standard
22956 \SpecialChar \ldots{}
22957 which changes the numbering scheme to uppercase Roman numerals, uppercase
22958 letters, Arabic numbers, and lowercase letter.
22961 \begin_layout Standard
22962 Additionally, the previous example also adds a little bit extra to the numbering
22964 For example, the first level label actually looks like:
22965 \begin_inset Quotes eld
22969 \begin_inset Quotes erd
22973 For ease of reading, we'll describe what the numbering schemes look like
22974 using a notation something like this: <
22975 \begin_inset Quotes eld
22979 \begin_inset Quotes erd
22983 \begin_inset space ~
22987 \begin_inset Quotes erd
22991 \begin_inset Quotes erd
22995 \begin_inset space ~
22999 \begin_inset Quotes erd
23003 \begin_inset Quotes erd
23007 \begin_inset space ~
23011 \begin_inset Quotes eld
23015 \begin_inset Quotes erd
23022 \begin_layout Standard
23023 As you can see in the example, there is a label command for each nesting
23030 \SpecialChar \ldots{}
23037 , as well as a counter,
23041 \SpecialChar \ldots{}
23047 There are also five
23048 \begin_inset Quotes eld
23052 \begin_inset Quotes erd
23085 , each of which take one counter as an argument.
23086 You can add characters before or after these, but there's no need to add
23090 \begin_layout Standard
23091 You can get really fancy with these.
23095 \begin_layout LyX-Code
23109 \begin_layout LyX-Code
23121 \begin_layout LyX-Code
23131 \begin_layout LyX-Code
23141 \begin_layout Standard
23142 produces the somewhat out of hand numbering scheme: <
23143 \begin_inset Quotes eld
23147 \begin_inset Quotes erd
23151 \begin_inset space ~
23155 \begin_inset Quotes erd
23159 \begin_inset Quotes erd
23163 \begin_inset space ~
23167 \begin_inset Quotes erd
23171 \begin_inset Quotes erd
23175 \begin_inset space ~
23179 \begin_inset Quotes eld
23183 \begin_inset Quotes erd
23190 \begin_layout Section
23194 \begin_layout Standard
23200 \begin_layout Standard
23201 \begin_inset VSpace bigskip
23207 \begin_layout Standard
23212 \begin_layout Plain Layout
23218 tmpfont}{cmr17 scaled 2500}{
23230 \begin_layout Standard
23235 \begin_layout Plain Layout
23246 hose of you who like the style of old books probably also like
23247 \begin_inset Quotes eld
23251 \begin_inset Quotes erd
23254 —those large capital letters which begin each new chapter or section.
23255 Implementing them with plain LyX/LaTeX is straightforward (assuming you
23256 know some plain TeX!) but does require a lot of work and many iterations,
23257 as you can see by all the ugly TeX-mode stuff at the beginning of this
23261 \begin_layout Standard
23265 \begin_layout Plain Layout
23271 bigdrop{-1em}{3}{ptmri}{T}+
23276 here is a much easier way of doing this, of course.
23285 ) package from CTAN allows a simple way to add such letters to your documents.
23286 Since this package is not a standard part of TeXLive, I can't demonstrate
23287 it within this document, but if you copy this paragraph to a new document,
23289 \begin_inset Quotes eld
23299 \begin_inset Quotes erd
23302 and the pluses from the TeX code at the beginning of the paragraph, and
23307 usepackage{dropcaps}
23309 to your LaTeX preamble, you will get a nice Times Roman Italic
23310 \begin_inset Quotes eld
23314 \begin_inset Quotes erd
23317 , whose height is three lines of text and which protrudes 1 em into the
23319 (Make certain you have copied
23320 \begin_inset Quotes eld
23328 \begin_inset Quotes erd
23331 into a directory where TeX can see it.) The first argument is the amount
23332 of indentation; in this case the negative sign moves it into the margin.
23333 The second argument is the height of the letter in number of lines of text.
23334 The third argument is the font name: virtually anything which has a tfm
23335 file should work (wade through the
23337 .../texmf/fonts/tfm
23339 directory for possibilities).
23340 My personal favorite is
23341 \begin_inset Quotes eld
23349 \begin_inset Quotes erd
23352 , a fancy German font specifically designed for dropped capitals.
23353 The fourth argument is the letter (or letters) to be dropped.
23358 package also offers the
23364 command, as well as a slightly simplified
23373 \begin_layout Section
23374 Non-standard Paragraph Shapes
23377 \begin_layout Standard
23383 \begin_layout Standard
23384 \begin_inset VSpace bigskip
23390 \begin_layout Standard
23394 \begin_layout Plain Layout
23406 \begin_layout Standard
23410 \begin_layout Plain Layout
23419 \begin_layout Plain Layout
23433 \begin_layout Standard
23438 \begin_layout Plain Layout
23449 \begin_layout Plain Layout
23458 \begin_layout Plain Layout
23467 \begin_layout Plain Layout
23476 \begin_layout Plain Layout
23485 \begin_layout Plain Layout
23494 \begin_layout Plain Layout
23503 \begin_layout Plain Layout
23512 \begin_layout Plain Layout
23521 \begin_layout Plain Layout
23530 \begin_layout Plain Layout
23539 \begin_layout Plain Layout
23548 \begin_layout Plain Layout
23557 \begin_layout Plain Layout
23566 \begin_layout Plain Layout
23575 \begin_layout Plain Layout
23584 \begin_layout Plain Layout
23593 \begin_layout Plain Layout
23602 \begin_layout Plain Layout
23611 \begin_layout Plain Layout
23617 There are times when the tyranny of rectangular paragraphs must be overthrown.
23618 In such situations, a call to the delightful plain TeX command
23625 As you can see, completely arbitrary shapes can be laid out with a suitable
23626 set of linelength definitions.
23627 While this parshape may look a bit silly and useless, one could conceive
23628 of situations such as finely tuned dropped capitals, word wrapping around
23629 non-rectangular graphics, etc.
23630 which will benefit from such handcrafting.
23633 \begin_layout Standard
23634 \begin_inset VSpace bigskip
23640 \begin_layout Standard
23645 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23652 is the number of lines of text which define the paragraph.
23653 If there turn out to be fewer lines, the shape is truncated; if there are
23654 more, the excess lines have the same dimensions as the last line of the
23664 entries specify the indentation of the line from the left margin, and the
23665 length of the line as measured from that point.
23666 The shape applies only to the current paragraph; everything is reset to
23667 normal for the next paragraph.
23670 \begin_layout Standard
23674 \begin_layout Plain Layout
23686 \begin_layout Section
23690 \begin_layout Standard
23691 As you can see, the examples in this section range from the useful to the
23693 While I don't expect that anyone will ever need the paragraph shape demonstrate
23694 d in the last section, the important point is that you can do almost anything
23695 you want in LyX if you are willing to figure out how to do it in TeX and
23697 TeX is a fantastically powerful typesetting system and all that power is
23698 available to you since LyX uses it as its backend.