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 true
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
4261 solves some of these problems.
4262 In particular, its rendering of math tends to look better than
4263 \begin_inset Flex Code
4266 \begin_layout Plain Layout
4272 's, at least in simpler cases, since it renders math using a combination
4273 of HTML and CSS rather than converting the formulae to images.
4274 But more complex formula tend to be rendered less well than with
4275 \begin_inset Flex Code
4278 \begin_layout Plain Layout
4284 , since there is no reasonable way of scaling parentheses in HTML, for example.
4285 More importantly (as of version 0.39, at least),
4286 \begin_inset Flex Code
4289 \begin_layout Plain Layout
4295 has no support for math macros, for user-defined paragraph or character
4296 styles, or for tables of contents and figures, and its treatment of cross-refer
4298 These limitations make
4299 \begin_inset Flex Code
4302 \begin_layout Plain Layout
4308 unsuitable for many of the documents more advanced LyX users would produce.
4309 In principle, of course, all of these problems could be solved, but the
4310 LyX developers have decided to follow a different path and have made LyX
4311 itself capable of writing XHTML, just as it is capable of writing LaTeX,
4312 DocBook, and plaintext.
4315 \begin_layout Standard
4316 As of this writing, XHTML output remains under development and should probably
4318 \begin_inset Quotes eld
4322 \begin_inset Quotes erd
4329 \begin_layout Plain Layout
4331 \begin_inset Flex Code
4334 \begin_layout Plain Layout
4335 development/HTML.notes
4340 , which can be found in the LyX source tree or
4341 \begin_inset CommandInset href
4343 name "accessed online"
4344 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4348 , usually contains up-to-date information about the state of XHTML output.
4353 Still, the developers have chosen this approach because it has several
4354 potential advantages over the other two.
4357 \begin_layout Standard
4358 These advantages are primarily due to the fact that the XHTML output routines,
4359 since they are part of LyX, know everything LyX knows about the document
4364 \begin_layout Plain Layout
4365 Another advantege is that, since these routines are internal to LyX, they
4366 are immune to changes in LyX's file format, or to changes in the semantics
4372 So they know about the table of contents (as displayed in the outline),
4373 about the counters associated with different paragraph styles, and about
4374 user-defined styles.
4375 The XHTML output routines know what LyX knows about internationalization,
4376 too, so they will output
4377 \begin_inset Quotes eld
4381 \begin_inset Quotes erd
4385 \begin_inset Quotes eld
4393 \begin_inset Quotes erd
4396 , depending upon the language in effect at the time.
4400 \begin_layout Standard
4401 Quite generally, the output routines know everything LyX knows about document
4402 layout, that is, about how the document is to be rendered on screen.
4403 We use this information when we output the document as XHTML.
4408 generates CSS style information corresponding to the layout information
4409 it uses to render the document on screen: if section headings are supposed
4410 to be sans-serif and bold as seen in LyX, then (by default) they will be
4411 sans-serif and bold when viewed in a web browser, too.
4412 And this is true not just for pre-defined styles, like Section, but for
4413 any style, including user-defined styles.
4414 Indeed, the XHTML output routines make no distinction between user-defined
4415 paragraph and character styles and LyX's own pre-defined styles: in each
4416 case, everything LyX knows about the styles is contained in the layout
4418 And much the same is true as regards pre-defined textual insets, such as
4419 footnotes, and various custom insets.
4423 \begin_layout Standard
4424 The result is that XHTML output can be customized and extended in
4428 the same way LaTeX output can be customized and extended: through layout
4430 See chapter five of the
4434 manual for the details.
4437 \begin_layout Standard
4438 The remainder of this chapter contains more detailed information on XHTML
4439 output, its limitations, and ways to work around those limitations.
4442 \begin_layout Section
4443 Math Output in XHTML
4446 \begin_layout Standard
4447 LyX offers four choices for how math is rendered.
4448 These have various advantages and disadvantages:
4451 \begin_layout Itemize
4453 \begin_inset Newline newline
4456 MathML is a dialect of XML designed specifically for mathematics on the
4457 web, and it typically renders very well in browsers that support it.
4458 The disadvantage is that not all browsers support MathML, and support is
4459 not complete even in the Gecko-based browsers, such as Firefox.
4460 \begin_inset Newline newline
4463 If LyX is unable to render a formula as MathML---for example, if the formula
4465 \begin_inset Flex Code
4468 \begin_layout Plain Layout
4474 package or ERT---then it will instead output the formula as an image.
4478 \begin_layout Itemize
4480 \begin_inset Newline newline
4484 \begin_inset Flex Code
4487 \begin_layout Plain Layout
4493 outputs math as HTML, styled by CSS.
4497 \begin_layout Plain Layout
4498 LyX has borrowed some of the CSS for its HTML output from
4499 \begin_inset Flex Code
4502 \begin_layout Plain Layout
4513 For simple formulae, this can work quite well, though with more complicated
4514 formulae it tends to break down.
4515 Still, this method has the advantage that it is very widely supported and
4516 so it may be appropriate for documents that contain only a little, fairly
4518 \begin_inset Newline newline
4521 If Lyx is unable to render a formula as MathML---for example, if the formula
4523 \begin_inset Flex Code
4526 \begin_layout Plain Layout
4532 package or ERT---then it will instead output the formula as an image.
4536 \begin_layout Itemize
4538 \begin_inset Newline newline
4542 \begin_inset Flex Code
4545 \begin_layout Plain Layout
4551 , LyX will output formulae as images, the very same images, in fact, that
4552 are used for instant preview.
4556 \begin_layout Plain Layout
4557 Instant preview does
4561 have to be on for images to be output, however.
4566 The advantage to this method is that the images are simply generated by
4567 LaTeX, so they are very accurate.
4568 The disadvantage, as mentioned earlier, is that these are bitmapped images,
4569 so they do not scale terribly well, and one cannot copy them, etc.
4570 \begin_inset Newline newline
4573 The size of the images can be controlled by setting the
4574 \begin_inset Quotes eld
4578 \begin_inset Quotes erd
4582 \begin_inset Flex MenuItem
4585 \begin_layout Plain Layout
4586 Document\SpecialChar \menuseparator
4587 Settings\SpecialChar \menuseparator
4597 \begin_layout Plain Layout
4598 For those who want to know, this controls the resolution of the image in
4599 dots per inch and is based upon a default of 75 dpi.
4605 \begin_inset Newline newline
4608 If LyX for some reason fails to create an image for a formula (e.g., if a
4609 required LaTeX package is not installed), then it will fall back to outputing
4613 \begin_layout Itemize
4615 \begin_inset Newline newline
4618 Finally, LyX will happily output math as LaTeX.
4619 As well as being the output of last resort, this method can be used with
4621 \begin_inset CommandInset href
4624 target "http://www.math.union.edu/~dpvc/jsMath/"
4628 , which uses JavaScript to render LaTeX embedded in HTML documents.
4629 LyX wraps the LaTeX in either a
4630 \begin_inset Flex Code
4633 \begin_layout Plain Layout
4639 (for inline formulas) or
4640 \begin_inset Flex Code
4643 \begin_layout Plain Layout
4649 (for displayed formulas) with
4650 \begin_inset Flex Code
4653 \begin_layout Plain Layout
4659 , as is required for jsMath.
4662 \begin_layout Standard
4663 One of these output methods must be selected under
4664 \begin_inset Flex MenuItem
4667 \begin_layout Plain Layout
4668 Document\SpecialChar \menuseparator
4669 Settings\SpecialChar \menuseparator
4676 By default, LyX outputs MathML.
4677 This is a document-wide setting, therefore.
4680 \begin_layout Standard
4681 Eventually, LyX will offer the user the option to select an alternate output
4682 method for a particular inset, say, one that isn't being rendered very
4687 \begin_layout Plain Layout
4688 That said, since LyX falls back to images if the inset contains ERT, then
4689 one can force output as an image by putting some harmless ERT into the
4691 \begin_inset Formula $a=b\relax$
4702 \begin_layout Section
4703 Bibliography and Citations
4706 \begin_layout Standard
4707 XHTML output fully supports bibliographies and citations.
4711 \begin_layout Standard
4712 Citation labels are generated by the same machinery that generates LyX's
4713 on-screen labels, so the labels will look in the output much as they do
4714 in LyX, though better.
4715 If you are using numerical citations, then LyX will output numerical labels,
4716 such as [1] or [17], rather than simply showing the citation key in square
4717 brackets, as it does on-screen.
4718 If you are using author-year citations, then LyX will add lowercase letters
4719 to the years, just as BibTeX does, if it finds more than one citation for
4720 a given author-year combination.
4721 The labels will be printed with the bibliography entries.
4722 Note that there is, at present, no way to customize the appearance of the
4723 labels, for example, to choose between square brackets and parentheses.
4726 \begin_layout Standard
4727 Bibliography output is handled by the same machinery that handles the presentati
4728 on of reference information in the citation dialog, so you will see in the
4729 XHTML output pretty much what you would see if you were to look at a given
4730 entry in the citation dialog.
4731 The formatting can be customized in your layout file or, preferably, in
4737 manual for the details.
4740 \begin_layout Standard
4741 The main defect at present is that cross-referenced information is printed
4742 with every entry with which it is associated.
4743 So you can see things like this:
4748 \begin_inset Quotes eld
4751 Context and Logical Form
4752 \begin_inset Quotes erd
4757 Language in Context: Selected Essays
4759 (Oxford: Oxford University Press, 2007), pp.
4765 \begin_inset Quotes eld
4768 Semantics in Context
4769 \begin_inset Quotes erd
4774 Language in Context: Selected Essays
4776 (Oxford: Oxford University Press, 2007), pp.
4780 \begin_layout Standard
4781 This should be fixed before long.
4784 \begin_layout Standard
4785 There is no support at present for sectioned bibliographies.
4786 If you have multiple bibliographies, then LyX will print the same bibliography
4790 \begin_layout Section
4794 \begin_layout Standard
4795 LyX will happily export indexes as XHTML, but with certain limitations at
4799 \begin_layout Standard
4800 Index export will be most reliable when you do not attempt to use the fancy
4801 constructs that are described in the section on indexes in the
4809 \begin_layout Plain Layout
4810 The main issue here is that LyX itself does not really handle these.
4811 It just lets you enter what you would have to enter in raw LaTeX.
4816 We'll describe how they are handled using the subsection headings from
4820 \begin_layout Itemize
4821 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
4822 these, but the entries must be separated by
4823 \begin_inset Quotes eld
4827 \begin_inset Quotes erd
4830 , that is, there must be spaces around the exclamation point.
4831 This is because it is otherwise too difficult to check for escaped exclamation
4832 points, ones in math, and so forth.
4835 \begin_layout Itemize
4836 Page Ranges: There is no support at all for page ranges, since these make
4837 no sense with XHMTL.
4838 Instead, you will just get two index entries, one at either end.
4841 \begin_layout Itemize
4842 Cross-referencing: There is no support for cross-referencing.
4843 If LyX finds an entry containing the
4844 \begin_inset Quotes eld
4847 |see\SpecialChar \ldots{}
4849 \begin_inset Quotes erd
4852 construct, it is just dropped, and the rest is treated as an ordinary index
4856 \begin_layout Itemize
4857 Index Entry Order: LyX does support attempts to fix the sorting order.
4858 It will take what is before the first `@' it finds and use that for sorting,
4859 taking what follows the first `@' to be the actual entry.
4860 At present, LyX does not check for escaped `@', so do not try to index
4864 \begin_layout Itemize
4865 Index Entry Layout: You can format entries by using the text style dialog,
4866 or by using any other method available within LyX itself.
4867 There is no support for constructs like:
4868 \begin_inset Quotes eld
4872 \begin_inset Quotes erd
4876 Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
4877 and everything that follows it.
4880 \begin_layout Itemize
4881 Multiple Indexes: There is no support for multiple indexes.
4882 Rather, all index entries will be printed as one large index.
4883 To avoid our printing several versions of the index, we print only the
4884 main index, so make sure you have one.
4887 \begin_layout Section
4888 Nomenclature and Glossary
4891 \begin_layout Standard
4892 There is at present no support for glossaries.
4895 \begin_layout Chapter
4899 \begin_layout Section
4903 \begin_layout Standard
4904 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
4905 and retrieve information about the LyX internal state.
4906 This is only intended for advanced users, but they should find it useful.
4907 It is by writing to the LyX server, for example, that bibliography managers,
4908 such as JabRef, are able to
4909 \begin_inset Quotes eld
4913 \begin_inset Quotes erd
4919 \begin_layout Section
4920 Starting the LyX Server
4923 \begin_layout Standard
4924 The LyX server works through the use of a pair of named pipes.
4925 These are usually located in
4926 \begin_inset Flex Code
4929 \begin_layout Plain Layout
4935 , (except on Windows, where
4939 named pipes are special objects located in
4940 \begin_inset Flex Code
4943 \begin_layout Plain Layout
4955 ) and have the names
4956 \begin_inset Quotes eld
4960 \begin_inset Flex Code
4963 \begin_layout Plain Layout
4970 \begin_inset Quotes erd
4974 \begin_inset Quotes eld
4978 \begin_inset Flex Code
4981 \begin_layout Plain Layout
4988 \begin_inset Quotes erd
4992 External programs write into
4993 \begin_inset Flex Code
4996 \begin_layout Plain Layout
5002 and read back data from
5003 \begin_inset Flex Code
5006 \begin_layout Plain Layout
5013 The stem of the pipe names can be defined in the
5014 \begin_inset Flex MenuItem
5017 \begin_layout Plain Layout
5018 Tools\SpecialChar \menuseparator
5025 \begin_inset Flex Code
5028 \begin_layout Plain Layout
5029 "/home/myhome/lyxpipe"
5035 \begin_inset Flex Code
5038 \begin_layout Plain Layout
5057 configure this manually in order for the server to start.
5060 \begin_layout Standard
5062 \begin_inset Flex Code
5065 \begin_layout Plain Layout
5072 \begin_inset Flex Code
5075 \begin_layout Plain Layout
5081 ' to create the pipes.
5082 If one of the pipes already exists, LyX will assume that another LyX process
5083 is already running and will not start the server.
5084 On POSIX (Unix like) systems, if for some other reason, an unused
5085 \begin_inset Quotes eld
5089 \begin_inset Quotes erd
5092 pipe is left in existence when LyX closes, then LyX will try to delete
5094 If this fails for some reason, you will need to delete the pipes manually
5095 and then restart LyX.
5096 On Windows, pipes are deleted by the OS on program termination or crash,
5098 \begin_inset Quotes eld
5102 \begin_inset Quotes erd
5105 pipes should not be possible.
5108 \begin_layout Standard
5109 To have several LyX processes with servers at the same time, you have to
5110 use different configurations, perhaps by using separate user directories,
5112 \begin_inset Flex Code
5115 \begin_layout Plain Layout
5121 file, for each process.
5124 \begin_layout Standard
5125 If you are developing a client program, you might find it useful to enable
5126 debugging information from the LyX server.
5127 Do this by starting LyX as
5128 \begin_inset Flex Code
5131 \begin_layout Plain Layout
5140 \begin_layout Standard
5141 You can find a complete example client written in C in the source distribution
5143 \begin_inset Flex Code
5146 \begin_layout Plain Layout
5147 development/lyxserver/server_monitor.c
5155 \begin_layout Standard
5156 Another useful tool is command-line based client you will find in
5157 \begin_inset Flex Code
5160 \begin_layout Plain Layout
5161 src/client/lyxclient
5169 \begin_layout Section
5170 Normal communication
5173 \begin_layout Standard
5174 To issue a LyX call, the client writes a line of ASCII text into the input
5176 This line has the following format:
5193 \begin_layout Description
5194 clientname is a name that the client can choose arbitrarily.
5195 Its only use is that LyX will echo it if it sends an answer—so a client
5196 can dispatch results from different requesters.
5199 \begin_layout Description
5200 function is the function you want LyX to perform.
5201 It is the same as the commands you'd use in the minibuffer.
5204 \begin_layout Description
5205 argument is an optional argument which is meaningful only to some functions
5207 \begin_inset Quotes eld
5211 \begin_inset Quotes erd
5214 LFUN will insert the argument as text at the cursor position).
5217 \begin_layout Standard
5218 The answer from LyX will arrive in the output pipe and be of the form
5235 \begin_layout Standard
5244 are just echoed from the command request, while
5248 is more or less useful information filled according to how the command
5249 execution worked out.
5250 Some commands, such as
5251 \begin_inset Quotes eld
5255 \begin_inset Quotes erd
5258 , will return information about the internal state of LyX, while other will
5259 return an empty data-response.
5260 This means that the command execution went fine.
5263 \begin_layout Standard
5264 In case of errors, the response from LyX will have this form
5281 \begin_layout Standard
5286 should contain an explanation of why the command failed.
5289 \begin_layout Standard
5293 \begin_layout LyX-Code
5294 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5295 \begin_inset Newline newline
5298 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5299 \begin_inset Newline newline
5302 read a <~/.lyxpipe.out
5303 \begin_inset Newline newline
5309 \begin_layout Section
5313 \begin_layout Standard
5314 LyX can notify clients of events going on asynchronously.
5315 Currently it will only do this if the user binds a key sequence with the
5317 \begin_inset Quotes eld
5321 \begin_inset Quotes erd
5325 The format of the string LyX sends is as follows:
5329 \begin_inset Flex Code
5332 \begin_layout Plain Layout
5343 \begin_layout Standard
5348 is the printed representation of the key sequence that was actually typed
5352 \begin_layout Standard
5353 This mechanism can be used to extend LyX's command set and implement macros.
5354 Bind some key sequence to
5355 \begin_inset Quotes eld
5359 \begin_inset Quotes erd
5363 Then start a client that listens on the output pipe, dispatches the command
5364 according to the sequence, and starts a function that may use LyX calls
5365 and LyX requests to issue a command or a series of commands to LyX.
5368 \begin_layout Section
5369 The simple LyX Server Protocol
5372 \begin_layout Standard
5373 LyX implements a simple protocol that can be used for session management.
5374 All messages are of the form
5387 \begin_layout Standard
5393 \begin_inset Quotes eld
5397 \begin_inset Quotes erd
5401 \begin_inset Quotes eld
5405 \begin_inset Quotes erd
5410 \begin_inset Quotes eld
5414 \begin_inset Quotes erd
5417 is received from a client, LyX will report back to inform the client that
5418 it's listening to it's messages, while
5419 \begin_inset Quotes eld
5423 \begin_inset Quotes erd
5426 sent from LyX will inform clients that LyX is closing.
5429 \begin_layout Section
5430 Reverse DVI/PDF search
5433 \begin_layout Standard
5434 Some DVI/PDF viewers
5438 \begin_layout Plain Layout
5439 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5440 Skim on Mac OSX and SumatraPDF on Windows.
5449 facility (also called
5454 This means that you can tell LyX to put the cursor to a specific line in
5455 the document by clicking at the respective position in the DVI/PDF output.
5456 To achieve this, the viewer must be able to communicate with LyX.
5457 This is done via the LyX server either by using the named pipe (
5461 ), or the UNIX domain socket (
5465 ) that LyX creates in its temporary directory (this is the way the
5466 \begin_inset Flex Code
5469 \begin_layout Plain Layout
5475 program communicates with LyX).
5476 In some cases, you need a helper script that mediates between the viewer
5477 and LyX, in others, the viewer can communicate with LyX directly.
5478 This depends on the selected viewer and on your operating system.
5479 The same applies to the way viewers need to be configured and the way the
5480 reverse search is actually performed.
5481 In what follows, we will thus describe how to setup reverse search for
5483 Before we turn to this, though, we will explain what needs to be done generally
5484 to enable reverse search in the DVI/PDF output.
5487 \begin_layout Subsection
5488 \begin_inset CommandInset label
5490 name "sub:rev-search"
5494 Automatical enabling
5497 \begin_layout Standard
5498 In most cases LyX will do the work for you by enabling
5499 \begin_inset Flex MenuItem
5502 \begin_layout Plain Layout
5503 Document\SpecialChar \menuseparator
5504 Output\SpecialChar \menuseparator
5511 In such a case LyX will automatically insert SyncTeX macro (for PDF) or
5512 srcltx package (for DVI) respectively.
5513 This option can be easily reached also on
5514 \begin_inset Flex Code
5517 \begin_layout Plain Layout
5526 \begin_layout Standard
5527 Plase note that including
5528 \begin_inset Flex Code
5531 \begin_layout Plain Layout
5538 \begin_inset Flex Code
5541 \begin_layout Plain Layout
5547 sometimes have an impact on the typeset and you should switch them off
5548 for the final typesets.
5551 \begin_layout Standard
5552 You can also define custom macro in preferences and in case you need some
5553 special tweaks read the next section about manual enabling.
5557 \begin_layout Subsection
5561 \begin_layout Standard
5562 LaTeX provides several different methods for reverse search.
5563 Some are built-in in the
5564 \begin_inset Flex Code
5567 \begin_layout Plain Layout
5573 program, some are provided by external packages.
5574 Your choice depends on whether your LaTeX distribution already provides
5575 a given method (the built-in methods are rather new) and whether your viewer
5577 The available methods are described in the following.
5580 \begin_layout Subsubsection*
5581 Built-in DVI-search via src-specials (DVI only)
5584 \begin_layout Standard
5585 This method provides the DVI file with the necessary information for reverse
5587 It is available in LaTeX since quite some time (any somewhat recent LaTeX
5588 distribution should include it), and it works reliably.
5589 To enable it, change the
5590 \begin_inset Flex MenuItem
5593 \begin_layout Plain Layout
5598 \begin_layout Plain Layout
5611 \begin_inset Flex MenuItem
5614 \begin_layout Plain Layout
5619 \begin_layout Plain Layout
5626 eX (plain)->DraftDVI
5632 \begin_inset Flex MenuItem
5635 \begin_layout Plain Layout
5636 Preferences\SpecialChar \menuseparator
5637 File Handling\SpecialChar \menuseparator
5644 \begin_inset Flex Code
5647 \begin_layout Plain Layout
5648 latex -src-specials $$i
5654 If this doesn't work, check if your TeX engine needs different options
5655 (the syntax might differ in some distributions).
5658 \begin_layout Subsubsection*
5659 External Packages (PDFSync and scrltx)
5662 \begin_layout Standard
5671 provide reverse search facility for PDF output (via pdflatex) and DVI output,
5673 In order to enable it, load the packages in the LyX preamble:
5676 \begin_layout Itemize
5677 \begin_inset Flex Code
5680 \begin_layout Plain Layout
5688 for reverse PDF search,
5691 \begin_layout Itemize
5693 \begin_inset Flex Code
5696 \begin_layout Plain Layout
5699 usepackage[active]{srcltx}
5704 for reverse DVI search.
5707 \begin_layout Standard
5708 If you want to be able to perform both DVI and PDF reverse searches, you
5709 can also insert in the preamble the following lines
5712 \begin_layout LyX-Code
5716 \begin_inset Newline newline
5722 \begin_inset Newline newline
5728 \begin_inset Newline newline
5734 \begin_inset Newline newline
5739 usepackage[active]{srcltx}
5740 \begin_inset Newline newline
5748 \begin_layout Standard
5749 This way, you can preview the file as either DVI or PDF (pdflatex) and the
5750 right package will be used.
5753 \begin_layout Standard
5754 Note that PDFSync might affect the output layout of your document.
5755 It is therefore advised to disable PDFsync for final documents.
5758 \begin_layout Subsubsection*
5759 Built-in reverse search via SyncTeX (DVI and PDF)
5762 \begin_layout Standard
5764 \begin_inset Flex Code
5767 \begin_layout Plain Layout
5773 have built-in support for both PDF and DVI reverse search.
5778 facility is basically the result of the integration of the PDFSync package
5779 to the pdftex program and its merge with the
5784 You need at least TeXLive 2008 or a recent MikTeX distribution in order
5786 Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
5787 already provide SyncTeX support.
5790 \begin_layout Standard
5791 To enable SyncTeX for DVI output, change the
5792 \begin_inset Flex MenuItem
5795 \begin_layout Plain Layout
5800 \begin_layout Plain Layout
5813 \begin_inset Flex MenuItem
5816 \begin_layout Plain Layout
5821 \begin_layout Plain Layout
5828 eX (plain) -> DraftDVI
5834 \begin_inset Flex MenuItem
5837 \begin_layout Plain Layout
5838 Preferences\SpecialChar \menuseparator
5839 File Handling\SpecialChar \menuseparator
5846 \begin_inset Flex Code
5849 \begin_layout Plain Layout
5850 latex -synctex=1 $$i
5855 , and for PDF output, change the
5856 \begin_inset Flex MenuItem
5859 \begin_layout Plain Layout
5864 \begin_layout Plain Layout
5871 eX (pdflatex) -> PDF (pdflatex)
5877 \begin_inset Flex Code
5880 \begin_layout Plain Layout
5881 pdflatex -synctex=1 $$i
5887 Check the documentation of your viewer whether the viewer needs to be configure
5888 d for the use with SyncTeX.
5892 \begin_layout Plain Layout
5894 \begin_inset Flex Code
5897 \begin_layout Plain Layout
5903 option enables gzip compression.
5904 If your viewer does not support it, you should instead use
5905 \begin_inset Flex Code
5908 \begin_layout Plain Layout
5922 \begin_layout Subsection
5923 Configuring and using specific viewers
5926 \begin_layout Subsubsection*
5927 Xdvi (all platforms)
5930 \begin_layout Standard
5932 \begin_inset Flex Code
5935 \begin_layout Plain Layout
5941 , you don't need to do anything else for performing a reverse DVI search,
5942 as LyX already provides the necessary hooks for automatically using the
5944 \begin_inset Flex Code
5947 \begin_layout Plain Layout
5954 Just setup your document as described above (reverse search is triggered
5955 by Ctrl-click or Alt-click on Mac OSX, respectively).
5958 \begin_layout Standard
5959 However, if for whatever reason you want to use the named pipe instead of
5960 the socket for communicating with LyX, simply change the DVI viewer in
5962 \begin_inset Flex MenuItem
5965 \begin_layout Plain Layout
5966 Preferences\SpecialChar \menuseparator
5967 File Handling\SpecialChar \menuseparator
5977 \begin_layout Plain Layout
5978 On Mac OSX you have to use
5979 \begin_inset Flex Code
5982 \begin_layout Plain Layout
5983 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
5994 \begin_inset Flex Code
5997 \begin_layout Plain Layout
5998 xdvi -editor 'lyxeditor.sh %f %l'
6004 \begin_inset Flex Code
6007 \begin_layout Plain Layout
6013 is a suitable script.
6014 For example, a minimal shell script is the following one:
6017 \begin_layout LyX-Code
6019 \begin_inset Newline newline
6022 LYXPIPE="/path/to/lyxpipe"
6023 \begin_inset Newline newline
6026 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6027 \begin_inset Newline newline
6030 echo "$COMMAND" > "${LYXPIPE}".in || exit
6031 \begin_inset Newline newline
6034 read < "${LYXPIPE}".out || exit
6037 \begin_layout Standard
6039 \begin_inset Flex Code
6042 \begin_layout Plain Layout
6052 \begin_layout Plain Layout
6059 XServer pipe path specified in
6060 \begin_inset Flex MenuItem
6063 \begin_layout Plain Layout
6064 Preferences\SpecialChar \menuseparator
6074 \begin_layout Plain Layout
6076 \begin_inset Flex Code
6079 \begin_layout Plain Layout
6085 folder of a source distribution you can find a
6086 \begin_inset Flex Code
6089 \begin_layout Plain Layout
6095 script which is able to locate the
6099 based on your preferences.
6107 \begin_layout Subsubsection*
6111 \begin_layout Standard
6113 \begin_inset Flex Code
6116 \begin_layout Plain Layout
6117 /Applications/MacDviX_Folder/calleditor.script
6122 , add the following lines:
6125 \begin_layout LyX-Code
6130 \begin_layout Plain Layout
6137 X.app/Contents/MacOS/lyxeditor "$2" $1
6138 \begin_inset Newline newline
6144 \begin_layout Standard
6145 Modify the lines accordingly if you install LyX somewhere else than in the
6146 Applications folder.
6149 \begin_layout Standard
6150 Reverse search is triggered by Alt-click (OPTION-click).
6153 \begin_layout Subsubsection*
6157 \begin_layout Standard
6159 \begin_inset Flex Code
6162 \begin_layout Plain Layout
6163 open -a Skim.app $$i
6168 to the viewer setting in
6169 \begin_inset Flex MenuItem
6172 \begin_layout Plain Layout
6173 Preferences\SpecialChar \menuseparator
6174 File Handling\SpecialChar \menuseparator
6175 File formats\SpecialChar \menuseparator
6182 \begin_inset Flex MenuItem
6185 \begin_layout Plain Layout
6186 Skim\SpecialChar \menuseparator
6187 Preferences\SpecialChar \menuseparator
6197 \begin_layout Plain Layout
6207 \begin_layout Standard
6208 Reverse search is triggered by COMMAND-SHIFT-click
6211 \begin_layout Subsubsection*
6215 \begin_layout Standard
6217 \begin_inset Flex MenuItem
6220 \begin_layout Plain Layout
6221 Settings\SpecialChar \menuseparator
6222 Configure Okular\SpecialChar \ldots{}
6223 \SpecialChar \menuseparator
6230 \begin_inset Quotes eld
6234 \begin_inset Quotes erd
6238 \begin_inset Flex Code
6241 \begin_layout Plain Layout
6250 \begin_layout Standard
6251 Reverse search is triggered by SHIFT-click.
6254 \begin_layout Subsubsection*
6258 \begin_layout Standard
6259 Launch yap, choose its
6260 \begin_inset Flex MenuItem
6263 \begin_layout Plain Layout
6264 View\SpecialChar \menuseparator
6271 \begin_inset Quotes eld
6275 \begin_inset Quotes erd
6280 \begin_inset Quotes eld
6283 New\SpecialChar \ldots{}
6285 \begin_inset Quotes erd
6288 button and, in the window that opens, enter
6289 \begin_inset Quotes eld
6293 \begin_inset Quotes erd
6296 (or any other name you like) in the
6297 \begin_inset Quotes eld
6301 \begin_inset Quotes erd
6305 Now click on the button labeled
6306 \begin_inset Quotes eld
6309 \SpecialChar \ldots{}
6311 \begin_inset Quotes erd
6314 to open a file dialog and navigate to the directory containing the batch
6316 \begin_inset Flex Code
6319 \begin_layout Plain Layout
6327 \begin_inset Flex Code
6330 \begin_layout Plain Layout
6336 and then specify the program arguments as
6337 \begin_inset Flex Code
6340 \begin_layout Plain Layout
6348 \begin_inset Flex Code
6351 \begin_layout Plain Layout
6357 wrapper is used for communicating with LyX through the
6364 \begin_layout LyX-Code
6366 \begin_inset Newline newline
6369 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
6378 \begin_inset Newline newline
6392 \begin_layout Standard
6393 Make sure that the LyXServer pipe path you specified in LyX is
6394 \begin_inset Flex Code
6397 \begin_layout Plain Layout
6411 , otherwise change the
6412 \begin_inset Flex Code
6415 \begin_layout Plain Layout
6421 wrapper accordingly.
6424 \begin_layout Standard
6425 In yap, reverse search is triggered by double-click.
6428 \begin_layout Subsubsection*
6429 SumatraPDF (Windows)
6432 \begin_layout Standard
6433 In order to use SumatraPDF for inverse search, enter
6434 \begin_inset Flex Code
6437 \begin_layout Plain Layout
6438 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6443 in the viewer setting in
6444 \begin_inset Flex MenuItem
6447 \begin_layout Plain Layout
6448 Preferences\SpecialChar \menuseparator
6449 File Handling\SpecialChar \menuseparator
6450 File formats\SpecialChar \menuseparator
6457 \begin_inset Flex Code
6460 \begin_layout Plain Layout
6466 is the previous wrapper.
6467 If SumatraPDF.exe is not in your command PATH, use its full file name.
6470 \begin_layout Standard
6471 Reverse search is triggered by double-click.
6474 \begin_layout Subsubsection*
6478 \begin_layout Standard
6479 First of all, make sure that yap is your default DVI viewer in the Windows
6480 environment, then launch it, choose its
6481 \begin_inset Flex MenuItem
6484 \begin_layout Plain Layout
6485 View\SpecialChar \menuseparator
6492 \begin_inset Quotes eld
6496 \begin_inset Quotes erd
6501 \begin_inset Quotes eld
6504 New\SpecialChar \ldots{}
6506 \begin_inset Quotes erd
6509 button and, in the window that opens, enter
6510 \begin_inset Quotes eld
6514 \begin_inset Quotes erd
6517 (or any other name you like) in the
6518 \begin_inset Quotes eld
6522 \begin_inset Quotes erd
6526 Now click on the button labeled
6527 \begin_inset Quotes eld
6530 \SpecialChar \ldots{}
6532 \begin_inset Quotes erd
6535 to open a file dialog and navigate to the directory containing the
6536 \begin_inset Flex Code
6539 \begin_layout Plain Layout
6545 program (which is installed by default on Cygwin along with the LyX executable).
6547 \begin_inset Flex Code
6550 \begin_layout Plain Layout
6556 and then specify the program arguments as
6557 \begin_inset Flex Code
6560 \begin_layout Plain Layout
6567 In this way, you will be using the
6571 for communicating with LyX.
6572 If, for whatever reason, you want to use the
6577 \begin_inset Flex Code
6580 \begin_layout Plain Layout
6586 option and be sure to specify the LyXServer pipe path in the LyX preferences.
6589 \begin_layout Standard
6590 In yap, reverse search is triggered by double-click.
6593 \begin_layout Subsubsection*
6597 \begin_layout Standard
6598 In order to use SumatraPDF for inverse search, enter
6599 \begin_inset Flex Code
6602 \begin_layout Plain Layout
6608 in the viewer setting in
6609 \begin_inset Flex MenuItem
6612 \begin_layout Plain Layout
6613 Preferences\SpecialChar \menuseparator
6614 File Handling\SpecialChar \menuseparator
6615 File formats\SpecialChar \menuseparator
6622 \begin_inset Flex Code
6625 \begin_layout Plain Layout
6631 is the following script (to be placed in your command PATH,
6632 \begin_inset Flex Code
6635 \begin_layout Plain Layout
6641 being the best choice):
6644 \begin_layout LyX-Code
6646 \begin_inset Newline newline
6650 \begin_inset Newline newline
6653 SumatraPDF -inverse-search "lyxeditor -g %f %l" $(basename $1)
6656 \begin_layout Standard
6657 This wrapper script is needed because SumatraPDF is a native Windows application
6658 and does not understand the posix paths used by the Cygwin version of LyX.
6659 If SumatraPDF.exe is not in your command PATH, use its full posix path in
6662 \begin_inset Flex Code
6665 \begin_layout Plain Layout
6671 enables communication via the
6677 \begin_inset Flex Code
6680 \begin_layout Plain Layout
6686 option if you want to use the
6690 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6693 \begin_layout Standard
6694 Reverse search is triggered by double-click.
6697 \begin_layout Section
6701 \begin_layout Standard
6702 To make forward search possible you need to provide generated output PDF/DVI
6703 file with additional information about TeX sources.
6704 This can be done via the methods described in the section
6705 \begin_inset CommandInset ref
6707 reference "sub:rev-search"
6714 \begin_layout Standard
6715 Secondly you need to configure LyX for using your viewers in
6716 \begin_inset Flex MenuItem
6719 \begin_layout Plain Layout
6720 Preferences\SpecialChar \menuseparator
6721 Output\SpecialChar \menuseparator
6728 Only some of the viewers allows this operation --- yap, xdvi, okular, Sumatra
6733 \begin_layout Plain Layout
6734 For Sumatra CMCDDE is needed --- downloadable from http://www.istri.fr/zip/CMCDDE.z
6741 Some other viewers allow at least reloading and positioning to particular
6742 page of the file --- Evince or xpdf --- for these cases you can use external
6744 Please study the prepared examples in the Preferences dialog.
6745 The values replaced in the setting:
6746 \begin_inset Flex Code
6749 \begin_layout Plain Layout
6756 \begin_inset Flex Code
6759 \begin_layout Plain Layout
6765 for exported temporary .tex file,
6766 \begin_inset Flex Code
6769 \begin_layout Plain Layout
6775 exported output file (either dvi or pdf, depending on which one exists
6780 \begin_layout Standard
6781 When viewing, LyX dynamically choose proper preview format based on the
6782 presence of .dvi or .pdf file in the temporary directory (i.e.
6783 what format have you used for viewing this particular document).
6787 \begin_layout Chapter
6788 Special Document Classes
6791 \begin_layout Section
6795 \begin_layout Standard
6801 \begin_layout Subsection
6805 \begin_layout Standard
6806 This section describes how LyX can be used to write articles for submission
6807 to the scientific journal
6809 Astronomy and Astrophysics
6811 (www.edpsciences.fr/aa/
6812 \begin_inset Flex URL
6815 \begin_layout Plain Layout
6817 http://www.edpsciences.fr/aa/
6822 ) using Version 5.01 of the document class
6827 This package can be downloaded from the ftp site
6830 \begin_layout Standard
6831 \begin_inset VSpace medskip
6837 \begin_layout Standard
6839 \begin_inset Flex URL
6842 \begin_layout Plain Layout
6844 ftp://ftp.edpsciences.org/pub/aa/readme.html
6852 \begin_layout Standard
6853 \begin_inset VSpace medskip
6859 \begin_layout Standard
6860 A manual comes together with that package, and this text is not meant to
6861 replace the original manual but is merely a short guide in how to realize
6862 the correct form of your paper.
6866 \begin_layout Standard
6867 Please note that the publisher of the journal was changed from Springer
6868 to EDP Sciences starting January 1, 2001.
6869 That change involved also some slight changes to the style files, namely
6870 the removal of the thesaurus command.
6871 The LyX class aa supports the newest version of these style files, V 5.01.
6872 If you have an older version installed, please upgrade.
6873 For compatibility, the old (version 4) layout has been kept as
6878 Please refer to the comments in
6880 LyXDir/layouts/aapaper.layout
6885 \begin_layout Subsection
6889 \begin_layout Standard
6890 It is recommended you start from the example template distributed with LyX.
6891 If you are not using a template, note the following settings:
6894 \begin_layout Itemize
6901 Document\SpecialChar \menuseparator
6904 dialog (OK, that one was obvious).
6907 \begin_layout Itemize
6908 Don't change the option
6911 \begin_inset space ~
6921 The whole layout is done by the macros, you shouldn't change anything.
6924 \begin_layout Subsection
6928 \begin_layout Standard
6929 First thing to enter is the header information.
6930 It consists of seven entries, of which some are optional.
6934 \begin_layout Itemize
6942 \begin_layout Itemize
6950 \begin_layout Itemize
6958 \begin_layout Itemize
6966 \begin_layout Itemize
6971 : [optional] if more than one author: whom to contact for offprint requests.
6974 \begin_layout Itemize
6979 : [optional] mail address for contacts.
6982 \begin_layout Itemize
6990 Received: <date>; Accepted <date>
6993 \begin_layout Standard
6994 There is no need to issue the
7000 command, this is done automatically by LyX when the header is finished.
7001 Although the order of the single header entries doesn't matter it is advised
7002 to keep the above sequence, just to get the best optics and meets the layout
7003 of the real document.
7006 \begin_layout Standard
7007 If you want to place footnotes in the header block, e.
7008 \begin_inset space \thinspace{}
7012 \begin_inset space \space{}
7015 to state your present address, just use the standard footnote via the menu
7018 Insert\SpecialChar \menuseparator
7022 LyX will automagically use the term
7031 \begin_layout Standard
7032 In addition to these topics, the macros use three additional LaTeX commands
7033 that have no counterpart in LyX:
7036 \begin_layout Itemize
7043 to separate different names for more than one author and institute, respectivel
7047 \begin_layout Itemize
7054 to mark corresponding author/institute pairs.
7055 The institutes are numbered sequentially as they appear in the
7059 field, so you have to put a marker to each author.
7062 \begin_layout Itemize
7069 to supply an email address for fast contact.
7072 \begin_layout Standard
7073 In all cases, the appropriate command has to be entered in LyX and marked
7079 \begin_layout Subsection
7083 \begin_layout Standard
7084 The abstract should immediately follow the header block.
7085 With version 5 the abstract environment was changed to a command, and there
7086 is now a resctriction to only one paragraph.
7087 In addition, it should contain an entry with the keywords.
7088 This is not yet implemented for LyX, therefore you have to enter the LaTeX
7095 by hand and mark it as LaTeX code.
7096 Refer to the example paper.
7099 \begin_layout Subsection
7100 Supported environments
7103 \begin_layout Standard
7104 The A&A paper layout supports the following environments for structuring
7108 \begin_layout Itemize
7114 \begin_layout Itemize
7120 \begin_layout Itemize
7126 \begin_layout Itemize
7132 \begin_layout Itemize
7138 \begin_layout Itemize
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 Subsection
7181 Commands not supported by LyX
7184 \begin_layout Standard
7185 Some commands are not yet supported by the
7190 Some have already been mentioned.
7191 For the sake of completeness, they are listed all together here:
7194 \begin_layout Itemize
7202 \begin_layout Itemize
7210 \begin_layout Itemize
7218 \begin_layout Itemize
7226 \begin_layout Itemize
7234 \begin_layout Itemize
7242 \begin_layout Itemize
7250 \begin_layout Itemize
7258 \begin_layout Standard
7259 If you want to use any of these commands, you have to enter them yourself.
7262 Do not forget to mark them as LaTeX code!
7265 \begin_layout Subsection
7266 Figure and Table Floats
7269 \begin_layout Standard
7270 LyX provides support for the necessary float environments
7272 figure, figure*, table
7278 , therefore we won't tell much about it here.
7282 \begin_inset space ~
7288 Just remember that tables should be left-aligned.
7289 For that, select the table and change the alignment in
7291 Edit\SpecialChar \menuseparator
7293 \begin_inset space ~
7299 \begin_layout Standard
7300 There is only one special thing: the figures with caption besides the figure.
7301 To create such a figure, you have to do the following:
7304 \begin_layout Enumerate
7305 Create a wide figure float:
7307 Insert\SpecialChar \menuseparator
7308 Float\SpecialChar \menuseparator
7311 , then right click in the figure and select
7317 \begin_inset space ~
7325 \begin_layout Enumerate
7326 Enter your caption text.
7329 \begin_layout Enumerate
7334 to move the cursor above the caption.
7337 \begin_layout Enumerate
7341 \begin_layout Enumerate
7342 Position the cursor behind the figure and insert a horizontal fill:
7344 Insert\SpecialChar \menuseparator
7346 \begin_inset space ~
7349 Character\SpecialChar \menuseparator
7351 \begin_inset space ~
7359 \begin_layout Enumerate
7360 Switch to LaTeX mode:
7363 \begin_inset space ~
7371 \begin_layout Enumerate
7381 Do not close the brace!
7384 \begin_layout Enumerate
7385 Position the cursor behind the caption text, switch to LaTeX mode and insert
7389 \begin_inset space ~
7401 \begin_layout Standard
7402 Also, refer to the figures in the example paper.
7405 \begin_layout Subsection
7409 \begin_layout Standard
7410 For submission, the paper has to be formated in a special double-spacing
7412 For this purpose, you have to give the option
7416 to the documentclass.
7417 This must be done using the extra class options field in the
7419 Document\SpecialChar \menuseparator
7423 Just enter the string
7430 \begin_layout Subsection
7434 \begin_layout Standard
7439 directory contains an example paper written with LyX.
7440 It is the example paper from the original macro package, translated to
7442 Use it for inspiration, and compare the original LaTeX code with LyX way
7446 \begin_layout Section
7450 \begin_layout Standard
7456 \begin_layout Subsection
7460 \begin_layout Standard
7461 AASTeX is a set of macros produced by the American Astronomical Society
7462 to facilitate electronic manuscript submission to the three journals they
7463 publish: the Astrophysical Journal (including the Letters and Supplement),
7464 the Astronomical Journal, and the Publications of the Astronomical Society
7466 LyX has proven to be an excellent tool for generating these documents,
7467 especially given its equation, citation, and figure handling capabilities.
7468 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7469 is the version described here, or higher.
7470 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7471 incompatible with LyX.
7472 The AASTeX package may be downloaded from the AASTeX Web site
7475 \begin_layout Standard
7476 \begin_inset VSpace medskip
7482 \begin_layout Standard
7484 \begin_inset Flex URL
7487 \begin_layout Plain Layout
7489 http://www.journals.uchicago.edu/AAS/AASTeX
7497 \begin_layout Standard
7498 \begin_inset VSpace medskip
7504 \begin_layout Standard
7505 A complete user guide is contained in that package and you should familiarize
7506 yourself with it thoroughly before embarking on writing a paper in LyX.
7507 LyX will not reduce the need to figure out all the AASTeX commands, it
7508 will only reduce the drudgery of typing everything in.
7509 It is your responsibility to ensure that the final exported LaTeX document
7510 conforms completely to the requirements of the journal to which you are
7511 submitting your paper.
7514 \begin_layout Subsection
7515 Starting a New Paper
7518 \begin_layout Standard
7519 I strongly suggest that you start with the AASTeX template file.
7522 File\SpecialChar \menuseparator
7529 , enter the new file name, then choose the
7534 This will show the most common fields found in a manuscript.
7535 Simply overwrite the existing text (including the brackets,
7539 ) with the correct information.
7540 Many of the AASTeX commands and environments can be implemented directly
7541 in LyX, but some cannot: most noticeably
7553 , which should stick out like a sore thumb if you actually just opened the
7555 For commands such as these, the LaTeX code must be entered directly and
7557 Such commands are referred to as TeX code, or Evil Red Text.
7558 I tried to minimize the amount of TeX code needed in an AASTeX document,
7559 but there is still a bit more required than any of us would like.
7562 \begin_layout Subsection
7563 Finishing Your Paper
7566 \begin_layout Standard
7567 When the paper is finished to your satisfaction and previews/prints correctly,
7569 \begin_inset Quotes eld
7573 \begin_inset Quotes erd
7576 actions which need to be done before you submit it to the journals.
7580 \begin_layout Enumerate
7581 Export your paper as a LaTeX file (
7583 File\SpecialChar \menuseparator
7584 Export\SpecialChar \menuseparator
7591 \begin_layout Enumerate
7596 file with your favorite text editor
7600 \begin_layout Enumerate
7601 remove the comment lines before the
7610 \begin_layout Enumerate
7615 usepackage...{fontenc}
7617 line if it appears (usually just after
7632 \begin_layout Enumerate
7633 remove everything between (and including) the
7645 commands, except for any commands you specifically put into the LaTeX preamble
7646 (which should appear immediately after the
7647 \begin_inset Quotes eld
7650 User specified LaTeX commands
7651 \begin_inset Quotes erd
7662 \begin_layout Enumerate
7663 Run the resulting file through LaTeX to make sure it still processes correctly.
7666 \begin_layout Enumerate
7667 Reread the journal requirements to make sure your filenames and formats
7671 \begin_layout Enumerate
7675 \begin_layout Subsection
7676 Comments On Specific Commands
7679 \begin_layout Standard
7680 I will not describe the detailed usage of the individual AASTeX commands:
7681 the AASTeX User Guide (
7685 ) gives a good description of each.
7686 Thus it's probably easiest for me to go down the list as found in the guide
7687 and offer comments where necessary.
7688 So let's begin \SpecialChar \ldots{}
7692 \begin_layout Subsubsection
7693 Things that work as expected
7696 \begin_layout Standard
7700 \begin_layout Plain Layout
7712 \begin_layout Standard
7713 Because they work as you might expect, I simply list them and the section
7814 begin{thebibliography}
7822 (2.13.2), all the cite commands and their variations (2.13.2), the generic
7823 graphicx figure commands (2.14.1),
7847 (2.15.4, amongst other places),
7874 \begin_layout Standard
7875 The following style options also work correctly:
7896 Simply put them in the
7902 Layout\SpecialChar \menuseparator
7908 \begin_layout Standard
7912 \begin_layout Plain Layout
7924 \begin_layout Subsubsection
7925 Things that work, but require more comment
7928 \begin_layout Standard
7929 The following items work, but require a little more discussion:
7932 \begin_layout Itemize
7933 These items are reserved for use by the journal editors, but you can put
7934 them into the LaTeX preamble if you feel compelled to do so:
7967 \begin_layout Itemize
7968 These items may be placed in the LaTeX preamble, and are included as blanks
7969 in the template file:
7990 \begin_layout Itemize
7997 (2.3) – can only be used
7998 \begin_inset Quotes eld
8002 \begin_inset Quotes erd
8005 , not in the middle of a paragraph.
8006 Use TeX code if you need to embed it.
8009 \begin_layout Itemize
8016 (2.3) – will have extra {} after it.
8017 This should not cause an error.
8020 \begin_layout Itemize
8027 (2.6) – can only be used
8028 \begin_inset Quotes eld
8032 \begin_inset Quotes erd
8035 , not in the middle of a paragraph.
8036 Use TeX code if you need to embed it.
8039 \begin_layout Itemize
8046 (2.8) – can't insert a cross-reference tag, you must type the tag name by
8050 \begin_layout Itemize
8064 \begin_layout Itemize
8071 (2.9) – will have extra {} after it.
8072 This should not cause an error.
8075 \begin_layout Itemize
8082 (2.11) – will have extra {} after it.
8083 This should not cause an error.
8086 \begin_layout Itemize
8093 (2.14.2) – you can insert an optional filename argument by placing the cursor
8094 at the beginning of the text and selecting
8096 Insert\SpecialChar \menuseparator
8101 \begin_inset Quotes eld
8105 \begin_inset Quotes erd
8108 inserts an optional argument of the type needed by
8115 Hopefully it will be renamed someday.
8118 \begin_layout Itemize
8131 for the catalog ID optional parameter
8134 \begin_layout Itemize
8147 for the catalog ID optional parameter
8150 \begin_layout Subsubsection
8151 Things not implemented, use TeX code
8154 \begin_layout Standard
8158 \begin_layout Plain Layout
8170 \begin_layout Standard
8193 setcounter{equation}
8195 (2.12), Journal name abbreviations (2.13.4),
8231 (2.15.4, insert it as the first element in the lefthand cell after where
8233 Don't use any of LyX's rules in the table),
8245 (2.15.5), much of Misc (2.17, except
8296 \begin_layout Standard
8300 \begin_layout Plain Layout
8312 \begin_layout Subsubsection
8313 Things that cannot be implemented
8316 \begin_layout Standard
8317 \SpecialChar \ldots{}
8318 at least in any meaningful sort of way, so I suggest ignoring them.
8319 They are the references environment (2.13.3), and the deluxetable environment
8321 If you really, really need to use deluxetable, I suggest editing it in
8322 a separate file with a text editor, then using
8324 Insert\SpecialChar \menuseparator
8326 \begin_inset space ~
8331 to include it in your LyX document.
8336 file to see an example of this.
8339 \begin_layout Subsection
8340 FAQs, Tips, Tricks, and Other Ruminations
8343 \begin_layout Subsubsection
8344 Getting LyX and AASTeX to cooperate
8347 \begin_layout Standard
8348 It can be a bit tricky to get LyX to recognize a new layout and document
8350 When all else fails, do this:
8353 \begin_layout Enumerate
8354 Make certain that LaTeX can find AASTeX.
8355 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8356 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
8363 \begin_layout Enumerate
8375 \begin_layout Enumerate
8378 Tools\SpecialChar \menuseparator
8381 in LyX, then restart LyX.
8384 \begin_layout Enumerate
8385 Open a regular new file, not from a template.
8386 Does AASTeX appear in the class list in
8388 Document\SpecialChar \menuseparator
8394 \begin_layout Standard
8395 If you get a warning from an existing AASTeX document about not being able
8396 to find the AASTeX layout or a message about
8397 \begin_inset Quotes eld
8400 You should not mix title layouts with normal ones
8401 \begin_inset Quotes erd
8404 , things haven't been installed correctly.
8407 \begin_layout Subsubsection
8408 LaTeX error processing a table
8411 \begin_layout Standard
8412 LyX, by default, attempts to center the table caption/title.
8413 This seems to produce a bad interaction in AASTeX so you should click somewhere
8414 in the caption/title, then select
8416 Edit\SpecialChar \menuseparator
8418 \begin_inset space ~
8432 This took care of it for me.
8435 \begin_layout Subsubsection
8439 \begin_layout Standard
8440 A couple of things: 1) I have noticed some funny spacing in the reference
8441 entries in the text.
8442 When you enter the bibliography item data, make sure their is
8446 space between the last author and the parenthesis setting off the year;
8450 \begin_inset space \thinspace{}
8454 \begin_inset space \space{}
8468 2) Entering the references at all is not obvious.
8469 The easiest thing is to start typing your first reference at the end of
8470 the document, then mark it as type
8475 That will put a small gray box in front of what you just typed.
8476 Click on the box to fill in the rest of the information.
8477 For new references, go to the end of an existing reference and press return.
8478 That will create a new line with its own box, etc.
8481 \begin_layout Subsubsection
8485 \begin_layout Standard
8486 Even though AASTeX provides its own figure commands (
8492 , for example), I much prefer LaTeX's standard figure commands (with the
8501 \begin_inset space ~
8504 commands as TeX code into a Figure Float box if you desire, but I never
8505 have much luck getting the layout right.
8506 With the standard graphics, LyX will insert a
8510 usepackage{graphicx}
8512 command into the LaTeX preamble and handle the figures in the standard
8513 LaTeX2e way, interspersing the figures in the text.
8514 I believe ApJ accepts figures exactly this way now; AJ might still use
8516 \begin_inset Quotes eld
8519 stack everything at the end
8520 \begin_inset Quotes erd
8526 \begin_layout Subsubsection
8527 Things I could have done, but didn't
8530 \begin_layout Standard
8532 \begin_inset Quotes eld
8536 \begin_inset Quotes erd
8539 things I could have implemented, but chose not to.
8540 For instance, I saw no point in double-spacing the text in the LyX window,
8541 even though it is double-spaced in the paper manuscript.
8542 Also, I chose not to make separate layouts for the preprint and preprint2
8544 Since I assume you will spend most of your time in the plain manuscript
8545 mode anyway, I decided not to chew up more disk space with this.
8549 \begin_layout Subsection
8553 \begin_layout Standard
8554 Your mileage may vary.
8555 I've now had papers published by both ApJ and AJ that have had 98% of the
8556 effort done in LyX; the last 2% was the LaTeX post-processing and a few
8558 I have had no trouble with the submission process, and I'm sure the journals
8559 were never aware that there might be a difference.
8560 So, go forth and publish!
8563 \begin_layout Section
8567 \begin_layout Standard
8570 David Johnson; updated by Richard Heck
8573 \begin_layout Standard
8574 \begin_inset VSpace bigskip
8580 \begin_layout Standard
8582 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8583 papers to be submitted to American Mathematical Society publications.
8584 The layouts are not tailored to a specific journal, but easily can be.
8585 You should refer to the AMS documentation for specific instructions for
8586 each journal (usually it will entail only changing a single line in the
8588 That documentation is available on the Web at
8589 \begin_inset Flex URL
8592 \begin_layout Plain Layout
8600 \begin_inset Flex URL
8603 \begin_layout Plain Layout
8605 ftp://ftp.ams.org/pub/tex/amslatex/
8611 These layouts are appropriate, and useful, for any mathematical writing.
8615 \begin_layout Standard
8616 There are two basic AMS LaTeX layouts:
8619 \begin_layout Itemize
8620 amsart: The standard AMS article format.
8623 \begin_layout Itemize
8624 amsbook: the standard AMS book (really, monograph) format.
8628 \begin_layout Standard
8629 The layouts themselves contain only the minimum necessary to use the AMS
8631 They do not, in particular, contain any of the `theorem' environments used
8632 for setting theorems, lemmas, and the like.
8633 These are contained, instead, in the
8634 \begin_inset Flex Code
8637 \begin_layout Plain Layout
8643 module, which is loaded by default when when you select one of the AMS
8645 (It can also be used with other classes and can be removed, if you would
8646 rather use something else.) Less commonly used environments are in the
8647 \begin_inset Flex Code
8650 \begin_layout Plain Layout
8651 Theorems (AMS-Extended)
8656 module, which must be loaded manually.
8659 \begin_layout Standard
8660 By default, theorems and the like are numbered consecutively throughout
8661 the document, but this may be modified by loading the module
8662 \begin_inset Flex Code
8665 \begin_layout Plain Layout
8666 Theorems (Order by Section)
8671 or, if you are using
8672 \begin_inset Flex Code
8675 \begin_layout Plain Layout
8682 \begin_inset Flex Code
8685 \begin_layout Plain Layout
8686 Theorems (Order by Chapter)
8692 These will number the results as
8693 \begin_inset Formula $n.m$
8696 , where the first number refers to the section (or chapter) and the second
8697 refers to the total number of results so far in that section (or chapter).
8698 Many environments are also available unnumbered.
8699 These are indicated by an asterisk at the end.
8700 If you happen to want
8704 unnumbered results, the module
8705 \begin_inset Flex Code
8708 \begin_layout Plain Layout
8714 provides that option.
8717 \begin_layout Standard
8718 Note that these modules do not
8722 to be used with the AMS classes.
8723 It is perfectly possible to use the
8724 \begin_inset Flex Code
8727 \begin_layout Plain Layout
8733 module, and the others mentioned, with other classes, such as
8734 \begin_inset Flex Code
8737 \begin_layout Plain Layout
8744 \begin_inset Flex Code
8747 \begin_layout Plain Layout
8754 \begin_inset Flex Code
8757 \begin_layout Plain Layout
8766 \begin_layout Subsection
8767 What these layouts provide
8770 \begin_layout Standard
8771 There is a long list of included environments provided by these layouts.
8772 In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
8773 variety of `theorem' environments.
8774 However, the AMS recommends the environments that are available in LyX.
8778 \begin_layout Standard
8779 The following environments—as well as the standard environments, such as
8781 \begin_inset Flex Noun
8784 \begin_layout Plain Layout
8791 \begin_inset Flex Noun
8794 \begin_layout Plain Layout
8801 \begin_inset Flex Noun
8804 \begin_layout Plain Layout
8811 \begin_inset Flex Noun
8814 \begin_layout Plain Layout
8821 \begin_inset Flex Noun
8824 \begin_layout Plain Layout
8831 \begin_inset Flex Code
8834 \begin_layout Plain Layout
8841 \begin_inset Flex Code
8844 \begin_layout Plain Layout
8853 \begin_layout Description
8854 Address This should be the author's permanent address.
8857 \begin_layout Description
8859 \begin_inset space ~
8862 Address This should be the author's temporary address at the time of submission,
8863 if different from the Address.
8866 \begin_layout Description
8867 Email Author's e-mail address
8870 \begin_layout Description
8871 URL Author's Web address, if desired.
8874 \begin_layout Description
8875 Keywords Key words or phrases used to identify specific topics discussed
8879 \begin_layout Description
8880 Subjectclass These refer to the AMS Subject Classifications, published and
8883 Mathematical Reviews
8886 These are also available online at the AMS cites listed above.
8889 \begin_layout Description
8893 \begin_layout Description
8897 \begin_layout Description
8901 \begin_layout Standard
8902 The following environments are provided by both the
8903 \begin_inset Flex Code
8906 \begin_layout Plain Layout
8913 \begin_inset Flex Code
8916 \begin_layout Plain Layout
8922 modules, in the latter case in both starred (unnumbered) and unstarred
8923 (numbered) versions.
8924 These same environments are provided only in the starred versions by the
8926 \begin_inset Flex Code
8929 \begin_layout Plain Layout
8938 \begin_layout Theorem
8939 This is typically used for the statements of major results.
8943 \begin_layout Corollary*
8944 This is used for statements which follow fairly directly from previous statement
8946 Again, these can be major results.
8951 These are smaller results needed to prove other statements.
8954 \begin_layout Proposition
8955 These are less major results which (hopefully) add to the general theory
8959 \begin_layout Conjecture
8960 These are statements provided without justification, which the author does
8961 not know how to prove, but which seem to be true (to the author, at least).
8964 \begin_layout Definition*
8965 Guess what this is for.
8966 The font is different for this environment than for the previous ones.
8970 \begin_layout Example*
8971 Used for examples illustrating proven results.
8974 \begin_layout Problem
8975 It's not really known what this is for.
8976 You should figure it out.
8979 \begin_layout Exercise*
8980 Write a description for this one.
8983 \begin_layout Remark
8984 This environment is also a type of theorem, usually a lesser sort of observation.
8987 \begin_layout Claim*
8988 Often used in the course of giving a proof of a larger result.
8992 Generally, these are used to break up long arguments, using specific instances
8998 The numbering scheme for cases is on its own, not together with other numbered
9004 At the end of this environment, a QED symbol (usually a square, but it can
9005 vary with different styles) is placed.
9006 If you want to have other environments within this one—for example, Case
9007 environments—and have the QED symbol appear only after them, then the other
9008 environments need to be nested within the proof environment.
9011 Nesting Environments
9017 for information on nesting.
9020 \begin_layout Standard
9021 And these environments are provided by
9022 \begin_inset Flex Code
9025 \begin_layout Plain Layout
9026 Theorems (AMS-Extended)
9034 \begin_layout Criterion*
9035 A required condition.
9038 \begin_layout Algorithm*
9039 A general procedure to be used.
9042 \begin_layout Axiom*
9043 This is a property or statement taken as true within the system being discussed.
9046 \begin_layout Condition*
9047 Sometimes used to state a condition assumed within the present context of
9052 Similar to a Remark.
9055 \begin_layout Notation*
9056 Used for the explanation of, yes, notation.
9059 \begin_layout Summary
9060 Do we really need to tell you?
9063 \begin_layout Acknowledgement*
9067 \begin_layout Conclusion*
9068 Sometimes used at the end of a long train of argument.
9072 Used in a way similar to Proposition, though perhaps lower on the scale.
9075 \begin_layout Standard
9076 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9078 They need to be available on your system in order to use these environments.
9081 \begin_layout Section
9089 \begin_layout Standard
9095 \begin_layout Subsection
9099 \begin_layout Standard
9100 These are the layout files for some of the journals of the American Geophysical
9102 It is assumed that you have both the AGU's own class files and AGUplus
9103 installed (everything to be found at
9104 \begin_inset Flex URL
9107 \begin_layout Plain Layout
9109 ftp://ftp.agu.org/journals/latex/journals
9117 \begin_layout Subsection
9121 \begin_layout Standard
9131 They are still called this in the LyX GUI, though their LaTeX equivalents
9132 in the AGU classes are
9143 \begin_layout Standard
9144 Newly defined styles are
9181 These are mostly manuscript attributes and defined in the AGU class documentati
9185 \begin_layout Standard
9186 I suspect this is still badly incomplete.
9189 \begin_layout Subsection
9193 \begin_layout Standard
9210 \begin_layout Subsection
9214 \begin_layout Itemize
9217 Journal of Geophysical Research
9226 \begin_layout Standard
9227 Add your own, it isn't so hard! Look at the
9238 \begin_layout Subsection
9239 Bugs and things to remember
9242 \begin_layout Standard
9243 In order to use the new layouts, you must remember to do the following for
9247 \begin_layout Enumerate
9253 This can be done in the
9255 Layout\SpecialChar \menuseparator
9260 Document\SpecialChar \menuseparator
9264 (AGU articles are always in English, right? So
9271 \begin_layout Enumerate
9281 (Yes, this is a bug.)
9284 \begin_layout Enumerate
9285 Make sure you use the
9289 bibliography style, by entering
9293 into the second field of the BibTeX inset.
9294 None of the standard styles will do.
9297 \begin_layout Section
9301 \begin_layout Standard
9307 \begin_layout Subsection
9311 \begin_layout Standard
9312 Broadway is for writing plays.
9313 The format is more decorative than Hollywood, and much less standardized.
9314 This format should be suitable for workshops.
9317 \begin_layout Subsection
9321 \begin_layout Standard
9322 The same as in Hollywood.
9325 \begin_layout Subsection
9329 \begin_layout Standard
9334 names as labels then cross-reference the label to insert the name.
9335 The cross-reference dialog will show the current cast of characters.
9338 \begin_layout Subsection
9339 Paper size and Margins
9342 \begin_layout Standard
9343 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9346 \begin_layout Subsection
9350 \begin_layout Standard
9351 The following environments are available.
9352 You can use broadway.bind to get the bind keys shown at the right.
9355 \begin_layout Itemize
9359 \begin_inset Newline newline
9364 You should not have to use this, but it is here for anything that does not
9368 \begin_layout Itemize
9372 \begin_inset space \hfill{}
9376 \begin_inset Newline newline
9381 Used to describe stage setting and the action.
9382 First use of speaker names in all CAPs.
9385 \begin_layout Itemize
9389 \begin_inset space \hfill{}
9393 \begin_inset Newline newline
9398 Automatically numbered.
9399 On screen it will be arabic, but will print as Roman.
9402 \begin_layout Itemize
9406 \begin_inset space \hfill{}
9410 \begin_inset Newline newline
9420 It is just centered text.
9423 \begin_layout Itemize
9427 \begin_inset space \hfill{}
9431 \begin_inset Newline newline
9436 Not automatically numbered.
9437 You supply the number.
9438 This is because I couldn't figure out how.
9441 \begin_layout Itemize
9445 \begin_inset space \hfill{}
9449 \begin_inset Newline newline
9454 A special case of Narrative to describe the setting and action as the curtain
9458 \begin_layout Itemize
9462 \begin_inset space \hfill{}
9466 \begin_inset Newline newline
9471 The speaker's (actor's) title, centered in all CAPS.
9474 \begin_layout Itemize
9478 \begin_inset space \hfill{}
9482 \begin_inset Newline newline
9487 Instructions to the speaker.
9488 The parentheses are automatically inserted.
9489 The ( will appear on screen, but both will be in the printed play.
9490 This environment is only used within
9497 \begin_layout Itemize
9501 \begin_inset space \hfill{}
9505 \begin_inset Newline newline
9510 What the Speaker says.
9513 \begin_layout Itemize
9517 \begin_inset space \hfill{}
9521 \begin_inset Newline newline
9526 The curtain comes down.
9529 \begin_layout Itemize
9533 \begin_inset space \hfill{}
9539 \begin_layout Itemize
9543 \begin_inset space \hfill{}
9549 \begin_layout Itemize
9553 \begin_inset space \hfill{}
9559 \begin_layout Standard
9563 \begin_layout Section
9567 \begin_layout Standard
9572 can be used to type letters according to German conventions.
9573 A template file is included in
9575 .../lyx/share/templates
9577 for you to use as a starting point.
9580 \begin_layout Section
9588 \begin_layout Standard
9594 \begin_layout Subsection
9598 \begin_layout Standard
9599 This is the layout file for the European Geophysical Society journals.
9604 can be downloaded from the web site of the EGS under
9605 \begin_inset Flex URL
9608 \begin_layout Plain Layout
9618 \begin_layout Subsection
9622 \begin_layout Standard
9625 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9633 The current layout file is unfortunately very unmodular and would benefit
9634 from using the various
9641 \begin_layout Section
9645 \begin_layout Standard
9651 \begin_layout Standard
9652 Elsevier Science Publishers B.V.
9653 provides a standard LaTeX document class (
9657 ) for submitting articles to their various journals.
9658 The style file can be downloaded directly from their web site:
9659 \begin_inset Flex URL
9662 \begin_layout Plain Layout
9664 http://www.elsevier.com/wps/find/authorsview.authors/latex
9670 Instructions are supplied along with the class file, which details the
9671 requirements of the publishers.
9672 LyX includes a package that allows for the use of this class, by a layout
9673 and a template file.
9674 Installation of the class file is the same as for any other LaTeX package;
9675 instructions are provided in the Elsevier documentation.
9678 \begin_layout Standard
9688 As the Elsevier class file is based mainly on the standard article class,
9689 most of the normal functionality is provided.
9690 The Elsevier class defines a number of mathematical environments, which
9691 are similar to the AMS environments.
9692 These commands are all described in the Elsevier documentation, and are
9696 \begin_layout Standard
9697 The easiest way to use the Elsevier style is to base documents on the included
9699 It is best not to use options such as fancy headings or the geometry package,
9700 as elements such as these are defined by Elsevier in their style file.
9701 Ideally, no extra packages except those mentioned in the Elsevier documentation
9703 Essentially, Elsevier require as
9704 \begin_inset Quotes eld
9708 \begin_inset Quotes erd
9711 a LaTeX file as possible, as their intention is to take the supplied file
9712 and replace the class file with one for the particular journal to which
9713 the paper has been submitted.
9714 This also means that not too much time should be spent on the formating
9716 When it comes to be published, this will change anyway.
9717 The rest of the usage for this layout is substantially the same as for
9718 the normal article class.
9719 For details of what Elsevier do and don't allow, refer to their documentation.
9722 \begin_layout Section
9728 \begin_inset CommandInset label
9737 \begin_layout Standard
9743 \begin_layout Subsection
9747 \begin_layout Standard
9748 This section describes how to use LyX to make slides for overhead projectors.
9749 There are two document classes that can do this: the default slides class
9755 This section documents the latter.
9758 \begin_layout Standard
9759 I'm going to say this again, nice and clear, so that there's no misunderstanding
9763 \begin_layout Standard
9764 \begin_inset VSpace bigskip
9770 \begin_layout Standard
9774 This section documents the class
9775 \begin_inset Quotes eld
9783 \begin_inset Quotes erd
9791 \begin_layout Standard
9792 \begin_inset VSpace bigskip
9798 \begin_layout Standard
9799 If you're looking for the documentation for
9800 \begin_inset Quotes eld
9808 \begin_inset Quotes erd
9812 \begin_inset space ~
9816 \begin_inset CommandInset ref
9818 reference "sec:slitex"
9823 If your machine doesn't have the
9828 \begin_inset Quotes eld
9836 \begin_inset Quotes erd
9839 ] installed, you'll probably have to use the default
9843 class, which isn't quite as good as
9848 \begin_layout Standard
9853 class is designed for use with version 2.1 of the
9857 LaTeX class file which is now an integral part of LaTeX2e.
9860 \begin_layout Subsection
9864 \begin_layout Standard
9865 Obviously, to use this document class, you need to select
9866 \begin_inset Quotes eld
9874 \begin_inset Quotes erd
9884 \begin_inset space ~
9890 There are some settings in the
9893 \begin_inset space ~
9898 dialog that you should know about that are specific to this class:
9901 \begin_layout Itemize
9902 Don't change the options
9913 \begin_inset space ~
9919 They're ignored by the
9926 \begin_layout Itemize
9927 The default font size is 20
9928 \begin_inset space \thinspace{}
9931 pt with the other options being 17
9932 \begin_inset space \thinspace{}
9936 \begin_inset space \thinspace{}
9940 \begin_inset space \thinspace{}
9946 \begin_layout Itemize
9955 but all math equations are still typeset in the usual roman font.
9958 \begin_layout Itemize
9963 supports A4 and Letter paper sizes as well as a special size for working
9965 \begin_inset space \thinspace{}
9969 It doesn't support A5, B5, legal or executive paper sizes.
9972 \begin_layout Itemize
9973 Don't bother changing the
9977 settings because they are ignored anyway.
9978 All floats appear where they are defined in the text.
9981 \begin_layout Itemize
9986 setting behaves a bit differently for this class.
9991 provides extensive footer and header capabilities including a user-defined
9994 \begin_inset space ~
9998 \begin_inset CommandInset ref
10000 reference "sec:foilfoot"
10005 The title page is treated differently to all other pages in the document
10014 has the logo centered at the bottom of the page (if one is defined).
10015 The possible page style choices and what they do are as follows:
10019 \begin_layout Labeling
10020 \labelwidthstring MMMMMMM
10027 The final output contains no page numbers, or other headers or footers
10028 (except footnotes of course).
10032 \begin_layout Labeling
10033 \labelwidthstring MMMMMMM
10040 The final output contains page numbers centered at the bottom of the page.
10041 No other headings or footers (other than footnotes).
10044 \begin_layout Labeling
10045 \labelwidthstring MMMMMMM
10050 Page numbers in lower right corner.
10051 Additional headers and footers are also shown.
10052 This is also the default.
10055 \begin_layout Labeling
10056 \labelwidthstring MMMMMMM
10061 Gives you access to the
10065 package although its use with
10069 is discouraged by the writer of the
10073 package because of some potential page layout clashes.
10077 \begin_layout Subsubsection
10081 \begin_layout Standard
10082 The following options may be used in the extra class options in the
10084 Document\SpecialChar \menuseparator
10090 \begin_layout Labeling
10091 \labelwidthstring MMMMMMx
10096 This sets up the page layout for 7.33
10097 \begin_inset space \thinspace{}
10101 \begin_inset space \thinspace{}
10104 in paper, which is about the same aspect ratio as a 35
10105 \begin_inset space \thinspace{}
10108 mm slide, making it a bit easier to work with this medium.
10111 \begin_layout Labeling
10112 \labelwidthstring MMMMMMx
10117 Places a rule across the page below the header on every page except the
10121 \begin_layout Labeling
10122 \labelwidthstring MMMMMMx
10127 Places a rule across the page above the footer on every page except the
10131 \begin_layout Labeling
10132 \labelwidthstring MMMMMMx
10137 This is automatically set each time you create a new
10146 to use the dvips driver to rotate those pages that are set as landscape
10150 \begin_layout Labeling
10151 \labelwidthstring MMMMMMx
10156 Simply changes the page dimensions to those of a landscape page but doesn't
10158 Thus if you use this option you need to use an external program to rotate
10159 each page or feed your paper through your printer as landscape.
10160 Note that this option effectively reverses the roles of the
10168 environments (don't worry these are described in the next section).
10171 \begin_layout Labeling
10172 \labelwidthstring MMMMMMx
10177 Equation numbers on the left.
10180 \begin_layout Labeling
10181 \labelwidthstring MMMMMMx
10186 Flush-left equations.
10189 \begin_layout Subsection
10190 Supported Environments
10193 \begin_layout Standard
10194 Most of the environments commonly supported in other classes are also supported
10200 There are several additional environments provided by
10204 as well as a couple added by LyX.
10205 The following environments are shared with other classes:
10208 \begin_layout Standard
10212 \begin_layout Plain Layout
10216 begin{multicols}{2}
10224 \begin_layout Itemize
10230 \begin_layout Itemize
10236 \begin_layout Itemize
10242 \begin_layout Itemize
10248 \begin_layout Itemize
10254 \begin_layout Itemize
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 Standard
10336 \begin_layout Plain Layout
10348 \begin_layout Standard
10349 That is, all the major environments apart from the sectioning environments.
10350 Since foils are essentially self-contained sections, with a title and body,
10355 provides specific commands for starting new foils and these are:
10358 \begin_layout Itemize
10364 \begin_layout Itemize
10370 \begin_layout Standard
10371 LyX also provides slightly modified versions of these two environments called:
10374 \begin_layout Itemize
10380 \begin_layout Itemize
10383 ShortRotatefoilhead
10386 \begin_layout Standard
10387 and the differences will be explained in the next section.
10390 \begin_layout Standard
10391 Since foils are often used in presenting ideas or new theorems and such
10396 also provides a comprehensive box of goodies for presenting them:
10399 \begin_layout Standard
10403 \begin_layout Plain Layout
10407 begin{multicols}{2}
10415 \begin_layout Itemize
10421 \begin_layout Itemize
10427 \begin_layout Itemize
10433 \begin_layout Itemize
10439 \begin_layout Itemize
10445 \begin_layout Itemize
10451 \begin_layout Itemize
10457 \begin_layout Itemize
10463 \begin_layout Itemize
10469 \begin_layout Itemize
10475 \begin_layout Itemize
10481 \begin_layout Standard
10485 \begin_layout Plain Layout
10497 \begin_layout Standard
10498 The starred versions are unnumbered while the unstarred versions are numbered.
10499 There are also two list environments added by LyX and these are:
10502 \begin_layout Itemize
10508 \begin_layout Itemize
10514 \begin_layout Standard
10519 provides some powerful header and footer capabilities that are best set
10520 in the preamble although they may be set at any point in a document.
10521 If you want to change these settings in your document the best place to
10522 do so is at the very top of a foil, i.
10523 \begin_inset space \thinspace{}
10529 \begin_inset space \space{}
10534 straight after the foilhead.
10537 \begin_layout Standard
10538 For this purpose, the following command styles are provided [
10545 \begin_layout Standard
10549 \begin_layout Plain Layout
10553 begin{multicols}{2}
10561 \begin_layout Itemize
10565 \begin_inset space ~
10571 \begin_layout Itemize
10577 \begin_layout Itemize
10581 \begin_inset space ~
10587 \begin_layout Itemize
10591 \begin_inset space ~
10597 \begin_layout Itemize
10601 \begin_inset space ~
10608 \begin_layout Standard
10609 \begin_inset space ~
10616 \begin_layout Standard
10620 \begin_layout Plain Layout
10632 \begin_layout Standard
10633 There are also a few commands provided by
10637 that aren't directly supported by LyX but I'll tell you what they do and
10638 how to use them in section
10639 \begin_inset space ~
10643 \begin_inset CommandInset ref
10645 reference "sec:unsuppfoils"
10652 \begin_layout Subsection
10653 Building a Set of Foils
10656 \begin_layout Standard
10657 This section will give a simple introduction to using the different environments
10658 to build a set of foils.
10659 If you want to see an example set of foils, take a look at the
10663 file you find in LyX's
10670 \begin_layout Subsubsection
10671 Give It a Title Page
10674 \begin_layout Standard
10675 Unlike other classes that provide
10695 creates the title on a page of its own.
10696 If you leave out the
10700 environment LaTeX will substitute the current date (every time you regenerate
10704 \begin_layout Subsubsection
10708 \begin_layout Standard
10709 As I mentioned earlier, there are four ways of starting a new foil.
10710 For portrait foils you should use
10719 The difference between these two environments is the amount of space between
10720 the title of the foil (the foilhead) and the body of the foil.
10723 \begin_layout Standard
10724 Landscape foils are generated using the
10730 ShortRotatefoilhead
10733 Again the only difference is the spacing between foilhead and body.
10734 Both of the short versions have 0.5 inches less separation between the foilhead
10739 \begin_layout Standard
10740 One problem with the support for landscape foils is the requirement that
10741 you have to use the
10745 driver to generate the PostScript output otherwise the foils won't be rotated.
10746 It is possible to get landscape foils even if you haven't got the
10750 driver provided you can feed your foils sideways through your printer ;-)
10753 \begin_layout Subsubsection
10754 Theorems, Lemmas, Proofs and more
10757 \begin_layout Standard
10758 Due to a small bug in LyX you can't have two of the same type of these environme
10759 nts directly following each other.
10760 They must be separated by something.
10761 If you try, you will just be extending the previous environment as if you
10762 had merged the two environments together.
10763 So, how do you get around this problem? The simplest option is to insert
10764 some text between the two environments or add a
10768 environment between the two with just a
10769 \begin_inset Quotes eld
10777 \begin_inset Quotes erd
10781 This will force LyX to produce two separate environments and hence the
10782 correct LaTeX output.
10783 An example is provided in the example file included with the LyX distribution.
10784 Remember, this problem only occurs if you are trying to place two of the
10785 same type of theorem-like environments one directly after the other.
10788 \begin_layout Subsubsection
10792 \begin_layout Standard
10793 You get all the commonly supported list styles found in other classes as
10794 well as two new ones.
10795 I'll only describe the new ones here.
10796 If you want to find out more about the other list environments check out
10802 If you intend to use itemized lists you might also want to read about the
10806 \begin_inset space ~
10810 \begin_inset space ~
10815 dialog described above in section
10816 \begin_inset space ~
10820 \begin_inset CommandInset ref
10822 reference "sec:bullet"
10829 \begin_layout Standard
10830 The two new list styles,
10838 , are designed to make it easier for you to create lists of do's and don'ts
10839 or right and wrong by providing dedicated environments that use a tick
10840 or a cross as the label of the list.
10841 These lists are in fact dedicated variants of the
10846 They do however require that you have the
10850 packages installed.
10853 \begin_layout Subsubsection
10857 \begin_layout Standard
10862 redefines the floating tables and figures so that they appear exactly where
10863 they are in the text rather than pushing them to the top of the page or
10864 to some user specified location.
10865 In fact if you change the float placement settings they are simply ignored.
10868 \begin_layout Subsubsection
10869 Page Headers and Footers
10870 \begin_inset CommandInset label
10872 name "sec:foilfoot"
10879 \begin_layout Standard
10883 \begin_inset space ~
10892 are two commands used to control the left-footer text string.
10893 The first is meant to allow you to include a graphic logo on your foils
10895 \begin_inset Quotes eld
10903 \begin_inset Quotes erd
10907 While the second is meant to provide a classification for the audience,
10911 \begin_inset space \thinspace{}
10917 \begin_inset space \space{}
10921 It is empty by default.
10924 \begin_layout Standard
10925 The remaining page corners can be filled by
10928 \begin_inset space ~
10933 (which defaults to page numbers),
10936 \begin_inset space ~
10944 \begin_inset space ~
10952 \begin_layout Subsection
10958 \begin_inset CommandInset label
10960 name "sec:unsuppfoils"
10967 \begin_layout Standard
10968 All the commands mentioned below need to be set in a
10976 within another environment.
10979 \begin_layout Subsubsection
10983 \begin_layout Standard
10984 All lengths are adjusted using the
11007 should be replaced by the name given to the length you want to change and
11012 is the length value.
11013 All lengths should be specified in units of length such as inches (
11025 ) or relative to some document or font-based length such as
11035 \begin_layout Standard
11036 It's possible to change the spacing between a foilhead and the body of the
11037 foil by adjusting the length specified by
11044 For example, to make
11049 \begin_inset space \space{}
11052 in closer to their bodies put the following in the preamble:
11058 foilheadskip}{-0.5in}
11061 \begin_layout Standard
11062 The spacings around floats can be adjusted by setting these lengths:
11065 \begin_layout Labeling
11066 \labelwidthstring MMMMMMMMMMM
11073 Separation between the text and the top of the float
11076 \begin_layout Labeling
11077 \labelwidthstring MMMMMMMMMMM
11084 Separation between the float and the caption
11087 \begin_layout Labeling
11088 \labelwidthstring MMMMMMMMMMM
11095 Separation between the caption and the following text
11098 \begin_layout Labeling
11099 \labelwidthstring MMMMMMMMMMM
11106 You can make the captions narrower than the surrounding text by adjusting
11108 Best done relative to
11117 \begin_layout Standard
11118 There are also several title page related lengths that you may find useful
11119 if you have a long title or several authors:
11122 \begin_layout Labeling
11123 \labelwidthstring MMMMMMMMMMM
11130 Separation from headers to
11135 \begin_layout Labeling
11136 \labelwidthstring MMMMMMMMMMM
11154 \begin_layout Labeling
11155 \labelwidthstring MMMMMMMMMMM
11169 \begin_layout Labeling
11170 \labelwidthstring MMMMMMMMMMM
11186 \begin_layout Labeling
11187 \labelwidthstring MMMMMMMMMMM
11203 \begin_layout Standard
11204 The last length related command affects all the list environments.
11215 a list environment then all the vertical spacing between the list items
11217 Note that this is a command not a length so it doesn't require
11223 like the stuff mentioned above.
11226 \begin_layout Subsubsection
11227 Headers and Footers
11230 \begin_layout Standard
11243 commands control whether the logo in the
11247 definition appear on a given page.
11254 in the preamble then none of the foils will have the logo on them.
11255 If you don't want the logo on a particular page place the
11261 directly after the foilhead of that page and the
11267 directly after the next foilhead.
11270 \begin_layout Standard
11271 If you decide to use the
11275 page style setting in the
11278 \begin_inset space ~
11283 dialog you should probably add
11293 to your preamble so headers and footers on landscape pages are correctly
11294 placed when rotated.
11295 This is due to some clashes between the page layouts provided by the
11306 \begin_layout Section
11307 Hollywood (Hollywood spec scripts)
11310 \begin_layout Standard
11316 \begin_layout Subsection
11320 \begin_layout Standard
11321 Getting the format of a Hollywood script right is a
11322 \begin_inset Quotes eld
11326 \begin_inset Quotes erd
11329 It is designed to make the readers focus on content and to be easy and
11330 familiar for the actors to read.
11331 Each page of a script should be one minute of film.
11332 Nothing goes in a script that you cannot see or hear on screen.
11333 The courier 12 pt font should be used throughout.
11337 \begin_layout Subsection
11341 \begin_layout Standard
11342 Speakers' lines should NEVER break in mid-sentence.
11343 If a speaker's lines continue over a page break, repeat the
11347 title followed by (Cont'd).
11350 \begin_layout Subsection
11354 \begin_layout Standard
11359 names as labels then cross-reference the label to insert the name.
11360 The cross-reference dialog will show the current cast of characters.
11361 You can use this to insert the speaker name in narratives also.
11364 \begin_layout Subsection
11365 Paper size and Margins
11368 \begin_layout Standard
11369 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11372 \begin_layout Subsection
11376 \begin_layout Standard
11377 The following environments are available.
11378 You can use hollywood.bind to get the bind keys shown at the right.
11381 \begin_layout Itemize
11385 \begin_inset Newline newline
11390 Used where nothing else works.
11394 \begin_layout Itemize
11400 \begin_inset space \hfill{}
11408 \begin_inset Newline newline
11411 Usually followed by something like
11412 \begin_inset Quotes eld
11415 on Sally waking up.
11416 \begin_inset Quotes erd
11422 \begin_layout Itemize
11426 \begin_inset space \hfill{}
11430 \begin_inset Newline newline
11435 Introduces a new INTERIOR camera set-up.
11436 Always followed by DAY or NIGHT, or something similar to define the lighting
11438 Everthing on this line in CAPS.
11441 \begin_layout Itemize
11445 \begin_inset space \hfill{}
11449 \begin_inset Newline newline
11454 Introduces a new EXTERIOR camera set-up.
11455 Everthing on this line in CAPS.
11458 \begin_layout Itemize
11462 \begin_inset space \hfill{}
11466 \begin_inset Newline newline
11471 The character speaking.
11474 \begin_layout Itemize
11478 \begin_inset space \hfill{}
11482 \begin_inset Newline newline
11487 Instructions to the speaker.
11488 The () are automatically inserted, but only the ( will show in LyX.
11489 Both will be printed.
11492 \begin_layout Itemize
11496 \begin_inset space \hfill{}
11500 \begin_inset Newline newline
11512 \begin_layout Itemize
11516 \begin_inset space \hfill{}
11520 \begin_inset Newline newline
11525 Camera movement instruction.
11527 \begin_inset space \thinspace{}
11531 \begin_inset space \space{}
11537 \begin_layout Itemize
11541 \begin_inset space \hfill{}
11547 \begin_layout Itemize
11551 \begin_inset space \hfill{}
11557 \begin_layout Itemize
11561 \begin_inset space \hfill{}
11567 \begin_layout Itemize
11571 \begin_inset space \hfill{}
11577 \begin_layout Subsection
11581 \begin_layout Itemize
11585 \begin_layout Itemize
11589 \begin_layout Itemize
11591 \begin_inset space \thinspace{}
11598 \begin_layout Itemize
11603 \begin_layout Itemize
11604 PAN — camera movement
11607 \begin_layout Itemize
11608 INSERT — cut to close-up of
11611 \begin_layout Section
11615 \begin_layout Standard
11618 Panayotis Papasotiriou
11621 \begin_layout Subsection
11625 \begin_layout Standard
11626 The ijmpc package is a set of macros that facilitates electronic manuscript
11629 International Journal of Modern Physics C
11632 Similarly, the ijmpd package is for creating manuscripts to be submitted
11635 International Journal of Modern Physics D
11638 Both journals are published by World Scientific.
11639 The corresponding document classes are named
11648 These files, together with instructions for the authors, can be downloaded
11650 \begin_inset Flex URL
11653 \begin_layout Plain Layout
11655 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11661 \begin_inset Flex URL
11664 \begin_layout Plain Layout
11666 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11672 Both packages are modified versions of the standard
11673 \begin_inset Quotes eld
11677 \begin_inset Quotes erd
11680 package, and they are almost (but not exactly) identical.
11681 Most of their features are supported by LyX.
11682 I have used LyX successfully to write articles submitted to both journals
11683 without any problem.
11686 \begin_layout Subsection
11690 \begin_layout Standard
11691 As usual, the easiest way to write a paper is to start with a template.
11694 File\SpecialChar \menuseparator
11713 This will give an (almost) empty document that includes the most common
11714 fields found in a manuscript.
11715 Simply overwrite the existing text (including the brackets,
11720 You should keep in mind the following remarks.
11723 \begin_layout Enumerate
11724 LyX won't let you change the font size and the page style of the document,
11725 because such modifications are not allowed by both packages.
11728 \begin_layout Enumerate
11729 The language of the document should not be changed.
11730 Before previewing your paper, be sure that the babel package is not used.
11731 To do this, click on
11733 Tools\SpecialChar \menuseparator
11744 checkbox in the language settings, and click on
11752 , if you wish to make this change permanent).
11755 \begin_layout Enumerate
11757 \begin_inset Quotes eld
11761 \begin_inset Quotes erd
11764 style must be used to define keywords.
11767 \begin_layout Enumerate
11768 The ijmpc package provides a style named
11769 \begin_inset Quotes eld
11772 Classification Codes
11773 \begin_inset Quotes erd
11776 , which can be used to define classification codes, such as PACS numbers.
11777 Note that this facility is not supported by the ijmpd package.
11780 \begin_layout Enumerate
11781 Several new environments are available:
11782 \begin_inset Quotes eld
11786 \begin_inset Quotes erd
11790 \begin_inset Quotes eld
11794 \begin_inset Quotes erd
11798 \begin_inset Quotes eld
11802 \begin_inset Quotes erd
11806 \begin_inset Quotes eld
11810 \begin_inset Quotes erd
11814 \begin_inset Quotes eld
11818 \begin_inset Quotes erd
11822 \begin_inset Quotes eld
11826 \begin_inset Quotes erd
11830 \begin_inset Quotes eld
11834 \begin_inset Quotes erd
11838 \begin_inset Quotes eld
11842 \begin_inset Quotes erd
11846 \begin_inset Quotes eld
11850 \begin_inset Quotes erd
11854 \begin_inset Quotes eld
11858 \begin_inset Quotes erd
11862 \begin_inset Quotes eld
11866 \begin_inset Quotes erd
11870 \begin_inset Quotes eld
11874 \begin_inset Quotes erd
11878 \begin_inset Quotes eld
11882 \begin_inset Quotes erd
11886 \begin_inset Quotes eld
11890 \begin_inset Quotes erd
11894 Their use is more or less obvious.
11895 LyX supports all these environments; it will use the proper label, text
11896 style, and numbering scheme for each of them.
11899 \begin_layout Enumerate
11900 Both packages use basic citations; the natbib package should not be used.
11901 In LyX, citation references are shown as usual; in the output, citations
11902 are shown as superscripts.
11903 If you want to use a citation as normal text, you should use the
11908 \begin_inset space \thinspace{}
11912 \begin_inset space \space{}
11916 \begin_inset Quotes eld
11920 \begin_inset space \space{}
11930 \begin_inset Quotes erd
11936 \begin_layout Enumerate
11938 \begin_inset Quotes eld
11942 \begin_inset Quotes erd
11945 section in both packages.
11946 To put acknowledgments, just use the
11947 \begin_inset Quotes eld
11951 \begin_inset Quotes erd
11957 \begin_layout Enumerate
11958 Appendices may be added to the paper,
11962 the Acknowledgments and
11967 LyX provides a special environment, called
11968 \begin_inset Quotes eld
11972 \begin_inset Quotes erd
11975 which marks the beginning of the appendices.
11976 This environment should be left blank; it just sends a LaTeX command, but
11977 nothing is really printed.
11979 \begin_inset Quotes eld
11983 \begin_inset Quotes erd
11986 is printed with blue letters, as a signal that all sections after that
11987 point are appendices.
11988 To write an appendix, use the
11989 \begin_inset Quotes eld
11993 \begin_inset Quotes erd
11997 LyX will number each appendix with capital letters, as required by both
12000 \begin_inset Quotes eld
12004 \begin_inset Quotes erd
12011 be present before the first appendix; if not, all appendices will be numbered
12012 as normal sections in the output.
12015 \begin_layout Enumerate
12016 The ijmpc and the ijmpd packages use the
12020 command to implement table captions.
12021 As a result, a table created by LyX is printed correctly, but its caption
12023 However, you can use some TeX code to overcome this problem, so that captions
12024 are printed as expected.
12025 To do so, create a float table as usual, remove the caption, and replace
12026 it with the TeX code
12036 (sic); you must also the TeX code
12040 immediately after the tabular material.
12041 Study the example table included in the template files to see how this
12042 trick is implemented.
12043 Alternatively, If you need table captions, you should implement the whole
12048 file, then include this file to the LyX document (
12050 Insert\SpecialChar \menuseparator
12051 File\SpecialChar \menuseparator
12053 \begin_inset space ~
12059 Details on how to create a table float can be found in the files
12067 , included in the corresponding packages.
12070 \begin_layout Subsection
12071 Preparing a paper for submission
12074 \begin_layout Standard
12075 Before you submit your paper you must export the LyX document as a LaTeX
12078 File\SpecialChar \menuseparator
12079 Export\SpecialChar \menuseparator
12086 \begin_layout Plain Layout
12087 Actually you have the choice between LaTeX (plain) and pdflatex.
12088 If you intend to use pdflatex to prepare the paper, you should use the
12089 pdflatex option so that included graphics are converted to PDF format,
12090 ready for use by pdflatex.
12095 , then make the following changes to the resulting
12102 \begin_layout Enumerate
12103 Remove the comment lines before the
12112 \begin_layout Enumerate
12113 Remove everything between (and including) the
12125 commands, except for any commands you specifically put into the LaTeX preamble.
12128 \begin_layout Standard
12133 file should be saved and processed through LaTeX as many times as necessary.
12134 You may also want to check the resulting
12141 \begin_layout Subsection
12145 \begin_layout Standard
12146 The use of TeX code is reduced to two commands, which must be placed at
12147 the top of the document.
12148 If you started writing your paper by using the
12156 template, the TeX code needed is already in its place; you usually don't
12158 You may only modify the first TeX code to specify the information printed
12159 to the top of odd and even pages (authors' names and short paper's title,
12161 This TeX code must have the form
12165 markboth{Authors' Names}{Short Paper's Title}
12170 \begin_layout Section
12174 \begin_layout Standard
12180 \begin_layout Subsection
12184 \begin_layout Standard
12185 The iopart package provides a document class to create electronic manuscript
12186 submission to the journals published by the Institute of Physics.
12187 Instructions for the authors how to create a paper using the iopart class
12188 can be downloaded together with the iopart package from the site
12189 \begin_inset Flex URL
12192 \begin_layout Plain Layout
12194 ftp://ftp.iop.org/pub/journals/latex2e
12202 \begin_layout Subsection
12206 \begin_layout Standard
12207 The easiest way to write a paper is to start with the file
12211 that is available in LyX's examples files folder.
12212 Open this file, save it under a new name, and start writing.
12213 The example file explains how to use the special text environments.
12214 Here are the most important advices:
12217 \begin_layout Itemize
12218 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12221 Use AMS math package
12223 in the document settings under
12230 \begin_layout Itemize
12233 The title environment defines the kind of your paper.
12234 So use one of the following environments for the title:
12238 \begin_layout Itemize
12247 \begin_layout Itemize
12256 \begin_layout Itemize
12262 for a Topical review
12265 \begin_layout Itemize
12274 \begin_layout Itemize
12283 \begin_layout Itemize
12289 for a Paper (same as Title)
12292 \begin_layout Itemize
12298 for a Preliminary communication
12301 \begin_layout Itemize
12307 for a Rapid communication
12310 \begin_layout Itemize
12316 for a Letter to the editor
12320 \begin_layout Itemize
12323 All title environments except of
12327 can have an optional short title.
12330 \begin_layout Itemize
12331 There is a general title environment
12335 which is not directly supported by the LyX.
12336 This can be used as TeX code when your document doesn't fit into one of
12337 the other title types.
12340 \begin_layout Standard
12341 For more informations like hints for special table and formula formatting,
12342 look at the IOP author guidelines.
12345 \begin_layout Section
12349 \begin_layout Standard
12352 Panayotis Papasotiriou
12355 \begin_layout Subsection
12359 \begin_layout Standard
12360 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12361 that facilitates electronic manuscript submission to the journals they
12363 Most known of them (at least in my domain of interest) are
12365 Astrophysics and Space Science
12371 , but there are many others (see a complete list at
12372 \begin_inset Flex URL
12375 \begin_layout Plain Layout
12377 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12383 The Kluwer package may be downloaded from the site
12384 \begin_inset Flex URL
12387 \begin_layout Plain Layout
12389 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12395 A complete user guide is contained in that package (but it can also be
12396 downloaded separately).
12399 \begin_layout Standard
12400 LyX supports many features of the package but not everything.
12401 However, the TeX code needed is reduced to some
12402 \begin_inset Quotes eld
12406 \begin_inset Quotes erd
12409 commands of the package (see
12410 \begin_inset space ~
12414 \begin_inset CommandInset ref
12416 reference "subsec:kluwer_peculiarities"
12421 I have recently used LyX to write an article submitted to the
12423 Astrophysics and Space Science
12425 without any problem.
12428 \begin_layout Subsection
12432 \begin_layout Standard
12433 The easiest way to write a paper is to start with the Kluwer template file.
12436 File\SpecialChar \menuseparator
12448 This will give an (almost) empty document that includes the most common
12449 fields found in a manuscript and a short description of their use.
12450 As in most templates, simply overwrite the existing text (including the
12455 ) with the correct information.
12458 \begin_layout Subsection
12459 Preparing a paper for submission
12462 \begin_layout Standard
12463 As in the AASTeX package, before you submit your paper to a journal you
12465 \begin_inset Quotes eld
12469 \begin_inset Quotes erd
12475 \begin_layout Enumerate
12476 Export your paper as a LaTeX file.
12477 To do this, click on
12479 File\SpecialChar \menuseparator
12480 Export\SpecialChar \menuseparator
12487 \begin_layout Enumerate
12492 file with a text editor and make the following changes
12496 \begin_layout Enumerate
12497 remove the comment lines before the
12506 \begin_layout Enumerate
12507 remove everything between (and including) the
12519 commands, except for any commands you specifically put into the LaTeX preamble.
12522 \begin_layout Standard
12531 \begin_layout Enumerate
12536 file through LaTeX as many times as necessary (usually up to three).
12539 \begin_layout Enumerate
12545 \begin_inset space \thinspace{}
12549 \begin_inset space \space{}
12556 , and check if everything is OK (it should, if you didn't make any mistake).
12559 \begin_layout Subsection
12560 \begin_inset Quotes eld
12564 \begin_inset Quotes erd
12567 of the Kluwer package
12568 \begin_inset CommandInset label
12570 name "subsec:kluwer_peculiarities"
12577 \begin_layout Standard
12578 The Kluwer package has the following
12579 \begin_inset Quotes eld
12583 \begin_inset Quotes erd
12589 \begin_layout Enumerate
12590 It is possible to write multiple articles in the same LaTeX file
12594 \begin_layout Plain Layout
12595 I can't imagine any good reason to do this.
12601 Each article must be included in the environment
12602 \begin_inset Quotes eld
12606 \begin_inset Quotes erd
12610 Unfortunately, this environment cannot be omitted, even if you write just
12612 Therefore, each article starts with the command
12618 and, obviously, ends with the command
12625 Although this can be implemented in LyX, I didn't included it, since it
12626 looks ugly and can confuse the novice user.
12627 Therefore, you need to enter them directly and mark them as LaTeX code
12629 \begin_inset Quotes eld
12633 \begin_inset Quotes erd
12639 \begin_layout Enumerate
12640 Information given at the beginning of the article (i.
12641 \begin_inset space \thinspace{}
12645 \begin_inset space \space{}
12648 title, subtitle, author, institution, running title, running author, abstract
12649 and keywords) must be included in an environment called
12650 \begin_inset Quotes eld
12654 \begin_inset Quotes erd
12658 This is not implemented in LyX, so you must enter title, subtitle etc.
12659 \begin_inset space ~
12662 between two TeX code lines (
12677 \begin_layout Enumerate
12678 According to the user manual, the label of each bibliography item must be
12702 \begin_layout Standard
12707 template takes care of all these
12708 \begin_inset Quotes eld
12712 \begin_inset Quotes erd
12716 If you start a new paper using this template you don't need to do anything
12721 \begin_layout Enumerate
12722 don't delete the TeX code included in the template, and
12725 \begin_layout Enumerate
12726 copy the example bibliography item included in the template and modify it
12727 as necessary to enter new bibliography items.
12730 \begin_layout Section
12734 \begin_layout Standard
12740 \begin_layout Subsection
12744 \begin_layout Standard
12745 The LyX document classes
12747 article (koma-script)
12751 report (koma-script)
12769 correspond to the LaTeX document classes
12786 \begin_inset space ~
12789 of the Koma-Script family.
12790 They are replacements for the standard document classes
12806 , resp., and fit better to European typography conventions in a number of
12810 \begin_layout Itemize
12811 Standard character size is 11pt in
12813 article (koma-script)
12817 report (koma-script)
12825 letter (koma-script)
12830 \begin_layout Itemize
12831 Headings, labels of the description environment, and a number of elements
12834 letter (koma-script)
12836 document class are set in a bold sans serif font.
12840 \begin_layout Plain Layout
12841 There is a big difference between the bold sans serif old cm fonts and new
12842 ec fonts, especially in the appearance of headings.
12843 In comparison, the ec bold sans serif fonts look a bit thin.
12844 Here the LaTeX package
12852 helps to produce the
12853 \begin_inset Quotes eld
12857 \begin_inset Quotes erd
12860 appearance when using the ec fonts.
12865 The numbering of chapter headings is made in the same way as the numbering
12866 of section headings, that is without the extra line
12867 \begin_inset Quotes eld
12870 Chapter\SpecialChar \ldots{}
12872 \begin_inset Quotes erd
12876 In addition, the appearance of the headings can be modified by using a
12877 number of options (in LyX to be entered in the field
12880 \begin_inset space ~
12887 Layout\SpecialChar \menuseparator
12894 \begin_layout Itemize
12895 The main means in the Koma-Script document classes to design the type area
12904 (in LyX to be entered in the extra class options field in the dialog
12906 Document\SpecialChar \menuseparator
12910 They make a clearer modification of page margins possible as do the options
12913 Document\SpecialChar \menuseparator
12920 \begin_layout Itemize
12921 The LaTeX document classes of the Koma-Script family define a number of
12922 additional commands.
12923 Those part of it which makes sense in LyX is implemented in corresponding
12927 \begin_layout Standard
12928 Detailed descriptions of the LaTeX document classes of the Koma-Script family
12929 can be found in the Koma-Script documentation
12940 \begin_layout Subsection
12941 article (koma-script), report (koma-script), and book (koma-script)
12944 \begin_layout Standard
12945 The document classes
12947 article (koma-script)
12951 report (koma-script)
12961 are implemented in the layout files
12974 They contain all the paragraph types of the corresponding standard document
12987 , resp., partly modified, with the exception of the LyX specific
12991 -type, which is replaced by the new
12995 -type having the same functionality.
13000 -Type there is a number of new paragraph types added.
13007 letter (koma-script)
13012 \begin_layout Itemize
13021 : are equivalents to
13029 , resp., additionally inserting an entry in the table of contents.
13038 are not contained in
13040 article (koma-script)
13045 \begin_layout Itemize
13054 : behave exactly as
13062 , resp., additionally clearing running heads.
13067 is not contained in
13069 article (koma-script)
13075 \begin_layout Plain Layout
13088 report (koma-script)
13090 , but since this is identical to
13094 , is has not been implemented in LyX.
13102 \begin_layout Itemize
13107 : generates a heading directly above the following paragraph in the standard
13108 character size without affecting the structure of the document.
13111 \begin_layout Itemize
13120 are special captions which respect the different space settings needed
13121 for captions placed above or below an element (if you follow strict typographic
13122 rules, you might want to place table captions always above the table).
13123 You can also use the class option
13127 , which will switch
13140 You need at least Koma-Script version 2.8q to use this.
13143 \begin_layout Itemize
13148 : can be used to set a bonmot, e.
13149 \begin_inset space \thinspace{}
13153 \begin_inset space \space{}
13156 at the beginning of a chapter.
13157 If you use the optional argument (
13159 Insert\SpecialChar \menuseparator
13161 \begin_inset space ~
13166 ), you can insert the dictum's author there.
13167 Dictum and author are separated by a line.
13168 You need at least Koma-Script version 2.8q to use this.
13173 is not contained in
13175 article (koma-script)
13180 \begin_layout Standard
13181 The following types, together with the standard types
13193 , form the title area of the document.
13194 They must be entered ahead of the first
13195 \begin_inset Quotes eld
13199 \begin_inset Quotes erd
13206 \begin_layout Plain Layout
13207 The corresponding LaTeX commands must appear before the
13218 When such a type is used more than once, the latter usage overwrites the
13219 former one, that means, for every type only the latest usage is valid.
13220 The order of the different types however has, like
13232 , no effect on the appearance of the produced document.
13235 \begin_layout Itemize
13240 : produces a centered paragraph above the ordinary title (
13252 ) for the subject of the document.
13255 \begin_layout Itemize
13260 : produces a centered paragraph below the ordinary title (
13272 ) for the publishers' name.
13275 \begin_layout Itemize
13282 report (koma-script)
13288 produces a centered paragraph on its own page behind the title page, or
13291 article (koma-script)
13293 produces a centered paragraph below the ordinary title (
13309 ) for a dedication.
13312 \begin_layout Itemize
13317 : produces a left aligned paragraph above the ordinary title (
13333 ) for a document`s head.
13336 \begin_layout Itemize
13341 : produces in a double-sided print in
13343 report (koma-script)
13349 a left-aligned paragraph at the top of the title page`s back or has no
13350 effect in a single-sided print or in
13352 article (koma-script)
13357 \begin_layout Itemize
13362 : produces in a double-sided print in
13364 report (koma-script)
13370 a left-aligned paragraph at the bottom of the title page`s back or has
13371 no effect in a single-sided print or in
13373 article (koma-script)
13378 \begin_layout Itemize
13383 : produces a special
13384 \begin_inset Quotes eld
13388 \begin_inset Quotes erd
13391 page ahead of the actual document containing a paragraph without special
13395 \begin_layout Standard
13396 The layout files for the document classes
13398 article (koma-script)
13402 report (koma-script)
13408 do include the file
13413 This is thought of as a place to define your own types.
13418 in your personal layout directory and edit the file!
13421 \begin_layout Subsection
13422 letter (koma-script)
13425 \begin_layout Standard
13429 \begin_layout Plain Layout
13441 \begin_layout Standard
13445 letter (koma-script)
13447 is implemented in the layout file
13452 It contains all the paragraph types of the corresponding standard document
13457 , partly modified, with the exception of the LyX specific types
13469 type, which is replaced by the new
13474 In addition, it contains, in contrast to the standard document class, the
13492 Furthermore, there are a number of new letter specific types.
13495 \begin_layout Standard
13499 \begin_layout Plain Layout
13511 \begin_layout Standard
13512 The appearance of the letter produced by this document class can be controlled
13513 by a number of LaTeX commands, which you can put in the LaTeX preamble.
13517 \begin_layout Plain Layout
13518 For example, the standard appearance of the letter`s heading, consisting
13519 of name and address, is quite self-willed.
13521 \begin_inset Quotes eld
13525 \begin_inset Quotes erd
13528 heading is produced by the following LaTeX commands in the preamble:
13531 \begin_layout LyX-Code
13541 \begin_layout LyX-Code
13557 \begin_layout LyX-Code
13567 \begin_layout LyX-Code
13587 A detailed German description of such LaTeX commands can be found in the
13588 Koma-Script documentation
13593 With it, the letter's author can produce his personal letter layout.
13596 \begin_layout Standard
13605 define the beginning of the letter and must be used in every letter.
13606 To emphasize them in the LyX document class, they are marked with the letter
13616 \begin_inset space ~
13619 in the left margin.
13620 It is possible to write any number of letters in one file.
13625 type produces a new letter using the same addressee and a
13629 type produces a new addressee.
13646 are ordinary paragraph types and can also be used several times in one
13647 and the same letter.
13650 \begin_layout Itemize
13655 : produces a paragraph for the addressee and implicitly defines the beginning
13659 \begin_layout Itemize
13664 : produces a paragraph for the form of address and implicitly produces a
13668 \begin_layout Itemize
13673 : produces a paragraph for a close.
13676 \begin_layout Itemize
13681 : produces a paragraph for a postscript.
13684 \begin_layout Itemize
13689 : produces a paragraph for a distribution list.
13692 \begin_layout Itemize
13697 : produces a paragraph for enclosures.
13700 \begin_layout Standard
13741 are input types provided with a label to enter information, which will
13742 be processed by the document class.
13746 \begin_layout Plain Layout
13747 It could be seen as a matter of inconsequence, that the types
13755 described above are not such input types as well.
13756 Because of the special meaning of those types, however, I have implemented
13757 them as ordinary paragraph types with a one letter mark in the left margin.
13758 Moreover, it would affect my feeling of symmetry, if the
13766 type had such a serious different appearance.
13771 The types must be used ahead of the corresponding
13778 \begin_layout Standard
13779 An implementation of these types in a WYSIWYG fashion does not seem to make
13780 sense, because the real appearance of the produced letter does not only
13781 depend on the usage of the particular type, but also on other factors.
13782 For example, a signature entered in the
13786 type will in the standard behavior appear in the produced letter only,
13787 when in the same letter also a
13792 The entered value of the
13796 type will in the standard behavior not appear in the produced letter at
13798 The possibility to design the letter`s heading freely is already indicated
13799 in a footnote above.
13802 \begin_layout Standard
13803 The input types can also be used as empty paragraphs.
13804 This makes sense e.
13805 \begin_inset space \thinspace{}
13809 \begin_inset space \space{}
13821 type is not used at all, in the standard behavior the value of the
13825 type is used as signature, whereas if an empty
13829 type is used, no signature value is defined.
13832 \begin_layout Standard
13833 By using the input types it is possible to write a letter template, containing
13834 filled input types with your personal dates (name, address, etc.) and empty
13835 input types for other dates you want to enter.
13838 \begin_layout Itemize
13843 : sender's name, in the standard behavior appears as a centered paragraph
13844 in small caps in the letter`s heading.
13847 \begin_layout Itemize
13852 : sender's signature, in the standard behavior appears below the
13861 type is used, the value of the
13865 type appears instead.
13868 \begin_layout Itemize
13873 : sender's address, in the standard behavior appears in a centered paragraph
13874 in the letter`s heading below the sender's name.
13877 \begin_layout Itemize
13882 : sender's telephone number, in the standard behavior only sets the LaTeX
13892 \begin_layout Itemize
13897 : place of the letter`s making.
13900 \begin_layout Itemize
13905 : date of the letter`s making.
13914 , in the standard behavior, produce the place and the date in a right-aligned
13915 line below the addressee's field.
13920 type is used, neither place nor date appear, independent of the value of
13930 type is used, the date of the letter `s production is used.
13933 \begin_layout Itemize
13938 : sender`s back address, in the standard behavior appears above the addressee's
13939 field in a small sans serif font.
13942 \begin_layout Itemize
13947 : special mail information, in the standard behavior appears underlined
13948 above the addressee's field below the back address.
13951 \begin_layout Itemize
13956 : additional information, in the standard behavior appears on right side
13957 below the addressee`s field.
13960 \begin_layout Itemize
13965 : the letter's title, in the standard behavior appears in a big, bold, sans
13966 serif font above the subject.
13969 \begin_layout Itemize
13974 : the letter's subject, in the standard behavior appears in a bold font
13982 \begin_layout Standard
14003 produce a business letter like line above the
14007 line containing the fields
14008 \begin_inset Quotes eld
14012 \begin_inset Quotes erd
14016 \begin_inset Quotes eld
14020 \begin_inset Quotes erd
14024 \begin_inset Quotes eld
14028 \begin_inset Quotes erd
14032 \begin_inset Quotes eld
14036 \begin_inset Quotes erd
14040 \begin_inset Quotes eld
14044 \begin_inset Quotes erd
14048 \begin_inset Quotes eld
14052 \begin_inset Quotes erd
14056 For the date field, the value of the
14062 \begin_inset Quotes eld
14065 business letter types
14066 \begin_inset Quotes erd
14069 is used, the value of the
14073 type however does not appear, but only the LaTeX variable
14080 The ordinary output of place and date in a right-aligned line below the
14081 addressee`s field is suppressed.
14082 The types are implemented as input types provided with a label and must
14083 be used ahead of the corresponding
14090 \begin_layout Itemize
14098 \begin_layout Itemize
14106 \begin_layout Itemize
14114 \begin_layout Itemize
14122 \begin_layout Itemize
14130 \begin_layout Subsection
14131 The new letter class: letter (koma-script v.2)
14134 \begin_layout Standard
14140 \begin_layout Standard
14141 \begin_inset VSpace medskip
14147 \begin_layout Standard
14149 Koma-Script version 2.8 has introduced a new letter class
14153 which supersedes the now unsupported
14158 It has — on the LaTeX side — a completely new interface and is not compatible
14159 with the old class.
14160 Therefore, LyX supports both, though it is recommended you use the new
14164 \begin_layout Standard
14165 This class covers the same functionality as
14167 letter (koma-script),
14170 The basic items are
14174 (receiver's address, same as
14178 in the old layout),
14191 will start a new letter (i.
14192 \begin_inset space \thinspace{}
14196 \begin_inset space \space{}
14199 you can write several letters per document).
14200 New elements are sender's
14216 and the possibility to use a
14222 Insert\SpecialChar \menuseparator
14228 \begin_layout Standard
14229 The biggest improvement is, though, that the letter's layout is configurable
14230 to meet almost any needs.
14231 This can be done via the preamble or with a special style file (Letter
14232 Class Option, extension
14236 ), that will be read in as a class option.
14240 \begin_layout Plain Layout
14241 The KOMA package comes with some default
14246 There is, for instance, a
14250 file that follows german typesetting rules, or a
14254 that provides the default layout of the old
14259 The latter can be loaded with the class option
14268 ayout\SpecialChar \menuseparator
14273 ocument\SpecialChar \menuseparator
14285 template that is included in LyX for examples.
14286 A detailed description is to be found in the Koma-Script documentation
14294 \begin_layout Subsection
14298 \begin_layout Standard
14299 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14303 \begin_layout Itemize
14304 The chapter number of a
14308 type appears on a line of its own above the chapter heading instead of
14309 appearing in the same line ahead of it.
14310 The cause for that is the LyX internal behavior for the labeltype
14314 in the layout file.
14317 \begin_layout Itemize
14318 The headings of the types
14326 are only put in the
14327 \begin_inset Quotes eld
14331 \begin_inset Quotes erd
14334 LaTeX table of contents, but not in the LyX table of contents (
14336 Document\SpecialChar \menuseparator
14338 \begin_inset space ~
14342 \begin_inset space ~
14350 \begin_layout Itemize
14351 The paragraphs in a
14355 document class appear in a skip separation mode, not indented.
14356 This is the standard behavior, no special LaTeX commands are needed for
14360 Document\SpecialChar \menuseparator
14363 dialog the corresponding radio button indicates
14372 value always has the effect that extra LaTeX commands are inserted in the
14373 document to produce the gap, which is not what is wanted in this case.
14376 \begin_layout Section
14377 Latex8 (IEEE Conference Papers)
14380 \begin_layout Standard
14386 \begin_layout Subsection
14390 \begin_layout Standard
14391 Since this class is specifically for writing submissions to IEEE sponsored
14392 conferences I strongly recommend that you get a copy of their Authors Kit.
14397 package and associated bibliography style file is included in the kit.
14398 The Authors Kit is usually sent out by email once your initial submission
14400 There is a lot of useful information in the Authors Kit explaining formatting
14401 restrictions and so on and I will assume you have read this since that
14402 means I don't have to repeat it all here.
14405 \begin_layout Subsection
14409 \begin_layout Standard
14410 [AR\SpecialChar \@.
14414 \begin_layout Subsection
14415 Supported Environments
14418 \begin_layout Itemize
14424 \begin_layout Itemize
14430 \begin_layout Itemize
14436 \begin_layout Itemize
14442 \begin_layout Itemize
14448 \begin_layout Itemize
14454 \begin_layout Itemize
14460 \begin_layout Itemize
14466 \begin_layout Itemize
14472 \begin_layout Subsection
14473 Differences Between Screen and Paper
14476 \begin_layout Standard
14477 There are slight differences in appearance mainly with the presentation
14478 of section counters.
14479 On screen the trailing period of the section counter is missing but it
14480 will appear in the output so don't let this worry you.
14483 \begin_layout Section
14487 \begin_layout Standard
14493 \begin_layout Subsection
14497 \begin_layout Standard
14498 Memoir is a very powerful and constantly evolving class.
14499 It has been designed with regard to fictional and non-fictional literature.
14500 Its aim is to let the user have maximum control over the typesetting of
14502 Memoir is based on the standard book class, but it can also emulate the
14503 article class (see below).
14506 \begin_layout Standard
14507 Peter Wilson, the developer of Memoir, is known as the author of lots of
14508 useful packages in the LaTeX world.
14509 Most of them have been merged with Memoir.
14510 Therefore, it is much easier to layout the table of contents, appendices,
14511 chapter designs and such.
14512 LyX, though, does not support all of these goodies natively.
14513 Some of them might be added to forthcoming releases
14517 \begin_layout Plain Layout
14518 You are invited to send suggestions to
14519 \begin_inset Flex URL
14522 \begin_layout Plain Layout
14524 lyx-devel@lists.lyx.org
14534 , lots will probably never, due to the limitations of LyX's framework.
14535 Of course you can still use all features with the help of some native LaTeX
14540 \begin_layout Plain Layout
14545 \begin_layout Plain Layout
14555 \begin_inset space ~
14559 \begin_inset CommandInset ref
14561 reference "sec:Inserting-TeX-Code"
14571 In this section, we can only list those features which are natively supported
14573 For detailed descriptions (and for the rest of features) we recommend you
14574 have a look at the detailed manual of the Memoir class
14578 \begin_layout Plain Layout
14583 \begin_layout Plain Layout
14593 \begin_inset Flex URL
14596 \begin_layout Plain Layout
14598 CTAN:/macros/latex/memoir/memman.pdf
14608 , which is not only a user guide for the class, but also both a comprehensive
14609 description on good typesetting and a superb example for good typesetting
14613 \begin_layout Subsection
14614 Basic features and restrictions
14617 \begin_layout Standard
14618 Memoir supports basically all features of the standard book classes.
14619 There are, however, some differences, as follows:
14622 \begin_layout Description
14624 \begin_inset space ~
14627 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14630 \begin_layout Description
14632 \begin_inset space ~
14635 style: The fancy page style is not supported, due to a command clash between
14636 Memoir and the fancyhdr package (they both define a command with the same
14637 name, which confuses LaTeX).
14638 Instead, Memoir comes with a number of its own page styles (see
14640 Layout\SpecialChar \menuseparator
14641 Document\SpecialChar \menuseparator
14643 \begin_inset space ~
14649 If you want to use these for the chapter pages, you have to use the command
14656 in the main text or in preamble (e.
14657 \begin_inset space \thinspace{}
14661 \begin_inset space \space{}
14668 chapterstyle{companion}
14673 \begin_layout Description
14674 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14675 optional argument in the standard classes.
14676 With this, you can specify an alternative version of the title for the
14677 table of contents and the headers (for instance, if the title is too long).
14678 In LyX, you can do this via
14680 Insert\SpecialChar \menuseparator
14682 \begin_inset space ~
14687 at the beginning of a chapter/section.
14688 Memoir features a second optional argument and thus separates the table
14689 of contents from the header.
14690 You can define three variants of a title with this: one for the main text,
14691 one for the table of contents, and one for the headers.
14692 Simply insert two optional arguments if you need this feature, the first
14693 one containing the short title for the Table of Contents, the second one
14694 containing an alternative short title for the headers.
14697 \begin_layout Description
14698 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14699 of contents, the list of figures and the list of table start a new page
14701 Memoir does not follow this route.
14702 You have to insert a page break yourself, if you want to have one.
14705 \begin_layout Description
14706 Titlepage: For some unknown reason, Memoir uses pagination on the title
14707 page (in the standard classes, title pages are
14708 \begin_inset Quotes eld
14712 \begin_inset Quotes erd
14716 \begin_inset space \thinspace{}
14720 \begin_inset space \space{}
14724 If you want an empty title page, type
14728 aliaspagestyle{title}{empty}
14733 \begin_layout Description
14734 Article: With the class option
14740 Layout\SpecialChar \menuseparator
14741 Document\SpecialChar \menuseparator
14743 \begin_inset space ~
14748 ), you can emulate article style.
14749 That is, counters (footnotes, figures, tables etc.) will not be reset on
14750 new chapters, chapters don't start a new page (but are—in contrary to
14751 \begin_inset Quotes eld
14755 \begin_inset Quotes erd
14758 article classes—still allowed), parts, though, use their own page, as in
14762 \begin_layout Description
14763 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14764 font commands, which have been used in the old LaTeX version 2.09 (e.
14765 \begin_inset space \thinspace{}
14769 \begin_inset space \space{}
14785 It produces an error and stops LaTeX whenever such a command appears.
14790 reallows the commands and spits out warnings instead (which does at least
14792 Since a lot of packages and particularly BibTeX style files are still using
14793 those commands, we have decided to use this option by default.
14796 \begin_layout Subsection
14800 \begin_layout Standard
14801 We will only describe the features supported by LyX (which is not much currently
14803 Please consult the Memoir manual
14807 \begin_layout Plain Layout
14812 \begin_layout Plain Layout
14822 \begin_inset Flex URL
14825 \begin_layout Plain Layout
14827 CTAN:/macros/latex/memoir/memman.pdf
14840 \begin_layout Description
14841 Abstract: You may wonder why an abstract is an extra feature.
14842 Well, it is in book class.
14843 Usually books don't have abstracts.
14844 Memoir, however, has.
14845 You can use it wherever and how often you like.
14848 \begin_layout Description
14849 Chapterprecis: You may know this older typesetting style: The contents of
14850 a chapter are summarized below the title and also in the table of contents
14852 \begin_inset space \thinspace{}
14856 \begin_inset space \space{}
14861 Our hero arrives in Troia; he loses some friends; he finds others
14864 Chapterprecis does exactly this.
14865 It is therefore only sensible below a chapter.
14868 \begin_layout Description
14869 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14870 The epigraph environment provides an elegant way of typesetting such a
14872 The motto itself (text) and its author (source) are divided by a short
14874 Unfortunately, we have to fool LyX a bit here again, since the environment
14875 needs two arguments (text and source).
14876 In this case, we have to use curly brackets (in TeX mode) between the two
14887 <author of the slogan>.
14890 \begin_layout Description
14891 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14892 complex figurative poems).
14893 LyX can only support a few of them.
14894 One is poemtitle, which is a centered title for poems, which will also
14895 be added to the table of contents (verse is the standard environment for
14897 Memoir has some enhanced versions of verse, but you need to use TeX code,
14898 because they have to be nested inside regular verse environments, which
14899 is not possible with LyX).
14902 \begin_layout Description
14903 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14906 \begin_layout Section
14907 Article (mwart), book (mwbk) and report (mwrep)
14908 \begin_inset Argument
14911 \begin_layout Plain Layout
14924 \begin_layout Standard
14930 \begin_layout Standard
14931 The LyX document classes
14947 correspond to the LaTeX document classes
14960 They are replacements for the standard document classes
14972 , resp., and fit better to Polish typography conventions in a number of points.
14976 \begin_layout Standard
14980 \begin_layout Itemize
14981 Unnumbered titles (with star, e.
14982 \begin_inset space \thinspace{}
14986 \begin_inset space \space{}
14993 ) are added into table of contents,
14996 \begin_layout Itemize
14997 Additional page styles:
15001 \begin_layout Description
15002 uheadings header with separated lines,
15005 \begin_layout Description
15006 myheadings custom header, contents headers via commands:
15021 \begin_layout Description
15022 myuheadings custom header with separated lines,
15025 \begin_layout Description
15026 outer page number is placed on outer side of page
15030 \begin_layout Itemize
15035 \begin_layout Description
15036 rmheadings serif titles — default,
15039 \begin_layout Description
15040 sfheadings sansserif titles,
15043 \begin_layout Description
15044 authortitle on title page first placed is author next title — default,
15047 \begin_layout Description
15048 titleauthor on title page first placed is title next author,
15051 \begin_layout Description
15052 withmarginpar reserve place on page for margins.
15056 \begin_layout Section
15060 \begin_layout Standard
15065 provides an alternative to the standard
15070 It provides similar functionality, but you might prefer this layout with
15071 sans serif sections, headings, and more.
15074 \begin_layout Section
15078 \begin_layout Standard
15084 \begin_layout Standard
15085 \begin_inset VSpace bigskip
15091 \begin_layout Standard
15096 \begin_inset space ~
15101 textclass works with the American Physical Sociey's RevTeX 4.0 (the
15102 \begin_inset Formula $\beta$
15105 release of May, 1999) class.
15108 \begin_layout Standard
15113 textclass, which works with RevTeX 3.1.
15114 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15115 That means that it doesn't interact very well with LyX, which requires
15116 LaTeX2e, although it has been kludged to work.
15117 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15121 \begin_inset space ~
15126 textclass should also be pretty easy to use.
15129 \begin_layout Standard
15130 These documents are supposed to be used in
15134 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15135 macros, and assume you'll know what to put in the preamble if necessary.
15138 \begin_layout Subsection
15142 \begin_layout Standard
15143 All you need to do is install RevTeX 4, as described in the package's README
15145 The package can be found at The RevTeX 4 Web Site
15146 \begin_inset Flex URL
15149 \begin_layout Plain Layout
15151 http://publish.aps.org/revtex4/
15157 Install it somewhere that LaTeX can see it.
15158 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15160 \begin_inset space \thinspace{}
15164 \begin_inset space \space{}
15167 not the directory where you installed the class file.) Then, if you reconfigure
15168 LyX, it will find the class file and let you use the RevTeX4 textclass.
15171 \begin_layout Standard
15172 Probably the easiest way to get started is either to import a RevTeX 4 document
15180 \begin_inset space ~
15185 template, found in the templates directory.
15188 \begin_layout Subsection
15192 \begin_layout Standard
15193 Optional arguments to
15200 \begin_inset Quotes eld
15204 \begin_inset Quotes erd
15208 \begin_inset Quotes eld
15212 \begin_inset Quotes erd
15222 \begin_inset space ~
15230 \begin_inset space ~
15236 Remember that in RevTeX, at least one optional argument is required!
15239 \begin_layout Standard
15240 Other preamble matter, like
15247 \begin_inset space ~
15253 \begin_inset space ~
15258 dialog, also as usual.
15261 \begin_layout Subsection
15265 \begin_layout Standard
15266 The layouts basically correspond to the commands in RevTeX4.0.
15267 For example, the Email layout corresponds to
15274 Note that (at least as of RevTeX 4.0 Beta), the
15282 layouts are exactly equivalent, so you shouldn't need to use both.
15286 \begin_layout Plain Layout
15287 In case you're curious, both were included so that
15291 would be able to translate both
15311 \begin_layout Subsection
15315 \begin_layout Standard
15316 There are a couple of important unique aspects of RevTeX 4 which might cause
15317 bugs that will be even more confusing in LyX.
15320 \begin_layout Standard
15338 The LyX equivalent is that there is a separate Thanks layout.
15343 write footnotes in the
15347 layout, or weird things may happen.
15348 See the RevTeX 4 documentation for more details.
15351 \begin_layout Standard
15355 \begin_inset space ~
15363 \begin_inset space ~
15372 layouts must be placed
15380 layout and the corresponding
15397 , the LaTeX won't compile.
15400 \begin_layout Subsection
15404 \begin_layout Standard
15405 The main problem with this layout is that you can't use the optional arguments
15406 to layouts like Email and Title.
15407 (The problem is not unique to this layout; you can't use optional arguments
15408 to the Section layouts either.) This means that after you export that file
15409 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15410 need to edit the LaTeX file with a text editor to add the optional arguments
15412 \begin_inset space \thinspace{}
15416 \begin_inset space \space{}
15419 the running title for the page headers.
15420 Lacking these layouts makes the
15426 (and the equivalent
15432 ) useless, so the corresponding layouts don't exist, and will have to be
15437 \begin_layout Plain Layout
15442 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15443 has not been updated yet to take advantage of it.
15451 \begin_layout Section
15452 Springer Journals (
15459 \begin_layout Standard
15465 \begin_layout Subsection
15469 \begin_layout Standard
15470 These are the layout files for some of the journal formats used by Springer
15471 Verlag and listed on
15472 \begin_inset Flex URL
15475 \begin_layout Plain Layout
15477 http://www.springer.de/author/tex/help-journals.html
15482 , where you should also go to fetch the class files (yes, these are LaTeX2e
15484 It is a modular system: the things common to all journals are implemented
15489 , which journal-specific layout files (such as, e.
15490 \begin_inset space \thinspace{}
15494 \begin_inset space \space{}
15501 for Journal of Geodesy) can include.
15504 \begin_layout Standard
15505 This means that implementing support for any other Springer journal on this
15506 list is as simple as writing your own
15514 file following the outline given in
15522 \begin_layout Standard
15523 It is reasonably well tested only for the Journal of Geodesy.
15532 come with the standard LyX distribution.
15533 Install the relevant class file (downloaded from Springer) in a proper
15534 directory, reconfigure LaTeX (in the teTeX case by running
15538 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15539 and it should work.
15542 \begin_layout Subsection
15546 \begin_layout Standard
15547 A large number of theorem-like styles —
15553 \SpecialChar \ldots{}
15559 \begin_layout Standard
15562 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15563 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15566 See the Springer class file documentation for details.
15569 \begin_layout Subsection
15573 \begin_layout Itemize
15585 \begin_layout Itemize
15588 Probability Theory and Related Fields
15594 — Jean-Marc Lasgouttes
15597 \begin_layout Standard
15598 Add your own, it isn't so hard!
15601 \begin_layout Subsection
15605 \begin_layout Standard
15606 These files are partly based on the older
15610 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15611 file from Springer.
15616 layout, are now defunct.
15617 Jean-Marc Lasgouttes helped out big in making me find my way around the
15618 LyX layout file mechanism.
15621 \begin_layout Subsection
15625 \begin_layout Standard
15627 But probably less than in the old hacked-LaTeX
15634 \begin_layout Standard
15636 \begin_inset space \thinspace{}
15639 g.: does not display the number for theorem-like layouts, just #.
15642 \begin_layout Section
15648 \begin_inset CommandInset label
15657 \begin_layout Standard
15665 \begin_layout Subsection
15669 \begin_layout Standard
15670 This section describes how to use LyX to make slides for overhead projectors.
15671 There are two document classes that can do this: the default slides class
15677 This section documents the former.
15680 \begin_layout Standard
15681 I'm going to say this again, nice and clear, so that there's no misunderstanding
15685 \begin_layout Standard
15686 \begin_inset VSpace bigskip
15692 \begin_layout Standard
15696 This section documents the class
15697 \begin_inset Quotes eld
15705 \begin_inset Quotes erd
15713 \begin_layout Standard
15714 \begin_inset VSpace bigskip
15720 \begin_layout Standard
15721 If you're looking for the documentation for
15722 \begin_inset Quotes eld
15730 \begin_inset Quotes erd
15733 , check out section
15734 \begin_inset space ~
15738 \begin_inset CommandInset ref
15740 reference "sec:foiltex"
15750 \begin_inset Quotes eld
15758 \begin_inset Quotes erd
15761 ] is actually somewhat better than the default
15769 \begin_layout Plain Layout
15770 \SpecialChar \ldots{}
15771 or so I've been told repeatedly by its advocates.
15772 Having never used it, I have no idea if this claim is true or not.
15777 which this section documents.
15780 \begin_layout Standard
15781 This class is the LaTeX2e improvement of the old
15786 Every LaTeX2e distribution includes this class [which I'll just refer to
15788 \begin_inset Quotes eld
15796 \begin_inset Quotes erd
15799 from now on], so you're bound to have it.
15800 As I noted earlier, there are other classes, such as
15804 , which also produce slides for overhead projectors and do a better job
15806 However, there are some things which
15810 can do which the others can't, such as generate overlays.
15811 Read on to learn more!
15814 \begin_layout Subsection
15816 \begin_inset CommandInset label
15818 name "sec:slidesetup"
15825 \begin_layout Standard
15826 Obviously, to use this document class, you need to select
15827 \begin_inset Quotes eld
15835 \begin_inset Quotes erd
15838 from the class list in the
15840 Document\SpecialChar \menuseparator
15844 There are some other special things you should know about this class:
15847 \begin_layout Itemize
15848 Don't bother changing the options
15853 They're not supported by the
15860 \begin_layout Itemize
15864 \begin_inset space ~
15869 behaves a bit differently for this class.
15870 The possible choices and what they do are as follows:
15874 \begin_layout Description
15879 The final output contains page numbers in the lower right corner.
15882 \begin_layout Description
15891 , but also prints out any time markers you've put in.
15892 This is the default.
15895 \begin_layout Description
15900 The final output contains no page numbers, time markers, or alignment markers.
15904 \begin_layout Itemize
15909 class has an extra option:
15915 \begin_inset Quotes eld
15923 \begin_inset Quotes erd
15926 in the extra class options.
15930 \begin_layout Standard
15931 Using this options allows you to add time markers to
15937 \begin_inset space ~
15941 \begin_inset CommandInset ref
15943 reference "sec:slideNote"
15951 \begin_layout Standard
15952 You can also use the template file
15953 \begin_inset Quotes eld
15961 \begin_inset Quotes erd
15964 to automatically set up a document to use the
15970 File\SpecialChar \menuseparator
15972 \begin_inset space ~
15976 \begin_inset space ~
15981 to open your new document].
15982 The template file also contains some examples of the special paragraph
15983 environments used by this class.
15984 I'll describe those next.
15987 \begin_layout Subsection
15988 Paragraph Environments
15991 \begin_layout Subsubsection
15992 Supported Environments
15995 \begin_layout Standard
15996 The first thing you'll notice when you start up a new
16000 document is the font size and type: it's the equivalent of the size
16001 \begin_inset Quotes eld
16009 \begin_inset Quotes erd
16015 \begin_inset space ~
16021 This is also what's used in the output.
16023 \begin_inset Quotes eld
16027 \begin_inset Quotes erd
16030 to remind you that this is a slide.
16031 Your final slides will use a larger font; ergo, you'll have less space.
16032 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16035 \begin_layout Standard
16036 The next thing that becomes obvious is the changes to the paragraph environment
16037 pull-down box [at the far-left end of the toolbar].
16038 Most of the paragraph environments you're used to seeing are missing.
16039 There are also five new ones.
16044 class itself only supports certain paragraph environments:
16047 \begin_layout Itemize
16053 \begin_layout Itemize
16059 \begin_layout Itemize
16065 \begin_layout Itemize
16071 \begin_layout Itemize
16077 \begin_layout Itemize
16083 \begin_layout Itemize
16089 \begin_layout Itemize
16095 \begin_layout Itemize
16101 \begin_layout Itemize
16107 \begin_layout Itemize
16113 \begin_layout Standard
16114 All of the other standard environments, including the section-heading environmen
16115 ts, aren't used in the
16122 \begin_layout Standard
16123 On the other hand, you'll notice the following new environments:
16126 \begin_layout Itemize
16132 \begin_layout Itemize
16138 \begin_layout Itemize
16144 \begin_layout Itemize
16150 \begin_layout Itemize
16156 \begin_layout Standard
16157 These five are kind of quirky, due to a
16158 \begin_inset Quotes eld
16162 \begin_inset Quotes erd
16166 You see, LyX doesn't permit you to nest any other paragraph environment
16167 into an empty environment.
16168 Now, that's fine and dandy, but it means that you wouldn't be able to start
16169 a slide with anything except plain text.
16170 To deal with this, I've performed a little
16171 \begin_inset Quotes eld
16175 \begin_inset Quotes erd
16181 \begin_layout Subsubsection
16182 Quirks of the New Environments
16183 \begin_inset CommandInset label
16185 name "sec:slideQuirk"
16192 \begin_layout Standard
16193 All five of the new paragraph environments are somewhat quirky due to inherent
16194 limitiations in the current version of LyX.
16195 As I just mentioned, LyX forbids environments that begin with another environme
16197 To get around this, the
16201 environment isn't a paragraph environment as described in the
16209 \begin_layout Standard
16210 You should consider
16223 \begin_inset Quotes eld
16226 pseudo-environments.
16227 \begin_inset Quotes erd
16230 They look like a section heading or a
16231 \begin_inset Quotes eld
16239 \begin_inset Quotes erd
16242 but really begin a [and, if necessary, end the previous] paragraph environment.
16252 \begin_inset Quotes eld
16256 \begin_inset Quotes erd
16259 These two perform some action.
16262 \begin_layout Standard
16263 A common feature of all five environments,
16283 , is a rather long-ish label.
16284 The text following this label — ordinarily the contents of the paragraph
16285 environment — is utterly irrelevant for
16306 LyX completely ignores it.
16307 In fact, you can leave these five environments completely empty.
16311 \begin_layout Standard
16316 to put any text after the rather long-ish label, you might want to.
16317 This could be a short description of the contents of the
16322 In that case, enter your descriptive comment and hit
16326 as you normally would.
16329 \begin_layout Standard
16330 If, on the other hand, you don't want to enter any descriptive text, you'll
16331 hit another LyX quirk.
16332 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16333 environment until you put something in the old one.
16337 \begin_layout Itemize
16338 Start entering the text that will
16366 \begin_layout Itemize
16367 Now move to the beginning of that paragraph.
16371 \begin_layout Itemize
16380 \begin_layout Itemize
16381 Finally, change this new, empty paragraph to a
16405 \begin_layout Standard
16406 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16410 \begin_layout Subsection
16411 Making a Presentation with
16424 \begin_layout Subsubsection
16432 \begin_layout Standard
16433 If you're expecting this section to teach you how to actually make a presentatio
16434 n, you'll be sorely disappointed.
16435 Naturally, I'll describe all of the ways the
16439 class can assist you in preparing the materials for a presentation.
16440 Filling in the contents, however, is up to you.
16445 the LyX philosophy.]
16448 \begin_layout Standard
16453 environment [in the manner described in section
16454 \begin_inset space ~
16458 \begin_inset CommandInset ref
16460 reference "sec:slideQuirk"
16464 ] tells LyX to begin a new slide [duh].
16465 The label for this environment/
16466 \begin_inset Quotes erd
16470 \begin_inset Quotes erd
16474 \begin_inset Quotes eld
16478 \begin_inset Quotes erd
16481 in cool blue, followed by the label,
16482 \begin_inset Quotes eld
16486 \begin_inset Quotes erd
16490 Any text or paragraph environments that follow this one go on the new slide.
16494 \begin_layout Standard
16495 Slides are probably the only time you'll need to forcibly end pages in LyX
16496 (this can be specified in the
16501 In fact, you'll want to, once you finish entering the contents of one slide.
16502 If you've entered more text than can physically fit on a slide, the extra
16503 overflows onto a new slide.
16504 I don't recommend doing this, however, since the overflow slide won't have
16505 any page number on it.
16506 Furthermore, it may interfere with any
16510 you've made to accompany the oversized
16517 \begin_layout Standard
16526 environments work the same way as the
16531 They both create an
16532 \begin_inset Quotes eld
16536 \begin_inset Quotes erd
16539 followed by a label [
16540 \begin_inset Quotes eld
16544 \begin_inset Quotes erd
16548 \begin_inset Quotes eld
16552 \begin_inset Quotes erd
16556 The color is a stunning magenta instead of blue, and the
16557 \begin_inset Quotes eld
16561 \begin_inset Quotes erd
16564 will look different, in style and in length.
16565 The label fonts of all three also differ from one another.
16568 \begin_layout Standard
16573 , if the contents of a
16581 exceed the physical size of a slide or sheet of paper, the extra will overflow
16583 Again, you should avoid this.
16584 It defeats the whole purpose of
16595 \begin_layout Subsubsection
16605 \begin_layout Standard
16610 is a slide that sits atop another slide.
16611 Perhaps you wish to discuss a figure on the main
16615 before displaying the text associated with it.
16616 One way to accomplish this is tape a flap of dark paper over the part of
16621 you want to display later.
16622 This method fails, however, if you wish to overlap one graph with another,
16624 You would then have to fumble while speaking to align the two separate,
16629 s to align the two graphs.
16634 environment in both cases makes life much easier.
16637 \begin_layout Standard
16642 receives the page number of its
16643 \begin_inset Quotes eld
16647 \begin_inset Quotes erd
16655 \begin_inset Quotes eld
16663 \begin_inset Quotes erd
16670 \begin_layout Plain Layout
16671 Presumably, mutliple
16676 \begin_inset Quotes eld
16684 \begin_inset Quotes erd
16688 \begin_inset Quotes eld
16696 \begin_inset Quotes erd
16700 \begin_inset Quotes eld
16708 \begin_inset Quotes erd
16712 \begin_inset space ~
16715 appended to the page number of the parent
16725 Clearly, you want the contents of both the
16733 to each fit on a single physical slide! You should probably consider an
16739 \begin_inset Quotes eld
16743 \begin_inset Quotes erd
16755 class provides a visual cue for this: the label at the start of an
16759 is shorter than that at the start of a
16764 Lastly, when you generate printable output, you'll find alignment markers
16765 in all four corners of both the
16769 page and its parent
16774 These will assist you in lining up the two physical slides.
16777 \begin_layout Standard
16778 The major problem in overlaying two slides is aligning the contents of the
16779 two transparencies.
16780 How much space should you leave for that graph on the second slide? Worse
16781 still, what if you want a graph and a sentence on second slide, but there
16782 is text on the main transparency that goes in between them? You could try
16783 and insert vertical space of the right size.
16784 The better way is to use
16795 \begin_layout Standard
16796 As their names imply,
16804 are two command-like paragraph environments that make all subsequent text
16805 invisible and visible, respectively.
16807 \begin_inset space ~
16811 \begin_inset CommandInset ref
16813 reference "sec:slideQuirk"
16817 that you don't place anything
16821 these two environments, however.
16826 , it inserts a centered, sky-blue label into the page reading
16827 \begin_inset Quotes eld
16830 <Invisible Text Follows>
16831 \begin_inset Quotes erd
16835 For paragraphs following this label, the parts of the
16843 ; it doesn't matter which] where they would be contain instead blank space.
16847 \begin_layout Standard
16852 , the corresponding centered label is
16853 \begin_inset Quotes eld
16856 <Visible Text Follows>
16857 \begin_inset Quotes erd
16861 Paragraphs following this label behave normally.
16862 Note that the beginning of a new
16874 automatically shuts off an
16879 It's therefore not necessary to use
16890 \begin_layout Standard
16891 By now, it should be obvious how to create overlay transparencies using
16892 the proper combination of
16911 \begin_layout Enumerate
16916 , including everything that will appear on it, whether on the main slide
16924 \begin_layout Enumerate
16925 Before each figure or paragraph that will appear only on the
16934 If necessary, insert a
16938 environment after the
16945 \begin_layout Enumerate
16950 immediately following the
16957 \begin_layout Enumerate
16958 Copy the contents of this
16969 \begin_layout Enumerate
16974 , change all of the
16985 \begin_layout Standard
16987 You've just made an
16994 \begin_layout Standard
16995 There's one problem with the way I've designed the LyX
16999 class: you can't make text in the middle of a paragraph invisible, nor
17000 make text in the middle of an invisible paragraph visible again.
17001 To accomplish this feat, you'll need to use some inlined LaTeX codes.
17005 \begin_layout Plain Layout
17006 The commands of interest are:
17009 \begin_layout Itemize
17014 invisible \SpecialChar \ldots{}
17018 \begin_layout Itemize
17023 visible \SpecialChar \ldots{}
17027 \begin_layout Plain Layout
17028 \SpecialChar \ldots{}
17029 and need to be marked as TeX.
17031 \begin_inset Quotes eld
17035 \begin_inset Quotes erd
17038 you wish to change goes in between the brackets [and after the
17051 If you don't know how to mark text as TeX, see the appropriate section
17064 \begin_layout Subsubsection
17074 \begin_inset CommandInset label
17076 name "sec:slideNote"
17083 \begin_layout Standard
17092 is associated with a
17093 \begin_inset Quotes eld
17097 \begin_inset Quotes erd
17109 class provides visual cues.
17114 is shorter than that of a
17118 [yet longer than that of an
17122 ] and, like the label of an
17126 is shockingly magenta.
17127 Additionally, the printed
17131 has the page number of its
17132 \begin_inset Quotes eld
17136 \begin_inset Quotes erd
17144 \begin_inset Quotes eld
17152 \begin_inset Quotes erd
17156 \begin_inset Quotes eld
17164 \begin_inset Quotes erd
17168 \begin_inset Quotes eld
17176 \begin_inset Quotes erd
17180 You can have multiple
17184 s associated with a single
17196 , you'll probably want to break up long
17200 s so that they fit on a single sheet of paper.
17203 \begin_layout Standard
17208 is obvious: it contains anything additional you might want to say about
17214 It could also be used as a sheet of reminders for a particular
17219 In the case of the latter, you might want to make use of time markers.
17225 \begin_inset Quotes eld
17229 \begin_inset Quotes erd
17232 support for time markers, a
17237 So, you'll have to resort to using the LaTeX codes.
17240 \begin_layout Standard
17241 To use time markers, you'll need to specify the extra class option
17242 \begin_inset Quotes eld
17250 \begin_inset Quotes erd
17254 \begin_inset space ~
17258 \begin_inset CommandInset ref
17260 reference "sec:slidesetup"
17265 This option turns on timing marks, which will appear in the lower-left-hand
17271 To set what appears in the time marker, you use the LaTeX commands
17272 \begin_inset Quotes eld
17282 \begin_inset Quotes erd
17286 \begin_inset Quotes eld
17296 \begin_inset Quotes erd
17300 The arguments of both commands are time measured in seconds.
17302 \begin_inset Quotes eld
17312 \begin_inset Quotes erd
17315 sets the time marker to a given time.
17317 \begin_inset Quotes eld
17327 \begin_inset Quotes erd
17330 increments the time marker by the specified amount.
17331 Using time markers and
17335 s in this fashion, you can remind yourself how much time to spend on a particula
17343 \begin_layout Standard
17344 There's one last feature to describe.
17345 Clearly, you'd like to print out all of your
17353 s on transparencies while printing all of your
17370 with which it is associated.
17371 What's a person to do?
17374 \begin_layout Standard
17375 Luckily, there are two LaTeX commands that allow you to select what to print
17377 Both must be placed into the preamble of your document.
17379 \begin_inset Quotes eld
17391 \begin_inset Quotes erd
17394 will cause the output to contain only the
17403 Correspondingly, the command
17404 \begin_inset Quotes eld
17416 \begin_inset Quotes erd
17419 prevents the output of anything but
17424 I'd advise placing both commands in the preamble and initially comment
17426 You can then preview your entire presentation as you write.
17427 When you're done writing, you can then uncomment one of the two to select
17428 what you want to print.
17429 I like to uncomment
17430 \begin_inset Quotes eld
17442 \begin_inset Quotes erd
17445 , print to a file with
17446 \begin_inset Quotes eld
17454 \begin_inset Quotes erd
17457 in its name, comment it back out, then uncomment
17458 \begin_inset Quotes eld
17470 \begin_inset Quotes erd
17474 \begin_inset Quotes eld
17482 \begin_inset Quotes erd
17486 I can then send either file to a printer, loading transparencies or plain
17487 paper as appropriate.
17490 \begin_layout Standard
17491 You can also provide other arguments to the
17492 \begin_inset Quotes eld
17502 \begin_inset Quotes erd
17506 \begin_inset Quotes eld
17516 \begin_inset Quotes erd
17520 See a good LaTeX book for details.
17523 \begin_layout Subsection
17528 Class Template File
17531 \begin_layout Standard
17532 I have also provided a template file,
17533 \begin_inset Quotes eld
17541 \begin_inset Quotes erd
17549 To use it, begin your new presentation with
17554 ile\SpecialChar \menuseparator
17556 \begin_inset space ~
17560 \begin_inset space ~
17570 Your new LyX presentation file will contain an example
17591 additionally contain an example of the use of
17600 Lastly, the preamble will contain:
17603 \begin_layout LyX-Code
17604 % Uncomment to print out only slides and overlays
17607 \begin_layout LyX-Code
17611 \begin_layout LyX-Code
17617 \begin_inset Newline newline
17623 \begin_layout LyX-Code
17624 % Uncomment to print out only notes
17627 \begin_layout LyX-Code
17631 \begin_layout LyX-Code
17639 \begin_layout Standard
17640 One final thing: I created this class to support the LaTeX2e
17641 \begin_inset Quotes eld
17649 \begin_inset Quotes erd
17652 class, one of the built-in LaTeX2e classes.
17653 Neither I nor the rest of the LyX Team endorse or oppose the use of this
17654 built-in slide class.
17655 It's here if you want it or need it.
17656 There exist other LaTeX2e classes for creating presentations, such as the
17662 \begin_inset space ~
17666 \begin_inset CommandInset ref
17668 reference "sec:foiltex"
17673 \begin_inset Quotes eld
17681 \begin_inset Quotes erd
17684 package [present on some TeX distributions].
17685 The latter is not yet supported under LyX.
17689 \begin_layout Plain Layout
17690 Perhaps you can take on the task\SpecialChar \ldots{}
17696 I know nothing about these other classes.
17697 Try them out to see what sort of alternative they provide.
17700 \begin_layout Chapter
17701 LyX Features needing Extra Software
17704 \begin_layout Section
17708 \begin_layout Standard
17714 \begin_layout Subsection
17718 \begin_layout Standard
17727 \begin_layout Plain Layout
17732 is not yet available when you are using the LaTeX distribution MiKTeX.
17737 , you'll find in the
17744 \begin_inset space ~
17755 \begin_inset CommandInset href
17757 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17764 \begin_layout Standard
17769 package is a program that was written by
17770 \begin_inset Flex Noun
17773 \begin_layout Plain Layout
17775 \begin_inset space ~
17783 in frustration because some constructs in LaTeX are sometimes non-intuitive,
17784 and easy to forget.
17785 The program runs over your LaTeX file, checks the integrity of the file,
17786 and flags some common errors.
17787 In other technical words, it is
17794 \begin_layout Standard
17795 Well, what is a syntax checker doing in LyX which is supposed to produce
17796 correct LaTeX anyways? The answer is simple: Just as
17800 not only checks the
17804 of C programs, but also does
17808 checks for type-errors,
17812 catches some common
17816 errors, in addition to the syntactical ones.
17821 is capable of detecting several common errors, such as
17824 \begin_layout Itemize
17825 Ellipsis detection:
17826 \begin_inset Newline newline
17829 Use \SpecialChar \ldots{}
17833 \begin_layout Itemize
17834 No space in front of/after parenthesis:
17835 \begin_inset Newline newline
17841 \begin_layout Itemize
17842 Enforcement of normal space after common abbreviations:
17843 \begin_inset Newline newline
17847 \begin_inset space \thinspace{}
17851 \begin_inset space \space{}
17854 is too wide spacing.
17857 \begin_layout Itemize
17858 Enforcement of end-of-sentence space when the last sentence ends with a
17860 \begin_inset Newline newline
17864 And this is wrong spacing.
17867 \begin_layout Itemize
17868 Space in front of labels and similar commands:
17869 \begin_inset Newline newline
17872 The label should stick right up to the text to avoid falling to a wrong
17875 \begin_inset CommandInset label
17885 \begin_layout Plain Layout
17886 This footnote is in danger of falling off to a wrong page
17891 The label is separated too much.
17894 \begin_layout Itemize
17895 Space in front of references, instead of hard spaces:
17896 \begin_inset Newline newline
17899 In you are in bad luck, the text will break right between the referenced
17900 text and reference number, and that's a pity.
17902 \begin_inset CommandInset ref
17904 reference "sec:chktex"
17911 \begin_layout Itemize
17913 \begin_inset Quotes eld
17917 \begin_inset Quotes erd
17921 \begin_inset Formula $\times$
17925 \begin_inset Newline newline
17928 2x2 looks cheap compared to
17929 \begin_inset Formula $2\times2$
17935 \begin_layout Standard
17936 and more \SpecialChar \ldots{}
17937 It is an invaluable tool when you are
17938 \begin_inset Quotes eld
17942 \begin_inset Quotes erd
17945 your document before printing, and you should run it right after the obligatory
17946 spelling check, and before you go fine tuning the typesetting.
17949 \begin_layout Subsection
17953 \begin_layout Standard
17954 If you have the program installed, usage is as simple as choosing
17956 Tools\SpecialChar \menuseparator
17958 \begin_inset space ~
17964 This will make LyX generate a LaTeX file of your document, start
17968 to check it, and then make LyX insert
17969 \begin_inset Quotes eld
17973 \begin_inset Quotes erd
17976 with the warnings from
17980 , if there were any.
17981 The warnings will be placed close to the point of the mistake, and you
17982 can quickly find them by using the
17984 Navigate\SpecialChar \menuseparator
17987 menu item, or the shortcut key
17996 Open the error boxes by clicking on them with the mouse, or use the shortcut
18005 bindings, or the corresponding
18014 Read the warning and correct the mistake, if it is a mistake.
18015 If you have trouble understanding what the warning is about, you can safely
18017 Remember that there is a hidden layer between the document on screen and
18018 the technical details in invoking
18022 , and this gap can make some warnings seem arcane or just right down plain
18026 \begin_layout Standard
18027 This document is an excellent testing bed for the feature, and it should
18028 provide quite a few warnings for you to fiddle with.
18029 Since computers are only so smart, expect most of the warnings to be false
18033 \begin_layout Subsection
18034 How to fine tune it
18037 \begin_layout Standard
18038 Sometimes, you'll find that
18042 makes more noise than suits your mood.
18043 Then you can choose not to use it, wait until your mood changes, or try
18048 to get better along with you.
18049 Another choice in the most desperate situations is to use
18051 View\SpecialChar \menuseparator
18053 \begin_inset space ~
18057 \begin_inset space ~
18061 \begin_inset space ~
18066 , which will get rid of all warnings instantly.
18069 \begin_layout Standard
18078 very configurable and extensible, you shouldn't expect to solve all problems
18084 Since LyX has to generate a somewhat special LaTeX file to be able to match
18085 the line numbers from the
18093 \begin_layout Plain Layout
18094 You can inspect the specific output from
18100 Edit\SpecialChar \menuseparator
18102 \begin_inset space ~
18106 \begin_inset space ~
18120 to the internal document structure, some of the warnings will not seen
18121 to appear correctly.
18122 There are two things you can do about this:
18125 \begin_layout Itemize
18130 invocation command line in
18146 installation configuration file (usually with the file
18151 See below to learn what warnings can be enabled and disabled on the command
18156 \begin_layout Itemize
18157 Export your document as a raw LaTeX file using
18159 File\SpecialChar \menuseparator
18160 Export\SpecialChar \menuseparator
18168 Invoked in this way, it can be a hassle to find the corresponding place
18169 in the document inside LyX, but with a little patience, you should be able
18173 \begin_layout Standard
18174 Here follows the warning messages that can be enabled and disabled in
18183 to disable a warning, and
18187 to enable a warning.
18188 The emphasized entries are disabled by default, because the default is
18191 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18196 \begin_layout Standard
18197 Notice that you should only use the options that enable and disable warnings,
18198 because LyX relies on some of the other command line parameters to be set
18199 in a specific way to have a chance to communicate with
18206 \begin_layout Enumerate
18210 Command terminated with space.
18213 \begin_layout Enumerate
18216 Non-breaking space (
18217 \begin_inset Quotes eld
18225 \begin_inset Quotes erd
18228 ) should have been used.
18231 \begin_layout Enumerate
18235 You should enclose the previous parenthesis with
18236 \begin_inset Quotes eld
18244 \begin_inset Quotes erd
18250 \begin_layout Enumerate
18253 Italic correction (
18254 \begin_inset Quotes eld
18264 \begin_inset Quotes erd
18267 ) found in non-italic buffer.
18270 \begin_layout Enumerate
18273 Italic correction (
18274 \begin_inset Quotes eld
18284 \begin_inset Quotes erd
18287 ) found more than once.
18290 \begin_layout Enumerate
18294 No italic correction (
18295 \begin_inset Quotes eld
18305 \begin_inset Quotes erd
18311 \begin_layout Enumerate
18315 \begin_inset Quotes eld
18323 \begin_inset Quotes erd
18327 \begin_inset Quotes eld
18335 \begin_inset Quotes erd
18341 \begin_layout Enumerate
18344 Wrong length of dash may have been used.
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
18381 \begin_inset Quotes eld
18389 \begin_inset Quotes erd
18395 \begin_layout Enumerate
18399 \begin_inset Quotes eld
18407 \begin_inset Quotes erd
18410 to achieve an ellipsis.
18413 \begin_layout Enumerate
18416 Inter-word spacing (
18417 \begin_inset Quotes eld
18427 \begin_inset Quotes eld
18430 ) should perhaps be used.
18433 \begin_layout Enumerate
18436 Inter-sentence spacing (
18437 \begin_inset Quotes eld
18447 \begin_inset Quotes erd
18450 ) should perhaps be used.
18453 \begin_layout Enumerate
18456 Could not find argument for command.
18459 \begin_layout Enumerate
18463 \begin_inset Quotes eld
18471 \begin_inset Quotes erd
18477 \begin_layout Enumerate
18480 Math mode still on at end of LaTeX file.
18483 \begin_layout Enumerate
18487 \begin_inset Quotes eld
18495 \begin_inset Quotes erd
18498 doesn't match the number of
18499 \begin_inset Quotes eld
18507 \begin_inset Quotes erd
18513 \begin_layout Enumerate
18516 You should use either
18519 \begin_inset Quotes eld
18527 \begin_inset Quotes erd
18532 as an alternative to
18533 \begin_inset Quotes eld
18541 \begin_inset Quotes erd
18547 \begin_layout Enumerate
18554 " (ASCII 39) instead of "
18561 \begin_layout Enumerate
18564 User-specified pattern found.
18567 \begin_layout Enumerate
18570 This command might not be intended.
18573 \begin_layout Enumerate
18580 \begin_layout Enumerate
18598 \begin_layout Enumerate
18601 Delete this space to maintain correct page references.
18604 \begin_layout Enumerate
18608 You might wish to put this between a pair of
18609 \begin_inset Quotes eld
18617 \begin_inset Quotes erd
18623 \begin_layout Enumerate
18626 You ought to remove spaces in front of punctuation.
18629 \begin_layout Enumerate
18632 Could not execute LaTeX command.
18635 \begin_layout Enumerate
18644 in front of small punctuation.
18647 \begin_layout Enumerate
18655 may look prettier here.
18658 \begin_layout Enumerate
18662 Multiple spaces detected in output.
18665 \begin_layout Enumerate
18668 This text may be ignored.
18671 \begin_layout Enumerate
18677 \begin_inset Quotes eld
18682 to begin quotation, not
18689 \begin_layout Enumerate
18696 to end quotation, not
18699 \begin_inset Quotes eld
18707 \begin_layout Enumerate
18713 \begin_layout Enumerate
18716 You should perhaps use
18717 \begin_inset Quotes eld
18725 \begin_inset Quotes erd
18731 \begin_layout Enumerate
18734 You should put a space in front of/after parenthesis.
18737 \begin_layout Enumerate
18740 You should avoid spaces in front of/after parenthesis.
18743 \begin_layout Enumerate
18747 You should not use punctuation in front of/after quotes.
18750 \begin_layout Enumerate
18753 Double space found.
18756 \begin_layout Enumerate
18759 You should put punctuation outside inner/inside display math mode.
18762 \begin_layout Enumerate
18765 You ought to not use primitive TeX in LaTeX code.
18768 \begin_layout Enumerate
18771 You should remove spaces in front of
18772 \begin_inset Quotes eld
18780 \begin_inset Quotes erd
18786 \begin_layout Enumerate
18789 \begin_inset Quotes eld
18797 \begin_inset Quotes erd
18800 is normally not followed by
18801 \begin_inset Quotes eld
18809 \begin_inset Quotes erd
18815 \begin_layout Standard
18816 In later versions of LyX, we hope to provide a more complete interface to
18817 this tool (and it's smaller cousin
18821 ) to exploit the full power of it.
18822 But it's not exactly useless as it is now: go try it on one of your existing
18823 documents of a certain length and be surprised.
18826 \begin_layout Section
18827 Version Control in LyX
18830 \begin_layout Standard
18833 Lars Gullik Bjønnes
18840 \begin_layout Subsection
18844 \begin_layout Standard
18845 A friend of mine wanted to try LyX for a group project.
18846 When he didn't find support for version control or file locking, he dropped
18848 This angered me a bit, so I thought that I should at least make support
18849 for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
18850 This has been done.
18851 LyX now supports some of the most basic RCS/CVS/SVN commands.
18852 If you need something a bit more sophisticated you will have to do that
18853 manually in a terminal.
18856 \begin_layout Standard
18857 Before you begin to use the version control features in LyX, you should
18858 be familiar with RCS/CVS/SVN usage before start using it under LyX.
18859 Also note that CVS support is not as good as subversion support so we advice
18861 Good place to start with Subversion is SVN Book
18865 \begin_layout Plain Layout
18866 \begin_inset CommandInset href
18868 target "http://svnbook.red-bean.com/"
18878 In case of RCS you should read
18879 \begin_inset Quotes eld
18883 \begin_inset Quotes erd
18886 (a man file, read it with
18891 This file describes all the basic features of RCS.
18892 You should especially notice the comment about a RCS directory, and the
18893 notion of a master RCS file (the file ending in
18900 \begin_layout Standard
18901 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18902 package—no guarantees are made for older versions.
18903 Most of the log messages are not currently displayed after operations —
18904 you can check them in Messages pane if unsure.
18907 \begin_layout Standard
18908 For introducing your own external commands consult vc-command in the manual
18912 \begin_layout Subsection
18913 RCS commands in LyX
18916 \begin_layout Standard
18917 The following sections describe the RCS commands supported by LyX.
18918 You can find them in the
18920 File\SpecialChar \menuseparator
18922 \begin_inset space ~
18928 LyX was tested against RCS 5.7.
18931 \begin_layout Subsubsection
18937 \begin_layout Standard
18938 If your document is not under revision control, this is the only item shown
18940 And if it is under revision control, the
18944 item is not visible.
18948 \begin_layout Standard
18949 This command registers your document with RCS (unless you are under the
18950 directory managed by CVS)\SpecialChar \@.
18951 You are asked interactively to supply an initial
18952 description of the document.
18953 The document is now set in Read-Only mode and you have to
18956 \begin_inset space ~
18960 \begin_inset space ~
18964 \begin_inset space ~
18969 , before making any changes to it.
18970 A document under revision control has a
18971 \begin_inset Quotes eld
18974 [RCS:<version> <locker>]
18975 \begin_inset Quotes erd
18978 item tagged to the filename in the minibuffer.
18981 \begin_layout Standard
18982 RCS command that is run:
18984 ci -q -u -i -t-"<initial description>" <file-name>
18987 \begin_layout Standard
18992 to understand the switches.
18996 \begin_layout Subsubsection
19002 \begin_layout Standard
19003 When you are finished editing a file, you check in your changes.
19004 When you do this, you are asked for a description of the changes.
19005 This is stored in the history log.
19006 The version number is bumped, your changes are applied to the master RCS
19007 file, the document is unlocked and set to Read-Only mode.
19011 \begin_layout Standard
19014 ci -q -u -m"<description>" <file-name>
19017 \begin_layout Subsubsection
19023 \begin_layout Standard
19024 By doing this you lock the document so that only you can edit it.
19025 This will also make the document Read-Write only for you.
19026 You will usually continue editing for a while and when you are finished
19027 you check in your changes.
19028 The status line is changed to reflect that you have locked the file.
19032 \begin_layout Standard
19035 co -q -l <file-name>
19038 \begin_layout Subsubsection
19041 Revert To Repository Version
19044 \begin_layout Standard
19045 This will discard all changes made to the document since the last check
19047 You get a warning before changes are discarded.
19050 \begin_layout Standard
19053 co -f -u<version> <file-name>
19056 \begin_layout Subsubsection
19062 \begin_layout Standard
19063 This makes as if the last check in never happened.
19064 No changes are made to the document loaded into LyX, but the last version
19065 is removed from the master RCS file.
19069 \begin_layout Standard
19072 rcs -o<version> <file-name>
19075 \begin_layout Subsubsection
19081 \begin_layout Standard
19082 This shows the complete history of the RCS document.
19087 is shown in a browser.
19095 \begin_layout Subsubsection
19099 \begin_layout Standard
19100 LyX supports RCS version number information (only), see
19101 \begin_inset CommandInset ref
19103 reference "sub:VCS-Revision-Information"
19110 \begin_layout Subsection
19111 CVS commands in LyX
19114 \begin_layout Standard
19115 A subset of CVS operations is supported by LyX.
19116 You can find the commands in the
19118 File\SpecialChar \menuseparator
19120 \begin_inset space ~
19126 The version control system SVN is more powerful, so please use it instead
19127 of CVS if possible.
19130 \begin_layout Subsubsection
19136 \begin_layout Standard
19137 If you start from scratch with CVS you have to create your repository and
19138 checkout the working copy with external tools.
19139 If you're using a client-server setup you may need to login before doing
19140 the first repository checkout.
19143 \begin_layout Standard
19144 If your documents are under revision control and others are using the same
19145 repository problems arise when different changes to the same document at
19146 the same location happen.
19147 Standard CVS repositories doesn't operate with a file locking mechanism.
19148 This may be surprising, but conflicts only occur if people disagree on
19149 the proper content of the same part of a document.
19150 So, if co-workers are used to communicate regularly, these conflicts occur
19152 If they don't communicate they have a fundamental problem anyway.
19153 Nevertheless some people like to work with so called
19154 \begin_inset Quotes eld
19158 \begin_inset Quotes erd
19162 If they do so the working copy of all files is readonly when checked out
19163 first and the user starts editing after using a special command to make
19164 the working copy writable.
19165 When the changes are checked in the working copy returns to readonly state.
19166 With LyX one has to edit the
19167 \begin_inset Flex Code
19170 \begin_layout Plain Layout
19176 file and add the line
19177 \begin_inset Flex Code
19180 \begin_layout Plain Layout
19186 to work with reserved checkouts.
19187 The benefit is the possibility to see who is using a writable copy of some
19189 It's not guaranteed only one user makes a copy writable.
19192 \begin_layout Standard
19193 LyX tries to guess if you're using reserved or non-reserved checkouts.
19194 If your working copy is readonly or it is writable and an additional copy
19195 of your document exists in the CVS/Base sub-directory a reserved otherwise
19196 a non-reserved checkout is assumed.
19197 When a reserved checkout is detected you have to use
19198 \begin_inset Flex MenuItem
19201 \begin_layout Plain Layout
19207 to make your working copy writable if it's readonly.
19209 \begin_inset Flex MenuItem
19212 \begin_layout Plain Layout
19218 operation is possible and that makes your working copy readonly again after
19219 transferring your changes to the repository.
19222 \begin_layout Standard
19223 More information about CVS can be found here
19224 \begin_inset Flex URL
19227 \begin_layout Plain Layout
19229 http://www.nongnu.org/cvs
19235 \begin_inset Flex URL
19238 \begin_layout Plain Layout
19240 http://ximbiot.com/cvs
19248 \begin_layout Standard
19253 to understand the sub-commands and the switches mentioned below.
19256 \begin_layout Subsubsection
19262 \begin_layout Standard
19263 If your document is not under revision control, this is the only item shown
19265 And if it is under revision control, the
19272 item is not visible.
19276 \begin_layout Standard
19277 This command registers in CVS your document
19280 \begin_inset Flex Strong
19283 \begin_layout Plain Layout
19293 in case you have already the documents directory under CVS control (in
19299 This means you have to create or checkout the archive by yourself using
19301 (In case you forget that step LyX registers the document with RCS.)
19304 \begin_layout Standard
19305 Then you are asked interactively to supply an initial description of the
19307 Don't forget that registered file is not yet checked in.
19310 \begin_layout Standard
19311 CVS command that is run:
19313 cvs -q add -m"<entered message>" "<file-name>"
19316 \begin_layout Standard
19321 above and for all other CVS commands is an abbreviation for
19322 \begin_inset Quotes eld
19325 change the current working directory to file location and use the file name
19326 without path component as argument
19327 \begin_inset Quotes erd
19333 \begin_layout Subsubsection
19339 \begin_layout Standard
19340 When you are finished editing a file, you commit your changes.
19341 When you do this and you had changed the document, you are asked for a
19342 description of the changes.
19343 After that changes are written to the repository.
19344 In case you didn't change the document and a reserved checkout is detected
19345 the reservation made on
19346 \begin_inset Flex MenuItem
19349 \begin_layout Plain Layout
19358 \begin_layout Labeling
19359 \labelwidthstring 00.00.0000
19361 \begin_inset space ~
19365 \begin_inset space ~
19369 \begin_inset Newline newline
19373 \begin_inset Flex Code
19376 \begin_layout Plain Layout
19379 -q commit -m"<description>" "<file-name>"
19385 \begin_inset Newline newline
19389 \begin_inset Flex Code
19392 \begin_layout Plain Layout
19403 \begin_layout Subsubsection
19409 \begin_layout Standard
19410 When you are sharing a repository with others, you may have to incorporate
19411 their changes into your working copy.
19414 \begin_layout Standard
19417 cvs -q update "<file-name>"
19420 \begin_layout Standard
19421 If a readonly checkout is detected the working copy is made writable and
19425 \begin_layout Standard
19428 cvs -q edit "<file-name>"
19431 \begin_layout Subsubsection
19434 Revert To Repository Version
19437 \begin_layout Standard
19438 This will discard all changes made to the document since the last check
19440 You get a warning before changes are discarded.
19441 Firstly the file is deleted, secondly CVS update command is run.
19444 \begin_layout Standard
19447 cvs -q update "<file-name>"
19450 \begin_layout Standard
19451 If a reserved checkout is detected and the working copy has no changes only
19452 the reservation is undone.
19455 \begin_layout Standard
19458 cvs -q unedit "<file-name>"
19461 \begin_layout Subsubsection
19462 Update of the local directory checkout from repository
19465 \begin_layout Standard
19466 Once your documents gets more complex, containing sub-documents and pictures,
19468 \begin_inset Flex Code
19471 \begin_layout Plain Layout
19477 files and so on using version control becomes more complicated.
19478 LyX supports updating the whole tree in which resides the document.
19479 This become especially useful once you cooperate with people which neither
19480 have detailed knowledge about CVS usage nor they have ambition to commit
19481 additional material to the repository.
19482 You have to organize the files structure so that all external files are
19483 in the same directory or subdirectories of the document.
19484 It's good practice anyway to store multipart documents in an extra directory.
19487 \begin_layout Standard
19489 \begin_inset Flex Code
19492 \begin_layout Plain Layout
19493 Update local directory from repository
19498 command updates the whole directory.
19499 If local changes are detected user is warned before update starts.
19500 In case of merge conflicts both versions of the conflicting document parts
19501 are placed in the final document.
19502 You have to review and correct the result of the merge.
19503 You'll find the conflicts enclosed in pairs of
19504 \begin_inset Flex Code
19507 \begin_layout Plain Layout
19514 \begin_inset Flex Code
19517 \begin_layout Plain Layout
19524 \begin_inset Flex Code
19527 \begin_layout Plain Layout
19534 The first part is your version as before the update operation with the
19535 document name prepended.
19536 The second one is the repository version with the version number after
19538 \begin_inset Flex Code
19541 \begin_layout Plain Layout
19550 \begin_layout Labeling
19551 \labelwidthstring 00.00.0000
19553 \begin_inset space ~
19557 \begin_inset space ~
19561 \begin_inset Newline newline
19565 \begin_inset Flex Code
19568 \begin_layout Plain Layout
19576 (Ask if changes are detected.)
19577 \begin_inset Newline newline
19581 \begin_inset Flex Code
19584 \begin_layout Plain Layout
19585 cd $path; cvs -q update
19595 \begin_layout Standard
19597 \begin_inset Flex Code
19600 \begin_layout Plain Layout
19606 stands for the path to the document.
19609 \begin_layout Subsubsection
19615 \begin_layout Standard
19616 This shows the complete history of the CVS document.
19619 cvs log "<file-name>"
19621 is shown in a browser.
19624 \begin_layout Subsection
19625 SVN commands in LyX
19628 \begin_layout Standard
19629 SVN is now partially supported by LyX.
19630 You can find the commands in the
19632 File\SpecialChar \menuseparator
19634 \begin_inset space ~
19640 Please note that if you use password protected access to repository via
19641 ssh, you will be asked in terminal window.
19642 LyX was tested against SVN 1.5 and 1.6
19646 \begin_layout Plain Layout
19647 Most of the commands will work with 1.4 too, see
19648 \begin_inset CommandInset ref
19650 reference "sub:SVN-Repo-Update"
19662 \begin_layout Subsubsection
19668 \begin_layout Standard
19669 If your document is not under revision control, this is the only item shown
19671 And if it is under revision control, the
19678 item is not visible.
19682 \begin_layout Standard
19683 This command registers in SVN your document ONLY in case you have already
19684 the documents directory under SVN control (in particular
19689 This means you have to checkout the archive by yourself.
19693 \begin_layout Standard
19694 Then you are asked interactively to supply an initial description of the
19696 Don't forget that registered file is not yet commited.
19699 \begin_layout Standard
19700 SVN command that is run:
19703 \begin_inset Quotes eld
19707 \begin_inset Quotes erd
19713 \begin_layout Standard
19718 to understand the switches.
19722 \begin_layout Subsubsection
19728 \begin_layout Standard
19729 When you are finished editing a file, you commit your changes.
19730 When you do this, you are asked for a description of the changes.
19731 After that changes are commited.
19734 \begin_layout Standard
19739 \begin_layout Plain Layout
19740 In case locking is not enabled.
19742 \begin_inset CommandInset ref
19744 reference "subsec:SVN-File-Locking"
19755 svn commit -q -m"<description>" <file-name>
19758 \begin_layout Subsubsection
19764 \begin_layout Standard
19765 Updates the changes of this file from the repository.
19766 Be sure you understand SVN merging and conflicts resolving before using
19767 this function, because all conflicts has to be resolved manually by you!
19770 \begin_layout Standard
19775 \begin_layout Plain Layout
19783 svn update --non-interactive
19784 \begin_inset Quotes eld
19788 \begin_inset Quotes erd
19794 \begin_layout Subsubsection
19797 Revert To Repository Version
19800 \begin_layout Standard
19801 This will discard all changes made to the document since the last check
19803 You get a warning before changes are discarded.
19807 \begin_layout Standard
19811 \begin_inset Quotes eld
19815 \begin_inset Quotes erd
19821 \begin_layout Subsubsection
19822 \begin_inset CommandInset label
19824 name "sub:SVN-Repo-Update"
19828 Update of the local directory checkout from repository
19832 \begin_layout Plain Layout
19833 Note that this command will work only with subversion
19834 \begin_inset Formula $\geqq1.5$
19845 \begin_layout Standard
19846 All the commands above have one shortcomming - they deal with the current
19848 Once your document contains pictures, includes external
19849 \begin_inset Flex Code
19852 \begin_layout Plain Layout
19858 files and so on administration becomes more complicated.
19859 LyX now supports updating the whole tree in which resides the document
19863 \begin_layout Plain Layout
19864 One need to organize the files structure so that all external files are
19865 in the same directory or subdirectories of the document.
19872 This become especially useful once you cooperate with people which neither
19873 know about subversion management nor they have ambition to commit additional
19874 material to the repository.
19878 \begin_layout Standard
19879 \begin_inset Flex Code
19882 \begin_layout Plain Layout
19883 Update local directory from repository
19888 command updates the whole directory and in case of merge conflicts local
19889 version of the files are left, so no unintended data loss occurs.
19890 If local changes are detected user is warned before update starts.
19893 \begin_layout Labeling
19894 \labelwidthstring 00.00.0000
19896 \begin_inset space ~
19900 \begin_inset space ~
19904 \begin_inset Newline newline
19908 \begin_inset Flex Code
19911 \begin_layout Plain Layout
19917 (Ask if changes are detected.)
19918 \begin_inset Newline newline
19922 \begin_inset Flex Code
19925 \begin_layout Plain Layout
19926 svn update --accept mine-full $path
19934 \begin_layout Standard
19936 \begin_inset Flex Code
19939 \begin_layout Plain Layout
19945 stands for the path to the document.
19948 \begin_layout Subsubsection
19954 \begin_layout Standard
19955 This shows the complete history of the SVN document.
19959 \begin_inset Quotes eld
19963 \begin_inset Quotes erd
19968 is shown in a browser.
19971 \begin_layout Subsubsection
19973 \begin_inset CommandInset label
19975 name "subsec:SVN-File-Locking"
19982 \begin_layout Standard
19983 The file exchange through various revision control systems brings the problem
19984 of merge conflicts in case two different users try to edit the same (parts
19986 When such a conflict happens it needs manual resolving and one reasonable
19987 alternative is to provide some kind of locking mechanism, which guarantees
19988 that only one user is allowed to edit file at the given time.
19991 \begin_layout Standard
19992 SVN has two such mechanisms to provide mutual exclusivity for file access
19993 - locks and automatic setting of write permissions (see sec.
19995 \begin_inset CommandInset ref
19997 reference "subsec:Automatical-Locking-Property"
20002 \begin_inset Flex Code
20005 \begin_layout Plain Layout
20015 \begin_layout Plain Layout
20016 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20022 If this property is detected for a given document LyX starts to use SVN
20023 locks for document editing automatically and the whole check-in/out mechanism
20024 switches to the same regimen as for RCS.
20025 This in particular means there are two different modes of file use in LyX:
20028 \begin_layout Itemize
20030 The loaded file is in the read-only mode.
20031 For editing on needs to check-out.
20036 consists of updating from the repository and gaining write lock.
20037 If the lock is not possible to obtain, we remain in unlocked state.
20040 \begin_layout Itemize
20042 The loaded file is in the 'normal' edit mode.
20043 No other user is allowed to edit the file.
20048 consists of commiting changes and releasing write-lock.
20049 If no changes have been made to the document, no commit will be produced
20053 \begin_layout Plain Layout
20054 Don't be puzzled by the fact that you will be asked for commit message anyway.
20059 and only the write-lock will be released.
20062 \begin_layout Standard
20066 \begin_layout Labeling
20067 \labelwidthstring 00.00.0000
20070 svn commit -q -m"<description>" "<file-name>"
20071 \begin_inset Newline newline
20074 svn unlock "<file-name>"
20077 \begin_layout Labeling
20078 \labelwidthstring 00.00.0000
20081 svn update "<file-name>"
20082 \begin_inset Newline newline
20085 svn lock "<file-name>"
20088 \begin_layout Subsubsection
20091 \begin_inset CommandInset label
20093 name "subsec:Automatical-Locking-Property"
20099 Automatic Locking Property
20102 \begin_layout Standard
20103 The above mentioned automatic setting of write permissions of the .lyx file
20109 ile\SpecialChar \menuseparator
20115 \begin_inset space ~
20118 Control\SpecialChar \menuseparator
20123 oggle locking property
20126 This command is active only when the file is not locked on the svn server
20128 you need to check-out before proceeding).
20131 \begin_layout Labeling
20132 \labelwidthstring 00.00.0000
20134 \begin_inset space ~
20140 \begin_layout Labeling
20141 \labelwidthstring 00.00.0000
20144 svn propset svn:needs-lock ON "<file-name>"
20147 \begin_layout Labeling
20148 \labelwidthstring 00.00.0000
20151 svn propdel svn:needs-lock "<file-name>"
20154 \begin_layout Subsubsection
20155 \begin_inset CommandInset label
20157 name "sub:VCS-Revision-Information"
20161 Revision Information in Documents
20164 \begin_layout Standard
20165 There are more possibilities how to activate revision information in our
20169 \begin_layout Itemize
20170 LyX supports directly:
20174 \begin_layout Itemize
20175 tree revision information (
20176 \begin_inset Flex Code
20179 \begin_layout Plain Layout
20186 The result is the output of the
20187 \begin_inset Flex Code
20190 \begin_layout Plain Layout
20196 command, the following table gives you an idea, how to read the results.
20199 \begin_layout Standard
20201 \begin_inset Tabular
20202 <lyxtabular version="3" rows="6" columns="2">
20203 <features tabularvalignment="middle">
20204 <column alignment="center" valignment="top" width="0">
20205 <column alignment="center" valignment="top" width="0">
20207 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20210 \begin_layout Plain Layout
20216 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20219 \begin_layout Plain Layout
20227 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20230 \begin_layout Plain Layout
20236 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20239 \begin_layout Plain Layout
20240 mixed revision working copy
20247 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20250 \begin_layout Plain Layout
20256 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20259 \begin_layout Plain Layout
20260 modified working copy
20267 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20270 \begin_layout Plain Layout
20276 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20279 \begin_layout Plain Layout
20280 switched working copy
20287 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20290 \begin_layout Plain Layout
20296 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20299 \begin_layout Plain Layout
20300 partial working copy, from a sparse checkout
20307 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20310 \begin_layout Plain Layout
20316 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20319 \begin_layout Plain Layout
20320 mixed revision, modified, switched working copy
20333 \begin_layout Itemize
20334 file revision information.
20335 The result comes from parsing the output of
20336 \begin_inset Flex Code
20339 \begin_layout Plain Layout
20341 \begin_inset space ~
20345 \begin_inset space ~
20349 \begin_inset space ~
20358 Supported flags are:
20362 \begin_layout Itemize
20363 version number of the last commit (
20364 \begin_inset Flex Code
20367 \begin_layout Plain Layout
20376 \begin_layout Itemize
20377 author of the last commit (
20378 \begin_inset Flex Code
20381 \begin_layout Plain Layout
20390 \begin_layout Itemize
20391 date of the last commit (
20392 \begin_inset Flex Code
20395 \begin_layout Plain Layout
20404 \begin_layout Itemize
20405 time of the last commit (
20406 \begin_inset Flex Code
20409 \begin_layout Plain Layout
20419 \begin_layout Standard
20420 You can obtain this info via InsetInfo (e.g.
20422 \begin_inset Flex Code
20425 \begin_layout Plain Layout
20426 info-insert buffer vcs-date
20432 The information will be available only when you have the file stored under
20433 svn managment (i.e.
20435 \begin_inset Flex Code
20438 \begin_layout Plain Layout
20444 directory is available with your document).
20448 \begin_layout Itemize
20449 Another---a hacking one---possibility is to use svn keywords
20453 \begin_layout Plain Layout
20454 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20460 In short -- you set file keywords property (e.g.
20463 svn propset svn:keywords 'Rev' file.lyx
20465 ) and then paste keyword TeX code
20469 \begin_layout Plain Layout
20470 This is an easy way how to ensure that LyX won't break the line in the middle
20476 tag in your document (e.g.
20481 \begin_layout Plain Layout
20489 This way svn client will automatically substitute revision number (e.g.
20494 \begin_layout Plain Layout
20501 ) after each update and commit.
20502 There are more problems with this approach.
20503 Firstly, the '$' character is used in TeX world for math equations, so
20504 any occurence of math formula
20505 \begin_inset Formula $Rev$
20509 \begin_inset Formula $Rev:59$
20512 in your LyX document.
20513 Similarly for other keywords like Id, Date, Author, etc.
20514 Secondly svn output is dependent on your locales, so its very easy that
20515 svn would produce some problematic strings once Date is used.
20516 Thirdly you get the whole 'Rev: 59' string in your document instead of
20518 Until subversion implements user's custom keywords it will be hard to use
20519 this approach reliably or let LyX to support it directly.
20522 \begin_layout Subsection
20523 SVN and Windows Environment
20526 \begin_layout Quote
20527 My inclination is to say that if the user cannot figure out the command
20528 line operations on their own fairly quickly, they would be well advised
20529 to use TortoiseSVN.
20535 \begin_layout Subsubsection
20539 \begin_layout Standard
20540 In addition to installing LyX, and having access to a Subversion repository,
20541 the user will need to install the Subversion client program.
20542 A Windows installer for the client program is available from
20543 \begin_inset CommandInset href
20546 target "http://www.collab.net/nonav/downloads/subversion/"
20551 The user may also want to install
20552 \begin_inset CommandInset href
20555 target "http://tortoisesvn.tigris.org/"
20559 , which integrates Subversion operations into the context (rightclick) menu
20560 of Windows Explorer.
20561 Operations done outside LyX will typically be more convenient using the
20562 Explorer context menu.
20563 Note that TortoiseSVN is not a replacement for the client program, which
20564 is what LyX itself will use.
20567 \begin_layout Subsubsection
20568 Bringing a document under Subversion control
20571 \begin_layout Standard
20572 Before a LyX document can be brought under version control in Subversion,
20573 its parent directory needs to be under version control.
20574 If the document is being added to a project already in the repository,
20575 this is accomplished by checking the project out to the directory where
20576 the new document will be placed.
20577 If the project itself is not yet under version control (for instance, if
20578 this document starts a new project), the directory must be imported into
20580 This is done outside LyX.
20581 Both import and checkout are easily accomplished from the Explorer context
20582 menu using TortoiseSVN, or alternatively can be done using the command
20583 line client at a DOS prompt.
20584 The procedure for importing the project using TortoiseSVN is described
20585 below, assuming an existing repository and a new project being started
20593 For information on using the Subversion client program, run
20600 \begin_layout Enumerate
20607 in Windows Explorer, right click it, and select
20609 TortoiseSVN > Repo-browser
20612 If necessary, adjust the URL for the repository, then click OK.
20615 \begin_layout Enumerate
20616 Right click the level of the repository under which you want to place the
20617 new project folder (typically the top level) and click
20619 Create folder\SpecialChar \ldots{}
20622 Supply a name for the project folder and click OK.
20623 Add a message for the log file if desired, then click OK again.
20624 The new project folder should appear in the repository.
20625 Finally, click OK again to exit the repository browser.
20628 \begin_layout Enumerate
20629 Once again right click
20635 , this time selecting SVN Checkout\SpecialChar \ldots{}
20636 Select the URL of the project folder
20637 you just created in the repository, and set the checkout directory to
20645 You will be warned about a non-empty folder; click OK to proceed.
20646 You should now have a
20657 \begin_layout Enumerate
20658 Create or open your document in LyX and click
20663 ile\SpecialChar \menuseparator
20669 \begin_inset space ~
20672 Control\SpecialChar \menuseparator
20680 Add a log message and click OK to commit the document to version control.
20683 \begin_layout Standard
20684 From this point onward, you should have full functionality in the
20689 ile\SpecialChar \menuseparator
20695 \begin_inset space ~
20701 You also have the option of checking the document in and out, viewing its
20703 using the TortoiseSVN context menu in Windows Explorer or the Subversion
20704 client program from a command prompt.
20707 \begin_layout Subsubsection
20708 SSH tunnel used with SVN under Windows
20711 \begin_layout Standard
20712 Compared with Linux setting up svn client to communicate over ssh under
20713 Windows is a rather troublesome task.
20714 We will at least offer some hints how to setup the client side but prior
20715 knowledge about ssh and the Windows command line is needed, also be prepared
20716 for a great deal of frustration\SpecialChar \ldots{}
20720 \begin_layout Enumerate
20721 Get a svn client for windows, as described in the previous sections.
20722 When it is a fresh install run some svn command (e.g.
20724 \begin_inset Flex Code
20727 \begin_layout Plain Layout
20733 ) to create config files, which you will need to change later on.
20736 \begin_layout Enumerate
20737 Choose a ssh client for Windows.
20738 There are several possibilities, we will use the one from Putty tools
20742 \begin_layout Plain Layout
20743 \begin_inset Flex URL
20746 \begin_layout Plain Layout
20748 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20759 You will need to set the connection up so that the client doesn't ask for
20760 any password from you.
20761 To keep things easy we will use only keys without any additional password
20766 \begin_layout Enumerate
20768 \begin_inset Flex Code
20771 \begin_layout Plain Layout
20778 Save your private .ppk key file and put the public one on the server side.
20779 If the SVN server runs on Linux, note that the format of the public key
20780 is not compatible with Linux openssh and you will need to direcly copy-paste
20783 Public key for pasting into OpenSSH authorized_keys file
20785 :” edit field into the server's
20786 \begin_inset Flex Code
20789 \begin_layout Plain Layout
20790 ~/.ssh/authorized_keys
20796 \begin_inset Flex Code
20799 \begin_layout Plain Layout
20808 \begin_layout Enumerate
20810 \begin_inset Flex Code
20813 \begin_layout Plain Layout
20820 In the SVN config file
20824 \begin_layout Plain Layout
20825 Exact path depends on Windows version, usually somewhere around
20826 \begin_inset Flex Code
20829 \begin_layout Plain Layout
20832 Documents and Settings
20846 \begin_inset Flex Code
20849 \begin_layout Plain Layout
20864 , section [tunnels], setup ssh command, e.g.
20866 \begin_inset Flex Code
20869 \begin_layout Plain Layout
20870 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20879 \begin_layout Plain Layout
20880 It will usually take a lot of time to get exact command right and it depends
20882 For example do not have some remote server saved as a default session in
20884 If things fail, try to connect via plink without SVN first.
20893 \begin_layout Enumerate
20894 Checkout the SVN archive, e.g.
20896 \begin_inset Flex Code
20899 \begin_layout Plain Layout
20900 svn co svn+ssh://user@server/repository_path
20908 \begin_layout Subsubsection
20909 End-of-Line Conversions
20912 \begin_layout Standard
20913 When the collsraborators are mixing Linux and Windows environments, LyX
20914 will use different line endings inside the .lyx files.
20915 This is not a problem as far as LyX functionality is concerned, but the
20916 commit diffs will be huge and merge-conflicts prone.
20917 Fortunately SVN itself knows
20921 \begin_layout Plain Layout
20922 \begin_inset Flex URL
20925 \begin_layout Plain Layout
20927 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
20937 how to deal with CR/LF problems when switching .lyx files to the
20938 \begin_inset Flex Code
20941 \begin_layout Plain Layout
20951 \begin_layout Plain Layout
20953 \begin_inset Flex Code
20956 \begin_layout Plain Layout
20957 svn propset svn:eol-style native FILE_NAME
20970 \begin_layout Subsection
20974 \begin_layout Standard
20975 With the recent addition of the vc-command function LyX power users are
20976 allowed to create their own commands for revision control.
20979 \begin_layout Standard
20980 As an example you can see how two TortoiseSVN commands could be integrated
20984 \begin_layout Description
20986 \begin_inset Flex Code
20989 \begin_layout Plain Layout
20990 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
20998 \begin_layout Description
21000 \begin_inset Flex Code
21003 \begin_layout Plain Layout
21004 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21012 \begin_layout Subsection
21013 Version control and Document comparison
21016 \begin_layout Standard
21017 One of the typical uses of version control is to inspect the changes between
21018 revisions, usually by creating
21019 \begin_inset Flex Code
21022 \begin_layout Plain Layout
21029 While this is useful for plain text files, it is much less useful in the
21030 case of LyX files, which have more complicated structure.
21031 Hence we provide binding to the Document comparison feature.
21032 They are two ways of calling this feature - either by direct call of
21033 \begin_inset Flex Code
21036 \begin_layout Plain Layout
21042 LyX function (for details see LyX functions manual) or by icon/menu item
21044 \begin_inset Flex MenuItem
21047 \begin_layout Plain Layout
21048 Compare with older revision...
21054 One can either compare two chosen revisions of the document or he can simply
21055 compare the current version of edited text with older revisions (where
21057 \begin_inset Flex MenuItem
21060 \begin_layout Plain Layout
21066 ' revisions back means comparison of the edited file with last commited
21071 \begin_layout Standard
21072 This feature is supported for SVN and RCS though due to the more complicated
21073 versioning scheme of RCS there is a constraint -- when addressing the revisions
21074 in dialog, numbers always point to the last number in RCS revision number,
21079 \begin_layout Section
21080 Literate Programming
21083 \begin_layout Standard
21088 (kayvan@sylvan.com)
21092 original documentation written by
21094 Edmar Wienskoski Jr.
21097 (edmar-w-jr@technologist.com)
21100 \begin_layout Subsection
21104 \begin_layout Standard
21105 The main purpose of this documentation is to show you how to use LyX for
21106 literate programming, where it is assumed that you are familiar with this
21107 programming technique, and know what
21108 \begin_inset Quotes eld
21112 \begin_inset Quotes erd
21116 \begin_inset Quotes eld
21120 \begin_inset Quotes erd
21124 If that is not the case, please follow the web links provided in the following
21126 There is a lot of good documentation out there covering old development
21127 history to the latest tools tips.
21130 \begin_layout Standard
21131 It is also assumed that you are familiar with LyX itself to a point that
21132 you are comfortable changing your LyX preferences, and X resources file.
21133 If that is not the case please refer to other LyX documentation to cover
21134 your specific needs.
21137 \begin_layout Subsection
21138 Literate Programming
21141 \begin_layout Standard
21142 From the Literate Programming FAQ:
21145 \begin_layout Quotation
21146 Literate programming is the combination of documentation and source together
21147 in a fashion suited for reading by human beings.
21148 In fact, literate programs should be enjoyable reading, even inviting!
21149 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21150 and documentation in a single file.
21151 Literate programming tools then parse the file to produce either readable
21152 documentation or compilable source.
21153 The WEB style of literate programming was created by D.
21154 \begin_inset space \thinspace{}
21158 Knuth during the development of his TeX typesetting software.
21162 \begin_layout Standard
21163 Another excerpt says:
21166 \begin_layout Quotation
21169 How is literate programming different from verbose commenting?
21172 \begin_layout Quotation
21173 There are three distinguishing characteristics.
21174 In order of importance, they are:
21178 \begin_layout Itemize
21179 flexible order of elaboration
21182 \begin_layout Itemize
21183 automatic support for browsing
21186 \begin_layout Itemize
21187 typeset documentation, especially diagrams and mathematics
21191 \begin_layout Standard
21192 Now that I sparked your curiosity, take a look in the references.
21195 \begin_layout Subsubsection
21199 \begin_layout Standard
21200 The complete Literate Programming FAQ can be found at:
21203 \begin_layout Quote
21204 Literate Programming FAQ
21205 \begin_inset Flex URL
21208 \begin_layout Plain Layout
21210 http://www.literateprogramming.com/lpfaq.pdf
21218 \begin_layout Standard
21219 The FAQ lists 23 (twenty three!) different literate programming tools.
21220 Where some are specialized or
21221 \begin_inset Quotes eld
21225 \begin_inset Quotes erd
21228 for particular programming languages, while other have general scope.
21233 for my own use for several reasons:
21236 \begin_layout Itemize
21237 It can generate the documentation either in LaTeX or HTML.
21240 \begin_layout Itemize
21241 It has a open architecture, i.
21242 \begin_inset space \thinspace{}
21246 \begin_inset space \space{}
21249 it is easy to plug in new filters and to perform special processing that
21254 \begin_layout Itemize
21255 There is a good selection of filters available already (the HTML is one
21259 \begin_layout Itemize
21263 \begin_layout Standard
21264 The Noweb web page can be found at:
21267 \begin_layout Quote
21269 \begin_inset Flex URL
21272 \begin_layout Plain Layout
21274 http://www.cs.virginia.edu/~nr/noweb/
21282 \begin_layout Standard
21283 Starting from there you can reach many other interesting links and even
21284 some literate program examples.
21287 \begin_layout Subsection
21288 LyX and Literate Programming
21291 \begin_layout Standard
21292 The LyX support for Literate Programming is provided by using the generic
21293 LyX converters mechanism.
21294 This support is provided in a
21295 \begin_inset Quotes eld
21299 \begin_inset Quotes erd
21303 \begin_inset space \thinspace{}
21307 \begin_inset space \space{}
21310 you will be able to use this new LyX feature with some other literate programmin
21311 g tool of your choice by just changing your LyX preferences.
21314 \begin_layout Subsubsection
21315 Generating documents and code (weaving and tangling)
21318 \begin_layout Paragraph
21319 Selecting the document class
21322 \begin_layout Standard
21323 If you have installed Noweb and LyX successfully, whenever you open a new
21324 document or try to change the document class of an existing one, you will
21325 find that there are three new document classes available:
21328 \begin_layout Itemize
21332 \begin_layout Itemize
21336 \begin_layout Itemize
21340 \begin_layout Standard
21341 You must select one of them to create your literate documents from.
21345 \begin_layout Standard
21346 Note that literate documents are not limited to these three classes.
21347 New classes can be generated from other styles like letter or in combination
21348 with other class variations like Article (AMS).
21349 If you have special needs that cannot be covered by one of the existing
21350 classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21351 will arrange to insert a new entry, or teach you how to do it.
21355 \begin_layout Plain Layout
21356 It is very simple, it involves the creation of a file with four lines, and
21357 re-running of the auto configuration.
21362 Moreover, if you use a literate tool other than Noweb you may need to create
21363 a new set of document classes for it.
21366 \begin_layout Paragraph
21370 \begin_layout Standard
21371 LyX enables you to write code with a layout named
21379 \begin_layout Plain Layout
21380 The equivalent Noweb term is
21381 \begin_inset Quotes eld
21385 \begin_inset Quotes erd
21389 For historical reasons, I got used to the term
21390 \begin_inset Quotes eld
21394 \begin_inset Quotes erd
21397 introduced by other literate tool named Nuweb, which I used for many years
21398 before rendering myself to Noweb.
21403 Noweb delimits scraps like this:
21406 \begin_layout LyX-Code
21410 \begin_layout LyX-Code
21414 \begin_layout LyX-Code
21418 \begin_layout LyX-Code
21422 \begin_layout LyX-Code
21426 \begin_layout Standard
21427 The problem is that whatever is written in between the << and the
21431 must be taken literally, i.
21432 \begin_inset space \thinspace{}
21436 \begin_inset space \space{}
21439 LyX should be prevented from making any special interpretation of what has
21441 This is handled by a special layout named Scrap, that works like a normal
21442 paragraph but has a free spacing capability.
21445 \begin_layout Standard
21446 The down side of the Scrap paragraph layout is that consecutive paragraphs
21447 of code will be spaced with one empty line in the source code and also
21448 in the printed documentation.
21449 The work around is to enter each line of code within a single Scrap, with
21450 a newline (ctrl-return).
21451 The example above will look like this:
21455 \begin_layout Plain Layout
21456 If you have a printed version of this document you will not see any difference
21457 between the previous example and this one.
21465 \begin_layout LyX-Code
21467 \begin_inset Newline newline
21471 \begin_inset Newline newline
21475 \begin_inset Newline newline
21479 \begin_inset Newline newline
21485 \begin_layout Standard
21486 This layout works fine.
21487 The only real inconvenience is that you have to type ctrl-return instead
21492 \begin_layout Plain Layout
21493 It is in my list of
21494 \begin_inset Quotes eld
21498 \begin_inset Quotes erd
21509 \begin_layout Standard
21510 As a special note, you can also use the
21511 \begin_inset Quotes eld
21515 \begin_inset Quotes erd
21518 construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21522 \begin_layout LyX-Code
21524 \begin_inset Newline newline
21527 def some_function(args):
21528 \begin_inset Newline newline
21531 "This is the doc string for this function."
21532 \begin_inset Newline newline
21535 print "My args: ", args
21538 \begin_layout LyX-Code
21539 @ %def some_function
21542 \begin_layout Standard
21543 For an example of this usage and the resulting cross-reference output, look
21544 at the Literate python program in
21546 LIBDIR/examples/listerrors.lyx
21548 which should make this all clear.
21551 \begin_layout Paragraph
21552 Generating the documentation
21555 \begin_layout Standard
21556 At this point you already have a new document file with a proper document
21557 class, and with some code and text on it.
21558 How do I print it? The answer is simple, you select
21560 View\SpecialChar \menuseparator
21564 Just like you would do for a plain document.
21565 No special procedure is required.
21568 \begin_layout Standard
21569 To help orientate you, I will now explain what happens inside LyX:
21572 \begin_layout Enumerate
21575 Update\SpecialChar \menuseparator
21578 menu option is chosen, a LaTeX file is generated.
21583 \begin_layout Standard
21584 If the document is of any literate class the generated file will be named
21585 with an extension name defined by the
21586 \begin_inset Quotes eld
21590 \begin_inset Quotes erd
21593 format (defined in the Preferences panel), otherwise the file will have
21602 \begin_layout Enumerate
21603 Note that the only difference so far is in the name of the file, no special
21604 processing is required by LyX.
21605 Given that you formatted the code using the Scrap layout that, by itself,
21606 takes care of the business.
21609 \begin_layout Enumerate
21610 If the document is of any literate class LyX will then use the internal
21611 LyX to Noweb converter, followed by the Noweb to LaTeX converter
21615 \begin_layout Plain Layout
21616 The converters are defined in the
21618 Tools\SpecialChar \menuseparator
21622 \begin_inset Quotes eld
21626 \begin_inset Quotes erd
21638 manual for general information about converters.
21643 to generate the LaTeX file.
21647 \begin_layout Standard
21648 Otherwise it will just skip this step.
21652 \begin_layout Enumerate
21653 Finally, LaTeX is invoked and the regular post processing continues as in
21657 \begin_layout Standard
21658 Independence from a particular
21659 \begin_inset Quotes eld
21663 \begin_inset Quotes erd
21666 is easily achieved by changing the commands that are run by the various
21670 \begin_layout Paragraph
21671 Generating the code
21674 \begin_layout Standard
21675 When the build menu option is chosen or the corresponding button in the
21676 toolbar is pressed, a LaTeX file is generated just like step 1 above.
21677 Next, LyX invokes the
21682 This converter needs to be defined by the user and is not installed by
21683 default, though the Program format is.
21684 This converter (like any other converter) will have two parts:
21687 \begin_layout Enumerate
21688 The converter program itself.
21689 This program performs the conversion from the one format to the other (in
21690 this case, from the Noweb format to the Program pseudo-format).
21693 \begin_layout Enumerate
21694 The error log parser.
21695 This is a program whose sole purpose is to rewrite error messages in a
21696 format that LyX understands.
21697 This makes it possible for LyX to place error boxes in the right places
21698 in the file buffer.
21701 \begin_layout Standard
21702 The first part, the
21703 \begin_inset Quotes eld
21707 \begin_inset Quotes erd
21710 setting, should be set to
21711 \begin_inset Quotes eld
21719 \begin_inset Quotes erd
21723 This basically means that LyX will call
21724 \begin_inset Quotes eld
21728 \begin_inset Quotes erd
21731 (a program or script) with the name of the Noweb file (normally a file
21732 in the LyX temp directory).
21736 \begin_layout Standard
21737 This is an implementation of
21738 \begin_inset Quotes eld
21742 \begin_inset Quotes erd
21745 that you can place in a directory on your path:
21748 \begin_layout LyX-Code
21752 \begin_layout LyX-Code
21756 \begin_layout LyX-Code
21757 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
21760 \begin_layout Standard
21761 The next part of the converter setting is the
21762 \begin_inset Quotes eld
21766 \begin_inset Quotes erd
21769 which is to be set to
21770 \begin_inset Quotes eld
21775 parselog=listerrors
21778 \begin_inset Quotes erd
21782 This will run any errors that are generated by the
21783 \begin_inset Quotes eld
21787 \begin_inset Quotes erd
21790 process through the
21791 \begin_inset Quotes eld
21795 \begin_inset Quotes erd
21801 \begin_layout Standard
21802 The converter code looks in
21810 then on the path for the
21811 \begin_inset Quotes eld
21815 \begin_inset Quotes erd
21821 \begin_layout Standard
21822 The build will normally take place in LyX's temporary directory, so the
21823 files produced by the conversion will be in that directory.
21824 LyX will copy out what it regards as the `main' file, but the
21828 conversion may produce several files, and so most of these would then be
21829 deleted when LyX was closed.
21830 The present solution is to use a `copier',
21834 \begin_layout Plain Layout
21843 manual for information on these.
21852 script in its default mode, so that the entire contents of the temporary
21853 directory is copied.
21854 More will get copied than is needed, to be sure, but nothing will be lost.
21855 If, however, you know what extensions the generated files will have, this
21856 can be improved by using the
21865 This option takes a comma-separated list of extensions to copy.
21866 So, for example, if the conversion will generate only files with the extensions
21875 , then the correct definition would be:
21878 \begin_layout LyX-Code
21879 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
21882 \begin_layout Standard
21883 The result will be that only files with these two extensions will be copied
21887 \begin_layout Paragraph
21888 Build instructions in the document
21891 \begin_layout Standard
21892 The last piece of the integration between LyX and noweb is the
21893 \begin_inset Quotes eld
21897 \begin_inset Quotes erd
21901 Generally, the instructions for building your program should be embedded
21902 in a scrap of its own.
21904 \begin_inset Quotes eld
21908 \begin_inset Quotes erd
21911 above uses the notangle command to look for this scrap (called
21912 \begin_inset Quotes eld
21916 \begin_inset Quotes erd
21919 ) and runs its contents through
21920 \begin_inset Quotes eld
21924 \begin_inset Quotes erd
21930 \begin_layout Standard
21931 Typically, such a scrap would look something like this:
21934 \begin_layout LyX-Code
21936 \begin_inset Newline newline
21940 \begin_inset Newline newline
21944 \begin_inset Newline newline
21947 if [ -z "${NOWEB_SOURCE}" ]
21948 \begin_inset Newline newline
21952 \begin_inset Newline newline
21955 NOWEB_SOURCE=myfile.nw
21956 \begin_inset Newline newline
21960 \begin_inset Newline newline
21964 code to extract files ...]
21965 \begin_inset Newline newline
21969 code to compile files ...]
21970 \begin_inset Newline newline
21976 \begin_layout Standard
21979 LIBDIR/examples/listerrors.lyx
21983 LIBDIR/examples/Literate.lyx
21985 which implement two versions of the
21986 \begin_inset Quotes eld
21990 \begin_inset Quotes erd
21993 program for some illustrations of how all of these pieces go together or
21996 LIBDIR/examples/noweb2lyx.lyx.
21999 Interestingly, these three files show off the language-indepence of the
22000 LyX literate programming support since they are written in Python, C and
22004 \begin_layout Subsubsection
22008 \begin_layout Standard
22009 All the Literate Programming support is configured by the
22011 Tools\SpecialChar \menuseparator
22015 \begin_inset Quotes eld
22019 \begin_inset Quotes erd
22023 The important parts are:
22026 \begin_layout Description
22028 \begin_inset space ~
22032 \begin_inset Quotes eld
22036 \begin_inset Quotes erd
22040 \begin_inset space ~
22043 format Set up via the Formats tab, this is where the Noweb-specific pieces
22053 , the file extension is set to
22058 This tells LyX to create a file with a
22062 extension in the first step of the conversion process.
22065 \begin_layout Description
22067 \begin_inset space ~
22075 \begin_inset space ~
22078 format This is an empty format whose sole purpose is to be the endpoint
22079 of a conversion (which then allows us to set up a converter for it).
22082 \begin_layout Description
22091 This converter performs the
22092 \begin_inset Quotes eld
22096 \begin_inset Quotes erd
22099 of the literate document.
22100 For Noweb, it is set to
22101 \begin_inset Quotes eld
22106 noweave -delay -index $$i > $$o
22109 \begin_inset Quotes erd
22115 \begin_layout Description
22125 \begin_inset Quotes eld
22129 \begin_inset Quotes erd
22133 As stated above, the Converter is set to
22134 \begin_inset Quotes eld
22142 \begin_inset Quotes erd
22145 , with Flags set to
22146 \begin_inset Quotes eld
22151 originaldir,parselog=listerrors
22154 \begin_inset Quotes erd
22160 \begin_layout Subsubsection
22164 \begin_layout Standard
22165 There is also a new function implemented in the LyX server, the
22166 \begin_inset Quotes eld
22169 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22173 \begin_layout Standard
22174 When debugging code with ddd/gdb, it is possible to invoke a text editor
22175 at the current execution position with a single key stroke.
22176 The default ddd configuration for that is shift-ctrl-V.
22177 It happens that you can define the editor command line invocation in ddd
22180 Edit\SpecialChar \menuseparator
22181 Preferences\SpecialChar \menuseparator
22184 dialog and changing the "Edit Sources" entry.
22187 \begin_layout Standard
22188 I take advantage of the new created LyX server function and this ddd feature,
22190 \begin_inset Quotes eld
22194 \begin_inset Quotes erd
22200 \begin_layout LyX-Code
22201 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22204 \begin_layout Standard
22205 With this, whenever you are using ddd and find a point in the program that
22206 you want to edit, you just press shift-ctrl-V (in the ddd window), and
22207 ddd you forward this information to LyX through the LyX server and then
22208 the LyX window will show the same file with the cursor at the same position
22209 ddd was pointing to.
22210 No more guessing or long scrolling to locate a point in the program back
22214 \begin_layout Standard
22215 Note however that you must enable the LyX server to get this feature working
22216 (it is disabled by default).
22217 You can enable it in
22229 ) by entering in the
22234 \begin_inset Quotes eld
22239 /home/<your-home-directory>/.lyx/lyxpipe
22242 \begin_inset Quotes erd
22248 \begin_layout Standard
22249 Read the LyX server documentation in the
22251 Customization Manual
22253 for further information.
22256 \begin_layout Subsubsection
22260 \begin_layout Standard
22261 There are six new buttons that can be added to your LyX toolbar.
22262 Five of these buttons are short cuts to layout styles:
22283 The last one is a short cut to the
22284 \begin_inset Quotes eld
22288 \begin_inset Quotes erd
22295 \begin_layout Standard
22296 LyX has a range of buttons that are available for tool bar customization.
22297 In my toolbar I like to combine the six short cuts above with two more:
22302 \SpecialChar \menuseparator
22307 \SpecialChar \menuseparator
22314 View\SpecialChar \menuseparator
22318 Here is how it looks like:
22321 \begin_layout LyX-Code
22325 \begin_layout LyX-Code
22329 \begin_layout LyX-Code
22330 Icon "layout Standard"
22333 \begin_layout LyX-Code
22334 Icon "layout Section"
22337 \begin_layout LyX-Code
22338 Icon "layout LaTeX"
22341 \begin_layout LyX-Code
22342 Icon "layout LyX-Code"
22345 \begin_layout LyX-Code
22346 Icon "layout Scrap"
22349 \begin_layout LyX-Code
22353 \begin_layout LyX-Code
22357 \begin_layout LyX-Code
22358 Icon "buffer-typeset"
22361 \begin_layout LyX-Code
22362 Icon "build-program"
22365 \begin_layout LyX-Code
22369 \begin_layout LyX-Code
22373 \begin_layout LyX-Code
22377 \begin_layout LyX-Code
22381 \begin_layout LyX-Code
22385 \begin_layout Subsubsection
22386 Colors customization
22389 \begin_layout Standard
22390 There are a number of colors in LyX that can be customized in
22395 One of the things that bothers people is the LaTeX font color.
22396 The default color is red, since the scraps uses LaTeX font, and there is
22397 a lot of scraps in literate documents, you may get tired of seeing everything
22399 You can change it by going to the tabs
22408 \begin_layout Standard
22409 The next thing is the visible presence of the newline character in the screen.
22410 You can choose the color of this particular character and make it blend
22412 I recommend you choosing a color that is close to the background but not
22413 equal, that way you still can see it is there, but it is not bothering
22418 \begin_layout Chapter
22419 Secrets of the LaTeX Masters
22420 \begin_inset CommandInset label
22429 \begin_layout Standard
22430 Though LyX is a powerful tool, it cannot hope to support everything that
22431 can be done with pure TeX/LaTeX.
22432 However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
22433 as long as you are not afraid to use that
22434 \begin_inset Quotes eld
22438 \begin_inset Quotes erd
22441 button on the toolbar or add things to the LaTeX preamble.
22442 This section lists some tips, tricks, and otherwise cool ideas to give
22443 your document that extra little flair.
22446 Do try this at home
22448 , just start with something a little smaller and less important than your
22452 \begin_layout Standard
22453 Most ideas in this section require less common files in your LaTeX installation.
22454 If you have a system like TeXLive, most will already be available.
22455 A few, however, will need to be downloaded from one of the CTAN archives.
22456 Often, there are several ways to do something, or several LaTeX style files
22457 which do the same thing.
22458 We do not endorse one choice over another, we simply claim that we have
22459 done a particular task with a particular file.
22460 Put on your wizard hat, keep an eye out for dragons, and let us begin.
22463 \begin_layout Section
22467 \begin_layout Standard
22470 Lars Gullik Bjønnes
22473 \begin_layout Subsection
22477 \begin_layout Standard
22478 The aim for this chapter
22482 \begin_layout Plain Layout
22483 Editor's note: Lars' original chapter was a masterful description of how
22489 However, it was too long to flow smoothly in this document.
22490 I have therefore chosen to excerpt the most important sections here (sorry,
22491 Lars); you can read the original chapter (and more of the story!) in the
22494 examples/multicol.lyx
22502 is to show how the LaTeX package
22506 can be used in a LyX document.
22507 As LyX doesn't support the
22511 package natively yet, we have to use some small hacks.
22512 By reading this section it should be obvious how to do this.
22515 \begin_layout Subsection
22519 \begin_layout Standard
22524 package allows switching between one and multicolumn format on the same
22526 Footnotes are handled correctly (for the most part), but will be placed
22527 at the bottom of the page and not under each column.
22528 LaTeX's float mechanism, however, is partly disabled in the current implementat
22530 At the moment only page-wide floats can be used within the scope of the
22534 \begin_layout Subsection
22538 \begin_layout Subsubsection
22542 \begin_layout Standard
22543 If you want to have two columns in your text, you have use LaTeX mode to
22548 begin{multicols}{2}
22550 at the point where you want the two column layout to start, and then
22556 where you want it to end.
22560 \begin_layout Standard
22564 \begin_layout Plain Layout
22568 begin{multicols}{2}
22576 \begin_layout Standard
22581 The Adventure of the Empty House
22584 \begin_inset Newline newline
22589 Sir Arthur Conan Doyle
22592 \begin_layout Standard
22595 It was in the spring of the year 1894 that all London was interested, and
22596 the fashionable world dismayed, by the murder of the Honourable Ronald
22597 Adair under most unusual and inexplicable circumstances.
22598 The public has already learned those particulars of the crime which came
22599 out in the police investigation, but a good deal was suppressed upon that
22600 occasion, since the case for the prosecution was so overwhelmingly strong
22601 that it was not necessary to bring forward all the facts.
22602 Only now, at the end of nearly ten years, am I allowed to supply those
22603 missing links which make up the whole of that remarkable chain.
22604 The crime was of interest in itself, but that interest was as nothing to
22605 me compared to the inconceivable sequel, which afforded me the greatest
22606 shock and surprise of any event in my adventurous life.
22607 Even now, after this long interval, I find myself thrilling as I think
22608 of it, and feeling once more that sudden flood of joy, amazement, and increduli
22609 ty which utterly submerged my mind.
22610 Let me say to that public, which has shown some interest in those glimpses
22611 which I have occasionally given them of the thoughts and actions of a very
22612 remarkable man, that they are not to blame me if I have not shared my knowledge
22613 with them, for I should have considered it my first duty to do so, had
22614 I not been barred by a positive prohibition from his own lips, which was
22615 only withdrawn upon the third of last month.
22618 \begin_layout Standard
22622 \begin_layout Plain Layout
22634 \begin_layout Subsubsection
22638 \begin_layout Standard
22639 The same pattern is used when you want more than two columns:
22642 \begin_layout Standard
22646 \begin_layout Plain Layout
22650 begin{multicols}{3}
22658 \begin_layout Standard
22661 It can be imagined that my close intimacy with Sherlock Holmes had interested
22662 me deeply in crime, and that after his disappearance I never failed to
22663 read with care the various problems which came before the public.
22664 And I even attempted, more than once, for my own private satisfaction,
22665 to employ his methods in their solution, though with indifferent success.
22666 There was none, however, which appealed to me like this tragedy of Ronald
22668 As I read the evidence at the inquest, which led up to a verdict of willful
22669 murder against some person or persons unknown, I realized more clearly
22670 than I had ever done the loss which the community had sustained by the
22671 death of Sherlock Holmes.
22672 There were points about this strange business which would, I was sure,
22673 have specially appealed to him, and the efforts of the police would have
22674 been supplemented, or more probably anticipated, by the trained observation
22675 and the alert mind of the first criminal agent in Europe.
22676 All day, as I drove upon my round, I turned over the case in my mind and
22677 found no explanation which appeared to me to be adequate.
22678 At the risk of telling a twice-told tale, I will recapitulate the facts
22679 as they were known to the public at the conclusion of the inquest.
22682 \begin_layout Standard
22686 \begin_layout Plain Layout
22698 \begin_layout Standard
22699 You can have more than 3 columns if you want to, but that might not be very
22700 pleasant for the eye.
22703 \begin_layout Subsubsection
22704 Columns inside columns
22707 \begin_layout Standard
22708 You can even have columns inside columns:
22711 \begin_layout Standard
22715 \begin_layout Plain Layout
22719 begin{multicols}{2}
22727 \begin_layout Standard
22730 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22731 at that time governor of one of the Australian colonies.
22732 Adair's mother had returned from Australia to undergo the operation for
22733 cataract, and she, her son Ronald, and her daughter Hilda were living together
22737 \begin_layout Standard
22741 \begin_layout Plain Layout
22745 begin{multicols}{2}
22753 \begin_layout Standard
22756 The youth moved in the best society–had, so far as was known, no enemies
22757 and no particular vices.
22758 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22759 had been broken off by mutual consent some months before, and there was
22760 no sign that it had left any very profound feeling behind it.
22761 For the rest {sic} the man's life moved in a narrow and conventional circle,
22762 for his habits were quiet and his nature unemotional.
22763 Yet it was upon this easy-going young aristocrat that death came, in most
22764 strange and unexpected form, between the hours of ten and eleven-twenty
22765 on the night of March 30, 1894.
22768 \begin_layout Standard
22772 \begin_layout Plain Layout
22784 \begin_layout Standard
22787 Ronald Adair was fond of cards–playing continually, but never for such stakes
22789 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22790 It was shown that, after dinner on the day of his death, he had played
22791 a rubber of whist at the latter club.
22792 He had also played there in the afternoon.
22797 The evidence of those who had played with him– Mr.
22798 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
22799 and that there was a fairly equal fall of the cards.
22800 Adair might have lost five pounds, but not more.
22801 His fortune was a considerable one, and such a loss could not in any way
22803 He had played nearly every day at one club or other, but he was a cautious
22804 player, and usually rose a winner.
22805 It came out in evidence that, in partnership with Colonel Moran, he had
22806 actually won as much as four hundred and twenty pounds in a sitting, some
22807 weeks before, from Godfrey Milner and Lord Balmoral.
22808 So much for his recent history as it came out at the inquest.
22811 \begin_layout Standard
22815 \begin_layout Plain Layout
22827 \begin_layout Standard
22828 Please do read the file
22830 examples/multicol.lyx
22832 for more advanced examples including column and header spacing, vertical
22833 separator lines, and more.
22836 \begin_layout Section
22841 Paragraph Environment
22842 \begin_inset Argument
22845 \begin_layout Plain Layout
22846 Numbering in Enumerate
22854 \begin_layout Standard
22860 \begin_layout Standard
22861 \begin_inset VSpace bigskip
22867 \begin_layout Standard
22869 The default numbering for the
22873 paragraph environment begins with Arabic numbers and ends with uppercase
22875 Suppose, however, you wanted a different type of numbering scheme.
22876 Here's a quickie example of how to change the numbering scheme:
22879 \begin_layout LyX-Code
22889 \begin_layout LyX-Code
22899 \begin_layout LyX-Code
22909 \begin_layout LyX-Code
22919 \begin_layout Standard
22920 \SpecialChar \ldots{}
22921 which changes the numbering scheme to uppercase Roman numerals, uppercase
22922 letters, Arabic numbers, and lowercase letter.
22925 \begin_layout Standard
22926 Additionally, the previous example also adds a little bit extra to the numbering
22928 For example, the first level label actually looks like:
22929 \begin_inset Quotes eld
22933 \begin_inset Quotes erd
22937 For ease of reading, we'll describe what the numbering schemes look like
22938 using a notation something like this: <
22939 \begin_inset Quotes eld
22943 \begin_inset Quotes erd
22947 \begin_inset space ~
22951 \begin_inset Quotes erd
22955 \begin_inset Quotes erd
22959 \begin_inset space ~
22963 \begin_inset Quotes erd
22967 \begin_inset Quotes erd
22971 \begin_inset space ~
22975 \begin_inset Quotes eld
22979 \begin_inset Quotes erd
22986 \begin_layout Standard
22987 As you can see in the example, there is a label command for each nesting
22994 \SpecialChar \ldots{}
23001 , as well as a counter,
23005 \SpecialChar \ldots{}
23011 There are also five
23012 \begin_inset Quotes eld
23016 \begin_inset Quotes erd
23049 , each of which take one counter as an argument.
23050 You can add characters before or after these, but there's no need to add
23054 \begin_layout Standard
23055 You can get really fancy with these.
23059 \begin_layout LyX-Code
23073 \begin_layout LyX-Code
23085 \begin_layout LyX-Code
23095 \begin_layout LyX-Code
23105 \begin_layout Standard
23106 produces the somewhat out of hand numbering scheme: <
23107 \begin_inset Quotes eld
23111 \begin_inset Quotes erd
23115 \begin_inset space ~
23119 \begin_inset Quotes erd
23123 \begin_inset Quotes erd
23127 \begin_inset space ~
23131 \begin_inset Quotes erd
23135 \begin_inset Quotes erd
23139 \begin_inset space ~
23143 \begin_inset Quotes eld
23147 \begin_inset Quotes erd
23154 \begin_layout Section
23158 \begin_layout Standard
23164 \begin_layout Standard
23165 \begin_inset VSpace bigskip
23171 \begin_layout Standard
23176 \begin_layout Plain Layout
23182 tmpfont}{cmr17 scaled 2500}{
23194 \begin_layout Standard
23199 \begin_layout Plain Layout
23210 hose of you who like the style of old books probably also like
23211 \begin_inset Quotes eld
23215 \begin_inset Quotes erd
23218 —those large capital letters which begin each new chapter or section.
23219 Implementing them with plain LyX/LaTeX is straightforward (assuming you
23220 know some plain TeX!) but does require a lot of work and many iterations,
23221 as you can see by all the ugly TeX-mode stuff at the beginning of this
23225 \begin_layout Standard
23229 \begin_layout Plain Layout
23235 bigdrop{-1em}{3}{ptmri}{T}+
23240 here is a much easier way of doing this, of course.
23249 ) package from CTAN allows a simple way to add such letters to your documents.
23250 Since this package is not a standard part of TeXLive, I can't demonstrate
23251 it within this document, but if you copy this paragraph to a new document,
23253 \begin_inset Quotes eld
23263 \begin_inset Quotes erd
23266 and the pluses from the TeX code at the beginning of the paragraph, and
23271 usepackage{dropcaps}
23273 to your LaTeX preamble, you will get a nice Times Roman Italic
23274 \begin_inset Quotes eld
23278 \begin_inset Quotes erd
23281 , whose height is three lines of text and which protrudes 1 em into the
23283 (Make certain you have copied
23284 \begin_inset Quotes eld
23292 \begin_inset Quotes erd
23295 into a directory where TeX can see it.) The first argument is the amount
23296 of indentation; in this case the negative sign moves it into the margin.
23297 The second argument is the height of the letter in number of lines of text.
23298 The third argument is the font name: virtually anything which has a tfm
23299 file should work (wade through the
23301 .../texmf/fonts/tfm
23303 directory for possibilities).
23304 My personal favorite is
23305 \begin_inset Quotes eld
23313 \begin_inset Quotes erd
23316 , a fancy German font specifically designed for dropped capitals.
23317 The fourth argument is the letter (or letters) to be dropped.
23322 package also offers the
23328 command, as well as a slightly simplified
23337 \begin_layout Section
23338 Non-standard Paragraph Shapes
23341 \begin_layout Standard
23347 \begin_layout Standard
23348 \begin_inset VSpace bigskip
23354 \begin_layout Standard
23358 \begin_layout Plain Layout
23370 \begin_layout Standard
23374 \begin_layout Plain Layout
23383 \begin_layout Plain Layout
23397 \begin_layout Standard
23402 \begin_layout Plain Layout
23413 \begin_layout Plain Layout
23422 \begin_layout Plain Layout
23431 \begin_layout Plain Layout
23440 \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
23581 There are times when the tyranny of rectangular paragraphs must be overthrown.
23582 In such situations, a call to the delightful plain TeX command
23589 As you can see, completely arbitrary shapes can be laid out with a suitable
23590 set of linelength definitions.
23591 While this parshape may look a bit silly and useless, one could conceive
23592 of situations such as finely tuned dropped capitals, word wrapping around
23593 non-rectangular graphics, etc.
23594 which will benefit from such handcrafting.
23597 \begin_layout Standard
23598 \begin_inset VSpace bigskip
23604 \begin_layout Standard
23609 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23616 is the number of lines of text which define the paragraph.
23617 If there turn out to be fewer lines, the shape is truncated; if there are
23618 more, the excess lines have the same dimensions as the last line of the
23628 entries specify the indentation of the line from the left margin, and the
23629 length of the line as measured from that point.
23630 The shape applies only to the current paragraph; everything is reset to
23631 normal for the next paragraph.
23634 \begin_layout Standard
23638 \begin_layout Plain Layout
23650 \begin_layout Section
23654 \begin_layout Standard
23655 As you can see, the examples in this section range from the useful to the
23657 While I don't expect that anyone will ever need the paragraph shape demonstrate
23658 d in the last section, the important point is that you can do almost anything
23659 you want in LyX if you are willing to figure out how to do it in TeX and
23661 TeX is a fantastically powerful typesetting system and all that power is
23662 available to you since LyX uses it as its backend.