1 #LyX 2.1 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 % used for multi-column text
39 % extra space for tables
40 \newcommand{\extratablespace}[1]{\noalign{\vskip#1}}
42 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
43 \use_default_options false
50 \maintain_unincluded_children false
53 InsetLayout CharStyle:MenuItem
62 \newcommand*{\menuitem}[1]{{\sffamily #1}}
67 \language_package default
72 \font_typewriter default
73 \font_default_family default
74 \use_non_tex_fonts false
81 \default_output_format default
83 \bibtex_command default
84 \index_command default
88 \pdf_title "LyX's Additional Features manual"
89 \pdf_author "LyX Team"
90 \pdf_subject "LyX's additional features documentation"
91 \pdf_keywords "LyX, Documentation, Additional"
93 \pdf_bookmarksnumbered true
94 \pdf_bookmarksopen false
95 \pdf_bookmarksopenlevel 1
100 \pdf_pdfusetitle false
101 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
104 \use_package amsmath 1
106 \use_package mathdots 1
107 \use_package mathtools 0
108 \use_package mhchem 1
109 \use_package undertilde 0
111 \cite_engine_type numerical
115 \paperorientation portrait
119 \notefontcolor #0000ff
126 \paragraph_separation indent
127 \paragraph_indentation default
128 \quotes_language english
131 \paperpagestyle headings
132 \tracking_changes true
133 \output_changes false
142 Additional LyX Features
145 \begin_layout Subtitle
154 \begin_layout Plain Layout
156 Principal maintainer of this file is
161 If you have comments or error corrections, please send them to the LyX
162 Documentation mailing list,
163 \begin_inset Flex Code
166 \begin_layout Plain Layout
168 <lyx-docs@lists.lyx.org>
181 \begin_layout Standard
182 \begin_inset CommandInset toc
183 LatexCommand tableofcontents
190 \begin_layout Chapter
194 \begin_layout Standard
195 This manual is essentially Part II of the
197 User's Guide\SpecialChar \@.
200 The reason for separating the two documents is simple: the
204 is already quite lengthy, and it contains information on all of the basic
205 features one needs to know in order to prepare most documents.
206 However, the LyX Team has worked to make LyX extensible through various
207 configuration files and external packages.
208 That means that if you want to support the Fizzwizzle LaTeX package, you
209 can create a layout file (or module) for it without having to alter LyX
211 We've already had contributions of several new features this way, and some
212 of them are documented here.
213 There are also some more `advanced' features, such as how to control the
214 presentation of bibliographies and how to work with multi-part documents,
215 that are not covered in the
219 and are discussed here.
222 \begin_layout Standard
223 This manual also documents some special features, like fax support, version
224 control, and SGML support, which require additional software to work properly.
225 There is also a chapter on LyX's support for HTML.
226 And lastly, there's a chapter of LaTeX tools and tips, things you can use
227 to spruce up your documents by directly using the powerful features of
233 only WYSIWYM and will only ever interface to some, not all, LaTeX features.
236 \begin_layout Standard
237 If you haven't read the
241 yet, you are definitely in the wrong manual.
246 is the first place to go, since it describes the notation and format of
248 You should also be thoroughly familiar with the
252 and all of the basic features of LyX before attempting to read this one.
255 \begin_layout Standard
256 Since many of the topics in this manual depend heavily on LyX's interaction
257 with LaTeX, this first chapter covers the inner workings of LyX and how
258 to direct LyX to generate exactly the LaTeX code you want.
259 It is obviously for more seasoned LyX users.
262 \begin_layout Chapter
266 \begin_layout Section
270 \begin_layout Standard
271 This chapter is for both TeX-nicians and the LaTeX-curious.
272 In it, we'll explain how LyX and LaTeX work together to produce printable
274 This is the only place in any of the manuals where we assume you know something
278 \begin_layout Standard
279 At one time, LyX was called a
280 \begin_inset Quotes eld
283 WYSIWYM frontend to LaTeX,
284 \begin_inset Quotes erd
287 but that's no longer true.
288 There are frontends to LaTeX out there.
292 \begin_layout Plain Layout
293 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
294 There are also the LaTeX modes for vi and emacs, of course.
299 These are basically text editors with the ability to run LaTeX and mark
300 any errors in the file you're editing.
309 run LaTeX, and it also indicates errors in the file, it also does much,
311 For one thing, you don't need to know LaTeX to use LyX effectively.
312 And LyX has added its own extensions to LaTeX.
313 Try the following sometime: select
314 \begin_inset Flex MenuItem
317 \begin_layout Plain Layout
318 Export\SpecialChar \menuseparator
325 \begin_inset Flex MenuItem
328 \begin_layout Plain Layout
335 \begin_inset Flex MenuItem
338 \begin_layout Plain Layout
339 View\SpecialChar \menuseparator
345 ), then look at the preamble of the resulting
346 \begin_inset Flex Code
349 \begin_layout Plain Layout
356 You'll notice a variety of new macros defined specifically by LyX.
357 These macros are defined automatically, according to the features you use
361 \begin_layout Standard
362 There are several commands that automatically invoke LaTeX.
366 \begin_layout Itemize
367 \begin_inset Flex MenuItem
370 \begin_layout Plain Layout
371 View\SpecialChar \menuseparator
380 \begin_layout Itemize
381 \begin_inset Flex MenuItem
384 \begin_layout Plain Layout
385 View\SpecialChar \menuseparator
394 \begin_layout Itemize
395 \begin_inset Flex MenuItem
398 \begin_layout Plain Layout
399 File\SpecialChar \menuseparator
408 \begin_layout Itemize
409 \begin_inset Flex MenuItem
412 \begin_layout Plain Layout
413 File\SpecialChar \menuseparator
422 \begin_layout Standard
423 They will only invoke LaTeX if the file has changed since the last time
428 \begin_layout Standard
429 When LyX runs LaTeX on the file you're editing, it performs these steps:
432 \begin_layout Enumerate
433 Convert the document to LaTeX and save to a file with the extension
434 \begin_inset Flex Code
437 \begin_layout Plain Layout
444 \begin_inset Flex Code
447 \begin_layout Plain Layout
456 \begin_layout Enumerate
458 \begin_inset Flex Code
461 \begin_layout Plain Layout
467 file (maybe several times), and run any other commands (such as
468 \begin_inset Flex Code
471 \begin_layout Plain Layout
478 \begin_inset Flex Code
481 \begin_layout Plain Layout
487 ) needed to compile the LaTeX file.
490 \begin_layout Enumerate
491 If there are any errors, show the error log.
494 \begin_layout Standard
495 If you have run LaTeX using
496 \begin_inset Flex MenuItem
499 \begin_layout Plain Layout
502 \SpecialChar \menuseparator
510 , LyX then runs a DVI viewer to display the DVI-file.
512 \begin_inset Flex MenuItem
515 \begin_layout Plain Layout
518 \SpecialChar \menuseparator
526 , LyX performs further steps:
529 \begin_layout Itemize
531 \begin_inset Flex Code
534 \begin_layout Plain Layout
540 to convert the DVI file to PostScript.
543 \begin_layout Itemize
544 Run a PostScript viewer, such as
545 \begin_inset Flex Code
548 \begin_layout Plain Layout
554 , to display the PostScript file.
557 \begin_layout Standard
558 LyX does similar things when viewing, or exporting, other formats.
561 \begin_layout Section
562 Translating LaTeX files into LyX
565 \begin_layout Standard
566 You can import a LaTeX file into LyX by using the
567 \begin_inset Flex MenuItem
570 \begin_layout Plain Layout
571 File\SpecialChar \menuseparator
572 Import\SpecialChar \menuseparator
579 This will call a program named
580 \begin_inset Flex Code
583 \begin_layout Plain Layout
589 which will create a file
590 \begin_inset Flex Code
593 \begin_layout Plain Layout
600 \begin_inset Flex Code
603 \begin_layout Plain Layout
610 LyX will then open that file.
614 \begin_layout Plain Layout
615 \begin_inset Flex Code
618 \begin_layout Plain Layout
624 can also be run from the command line, of course.
632 \begin_layout Standard
633 \begin_inset Flex Code
636 \begin_layout Plain Layout
642 will translate most legal LaTeX, but not everything.
643 It will put things it doesn't understand into TeX code, so after translating
645 \begin_inset Flex Code
648 \begin_layout Plain Layout
654 , you can look for TeX code and hand-edit it until it looks right.
657 \begin_layout Standard
658 If you don't know what TeX code is, read the next section.
661 \begin_layout Section
662 \begin_inset CommandInset label
664 name "sec:Inserting-TeX-Code"
668 Inserting TeX Code into LyX Documents
671 \begin_layout Standard
672 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
673 You can always insert TeX code into any LyX document.
674 LyX cannot, and will never be able to, display every possible LaTeX construct.
675 If ever you need to insert LaTeX commands into your LyX document, you can
677 \begin_inset Flex Code
680 \begin_layout Plain Layout
686 box, which you can insert into your document with
687 \begin_inset Flex MenuItem
690 \begin_layout Plain Layout
691 Insert\SpecialChar \menuseparator
697 or the keyboard shortcut
706 \begin_layout Standard
707 Here's an example of inserting LaTeX commands in a LyX document.
708 The code looks like this:
711 \begin_layout LyX-Code
715 \begin_inset Newline newline
721 \begin_inset Newline newline
724 This is an example of a minipage environment.
726 \begin_inset Newline newline
729 can put nearly everything in it, even (non-floating)
730 \begin_inset Newline newline
735 \begin_inset Newline newline
741 \begin_inset Newline newline
745 \begin_inset Newline newline
751 \begin_inset Newline newline
757 \begin_inset Newline newline
763 \begin_inset Newline newline
768 \begin_inset Newline newline
774 \begin_inset Newline newline
780 \begin_inset Newline newline
786 \begin_inset Newline newline
794 \begin_layout LyX-Code
798 \begin_layout Standard
800 \begin_inset Flex Code
803 \begin_layout Plain Layout
809 box containing this text is directly after this paragraph.
810 Those of you reading the manual in LyX will only see the TeX code inset.
811 Those reading a printed version of the manuals will see the actual results:
812 \begin_inset VSpace bigskip
818 \begin_layout Standard
822 \begin_layout Plain Layout
829 \begin_layout Plain Layout
836 \begin_layout Plain Layout
838 This is an example of a minipage environment.
839 You can put nearly everything in it, even (non-floating) figures and tables.
843 \begin_layout Plain Layout
850 \begin_layout Plain Layout
855 \begin_layout Plain Layout
862 \begin_layout Plain Layout
869 \begin_layout Plain Layout
876 \begin_layout Plain Layout
882 \begin_layout Plain Layout
889 \begin_layout Plain Layout
896 \begin_layout Plain Layout
903 \begin_layout Plain Layout
913 \begin_inset VSpace bigskip
919 \begin_layout Standard
920 In addition to using TeX code, you can also create a separate file containing
921 some complex LaTeX structure and then use
922 \begin_inset Flex MenuItem
925 \begin_layout Plain Layout
926 Insert\SpecialChar \menuseparator
936 to include your file (you should select the type
937 \begin_inset Flex Code
940 \begin_layout Plain Layout
947 We recommend that you only do this if you have a
948 \begin_inset Flex Code
951 \begin_layout Plain Layout
962 Otherwise, you'll have a big job tracking down LaTeX errors.
965 \begin_layout Standard
966 There are a few last points to emphasize:
969 \begin_layout Itemize
974 check if your LaTeX code is correct.
977 \begin_layout Itemize
978 Beware of reinventing the wheel.
981 \begin_layout Standard
982 On that last point, LyX does have quite a few features tucked into it, and
984 Be sure to check the manuals to make sure that LyX doesn't have such-and-such
985 feature before you decide you have to do it by hand.
986 Moreover, there are numerous LaTeX packages out there to do all sorts of
987 things, from labels to envelopes to fancy multipage tables.
989 \begin_inset CommandInset href
992 target "http://www.ctan.org/"
999 \begin_layout Standard
1000 If you do need to do some wild and fancy things within your document, be
1001 sure to check out a good LaTeX book for assistance.
1002 There are a number of them listed in the bibliography of the
1009 \begin_layout Section
1010 LyX and the LaTeX Preamble
1013 \begin_layout Subsection
1014 About the LaTeX Preamble
1017 \begin_layout Standard
1018 If you already know LaTeX, there is no need to explain here what the preamble
1020 If you don't, the following will give you some ideas—we recommend again
1021 that you consult a LaTeX book for further information.
1022 In any case, you should read the points below, because they explain what
1023 you can do and what you don't need to do in the LaTeX preamble of a LyX
1027 \begin_layout Standard
1028 The LaTeX preamble comes at the very beginning of a document,
1036 \begin_layout Itemize
1037 Declare the document class.
1039 \begin_inset Newline newline
1042 LyX already does this for you.
1043 If you're a seasoned LaTeX-nician, and you have a custom document class
1044 you want to use, check out the
1046 Customization Manual
1048 for information on how to make LyX interface to it.
1051 \begin_layout Itemize
1052 Declare the usage of packages.
1054 \begin_inset Newline newline
1057 LaTeX packages provide special commands, which are only available within
1058 a document when the package has been declared in the preamble.
1059 In addition to providing special commands, the inclusion of a package can
1060 change the document.
1061 For example, the package
1062 \begin_inset Flex Code
1065 \begin_layout Plain Layout
1071 forces all paragraphs to be indented.
1072 There are other packages for labels, envelopes, margins, etc.
1076 \begin_layout Itemize
1077 Set counters, variables, lengths and widths.
1079 \begin_inset Newline newline
1082 There are several LaTeX counters and variables that
1086 be set globally from within the preamble in order to have the desired effect.
1087 (There are variables that you can set and reset inside the document, too.)
1088 Margins are a good example of something that must be set in the preamble.
1089 Another example is the label format for lists.
1090 You can actually set these just about anywhere, but it's best to do it
1091 just once, inside the preamble.
1094 \begin_layout Itemize
1095 Declare user defined commands (with
1096 \begin_inset Flex Code
1099 \begin_layout Plain Layout
1108 \begin_inset Flex Code
1111 \begin_layout Plain Layout
1120 \begin_inset Newline newline
1123 These are abbreviations for LaTeX commands which appear very often inside
1125 Although the preamble is a good place to declare such commands, they
1129 be declared anywhere (before they are used for the first time, of course).
1130 This can be useful if there is a lot of raw LaTeX code in your document,
1131 which normally should not be the case.
1134 \begin_layout Standard
1135 LyX adds its own set of definitions to the preamble of the
1136 \begin_inset Flex Code
1139 \begin_layout Plain Layout
1146 This makes LaTeX files generated by LyX portable.
1149 \begin_layout Subsection
1150 Changing the Preamble
1153 \begin_layout Standard
1154 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1155 can't change them without patching LyX itself.
1156 You can, however, add your own stuff to the preamble by selecting
1157 \begin_inset Flex MenuItem
1160 \begin_layout Plain Layout
1162 \begin_inset space ~
1171 \begin_inset Flex MenuItem
1174 \begin_layout Plain Layout
1175 Document\SpecialChar \menuseparator
1182 LyX adds anything in the
1183 \begin_inset Flex MenuItem
1186 \begin_layout Plain Layout
1192 dialog to its own built-in preamble.
1193 Before adding your own declarations in the preamble, you should make sure
1194 that LyX doesn't already support what you want to do.
1195 (Remember what we said about reinventing the wheel?) Also,
1197 make sure your preamble code is correct
1200 LyX doesn't check it for you.
1201 If there is an error, you're likely to get an error like
1202 \begin_inset Quotes eld
1206 \begin_inset Flex Code
1209 \begin_layout Plain Layout
1218 \begin_inset Quotes erd
1222 If you see this error, check your preamble.
1225 \begin_layout Subsection
1229 \begin_layout Standard
1230 Here are some examples of what you can add to a preamble, and what they
1234 \begin_layout Subsubsection
1238 \begin_layout Standard
1239 There are two variables under LaTeX that control page position:
1240 \begin_inset Flex Code
1243 \begin_layout Plain Layout
1252 \begin_inset Flex Code
1255 \begin_layout Plain Layout
1264 Their names should be self-explanatory.
1265 These variables are useful if you think for a moment about computer labels.
1266 Sometimes, the size of a print medium and the area of the medium that you
1267 can actually print on aren't the same.
1269 \begin_inset Flex Code
1272 \begin_layout Plain Layout
1281 \begin_inset Flex Code
1284 \begin_layout Plain Layout
1295 \begin_layout Standard
1296 The default values for
1297 \begin_inset Flex Code
1300 \begin_layout Plain Layout
1309 \begin_inset Flex Code
1312 \begin_layout Plain Layout
1321 \begin_inset space \thinspace{}
1325 \begin_inset space \thinspace{}
1329 \begin_inset space \space{}
1332 the page isn't shifted.
1333 Unfortunately, some DVI drivers always seem to shift the page.
1334 We have no idea why, or why the sysadmin hasn't fixed such behavior.
1335 If you're using LyX on a system that you don't personally maintain, and
1336 your sysadmin is a doofus,
1337 \begin_inset Flex Code
1340 \begin_layout Plain Layout
1349 \begin_inset Flex Code
1352 \begin_layout Plain Layout
1361 Suppose your left and top margins are always 0.5
1362 \begin_inset space \thinspace{}
1366 You can add this to the preamble:
1369 \begin_layout LyX-Code
1377 \begin_layout LyX-Code
1385 \begin_layout Standard
1386 and your margins should now be correct.
1389 \begin_layout Subsubsection
1393 \begin_layout Standard
1394 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1395 There's a rather nice package, available at your nearest CTAN archive,
1396 for printing sheets of labels:
1397 \begin_inset Flex Code
1400 \begin_layout Plain Layout
1407 Now, your system may not have this package installed by default.
1408 We leave that up to you to check.
1409 You'll also want to read the documentation for it; we're not going to do
1411 Since this is an example, however, we'll give you an example of how you
1415 \begin_layout Standard
1416 First, make sure you're using the
1417 \begin_inset Flex Code
1420 \begin_layout Plain Layout
1427 Next, you need to put the following in your preamble:
1430 \begin_layout LyX-Code
1436 \begin_layout LyX-Code
1442 \begin_layout LyX-Code
1448 \begin_layout LyX-Code
1454 \begin_layout LyX-Code
1460 \begin_layout LyX-Code
1466 \begin_layout LyX-Code
1472 \begin_layout Standard
1473 This sets things up for Avery label sheets, stock #5360.
1474 You're now ready to print labels, but you'll need to insert LaTeX code,
1475 placing the commands
1476 \begin_inset Flex Code
1479 \begin_layout Plain Layout
1488 \begin_inset Flex Code
1491 \begin_layout Plain Layout
1499 around each label text.
1500 This and other special features of
1501 \begin_inset Flex Code
1504 \begin_layout Plain Layout
1510 are explained in its documentation.
1513 \begin_layout Standard
1514 Someday, someone may write a LyX layout file to support this package directly.
1515 Maybe that someone is you.
1518 \begin_layout Subsubsection
1519 Example #3: Paragraph Indentation
1522 \begin_layout Standard
1523 Americans are trained to indent the first line of
1528 As with all of their other weird quirks, most Americans will whine and
1529 moan until they can have their way and indent the first line of all paragraphs.
1538 \begin_layout Standard
1539 Of course, this behavior isn't standard typography.
1540 In books, you typically only indent the first line of a paragraph
1544 it follows another one.
1545 The idea behind indenting the first line of a paragraph is to distinguish
1546 neighboring paragraphs from one another.
1547 If there is no previous paragraph—for example, if it follows a figure or
1548 is the first paragraph in a section—then there is no need for indentation.
1552 \begin_layout Standard
1553 If you're a typical American (we're still joking!), though, you don't care
1554 about such esoteric things; you want your indentation! Add this to the
1558 \begin_layout LyX-Code
1561 usepackage{indentfirst}
1564 \begin_layout Standard
1565 If your TeX distribution isn't braindead, you'll have this package, and
1566 all of your paragraphs will get the indentation the Founding Fathers intended
1570 \begin_layout Subsubsection
1571 Example #4: This Document
1574 \begin_layout Standard
1575 You can also check out the preamble of this document to get an idea of some
1576 of the advanced things you can do.
1579 \begin_layout Section
1580 LyX and LaTeX Errors
1583 \begin_layout Standard
1584 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1586 It then uses the logfile from the LaTeX run to do a post-mortem.
1587 After analyzing the logfile, LyX displays a dialog listing the errors.
1588 Clicking on any one of them will take you to the position in your LyX file
1589 where the error occurred.
1593 \begin_layout Plain Layout
1595 Analyzing the logfile is a tough job, and LyX doesn't always go to the
1597 There are also cases where LaTeX reports the error on one line, but the
1598 actual error is earlier.
1599 This is not unlike forgetting a closing brace in a program: You'll get
1600 an error, but only later.
1608 \begin_layout Standard
1609 Some folks also like to look at the log file directly: It is available from
1611 \begin_inset Flex MenuItem
1614 \begin_layout Plain Layout
1617 \SpecialChar \menuseparator
1621 \begin_inset space ~
1630 There are some fairly common error messages and warnings.
1631 We'll cover those here.
1632 You should look at a good LaTeX book for a complete listing.
1635 \begin_layout Itemize
1636 \begin_inset Flex Code
1639 \begin_layout Plain Layout
1646 \begin_inset Newline newline
1649 Anything beginning with these words is a warning message for the purpose
1651 \begin_inset Quotes eld
1655 \begin_inset Quotes erd
1658 the LaTeX code itself.
1659 You'll get messages like this if you added or changed cross-references
1660 or bibliography entries, in which case, LaTeX is trying to tell you that
1661 you need to make another run.
1662 You can by-and-large ignore these.
1665 \begin_layout Itemize
1666 \begin_inset Flex Code
1669 \begin_layout Plain Layout
1676 \begin_inset Newline newline
1679 Another warning message, this time about fonts which LaTeX couldn't find.
1680 The rest of the message will often say something about a replacement font
1682 You can safely ignore these, too.
1685 \begin_layout Itemize
1686 \begin_inset Flex Code
1689 \begin_layout Plain Layout
1698 \begin_inset Newline newline
1706 They are warnings about lines that were too long and run past the right
1708 Almost always, this is unnoticeable in the final output.
1709 (It can be just a point or two.) Or, only one or two characters extend past
1711 LaTeX seems to generate at least one of these messages for just about any
1713 \begin_inset Newline newline
1716 You can ignore these messages.
1717 Your eyes will tell you if there's a problem with something that's too
1718 wide; just look at the output.
1722 \begin_layout Plain Layout
1723 You can also enable the `draft' option in
1724 \begin_inset Flex MenuItem
1727 \begin_layout Plain Layout
1730 \SpecialChar \menuseparator
1738 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1746 \begin_layout Itemize
1747 \begin_inset Flex Code
1750 \begin_layout Plain Layout
1759 \begin_inset Newline newline
1762 Not quite as common as its cousin.
1763 LaTeX seems to like to print lines that are a bit too wide as opposed to
1764 ones that are a bit too narrow.
1765 We have no idea why.
1768 \begin_layout Itemize
1769 \begin_inset Flex Code
1772 \begin_layout Plain Layout
1781 \begin_inset Flex Code
1784 \begin_layout Plain Layout
1793 \begin_inset Newline newline
1796 Warnings about troubles breaking the page.
1797 Once again, just look at the output.
1798 Your eyes will tell you where something has gone wrong.
1801 \begin_layout Itemize
1802 \begin_inset Flex Code
1805 \begin_layout Plain Layout
1807 \begin_inset Quotes els
1811 \begin_inset Quotes ers
1820 \begin_inset Newline newline
1824 \begin_inset Quotes eld
1828 \begin_inset Quotes erd
1831 isn't installed on this system.
1832 This usually appears because some package your document needs isn't installed.
1833 If you didn't touch the preamble or didn't use the
1834 \begin_inset Flex Code
1837 \begin_layout Plain Layout
1845 command, then one of the packages LyX tried to load is missing.
1847 \begin_inset Flex MenuItem
1850 \begin_layout Plain Layout
1851 Help\SpecialChar \menuseparator
1857 to get a list of packages that LyX knows about.
1858 This file is updated whenever you reconfigure LyX (using
1859 \begin_inset Flex MenuItem
1862 \begin_layout Plain Layout
1863 Tools\SpecialChar \menuseparator
1869 ) and tells you which packages have been detected and what they do.
1870 \begin_inset Newline newline
1874 \begin_inset Flex Code
1877 \begin_layout Plain Layout
1885 command and the package in question isn't installed, then you'll need to
1886 install it yourself.
1889 \begin_layout Itemize
1890 \begin_inset Flex Code
1893 \begin_layout Plain Layout
1894 LaTeX Error: Unknown option
1900 \begin_inset Newline newline
1903 Error messages beginning with this are trying to tell you that you specified
1904 a bad or undefined option to a package.
1905 Check the package's documentation.
1908 \begin_layout Itemize
1909 \begin_inset Flex Code
1912 \begin_layout Plain Layout
1913 Undefined control sequence
1919 \begin_inset Newline newline
1922 If you've inserted LaTeX code into your document, but made a typo, you'll
1924 You may have forgotten to load a package.
1925 In any case, this error message usually means that you used an undefined
1930 \begin_layout Standard
1931 There are other error and warning messages.
1932 Some are self-explanatory.
1933 These are usually LaTeX messages.
1934 Others are downright cryptic.
1935 These are usually TeX error messages, and we really have
1939 what they mean or how to decipher them.
1943 \begin_layout Standard
1944 There's a general sequence you should follow if you get error messages:
1947 \begin_layout Enumerate
1948 Look at the LaTeX code you inserted for typos.
1951 \begin_layout Enumerate
1952 If there are no typos, check that you used the command(s) correctly.
1955 \begin_layout Enumerate
1956 If you get a bunch of error boxes piled up at the very top of the document—and
1957 especially if you see a
1958 \begin_inset Quotes eld
1962 \begin_inset Flex Code
1965 \begin_layout Plain Layout
1974 \begin_inset Quotes erd
1977 error—it means that there are errors in the preamble.
1978 Start debugging your preamble.
1981 \begin_layout Enumerate
1982 If you didn't add anything to the preamble and didn't add any LaTeX code
1983 to the document, the first suspect is your LaTeX distribution itself.
1984 Check for missing packages and install them.
1987 \begin_layout Enumerate
1988 Okay, so there are no missing packages.
1989 Did you use any of the fine-tuning options in LyX? Specifically, did you
1994 any of them, like trying to manually insert lots of
1995 \begin_inset Flex Code
1998 \begin_layout Plain Layout
2000 \begin_inset space ~
2009 \begin_inset Flex Code
2012 \begin_layout Plain Layout
2019 \begin_inset Flex Code
2022 \begin_layout Plain Layout
2028 ? Did you try to kludge something together with these instead of using the
2029 appropriate paragraph environment?
2032 \begin_layout Enumerate
2033 All right, you didn't use any of the fine-tuning options, you played by
2035 Did you try to pull a fancy maneuver? Did you do something funky inside
2036 a table or an equation, like inserting a graphic into a table cell?
2039 \begin_layout Enumerate
2040 Do you have long sections of text where LaTeX cannot find a place to break
2041 a line? By default, LaTeX is rather strict about how much extra inter-word
2042 spacing it will add in order to break a line.
2043 Preferably, you should rework the paragraph to avoid the problem.
2044 If this isn't an option, you can wrap your text in
2045 \begin_inset Flex Code
2048 \begin_layout Plain Layout
2056 to make LaTeX's line breaking more, well, sloppy.
2059 \begin_layout Enumerate
2060 Did you go overboard with the nesting? LyX (currently) doesn't check to
2061 make sure you're in the limits for nesting environments.
2062 If you nested a bunch of environments to the
2063 \begin_inset Formula $17^{\mathrm{th}}$
2066 level, that's the problem.
2067 (The limit in LaTeX is five.)
2070 \begin_layout Enumerate
2071 Okay, you didn't get any error messages, but your output looks awful.
2072 If you have a table or figure that's too wide or long for the page, you
2077 \begin_layout Enumerate
2078 rescale the figure so it fits.
2081 \begin_layout Enumerate
2082 trim down the table so it fits.
2086 \begin_layout Enumerate
2087 If something else is wrong with the output, and you didn't try to pull anything
2088 fancy or kludge the fine-tuning options, we're not sure what's wrong.
2091 \begin_layout Standard
2092 If all this doesn't help—well, then
2096 you might have found a bug in LyX\SpecialChar \ldots{}
2100 \begin_layout Chapter
2104 \begin_layout Section
2105 Customizing Bibliographies with BibTeX
2108 \begin_layout Standard
2109 The most basic information about how to use BibTeX with LyX is contained
2112 Bibliography databases (BibTeX)
2119 The following subsections explain special bibliography features supported
2123 \begin_layout Subsection
2124 Alternative Citation Styles
2127 \begin_layout Standard
2128 Standard BibTeX uses numbers (e.
2129 \begin_inset space \thinspace{}
2133 \begin_inset space \space{}
2137 \begin_inset Quotes eld
2141 \begin_inset Quotes erd
2144 ) to refer to a cited work.
2145 However, in many scientific disciplines, other citation styles are in use.
2146 The most common one is the author-year style (e.
2147 \begin_inset space \thinspace{}
2151 \begin_inset space \space{}
2155 \begin_inset Quotes eld
2159 \begin_inset Quotes erd
2163 LyX supports two packages that provide this style,
2164 \begin_inset Flex Code
2167 \begin_layout Plain Layout
2174 \begin_inset Flex Code
2177 \begin_layout Plain Layout
2184 Both packages have their pros and cons, which cannot be listed in detail.
2185 If you only want to have simple author-year (or author-numerical) style,
2186 or if you want to use one of the countless style files for
2187 \begin_inset Flex Code
2190 \begin_layout Plain Layout
2196 , then the established
2197 \begin_inset Flex Code
2200 \begin_layout Plain Layout
2206 package is probably your choice.
2207 If you need special features like short title references, ibidem etc., you
2209 \begin_inset Flex Code
2212 \begin_layout Plain Layout
2221 \begin_layout Standard
2222 The handling of both packages in LyX is basically the same.
2224 \begin_inset Flex MenuItem
2227 \begin_layout Plain Layout
2228 Document\SpecialChar \menuseparator
2235 \begin_inset Flex MenuItem
2238 \begin_layout Plain Layout
2245 \begin_inset Flex MenuItem
2248 \begin_layout Plain Layout
2255 \begin_inset Flex MenuItem
2258 \begin_layout Plain Layout
2265 With both packages, you will get some extra features in the citation dialog
2266 and you can select the style of the reference (
2267 \begin_inset Quotes eld
2271 \begin_inset Quotes erd
2275 \begin_inset Quotes eld
2279 \begin_inset Quotes erd
2283 \begin_inset Quotes eld
2287 \begin_inset Quotes erd
2291 \begin_inset Quotes eld
2295 \begin_inset Quotes erd
2299 Note that both packages need specifically designed style files.
2300 They both ship their own, but there are lots of additional style files,
2301 and there is even an interactive style file builder
2305 \begin_layout Plain Layout
2307 \begin_inset Flex URL
2310 \begin_layout Plain Layout
2312 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2323 \begin_inset Flex Code
2326 \begin_layout Plain Layout
2335 \begin_layout Subsection
2336 Sectioned Bibliographies
2339 \begin_layout Standard
2340 Sometimes you might need to divide your bibliography into several sections.
2341 If you are for instance a historian, the possibility to separate sources
2342 and scientific works is most likely a
2343 \begin_inset Quotes eld
2347 \begin_inset Quotes erd
2351 Unfortunately, BibTeX itself does not allow you to do this.
2352 But with the help of some LaTeX packages, BibTeX can be extended to fit
2356 \begin_layout Standard
2357 LyX provides native support for one of these packages,
2365 \begin_layout Plain Layout
2367 \begin_inset Flex URL
2370 \begin_layout Plain Layout
2372 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2382 The advantage of this package (compared to other packages like
2386 ) is that you don't need to define new citation commands.
2387 Instead, you need to prepare different bibliographic databases which include
2388 the entries for the different sections of the bibliography.
2389 For example: If you want to divide your bibliography into the sections
2391 \begin_inset Quotes eld
2395 \begin_inset Quotes erd
2399 \begin_inset Quotes eld
2403 \begin_inset Quotes erd
2406 , you first need to create two bibliographic databases, e.
2407 \begin_inset space \thinspace{}
2411 \begin_inset space \space{}
2415 \begin_inset Flex Code
2418 \begin_layout Plain Layout
2425 \begin_inset Flex Code
2428 \begin_layout Plain Layout
2438 \begin_layout Standard
2440 \begin_inset Flex MenuItem
2443 \begin_layout Plain Layout
2444 Document\SpecialChar \menuseparator
2451 \begin_inset Flex MenuItem
2454 \begin_layout Plain Layout
2461 \begin_inset Flex MenuItem
2464 \begin_layout Plain Layout
2465 Sectioned bibliography
2471 Now you can insert multiple BibTeX bibliographies, one for each section
2472 of your bibliography.
2473 Returning to our example: Insert the BibTeX bibliography
2474 \begin_inset Flex Code
2477 \begin_layout Plain Layout
2483 and a second one for the database
2484 \begin_inset Flex Code
2487 \begin_layout Plain Layout
2494 You are free to use the same or different styles for each section.
2495 Additionally, you can choose if the bibliography section should contain
2497 \begin_inset Quotes eld
2500 all cited references
2501 \begin_inset Quotes erd
2504 of the specified database(s) (which is the default),
2505 \begin_inset Quotes eld
2508 all uncited references
2509 \begin_inset Quotes erd
2513 \begin_inset Quotes eld
2517 \begin_inset Quotes erd
2521 This might be useful if you would like to separate your bibliography into
2523 \begin_inset Quotes eld
2527 \begin_inset Quotes erd
2531 \begin_inset Quotes eld
2535 \begin_inset Quotes erd
2539 \begin_inset Quotes eld
2543 \begin_inset Quotes erd
2547 The titles for the sections can be added as ordinary sections or subsections.
2549 \begin_inset Flex Code
2552 \begin_layout Plain Layout
2558 removes the bibliography title, you have to manually re-add that, too (as
2559 a chapter* or section*, for instance).
2562 \begin_layout Subsection
2563 Multiple Bibliographies
2566 \begin_layout Standard
2567 Multiple bibliographies, e.
2568 \begin_inset space \thinspace{}
2572 \begin_inset space \space{}
2575 a bibliography for each section or chapter of the document, are not supported
2578 \begin_inset Flex Code
2581 \begin_layout Plain Layout
2587 package, which is used for the creation of sectioned bibliographies in
2588 LyX (see the previous section), provides an easy way to solve this task,
2589 if you are willing to use some
2590 \begin_inset Flex MenuItem
2593 \begin_layout Plain Layout
2600 \begin_inset space ~
2604 \begin_inset CommandInset ref
2606 reference "sec:Inserting-TeX-Code"
2614 \begin_layout Plain Layout
2615 An alternative approach is to use the
2616 \begin_inset Flex Code
2619 \begin_layout Plain Layout
2626 \begin_inset Flex Code
2629 \begin_layout Plain Layout
2635 package, respectively.
2643 \begin_layout Standard
2645 \begin_inset Flex MenuItem
2648 \begin_layout Plain Layout
2649 Document\SpecialChar \menuseparator
2656 \begin_inset Flex MenuItem
2659 \begin_layout Plain Layout
2666 \begin_inset Flex MenuItem
2669 \begin_layout Plain Layout
2670 Sectioned bibliography
2676 In the document, you have to enclose the sections, which shall contain
2677 their own bibliography (including the BibTeX bibliography itself), between
2679 \begin_inset Flex Code
2682 \begin_layout Plain Layout
2691 \begin_inset Flex Code
2694 \begin_layout Plain Layout
2702 (those commands have to be inserted as TeX code).
2703 The bibliography will contain all references that have been cited in the
2705 \begin_inset Flex Code
2708 \begin_layout Plain Layout
2719 If you are using this approach, then every citation reference has to be
2721 \begin_inset Flex Code
2724 \begin_layout Plain Layout
2732 \begin_inset Flex Code
2735 \begin_layout Plain Layout
2744 \begin_layout Section
2748 \begin_layout Subsection
2752 \begin_layout Standard
2753 When you are working on a large file with many sections, it is often convenient
2754 to break up the document into several files, or perhaps you have something
2755 where a table may change from time to time, but the preceding text does
2757 In these cases, you should seriously consider using multipart documents.
2758 For example, scientific papers often have five major sections: the introduction
2759 , observations, results, discussion, and conclusion.
2760 Each of these could be its own separate LyX file, with one
2761 \begin_inset Quotes eld
2765 \begin_inset Quotes erd
2768 file which contains the title, authors, abstract, references, etc., plus
2769 the five included files.
2770 It is important to note that each of these files is a full LyX file which
2771 can be formatted and printed on its own, as well as included in a master
2773 Each of these files must have the same document class, however—don't attempt
2774 to mix book classes with article classes.
2775 You may also include LaTeX files; however, these files must not have their
2777 \begin_inset space \thinspace{}
2781 \begin_inset space \space{}
2784 everything up to and including the
2785 \begin_inset Flex Code
2788 \begin_layout Plain Layout
2797 \begin_inset Flex Code
2800 \begin_layout Plain Layout
2808 line must be deleted) or else errors will be generated when you try to
2812 \begin_layout Standard
2813 LyX allows you to include files quite easily with
2814 \begin_inset Flex MenuItem
2817 \begin_layout Plain Layout
2818 Insert\SpecialChar \menuseparator
2820 \begin_inset space ~
2829 When you click on this selection a small box is inserted into the file
2830 at the current cursor location.
2831 Clicking on the box raises a dialog which allows you to select the file
2832 to be included, and the method of its inclusion.
2836 \begin_layout Standard
2837 The file selection box should by now be obvious.
2838 The three inclusion methods are
2839 \begin_inset Quotes eld
2843 \begin_inset Quotes erd
2847 \begin_inset Quotes eld
2851 \begin_inset Quotes erd
2855 \begin_inset Quotes eld
2859 \begin_inset Quotes erd
2863 The difference between
2864 \begin_inset Quotes eld
2868 \begin_inset Quotes erd
2872 \begin_inset Quotes eld
2876 \begin_inset Quotes erd
2879 is really only meaningful to LaTeXperts, but the practical difference is
2881 \begin_inset Quotes eld
2885 \begin_inset Quotes erd
2888 are typeset beginning on a new page, while files that are
2889 \begin_inset Quotes eld
2893 \begin_inset Quotes erd
2896 are typeset starting on the current page.
2899 \begin_layout Standard
2900 Generally, the master file is converted into a full LaTeX file before typesettin
2901 g, while the included files are converted to LaTeX files that do not have
2902 all the preamble information.
2905 \begin_layout Standard
2907 \begin_inset Quotes eld
2911 \begin_inset Quotes erd
2914 included file allows you to include a file typeset exactly as it appears
2916 \begin_inset space \thinspace{}
2920 \begin_inset space \space{}
2924 \begin_inset Flex Code
2927 \begin_layout Plain Layout
2933 mode, with the characters set in a fixed-width typewriter font.
2934 Normally, spaces in this file are invisible, though two consecutive spaces
2935 are conserved, unlike LyX's normal treatment of spaces.
2936 However, setting the
2937 \begin_inset Flex MenuItem
2940 \begin_layout Plain Layout
2942 \begin_inset space ~
2946 \begin_inset space ~
2950 \begin_inset space ~
2958 checkbox typesets a mark to unambiguously define the presence of a space.
2962 \begin_layout Subsection
2963 Cross-References Between Files
2966 \begin_layout Standard
2967 \begin_inset Box Shadowbox
2977 height_special "totalheight"
2980 \begin_layout Plain Layout
2981 This section is somewhat out of date.
2982 Need to describe default master documents and how children are opened when
2992 \begin_layout Standard
2993 It is possible to set up cross-references between the different files.
2994 First, open all the files in question: let's call them A and B in a two
2995 file example, where B is included in A.
2996 Let's say you insert a label in A, then want to reference it in B.
2997 Open the cross-reference dialog whilst in document B, and you can select
2999 \begin_inset Quotes eld
3003 \begin_inset Quotes erd
3009 \begin_layout Subsection
3010 Bibliography Lists in all Subdocuments
3013 \begin_layout Standard
3014 \begin_inset Box Frameless
3024 height_special "totalheight"
3027 \begin_layout Plain Layout
3028 This section also needs updating.
3029 There is now material about this on the wiki, and it could be copied here.
3037 \begin_layout Standard
3038 Copy the bibliography list with all entries to all subdocuments and transform
3040 This way LyX will find the
3041 \begin_inset Flex Code
3044 \begin_layout Plain Layout
3050 -files and you can easily insert references without making the bibliography
3054 \begin_layout Standard
3055 As the bibliography list is in a comment, LaTeX won't use use it and the
3056 references will look like this: [?], instead of like this: [1].
3057 One solution is to use the LaTeX-package
3058 \begin_inset Flex Code
3061 \begin_layout Plain Layout
3067 that will only include comments by processing the files separately.
3068 To do this, add in the LaTeX preamble of every subdocument the following:
3071 \begin_layout LyX-Code
3077 \begin_layout LyX-Code
3080 includecomment{comment}
3083 \begin_layout Standard
3085 \begin_inset Flex URL
3088 \begin_layout Plain Layout
3090 http://wiki.lyx.org/FAQ/Unsorted#toc31
3098 \begin_layout Section
3102 \begin_layout Standard
3103 Users sometimes need to be able to
3104 \begin_inset Quotes eld
3108 \begin_inset Quotes erd
3111 a LyX file together with all the images (and other files) on which it depends,
3112 either for sending to a publisher or for sharing with a co-author.
3113 LyX 2.0 includes a Python script (
3114 \begin_inset Flex Code
3117 \begin_layout Plain Layout
3123 ) that automates this process.
3124 To use it, you must have either the
3125 \begin_inset Flex Code
3128 \begin_layout Plain Layout
3135 \begin_inset Flex Code
3138 \begin_layout Plain Layout
3144 python modules installed on your system.
3145 By default, the script prefers the
3146 \begin_inset Flex Code
3149 \begin_layout Plain Layout
3156 \begin_inset Flex Code
3159 \begin_layout Plain Layout
3165 format on Unix-like systems and the
3166 \begin_inset Flex Code
3169 \begin_layout Plain Layout
3178 \begin_layout Standard
3179 LyX's configuration process will set the script up to export a `LyX Archive',
3180 and this format will then be available under
3181 \begin_inset Flex Code
3184 \begin_layout Plain Layout
3185 File\SpecialChar \menuseparator
3194 \begin_layout Standard
3195 Independently of the platform, the generation of a particular archive format
3196 can be forced by adding either the
3197 \begin_inset Flex Code
3200 \begin_layout Plain Layout
3207 \begin_inset Flex Code
3210 \begin_layout Plain Layout
3217 \begin_inset Flex Code
3220 \begin_layout Plain Layout
3227 \begin_inset Flex Code
3230 \begin_layout Plain Layout
3236 format) switch to the
3237 \begin_inset Flex Code
3240 \begin_layout Plain Layout
3241 LyX\SpecialChar \menuseparator
3248 \begin_inset Flex Code
3251 \begin_layout Plain Layout
3252 Tools\SpecialChar \menuseparator
3253 Preferences\SpecialChar \menuseparator
3254 File Handling\SpecialChar \menuseparator
3261 (Make sure you add the switch after the script name, not before it.)
3264 \begin_layout Section
3265 Fancy Headers and Footers
3268 \begin_layout Standard
3269 The default page layout is rather plain; for an
3270 \begin_inset Flex Code
3273 \begin_layout Plain Layout
3279 document class, all you get is a centered page number at the bottom of
3281 This document uses KOMA-script's book class, so it appears to be a bit
3283 But to really put on a show, you need to set the document page style to
3285 \begin_inset Quotes eld
3289 \begin_inset Quotes erd
3292 , as mentioned in the
3297 This section describes the LaTeX code you need to insert in your LaTeX
3298 preamble in order to get the desired effects.
3301 \begin_layout Standard
3302 For more information on fancy headers, see the
3303 \begin_inset Flex Code
3306 \begin_layout Plain Layout
3312 package documentation.
3314 \begin_inset Flex URL
3317 \begin_layout Plain Layout
3319 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3327 \begin_layout Standard
3328 The page header is divided into three fields, not surprisingly labeled
3329 \begin_inset Quotes eld
3333 \begin_inset Quotes erd
3337 \begin_inset Quotes eld
3341 \begin_inset Quotes erd
3345 \begin_inset Quotes eld
3349 \begin_inset Quotes erd
3353 The footer is also divided into these three fields.
3354 The LaTeX commands to set these fields in the simplest manner are
3355 \begin_inset Flex Code
3358 \begin_layout Plain Layout
3367 \begin_inset Flex Code
3370 \begin_layout Plain Layout
3379 \begin_inset Flex Code
3382 \begin_layout Plain Layout
3391 \begin_inset Flex Code
3394 \begin_layout Plain Layout
3403 Suppose you wish to put your name in the upper left hand corner of each
3405 Simply insert the following command in the preamble:
3408 \begin_layout Standard
3417 \begin_layout Standard
3418 You will now see your name in the upper left.
3419 If a field has a default entry that you would like to get rid of (often
3420 the page number appears in the central footer) simply include a command
3421 with a blank argument, e.
3422 \begin_inset space \thinspace{}
3428 \begin_layout Standard
3436 \begin_layout Standard
3437 Let's get really fancy: lets put the section number with the word
3438 \begin_inset Quotes eld
3442 \begin_inset Quotes erd
3446 \begin_inset space \thinspace{}
3450 \begin_inset space \space{}
3453 Section 3) in the upper left, the page number (e.
3454 \begin_inset space \thinspace{}
3458 \begin_inset space \space{}
3461 Page 4) in the upper right, your name in the lower left, and the date in
3463 The following commands should now appear in the preamble:
3466 \begin_layout Standard
3476 \begin_layout Standard
3484 \begin_layout Standard
3494 \begin_layout Standard
3503 \begin_layout Standard
3511 \begin_layout Standard
3521 \begin_layout Standard
3523 \begin_inset Flex Code
3526 \begin_layout Plain Layout
3535 \begin_inset Flex Code
3538 \begin_layout Plain Layout
3546 access LaTeX's section and page counters, and so print out the current
3547 section and page numbers.
3549 \begin_inset Flex Code
3552 \begin_layout Plain Layout
3560 simply prints out today's date.
3563 \begin_layout Standard
3564 The thicknesses of the horizontal rules drawn beneath the header and above
3565 the footer can also be modified.
3566 If you don't want one of the rules, set its thickness to 0.
3567 The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3573 \begin_inset Flex Code
3576 \begin_layout Plain Layout
3581 headrulewidth}{0.4pt}
3587 \begin_inset Flex Code
3590 \begin_layout Plain Layout
3595 footrulewidth}{0.4pt}
3600 to set the thicknesses.
3603 \begin_layout Standard
3604 You can switch the header/footer settings on and off for individual pages
3606 \begin_inset Flex Code
3609 \begin_layout Plain Layout
3612 thispagestyle{empty}
3618 \begin_inset Flex Code
3621 \begin_layout Plain Layout
3624 thispagestyle{plain}
3630 \begin_inset Flex Code
3633 \begin_layout Plain Layout
3636 thispagestyle{fancy}
3642 Simply insert them in the text on the page you want changed and mark them
3644 In fact, title pages are marked as plain by default, while following pages
3645 are marked fancy when using the global fancy setting.
3648 \begin_layout Standard
3649 As a final example, it is possible to include an image in the header or
3651 Suppose you want to put a company logo in the upper lefthand corner.
3652 You might try something like
3655 \begin_layout Standard
3664 includegraphics{logo.eps}}}
3667 \begin_layout Standard
3669 (you may need to preface this with
3670 \begin_inset Flex Code
3673 \begin_layout Plain Layout
3677 usepackage{graphics}
3682 if you don't include graphics elsewhere in your document).
3685 \begin_layout Section
3686 Itemize Bullet Selection
3687 \begin_inset CommandInset label
3696 \begin_layout Standard
3702 \begin_layout Subsection
3706 \begin_layout Standard
3707 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3708 Using this dialog you can easily specify what bullet shape to use at each
3709 level of an itemized list.
3710 These settings are document-wide so you won't be able to specify different
3711 sets of bullets for different paragraphs.
3715 \begin_layout Plain Layout
3716 Well, actually you can but you'll have to do it by hand.
3724 \begin_layout Subsection
3728 \begin_layout Standard
3729 Open the dialog by selecting the
3730 \begin_inset Flex MenuItem
3733 \begin_layout Plain Layout
3734 Document\SpecialChar \menuseparator
3740 menu item and then select the
3741 \begin_inset Flex MenuItem
3744 \begin_layout Plain Layout
3753 \begin_layout Standard
3754 The dialog provides you with a table of bullet shapes.
3755 A column of buttons on the left of the table provides access to the six
3756 different panels of bullet shapes.
3757 The row of buttons across the top is used to select which bullet depth
3759 A text entry under the table shows the currently selected bullet shape's
3760 LaTeX equivalent and this can be edited if desired.
3761 If you do modify the text you will also need to specify any needed packages
3762 in the LaTeX preamble.
3765 \begin_layout Standard
3766 The six panels are divided up by the packages they require.
3767 The following table shows the mappings from button name to LaTeX package.
3770 \begin_layout Standard
3772 \begin_inset Tabular
3773 <lyxtabular version="3" rows="7" columns="2">
3774 <features tabularvalignment="middle">
3775 <column alignment="center" valignment="top" width="0pt">
3776 <column alignment="center" valignment="top" width="0pt">
3778 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3781 \begin_layout Plain Layout
3796 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3799 \begin_layout Plain Layout
3816 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3819 \begin_layout Plain Layout
3834 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3837 \begin_layout Plain Layout
3853 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3856 \begin_layout Plain Layout
3871 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3874 \begin_layout Plain Layout
3891 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3894 \begin_layout Plain Layout
3909 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3912 \begin_layout Plain Layout
3929 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3932 \begin_layout Plain Layout
3947 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3950 \begin_layout Plain Layout
3967 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3970 \begin_layout Plain Layout
3985 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3988 \begin_layout Plain Layout
4005 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4008 \begin_layout Plain Layout
4023 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4026 \begin_layout Plain Layout
4049 \begin_layout Standard
4050 LyX doesn't stop you using bullets from packages you don't have.
4051 If you get errors from LaTeX when you try to view or print the file, then
4052 it is likely you are missing a package.
4056 \begin_layout Plain Layout
4057 LyX doesn't restrict your use since you may be editing locally and exporting
4066 \begin_layout Subsection
4070 \begin_layout Standard
4071 Select which bullet depth you want to change then select the bullet shape
4073 Any changes will not be visible in LyX, but are visible when viewing the
4077 \begin_layout Standard
4078 You can reset a bullet shape to the default simply by clicking your right
4079 mouse button on the appropriate bullet depth button.
4083 \begin_layout Plain Layout
4088 want to have multiple sets of paragraphs with different sets of bullets
4089 in each, then you're going to have to get your hands dirty with TeX code.
4090 The bullet selection dialog can help though because it provides you with
4091 the LaTeX code for a wide range of bullet shapes.
4092 To make your own custom paragraphs you have the following options:
4095 \begin_layout Plain Layout
4099 \begin_layout Plain Layout
4115 \begin_layout Plain Layout
4119 \begin_layout Plain Layout
4141 \begin_layout Itemize
4142 Use the LaTeX command
4143 \begin_inset Flex Code
4146 \begin_layout Plain Layout
4154 to specify a new bullet shape for a given depth.
4155 You'll also need to save the current bullet shape so you can restore it
4157 In this itemized list the following LaTeX code was used to change the bullet
4158 used for the first depth.
4162 \begin_layout LyX-Code
4172 \begin_layout LyX-Code
4189 \begin_layout Itemize
4190 Note that the itemize depth is specified in Roman numerals as part of the
4200 \begin_layout Itemize
4204 \begin_layout Plain Layout
4217 Specify each individual entry by starting each item with the bullet shape
4218 enclosed in square brackets and set as
4219 \begin_inset Flex MenuItem
4222 \begin_layout Plain Layout
4229 For example, this item was started with
4230 \begin_inset Flex Code
4233 \begin_layout Plain Layout
4248 \begin_layout Plain Layout
4252 \begin_layout Plain Layout
4268 \begin_layout Plain Layout
4269 You'll also need to revert the labelitem back to its previous setting for
4270 the global bullet shape settings to remain in effect.
4271 The way used here was:
4274 \begin_layout LyX-Code
4289 \begin_layout Chapter
4290 LyX and the World Wide Web
4293 \begin_layout Standard
4294 LyX has long supported the export of documents to various web-friendly formats,
4296 Before verson 2.0, however, HTML export was always accomplished by the use
4297 of external converters.
4301 \begin_layout Plain Layout
4302 For details on the use of external converters with LyX, see the
4306 section of the Customization manual.
4311 These fall into two large groups: there are converters that use LaTeX as
4312 an intermediate format, such as
4313 \begin_inset Flex Code
4316 \begin_layout Plain Layout
4323 \begin_inset Flex Code
4326 \begin_layout Plain Layout
4333 \begin_inset Flex Code
4336 \begin_layout Plain Layout
4342 , relying upon LyX to produce the LaTeX; and there is a converter that works
4343 directly on LyX files,
4344 \begin_inset Flex Code
4347 \begin_layout Plain Layout
4354 All of these have different advantages and disadvantages.
4358 \begin_layout Standard
4359 The LaTeX-based converters have the advantage that, in principle, they know
4360 everything about the exported document that LaTeX does.
4361 Such converters do not care, for example, if a certain block of code was
4362 produced by LyX or was Evil Red Text.
4363 These converters know about
4364 \begin_inset Flex Code
4367 \begin_layout Plain Layout
4373 files, counters, and references, and can often make use of the
4374 \begin_inset Flex Code
4377 \begin_layout Plain Layout
4383 files generated by BibTeX.
4384 On the other hand, LaTeX is a very hard language to parse---it is sometimes
4385 said that only TeX itself understands TeX---and LaTeX-based converters
4386 will often choke on what seem to be quite simple constructs; complex ones
4387 can throw them completely, and as of this writing, for example, the
4391 manual will not export with
4392 \begin_inset Flex Code
4395 \begin_layout Plain Layout
4401 , though the others will.
4402 The other issue concerns how math is handled.
4403 These converters typically convert the formulae into little pictures that
4404 are then linked from the HTML document.
4405 Since these are actually generated by LaTeX, they are accurate.
4406 But they do not scale well, and just getting them to look as if they are
4407 actually meant to be in your document---so that the font sizes seem to
4408 be roughly the same---can be a challenge.
4411 \begin_layout Standard
4413 \begin_inset Flex Code
4416 \begin_layout Plain Layout
4423 \begin_inset CommandInset href
4425 name "http://elyxer.nongnu.org/"
4426 target "http://elyxer.nongnu.org/"
4430 ) solves some of these problems.
4431 In particular, the formulae it produces scale perfectly, since it renders
4432 math using a combination of HTML and CSS rather than converting the formulae
4434 But even moderately complex formula are rendered less well than with
4435 \begin_inset Flex Code
4438 \begin_layout Plain Layout
4444 ; this reflects the limitations of HTML.
4448 \begin_layout Plain Layout
4450 \begin_inset Flex Code
4453 \begin_layout Plain Layout
4459 can also use jsMath and MathJax for equations, but this setting is only
4460 available globally and requires one to have access to a server that runs
4466 More importantly (as of version 1.1.1, at least),
4467 \begin_inset Flex Code
4470 \begin_layout Plain Layout
4476 has limited support for math macros and no support for user-defined paragraph
4477 or character styles.
4478 These limitations make
4479 \begin_inset Flex Code
4482 \begin_layout Plain Layout
4488 unsuitable for many of the documents LyX users produce.
4489 In principle, of course, these problems could be solved, but the LyX developers
4490 have decided to follow a different path and have made LyX itself capable
4491 of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4495 \begin_layout Standard
4496 As of this writing, XHTML output remains under development and should probably
4498 \begin_inset Quotes eld
4502 \begin_inset Quotes erd
4509 \begin_layout Plain Layout
4511 \begin_inset Flex Code
4514 \begin_layout Plain Layout
4515 development/HTML.notes
4520 , which can be found in the LyX source tree or
4521 \begin_inset CommandInset href
4523 name "accessed online"
4524 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4528 , usually contains up-to-date information about the state of XHTML output.
4529 See also the list of XHTML bugs on
4530 \begin_inset CommandInset href
4532 name "the bug tracker"
4533 target "http://www.lyx.org/trac/query?status=reopened&status=assigned&status=new&max=0&component=xhtml+export&order=id&col=id&col=summary&col=reporter&col=keywords&keywords=%21%7Efixedintrunk&desc=1"
4542 Still, the developers have chosen this approach because it has several
4543 potential advantages over the other two.
4546 \begin_layout Standard
4547 These advantages are primarily due to the fact that the XHTML output routines,
4548 since they are part of LyX, know everything LyX knows about the document
4553 \begin_layout Plain Layout
4554 Another advantage is that, since these routines are internal to LyX, they
4555 are immune to changes in LyX's file format, or to changes in the semantics
4561 So they know about the table of contents (as displayed in the outline),
4562 about the counters associated with different paragraph styles, and about
4563 user-defined styles.
4564 The XHTML output routines know what LyX knows about internationalization,
4565 too, so they will output
4566 \begin_inset Quotes eld
4570 \begin_inset Quotes erd
4574 \begin_inset Quotes eld
4582 \begin_inset Quotes erd
4585 , depending upon the language in effect at the time.
4589 \begin_layout Standard
4590 Quite generally, the output routines know what LyX knows about document
4591 layout, that is, about how the document is to be rendered on screen.
4592 We use this information when we output the document as XHTML.
4597 generates CSS style information corresponding to the layout information
4598 it uses to render the document on screen: if section headings are supposed
4599 to be sans-serif and bold as seen in LyX, then (by default) they will be
4600 sans-serif and bold when viewed in a web browser, too.
4601 And this is true not just for pre-defined styles, like Section, but for
4602 any style, including user-defined styles.
4603 Indeed, the XHTML output routines make no distinction between user-defined
4604 paragraph and character styles and LyX's own pre-defined styles: in each
4605 case, everything LyX knows about the styles is contained in the layout
4607 And much the same is true as regards pre-defined textual insets, such as
4608 footnotes, and various custom insets.
4612 \begin_layout Standard
4613 The result is that XHTML output can be customized and extended in exactly
4614 the same way LaTeX output can be customized and extended: through layout
4616 See chapter five of the
4620 manual for the details.
4623 \begin_layout Standard
4624 The remainder of this chapter contains more detailed information on XHTML
4625 output, its limitations, and ways to work around those limitations.
4628 \begin_layout Section
4629 Math Output in XHTML
4632 \begin_layout Standard
4633 LyX offers four choices for how math is rendered.
4634 These have various advantages and disadvantages:
4637 \begin_layout Itemize
4639 \begin_inset Newline newline
4642 MathML is a dialect of XML designed specifically for mathematics on the
4643 web, and it typically renders very well in browsers that support it.
4644 The disadvantage is that not all browsers support MathML, and support is
4645 not complete even in the Gecko-based browsers, such as Firefox.
4646 \begin_inset Newline newline
4649 If LyX is unable to render a formula as MathML---for example, if the formula
4651 \begin_inset Flex Code
4654 \begin_layout Plain Layout
4660 package or ERT---then it will instead output the formula as an image.
4664 \begin_layout Itemize
4666 \begin_inset Newline newline
4670 \begin_inset Flex Code
4673 \begin_layout Plain Layout
4679 outputs math as HTML, styled by CSS.
4683 \begin_layout Plain Layout
4684 LyX has borrowed some of the CSS for its HTML output from
4685 \begin_inset Flex Code
4688 \begin_layout Plain Layout
4699 For simple formulae, this can work quite well, though with more complicated
4700 formulae it tends to break down.
4701 Still, this method has the advantage that it is very widely supported and
4702 so it may be appropriate for documents that contain only a little, fairly
4704 \begin_inset Newline newline
4707 If Lyx is unable to render a formula as HTML---for example, if the formula
4709 \begin_inset Flex Code
4712 \begin_layout Plain Layout
4718 package or ERT---then it will instead output the formula as an image.
4722 \begin_layout Itemize
4724 \begin_inset Newline newline
4728 \begin_inset Flex Code
4731 \begin_layout Plain Layout
4737 , LyX will output formulae as images, the very same images, in fact, that
4738 are used for instant preview.
4742 \begin_layout Plain Layout
4743 Instant preview does
4747 have to be on for images to be output, however.
4752 The advantage to this method is that the images are simply generated by
4753 LaTeX, so they are very accurate.
4754 The disadvantage, as mentioned earlier, is that these are bitmapped images,
4755 so they do not scale terribly well, and one cannot copy them, etc.
4756 (As of this writing, there are also problems about equation numbering.
4758 \begin_inset CommandInset href
4761 target "http://www.lyx.org/trac/ticket/6894"
4766 \begin_inset Newline newline
4769 The size of the images can be controlled by setting the
4770 \begin_inset Quotes eld
4774 \begin_inset Quotes erd
4778 \begin_inset Flex MenuItem
4781 \begin_layout Plain Layout
4782 Document\SpecialChar \menuseparator
4783 Settings\SpecialChar \menuseparator
4793 \begin_layout Plain Layout
4794 For those who want to know, this controls the resolution of the image in
4795 dots per inch and is based upon a default of 75 dpi.
4801 \begin_inset Newline newline
4804 If LyX for some reason fails to create an image for a formula (e.g., if a
4805 required LaTeX package is not installed), then it will fall back to outputing
4809 \begin_layout Itemize
4811 \begin_inset Newline newline
4814 Finally, LyX will happily output math as LaTeX.
4815 As well as being the output of last resort, this method can be used with
4817 \begin_inset CommandInset href
4820 target "http://www.math.union.edu/~dpvc/jsMath/"
4824 , which uses JavaScript to render LaTeX embedded in HTML documents.
4825 LyX wraps the LaTeX in either a
4826 \begin_inset Flex Code
4829 \begin_layout Plain Layout
4835 (for inline formulas) or
4836 \begin_inset Flex Code
4839 \begin_layout Plain Layout
4845 (for displayed formulas) with
4846 \begin_inset Flex Code
4849 \begin_layout Plain Layout
4855 , as is required for jsMath.
4858 \begin_layout Standard
4859 One of these output methods must be selected under
4860 \begin_inset Flex MenuItem
4863 \begin_layout Plain Layout
4864 Document\SpecialChar \menuseparator
4865 Settings\SpecialChar \menuseparator
4872 By default, LyX outputs MathML.
4873 This is a document-wide setting, therefore.
4876 \begin_layout Standard
4877 Eventually, LyX will offer the user the option to select an alternate output
4878 method for a particular inset, say, one that isn't being rendered very
4883 \begin_layout Plain Layout
4884 That said, since LyX falls back to images if the inset contains ERT, then
4885 one can force output as an image by putting some harmless ERT into the
4887 \begin_inset Formula $a=b\relax$
4898 \begin_layout Section
4899 Bibliography and Citations
4902 \begin_layout Standard
4903 XHTML output fully supports bibliographies and citations.
4907 \begin_layout Standard
4908 Citation labels are generated by the same machinery that generates LyX's
4909 on-screen labels, so the labels will look in the output much as they do
4910 in LyX, though better.
4911 If you are using numerical citations, then LyX will output numerical labels,
4912 such as [1] or [17], rather than simply showing the citation key in square
4913 brackets, as it does on-screen.
4914 If you are using author-year citations, then LyX will add lowercase letters
4915 to the years, just as BibTeX does, if it finds more than one citation for
4916 a given author-year combination.
4917 The labels will be printed with the bibliography entries.
4918 Note that there is, at present, no way to customize the appearance of the
4919 labels, for example, to choose between square brackets and parentheses.
4922 \begin_layout Standard
4923 Bibliography output is handled by the same machinery that handles the presentati
4924 on of reference information in the citation dialog, so you will see in the
4925 XHTML output pretty much what you would see if you were to look at a given
4926 entry in the citation dialog.
4927 The formatting can be customized in your layout file or, preferably, in
4933 manual for the details.
4936 \begin_layout Standard
4937 The main defect at present is that cross-referenced information is printed
4938 with every entry with which it is associated.
4939 So you can see things like this:
4944 \begin_inset Quotes eld
4947 Context and Logical Form
4948 \begin_inset Quotes erd
4953 Language in Context: Selected Essays
4955 (Oxford: Oxford University Press, 2007), pp.
4961 \begin_inset Quotes eld
4964 Semantics in Context
4965 \begin_inset Quotes erd
4970 Language in Context: Selected Essays
4972 (Oxford: Oxford University Press, 2007), pp.
4976 \begin_layout Standard
4977 This should be fixed before long.
4980 \begin_layout Standard
4981 There is no support at present for sectioned bibliographies.
4982 If you have multiple bibliographies, then LyX will print the same bibliography
4986 \begin_layout Section
4990 \begin_layout Standard
4991 LyX will happily export indexes as XHTML, but with certain limitations at
4995 \begin_layout Standard
4996 Index export will be most reliable when you do not attempt to use the fancy
4997 constructs that are described in the section on indexes in the
5005 \begin_layout Plain Layout
5006 The main issue here is that LyX itself does not really handle these.
5007 It just lets you enter what you would have to enter in raw LaTeX.
5012 We'll describe how they are handled using the subsection headings from
5016 \begin_layout Itemize
5017 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
5018 these, but the entries must be separated by
5019 \begin_inset Quotes eld
5023 \begin_inset Quotes erd
5026 , that is, there must be spaces around the exclamation point.
5027 This is because it is otherwise too difficult to check for escaped exclamation
5028 points, ones in math, and so forth.
5031 \begin_layout Itemize
5032 Page Ranges: There is no support at all for page ranges, since these make
5033 no sense with XHMTL.
5034 Instead, you will just get two index entries, one at either end.
5037 \begin_layout Itemize
5038 Cross-referencing: There is no support for cross-referencing.
5039 If LyX finds an entry containing the
5040 \begin_inset Quotes eld
5043 |see\SpecialChar \ldots{}
5045 \begin_inset Quotes erd
5048 construct, it is just dropped, and the rest is treated as an ordinary index
5052 \begin_layout Itemize
5053 Index Entry Order: LyX does support attempts to fix the sorting order.
5054 It will take what is before the first `@' it finds and use that for sorting,
5055 taking what follows the first `@' to be the actual entry.
5056 At present, LyX does not check for escaped `@', so do not try to index
5060 \begin_layout Itemize
5061 Index Entry Layout: You can format entries by using the text style dialog,
5062 or by using any other method available within LyX itself.
5063 There is no support for constructs like:
5064 \begin_inset Quotes eld
5068 \begin_inset Quotes erd
5072 Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
5073 and everything that follows it.
5076 \begin_layout Itemize
5077 Multiple Indexes: There is no support for multiple indexes.
5078 Rather, all index entries will be printed as one large index.
5079 To avoid our printing several versions of the index, we print only the
5080 main index, so make sure you have one.
5083 \begin_layout Section
5084 Nomenclature and Glossary
5087 \begin_layout Standard
5088 There is at present no support for glossaries.
5089 Adding it would be fairly trivial, and welcome.
5092 \begin_layout Chapter
5096 \begin_layout Section
5100 \begin_layout Standard
5101 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
5102 and retrieve information about the LyX internal state.
5103 This is only intended for advanced users, but they should find it useful.
5104 It is by writing to the LyX server, for example, that bibliography managers,
5105 such as JabRef, are able to
5106 \begin_inset Quotes eld
5110 \begin_inset Quotes erd
5116 \begin_layout Section
5117 Starting the LyX Server
5120 \begin_layout Standard
5121 The LyX server works through the use of a pair of named pipes.
5122 These are usually located in
5123 \begin_inset Flex Code
5126 \begin_layout Plain Layout
5132 , (except on Windows, where
5136 named pipes are special objects located in
5137 \begin_inset Flex Code
5140 \begin_layout Plain Layout
5152 ) and have the names
5153 \begin_inset Quotes eld
5157 \begin_inset Flex Code
5160 \begin_layout Plain Layout
5167 \begin_inset Quotes erd
5171 \begin_inset Quotes eld
5175 \begin_inset Flex Code
5178 \begin_layout Plain Layout
5185 \begin_inset Quotes erd
5189 External programs write into
5190 \begin_inset Flex Code
5193 \begin_layout Plain Layout
5199 and read back data from
5200 \begin_inset Flex Code
5203 \begin_layout Plain Layout
5210 The stem of the pipe names can be defined in the
5211 \begin_inset Flex MenuItem
5214 \begin_layout Plain Layout
5215 Tools\SpecialChar \menuseparator
5222 \begin_inset Flex Code
5225 \begin_layout Plain Layout
5226 "/home/myhome/lyxpipe"
5232 \begin_inset Flex Code
5235 \begin_layout Plain Layout
5249 on Windows (but any working path can be used).
5254 configure this manually in order for the server to start.
5257 \begin_layout Standard
5259 \begin_inset Flex Code
5262 \begin_layout Plain Layout
5269 \begin_inset Flex Code
5272 \begin_layout Plain Layout
5278 ' to create the pipes.
5279 If one of the pipes already exists, LyX will assume that another LyX process
5280 is already running and will not start the server.
5281 On POSIX (Unix like) systems, if for some other reason, an unused
5282 \begin_inset Quotes eld
5286 \begin_inset Quotes erd
5289 pipe is left in existence when LyX closes, then LyX will try to delete
5291 If this fails for some reason, you will need to delete the pipes manually
5292 and then restart LyX.
5293 On Windows, pipes are deleted by the OS on program termination or crash,
5295 \begin_inset Quotes eld
5299 \begin_inset Quotes erd
5302 pipes should not be possible.
5305 \begin_layout Standard
5306 To have several LyX processes with servers at the same time, you have to
5307 use different configurations, perhaps by using separate user directories,
5309 \begin_inset Flex Code
5312 \begin_layout Plain Layout
5318 file, for each process.
5321 \begin_layout Standard
5322 If you are developing a client program, you might find it useful to enable
5323 debugging information from the LyX server.
5324 Do this by starting LyX as
5325 \begin_inset Flex Code
5328 \begin_layout Plain Layout
5337 \begin_layout Standard
5338 You can find a complete example client written in C in the source distribution
5340 \begin_inset Flex Code
5343 \begin_layout Plain Layout
5344 development/lyxserver/server_monitor.c
5352 \begin_layout Standard
5353 Another useful tool is the command-line based clientfound in
5354 \begin_inset Flex Code
5357 \begin_layout Plain Layout
5358 src/client/lyxclient
5366 \begin_layout Section
5367 Normal communication
5370 \begin_layout Standard
5371 To issue a LyX call, the client writes a line of ASCII text into the input
5373 This line has the following format:
5390 \begin_layout Description
5391 clientname is a name that the client can choose arbitrarily.
5392 Its only use is that LyX will echo it if it sends an answer—so a client
5393 can dispatch results from different requesters.
5396 \begin_layout Description
5397 function is the function you want LyX to perform.
5398 It is the same as the commands you'd use in the minibuffer.
5401 \begin_layout Description
5402 argument is an optional argument which is meaningful only to some functions
5404 \begin_inset Quotes eld
5408 \begin_inset Quotes erd
5411 LFUN will insert the argument as text at the cursor position).
5414 \begin_layout Standard
5415 The answer from LyX will arrive in the output pipe and be of the form
5432 \begin_layout Standard
5441 are just echoed from the command request, while
5445 is more or less useful information filled according to how the command
5446 execution worked out.
5447 Some commands, such as
5448 \begin_inset Quotes eld
5452 \begin_inset Quotes erd
5455 , will return information about the internal state of LyX, while other will
5456 return an empty data-response.
5457 This means that the command execution went fine.
5460 \begin_layout Standard
5461 In case of errors, the response from LyX will have this form
5478 \begin_layout Standard
5483 should contain an explanation of why the command failed.
5486 \begin_layout Standard
5490 \begin_layout LyX-Code
5491 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5492 \begin_inset Newline newline
5495 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5496 \begin_inset Newline newline
5499 read a <~/.lyxpipe.out
5500 \begin_inset Newline newline
5506 \begin_layout Section
5510 \begin_layout Standard
5511 LyX can notify clients of events going on asynchronously.
5512 Currently it will only do this if the user binds a key sequence with the
5514 \begin_inset Quotes eld
5518 \begin_inset Quotes erd
5522 The format of the string LyX sends is as follows:
5526 \begin_inset Flex Code
5529 \begin_layout Plain Layout
5540 \begin_layout Standard
5545 is the printed representation of the key sequence that was actually typed
5549 \begin_layout Standard
5550 This mechanism can be used to extend LyX's command set and implement macros.
5551 Bind some key sequence to
5552 \begin_inset Quotes eld
5556 \begin_inset Quotes erd
5560 Then start a client that listens on the output pipe, dispatches the command
5561 according to the sequence, and starts a function that may use LyX calls
5562 and LyX requests to issue a command or a series of commands to LyX.
5565 \begin_layout Section
5566 The simple LyX Server Protocol
5569 \begin_layout Standard
5570 LyX implements a simple protocol that can be used for session management.
5571 All messages are of the form
5584 \begin_layout Standard
5590 \begin_inset Quotes eld
5594 \begin_inset Quotes erd
5598 \begin_inset Quotes eld
5602 \begin_inset Quotes erd
5607 \begin_inset Quotes eld
5611 \begin_inset Quotes erd
5614 is received from a client, LyX will report back to inform the client that
5615 it's listening to it's messages, while
5616 \begin_inset Quotes eld
5620 \begin_inset Quotes erd
5623 sent from LyX will inform clients that LyX is closing.
5626 \begin_layout Section
5627 Reverse DVI/PDF search
5630 \begin_layout Standard
5631 Some DVI/PDF viewers
5635 \begin_layout Plain Layout
5636 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5637 Skim on Mac OSX and SumatraPDF on Windows.
5646 facility (also called
5651 This means that you can tell LyX to put the cursor to a specific line in
5652 the document by clicking at the respective position in the DVI/PDF output.
5653 To achieve this, the viewer must be able to communicate with LyX.
5654 This is done via the LyX server either by using the named pipe (
5658 ), or the UNIX domain socket (
5662 ) that LyX creates in its temporary directory (this is the way the
5663 \begin_inset Flex Code
5666 \begin_layout Plain Layout
5672 program communicates with LyX).
5673 In some cases, you need a helper script that mediates between the viewer
5674 and LyX, in others, the viewer can communicate with LyX directly.
5675 This depends on the selected viewer and on your operating system.
5676 The same applies to the way viewers need to be configured and the way the
5677 reverse search is actually performed.
5678 In what follows, we will thus describe how to setup reverse search for
5680 Before we turn to this, though, we will explain what needs to be done generally
5681 to enable reverse search in the DVI/PDF output.
5684 \begin_layout Subsection
5686 \begin_inset CommandInset label
5688 name "sub:rev-search"
5695 \begin_layout Standard
5696 In most cases LyX will do the work for you by enabling the option
5697 \begin_inset Flex MenuItem
5700 \begin_layout Plain Layout
5701 Synchronize with Output
5707 \begin_inset Flex MenuItem
5710 \begin_layout Plain Layout
5711 Document\SpecialChar \menuseparator
5712 Settings\SpecialChar \menuseparator
5719 In such a case LyX will automatically insert the necessary SyncTeX macro
5720 (for PDF) or load the srcltx package (for DVI) respectively.
5721 This option can be easily reached also on
5722 \begin_inset Flex Code
5725 \begin_layout Plain Layout
5734 \begin_layout Standard
5735 If you need a different setting, you can select or input a custom macro
5736 from the drop down box just below
5737 \begin_inset Flex MenuItem
5740 \begin_layout Plain Layout
5741 Document\SpecialChar \menuseparator
5742 Settings\SpecialChar \menuseparator
5743 Output\SpecialChar \menuseparator
5744 Synchronize with Output
5752 \begin_layout Standard
5753 Note that the method
5754 \begin_inset Flex Code
5757 \begin_layout Plain Layout
5765 enables gzip compression.
5766 If your viewer does not support it, you should instead use
5767 \begin_inset Flex Code
5770 \begin_layout Plain Layout
5781 \begin_layout Standard
5782 Please aöso note that including the
5783 \begin_inset Flex Code
5786 \begin_layout Plain Layout
5793 \begin_inset Flex Code
5796 \begin_layout Plain Layout
5802 sometimes has an undesired impact on the typesetting.
5803 Thus, you should switch output synchronization off for the final typesetting
5805 \begin_inset Flex Code
5808 \begin_layout Plain Layout
5815 \begin_inset Flex Code
5818 \begin_layout Plain Layout
5828 \begin_layout Standard
5829 In case you need some more special settings that are not covered by the
5830 automatic settings, read the next section about how to set up output synchroniz
5832 If the automatic setup suits your needs, you can readily jump to section
5833 \begin_inset space ~
5837 \begin_inset CommandInset ref
5839 reference "sub:configuring-viewers"
5843 , where the necessary configuration steps in your viewer -- needed both
5844 with the automatic and the manual setup -- are described.
5847 \begin_layout Subsection
5851 \begin_layout Standard
5852 LaTeX provides several different methods for reverse search.
5853 Some are built-in in the
5854 \begin_inset Flex Code
5857 \begin_layout Plain Layout
5863 program, some are provided by external packages.
5864 Your choice depends on whether your LaTeX distribution already provides
5865 a given method (the built-in methods are rather new) and whether your viewer
5867 The available methods are described in the following.
5870 \begin_layout Subsubsection*
5871 Built-in DVI-search via src-specials (DVI only)
5874 \begin_layout Standard
5875 This method provides the DVI file with the necessary information for reverse
5877 It is available in LaTeX since quite some time (any somewhat recent LaTeX
5878 distribution should include it), and it works reliably.
5879 To enable it, change the
5880 \begin_inset Flex MenuItem
5883 \begin_layout Plain Layout
5888 \begin_layout Plain Layout
5901 \begin_inset Flex MenuItem
5904 \begin_layout Plain Layout
5909 \begin_layout Plain Layout
5916 eX (plain)->DraftDVI
5922 \begin_inset Flex MenuItem
5925 \begin_layout Plain Layout
5926 Preferences\SpecialChar \menuseparator
5927 File Handling\SpecialChar \menuseparator
5934 \begin_inset Flex Code
5937 \begin_layout Plain Layout
5938 latex -src-specials $$i
5944 If this doesn't work, check if your TeX engine needs different options
5945 (the syntax might differ in some distributions).
5948 \begin_layout Subsubsection*
5949 External Packages (PDFSync and scrltx)
5952 \begin_layout Standard
5961 provide reverse search facility for PDF output (via pdflatex) and DVI output,
5963 In order to enable it, load the packages in the LyX preamble:
5966 \begin_layout Itemize
5967 \begin_inset Flex Code
5970 \begin_layout Plain Layout
5978 for reverse PDF search,
5981 \begin_layout Itemize
5982 \begin_inset Flex Code
5985 \begin_layout Plain Layout
5988 usepackage[active]{srcltx}
5993 for reverse DVI search.
5996 \begin_layout Standard
5997 If you want to be able to perform both DVI and PDF reverse searches, you
5998 can also insert in the preamble the following lines
6001 \begin_layout LyX-Code
6005 \begin_inset Newline newline
6011 \begin_inset Newline newline
6017 \begin_inset Newline newline
6023 \begin_inset Newline newline
6028 usepackage[active]{srcltx}
6029 \begin_inset Newline newline
6037 \begin_layout Standard
6038 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6039 right package will be used.
6042 \begin_layout Standard
6043 Note that PDFSync might affect the output layout of your document.
6044 It is therefore advised to disable PDFsync for final documents.
6047 \begin_layout Subsubsection*
6048 Built-in reverse search via SyncTeX (DVI and PDF)
6051 \begin_layout Standard
6053 \begin_inset Flex Code
6056 \begin_layout Plain Layout
6062 have built-in support for both PDF and DVI reverse search.
6067 facility is basically the result of the integration of the PDFSync package
6068 to the pdftex program and its merge with the
6073 You need at least TeXLive 2008 or a recent MikTeX distribution in order
6075 Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
6076 already provide SyncTeX support.
6079 \begin_layout Standard
6080 To enable SyncTeX for DVI output, change the
6081 \begin_inset Flex MenuItem
6084 \begin_layout Plain Layout
6089 \begin_layout Plain Layout
6102 \begin_inset Flex MenuItem
6105 \begin_layout Plain Layout
6110 \begin_layout Plain Layout
6117 eX (plain) -> DraftDVI
6123 \begin_inset Flex MenuItem
6126 \begin_layout Plain Layout
6127 Preferences\SpecialChar \menuseparator
6128 File Handling\SpecialChar \menuseparator
6135 \begin_inset Flex Code
6138 \begin_layout Plain Layout
6139 latex -synctex=1 $$i
6144 , and for PDF output, change the
6145 \begin_inset Flex MenuItem
6148 \begin_layout Plain Layout
6153 \begin_layout Plain Layout
6160 eX (pdflatex) -> PDF (pdflatex)
6166 \begin_inset Flex Code
6169 \begin_layout Plain Layout
6170 pdflatex -synctex=1 $$i
6176 Check the documentation of your viewer whether the viewer needs to be configure
6177 d for the use with SyncTeX.
6181 \begin_layout Plain Layout
6182 Note that the option
6183 \begin_inset Flex Code
6186 \begin_layout Plain Layout
6192 option enables gzip compression.
6193 If your viewer does not support it, you should instead use
6194 \begin_inset Flex Code
6197 \begin_layout Plain Layout
6211 \begin_layout Subsection
6212 Configuring and using specific viewers
6213 \begin_inset CommandInset label
6215 name "sub:configuring-viewers"
6222 \begin_layout Subsubsection*
6223 Xdvi (all platforms)
6226 \begin_layout Standard
6228 \begin_inset Flex Code
6231 \begin_layout Plain Layout
6237 , you don't need to do anything else for performing a reverse DVI search,
6238 as LyX already provides the necessary hooks for automatically using the
6240 \begin_inset Flex Code
6243 \begin_layout Plain Layout
6250 Just setup your document as described above (reverse search is triggered
6251 by Ctrl-click or Alt-click on Mac OSX, respectively).
6254 \begin_layout Standard
6255 However, if for whatever reason you want to use the named pipe instead of
6256 the socket for communicating with LyX, simply change the DVI viewer in
6258 \begin_inset Flex MenuItem
6261 \begin_layout Plain Layout
6262 Preferences\SpecialChar \menuseparator
6263 File Handling\SpecialChar \menuseparator
6273 \begin_layout Plain Layout
6274 On Mac OSX you have to use
6275 \begin_inset Flex Code
6278 \begin_layout Plain Layout
6279 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6290 \begin_inset Flex Code
6293 \begin_layout Plain Layout
6294 xdvi -editor 'lyxeditor.sh %f %l'
6300 \begin_inset Flex Code
6303 \begin_layout Plain Layout
6309 is a suitable script.
6310 For example, a minimal shell script is the following one:
6313 \begin_layout LyX-Code
6315 \begin_inset Newline newline
6318 LYXPIPE="/path/to/lyxpipe"
6319 \begin_inset Newline newline
6322 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6323 \begin_inset Newline newline
6326 echo "$COMMAND" > "${LYXPIPE}".in || exit
6327 \begin_inset Newline newline
6330 read < "${LYXPIPE}".out || exit
6333 \begin_layout Standard
6335 \begin_inset Flex Code
6338 \begin_layout Plain Layout
6348 \begin_layout Plain Layout
6355 XServer pipe path specified in
6356 \begin_inset Flex MenuItem
6359 \begin_layout Plain Layout
6360 Preferences\SpecialChar \menuseparator
6370 \begin_layout Plain Layout
6372 \begin_inset Flex Code
6375 \begin_layout Plain Layout
6381 folder of a source distribution you can find a
6382 \begin_inset Flex Code
6385 \begin_layout Plain Layout
6391 script which is able to locate the
6395 based on your preferences.
6403 \begin_layout Subsubsection*
6407 \begin_layout Standard
6409 \begin_inset Flex Code
6412 \begin_layout Plain Layout
6413 /Applications/MacDviX_Folder/calleditor.script
6418 , add the following lines:
6421 \begin_layout LyX-Code
6426 \begin_layout Plain Layout
6433 X.app/Contents/MacOS/lyxeditor "$2" $1
6434 \begin_inset Newline newline
6440 \begin_layout Standard
6441 Modify the lines accordingly if you install LyX somewhere else than in the
6442 Applications folder.
6445 \begin_layout Standard
6446 Reverse search is triggered by Alt-click (OPTION-click).
6449 \begin_layout Subsubsection*
6453 \begin_layout Standard
6455 \begin_inset Flex Code
6458 \begin_layout Plain Layout
6459 open -a Skim.app $$i
6464 to the viewer setting in
6465 \begin_inset Flex MenuItem
6468 \begin_layout Plain Layout
6469 Preferences\SpecialChar \menuseparator
6470 File Handling\SpecialChar \menuseparator
6471 File formats\SpecialChar \menuseparator
6478 \begin_inset Flex MenuItem
6481 \begin_layout Plain Layout
6482 Skim\SpecialChar \menuseparator
6483 Preferences\SpecialChar \menuseparator
6493 \begin_layout Plain Layout
6503 \begin_layout Standard
6504 Reverse search is triggered by COMMAND-SHIFT-click
6507 \begin_layout Subsubsection*
6511 \begin_layout Standard
6513 \begin_inset Flex MenuItem
6516 \begin_layout Plain Layout
6517 Settings\SpecialChar \menuseparator
6518 Configure Okular\SpecialChar \ldots{}
6519 \SpecialChar \menuseparator
6526 \begin_inset Quotes eld
6530 \begin_inset Quotes erd
6534 \begin_inset Flex Code
6537 \begin_layout Plain Layout
6546 \begin_layout Standard
6547 Reverse search is triggered by SHIFT-click.
6550 \begin_layout Subsubsection*
6554 \begin_layout Standard
6555 Launch yap, choose its
6556 \begin_inset Flex MenuItem
6559 \begin_layout Plain Layout
6560 View\SpecialChar \menuseparator
6567 \begin_inset Quotes eld
6571 \begin_inset Quotes erd
6576 \begin_inset Quotes eld
6579 New\SpecialChar \ldots{}
6581 \begin_inset Quotes erd
6584 button and, in the window that opens, enter
6585 \begin_inset Quotes eld
6589 \begin_inset Quotes erd
6592 (or any other name you like) in the
6593 \begin_inset Quotes eld
6597 \begin_inset Quotes erd
6601 Now click on the button labeled
6602 \begin_inset Quotes eld
6605 \SpecialChar \ldots{}
6607 \begin_inset Quotes erd
6610 to open a file dialog and navigate to the directory containing the batch
6612 \begin_inset Flex Code
6615 \begin_layout Plain Layout
6623 \begin_inset Flex Code
6626 \begin_layout Plain Layout
6632 and then specify the program arguments as
6633 \begin_inset Flex Code
6636 \begin_layout Plain Layout
6644 \begin_inset Flex Code
6647 \begin_layout Plain Layout
6653 wrapper is used for communicating with LyX through the
6660 \begin_layout LyX-Code
6662 \begin_inset Newline newline
6665 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
6674 \begin_inset Newline newline
6688 \begin_layout Standard
6689 Make sure that the LyXServer pipe path you specified in LyX is
6690 \begin_inset Flex Code
6693 \begin_layout Plain Layout
6707 , otherwise change the
6708 \begin_inset Flex Code
6711 \begin_layout Plain Layout
6717 wrapper accordingly.
6720 \begin_layout Standard
6721 In yap, reverse search is triggered by double-click.
6724 \begin_layout Subsubsection*
6725 SumatraPDF (Windows)
6728 \begin_layout Standard
6729 In order to use SumatraPDF for inverse search, enter
6730 \begin_inset Flex Code
6733 \begin_layout Plain Layout
6734 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6739 in the viewer setting in
6740 \begin_inset Flex MenuItem
6743 \begin_layout Plain Layout
6744 Preferences\SpecialChar \menuseparator
6745 File Handling\SpecialChar \menuseparator
6746 File formats\SpecialChar \menuseparator
6753 \begin_inset Flex Code
6756 \begin_layout Plain Layout
6762 is the previous wrapper.
6763 If SumatraPDF.exe is not in your command PATH, use its full file name.
6766 \begin_layout Standard
6767 Reverse search is triggered by double-click.
6770 \begin_layout Subsubsection*
6774 \begin_layout Standard
6775 First of all, make sure that yap is your default DVI viewer in the Windows
6776 environment, then launch it, choose its
6777 \begin_inset Flex MenuItem
6780 \begin_layout Plain Layout
6781 View\SpecialChar \menuseparator
6788 \begin_inset Quotes eld
6792 \begin_inset Quotes erd
6797 \begin_inset Quotes eld
6800 New\SpecialChar \ldots{}
6802 \begin_inset Quotes erd
6805 button and, in the window that opens, enter
6806 \begin_inset Quotes eld
6810 \begin_inset Quotes erd
6813 (or any other name you like) in the
6814 \begin_inset Quotes eld
6818 \begin_inset Quotes erd
6822 Now click on the button labeled
6823 \begin_inset Quotes eld
6826 \SpecialChar \ldots{}
6828 \begin_inset Quotes erd
6831 to open a file dialog and navigate to the directory containing the
6832 \begin_inset Flex Code
6835 \begin_layout Plain Layout
6841 program (which is installed by default on Cygwin along with the LyX executable).
6843 \begin_inset Flex Code
6846 \begin_layout Plain Layout
6852 and then specify the program arguments as
6853 \begin_inset Flex Code
6856 \begin_layout Plain Layout
6863 In this way, you will be using the
6867 for communicating with LyX.
6868 If, for whatever reason, you want to use the
6873 \begin_inset Flex Code
6876 \begin_layout Plain Layout
6882 option and be sure to specify the LyXServer pipe path in the LyX preferences.
6885 \begin_layout Standard
6886 In yap, reverse search is triggered by double-click.
6889 \begin_layout Subsubsection*
6893 \begin_layout Standard
6894 In order to use SumatraPDF for inverse search, enter
6895 \begin_inset Flex Code
6898 \begin_layout Plain Layout
6899 SumatraPDF -inverse-search "lyxeditor -g %f %l"
6904 in the viewer setting in
6905 \begin_inset Flex MenuItem
6908 \begin_layout Plain Layout
6909 Preferences\SpecialChar \menuseparator
6910 File Handling\SpecialChar \menuseparator
6911 File formats\SpecialChar \menuseparator
6918 If SumatraPDF.exe is not in your command PATH, use its full posix path.
6920 \begin_inset Flex Code
6923 \begin_layout Plain Layout
6929 enables communication via the
6935 \begin_inset Flex Code
6938 \begin_layout Plain Layout
6944 option if you want to use the
6948 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6951 \begin_layout Standard
6952 Reverse search is triggered by double-click.
6955 \begin_layout Section
6959 \begin_layout Standard
6960 Forward search is, as the name implies, in a sense the
6961 \begin_inset Quotes eld
6965 \begin_inset Quotes erd
6969 It allows you to let the viewer jump to a given position from within LyX.
6970 If forward search is set up (as described in what follows), you can put
6971 the cursor anywhere in your LyX document, and hit
6972 \begin_inset Flex MenuItem
6975 \begin_layout Plain Layout
6976 Navigate\SpecialChar \menuseparator
6983 \begin_inset Flex MenuItem
6986 \begin_layout Plain Layout
6992 in the context menu via right mouse click), and then the viewer will jump
6993 to that position as well.
6994 This implies, of course, that your viewer supports this function.
6997 \begin_layout Standard
6998 To make forward search possible, you first need to provide the generated
6999 output PDF/DVI file with additional information about the TeX sources.
7000 This can be done via the methods described in the section
7001 \begin_inset CommandInset ref
7003 reference "sub:rev-search"
7010 \begin_layout Standard
7011 Additionally, you need to configure LyX for using your viewers in
7012 \begin_inset Flex MenuItem
7015 \begin_layout Plain Layout
7016 Tools\SpecialChar \menuseparator
7017 Preferences\SpecialChar \menuseparator
7018 Output\SpecialChar \menuseparator
7025 We provide a range of tested configurations for some viewers, which you
7026 can select from the drop down list.
7027 If none of these configurations suits you, you have to find out and enter
7028 a suitable configuration yourself.
7029 The definition syntax uses the following placeholders:
7032 \begin_layout Itemize
7034 \begin_inset Flex Code
7037 \begin_layout Plain Layout
7046 \begin_layout Itemize
7048 \begin_inset Flex Code
7051 \begin_layout Plain Layout
7057 : name of the (temporary) exported .tex file
7060 \begin_layout Itemize
7062 \begin_inset Flex Code
7065 \begin_layout Plain Layout
7071 : name of the exported output file (either dvi or pdf, depending on which
7072 one exists in the temporary directory)
7075 \begin_layout Standard
7076 Note that only some of the viewers provide full forward search functionality,
7077 among them yap, xdvi, okular and Sumatra PDF.
7081 \begin_layout Plain Layout
7082 For Sumatra CMCDDE is needed --- downloadable from
7083 \begin_inset CommandInset href
7085 target "http://www.istri.fr/zip/CMCDDE.zip"
7094 While many of the widespread PDF viewers (most notably Adobe Reader) do
7095 not support forward search at all, some other viewers -- e.
7096 \begin_inset space \thinspace{}
7100 evince and xpdf -- allow at least to reload the document and jump to a
7101 specific page of the file, so you can at least navigate
7102 \begin_inset Quotes eld
7106 \begin_inset Quotes erd
7110 This latter functionality is provided by an external call of synctex (see
7111 the predefined example configurations).
7115 \begin_layout Standard
7116 Forward search works both with DVI and PDF output.
7117 LyX simply checks which preview format you have used before (i.
7118 \begin_inset space \thinspace{}
7121 e., which format is already there in the temporary directory) and chooses
7122 the appropriate configuration for the respective format.
7125 \begin_layout Chapter
7126 Special Document Classes
7129 \begin_layout Section
7133 \begin_layout Standard
7139 \begin_layout Subsection
7143 \begin_layout Standard
7144 This section describes how LyX can be used to write articles for submission
7145 to the scientific journal
7147 Astronomy and Astrophysics
7149 (www.edpsciences.fr/aa/
7150 \begin_inset Flex URL
7153 \begin_layout Plain Layout
7155 http://www.edpsciences.fr/aa/
7160 ) using Version 5.01 of the document class
7165 This package can be downloaded from the ftp site
7168 \begin_layout Standard
7169 \begin_inset VSpace medskip
7175 \begin_layout Standard
7177 \begin_inset Flex URL
7180 \begin_layout Plain Layout
7182 ftp://ftp.edpsciences.org/pub/aa/readme.html
7190 \begin_layout Standard
7191 \begin_inset VSpace medskip
7197 \begin_layout Standard
7198 A manual comes together with that package, and this text is not meant to
7199 replace the original manual but is merely a short guide in how to realize
7200 the correct form of your paper.
7204 \begin_layout Standard
7205 Please note that the publisher of the journal was changed from Springer
7206 to EDP Sciences starting January 1, 2001.
7207 That change involved also some slight changes to the style files, namely
7208 the removal of the thesaurus command.
7209 The LyX class aa supports the newest version of these style files, V 5.01.
7210 If you have an older version installed, please upgrade.
7211 For compatibility, the old (version 4) layout has been kept as
7216 Please refer to the comments in
7218 LyXDir/layouts/aapaper.layout
7223 \begin_layout Subsection
7227 \begin_layout Standard
7228 It is recommended you start from the example template distributed with LyX.
7229 If you are not using a template, note the following settings:
7232 \begin_layout Itemize
7239 Document\SpecialChar \menuseparator
7242 dialog (OK, that one was obvious).
7245 \begin_layout Itemize
7246 Don't change the option
7249 \begin_inset space ~
7259 The whole layout is done by the macros, you shouldn't change anything.
7262 \begin_layout Subsection
7266 \begin_layout Standard
7267 First thing to enter is the header information.
7268 It consists of seven entries, of which some are optional.
7272 \begin_layout Itemize
7280 \begin_layout Itemize
7288 \begin_layout Itemize
7296 \begin_layout Itemize
7304 \begin_layout Itemize
7309 : [optional] if more than one author: whom to contact for offprint requests.
7312 \begin_layout Itemize
7317 : [optional] mail address for contacts.
7320 \begin_layout Itemize
7328 Received: <date>; Accepted <date>
7331 \begin_layout Standard
7332 There is no need to issue the
7338 command, this is done automatically by LyX when the header is finished.
7339 Although the order of the single header entries doesn't matter it is advised
7340 to keep the above sequence, just to get the best optics and meets the layout
7341 of the real document.
7344 \begin_layout Standard
7345 If you want to place footnotes in the header block, e.
7346 \begin_inset space \thinspace{}
7350 \begin_inset space \space{}
7353 to state your present address, just use the standard footnote via the menu
7356 Insert\SpecialChar \menuseparator
7360 LyX will automagically use the term
7369 \begin_layout Standard
7370 In addition to these topics, the macros use three additional LaTeX commands
7371 that have no counterpart in LyX:
7374 \begin_layout Itemize
7381 to separate different names for more than one author and institute, respectivel
7385 \begin_layout Itemize
7392 to mark corresponding author/institute pairs.
7393 The institutes are numbered sequentially as they appear in the
7397 field, so you have to put a marker to each author.
7400 \begin_layout Itemize
7407 to supply an email address for fast contact.
7410 \begin_layout Standard
7411 In all cases, the appropriate command has to be entered in LyX and marked
7417 \begin_layout Subsection
7421 \begin_layout Standard
7422 The abstract should immediately follow the header block.
7423 With version 5 the abstract environment was changed to a command, and there
7424 is now a resctriction to only one paragraph.
7425 In addition, it should contain an entry with the keywords.
7426 This is not yet implemented for LyX, therefore you have to enter the LaTeX
7433 by hand and mark it as LaTeX code.
7434 Refer to the example paper.
7437 \begin_layout Subsection
7438 Supported environments
7441 \begin_layout Standard
7442 The A&A paper layout supports the following environments for structuring
7446 \begin_layout Itemize
7452 \begin_layout Itemize
7458 \begin_layout Itemize
7464 \begin_layout Itemize
7470 \begin_layout Itemize
7476 \begin_layout Itemize
7482 \begin_layout Itemize
7488 \begin_layout Itemize
7494 \begin_layout Itemize
7500 \begin_layout Itemize
7506 \begin_layout Itemize
7512 \begin_layout Itemize
7518 \begin_layout Subsection
7519 Commands not supported by LyX
7522 \begin_layout Standard
7523 Some commands are not yet supported by the
7528 Some have already been mentioned.
7529 For the sake of completeness, they are listed all together here:
7532 \begin_layout Itemize
7540 \begin_layout Itemize
7548 \begin_layout Itemize
7556 \begin_layout Itemize
7564 \begin_layout Itemize
7572 \begin_layout Itemize
7580 \begin_layout Itemize
7588 \begin_layout Itemize
7596 \begin_layout Standard
7597 If you want to use any of these commands, you have to enter them yourself.
7600 Do not forget to mark them as LaTeX code!
7603 \begin_layout Subsection
7604 Figure and Table Floats
7607 \begin_layout Standard
7608 LyX provides support for the necessary float environments
7610 figure, figure*, table
7616 , therefore we won't tell much about it here.
7620 \begin_inset space ~
7626 Just remember that tables should be left-aligned.
7627 For that, select the table and change the alignment in
7629 Edit\SpecialChar \menuseparator
7631 \begin_inset space ~
7637 \begin_layout Standard
7638 There is only one special thing: the figures with caption besides the figure.
7639 To create such a figure, you have to do the following:
7642 \begin_layout Enumerate
7643 Create a wide figure float:
7645 Insert\SpecialChar \menuseparator
7646 Float\SpecialChar \menuseparator
7649 , then right click in the figure and select
7655 \begin_inset space ~
7663 \begin_layout Enumerate
7664 Enter your caption text.
7667 \begin_layout Enumerate
7672 to move the cursor above the caption.
7675 \begin_layout Enumerate
7679 \begin_layout Enumerate
7680 Position the cursor behind the figure and insert a horizontal fill:
7682 Insert\SpecialChar \menuseparator
7684 \begin_inset space ~
7687 Character\SpecialChar \menuseparator
7689 \begin_inset space ~
7697 \begin_layout Enumerate
7698 Switch to LaTeX mode:
7701 \begin_inset space ~
7709 \begin_layout Enumerate
7719 Do not close the brace!
7722 \begin_layout Enumerate
7723 Position the cursor behind the caption text, switch to LaTeX mode and insert
7727 \begin_inset space ~
7739 \begin_layout Standard
7740 Also, refer to the figures in the example paper.
7743 \begin_layout Subsection
7747 \begin_layout Standard
7748 For submission, the paper has to be formated in a special double-spacing
7750 For this purpose, you have to give the option
7754 to the documentclass.
7755 This must be done using the extra class options field in the
7757 Document\SpecialChar \menuseparator
7761 Just enter the string
7768 \begin_layout Subsection
7772 \begin_layout Standard
7777 directory contains an example paper written with LyX.
7778 It is the example paper from the original macro package, translated to
7780 Use it for inspiration, and compare the original LaTeX code with LyX way
7784 \begin_layout Section
7788 \begin_layout Standard
7794 \begin_layout Subsection
7798 \begin_layout Standard
7799 AASTeX is a set of macros produced by the American Astronomical Society
7800 to facilitate electronic manuscript submission to the three journals they
7801 publish: the Astrophysical Journal (including the Letters and Supplement),
7802 the Astronomical Journal, and the Publications of the Astronomical Society
7804 LyX has proven to be an excellent tool for generating these documents,
7805 especially given its equation, citation, and figure handling capabilities.
7806 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7807 is the version described here, or higher.
7808 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7809 incompatible with LyX.
7810 The AASTeX package may be downloaded from the AASTeX Web site
7813 \begin_layout Standard
7814 \begin_inset VSpace medskip
7820 \begin_layout Standard
7822 \begin_inset Flex URL
7825 \begin_layout Plain Layout
7827 http://www.journals.uchicago.edu/AAS/AASTeX
7835 \begin_layout Standard
7836 \begin_inset VSpace medskip
7842 \begin_layout Standard
7843 A complete user guide is contained in that package and you should familiarize
7844 yourself with it thoroughly before embarking on writing a paper in LyX.
7845 LyX will not reduce the need to figure out all the AASTeX commands, it
7846 will only reduce the drudgery of typing everything in.
7847 It is your responsibility to ensure that the final exported LaTeX document
7848 conforms completely to the requirements of the journal to which you are
7849 submitting your paper.
7852 \begin_layout Subsection
7853 Starting a New Paper
7856 \begin_layout Standard
7857 I strongly suggest that you start with the AASTeX template file.
7860 File\SpecialChar \menuseparator
7867 , enter the new file name, then choose the
7872 This will show the most common fields found in a manuscript.
7873 Simply overwrite the existing text (including the brackets,
7877 ) with the correct information.
7878 Many of the AASTeX commands and environments can be implemented directly
7879 in LyX, but some cannot: most noticeably
7891 , which should stick out like a sore thumb if you actually just opened the
7893 For commands such as these, the LaTeX code must be entered directly and
7895 Such commands are referred to as TeX code, or Evil Red Text.
7896 I tried to minimize the amount of TeX code needed in an AASTeX document,
7897 but there is still a bit more required than any of us would like.
7900 \begin_layout Subsection
7901 Finishing Your Paper
7904 \begin_layout Standard
7905 When the paper is finished to your satisfaction and previews/prints correctly,
7907 \begin_inset Quotes eld
7911 \begin_inset Quotes erd
7914 actions which need to be done before you submit it to the journals.
7918 \begin_layout Enumerate
7919 Export your paper as a LaTeX file (
7921 File\SpecialChar \menuseparator
7922 Export\SpecialChar \menuseparator
7929 \begin_layout Enumerate
7934 file with your favorite text editor
7938 \begin_layout Enumerate
7939 remove the comment lines before the
7948 \begin_layout Enumerate
7953 usepackage...{fontenc}
7955 line if it appears (usually just after
7970 \begin_layout Enumerate
7971 remove everything between (and including) the
7983 commands, except for any commands you specifically put into the LaTeX preamble
7984 (which should appear immediately after the
7985 \begin_inset Quotes eld
7988 User specified LaTeX commands
7989 \begin_inset Quotes erd
8000 \begin_layout Enumerate
8001 Run the resulting file through LaTeX to make sure it still processes correctly.
8004 \begin_layout Enumerate
8005 Reread the journal requirements to make sure your filenames and formats
8009 \begin_layout Enumerate
8013 \begin_layout Subsection
8014 Comments On Specific Commands
8017 \begin_layout Standard
8018 I will not describe the detailed usage of the individual AASTeX commands:
8019 the AASTeX User Guide (
8023 ) gives a good description of each.
8024 Thus it's probably easiest for me to go down the list as found in the guide
8025 and offer comments where necessary.
8026 So let's begin \SpecialChar \ldots{}
8030 \begin_layout Subsubsection
8031 Things that work as expected
8034 \begin_layout Standard
8035 Because they work as you might expect, I simply list them and the section
8136 begin{thebibliography}
8144 (2.13.2), all the cite commands and their variations (2.13.2), the generic
8145 graphicx figure commands (2.14.1),
8169 (2.15.4, amongst other places),
8196 \begin_layout Standard
8197 The following style options also work correctly:
8218 Simply put them in the
8224 Layout\SpecialChar \menuseparator
8230 \begin_layout Subsubsection
8231 Things that work, but require more comment
8234 \begin_layout Standard
8235 The following items work, but require a little more discussion:
8238 \begin_layout Itemize
8239 These items are reserved for use by the journal editors, but you can put
8240 them into the LaTeX preamble if you feel compelled to do so:
8273 \begin_layout Itemize
8274 These items may be placed in the LaTeX preamble, and are included as blanks
8275 in the template file:
8296 \begin_layout Itemize
8303 (2.3) – can only be used
8304 \begin_inset Quotes eld
8308 \begin_inset Quotes erd
8311 , not in the middle of a paragraph.
8312 Use TeX code if you need to embed it.
8315 \begin_layout Itemize
8322 (2.3) – will have extra {} after it.
8323 This should not cause an error.
8326 \begin_layout Itemize
8333 (2.6) – can only be used
8334 \begin_inset Quotes eld
8338 \begin_inset Quotes erd
8341 , not in the middle of a paragraph.
8342 Use TeX code if you need to embed it.
8345 \begin_layout Itemize
8352 (2.8) – can't insert a cross-reference tag, you must type the tag name by
8356 \begin_layout Itemize
8370 \begin_layout Itemize
8377 (2.9) – will have extra {} after it.
8378 This should not cause an error.
8381 \begin_layout Itemize
8388 (2.11) – will have extra {} after it.
8389 This should not cause an error.
8392 \begin_layout Itemize
8399 (2.14.2) – you can insert an optional filename argument by placing the cursor
8400 at the beginning of the text and selecting
8402 Insert\SpecialChar \menuseparator
8407 \begin_inset Quotes eld
8411 \begin_inset Quotes erd
8414 inserts an optional argument of the type needed by
8421 Hopefully it will be renamed someday.
8424 \begin_layout Itemize
8437 for the catalog ID optional parameter
8440 \begin_layout Itemize
8453 for the catalog ID optional parameter
8456 \begin_layout Subsubsection
8457 Things not implemented, use TeX code
8460 \begin_layout Standard
8483 setcounter{equation}
8485 (2.12), Journal name abbreviations (2.13.4),
8521 (2.15.4, insert it as the first element in the lefthand cell after where
8523 Don't use any of LyX's rules in the table),
8535 (2.15.5), much of Misc (2.17, except
8586 \begin_layout Subsubsection
8587 Things that cannot be implemented
8590 \begin_layout Standard
8591 \SpecialChar \ldots{}
8592 at least in any meaningful sort of way, so I suggest ignoring them.
8593 They are the references environment (2.13.3), and the deluxetable environment
8595 If you really, really need to use deluxetable, I suggest editing it in
8596 a separate file with a text editor, then using
8598 Insert\SpecialChar \menuseparator
8600 \begin_inset space ~
8605 to include it in your LyX document.
8610 file to see an example of this.
8613 \begin_layout Subsection
8614 FAQs, Tips, Tricks, and Other Ruminations
8617 \begin_layout Subsubsection
8618 Getting LyX and AASTeX to cooperate
8621 \begin_layout Standard
8622 It can be a bit tricky to get LyX to recognize a new layout and document
8624 When all else fails, do this:
8627 \begin_layout Enumerate
8628 Make certain that LaTeX can find AASTeX.
8629 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8630 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
8637 \begin_layout Enumerate
8649 \begin_layout Enumerate
8652 Tools\SpecialChar \menuseparator
8655 in LyX, then restart LyX.
8658 \begin_layout Enumerate
8659 Open a regular new file, not from a template.
8660 Does AASTeX appear in the class list in
8662 Document\SpecialChar \menuseparator
8668 \begin_layout Standard
8669 If you get a warning from an existing AASTeX document about not being able
8670 to find the AASTeX layout or a message about
8671 \begin_inset Quotes eld
8674 You should not mix title layouts with normal ones
8675 \begin_inset Quotes erd
8678 , things haven't been installed correctly.
8681 \begin_layout Subsubsection
8682 LaTeX error processing a table
8685 \begin_layout Standard
8686 LyX, by default, attempts to center the table caption/title.
8687 This seems to produce a bad interaction in AASTeX so you should click somewhere
8688 in the caption/title, then select
8690 Edit\SpecialChar \menuseparator
8692 \begin_inset space ~
8706 This took care of it for me.
8709 \begin_layout Subsubsection
8713 \begin_layout Standard
8714 A couple of things: 1) I have noticed some funny spacing in the reference
8715 entries in the text.
8716 When you enter the bibliography item data, make sure their is
8720 space between the last author and the parenthesis setting off the year;
8724 \begin_inset space \thinspace{}
8728 \begin_inset space \space{}
8742 2) Entering the references at all is not obvious.
8743 The easiest thing is to start typing your first reference at the end of
8744 the document, then mark it as type
8749 That will put a small gray box in front of what you just typed.
8750 Click on the box to fill in the rest of the information.
8751 For new references, go to the end of an existing reference and press return.
8752 That will create a new line with its own box, etc.
8755 \begin_layout Subsubsection
8759 \begin_layout Standard
8760 Even though AASTeX provides its own figure commands (
8766 , for example), I much prefer LaTeX's standard figure commands (with the
8775 \begin_inset space ~
8778 commands as TeX code into a Figure Float box if you desire, but I never
8779 have much luck getting the layout right.
8780 With the standard graphics, LyX will insert a
8784 usepackage{graphicx}
8786 command into the LaTeX preamble and handle the figures in the standard
8787 LaTeX2e way, interspersing the figures in the text.
8788 I believe ApJ accepts figures exactly this way now; AJ might still use
8790 \begin_inset Quotes eld
8793 stack everything at the end
8794 \begin_inset Quotes erd
8800 \begin_layout Subsubsection
8801 Things I could have done, but didn't
8804 \begin_layout Standard
8806 \begin_inset Quotes eld
8810 \begin_inset Quotes erd
8813 things I could have implemented, but chose not to.
8814 For instance, I saw no point in double-spacing the text in the LyX window,
8815 even though it is double-spaced in the paper manuscript.
8816 Also, I chose not to make separate layouts for the preprint and preprint2
8818 Since I assume you will spend most of your time in the plain manuscript
8819 mode anyway, I decided not to chew up more disk space with this.
8823 \begin_layout Subsection
8827 \begin_layout Standard
8828 Your mileage may vary.
8829 I've now had papers published by both ApJ and AJ that have had 98% of the
8830 effort done in LyX; the last 2% was the LaTeX post-processing and a few
8832 I have had no trouble with the submission process, and I'm sure the journals
8833 were never aware that there might be a difference.
8834 So, go forth and publish!
8837 \begin_layout Section
8841 \begin_layout Standard
8851 \begin_layout Standard
8852 \begin_inset VSpace bigskip
8858 \begin_layout Standard
8860 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8861 papers to be submitted to American Mathematical Society publications.
8862 The layouts are not tailored to a specific journal, but easily can be.
8863 You should refer to the AMS documentation for specific instructions for
8864 each journal (usually it will entail only changing a single line in the
8866 That documentation is available on the Web at
8867 \begin_inset Flex URL
8870 \begin_layout Plain Layout
8878 \begin_inset Flex URL
8881 \begin_layout Plain Layout
8883 ftp://ftp.ams.org/pub/tex/amslatex/
8889 These layouts are appropriate, and useful, for any mathematical writing.
8893 \begin_layout Standard
8894 There are two basic AMS LaTeX layouts:
8897 \begin_layout Itemize
8898 amsart: The standard AMS article format.
8901 \begin_layout Itemize
8902 amsbook: the standard AMS book (really, monograph) format.
8906 \begin_layout Standard
8907 The layouts themselves contain only the minimum necessary to use the AMS
8909 They do not, in particular, contain any of the `theorem' environments used
8910 for setting theorems, lemmas, and the like.
8911 These are contained, instead, in the
8912 \begin_inset Flex Code
8915 \begin_layout Plain Layout
8921 module, which is loaded by default when when you select one of the AMS
8923 (It can also be used with other classes and can be removed, if you would
8924 rather use something else.) Less commonly used environments are in the
8925 \begin_inset Flex Code
8928 \begin_layout Plain Layout
8929 Theorems (AMS-Extended)
8934 module, which must be loaded manually.
8937 \begin_layout Standard
8938 By default, theorems and the like are numbered consecutively throughout
8939 the document, but this may be modified by loading the module
8940 \begin_inset Flex Code
8943 \begin_layout Plain Layout
8944 Theorems (Order by Section)
8949 or, if you are using
8950 \begin_inset Flex Code
8953 \begin_layout Plain Layout
8960 \begin_inset Flex Code
8963 \begin_layout Plain Layout
8964 Theorems (Order by Chapter)
8970 These will number the results as
8971 \begin_inset Formula $n.m$
8974 , where the first number refers to the section (or chapter) and the second
8975 refers to the total number of results so far in that section (or chapter).
8976 Many environments are also available unnumbered.
8977 These are indicated by an asterisk at the end.
8978 If you happen to want
8982 unnumbered results, the module
8983 \begin_inset Flex Code
8986 \begin_layout Plain Layout
8992 provides that option.
8995 \begin_layout Standard
8996 Note that these modules do not
9000 to be used with the AMS classes.
9001 It is perfectly possible to use the
9002 \begin_inset Flex Code
9005 \begin_layout Plain Layout
9011 module, and the others mentioned, with other classes, such as
9012 \begin_inset Flex Code
9015 \begin_layout Plain Layout
9022 \begin_inset Flex Code
9025 \begin_layout Plain Layout
9032 \begin_inset Flex Code
9035 \begin_layout Plain Layout
9044 \begin_layout Subsection
9045 What these layouts provide
9048 \begin_layout Standard
9049 There is a long list of included environments provided by these layouts.
9050 In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9051 variety of `theorem' environments.
9052 However, the AMS recommends the environments that are available in LyX.
9056 \begin_layout Standard
9057 The following environments—as well as the standard environments, such as
9059 \begin_inset Flex Noun
9062 \begin_layout Plain Layout
9069 \begin_inset Flex Noun
9072 \begin_layout Plain Layout
9079 \begin_inset Flex Noun
9082 \begin_layout Plain Layout
9089 \begin_inset Flex Noun
9092 \begin_layout Plain Layout
9099 \begin_inset Flex Noun
9102 \begin_layout Plain Layout
9109 \begin_inset Flex Code
9112 \begin_layout Plain Layout
9119 \begin_inset Flex Code
9122 \begin_layout Plain Layout
9131 \begin_layout Description
9132 Address This should be the author's permanent address.
9135 \begin_layout Description
9137 \begin_inset space ~
9140 Address This should be the author's temporary address at the time of submission,
9141 if different from the Address.
9144 \begin_layout Description
9145 Email Author's e-mail address
9148 \begin_layout Description
9149 URL Author's Web address, if desired.
9152 \begin_layout Description
9153 Keywords Key words or phrases used to identify specific topics discussed
9157 \begin_layout Description
9158 Subjectclass These refer to the AMS Subject Classifications, published and
9161 Mathematical Reviews
9164 These are also available online at the AMS cites listed above.
9167 \begin_layout Description
9171 \begin_layout Description
9175 \begin_layout Description
9179 \begin_layout Standard
9180 The following environments are provided by both the
9181 \begin_inset Flex Code
9184 \begin_layout Plain Layout
9191 \begin_inset Flex Code
9194 \begin_layout Plain Layout
9200 modules, in the latter case in both starred (unnumbered) and unstarred
9201 (numbered) versions.
9202 These same environments are provided only in the starred versions by the
9204 \begin_inset Flex Code
9207 \begin_layout Plain Layout
9216 \begin_layout Theorem
9217 This is typically used for the statements of major results.
9221 \begin_layout Corollary*
9222 This is used for statements which follow fairly directly from previous statement
9224 Again, these can be major results.
9229 These are smaller results needed to prove other statements.
9232 \begin_layout Proposition
9233 These are less major results which (hopefully) add to the general theory
9237 \begin_layout Conjecture
9238 These are statements provided without justification, which the author does
9239 not know how to prove, but which seem to be true (to the author, at least).
9242 \begin_layout Definition*
9243 Guess what this is for.
9244 The font is different for this environment than for the previous ones.
9248 \begin_layout Example*
9249 Used for examples illustrating proven results.
9252 \begin_layout Problem
9253 It's not really known what this is for.
9254 You should figure it out.
9257 \begin_layout Exercise*
9258 Write a description for this one.
9261 \begin_layout Remark
9262 This environment is also a type of theorem, usually a lesser sort of observation.
9265 \begin_layout Claim*
9266 Often used in the course of giving a proof of a larger result.
9270 Generally, these are used to break up long arguments, using specific instances
9276 The numbering scheme for cases is on its own, not together with other numbered
9282 At the end of this environment, a QED symbol (usually a square, but it can
9283 vary with different styles) is placed.
9284 If you want to have other environments within this one—for example, Case
9285 environments—and have the QED symbol appear only after them, then the other
9286 environments need to be nested within the proof environment.
9289 Nesting Environments
9295 for information on nesting.
9298 \begin_layout Standard
9299 And these environments are provided by
9300 \begin_inset Flex Code
9303 \begin_layout Plain Layout
9304 Theorems (AMS-Extended)
9312 \begin_layout Criterion*
9313 A required condition.
9316 \begin_layout Algorithm*
9317 A general procedure to be used.
9320 \begin_layout Axiom*
9321 This is a property or statement taken as true within the system being discussed.
9324 \begin_layout Condition*
9325 Sometimes used to state a condition assumed within the present context of
9330 Similar to a Remark.
9333 \begin_layout Notation*
9334 Used for the explanation of, yes, notation.
9337 \begin_layout Summary
9338 Do we really need to tell you?
9341 \begin_layout Acknowledgement*
9345 \begin_layout Conclusion*
9346 Sometimes used at the end of a long train of argument.
9350 Used in a way similar to Proposition, though perhaps lower on the scale.
9353 \begin_layout Standard
9354 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9356 They need to be available on your system in order to use these environments.
9359 \begin_layout Section
9367 \begin_layout Standard
9373 \begin_layout Subsection
9377 \begin_layout Standard
9378 These are the layout files for some of the journals of the American Geophysical
9380 It is assumed that you have both the AGU's own class files and AGUplus
9381 installed (everything to be found at
9382 \begin_inset Flex URL
9385 \begin_layout Plain Layout
9387 ftp://ftp.agu.org/journals/latex/journals
9395 \begin_layout Subsection
9399 \begin_layout Standard
9409 They are still called this in the LyX GUI, though their LaTeX equivalents
9410 in the AGU classes are
9421 \begin_layout Standard
9422 Newly defined styles are
9459 These are mostly manuscript attributes and defined in the AGU class documentati
9463 \begin_layout Standard
9464 I suspect this is still badly incomplete.
9467 \begin_layout Subsection
9471 \begin_layout Standard
9488 \begin_layout Subsection
9492 \begin_layout Itemize
9495 Journal of Geophysical Research
9504 \begin_layout Standard
9505 Add your own, it isn't so hard! Look at the
9516 \begin_layout Subsection
9517 Bugs and things to remember
9520 \begin_layout Standard
9521 In order to use the new layouts, you must remember to do the following for
9525 \begin_layout Enumerate
9531 This can be done in the
9533 Layout\SpecialChar \menuseparator
9538 Document\SpecialChar \menuseparator
9542 (AGU articles are always in English, right? So
9549 \begin_layout Enumerate
9559 (Yes, this is a bug.)
9562 \begin_layout Enumerate
9563 Make sure you use the
9567 bibliography style, by entering
9571 into the second field of the BibTeX inset.
9572 None of the standard styles will do.
9575 \begin_layout Section
9579 \begin_layout Standard
9585 \begin_layout Subsection
9589 \begin_layout Standard
9590 Broadway is for writing plays.
9591 The format is more decorative than Hollywood, and much less standardized.
9592 This format should be suitable for workshops.
9595 \begin_layout Subsection
9599 \begin_layout Standard
9600 The same as in Hollywood.
9603 \begin_layout Subsection
9607 \begin_layout Standard
9612 names as labels then cross-reference the label to insert the name.
9613 The cross-reference dialog will show the current cast of characters.
9616 \begin_layout Subsection
9617 Paper size and Margins
9620 \begin_layout Standard
9621 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9624 \begin_layout Subsection
9628 \begin_layout Standard
9629 The following environments are available.
9630 You can use broadway.bind to get the bind keys shown at the right.
9633 \begin_layout Itemize
9637 \begin_inset Newline newline
9642 You should not have to use this, but it is here for anything that does not
9646 \begin_layout Itemize
9650 \begin_inset space \hfill{}
9654 \begin_inset Newline newline
9659 Used to describe stage setting and the action.
9660 First use of speaker names in all CAPs.
9663 \begin_layout Itemize
9667 \begin_inset space \hfill{}
9671 \begin_inset Newline newline
9676 Automatically numbered.
9677 On screen it will be arabic, but will print as Roman.
9680 \begin_layout Itemize
9684 \begin_inset space \hfill{}
9688 \begin_inset Newline newline
9698 It is just centered text.
9701 \begin_layout Itemize
9705 \begin_inset space \hfill{}
9709 \begin_inset Newline newline
9714 Not automatically numbered.
9715 You supply the number.
9716 This is because I couldn't figure out how.
9719 \begin_layout Itemize
9723 \begin_inset space \hfill{}
9727 \begin_inset Newline newline
9732 A special case of Narrative to describe the setting and action as the curtain
9736 \begin_layout Itemize
9740 \begin_inset space \hfill{}
9744 \begin_inset Newline newline
9749 The speaker's (actor's) title, centered in all CAPS.
9752 \begin_layout Itemize
9756 \begin_inset space \hfill{}
9760 \begin_inset Newline newline
9765 Instructions to the speaker.
9766 The parentheses are automatically inserted.
9767 The ( will appear on screen, but both will be in the printed play.
9768 This environment is only used within
9775 \begin_layout Itemize
9779 \begin_inset space \hfill{}
9783 \begin_inset Newline newline
9788 What the Speaker says.
9791 \begin_layout Itemize
9795 \begin_inset space \hfill{}
9799 \begin_inset Newline newline
9804 The curtain comes down.
9807 \begin_layout Itemize
9811 \begin_inset space \hfill{}
9817 \begin_layout Itemize
9821 \begin_inset space \hfill{}
9827 \begin_layout Itemize
9831 \begin_inset space \hfill{}
9837 \begin_layout Standard
9841 \begin_layout Section
9845 \begin_layout Standard
9850 can be used to type letters according to German conventions.
9851 A template file is included in
9853 .../lyx/share/templates
9855 for you to use as a starting point.
9858 \begin_layout Section
9866 \begin_layout Standard
9872 \begin_layout Subsection
9876 \begin_layout Standard
9877 This is the layout file for the European Geophysical Society journals.
9882 can be downloaded from the web site of the EGS under
9883 \begin_inset Flex URL
9886 \begin_layout Plain Layout
9896 \begin_layout Subsection
9900 \begin_layout Standard
9903 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9911 The current layout file is unfortunately very unmodular and would benefit
9912 from using the various
9919 \begin_layout Section
9923 \begin_layout Standard
9924 See the LyX template file
9929 It contains all infos you need.
9932 \begin_layout Section
9938 \begin_inset CommandInset label
9947 \begin_layout Standard
9953 \begin_layout Subsection
9957 \begin_layout Standard
9958 This section describes how to use LyX to make slides for overhead projectors.
9959 There are two document classes that can do this: the default slides class
9965 This section documents the latter.
9968 \begin_layout Standard
9969 I'm going to say this again, nice and clear, so that there's no misunderstanding
9973 \begin_layout Standard
9974 \begin_inset VSpace bigskip
9980 \begin_layout Standard
9984 This section documents the class
9985 \begin_inset Quotes eld
9993 \begin_inset Quotes erd
10001 \begin_layout Standard
10002 \begin_inset VSpace bigskip
10008 \begin_layout Standard
10009 If you're looking for the documentation for
10010 \begin_inset Quotes eld
10018 \begin_inset Quotes erd
10021 , check out section
10022 \begin_inset space ~
10026 \begin_inset CommandInset ref
10028 reference "sec:slitex"
10033 If your machine doesn't have the
10038 \begin_inset Quotes eld
10046 \begin_inset Quotes erd
10049 ] installed, you'll probably have to use the default
10053 class, which isn't quite as good as
10058 \begin_layout Standard
10063 class is designed for use with version 2.1 of the
10067 LaTeX class file which is now an integral part of LaTeX2e.
10070 \begin_layout Subsection
10074 \begin_layout Standard
10075 Obviously, to use this document class, you need to select
10076 \begin_inset Quotes eld
10084 \begin_inset Quotes erd
10094 \begin_inset space ~
10100 There are some settings in the
10103 \begin_inset space ~
10108 dialog that you should know about that are specific to this class:
10111 \begin_layout Itemize
10112 Don't change the options
10123 \begin_inset space ~
10129 They're ignored by the
10136 \begin_layout Itemize
10137 The default font size is 20
10138 \begin_inset space \thinspace{}
10141 pt with the other options being 17
10142 \begin_inset space \thinspace{}
10146 \begin_inset space \thinspace{}
10150 \begin_inset space \thinspace{}
10156 \begin_layout Itemize
10157 The default font is
10165 but all math equations are still typeset in the usual roman font.
10168 \begin_layout Itemize
10173 supports A4 and Letter paper sizes as well as a special size for working
10175 \begin_inset space \thinspace{}
10179 It doesn't support A5, B5, legal or executive paper sizes.
10182 \begin_layout Itemize
10183 Don't bother changing the
10187 settings because they are ignored anyway.
10188 All floats appear where they are defined in the text.
10191 \begin_layout Itemize
10196 setting behaves a bit differently for this class.
10201 provides extensive footer and header capabilities including a user-defined
10204 \begin_inset space ~
10208 \begin_inset CommandInset ref
10210 reference "sec:foilfoot"
10215 The title page is treated differently to all other pages in the document
10224 has the logo centered at the bottom of the page (if one is defined).
10225 The possible page style choices and what they do are as follows:
10229 \begin_layout Labeling
10230 \labelwidthstring MMMMMMM
10237 The final output contains no page numbers, or other headers or footers
10238 (except footnotes of course).
10242 \begin_layout Labeling
10243 \labelwidthstring MMMMMMM
10250 The final output contains page numbers centered at the bottom of the page.
10251 No other headings or footers (other than footnotes).
10254 \begin_layout Labeling
10255 \labelwidthstring MMMMMMM
10260 Page numbers in lower right corner.
10261 Additional headers and footers are also shown.
10262 This is also the default.
10265 \begin_layout Labeling
10266 \labelwidthstring MMMMMMM
10271 Gives you access to the
10275 package although its use with
10279 is discouraged by the writer of the
10283 package because of some potential page layout clashes.
10287 \begin_layout Subsubsection
10291 \begin_layout Standard
10292 The following options may be used in the extra class options in the
10294 Document\SpecialChar \menuseparator
10300 \begin_layout Labeling
10301 \labelwidthstring MMMMMMx
10306 This sets up the page layout for 7.33
10307 \begin_inset space \thinspace{}
10311 \begin_inset space \thinspace{}
10314 in paper, which is about the same aspect ratio as a 35
10315 \begin_inset space \thinspace{}
10318 mm slide, making it a bit easier to work with this medium.
10321 \begin_layout Labeling
10322 \labelwidthstring MMMMMMx
10327 Places a rule across the page below the header on every page except the
10331 \begin_layout Labeling
10332 \labelwidthstring MMMMMMx
10337 Places a rule across the page above the footer on every page except the
10341 \begin_layout Labeling
10342 \labelwidthstring MMMMMMx
10347 This is automatically set each time you create a new
10356 to use the dvips driver to rotate those pages that are set as landscape
10360 \begin_layout Labeling
10361 \labelwidthstring MMMMMMx
10366 Simply changes the page dimensions to those of a landscape page but doesn't
10368 Thus if you use this option you need to use an external program to rotate
10369 each page or feed your paper through your printer as landscape.
10370 Note that this option effectively reverses the roles of the
10378 environments (don't worry these are described in the next section).
10381 \begin_layout Labeling
10382 \labelwidthstring MMMMMMx
10387 Equation numbers on the left.
10390 \begin_layout Labeling
10391 \labelwidthstring MMMMMMx
10396 Flush-left equations.
10399 \begin_layout Subsection
10400 Supported Environments
10403 \begin_layout Standard
10404 Most of the environments commonly supported in other classes are also supported
10410 There are several additional environments provided by
10414 as well as a couple added by LyX.
10415 The following environments are shared with other classes:
10418 \begin_layout Standard
10422 \begin_layout Plain Layout
10426 begin{multicols}{2}
10434 \begin_layout Itemize
10440 \begin_layout Itemize
10446 \begin_layout Itemize
10452 \begin_layout Itemize
10458 \begin_layout Itemize
10464 \begin_layout Itemize
10470 \begin_layout Itemize
10476 \begin_layout Itemize
10482 \begin_layout Itemize
10488 \begin_layout Itemize
10494 \begin_layout Itemize
10500 \begin_layout Itemize
10506 \begin_layout Itemize
10512 \begin_layout Itemize
10518 \begin_layout Itemize
10524 \begin_layout Itemize
10530 \begin_layout Itemize
10536 \begin_layout Itemize
10542 \begin_layout Standard
10546 \begin_layout Plain Layout
10558 \begin_layout Standard
10559 That is, all the major environments apart from the sectioning environments.
10560 Since foils are essentially self-contained sections, with a title and body,
10565 provides specific commands for starting new foils and these are:
10568 \begin_layout Itemize
10574 \begin_layout Itemize
10580 \begin_layout Standard
10581 LyX also provides slightly modified versions of these two environments called:
10584 \begin_layout Itemize
10590 \begin_layout Itemize
10593 ShortRotatefoilhead
10596 \begin_layout Standard
10597 and the differences will be explained in the next section.
10600 \begin_layout Standard
10601 Since foils are often used in presenting ideas or new theorems and such
10606 also provides a comprehensive box of goodies for presenting them:
10609 \begin_layout Standard
10613 \begin_layout Plain Layout
10617 begin{multicols}{2}
10625 \begin_layout Itemize
10631 \begin_layout Itemize
10637 \begin_layout Itemize
10643 \begin_layout Itemize
10649 \begin_layout Itemize
10655 \begin_layout Itemize
10661 \begin_layout Itemize
10667 \begin_layout Itemize
10673 \begin_layout Itemize
10679 \begin_layout Itemize
10685 \begin_layout Itemize
10691 \begin_layout Standard
10695 \begin_layout Plain Layout
10707 \begin_layout Standard
10708 The starred versions are unnumbered while the unstarred versions are numbered.
10709 There are also two list environments added by LyX and these are:
10712 \begin_layout Itemize
10718 \begin_layout Itemize
10724 \begin_layout Standard
10729 provides some powerful header and footer capabilities that are best set
10730 in the preamble although they may be set at any point in a document.
10731 If you want to change these settings in your document the best place to
10732 do so is at the very top of a foil, i.
10733 \begin_inset space \thinspace{}
10739 \begin_inset space \space{}
10744 straight after the foilhead.
10747 \begin_layout Standard
10748 For this purpose, the following command styles are provided [
10755 \begin_layout Standard
10759 \begin_layout Plain Layout
10763 begin{multicols}{2}
10771 \begin_layout Itemize
10775 \begin_inset space ~
10781 \begin_layout Itemize
10787 \begin_layout Itemize
10791 \begin_inset space ~
10797 \begin_layout Itemize
10801 \begin_inset space ~
10807 \begin_layout Itemize
10811 \begin_inset space ~
10818 \begin_layout Standard
10819 \begin_inset space ~
10826 \begin_layout Standard
10830 \begin_layout Plain Layout
10842 \begin_layout Standard
10843 There are also a few commands provided by
10847 that aren't directly supported by LyX but I'll tell you what they do and
10848 how to use them in section
10849 \begin_inset space ~
10853 \begin_inset CommandInset ref
10855 reference "sec:unsuppfoils"
10862 \begin_layout Subsection
10863 Building a Set of Foils
10866 \begin_layout Standard
10867 This section will give a simple introduction to using the different environments
10868 to build a set of foils.
10869 If you want to see an example set of foils, take a look at the
10873 file you find in LyX's
10880 \begin_layout Subsubsection
10881 Give It a Title Page
10884 \begin_layout Standard
10885 Unlike other classes that provide
10905 creates the title on a page of its own.
10906 If you leave out the
10910 environment LaTeX will substitute the current date (every time you regenerate
10914 \begin_layout Subsubsection
10918 \begin_layout Standard
10919 As I mentioned earlier, there are four ways of starting a new foil.
10920 For portrait foils you should use
10929 The difference between these two environments is the amount of space between
10930 the title of the foil (the foilhead) and the body of the foil.
10933 \begin_layout Standard
10934 Landscape foils are generated using the
10940 ShortRotatefoilhead
10943 Again the only difference is the spacing between foilhead and body.
10944 Both of the short versions have 0.5 inches less separation between the foilhead
10949 \begin_layout Standard
10950 One problem with the support for landscape foils is the requirement that
10951 you have to use the
10955 driver to generate the PostScript output otherwise the foils won't be rotated.
10956 It is possible to get landscape foils even if you haven't got the
10960 driver provided you can feed your foils sideways through your printer ;-)
10963 \begin_layout Subsubsection
10964 Theorems, Lemmas, Proofs and more
10967 \begin_layout Standard
10968 Due to a small bug in LyX you can't have two of the same type of these environme
10969 nts directly following each other.
10970 They must be separated by something.
10971 If you try, you will just be extending the previous environment as if you
10972 had merged the two environments together.
10973 So, how do you get around this problem? The simplest option is to insert
10974 some text between the two environments or add a
10978 environment between the two with just a
10979 \begin_inset Quotes eld
10987 \begin_inset Quotes erd
10991 This will force LyX to produce two separate environments and hence the
10992 correct LaTeX output.
10993 An example is provided in the example file included with the LyX distribution.
10994 Remember, this problem only occurs if you are trying to place two of the
10995 same type of theorem-like environments one directly after the other.
10998 \begin_layout Subsubsection
11002 \begin_layout Standard
11003 You get all the commonly supported list styles found in other classes as
11004 well as two new ones.
11005 I'll only describe the new ones here.
11006 If you want to find out more about the other list environments check out
11012 If you intend to use itemized lists you might also want to read about the
11016 \begin_inset space ~
11020 \begin_inset space ~
11025 dialog described above in section
11026 \begin_inset space ~
11030 \begin_inset CommandInset ref
11032 reference "sec:bullet"
11039 \begin_layout Standard
11040 The two new list styles,
11048 , are designed to make it easier for you to create lists of do's and don'ts
11049 or right and wrong by providing dedicated environments that use a tick
11050 or a cross as the label of the list.
11051 These lists are in fact dedicated variants of the
11056 They do however require that you have the
11060 packages installed.
11063 \begin_layout Subsubsection
11067 \begin_layout Standard
11072 redefines the floating tables and figures so that they appear exactly where
11073 they are in the text rather than pushing them to the top of the page or
11074 to some user specified location.
11075 In fact if you change the float placement settings they are simply ignored.
11078 \begin_layout Subsubsection
11079 Page Headers and Footers
11080 \begin_inset CommandInset label
11082 name "sec:foilfoot"
11089 \begin_layout Standard
11093 \begin_inset space ~
11102 are two commands used to control the left-footer text string.
11103 The first is meant to allow you to include a graphic logo on your foils
11105 \begin_inset Quotes eld
11113 \begin_inset Quotes erd
11117 While the second is meant to provide a classification for the audience,
11121 \begin_inset space \thinspace{}
11127 \begin_inset space \space{}
11131 It is empty by default.
11134 \begin_layout Standard
11135 The remaining page corners can be filled by
11138 \begin_inset space ~
11143 (which defaults to page numbers),
11146 \begin_inset space ~
11154 \begin_inset space ~
11162 \begin_layout Subsection
11168 \begin_inset CommandInset label
11170 name "sec:unsuppfoils"
11177 \begin_layout Standard
11178 All the commands mentioned below need to be set in a
11186 within another environment.
11189 \begin_layout Subsubsection
11193 \begin_layout Standard
11194 All lengths are adjusted using the
11217 should be replaced by the name given to the length you want to change and
11222 is the length value.
11223 All lengths should be specified in units of length such as inches (
11235 ) or relative to some document or font-based length such as
11245 \begin_layout Standard
11246 It's possible to change the spacing between a foilhead and the body of the
11247 foil by adjusting the length specified by
11254 For example, to make
11259 \begin_inset space \space{}
11262 in closer to their bodies put the following in the preamble:
11268 foilheadskip}{-0.5in}
11271 \begin_layout Standard
11272 The spacings around floats can be adjusted by setting these lengths:
11275 \begin_layout Labeling
11276 \labelwidthstring MMMMMMMMMMM
11283 Separation between the text and the top of the float
11286 \begin_layout Labeling
11287 \labelwidthstring MMMMMMMMMMM
11294 Separation between the float and the caption
11297 \begin_layout Labeling
11298 \labelwidthstring MMMMMMMMMMM
11305 Separation between the caption and the following text
11308 \begin_layout Labeling
11309 \labelwidthstring MMMMMMMMMMM
11316 You can make the captions narrower than the surrounding text by adjusting
11318 Best done relative to
11327 \begin_layout Standard
11328 There are also several title page related lengths that you may find useful
11329 if you have a long title or several authors:
11332 \begin_layout Labeling
11333 \labelwidthstring MMMMMMMMMMM
11340 Separation from headers to
11345 \begin_layout Labeling
11346 \labelwidthstring MMMMMMMMMMM
11364 \begin_layout Labeling
11365 \labelwidthstring MMMMMMMMMMM
11379 \begin_layout Labeling
11380 \labelwidthstring MMMMMMMMMMM
11396 \begin_layout Labeling
11397 \labelwidthstring MMMMMMMMMMM
11413 \begin_layout Standard
11414 The last length related command affects all the list environments.
11425 a list environment then all the vertical spacing between the list items
11427 Note that this is a command not a length so it doesn't require
11433 like the stuff mentioned above.
11436 \begin_layout Subsubsection
11437 Headers and Footers
11440 \begin_layout Standard
11453 commands control whether the logo in the
11457 definition appear on a given page.
11464 in the preamble then none of the foils will have the logo on them.
11465 If you don't want the logo on a particular page place the
11471 directly after the foilhead of that page and the
11477 directly after the next foilhead.
11480 \begin_layout Standard
11481 If you decide to use the
11485 page style setting in the
11488 \begin_inset space ~
11493 dialog you should probably add
11503 to your preamble so headers and footers on landscape pages are correctly
11504 placed when rotated.
11505 This is due to some clashes between the page layouts provided by the
11516 \begin_layout Section
11517 Hollywood (Hollywood spec scripts)
11520 \begin_layout Standard
11526 \begin_layout Subsection
11530 \begin_layout Standard
11531 Getting the format of a Hollywood script right is a
11532 \begin_inset Quotes eld
11536 \begin_inset Quotes erd
11539 It is designed to make the readers focus on content and to be easy and
11540 familiar for the actors to read.
11541 Each page of a script should be one minute of film.
11542 Nothing goes in a script that you cannot see or hear on screen.
11543 The courier 12 pt font should be used throughout.
11547 \begin_layout Subsection
11551 \begin_layout Standard
11552 Speakers' lines should NEVER break in mid-sentence.
11553 If a speaker's lines continue over a page break, repeat the
11557 title followed by (Cont'd).
11560 \begin_layout Subsection
11564 \begin_layout Standard
11569 names as labels then cross-reference the label to insert the name.
11570 The cross-reference dialog will show the current cast of characters.
11571 You can use this to insert the speaker name in narratives also.
11574 \begin_layout Subsection
11575 Paper size and Margins
11578 \begin_layout Standard
11579 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11582 \begin_layout Subsection
11586 \begin_layout Standard
11587 The following environments are available.
11588 You can use hollywood.bind to get the bind keys shown at the right.
11591 \begin_layout Itemize
11595 \begin_inset Newline newline
11600 Used where nothing else works.
11604 \begin_layout Itemize
11610 \begin_inset space \hfill{}
11618 \begin_inset Newline newline
11621 Usually followed by something like
11622 \begin_inset Quotes eld
11625 on Sally waking up.
11626 \begin_inset Quotes erd
11632 \begin_layout Itemize
11636 \begin_inset space \hfill{}
11640 \begin_inset Newline newline
11645 Introduces a new INTERIOR camera set-up.
11646 Always followed by DAY or NIGHT, or something similar to define the lighting
11648 Everthing on this line in CAPS.
11651 \begin_layout Itemize
11655 \begin_inset space \hfill{}
11659 \begin_inset Newline newline
11664 Introduces a new EXTERIOR camera set-up.
11665 Everthing on this line in CAPS.
11668 \begin_layout Itemize
11672 \begin_inset space \hfill{}
11676 \begin_inset Newline newline
11681 The character speaking.
11684 \begin_layout Itemize
11688 \begin_inset space \hfill{}
11692 \begin_inset Newline newline
11697 Instructions to the speaker.
11698 The () are automatically inserted, but only the ( will show in LyX.
11699 Both will be printed.
11702 \begin_layout Itemize
11706 \begin_inset space \hfill{}
11710 \begin_inset Newline newline
11722 \begin_layout Itemize
11726 \begin_inset space \hfill{}
11730 \begin_inset Newline newline
11735 Camera movement instruction.
11737 \begin_inset space \thinspace{}
11741 \begin_inset space \space{}
11747 \begin_layout Itemize
11751 \begin_inset space \hfill{}
11757 \begin_layout Itemize
11761 \begin_inset space \hfill{}
11767 \begin_layout Itemize
11771 \begin_inset space \hfill{}
11777 \begin_layout Itemize
11781 \begin_inset space \hfill{}
11787 \begin_layout Subsection
11791 \begin_layout Itemize
11795 \begin_layout Itemize
11799 \begin_layout Itemize
11801 \begin_inset space \thinspace{}
11808 \begin_layout Itemize
11813 \begin_layout Itemize
11814 PAN — camera movement
11817 \begin_layout Itemize
11818 INSERT — cut to close-up of
11821 \begin_layout Section
11825 \begin_layout Standard
11828 Panayotis Papasotiriou
11831 \begin_layout Subsection
11835 \begin_layout Standard
11836 The ijmpc package is a set of macros that facilitates electronic manuscript
11839 International Journal of Modern Physics C
11842 Similarly, the ijmpd package is for creating manuscripts to be submitted
11845 International Journal of Modern Physics D
11848 Both journals are published by World Scientific.
11849 The corresponding document classes are named
11858 These files, together with instructions for the authors, can be downloaded
11860 \begin_inset Flex URL
11863 \begin_layout Plain Layout
11865 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11871 \begin_inset Flex URL
11874 \begin_layout Plain Layout
11876 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11882 Both packages are modified versions of the standard
11883 \begin_inset Quotes eld
11887 \begin_inset Quotes erd
11890 package, and they are almost (but not exactly) identical.
11891 Most of their features are supported by LyX.
11892 I have used LyX successfully to write articles submitted to both journals
11893 without any problem.
11896 \begin_layout Subsection
11900 \begin_layout Standard
11901 As usual, the easiest way to write a paper is to start with a template.
11904 File\SpecialChar \menuseparator
11923 This will give an (almost) empty document that includes the most common
11924 fields found in a manuscript.
11925 Simply overwrite the existing text (including the brackets,
11930 You should keep in mind the following remarks.
11933 \begin_layout Enumerate
11934 LyX won't let you change the font size and the page style of the document,
11935 because such modifications are not allowed by both packages.
11938 \begin_layout Enumerate
11939 The language of the document should not be changed.
11940 Before previewing your paper, be sure that the babel package is not used.
11941 To do this, click on
11943 Tools\SpecialChar \menuseparator
11954 checkbox in the language settings, and click on
11962 , if you wish to make this change permanent).
11965 \begin_layout Enumerate
11967 \begin_inset Quotes eld
11971 \begin_inset Quotes erd
11974 style must be used to define keywords.
11977 \begin_layout Enumerate
11978 The ijmpc package provides a style named
11979 \begin_inset Quotes eld
11982 Classification Codes
11983 \begin_inset Quotes erd
11986 , which can be used to define classification codes, such as PACS numbers.
11987 Note that this facility is not supported by the ijmpd package.
11990 \begin_layout Enumerate
11991 Several new environments are available:
11992 \begin_inset Quotes eld
11996 \begin_inset Quotes erd
12000 \begin_inset Quotes eld
12004 \begin_inset Quotes erd
12008 \begin_inset Quotes eld
12012 \begin_inset Quotes erd
12016 \begin_inset Quotes eld
12020 \begin_inset Quotes erd
12024 \begin_inset Quotes eld
12028 \begin_inset Quotes erd
12032 \begin_inset Quotes eld
12036 \begin_inset Quotes erd
12040 \begin_inset Quotes eld
12044 \begin_inset Quotes erd
12048 \begin_inset Quotes eld
12052 \begin_inset Quotes erd
12056 \begin_inset Quotes eld
12060 \begin_inset Quotes erd
12064 \begin_inset Quotes eld
12068 \begin_inset Quotes erd
12072 \begin_inset Quotes eld
12076 \begin_inset Quotes erd
12080 \begin_inset Quotes eld
12084 \begin_inset Quotes erd
12088 \begin_inset Quotes eld
12092 \begin_inset Quotes erd
12096 \begin_inset Quotes eld
12100 \begin_inset Quotes erd
12104 Their use is more or less obvious.
12105 LyX supports all these environments; it will use the proper label, text
12106 style, and numbering scheme for each of them.
12109 \begin_layout Enumerate
12110 Both packages use basic citations; the natbib package should not be used.
12111 In LyX, citation references are shown as usual; in the output, citations
12112 are shown as superscripts.
12113 If you want to use a citation as normal text, you should use the
12118 \begin_inset space \thinspace{}
12122 \begin_inset space \space{}
12126 \begin_inset Quotes eld
12130 \begin_inset space \space{}
12140 \begin_inset Quotes erd
12146 \begin_layout Enumerate
12148 \begin_inset Quotes eld
12152 \begin_inset Quotes erd
12155 section in both packages.
12156 To put acknowledgments, just use the
12157 \begin_inset Quotes eld
12161 \begin_inset Quotes erd
12167 \begin_layout Enumerate
12168 Appendices may be added to the paper,
12172 the Acknowledgments and
12177 LyX provides a special environment, called
12178 \begin_inset Quotes eld
12182 \begin_inset Quotes erd
12185 which marks the beginning of the appendices.
12186 This environment should be left blank; it just sends a LaTeX command, but
12187 nothing is really printed.
12189 \begin_inset Quotes eld
12193 \begin_inset Quotes erd
12196 is printed with blue letters, as a signal that all sections after that
12197 point are appendices.
12198 To write an appendix, use the
12199 \begin_inset Quotes eld
12203 \begin_inset Quotes erd
12207 LyX will number each appendix with capital letters, as required by both
12210 \begin_inset Quotes eld
12214 \begin_inset Quotes erd
12221 be present before the first appendix; if not, all appendices will be numbered
12222 as normal sections in the output.
12225 \begin_layout Enumerate
12226 The ijmpc and the ijmpd packages use the
12230 command to implement table captions.
12231 As a result, a table created by LyX is printed correctly, but its caption
12233 However, you can use some TeX code to overcome this problem, so that captions
12234 are printed as expected.
12235 To do so, create a float table as usual, remove the caption, and replace
12236 it with the TeX code
12246 (sic); you must also the TeX code
12250 immediately after the tabular material.
12251 Study the example table included in the template files to see how this
12252 trick is implemented.
12253 Alternatively, If you need table captions, you should implement the whole
12258 file, then include this file to the LyX document (
12260 Insert\SpecialChar \menuseparator
12261 File\SpecialChar \menuseparator
12263 \begin_inset space ~
12269 Details on how to create a table float can be found in the files
12277 , included in the corresponding packages.
12280 \begin_layout Subsection
12281 Preparing a paper for submission
12284 \begin_layout Standard
12285 Before you submit your paper you must export the LyX document as a LaTeX
12288 File\SpecialChar \menuseparator
12289 Export\SpecialChar \menuseparator
12296 \begin_layout Plain Layout
12297 Actually you have the choice between LaTeX (plain) and pdflatex.
12298 If you intend to use pdflatex to prepare the paper, you should use the
12299 pdflatex option so that included graphics are converted to PDF format,
12300 ready for use by pdflatex.
12305 , then make the following changes to the resulting
12312 \begin_layout Enumerate
12313 Remove the comment lines before the
12322 \begin_layout Enumerate
12323 Remove everything between (and including) the
12335 commands, except for any commands you specifically put into the LaTeX preamble.
12338 \begin_layout Standard
12343 file should be saved and processed through LaTeX as many times as necessary.
12344 You may also want to check the resulting
12351 \begin_layout Subsection
12355 \begin_layout Standard
12356 The use of TeX code is reduced to two commands, which must be placed at
12357 the top of the document.
12358 If you started writing your paper by using the
12366 template, the TeX code needed is already in its place; you usually don't
12368 You may only modify the first TeX code to specify the information printed
12369 to the top of odd and even pages (authors' names and short paper's title,
12371 This TeX code must have the form
12375 markboth{Authors' Names}{Short Paper's Title}
12380 \begin_layout Section
12384 \begin_layout Standard
12390 \begin_layout Subsection
12394 \begin_layout Standard
12395 The iopart package provides a document class to create electronic manuscript
12396 submission to the journals published by the Institute of Physics.
12397 Instructions for the authors how to create a paper using the iopart class
12398 can be downloaded together with the iopart package from the site
12399 \begin_inset Flex URL
12402 \begin_layout Plain Layout
12404 ftp://ftp.iop.org/pub/journals/latex2e
12412 \begin_layout Subsection
12416 \begin_layout Standard
12417 The easiest way to write a paper is to start with the file
12421 that is available in LyX's examples files folder.
12422 Open this file, save it under a new name, and start writing.
12423 The example file explains how to use the special text environments.
12424 Here are the most important advices:
12427 \begin_layout Itemize
12428 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12431 Use AMS math package
12433 in the document settings under
12440 \begin_layout Itemize
12443 The title environment defines the kind of your paper.
12444 So use one of the following environments for the title:
12448 \begin_layout Itemize
12457 \begin_layout Itemize
12466 \begin_layout Itemize
12472 for a Topical review
12475 \begin_layout Itemize
12484 \begin_layout Itemize
12493 \begin_layout Itemize
12499 for a Paper (same as Title)
12502 \begin_layout Itemize
12508 for a Preliminary communication
12511 \begin_layout Itemize
12517 for a Rapid communication
12520 \begin_layout Itemize
12526 for a Letter to the editor
12530 \begin_layout Itemize
12533 All title environments except of
12537 can have an optional short title.
12540 \begin_layout Itemize
12541 There is a general title environment
12545 which is not directly supported by the LyX.
12546 This can be used as TeX code when your document doesn't fit into one of
12547 the other title types.
12550 \begin_layout Standard
12551 For more informations like hints for special table and formula formatting,
12552 look at the IOP author guidelines.
12555 \begin_layout Section
12559 \begin_layout Standard
12562 Panayotis Papasotiriou
12565 \begin_layout Subsection
12569 \begin_layout Standard
12570 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12571 that facilitates electronic manuscript submission to the journals they
12573 Most known of them (at least in my domain of interest) are
12575 Astrophysics and Space Science
12581 , but there are many others (see a complete list at
12582 \begin_inset Flex URL
12585 \begin_layout Plain Layout
12587 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12593 The Kluwer package may be downloaded from the site
12594 \begin_inset Flex URL
12597 \begin_layout Plain Layout
12599 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12605 A complete user guide is contained in that package (but it can also be
12606 downloaded separately).
12609 \begin_layout Standard
12610 LyX supports many features of the package but not everything.
12611 However, the TeX code needed is reduced to some
12612 \begin_inset Quotes eld
12616 \begin_inset Quotes erd
12619 commands of the package (see
12620 \begin_inset space ~
12624 \begin_inset CommandInset ref
12626 reference "subsec:kluwer_peculiarities"
12631 I have recently used LyX to write an article submitted to the
12633 Astrophysics and Space Science
12635 without any problem.
12638 \begin_layout Subsection
12642 \begin_layout Standard
12643 The easiest way to write a paper is to start with the Kluwer template file.
12646 File\SpecialChar \menuseparator
12658 This will give an (almost) empty document that includes the most common
12659 fields found in a manuscript and a short description of their use.
12660 As in most templates, simply overwrite the existing text (including the
12665 ) with the correct information.
12668 \begin_layout Subsection
12669 Preparing a paper for submission
12672 \begin_layout Standard
12673 As in the AASTeX package, before you submit your paper to a journal you
12675 \begin_inset Quotes eld
12679 \begin_inset Quotes erd
12685 \begin_layout Enumerate
12686 Export your paper as a LaTeX file.
12687 To do this, click on
12689 File\SpecialChar \menuseparator
12690 Export\SpecialChar \menuseparator
12697 \begin_layout Enumerate
12702 file with a text editor and make the following changes
12706 \begin_layout Enumerate
12707 remove the comment lines before the
12716 \begin_layout Enumerate
12717 remove everything between (and including) the
12729 commands, except for any commands you specifically put into the LaTeX preamble.
12732 \begin_layout Standard
12741 \begin_layout Enumerate
12746 file through LaTeX as many times as necessary (usually up to three).
12749 \begin_layout Enumerate
12755 \begin_inset space \thinspace{}
12759 \begin_inset space \space{}
12766 , and check if everything is OK (it should, if you didn't make any mistake).
12769 \begin_layout Subsection
12770 \begin_inset Quotes eld
12774 \begin_inset Quotes erd
12777 of the Kluwer package
12778 \begin_inset CommandInset label
12780 name "subsec:kluwer_peculiarities"
12787 \begin_layout Standard
12788 The Kluwer package has the following
12789 \begin_inset Quotes eld
12793 \begin_inset Quotes erd
12799 \begin_layout Enumerate
12800 It is possible to write multiple articles in the same LaTeX file
12804 \begin_layout Plain Layout
12805 I can't imagine any good reason to do this.
12811 Each article must be included in the environment
12812 \begin_inset Quotes eld
12816 \begin_inset Quotes erd
12820 Unfortunately, this environment cannot be omitted, even if you write just
12822 Therefore, each article starts with the command
12828 and, obviously, ends with the command
12835 Although this can be implemented in LyX, I didn't included it, since it
12836 looks ugly and can confuse the novice user.
12837 Therefore, you need to enter them directly and mark them as LaTeX code
12839 \begin_inset Quotes eld
12843 \begin_inset Quotes erd
12849 \begin_layout Enumerate
12850 Information given at the beginning of the article (i.
12851 \begin_inset space \thinspace{}
12855 \begin_inset space \space{}
12858 title, subtitle, author, institution, running title, running author, abstract
12859 and keywords) must be included in an environment called
12860 \begin_inset Quotes eld
12864 \begin_inset Quotes erd
12868 This is not implemented in LyX, so you must enter title, subtitle etc.
12869 \begin_inset space ~
12872 between two TeX code lines (
12887 \begin_layout Enumerate
12888 According to the user manual, the label of each bibliography item must be
12912 \begin_layout Standard
12917 template takes care of all these
12918 \begin_inset Quotes eld
12922 \begin_inset Quotes erd
12926 If you start a new paper using this template you don't need to do anything
12931 \begin_layout Enumerate
12932 don't delete the TeX code included in the template, and
12935 \begin_layout Enumerate
12936 copy the example bibliography item included in the template and modify it
12937 as necessary to enter new bibliography items.
12940 \begin_layout Section
12944 \begin_layout Standard
12950 \begin_layout Subsection
12954 \begin_layout Standard
12955 The LyX document classes
12957 article (koma-script)
12961 report (koma-script)
12979 correspond to the LaTeX document classes
12996 \begin_inset space ~
12999 of the Koma-Script family.
13000 They are replacements for the standard document classes
13016 , resp., and fit better to European typography conventions in a number of
13020 \begin_layout Itemize
13021 Standard character size is 11pt in
13023 article (koma-script)
13027 report (koma-script)
13035 letter (koma-script)
13040 \begin_layout Itemize
13041 Headings, labels of the description environment, and a number of elements
13044 letter (koma-script)
13046 document class are set in a bold sans serif font.
13050 \begin_layout Plain Layout
13051 There is a big difference between the bold sans serif old cm fonts and new
13052 ec fonts, especially in the appearance of headings.
13053 In comparison, the ec bold sans serif fonts look a bit thin.
13054 Here the LaTeX package
13062 helps to produce the
13063 \begin_inset Quotes eld
13067 \begin_inset Quotes erd
13070 appearance when using the ec fonts.
13075 The numbering of chapter headings is made in the same way as the numbering
13076 of section headings, that is without the extra line
13077 \begin_inset Quotes eld
13080 Chapter\SpecialChar \ldots{}
13082 \begin_inset Quotes erd
13086 In addition, the appearance of the headings can be modified by using a
13087 number of options (in LyX to be entered in the field
13090 \begin_inset space ~
13097 Layout\SpecialChar \menuseparator
13104 \begin_layout Itemize
13105 The main means in the Koma-Script document classes to design the type area
13114 (in LyX to be entered in the extra class options field in the dialog
13116 Document\SpecialChar \menuseparator
13120 They make a clearer modification of page margins possible as do the options
13123 Document\SpecialChar \menuseparator
13130 \begin_layout Itemize
13131 The LaTeX document classes of the Koma-Script family define a number of
13132 additional commands.
13133 Those part of it which makes sense in LyX is implemented in corresponding
13137 \begin_layout Standard
13138 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13139 can be found in the Koma-Script documentation
13150 \begin_layout Subsection
13151 article (koma-script), report (koma-script), and book (koma-script)
13154 \begin_layout Standard
13155 The document classes
13157 article (koma-script)
13161 report (koma-script)
13171 are implemented in the layout files
13184 They contain all the paragraph types of the corresponding standard document
13197 , resp., partly modified, with the exception of the LyX specific
13201 -type, which is replaced by the new
13205 -type having the same functionality.
13210 -Type there is a number of new paragraph types added.
13217 letter (koma-script)
13222 \begin_layout Itemize
13231 : are equivalents to
13239 , resp., additionally inserting an entry in the table of contents.
13248 are not contained in
13250 article (koma-script)
13255 \begin_layout Itemize
13264 : behave exactly as
13272 , resp., additionally clearing running heads.
13277 is not contained in
13279 article (koma-script)
13285 \begin_layout Plain Layout
13298 report (koma-script)
13300 , but since this is identical to
13304 , is has not been implemented in LyX.
13312 \begin_layout Itemize
13317 : generates a heading directly above the following paragraph in the standard
13318 character size without affecting the structure of the document.
13321 \begin_layout Itemize
13330 are special captions which respect the different space settings needed
13331 for captions placed above or below an element (if you follow strict typographic
13332 rules, you might want to place table captions always above the table).
13333 You can also use the class option
13337 , which will switch
13350 You need at least Koma-Script version 2.8q to use this.
13353 \begin_layout Itemize
13358 : can be used to set a bonmot, e.
13359 \begin_inset space \thinspace{}
13363 \begin_inset space \space{}
13366 at the beginning of a chapter.
13367 If you use the optional argument (
13369 Insert\SpecialChar \menuseparator
13371 \begin_inset space ~
13376 ), you can insert the dictum's author there.
13377 Dictum and author are separated by a line.
13378 You need at least Koma-Script version 2.8q to use this.
13383 is not contained in
13385 article (koma-script)
13390 \begin_layout Standard
13391 The following types, together with the standard types
13403 , form the title area of the document.
13404 They must be entered ahead of the first
13405 \begin_inset Quotes eld
13409 \begin_inset Quotes erd
13416 \begin_layout Plain Layout
13417 The corresponding LaTeX commands must appear before the
13428 When such a type is used more than once, the latter usage overwrites the
13429 former one, that means, for every type only the latest usage is valid.
13430 The order of the different types however has, like
13442 , no effect on the appearance of the produced document.
13445 \begin_layout Itemize
13450 : produces a centered paragraph above the ordinary title (
13462 ) for the subject of the document.
13465 \begin_layout Itemize
13470 : produces a centered paragraph below the ordinary title (
13482 ) for the publishers' name.
13485 \begin_layout Itemize
13492 report (koma-script)
13498 produces a centered paragraph on its own page behind the title page, or
13501 article (koma-script)
13503 produces a centered paragraph below the ordinary title (
13519 ) for a dedication.
13522 \begin_layout Itemize
13527 : produces a left aligned paragraph above the ordinary title (
13543 ) for a document`s head.
13546 \begin_layout Itemize
13551 : produces in a double-sided print in
13553 report (koma-script)
13559 a left-aligned paragraph at the top of the title page`s back or has no
13560 effect in a single-sided print or in
13562 article (koma-script)
13567 \begin_layout Itemize
13572 : produces in a double-sided print in
13574 report (koma-script)
13580 a left-aligned paragraph at the bottom of the title page`s back or has
13581 no effect in a single-sided print or in
13583 article (koma-script)
13588 \begin_layout Itemize
13593 : produces a special
13594 \begin_inset Quotes eld
13598 \begin_inset Quotes erd
13601 page ahead of the actual document containing a paragraph without special
13605 \begin_layout Standard
13606 The layout files for the document classes
13608 article (koma-script)
13612 report (koma-script)
13618 do include the file
13623 This is thought of as a place to define your own types.
13628 in your personal layout directory and edit the file!
13631 \begin_layout Subsection
13632 letter (koma-script)
13635 \begin_layout Standard
13639 letter (koma-script)
13641 is implemented in the layout file
13646 It contains all the paragraph types of the corresponding standard document
13651 , partly modified, with the exception of the LyX specific types
13663 type, which is replaced by the new
13668 In addition, it contains, in contrast to the standard document class, the
13686 Furthermore, there are a number of new letter specific types.
13689 \begin_layout Standard
13690 The appearance of the letter produced by this document class can be controlled
13691 by a number of LaTeX commands, which you can put in the LaTeX preamble.
13695 \begin_layout Plain Layout
13696 For example, the standard appearance of the letter`s heading, consisting
13697 of name and address, is quite self-willed.
13699 \begin_inset Quotes eld
13703 \begin_inset Quotes erd
13706 heading is produced by the following LaTeX commands in the preamble:
13709 \begin_layout LyX-Code
13719 \begin_layout LyX-Code
13735 \begin_layout LyX-Code
13745 \begin_layout LyX-Code
13765 A detailed German description of such LaTeX commands can be found in the
13766 Koma-Script documentation
13771 With it, the letter's author can produce his personal letter layout.
13774 \begin_layout Standard
13783 define the beginning of the letter and must be used in every letter.
13784 To emphasize them in the LyX document class, they are marked with the letter
13794 \begin_inset space ~
13797 in the left margin.
13798 It is possible to write any number of letters in one file.
13803 type produces a new letter using the same addressee and a
13807 type produces a new addressee.
13824 are ordinary paragraph types and can also be used several times in one
13825 and the same letter.
13828 \begin_layout Itemize
13833 : produces a paragraph for the addressee and implicitly defines the beginning
13837 \begin_layout Itemize
13842 : produces a paragraph for the form of address and implicitly produces a
13846 \begin_layout Itemize
13851 : produces a paragraph for a close.
13854 \begin_layout Itemize
13859 : produces a paragraph for a postscript.
13862 \begin_layout Itemize
13867 : produces a paragraph for a distribution list.
13870 \begin_layout Itemize
13875 : produces a paragraph for enclosures.
13878 \begin_layout Standard
13919 are input types provided with a label to enter information, which will
13920 be processed by the document class.
13924 \begin_layout Plain Layout
13925 It could be seen as a matter of inconsequence, that the types
13933 described above are not such input types as well.
13934 Because of the special meaning of those types, however, I have implemented
13935 them as ordinary paragraph types with a one letter mark in the left margin.
13936 Moreover, it would affect my feeling of symmetry, if the
13944 type had such a serious different appearance.
13949 The types must be used ahead of the corresponding
13956 \begin_layout Standard
13957 An implementation of these types in a WYSIWYG fashion does not seem to make
13958 sense, because the real appearance of the produced letter does not only
13959 depend on the usage of the particular type, but also on other factors.
13960 For example, a signature entered in the
13964 type will in the standard behavior appear in the produced letter only,
13965 when in the same letter also a
13970 The entered value of the
13974 type will in the standard behavior not appear in the produced letter at
13976 The possibility to design the letter`s heading freely is already indicated
13977 in a footnote above.
13980 \begin_layout Standard
13981 The input types can also be used as empty paragraphs.
13982 This makes sense e.
13983 \begin_inset space \thinspace{}
13987 \begin_inset space \space{}
13999 type is not used at all, in the standard behavior the value of the
14003 type is used as signature, whereas if an empty
14007 type is used, no signature value is defined.
14010 \begin_layout Standard
14011 By using the input types it is possible to write a letter template, containing
14012 filled input types with your personal dates (name, address, etc.) and empty
14013 input types for other dates you want to enter.
14016 \begin_layout Itemize
14021 : sender's name, in the standard behavior appears as a centered paragraph
14022 in small caps in the letter`s heading.
14025 \begin_layout Itemize
14030 : sender's signature, in the standard behavior appears below the
14039 type is used, the value of the
14043 type appears instead.
14046 \begin_layout Itemize
14051 : sender's address, in the standard behavior appears in a centered paragraph
14052 in the letter`s heading below the sender's name.
14055 \begin_layout Itemize
14060 : sender's telephone number, in the standard behavior only sets the LaTeX
14070 \begin_layout Itemize
14075 : place of the letter`s making.
14078 \begin_layout Itemize
14083 : date of the letter`s making.
14092 , in the standard behavior, produce the place and the date in a right-aligned
14093 line below the addressee's field.
14098 type is used, neither place nor date appear, independent of the value of
14108 type is used, the date of the letter `s production is used.
14111 \begin_layout Itemize
14116 : sender`s back address, in the standard behavior appears above the addressee's
14117 field in a small sans serif font.
14120 \begin_layout Itemize
14125 : special mail information, in the standard behavior appears underlined
14126 above the addressee's field below the back address.
14129 \begin_layout Itemize
14134 : additional information, in the standard behavior appears on right side
14135 below the addressee`s field.
14138 \begin_layout Itemize
14143 : the letter's title, in the standard behavior appears in a big, bold, sans
14144 serif font above the subject.
14147 \begin_layout Itemize
14152 : the letter's subject, in the standard behavior appears in a bold font
14160 \begin_layout Standard
14181 produce a business letter like line above the
14185 line containing the fields
14186 \begin_inset Quotes eld
14190 \begin_inset Quotes erd
14194 \begin_inset Quotes eld
14198 \begin_inset Quotes erd
14202 \begin_inset Quotes eld
14206 \begin_inset Quotes erd
14210 \begin_inset Quotes eld
14214 \begin_inset Quotes erd
14218 \begin_inset Quotes eld
14222 \begin_inset Quotes erd
14226 \begin_inset Quotes eld
14230 \begin_inset Quotes erd
14234 For the date field, the value of the
14240 \begin_inset Quotes eld
14243 business letter types
14244 \begin_inset Quotes erd
14247 is used, the value of the
14251 type however does not appear, but only the LaTeX variable
14258 The ordinary output of place and date in a right-aligned line below the
14259 addressee`s field is suppressed.
14260 The types are implemented as input types provided with a label and must
14261 be used ahead of the corresponding
14268 \begin_layout Itemize
14276 \begin_layout Itemize
14284 \begin_layout Itemize
14292 \begin_layout Itemize
14300 \begin_layout Itemize
14308 \begin_layout Subsection
14309 The new letter class: letter (koma-script v.2)
14312 \begin_layout Standard
14318 \begin_layout Standard
14319 \begin_inset VSpace medskip
14325 \begin_layout Standard
14327 Koma-Script version 2.8 has introduced a new letter class
14331 which supersedes the now unsupported
14336 It has — on the LaTeX side — a completely new interface and is not compatible
14337 with the old class.
14338 Therefore, LyX supports both, though it is recommended you use the new
14342 \begin_layout Standard
14343 This class covers the same functionality as
14345 letter (koma-script),
14348 The basic items are
14352 (receiver's address, same as
14356 in the old layout),
14369 will start a new letter (i.
14370 \begin_inset space \thinspace{}
14374 \begin_inset space \space{}
14377 you can write several letters per document).
14378 New elements are sender's
14394 and the possibility to use a
14400 Insert\SpecialChar \menuseparator
14406 \begin_layout Standard
14407 The biggest improvement is, though, that the letter's layout is configurable
14408 to meet almost any needs.
14409 This can be done via the preamble or with a special style file (Letter
14410 Class Option, extension
14414 ), that will be read in as a class option.
14418 \begin_layout Plain Layout
14419 The KOMA package comes with some default
14424 There is, for instance, a
14428 file that follows german typesetting rules, or a
14432 that provides the default layout of the old
14437 The latter can be loaded with the class option
14446 ayout\SpecialChar \menuseparator
14451 ocument\SpecialChar \menuseparator
14463 template that is included in LyX for examples.
14464 A detailed description is to be found in the Koma-Script documentation
14472 \begin_layout Subsection
14476 \begin_layout Standard
14477 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14481 \begin_layout Itemize
14482 The chapter number of a
14486 type appears on a line of its own above the chapter heading instead of
14487 appearing in the same line ahead of it.
14488 The cause for that is the LyX internal behavior for the labeltype
14492 in the layout file.
14495 \begin_layout Itemize
14496 The headings of the types
14504 are only put in the
14505 \begin_inset Quotes eld
14509 \begin_inset Quotes erd
14512 LaTeX table of contents, but not in the LyX table of contents (
14514 Document\SpecialChar \menuseparator
14516 \begin_inset space ~
14520 \begin_inset space ~
14528 \begin_layout Itemize
14529 The paragraphs in a
14533 document class appear in a skip separation mode, not indented.
14534 This is the standard behavior, no special LaTeX commands are needed for
14538 Document\SpecialChar \menuseparator
14541 dialog the corresponding radio button indicates
14550 value always has the effect that extra LaTeX commands are inserted in the
14551 document to produce the gap, which is not what is wanted in this case.
14554 \begin_layout Section
14558 \begin_layout Standard
14564 \begin_layout Subsection
14568 \begin_layout Standard
14569 Memoir is a very powerful and constantly evolving class.
14570 It has been designed with regard to fictional and non-fictional literature.
14571 Its aim is to let the user have maximum control over the typesetting of
14573 Memoir is based on the standard book class, but it can also emulate the
14574 article class (see below).
14577 \begin_layout Standard
14578 Peter Wilson, the developer of Memoir, is known as the author of lots of
14579 useful packages in the LaTeX world.
14580 Most of them have been merged with Memoir.
14581 Therefore, it is much easier to layout the table of contents, appendices,
14582 chapter designs and such.
14583 LyX, though, does not support all of these goodies natively.
14584 Some of them might be added to forthcoming releases
14588 \begin_layout Plain Layout
14589 You are invited to send suggestions to
14590 \begin_inset Flex URL
14593 \begin_layout Plain Layout
14595 lyx-devel@lists.lyx.org
14605 , lots will probably never be supported, due to the limitations of LyX's
14607 Of course you can still use all features with the help of some native LaTeX
14612 \begin_layout Plain Layout
14617 \begin_layout Plain Layout
14627 \begin_inset space ~
14631 \begin_inset CommandInset ref
14633 reference "sec:Inserting-TeX-Code"
14643 In this section, we can only list those features that are natively supported
14645 For detailed descriptions (and for the rest of features) we recommend you
14646 have a look at the detailed manual of the Memoir class
14650 \begin_layout Plain Layout
14655 \begin_layout Plain Layout
14665 \begin_inset Flex URL
14668 \begin_layout Plain Layout
14670 CTAN:/macros/latex/memoir/memman.pdf
14680 , which is not only a user guide for the class, but also both a comprehensive
14681 description on good typesetting and a superb example for good typesetting
14685 \begin_layout Subsection
14686 Basic features and restrictions
14689 \begin_layout Standard
14690 Memoir supports basically all features of the standard book classes.
14691 There are, however, some differences, as follows:
14694 \begin_layout Description
14696 \begin_inset space ~
14699 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14702 \begin_layout Description
14704 \begin_inset space ~
14707 style: The fancy page style is not supported, due to a command clash between
14708 Memoir and the fancyhdr package (they both define a command with the same
14709 name, which confuses LaTeX).
14710 Instead, Memoir comes with a number of its own page styles (see
14712 Layout\SpecialChar \menuseparator
14713 Document\SpecialChar \menuseparator
14715 \begin_inset space ~
14721 If you want to use these for the chapter pages, you have to use the command
14728 in the main text or in preamble (e.
14729 \begin_inset space \thinspace{}
14733 \begin_inset space \space{}
14740 chapterstyle{companion}
14745 \begin_layout Description
14746 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14747 optional argument in the standard classes.
14748 With this, you can specify an alternative version of the title for the
14749 table of contents and the headers (for instance, if the title is too long).
14750 In LyX, you can do this via
14752 Insert\SpecialChar \menuseparator
14754 \begin_inset space ~
14759 at the beginning of a chapter/section.
14760 Memoir features a second optional argument and thus separates the table
14761 of contents from the header.
14762 You can define three variants of a title with this: one for the main text,
14763 one for the table of contents, and one for the headers.
14764 Simply insert two optional arguments if you need this feature, the first
14765 one containing the short title for the Table of Contents, the second one
14766 containing an alternative short title for the headers.
14769 \begin_layout Description
14770 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14771 of contents, the list of figures and the list of table start a new page
14773 Memoir does not follow this route.
14774 You have to insert a page break yourself, if you want to have one.
14777 \begin_layout Description
14778 Titlepage: For some unknown reason, Memoir uses pagination on the title
14779 page (in the standard classes, title pages are
14780 \begin_inset Quotes eld
14784 \begin_inset Quotes erd
14788 \begin_inset space \thinspace{}
14792 \begin_inset space \space{}
14796 If you want an empty title page, type
14800 aliaspagestyle{title}{empty}
14805 \begin_layout Description
14806 Article: With the class option
14812 Layout\SpecialChar \menuseparator
14813 Document\SpecialChar \menuseparator
14815 \begin_inset space ~
14820 ), you can emulate article style.
14821 That is, counters (footnotes, figures, tables etc.) will not be reset on
14822 new chapters, chapters don't start a new page (but are—in contrary to
14823 \begin_inset Quotes eld
14827 \begin_inset Quotes erd
14830 article classes—still allowed), parts, though, use their own page, as in
14834 \begin_layout Description
14835 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14836 font commands, which have been used in the old LaTeX version 2.09 (e.
14837 \begin_inset space \thinspace{}
14841 \begin_inset space \space{}
14857 It produces an error and stops LaTeX whenever such a command appears.
14862 reallows the commands and spits out warnings instead (which does at least
14864 Since a lot of packages and particularly BibTeX style files are still using
14865 those commands, we have decided to use this option by default.
14868 \begin_layout Subsection
14872 \begin_layout Standard
14873 We will only describe the features supported by LyX (which is not much currently
14875 Please consult the Memoir manual
14879 \begin_layout Plain Layout
14884 \begin_layout Plain Layout
14894 \begin_inset Flex URL
14897 \begin_layout Plain Layout
14899 CTAN:/macros/latex/memoir/memman.pdf
14912 \begin_layout Description
14913 Abstract: You may wonder why an abstract is an extra feature.
14914 Well, it is in book class.
14915 Usually books don't have abstracts.
14916 Memoir, however, has.
14917 You can use it wherever and how often you like.
14920 \begin_layout Description
14921 Chapterprecis: You may know this older typesetting style: The contents of
14922 a chapter are summarized below the title and also in the table of contents
14924 \begin_inset space \thinspace{}
14928 \begin_inset space \space{}
14933 Our hero arrives in Troia; he loses some friends; he finds others
14936 Chapterprecis does exactly this.
14937 It is therefore only sensible below a chapter.
14940 \begin_layout Description
14941 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14942 The epigraph environment provides an elegant way of typesetting such a
14944 The motto itself (text) and its author (source) are divided by a short
14946 Unfortunately, we have to fool LyX a bit here again, since the environment
14947 needs two arguments (text and source).
14948 In this case, we have to use curly brackets (in TeX mode) between the two
14959 <author of the slogan>.
14962 \begin_layout Description
14963 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14964 complex figurative poems).
14965 LyX can only support a few of them.
14966 One is poemtitle, which is a centered title for poems, which will also
14967 be added to the table of contents (verse is the standard environment for
14969 Memoir has some enhanced versions of verse, but you need to use TeX code,
14970 because they have to be nested inside regular verse environments, which
14971 is not possible with LyX).
14974 \begin_layout Description
14975 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14978 \begin_layout Section
14979 Article (mwart), book (mwbk) and report (mwrep)
14980 \begin_inset Argument
14983 \begin_layout Plain Layout
14996 \begin_layout Standard
15002 \begin_layout Standard
15003 The LyX document classes
15019 correspond to the LaTeX document classes
15032 They are replacements for the standard document classes
15044 , resp., and fit better to Polish typography conventions in a number of points.
15048 \begin_layout Standard
15052 \begin_layout Itemize
15053 Unnumbered titles (with star, e.
15054 \begin_inset space \thinspace{}
15058 \begin_inset space \space{}
15065 ) are added into table of contents,
15068 \begin_layout Itemize
15069 Additional page styles:
15073 \begin_layout Description
15074 uheadings header with separated lines,
15077 \begin_layout Description
15078 myheadings custom header, contents headers via commands:
15093 \begin_layout Description
15094 myuheadings custom header with separated lines,
15097 \begin_layout Description
15098 outer page number is placed on outer side of page
15102 \begin_layout Itemize
15107 \begin_layout Description
15108 rmheadings serif titles — default,
15111 \begin_layout Description
15112 sfheadings sansserif titles,
15115 \begin_layout Description
15116 authortitle on title page first placed is author next title — default,
15119 \begin_layout Description
15120 titleauthor on title page first placed is title next author,
15123 \begin_layout Description
15124 withmarginpar reserve place on page for margins.
15128 \begin_layout Section
15132 \begin_layout Standard
15137 provides an alternative to the standard
15142 It provides similar functionality, but you might prefer this layout with
15143 sans serif sections, headings, and more.
15146 \begin_layout Section
15150 \begin_layout Standard
15156 \begin_layout Standard
15157 \begin_inset VSpace bigskip
15163 \begin_layout Standard
15168 \begin_inset space ~
15173 textclass works with the American Physical Sociey's RevTeX 4.0 (the
15174 \begin_inset Formula $\beta$
15177 release of May, 1999) class.
15180 \begin_layout Standard
15185 textclass, which works with RevTeX 3.1.
15186 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15187 That means that it doesn't interact very well with LyX, which requires
15188 LaTeX2e, although it has been kludged to work.
15189 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15193 \begin_inset space ~
15198 textclass should also be pretty easy to use.
15201 \begin_layout Standard
15202 These documents are supposed to be used in
15206 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15207 macros, and assume you'll know what to put in the preamble if necessary.
15210 \begin_layout Subsection
15214 \begin_layout Standard
15215 All you need to do is install RevTeX 4, as described in the package's README
15217 The package can be found at The RevTeX 4 Web Site
15218 \begin_inset Flex URL
15221 \begin_layout Plain Layout
15223 http://publish.aps.org/revtex4/
15229 Install it somewhere that LaTeX can see it.
15230 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15232 \begin_inset space \thinspace{}
15236 \begin_inset space \space{}
15239 not the directory where you installed the class file.) Then, if you reconfigure
15240 LyX, it will find the class file and let you use the RevTeX4 textclass.
15243 \begin_layout Standard
15244 Probably the easiest way to get started is either to import a RevTeX 4 document
15252 \begin_inset space ~
15257 template, found in the templates directory.
15260 \begin_layout Subsection
15264 \begin_layout Standard
15265 Optional arguments to
15272 \begin_inset Quotes eld
15276 \begin_inset Quotes erd
15280 \begin_inset Quotes eld
15284 \begin_inset Quotes erd
15294 \begin_inset space ~
15302 \begin_inset space ~
15308 Remember that in RevTeX, at least one optional argument is required!
15311 \begin_layout Standard
15312 Other preamble matter, like
15319 \begin_inset space ~
15325 \begin_inset space ~
15330 dialog, also as usual.
15333 \begin_layout Subsection
15337 \begin_layout Standard
15338 The layouts basically correspond to the commands in RevTeX4.0.
15339 For example, the Email layout corresponds to
15346 Note that (at least as of RevTeX 4.0 Beta), the
15354 layouts are exactly equivalent, so you shouldn't need to use both.
15358 \begin_layout Plain Layout
15359 In case you're curious, both were included so that
15363 would be able to translate both
15383 \begin_layout Subsection
15387 \begin_layout Standard
15388 There are a couple of important unique aspects of RevTeX 4 which might cause
15389 bugs that will be even more confusing in LyX.
15392 \begin_layout Standard
15410 The LyX equivalent is that there is a separate Thanks layout.
15415 write footnotes in the
15419 layout, or weird things may happen.
15420 See the RevTeX 4 documentation for more details.
15423 \begin_layout Standard
15427 \begin_inset space ~
15435 \begin_inset space ~
15444 layouts must be placed
15452 layout and the corresponding
15469 , the LaTeX won't compile.
15472 \begin_layout Subsection
15476 \begin_layout Standard
15477 The main problem with this layout is that you can't use the optional arguments
15478 to layouts like Email and Title.
15479 (The problem is not unique to this layout; you can't use optional arguments
15480 to the Section layouts either.) This means that after you export that file
15481 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15482 need to edit the LaTeX file with a text editor to add the optional arguments
15484 \begin_inset space \thinspace{}
15488 \begin_inset space \space{}
15491 the running title for the page headers.
15492 Lacking these layouts makes the
15498 (and the equivalent
15504 ) useless, so the corresponding layouts don't exist, and will have to be
15509 \begin_layout Plain Layout
15514 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15515 has not been updated yet to take advantage of it.
15523 \begin_layout Section
15524 Springer Journals (
15531 \begin_layout Standard
15537 \begin_layout Subsection
15541 \begin_layout Standard
15542 These are the layout files for some of the journal formats used by Springer
15543 Verlag and listed on
15544 \begin_inset Flex URL
15547 \begin_layout Plain Layout
15549 http://www.springer.de/author/tex/help-journals.html
15554 , where you should also go to fetch the class files (yes, these are LaTeX2e
15556 It is a modular system: the things common to all journals are implemented
15561 , which journal-specific layout files (such as, e.
15562 \begin_inset space \thinspace{}
15566 \begin_inset space \space{}
15573 for Journal of Geodesy) can include.
15576 \begin_layout Standard
15577 This means that implementing support for any other Springer journal on this
15578 list is as simple as writing your own
15586 file following the outline given in
15594 \begin_layout Standard
15595 It is reasonably well tested only for the Journal of Geodesy.
15604 come with the standard LyX distribution.
15605 Install the relevant class file (downloaded from Springer) in a proper
15606 directory, reconfigure LaTeX (in the teTeX case by running
15610 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15611 and it should work.
15614 \begin_layout Subsection
15618 \begin_layout Standard
15619 A large number of theorem-like styles —
15625 \SpecialChar \ldots{}
15631 \begin_layout Standard
15634 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15635 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15638 See the Springer class file documentation for details.
15641 \begin_layout Subsection
15645 \begin_layout Itemize
15657 \begin_layout Itemize
15660 Probability Theory and Related Fields
15666 — Jean-Marc Lasgouttes
15669 \begin_layout Standard
15670 Add your own, it isn't so hard!
15673 \begin_layout Subsection
15677 \begin_layout Standard
15678 These files are partly based on the older
15682 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15683 file from Springer.
15688 layout, are now defunct.
15689 Jean-Marc Lasgouttes helped out big in making me find my way around the
15690 LyX layout file mechanism.
15693 \begin_layout Subsection
15697 \begin_layout Standard
15699 But probably less than in the old hacked-LaTeX
15706 \begin_layout Standard
15708 \begin_inset space \thinspace{}
15711 g.: does not display the number for theorem-like layouts, just #.
15714 \begin_layout Section
15720 \begin_inset CommandInset label
15729 \begin_layout Standard
15737 \begin_layout Subsection
15741 \begin_layout Standard
15742 This section describes how to use LyX to make slides for overhead projectors.
15743 There are two document classes that can do this: the default slides class
15749 This section documents the former.
15752 \begin_layout Standard
15753 I'm going to say this again, nice and clear, so that there's no misunderstanding
15757 \begin_layout Standard
15758 \begin_inset VSpace bigskip
15764 \begin_layout Standard
15768 This section documents the class
15769 \begin_inset Quotes eld
15777 \begin_inset Quotes erd
15785 \begin_layout Standard
15786 \begin_inset VSpace bigskip
15792 \begin_layout Standard
15793 If you're looking for the documentation for
15794 \begin_inset Quotes eld
15802 \begin_inset Quotes erd
15805 , check out section
15806 \begin_inset space ~
15810 \begin_inset CommandInset ref
15812 reference "sec:foiltex"
15822 \begin_inset Quotes eld
15830 \begin_inset Quotes erd
15833 ] is actually somewhat better than the default
15841 \begin_layout Plain Layout
15842 \SpecialChar \ldots{}
15843 or so I've been told repeatedly by its advocates.
15844 Having never used it, I have no idea if this claim is true or not.
15849 which this section documents.
15852 \begin_layout Standard
15853 This class is the LaTeX2e improvement of the old
15858 Every LaTeX2e distribution includes this class [which I'll just refer to
15860 \begin_inset Quotes eld
15868 \begin_inset Quotes erd
15871 from now on], so you're bound to have it.
15872 As I noted earlier, there are other classes, such as
15876 , which also produce slides for overhead projectors and do a better job
15878 However, there are some things which
15882 can do which the others can't, such as generate overlays.
15883 Read on to learn more!
15886 \begin_layout Subsection
15888 \begin_inset CommandInset label
15890 name "sec:slidesetup"
15897 \begin_layout Standard
15898 Obviously, to use this document class, you need to select
15899 \begin_inset Quotes eld
15907 \begin_inset Quotes erd
15910 from the class list in the
15912 Document\SpecialChar \menuseparator
15916 There are some other special things you should know about this class:
15919 \begin_layout Itemize
15920 Don't bother changing the options
15925 They're not supported by the
15932 \begin_layout Itemize
15936 \begin_inset space ~
15941 behaves a bit differently for this class.
15942 The possible choices and what they do are as follows:
15946 \begin_layout Description
15951 The final output contains page numbers in the lower right corner.
15954 \begin_layout Description
15963 , but also prints out any time markers you've put in.
15964 This is the default.
15967 \begin_layout Description
15972 The final output contains no page numbers, time markers, or alignment markers.
15976 \begin_layout Itemize
15981 class has an extra option:
15987 \begin_inset Quotes eld
15995 \begin_inset Quotes erd
15998 in the extra class options.
16002 \begin_layout Standard
16003 Using this options allows you to add time markers to
16009 \begin_inset space ~
16013 \begin_inset CommandInset ref
16015 reference "sec:slideNote"
16023 \begin_layout Standard
16024 You can also use the template file
16025 \begin_inset Quotes eld
16033 \begin_inset Quotes erd
16036 to automatically set up a document to use the
16042 File\SpecialChar \menuseparator
16044 \begin_inset space ~
16048 \begin_inset space ~
16053 to open your new document].
16054 The template file also contains some examples of the special paragraph
16055 environments used by this class.
16056 I'll describe those next.
16059 \begin_layout Subsection
16060 Paragraph Environments
16063 \begin_layout Subsubsection
16064 Supported Environments
16067 \begin_layout Standard
16068 The first thing you'll notice when you start up a new
16072 document is the font size and type: it's the equivalent of the size
16073 \begin_inset Quotes eld
16081 \begin_inset Quotes erd
16087 \begin_inset space ~
16093 This is also what's used in the output.
16095 \begin_inset Quotes eld
16099 \begin_inset Quotes erd
16102 to remind you that this is a slide.
16103 Your final slides will use a larger font; ergo, you'll have less space.
16104 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16107 \begin_layout Standard
16108 The next thing that becomes obvious is the changes to the paragraph environment
16109 pull-down box [at the far-left end of the toolbar].
16110 Most of the paragraph environments you're used to seeing are missing.
16111 There are also five new ones.
16116 class itself only supports certain paragraph environments:
16119 \begin_layout Itemize
16125 \begin_layout Itemize
16131 \begin_layout Itemize
16137 \begin_layout Itemize
16143 \begin_layout Itemize
16149 \begin_layout Itemize
16155 \begin_layout Itemize
16161 \begin_layout Itemize
16167 \begin_layout Itemize
16173 \begin_layout Itemize
16179 \begin_layout Itemize
16185 \begin_layout Standard
16186 All of the other standard environments, including the section-heading environmen
16187 ts, aren't used in the
16194 \begin_layout Standard
16195 On the other hand, you'll notice the following new environments:
16198 \begin_layout Itemize
16204 \begin_layout Itemize
16210 \begin_layout Itemize
16216 \begin_layout Itemize
16222 \begin_layout Itemize
16228 \begin_layout Standard
16229 These five are kind of quirky, due to a
16230 \begin_inset Quotes eld
16234 \begin_inset Quotes erd
16238 You see, LyX doesn't permit you to nest any other paragraph environment
16239 into an empty environment.
16240 Now, that's fine and dandy, but it means that you wouldn't be able to start
16241 a slide with anything except plain text.
16242 To deal with this, I've performed a little
16243 \begin_inset Quotes eld
16247 \begin_inset Quotes erd
16253 \begin_layout Subsubsection
16254 Quirks of the New Environments
16255 \begin_inset CommandInset label
16257 name "sec:slideQuirk"
16264 \begin_layout Standard
16265 All five of the new paragraph environments are somewhat quirky due to inherent
16266 limitiations in the current version of LyX.
16267 As I just mentioned, LyX forbids environments that begin with another environme
16269 To get around this, the
16273 environment isn't a paragraph environment as described in the
16281 \begin_layout Standard
16282 You should consider
16295 \begin_inset Quotes eld
16298 pseudo-environments.
16299 \begin_inset Quotes erd
16302 They look like a section heading or a
16303 \begin_inset Quotes eld
16311 \begin_inset Quotes erd
16314 but really begin a [and, if necessary, end the previous] paragraph environment.
16324 \begin_inset Quotes eld
16328 \begin_inset Quotes erd
16331 These two perform some action.
16334 \begin_layout Standard
16335 A common feature of all five environments,
16355 , is a rather long-ish label.
16356 The text following this label — ordinarily the contents of the paragraph
16357 environment — is utterly irrelevant for
16378 LyX completely ignores it.
16379 In fact, you can leave these five environments completely empty.
16383 \begin_layout Standard
16388 to put any text after the rather long-ish label, you might want to.
16389 This could be a short description of the contents of the
16394 In that case, enter your descriptive comment and hit
16398 as you normally would.
16401 \begin_layout Standard
16402 If, on the other hand, you don't want to enter any descriptive text, you'll
16403 hit another LyX quirk.
16404 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16405 environment until you put something in the old one.
16409 \begin_layout Itemize
16410 Start entering the text that will
16438 \begin_layout Itemize
16439 Now move to the beginning of that paragraph.
16443 \begin_layout Itemize
16452 \begin_layout Itemize
16453 Finally, change this new, empty paragraph to a
16477 \begin_layout Standard
16478 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16482 \begin_layout Subsection
16483 Making a Presentation with
16496 \begin_layout Subsubsection
16504 \begin_layout Standard
16505 If you're expecting this section to teach you how to actually make a presentatio
16506 n, you'll be sorely disappointed.
16507 Naturally, I'll describe all of the ways the
16511 class can assist you in preparing the materials for a presentation.
16512 Filling in the contents, however, is up to you.
16517 the LyX philosophy.]
16520 \begin_layout Standard
16525 environment [in the manner described in section
16526 \begin_inset space ~
16530 \begin_inset CommandInset ref
16532 reference "sec:slideQuirk"
16536 ] tells LyX to begin a new slide [duh].
16537 The label for this environment/
16538 \begin_inset Quotes erd
16542 \begin_inset Quotes erd
16546 \begin_inset Quotes eld
16550 \begin_inset Quotes erd
16553 in cool blue, followed by the label,
16554 \begin_inset Quotes eld
16558 \begin_inset Quotes erd
16562 Any text or paragraph environments that follow this one go on the new slide.
16566 \begin_layout Standard
16567 Slides are probably the only time you'll need to forcibly end pages in LyX
16568 (this can be specified in the
16573 In fact, you'll want to, once you finish entering the contents of one slide.
16574 If you've entered more text than can physically fit on a slide, the extra
16575 overflows onto a new slide.
16576 I don't recommend doing this, however, since the overflow slide won't have
16577 any page number on it.
16578 Furthermore, it may interfere with any
16582 you've made to accompany the oversized
16589 \begin_layout Standard
16598 environments work the same way as the
16603 They both create an
16604 \begin_inset Quotes eld
16608 \begin_inset Quotes erd
16611 followed by a label [
16612 \begin_inset Quotes eld
16616 \begin_inset Quotes erd
16620 \begin_inset Quotes eld
16624 \begin_inset Quotes erd
16628 The color is a stunning magenta instead of blue, and the
16629 \begin_inset Quotes eld
16633 \begin_inset Quotes erd
16636 will look different, in style and in length.
16637 The label fonts of all three also differ from one another.
16640 \begin_layout Standard
16645 , if the contents of a
16653 exceed the physical size of a slide or sheet of paper, the extra will overflow
16655 Again, you should avoid this.
16656 It defeats the whole purpose of
16667 \begin_layout Subsubsection
16677 \begin_layout Standard
16682 is a slide that sits atop another slide.
16683 Perhaps you wish to discuss a figure on the main
16687 before displaying the text associated with it.
16688 One way to accomplish this is tape a flap of dark paper over the part of
16693 you want to display later.
16694 This method fails, however, if you wish to overlap one graph with another,
16696 You would then have to fumble while speaking to align the two separate,
16701 s to align the two graphs.
16706 environment in both cases makes life much easier.
16709 \begin_layout Standard
16714 receives the page number of its
16715 \begin_inset Quotes eld
16719 \begin_inset Quotes erd
16727 \begin_inset Quotes eld
16735 \begin_inset Quotes erd
16742 \begin_layout Plain Layout
16743 Presumably, mutliple
16748 \begin_inset Quotes eld
16756 \begin_inset Quotes erd
16760 \begin_inset Quotes eld
16768 \begin_inset Quotes erd
16772 \begin_inset Quotes eld
16780 \begin_inset Quotes erd
16784 \begin_inset space ~
16787 appended to the page number of the parent
16797 Clearly, you want the contents of both the
16805 to each fit on a single physical slide! You should probably consider an
16811 \begin_inset Quotes eld
16815 \begin_inset Quotes erd
16827 class provides a visual cue for this: the label at the start of an
16831 is shorter than that at the start of a
16836 Lastly, when you generate printable output, you'll find alignment markers
16837 in all four corners of both the
16841 page and its parent
16846 These will assist you in lining up the two physical slides.
16849 \begin_layout Standard
16850 The major problem in overlaying two slides is aligning the contents of the
16851 two transparencies.
16852 How much space should you leave for that graph on the second slide? Worse
16853 still, what if you want a graph and a sentence on second slide, but there
16854 is text on the main transparency that goes in between them? You could try
16855 and insert vertical space of the right size.
16856 The better way is to use
16867 \begin_layout Standard
16868 As their names imply,
16876 are two command-like paragraph environments that make all subsequent text
16877 invisible and visible, respectively.
16879 \begin_inset space ~
16883 \begin_inset CommandInset ref
16885 reference "sec:slideQuirk"
16889 that you don't place anything
16893 these two environments, however.
16898 , it inserts a centered, sky-blue label into the page reading
16899 \begin_inset Quotes eld
16902 <Invisible Text Follows>
16903 \begin_inset Quotes erd
16907 For paragraphs following this label, the parts of the
16915 ; it doesn't matter which] where they would be contain instead blank space.
16919 \begin_layout Standard
16924 , the corresponding centered label is
16925 \begin_inset Quotes eld
16928 <Visible Text Follows>
16929 \begin_inset Quotes erd
16933 Paragraphs following this label behave normally.
16934 Note that the beginning of a new
16946 automatically shuts off an
16951 It's therefore not necessary to use
16962 \begin_layout Standard
16963 By now, it should be obvious how to create overlay transparencies using
16964 the proper combination of
16983 \begin_layout Enumerate
16988 , including everything that will appear on it, whether on the main slide
16996 \begin_layout Enumerate
16997 Before each figure or paragraph that will appear only on the
17006 If necessary, insert a
17010 environment after the
17017 \begin_layout Enumerate
17022 immediately following the
17029 \begin_layout Enumerate
17030 Copy the contents of this
17041 \begin_layout Enumerate
17046 , change all of the
17057 \begin_layout Standard
17059 You've just made an
17066 \begin_layout Standard
17067 There's one problem with the way I've designed the LyX
17071 class: you can't make text in the middle of a paragraph invisible, nor
17072 make text in the middle of an invisible paragraph visible again.
17073 To accomplish this feat, you'll need to use some inlined LaTeX codes.
17077 \begin_layout Plain Layout
17078 The commands of interest are:
17081 \begin_layout Itemize
17086 invisible \SpecialChar \ldots{}
17090 \begin_layout Itemize
17095 visible \SpecialChar \ldots{}
17099 \begin_layout Plain Layout
17100 \SpecialChar \ldots{}
17101 and need to be marked as TeX.
17103 \begin_inset Quotes eld
17107 \begin_inset Quotes erd
17110 you wish to change goes in between the brackets [and after the
17123 If you don't know how to mark text as TeX, see the appropriate section
17136 \begin_layout Subsubsection
17146 \begin_inset CommandInset label
17148 name "sec:slideNote"
17155 \begin_layout Standard
17164 is associated with a
17165 \begin_inset Quotes eld
17169 \begin_inset Quotes erd
17181 class provides visual cues.
17186 is shorter than that of a
17190 [yet longer than that of an
17194 ] and, like the label of an
17198 is shockingly magenta.
17199 Additionally, the printed
17203 has the page number of its
17204 \begin_inset Quotes eld
17208 \begin_inset Quotes erd
17216 \begin_inset Quotes eld
17224 \begin_inset Quotes erd
17228 \begin_inset Quotes eld
17236 \begin_inset Quotes erd
17240 \begin_inset Quotes eld
17248 \begin_inset Quotes erd
17252 You can have multiple
17256 s associated with a single
17268 , you'll probably want to break up long
17272 s so that they fit on a single sheet of paper.
17275 \begin_layout Standard
17280 is obvious: it contains anything additional you might want to say about
17286 It could also be used as a sheet of reminders for a particular
17291 In the case of the latter, you might want to make use of time markers.
17297 \begin_inset Quotes eld
17301 \begin_inset Quotes erd
17304 support for time markers, a
17309 So, you'll have to resort to using the LaTeX codes.
17312 \begin_layout Standard
17313 To use time markers, you'll need to specify the extra class option
17314 \begin_inset Quotes eld
17322 \begin_inset Quotes erd
17326 \begin_inset space ~
17330 \begin_inset CommandInset ref
17332 reference "sec:slidesetup"
17337 This option turns on timing marks, which will appear in the lower-left-hand
17343 To set what appears in the time marker, you use the LaTeX commands
17344 \begin_inset Quotes eld
17354 \begin_inset Quotes erd
17358 \begin_inset Quotes eld
17368 \begin_inset Quotes erd
17372 The arguments of both commands are time measured in seconds.
17374 \begin_inset Quotes eld
17384 \begin_inset Quotes erd
17387 sets the time marker to a given time.
17389 \begin_inset Quotes eld
17399 \begin_inset Quotes erd
17402 increments the time marker by the specified amount.
17403 Using time markers and
17407 s in this fashion, you can remind yourself how much time to spend on a particula
17415 \begin_layout Standard
17416 There's one last feature to describe.
17417 Clearly, you'd like to print out all of your
17425 s on transparencies while printing all of your
17442 with which it is associated.
17443 What's a person to do?
17446 \begin_layout Standard
17447 Luckily, there are two LaTeX commands that allow you to select what to print
17449 Both must be placed into the preamble of your document.
17451 \begin_inset Quotes eld
17463 \begin_inset Quotes erd
17466 will cause the output to contain only the
17475 Correspondingly, the command
17476 \begin_inset Quotes eld
17488 \begin_inset Quotes erd
17491 prevents the output of anything but
17496 I'd advise placing both commands in the preamble and initially comment
17498 You can then preview your entire presentation as you write.
17499 When you're done writing, you can then uncomment one of the two to select
17500 what you want to print.
17501 I like to uncomment
17502 \begin_inset Quotes eld
17514 \begin_inset Quotes erd
17517 , print to a file with
17518 \begin_inset Quotes eld
17526 \begin_inset Quotes erd
17529 in its name, comment it back out, then uncomment
17530 \begin_inset Quotes eld
17542 \begin_inset Quotes erd
17546 \begin_inset Quotes eld
17554 \begin_inset Quotes erd
17558 I can then send either file to a printer, loading transparencies or plain
17559 paper as appropriate.
17562 \begin_layout Standard
17563 You can also provide other arguments to the
17564 \begin_inset Quotes eld
17574 \begin_inset Quotes erd
17578 \begin_inset Quotes eld
17588 \begin_inset Quotes erd
17592 See a good LaTeX book for details.
17595 \begin_layout Subsection
17600 Class Template File
17603 \begin_layout Standard
17604 I have also provided a template file,
17605 \begin_inset Quotes eld
17613 \begin_inset Quotes erd
17621 To use it, begin your new presentation with
17626 ile\SpecialChar \menuseparator
17628 \begin_inset space ~
17632 \begin_inset space ~
17642 Your new LyX presentation file will contain an example
17663 additionally contain an example of the use of
17672 Lastly, the preamble will contain:
17675 \begin_layout LyX-Code
17676 % Uncomment to print out only slides and overlays
17679 \begin_layout LyX-Code
17683 \begin_layout LyX-Code
17689 \begin_inset Newline newline
17695 \begin_layout LyX-Code
17696 % Uncomment to print out only notes
17699 \begin_layout LyX-Code
17703 \begin_layout LyX-Code
17711 \begin_layout Standard
17712 One final thing: I created this class to support the LaTeX2e
17713 \begin_inset Quotes eld
17721 \begin_inset Quotes erd
17724 class, one of the built-in LaTeX2e classes.
17725 Neither I nor the rest of the LyX Team endorse or oppose the use of this
17726 built-in slide class.
17727 It's here if you want it or need it.
17728 There exist other LaTeX2e classes for creating presentations, such as the
17734 \begin_inset space ~
17738 \begin_inset CommandInset ref
17740 reference "sec:foiltex"
17745 \begin_inset Quotes eld
17753 \begin_inset Quotes erd
17756 package [present on some TeX distributions].
17757 The latter is not yet supported under LyX.
17761 \begin_layout Plain Layout
17762 Perhaps you can take on the task\SpecialChar \ldots{}
17768 I know nothing about these other classes.
17769 Try them out to see what sort of alternative they provide.
17772 \begin_layout Chapter
17773 LyX Features needing Extra Software
17776 \begin_layout Section
17780 \begin_layout Standard
17786 \begin_layout Subsection
17790 \begin_layout Standard
17799 \begin_layout Plain Layout
17804 is not yet available when you are using the LaTeX distribution MiKTeX.
17809 , you'll find in the
17816 \begin_inset space ~
17827 \begin_inset CommandInset href
17829 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17836 \begin_layout Standard
17841 package is a program that was written by
17842 \begin_inset Flex Noun
17845 \begin_layout Plain Layout
17847 \begin_inset space ~
17855 in frustration because some constructs in LaTeX are sometimes non-intuitive,
17856 and easy to forget.
17857 The program runs over your LaTeX file, checks the integrity of the file,
17858 and flags some common errors.
17859 In other technical words, it is
17866 \begin_layout Standard
17867 Well, what is a syntax checker doing in LyX which is supposed to produce
17868 correct LaTeX anyways? The answer is simple: Just as
17872 not only checks the
17876 of C programs, but also does
17880 checks for type-errors,
17884 catches some common
17888 errors, in addition to the syntactical ones.
17893 is capable of detecting several common errors, such as
17896 \begin_layout Itemize
17897 Ellipsis detection:
17898 \begin_inset Newline newline
17901 Use \SpecialChar \ldots{}
17905 \begin_layout Itemize
17906 No space in front of/after parenthesis:
17907 \begin_inset Newline newline
17913 \begin_layout Itemize
17914 Enforcement of normal space after common abbreviations:
17915 \begin_inset Newline newline
17919 \begin_inset space \thinspace{}
17923 \begin_inset space \space{}
17926 is too wide spacing.
17929 \begin_layout Itemize
17930 Enforcement of end-of-sentence space when the last sentence ends with a
17932 \begin_inset Newline newline
17936 And this is wrong spacing.
17939 \begin_layout Itemize
17940 Space in front of labels and similar commands:
17941 \begin_inset Newline newline
17944 The label should stick right up to the text to avoid falling to a wrong
17947 \begin_inset CommandInset label
17957 \begin_layout Plain Layout
17958 This footnote is in danger of falling off to a wrong page
17963 The label is separated too much.
17966 \begin_layout Itemize
17967 Space in front of references, instead of hard spaces:
17968 \begin_inset Newline newline
17971 If you have bad luck, the text will break right between the referenced text
17972 and reference number, and that's a pity.
17974 \begin_inset CommandInset ref
17976 reference "sec:chktex"
17983 \begin_layout Itemize
17985 \begin_inset Quotes eld
17989 \begin_inset Quotes erd
17993 \begin_inset Formula $\times$
17997 \begin_inset Newline newline
18000 2x2 looks cheap compared to
18001 \begin_inset Formula $2\times2$
18007 \begin_layout Standard
18008 and more \SpecialChar \ldots{}
18009 It is an invaluable tool when you are
18010 \begin_inset Quotes eld
18014 \begin_inset Quotes erd
18017 your document before printing, and you should run it right after the obligatory
18018 spelling check, and before you go fine tuning the typesetting.
18021 \begin_layout Subsection
18025 \begin_layout Standard
18026 If you have the program installed, usage is as simple as choosing
18028 Tools\SpecialChar \menuseparator
18030 \begin_inset space ~
18036 This will make LyX generate a LaTeX file of your document, start
18040 to check it, and then make LyX insert
18041 \begin_inset Quotes eld
18045 \begin_inset Quotes erd
18048 with the warnings from
18052 , if there were any.
18053 The warnings will be placed close to the point of the mistake, and you
18054 can quickly find them by using the
18056 Navigate\SpecialChar \menuseparator
18059 menu item, or the shortcut key
18068 Open the error boxes by clicking on them with the mouse, or use the shortcut
18077 bindings, or the corresponding
18086 Read the warning and correct the mistake, if it is a mistake.
18087 If you have trouble understanding what the warning is about, you can safely
18089 Remember that there is a hidden layer between the document on screen and
18090 the technical details in invoking
18094 , and this gap can make some warnings seem arcane or just plain silly.
18097 \begin_layout Standard
18098 This document is an excellent testing bed for the feature, and it should
18099 provide quite a few warnings for you to fiddle with.
18100 Since computers are only so smart, expect most of the warnings to be false
18104 \begin_layout Subsection
18105 How to fine tune it
18108 \begin_layout Standard
18109 Sometimes, you'll find that
18113 makes more noise than suits your mood.
18114 Then you can choose not to use it, wait until your mood changes, or try
18119 to get better along with you.
18122 \begin_layout Standard
18131 very configurable and extensible, you shouldn't expect to solve all problems
18137 Since LyX has to generate a somewhat special LaTeX file to be able to match
18138 the line numbers from the
18146 \begin_layout Plain Layout
18147 You can inspect the specific output from
18153 Edit\SpecialChar \menuseparator
18155 \begin_inset space ~
18159 \begin_inset space ~
18173 to the internal document structure, some of the warnings will not appear
18175 There are two things you can do about this:
18178 \begin_layout Itemize
18183 invocation command line in
18184 \begin_inset Flex MenuItem
18187 \begin_layout Plain Layout
18188 Tools\SpecialChar \menuseparator
18189 Preferences\SpecialChar \menuseparator
18190 Output\SpecialChar \menuseparator
18191 LaTeX\SpecialChar \menuseparator
18201 installation configuration file (usually with the file
18206 See below to learn what warnings can be enabled and disabled on the command
18210 \begin_layout Itemize
18211 Export your document as a raw LaTeX file using
18213 File\SpecialChar \menuseparator
18214 Export\SpecialChar \menuseparator
18222 Invoked in this way, it can be a hassle to find the corresponding place
18223 in the document inside LyX, but with a little patience, you should be able
18227 \begin_layout Standard
18228 Here follows the warning messages that can be enabled and disabled in
18237 to disable a warning, and
18241 to enable a warning.
18242 The emphasized entries are disabled by default, because the default is
18245 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18250 \begin_layout Standard
18251 Notice that you should only use the options that enable and disable warnings,
18252 because LyX relies on some of the other command line parameters to be set
18253 in a specific way to have a chance to communicate with
18260 \begin_layout Enumerate
18264 Command terminated with space.
18267 \begin_layout Enumerate
18270 Non-breaking space (
18271 \begin_inset Quotes eld
18279 \begin_inset Quotes erd
18282 ) should have been used.
18285 \begin_layout Enumerate
18289 You should enclose the previous parenthesis with
18290 \begin_inset Quotes eld
18298 \begin_inset Quotes erd
18304 \begin_layout Enumerate
18307 Italic correction (
18308 \begin_inset Quotes eld
18318 \begin_inset Quotes erd
18321 ) found in non-italic buffer.
18324 \begin_layout Enumerate
18327 Italic correction (
18328 \begin_inset Quotes eld
18338 \begin_inset Quotes erd
18341 ) found more than once.
18344 \begin_layout Enumerate
18348 No italic correction (
18349 \begin_inset Quotes eld
18359 \begin_inset Quotes erd
18365 \begin_layout Enumerate
18369 \begin_inset Quotes eld
18377 \begin_inset Quotes erd
18381 \begin_inset Quotes eld
18389 \begin_inset Quotes erd
18395 \begin_layout Enumerate
18398 Wrong length of dash may have been used.
18401 \begin_layout Enumerate
18405 \begin_inset Quotes eld
18413 \begin_inset Quotes erd
18417 \begin_inset Quotes eld
18425 \begin_inset Quotes erd
18431 \begin_layout Enumerate
18435 \begin_inset Quotes eld
18443 \begin_inset Quotes erd
18449 \begin_layout Enumerate
18453 \begin_inset Quotes eld
18461 \begin_inset Quotes erd
18464 to achieve an ellipsis.
18467 \begin_layout Enumerate
18470 Inter-word spacing (
18471 \begin_inset Quotes eld
18481 \begin_inset Quotes eld
18484 ) should perhaps be used.
18487 \begin_layout Enumerate
18490 Inter-sentence spacing (
18491 \begin_inset Quotes eld
18501 \begin_inset Quotes erd
18504 ) should perhaps be used.
18507 \begin_layout Enumerate
18510 Could not find argument for command.
18513 \begin_layout Enumerate
18517 \begin_inset Quotes eld
18525 \begin_inset Quotes erd
18531 \begin_layout Enumerate
18534 Math mode still on at end of LaTeX file.
18537 \begin_layout Enumerate
18541 \begin_inset Quotes eld
18549 \begin_inset Quotes erd
18552 doesn't match the number of
18553 \begin_inset Quotes eld
18561 \begin_inset Quotes erd
18567 \begin_layout Enumerate
18570 You should use either
18573 \begin_inset Quotes eld
18581 \begin_inset Quotes erd
18586 as an alternative to
18587 \begin_inset Quotes eld
18595 \begin_inset Quotes erd
18601 \begin_layout Enumerate
18608 " (ASCII 39) instead of "
18615 \begin_layout Enumerate
18618 User-specified pattern found.
18621 \begin_layout Enumerate
18624 This command might not be intended.
18627 \begin_layout Enumerate
18634 \begin_layout Enumerate
18652 \begin_layout Enumerate
18655 Delete this space to maintain correct page references.
18658 \begin_layout Enumerate
18662 You might wish to put this between a pair of
18663 \begin_inset Quotes eld
18671 \begin_inset Quotes erd
18677 \begin_layout Enumerate
18680 You ought to remove spaces in front of punctuation.
18683 \begin_layout Enumerate
18686 Could not execute LaTeX command.
18689 \begin_layout Enumerate
18698 in front of small punctuation.
18701 \begin_layout Enumerate
18709 may look prettier here.
18712 \begin_layout Enumerate
18716 Multiple spaces detected in output.
18719 \begin_layout Enumerate
18722 This text may be ignored.
18725 \begin_layout Enumerate
18731 \begin_inset Quotes eld
18736 to begin quotation, not
18743 \begin_layout Enumerate
18750 to end quotation, not
18753 \begin_inset Quotes eld
18761 \begin_layout Enumerate
18767 \begin_layout Enumerate
18770 You should perhaps use
18771 \begin_inset Quotes eld
18779 \begin_inset Quotes erd
18785 \begin_layout Enumerate
18788 You should put a space in front of/after parenthesis.
18791 \begin_layout Enumerate
18794 You should avoid spaces in front of/after parenthesis.
18797 \begin_layout Enumerate
18801 You should not use punctuation in front of/after quotes.
18804 \begin_layout Enumerate
18807 Double space found.
18810 \begin_layout Enumerate
18813 You should put punctuation outside inner/inside display math mode.
18816 \begin_layout Enumerate
18819 You ought to not use primitive TeX in LaTeX code.
18822 \begin_layout Enumerate
18825 You should remove spaces in front of
18826 \begin_inset Quotes eld
18834 \begin_inset Quotes erd
18840 \begin_layout Enumerate
18843 \begin_inset Quotes eld
18851 \begin_inset Quotes erd
18854 is normally not followed by
18855 \begin_inset Quotes eld
18863 \begin_inset Quotes erd
18869 \begin_layout Standard
18870 In later versions of LyX, we hope to provide a more complete interface to
18871 this tool (and it's smaller cousin
18875 ) to exploit the full power of it.
18876 But it's not exactly useless as it is now: go try it on one of your existing
18877 documents of a certain length and be surprised.
18880 \begin_layout Section
18881 Version Control in LyX
18884 \begin_layout Standard
18887 Lars Gullik Bjønnes
18894 \begin_layout Subsection
18898 \begin_layout Standard
18899 A friend of mine wanted to try LyX for a group project.
18900 When he didn't find support for version control or file locking, he dropped
18902 This angered me a bit, so I thought that I should at least make support
18903 for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
18904 This has been done.
18905 LyX now supports some of the most basic RCS/CVS/SVN commands.
18906 If you need something a bit more sophisticated you will have to do that
18907 manually in a terminal.
18910 \begin_layout Standard
18911 Also note that CVS support is not as good as subversion support so we advise
18913 A good place to start learning Subversion is SVN Book
18917 \begin_layout Plain Layout
18918 \begin_inset CommandInset href
18920 target "http://svnbook.red-bean.com/"
18930 In the case of RCS you should read
18931 \begin_inset Quotes eld
18935 \begin_inset Quotes erd
18938 (a man file, read it with
18943 This file describes all the basic features of RCS.
18944 You should especially notice the comment about a RCS directory, and the
18945 notion of a master RCS file (the file ending in
18952 \begin_layout Standard
18953 Before you begin to use the version control features in LyX, you should
18954 be familiar with RCS/CVS/SVN usage.
18955 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18956 package—no guarantees are made for older versions.
18957 Most of the log messages are not currently displayed after operations —
18958 you can check them in the Messages pane if unsure.
18961 \begin_layout Standard
18962 For introducing your own external commands consult vc-command in the manual
18966 \begin_layout Subsection
18967 RCS commands in LyX
18970 \begin_layout Standard
18971 The following sections describe the RCS commands supported by LyX.
18972 You can find them in the
18974 File\SpecialChar \menuseparator
18976 \begin_inset space ~
18982 LyX was tested against RCS 5.7/5.8.
18985 \begin_layout Subsubsection
18991 \begin_layout Standard
18992 If your document is not under revision control, this is the only item shown
18994 And if it is under revision control, the
18998 item is not visible.
19002 \begin_layout Standard
19003 This command registers your document with RCS (unless you are under the
19004 directory managed by CVS)\SpecialChar \@.
19005 You are asked interactively to supply an initial
19006 description of the document.
19007 The document is now set in Read-Only mode and you have to
19010 \begin_inset space ~
19014 \begin_inset space ~
19018 \begin_inset space ~
19023 , before making any changes to it.
19024 A document under revision control has a
19025 \begin_inset Quotes eld
19028 [RCS:<version> <locker>]
19029 \begin_inset Quotes erd
19032 item tagged to the filename in the minibuffer.
19035 \begin_layout Standard
19036 RCS command that is run:
19038 ci -q -u -i -t-"<initial description>" <file-name>
19041 \begin_layout Standard
19046 to understand the switches.
19050 \begin_layout Subsubsection
19056 \begin_layout Standard
19057 When you are finished editing a file, you check in your changes.
19058 When you do this, you are asked for a description of the changes.
19059 This is stored in the history log.
19060 The version number is bumped, your changes are applied to the master RCS
19061 file, the document is unlocked and set to Read-Only mode.
19065 \begin_layout Standard
19068 ci -q -u -m"<description>" <file-name>
19071 \begin_layout Subsubsection
19077 \begin_layout Standard
19078 By doing this you lock the document so that only you can edit it.
19079 This will also make the document Read-Write only for you.
19080 You will usually continue editing for a while and when you are finished
19081 you check in your changes.
19082 The status line is changed to reflect that you have locked the file.
19086 \begin_layout Standard
19089 co -q -l <file-name>
19092 \begin_layout Subsubsection
19095 Revert To Repository Version
19098 \begin_layout Standard
19099 This will discard all changes made to the document since the last check
19101 You get a warning before changes are discarded.
19104 \begin_layout Standard
19107 co -f -u<version> <file-name>
19110 \begin_layout Subsubsection
19116 \begin_layout Standard
19117 This makes as if the last check in never happened.
19118 No changes are made to the document loaded into LyX, but the last version
19119 is removed from the master RCS file.
19123 \begin_layout Standard
19126 rcs -o<version> <file-name>
19129 \begin_layout Subsubsection
19135 \begin_layout Standard
19136 This shows the complete history of the RCS document.
19141 is shown in a browser.
19149 \begin_layout Subsubsection
19153 \begin_layout Standard
19154 LyX supports RCS version number, author name, date and time of last commit.
19155 All those are extracted from
19157 rlog -r <file-name>
19160 For other details see
19161 \begin_inset CommandInset ref
19163 reference "sub:VCS-Revision-Information"
19170 \begin_layout Subsection
19171 CVS commands in LyX
19174 \begin_layout Standard
19175 A subset of CVS operations is supported by LyX.
19176 You can find the commands in the
19178 File\SpecialChar \menuseparator
19180 \begin_inset space ~
19186 The version control system SVN is more powerful, so please use it instead
19187 of CVS if possible.
19190 \begin_layout Subsubsection
19196 \begin_layout Standard
19197 If you start from scratch with CVS you have to create your repository and
19198 checkout the working copy with external tools.
19199 If you're using a client-server setup you may need to login before doing
19200 the first repository checkout.
19203 \begin_layout Standard
19204 If your documents are under revision control and others are using the same
19205 repository problems arise when different changes to the same document at
19206 the same location happen.
19207 Standard CVS repositories doesn't operate with a file locking mechanism.
19208 This may be surprising, but conflicts only occur if people disagree on
19209 the proper content of the same part of a document.
19210 So, if co-workers are used to communicate regularly, these conflicts occur
19212 If they don't communicate they have a fundamental problem anyway.
19213 Nevertheless some people like to work with so called
19214 \begin_inset Quotes eld
19218 \begin_inset Quotes erd
19222 If they do so the working copy of all files is readonly when checked out
19223 first and the user starts editing after using a special command to make
19224 the working copy writable.
19225 When the changes are checked in the working copy returns to readonly state.
19226 With LyX one has to edit the
19227 \begin_inset Flex Code
19230 \begin_layout Plain Layout
19236 file and add the line
19237 \begin_inset Flex Code
19240 \begin_layout Plain Layout
19246 to work with reserved checkouts.
19247 The benefit is the possibility to see who is using a writable copy of some
19249 It's not guaranteed only one user makes a copy writable.
19252 \begin_layout Standard
19253 LyX tries to guess if you're using reserved or non-reserved checkouts.
19254 If your working copy is readonly or it is writable and an additional copy
19255 of your document exists in the CVS/Base sub-directory a reserved otherwise
19256 a non-reserved checkout is assumed.
19257 When a reserved checkout is detected you have to use
19258 \begin_inset Flex MenuItem
19261 \begin_layout Plain Layout
19267 to make your working copy writable if it's readonly.
19269 \begin_inset Flex MenuItem
19272 \begin_layout Plain Layout
19278 operation is possible and that makes your working copy readonly again after
19279 transferring your changes to the repository.
19282 \begin_layout Standard
19283 More information about CVS can be found here
19284 \begin_inset Flex URL
19287 \begin_layout Plain Layout
19289 http://www.nongnu.org/cvs
19295 \begin_inset Flex URL
19298 \begin_layout Plain Layout
19300 http://ximbiot.com/cvs
19308 \begin_layout Standard
19313 to understand the sub-commands and the switches mentioned below.
19316 \begin_layout Subsubsection
19322 \begin_layout Standard
19323 If your document is not under revision control, this is the only item shown
19325 And if it is under revision control, the
19332 item is not visible.
19336 \begin_layout Standard
19337 This command registers in CVS your document
19338 \begin_inset Flex Strong
19341 \begin_layout Plain Layout
19349 in the case you have already the documents directory under CVS control
19355 This means you have to create or checkout the archive by yourself using
19357 (In case you forget that step LyX registers the document with RCS.)
19360 \begin_layout Standard
19361 Then you are asked interactively to supply an initial description of the
19363 Don't forget that registered file is not yet checked in.
19366 \begin_layout Standard
19367 CVS command that is run:
19369 cvs -q add -m"<entered message>" "<file-name>"
19372 \begin_layout Standard
19377 above and for all other CVS commands is an abbreviation for
19378 \begin_inset Quotes eld
19381 change the current working directory to file location and use the file name
19382 without path component as argument
19383 \begin_inset Quotes erd
19389 \begin_layout Subsubsection
19395 \begin_layout Standard
19396 When you are finished editing a file, you commit your changes.
19397 When you do this and you had changed the document, you are asked for a
19398 description of the changes.
19399 After that changes are written to the repository.
19400 In case you didn't change the document and a reserved checkout is detected
19401 the reservation made on
19402 \begin_inset Flex MenuItem
19405 \begin_layout Plain Layout
19414 \begin_layout Labeling
19415 \labelwidthstring 00.00.0000
19417 \begin_inset space ~
19421 \begin_inset space ~
19425 \begin_inset Newline newline
19429 \begin_inset Flex Code
19432 \begin_layout Plain Layout
19435 -q commit -m"<description>" "<file-name>"
19441 \begin_inset Newline newline
19445 \begin_inset Flex Code
19448 \begin_layout Plain Layout
19459 \begin_layout Subsubsection
19465 \begin_layout Standard
19466 When you are sharing a repository with others, you may have to incorporate
19467 their changes into your working copy.
19470 \begin_layout Standard
19473 cvs -q update "<file-name>"
19476 \begin_layout Standard
19477 If a readonly checkout is detected the working copy is made writable and
19481 \begin_layout Standard
19484 cvs -q edit "<file-name>"
19487 \begin_layout Subsubsection
19490 Revert To Repository Version
19493 \begin_layout Standard
19494 This will discard all changes made to the document since the last check
19496 You get a warning before changes are discarded.
19497 Firstly the file is deleted, secondly CVS update command is run.
19500 \begin_layout Standard
19503 cvs -q update "<file-name>"
19506 \begin_layout Standard
19507 If a reserved checkout is detected and the working copy has no changes only
19508 the reservation is undone.
19511 \begin_layout Standard
19514 cvs -q unedit "<file-name>"
19517 \begin_layout Subsubsection
19518 Update of the local directory checkout from repository
19521 \begin_layout Standard
19522 Once your documents gets more complex, containing sub-documents and pictures,
19524 \begin_inset Flex Code
19527 \begin_layout Plain Layout
19533 files and so on using version control becomes more complicated.
19534 LyX supports updating the whole tree in which resides the document.
19535 This become especially useful once you cooperate with people which neither
19536 have detailed knowledge about CVS usage nor they have ambition to commit
19537 additional material to the repository.
19538 You have to organize the files structure so that all external files are
19539 in the same directory or subdirectories of the document.
19540 It's good practice anyway to store multipart documents in an extra directory.
19543 \begin_layout Standard
19545 \begin_inset Flex Code
19548 \begin_layout Plain Layout
19549 Update local directory from repository
19554 command updates the whole directory.
19555 If local changes are detected user is warned before update starts.
19556 In case of merge conflicts both versions of the conflicting document parts
19557 are placed in the final document.
19558 You have to review and correct the result of the merge.
19559 You'll find the conflicts enclosed in pairs of
19560 \begin_inset Flex Code
19563 \begin_layout Plain Layout
19570 \begin_inset Flex Code
19573 \begin_layout Plain Layout
19580 \begin_inset Flex Code
19583 \begin_layout Plain Layout
19590 The first part is your version as before the update operation with the
19591 document name prepended.
19592 The second one is the repository version with the version number after
19594 \begin_inset Flex Code
19597 \begin_layout Plain Layout
19606 \begin_layout Labeling
19607 \labelwidthstring 00.00.0000
19609 \begin_inset space ~
19613 \begin_inset space ~
19617 \begin_inset Newline newline
19621 \begin_inset Flex Code
19624 \begin_layout Plain Layout
19632 (Ask if changes are detected.)
19633 \begin_inset Newline newline
19637 \begin_inset Flex Code
19640 \begin_layout Plain Layout
19641 cd $path; cvs -q update
19651 \begin_layout Standard
19653 \begin_inset Flex Code
19656 \begin_layout Plain Layout
19662 stands for the path to the document.
19665 \begin_layout Subsubsection
19671 \begin_layout Standard
19672 This shows the complete history of the CVS document.
19675 cvs log "<file-name>"
19677 is shown in a browser.
19680 \begin_layout Subsection
19681 SVN commands in LyX
19684 \begin_layout Standard
19685 SVN is now partially supported by LyX.
19686 You can find the commands in the
19688 File\SpecialChar \menuseparator
19690 \begin_inset space ~
19696 Please note that if you use password protected access to repository via
19697 ssh, you will be asked in terminal window.
19698 LyX was tested against SVN 1.5 and 1.6
19702 \begin_layout Plain Layout
19703 Most of the commands will work with 1.4 too, see
19704 \begin_inset CommandInset ref
19706 reference "sub:SVN-Repo-Update"
19718 \begin_layout Subsubsection
19724 \begin_layout Standard
19725 If your document is not under revision control, this is the only item shown
19727 And if it is under revision control, the
19734 item is not visible.
19738 \begin_layout Standard
19739 This command registers in SVN your document ONLY in case you have already
19740 the documents directory under SVN control (in particular
19745 This means you have to checkout the archive by yourself.
19749 \begin_layout Standard
19750 Then you are asked interactively to supply an initial description of the
19752 Don't forget that registered file is not yet commited.
19755 \begin_layout Standard
19756 SVN command that is run:
19759 \begin_inset Quotes eld
19763 \begin_inset Quotes erd
19769 \begin_layout Standard
19774 to understand the switches.
19778 \begin_layout Subsubsection
19784 \begin_layout Standard
19785 When you are finished editing a file, you commit your changes.
19786 When you do this, you are asked for a description of the changes.
19787 After that changes are commited.
19790 \begin_layout Standard
19795 \begin_layout Plain Layout
19796 In case locking is not enabled.
19798 \begin_inset CommandInset ref
19800 reference "subsec:SVN-File-Locking"
19811 svn commit -q -m"<description>" <file-name>
19814 \begin_layout Subsubsection
19820 \begin_layout Standard
19821 Updates the changes of this file from the repository.
19822 Be sure you understand SVN merging and conflicts resolving before using
19823 this function, because all conflicts has to be resolved manually by you!
19826 \begin_layout Standard
19831 \begin_layout Plain Layout
19839 svn update --non-interactive
19840 \begin_inset Quotes eld
19844 \begin_inset Quotes erd
19850 \begin_layout Subsubsection
19853 Revert To Repository Version
19856 \begin_layout Standard
19857 This will discard all changes made to the document since the last check
19859 You get a warning before changes are discarded.
19863 \begin_layout Standard
19867 \begin_inset Quotes eld
19871 \begin_inset Quotes erd
19877 \begin_layout Subsubsection
19878 \begin_inset CommandInset label
19880 name "sub:SVN-Repo-Update"
19884 Update of the local directory checkout from repository
19888 \begin_layout Plain Layout
19889 Note that this command will work only with subversion
19890 \begin_inset Formula $\geqq1.5$
19901 \begin_layout Standard
19902 All the commands above have one shortcomming - they deal with the current
19904 Once your document contains pictures, includes external
19905 \begin_inset Flex Code
19908 \begin_layout Plain Layout
19914 files and so on administration becomes more complicated.
19915 LyX now supports updating the whole tree in which resides the document
19919 \begin_layout Plain Layout
19920 One need to organize the files structure so that all external files are
19921 in the same directory or subdirectories of the document.
19928 This become especially useful once you cooperate with people which neither
19929 know about subversion management nor they have ambition to commit additional
19930 material to the repository.
19934 \begin_layout Standard
19935 \begin_inset Flex Code
19938 \begin_layout Plain Layout
19939 Update local directory from repository
19944 command updates the whole directory and in case of merge conflicts local
19945 version of the files are left, so no unintended data loss occurs.
19946 If local changes are detected user is warned before update starts.
19949 \begin_layout Labeling
19950 \labelwidthstring 00.00.0000
19952 \begin_inset space ~
19956 \begin_inset space ~
19960 \begin_inset Newline newline
19964 \begin_inset Flex Code
19967 \begin_layout Plain Layout
19973 (Ask if changes are detected.)
19974 \begin_inset Newline newline
19978 \begin_inset Flex Code
19981 \begin_layout Plain Layout
19982 svn update --accept mine-full $path
19990 \begin_layout Standard
19992 \begin_inset Flex Code
19995 \begin_layout Plain Layout
20001 stands for the path to the document.
20004 \begin_layout Subsubsection
20010 \begin_layout Standard
20011 This shows the complete history of the SVN document.
20015 \begin_inset Quotes eld
20019 \begin_inset Quotes erd
20024 is shown in a browser.
20027 \begin_layout Subsubsection
20029 \begin_inset CommandInset label
20031 name "subsec:SVN-File-Locking"
20038 \begin_layout Standard
20039 The file exchange through various revision control systems brings the problem
20040 of merge conflicts in case two different users try to edit the same (parts
20042 When such a conflict happens it needs manual resolving and one reasonable
20043 alternative is to provide some kind of locking mechanism, which guarantees
20044 that only one user is allowed to edit file at the given time.
20047 \begin_layout Standard
20048 SVN has two such mechanisms to provide mutual exclusivity for file access
20049 - locks and automatic setting of write permissions (see sec.
20051 \begin_inset CommandInset ref
20053 reference "subsec:Automatical-Locking-Property"
20058 \begin_inset Flex Code
20061 \begin_layout Plain Layout
20071 \begin_layout Plain Layout
20072 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20078 If this property is detected for a given document LyX starts to use SVN
20079 locks for document editing automatically and the whole check-in/out mechanism
20080 switches to the same regimen as for RCS.
20081 This in particular means there are two different modes of file use in LyX:
20084 \begin_layout Itemize
20086 The loaded file is in the read-only mode.
20087 For editing on needs to check-out.
20092 consists of updating from the repository and gaining write lock.
20093 If the lock is not possible to obtain, we remain in unlocked state.
20096 \begin_layout Itemize
20098 The loaded file is in the 'normal' edit mode.
20099 No other user is allowed to edit the file.
20104 consists of commiting changes and releasing write-lock.
20105 If no changes have been made to the document, no commit will be produced
20109 \begin_layout Plain Layout
20110 Don't be puzzled by the fact that you will be asked for commit message anyway.
20115 and only the write-lock will be released.
20118 \begin_layout Standard
20122 \begin_layout Labeling
20123 \labelwidthstring 00.00.0000
20126 svn commit -q -m"<description>" "<file-name>"
20127 \begin_inset Newline newline
20130 svn unlock "<file-name>"
20133 \begin_layout Labeling
20134 \labelwidthstring 00.00.0000
20137 svn update "<file-name>"
20138 \begin_inset Newline newline
20141 svn lock "<file-name>"
20144 \begin_layout Subsubsection
20147 \begin_inset CommandInset label
20149 name "subsec:Automatical-Locking-Property"
20155 Automatic Locking Property
20158 \begin_layout Standard
20159 The above mentioned automatic setting of write permissions of the .lyx file
20165 ile\SpecialChar \menuseparator
20171 \begin_inset space ~
20174 Control\SpecialChar \menuseparator
20179 oggle locking property
20182 This command is active only when the file is not locked on the svn server
20184 you need to check-out before proceeding).
20187 \begin_layout Labeling
20188 \labelwidthstring 00.00.0000
20190 \begin_inset space ~
20196 \begin_layout Labeling
20197 \labelwidthstring 00.00.0000
20200 svn propset svn:needs-lock ON "<file-name>"
20203 \begin_layout Labeling
20204 \labelwidthstring 00.00.0000
20207 svn propdel svn:needs-lock "<file-name>"
20210 \begin_layout Subsubsection
20211 \begin_inset CommandInset label
20213 name "sub:VCS-Revision-Information"
20217 Revision Information in Documents
20220 \begin_layout Standard
20221 There are more possibilities how to activate revision information in our
20225 \begin_layout Itemize
20226 LyX supports directly:
20230 \begin_layout Itemize
20231 tree revision information (
20232 \begin_inset Flex Code
20235 \begin_layout Plain Layout
20242 The result is the output of the
20243 \begin_inset Flex Code
20246 \begin_layout Plain Layout
20252 command, the following table gives you an idea, how to read the results.
20255 \begin_layout Standard
20257 \begin_inset Tabular
20258 <lyxtabular version="3" rows="6" columns="2">
20259 <features tabularvalignment="middle">
20260 <column alignment="center" valignment="top" width="0">
20261 <column alignment="center" valignment="top" width="0">
20263 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20266 \begin_layout Plain Layout
20272 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20275 \begin_layout Plain Layout
20283 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20286 \begin_layout Plain Layout
20292 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20295 \begin_layout Plain Layout
20296 mixed revision working copy
20303 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20306 \begin_layout Plain Layout
20312 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20315 \begin_layout Plain Layout
20316 modified working copy
20323 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20326 \begin_layout Plain Layout
20332 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20335 \begin_layout Plain Layout
20336 switched working copy
20343 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20346 \begin_layout Plain Layout
20352 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20355 \begin_layout Plain Layout
20356 partial working copy, from a sparse checkout
20363 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20366 \begin_layout Plain Layout
20372 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20375 \begin_layout Plain Layout
20376 mixed revision, modified, switched working copy
20389 \begin_layout Itemize
20390 file revision information.
20391 The result comes from parsing the output of
20392 \begin_inset Flex Code
20395 \begin_layout Plain Layout
20397 \begin_inset space ~
20401 \begin_inset space ~
20405 \begin_inset space ~
20414 Supported flags are:
20418 \begin_layout Itemize
20419 version number of the last commit (
20420 \begin_inset Flex Code
20423 \begin_layout Plain Layout
20432 \begin_layout Itemize
20433 author of the last commit (
20434 \begin_inset Flex Code
20437 \begin_layout Plain Layout
20446 \begin_layout Itemize
20447 date of the last commit (
20448 \begin_inset Flex Code
20451 \begin_layout Plain Layout
20460 \begin_layout Itemize
20461 time of the last commit (
20462 \begin_inset Flex Code
20465 \begin_layout Plain Layout
20475 \begin_layout Standard
20476 You can obtain this info via InsetInfo (e.g.
20478 \begin_inset Flex Code
20481 \begin_layout Plain Layout
20482 info-insert buffer vcs-date
20488 The information will be available only when you have the file stored under
20489 svn managment (i.e.
20491 \begin_inset Flex Code
20494 \begin_layout Plain Layout
20500 directory is available with your document).
20504 \begin_layout Itemize
20505 Another---a hacking one---possibility is to use svn keywords
20509 \begin_layout Plain Layout
20510 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20516 In short -- you set file keywords property (e.g.
20519 svn propset svn:keywords 'Rev' file.lyx
20521 ) and then paste keyword TeX code
20525 \begin_layout Plain Layout
20526 This is an easy way how to ensure that LyX won't break the line in the middle
20532 tag in your document (e.g.
20537 \begin_layout Plain Layout
20545 This way svn client will automatically substitute revision number (e.g.
20550 \begin_layout Plain Layout
20557 ) after each update and commit.
20558 There are more problems with this approach.
20559 Firstly, the '$' character is used in TeX world for math equations, so
20560 any occurence of math formula
20561 \begin_inset Formula $Rev$
20565 \begin_inset Formula $Rev:59$
20568 in your LyX document.
20569 Similarly for other keywords like Id, Date, Author, etc.
20570 Secondly svn output is dependent on your locales, so its very easy that
20571 svn would produce some problematic strings once Date is used.
20572 Thirdly you get the whole 'Rev: 59' string in your document instead of
20574 Until subversion implements user's custom keywords it will be hard to use
20575 this approach reliably or let LyX to support it directly.
20578 \begin_layout Subsection
20579 SVN and Windows Environment
20582 \begin_layout Quote
20583 My inclination is to say that if the user cannot figure out the command
20584 line operations on their own fairly quickly, they would be well advised
20585 to use TortoiseSVN.
20591 \begin_layout Subsubsection
20595 \begin_layout Standard
20596 In addition to installing LyX, and having access to a Subversion repository,
20597 the user will need to install the Subversion client program.
20598 A Windows installer for the client program is available from
20599 \begin_inset CommandInset href
20602 target "http://www.collab.net/nonav/downloads/subversion/"
20607 The user may also want to install
20608 \begin_inset CommandInset href
20611 target "http://tortoisesvn.tigris.org/"
20615 , which integrates Subversion operations into the context (rightclick) menu
20616 of Windows Explorer.
20617 Operations done outside LyX will typically be more convenient using the
20618 Explorer context menu.
20619 Note that TortoiseSVN is not a replacement for the client program, which
20620 is what LyX itself will use.
20623 \begin_layout Subsubsection
20624 Bringing a document under Subversion control
20627 \begin_layout Standard
20628 Before a LyX document can be brought under version control in Subversion,
20629 its parent directory needs to be under version control.
20630 If the document is being added to a project already in the repository,
20631 this is accomplished by checking the project out to the directory where
20632 the new document will be placed.
20633 If the project itself is not yet under version control (for instance, if
20634 this document starts a new project), the directory must be imported into
20636 This is done outside LyX.
20637 Both import and checkout are easily accomplished from the Explorer context
20638 menu using TortoiseSVN, or alternatively can be done using the command
20639 line client at a DOS prompt.
20640 The procedure for importing the project using TortoiseSVN is described
20641 below, assuming an existing repository and a new project being started
20649 For information on using the Subversion client program, run
20656 \begin_layout Enumerate
20663 in Windows Explorer, right click it, and select
20665 TortoiseSVN > Repo-browser
20668 If necessary, adjust the URL for the repository, then click OK.
20671 \begin_layout Enumerate
20672 Right click the level of the repository under which you want to place the
20673 new project folder (typically the top level) and click
20675 Create folder\SpecialChar \ldots{}
20678 Supply a name for the project folder and click OK.
20679 Add a message for the log file if desired, then click OK again.
20680 The new project folder should appear in the repository.
20681 Finally, click OK again to exit the repository browser.
20684 \begin_layout Enumerate
20685 Once again right click
20691 , this time selecting SVN Checkout\SpecialChar \ldots{}
20692 Select the URL of the project folder
20693 you just created in the repository, and set the checkout directory to
20701 You will be warned about a non-empty folder; click OK to proceed.
20702 You should now have a
20713 \begin_layout Enumerate
20714 Create or open your document in LyX and click
20719 ile\SpecialChar \menuseparator
20725 \begin_inset space ~
20728 Control\SpecialChar \menuseparator
20736 Add a log message and click OK to commit the document to version control.
20739 \begin_layout Standard
20740 From this point onward, you should have full functionality in the
20745 ile\SpecialChar \menuseparator
20751 \begin_inset space ~
20757 You also have the option of checking the document in and out, viewing its
20759 using the TortoiseSVN context menu in Windows Explorer or the Subversion
20760 client program from a command prompt.
20763 \begin_layout Subsubsection
20764 SSH tunnel used with SVN under Windows
20767 \begin_layout Standard
20768 Compared with Linux setting up an svn client to communicate over ssh under
20769 Windows is a rather troublesome task.
20770 We will at least offer some hints how to setup the client side but prior
20771 knowledge about ssh and the Windows command line is needed, also be prepared
20772 for a great deal of frustration\SpecialChar \ldots{}
20776 \begin_layout Enumerate
20777 Get an svn client for windows, as described in the previous sections.
20778 When it is a fresh install run some svn command (e.g.
20780 \begin_inset Flex Code
20783 \begin_layout Plain Layout
20789 ) to create config files, which you will need to change later on.
20792 \begin_layout Enumerate
20793 Choose an ssh client for Windows.
20794 There are several possibilities, we will use the one from Putty tools
20798 \begin_layout Plain Layout
20799 \begin_inset Flex URL
20802 \begin_layout Plain Layout
20804 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20815 You will need to set the connection up so that the client doesn't ask for
20816 any password from you.
20817 To keep things easy we will use only keys without any additional password
20822 \begin_layout Enumerate
20824 \begin_inset Flex Code
20827 \begin_layout Plain Layout
20834 Save your private .ppk key file and put the public one on the server side.
20835 If the SVN server runs on Linux, note that the format of the public key
20836 is not compatible with Linux openssh and you will need to direcly copy-paste
20839 Public key for pasting into OpenSSH authorized_keys file
20841 :” edit field into the server's
20842 \begin_inset Flex Code
20845 \begin_layout Plain Layout
20846 ~/.ssh/authorized_keys
20852 \begin_inset Flex Code
20855 \begin_layout Plain Layout
20864 \begin_layout Enumerate
20866 \begin_inset Flex Code
20869 \begin_layout Plain Layout
20876 In the SVN config file
20880 \begin_layout Plain Layout
20881 Exact path depends on Windows version, usually somewhere around
20882 \begin_inset Flex Code
20885 \begin_layout Plain Layout
20888 Documents and Settings
20902 \begin_inset Flex Code
20905 \begin_layout Plain Layout
20920 , section [tunnels], setup ssh command, e.g.
20922 \begin_inset Flex Code
20925 \begin_layout Plain Layout
20926 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20935 \begin_layout Plain Layout
20936 It will usually take a lot of time to get exact command right and it depends
20938 For example do not have some remote server saved as a default session in
20940 If things fail, try to connect via plink without SVN first.
20949 \begin_layout Enumerate
20950 Checkout the SVN archive, e.g.
20952 \begin_inset Flex Code
20955 \begin_layout Plain Layout
20956 svn co svn+ssh://user@server/repository_path
20964 \begin_layout Subsubsection
20965 End-of-Line Conversions
20968 \begin_layout Standard
20969 When the collaborators are mixing Linux and Windows environments, LyX will
20970 use different line endings inside the .lyx files.
20971 This is not a problem as far as LyX functionality is concerned, but the
20972 commit diffs will be huge and merge-conflicts prone.
20973 Fortunately SVN itself knows
20977 \begin_layout Plain Layout
20978 \begin_inset Flex URL
20981 \begin_layout Plain Layout
20983 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
20993 how to deal with CR/LF problems when switching .lyx files to the
20994 \begin_inset Flex Code
20997 \begin_layout Plain Layout
21007 \begin_layout Plain Layout
21009 \begin_inset Flex Code
21012 \begin_layout Plain Layout
21013 svn propset svn:eol-style native FILE_NAME
21026 \begin_layout Subsection
21030 \begin_layout Standard
21031 With the recent addition of the vc-command function LyX power users are
21032 allowed to create their own commands for revision control.
21035 \begin_layout Standard
21036 As an example you can see how two TortoiseSVN commands could be integrated
21040 \begin_layout Description
21042 \begin_inset Flex Code
21045 \begin_layout Plain Layout
21046 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21054 \begin_layout Description
21056 \begin_inset Flex Code
21059 \begin_layout Plain Layout
21060 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21068 \begin_layout Subsection
21069 Version control and Document comparison
21072 \begin_layout Standard
21073 One of the typical uses of version control is to inspect the changes between
21074 revisions, usually by creating
21075 \begin_inset Flex Code
21078 \begin_layout Plain Layout
21085 While this is useful for plain text files, it is much less useful in the
21086 case of LyX files, which have more a complicated structure.
21087 Hence we provide binding to the Document comparison feature.
21088 There are two ways of calling this feature - either by direct call of
21089 \begin_inset Flex Code
21092 \begin_layout Plain Layout
21098 LyX function (for details see LyX functions manual) or by icon/menu item
21100 \begin_inset Flex MenuItem
21103 \begin_layout Plain Layout
21104 Compare with older revision...
21110 One can either compare two chosen revisions of the document or he can simply
21111 compare the current version of edited text with older revisions (where
21113 \begin_inset Flex MenuItem
21116 \begin_layout Plain Layout
21122 ' revisions back means comparison of the edited file with last commited
21127 \begin_layout Standard
21128 This feature is supported for SVN and RCS though due to the more complicated
21129 versioning scheme of RCS there is a constraint -- when addressing the revisions
21130 in dialog, numbers always point to the last number in RCS revision number,
21135 \begin_layout Section
21136 Literate Programming
21139 \begin_layout Standard
21144 (kayvan@sylvan.com)
21148 original documentation written by
21150 Edmar Wienskoski Jr.
21153 (edmar-w-jr@technologist.com)
21156 \begin_layout Subsection
21160 \begin_layout Standard
21161 The main purpose of this documentation is to show you how to use LyX for
21162 literate programming, where it is assumed that you are familiar with this
21163 programming technique, and know what
21164 \begin_inset Quotes eld
21168 \begin_inset Quotes erd
21172 \begin_inset Quotes eld
21176 \begin_inset Quotes erd
21180 If that is not the case, please follow the web links provided in the following
21182 There is a lot of good documentation out there covering old development
21183 history to the latest tools tips.
21186 \begin_layout Standard
21187 It is also assumed that you are familiar with LyX itself to a point that
21188 you are comfortable changing your LyX preferences, and X resources file.
21189 If that is not the case please refer to other LyX documentation to cover
21190 your specific needs.
21193 \begin_layout Subsection
21194 Literate Programming
21197 \begin_layout Standard
21198 From the Literate Programming FAQ:
21201 \begin_layout Quotation
21202 Literate programming is the combination of documentation and source together
21203 in a fashion suited for reading by human beings.
21204 In fact, literate programs should be enjoyable reading, even inviting!
21205 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21206 and documentation in a single file.
21207 Literate programming tools then parse the file to produce either readable
21208 documentation or compilable source.
21209 The WEB style of literate programming was created by D.
21210 \begin_inset space \thinspace{}
21214 Knuth during the development of his TeX typesetting software.
21218 \begin_layout Standard
21219 Another excerpt says:
21222 \begin_layout Quotation
21225 How is literate programming different from verbose commenting?
21228 \begin_layout Quotation
21229 There are three distinguishing characteristics.
21230 In order of importance, they are:
21234 \begin_layout Itemize
21235 flexible order of elaboration
21238 \begin_layout Itemize
21239 automatic support for browsing
21242 \begin_layout Itemize
21243 typeset documentation, especially diagrams and mathematics
21247 \begin_layout Standard
21248 Now that I sparked your curiosity, take a look in the references.
21251 \begin_layout Subsubsection
21255 \begin_layout Standard
21256 The complete Literate Programming FAQ can be found at:
21259 \begin_layout Quote
21260 Literate Programming FAQ
21261 \begin_inset Flex URL
21264 \begin_layout Plain Layout
21266 http://www.literateprogramming.com/lpfaq.pdf
21274 \begin_layout Standard
21275 The FAQ lists 23 (twenty three!) different literate programming tools.
21276 Where some are specialized or
21277 \begin_inset Quotes eld
21281 \begin_inset Quotes erd
21284 for particular programming languages, while other have general scope.
21289 for my own use for several reasons:
21292 \begin_layout Itemize
21293 It can generate the documentation either in LaTeX or HTML.
21296 \begin_layout Itemize
21297 It has a open architecture, i.
21298 \begin_inset space \thinspace{}
21302 \begin_inset space \space{}
21305 it is easy to plug in new filters and to perform special processing that
21310 \begin_layout Itemize
21311 There is a good selection of filters available already (the HTML is one
21315 \begin_layout Itemize
21319 \begin_layout Standard
21320 The Noweb web page can be found at:
21323 \begin_layout Quote
21325 \begin_inset Flex URL
21328 \begin_layout Plain Layout
21330 http://www.cs.virginia.edu/~nr/noweb/
21338 \begin_layout Standard
21339 Starting from there you can reach many other interesting links and even
21340 some literate program examples.
21343 \begin_layout Subsection
21344 LyX and Literate Programming
21347 \begin_layout Standard
21348 The LyX support for Literate Programming is provided by using the generic
21349 LyX converters mechanism.
21350 This support is provided in a
21351 \begin_inset Quotes eld
21355 \begin_inset Quotes erd
21359 \begin_inset space \thinspace{}
21363 \begin_inset space \space{}
21366 you will be able to use this new LyX feature with some other literate programmin
21367 g tool of your choice by just changing your LyX preferences.
21370 \begin_layout Subsubsection
21371 Generating documents and code (weaving and tangling)
21374 \begin_layout Paragraph
21375 Selecting the document class
21378 \begin_layout Standard
21379 If you have installed Noweb and LyX successfully, whenever you open a new
21380 document or try to change the document class of an existing one, you will
21381 find that there are three new document classes available:
21384 \begin_layout Itemize
21388 \begin_layout Itemize
21392 \begin_layout Itemize
21396 \begin_layout Standard
21397 You must select one of them to create your literate documents from.
21401 \begin_layout Standard
21402 Note that literate documents are not limited to these three classes.
21403 New classes can be generated from other styles like letter or in combination
21404 with other class variations like Article (AMS).
21405 If you have special needs that cannot be covered by one of the existing
21406 classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21407 will arrange to insert a new entry, or teach you how to do it.
21411 \begin_layout Plain Layout
21412 It is very simple, it involves the creation of a file with four lines, and
21413 re-running of the auto configuration.
21418 Moreover, if you use a literate tool other than Noweb you may need to create
21419 a new set of document classes for it.
21422 \begin_layout Paragraph
21426 \begin_layout Standard
21427 LyX enables you to write code with a layout named
21435 \begin_layout Plain Layout
21436 The equivalent Noweb term is
21437 \begin_inset Quotes eld
21441 \begin_inset Quotes erd
21445 For historical reasons, I got used to the term
21446 \begin_inset Quotes eld
21450 \begin_inset Quotes erd
21453 introduced by other literate tool named Nuweb, which I used for many years
21454 before rendering myself to Noweb.
21459 Noweb delimits scraps like this:
21462 \begin_layout LyX-Code
21466 \begin_layout LyX-Code
21470 \begin_layout LyX-Code
21474 \begin_layout LyX-Code
21478 \begin_layout LyX-Code
21482 \begin_layout Standard
21483 The problem is that whatever is written in between the << and the
21487 must be taken literally, i.
21488 \begin_inset space \thinspace{}
21492 \begin_inset space \space{}
21495 LyX should be prevented from making any special interpretation of what has
21497 This is handled by a special layout named Scrap, that works like a normal
21498 paragraph but has a free spacing capability.
21501 \begin_layout Standard
21502 The down side of the Scrap paragraph layout is that consecutive paragraphs
21503 of code will be spaced with one empty line in the source code and also
21504 in the printed documentation.
21505 The work around is to enter each line of code within a single Scrap, with
21506 a newline (ctrl-return).
21507 The example above will look like this:
21511 \begin_layout Plain Layout
21512 If you have a printed version of this document you will not see any difference
21513 between the previous example and this one.
21521 \begin_layout LyX-Code
21523 \begin_inset Newline newline
21527 \begin_inset Newline newline
21531 \begin_inset Newline newline
21535 \begin_inset Newline newline
21541 \begin_layout Standard
21542 This layout works fine.
21543 The only real inconvenience is that you have to type ctrl-return instead
21548 \begin_layout Plain Layout
21549 It is in my list of
21550 \begin_inset Quotes eld
21554 \begin_inset Quotes erd
21565 \begin_layout Standard
21566 As a special note, you can also use the
21567 \begin_inset Quotes eld
21571 \begin_inset Quotes erd
21574 construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21578 \begin_layout LyX-Code
21580 \begin_inset Newline newline
21583 def some_function(args):
21584 \begin_inset Newline newline
21587 "This is the doc string for this function."
21588 \begin_inset Newline newline
21591 print "My args: ", args
21594 \begin_layout LyX-Code
21595 @ %def some_function
21598 \begin_layout Standard
21599 For an example of this usage and the resulting cross-reference output, look
21600 at the Literate python program in
21602 LIBDIR/examples/listerrors.lyx
21604 which should make this all clear.
21607 \begin_layout Paragraph
21608 Generating the documentation
21611 \begin_layout Standard
21612 At this point you already have a new document file with a proper document
21613 class, and with some code and text on it.
21614 How do I print it? The answer is simple, you select
21616 View\SpecialChar \menuseparator
21620 Just like you would do for a plain document.
21621 No special procedure is required.
21624 \begin_layout Standard
21625 To help orientate you, I will now explain what happens inside LyX:
21628 \begin_layout Enumerate
21631 Update\SpecialChar \menuseparator
21634 menu option is chosen, a LaTeX file is generated.
21639 \begin_layout Standard
21640 If the document is of any literate class the generated file will be named
21641 with an extension name defined by the
21642 \begin_inset Quotes eld
21646 \begin_inset Quotes erd
21649 format (defined in the Preferences panel), otherwise the file will have
21658 \begin_layout Enumerate
21659 Note that the only difference so far is in the name of the file, no special
21660 processing is required by LyX.
21661 Given that you formatted the code using the Scrap layout that, by itself,
21662 takes care of the business.
21665 \begin_layout Enumerate
21666 If the document is of any literate class LyX will then use the internal
21667 LyX to Noweb converter, followed by the Noweb to LaTeX converter
21671 \begin_layout Plain Layout
21672 The converters are defined in the
21674 Tools\SpecialChar \menuseparator
21678 \begin_inset Quotes eld
21682 \begin_inset Quotes erd
21694 manual for general information about converters.
21699 to generate the LaTeX file.
21703 \begin_layout Standard
21704 Otherwise it will just skip this step.
21708 \begin_layout Enumerate
21709 Finally, LaTeX is invoked and the regular post processing continues as in
21713 \begin_layout Standard
21714 Independence from a particular
21715 \begin_inset Quotes eld
21719 \begin_inset Quotes erd
21722 is easily achieved by changing the commands that are run by the various
21726 \begin_layout Paragraph
21727 Generating the code
21730 \begin_layout Standard
21731 When the build menu option is chosen or the corresponding button in the
21732 toolbar is pressed, a LaTeX file is generated just like step 1 above.
21733 Next, LyX invokes the
21738 This converter needs to be defined by the user and is not installed by
21739 default, though the Program format is.
21740 This converter (like any other converter) will have two parts:
21743 \begin_layout Enumerate
21744 The converter program itself.
21745 This program performs the conversion from the one format to the other (in
21746 this case, from the Noweb format to the Program pseudo-format).
21749 \begin_layout Enumerate
21750 The error log parser.
21751 This is a program whose sole purpose is to rewrite error messages in a
21752 format that LyX understands.
21753 This makes it possible for LyX to place error boxes in the right places
21754 in the file buffer.
21757 \begin_layout Standard
21758 The first part, the
21759 \begin_inset Quotes eld
21763 \begin_inset Quotes erd
21766 setting, should be set to
21767 \begin_inset Quotes eld
21775 \begin_inset Quotes erd
21779 This basically means that LyX will call
21780 \begin_inset Quotes eld
21784 \begin_inset Quotes erd
21787 (a program or script) with the name of the Noweb file (normally a file
21788 in the LyX temp directory).
21792 \begin_layout Standard
21793 This is an implementation of
21794 \begin_inset Quotes eld
21798 \begin_inset Quotes erd
21801 that you can place in a directory on your path:
21804 \begin_layout LyX-Code
21808 \begin_layout LyX-Code
21812 \begin_layout LyX-Code
21813 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
21816 \begin_layout Standard
21817 The next part of the converter setting is the
21818 \begin_inset Quotes eld
21822 \begin_inset Quotes erd
21825 which is to be set to
21826 \begin_inset Quotes eld
21831 parselog=listerrors
21834 \begin_inset Quotes erd
21838 This will run any errors that are generated by the
21839 \begin_inset Quotes eld
21843 \begin_inset Quotes erd
21846 process through the
21847 \begin_inset Quotes eld
21851 \begin_inset Quotes erd
21857 \begin_layout Standard
21858 The converter code looks in
21866 then on the path for the
21867 \begin_inset Quotes eld
21871 \begin_inset Quotes erd
21877 \begin_layout Standard
21878 The build will normally take place in LyX's temporary directory, so the
21879 files produced by the conversion will be in that directory.
21880 LyX will copy out what it regards as the `main' file, but the
21884 conversion may produce several files, and so most of these would then be
21885 deleted when LyX was closed.
21886 The present solution is to use a `copier',
21890 \begin_layout Plain Layout
21899 manual for information on these.
21908 script in its default mode, so that the entire contents of the temporary
21909 directory is copied.
21910 More will get copied than is needed, to be sure, but nothing will be lost.
21911 If, however, you know what extensions the generated files will have, this
21912 can be improved by using the
21921 This option takes a comma-separated list of extensions to copy.
21922 So, for example, if the conversion will generate only files with the extensions
21931 , then the correct definition would be:
21934 \begin_layout LyX-Code
21935 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
21938 \begin_layout Standard
21939 The result will be that only files with these two extensions will be copied
21943 \begin_layout Paragraph
21944 Build instructions in the document
21947 \begin_layout Standard
21948 The last piece of the integration between LyX and noweb is the
21949 \begin_inset Quotes eld
21953 \begin_inset Quotes erd
21957 Generally, the instructions for building your program should be embedded
21958 in a scrap of its own.
21960 \begin_inset Quotes eld
21964 \begin_inset Quotes erd
21967 above uses the notangle command to look for this scrap (called
21968 \begin_inset Quotes eld
21972 \begin_inset Quotes erd
21975 ) and runs its contents through
21976 \begin_inset Quotes eld
21980 \begin_inset Quotes erd
21986 \begin_layout Standard
21987 Typically, such a scrap would look something like this:
21990 \begin_layout LyX-Code
21992 \begin_inset Newline newline
21996 \begin_inset Newline newline
22000 \begin_inset Newline newline
22003 if [ -z "${NOWEB_SOURCE}" ]
22004 \begin_inset Newline newline
22008 \begin_inset Newline newline
22011 NOWEB_SOURCE=myfile.nw
22012 \begin_inset Newline newline
22016 \begin_inset Newline newline
22020 code to extract files ...]
22021 \begin_inset Newline newline
22025 code to compile files ...]
22026 \begin_inset Newline newline
22032 \begin_layout Standard
22035 LIBDIR/examples/listerrors.lyx
22039 LIBDIR/examples/Literate.lyx
22041 which implement two versions of the
22042 \begin_inset Quotes eld
22046 \begin_inset Quotes erd
22049 program for some illustrations of how all of these pieces go together or
22052 LIBDIR/examples/noweb2lyx.lyx.
22055 Interestingly, these three files show off the language-indepence of the
22056 LyX literate programming support since they are written in Python, C and
22060 \begin_layout Subsubsection
22064 \begin_layout Standard
22065 All the Literate Programming support is configured by the
22067 Tools\SpecialChar \menuseparator
22071 \begin_inset Quotes eld
22075 \begin_inset Quotes erd
22079 The important parts are:
22082 \begin_layout Description
22084 \begin_inset space ~
22088 \begin_inset Quotes eld
22092 \begin_inset Quotes erd
22096 \begin_inset space ~
22099 format Set up via the Formats tab, this is where the Noweb-specific pieces
22109 , the file extension is set to
22114 This tells LyX to create a file with a
22118 extension in the first step of the conversion process.
22121 \begin_layout Description
22123 \begin_inset space ~
22131 \begin_inset space ~
22134 format This is an empty format whose sole purpose is to be the endpoint
22135 of a conversion (which then allows us to set up a converter for it).
22138 \begin_layout Description
22147 This converter performs the
22148 \begin_inset Quotes eld
22152 \begin_inset Quotes erd
22155 of the literate document.
22156 For Noweb, it is set to
22157 \begin_inset Quotes eld
22162 noweave -delay -index $$i > $$o
22165 \begin_inset Quotes erd
22171 \begin_layout Description
22181 \begin_inset Quotes eld
22185 \begin_inset Quotes erd
22189 As stated above, the Converter is set to
22190 \begin_inset Quotes eld
22198 \begin_inset Quotes erd
22201 , with Flags set to
22202 \begin_inset Quotes eld
22207 originaldir,parselog=listerrors
22210 \begin_inset Quotes erd
22216 \begin_layout Subsubsection
22220 \begin_layout Standard
22221 There is also a new function implemented in the LyX server, the
22222 \begin_inset Quotes eld
22225 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22229 \begin_layout Standard
22230 When debugging code with ddd/gdb, it is possible to invoke a text editor
22231 at the current execution position with a single key stroke.
22232 The default ddd configuration for that is shift-ctrl-V.
22233 It happens that you can define the editor command line invocation in ddd
22236 Edit\SpecialChar \menuseparator
22237 Preferences\SpecialChar \menuseparator
22240 dialog and changing the "Edit Sources" entry.
22243 \begin_layout Standard
22244 I take advantage of the new created LyX server function and this ddd feature,
22246 \begin_inset Quotes eld
22250 \begin_inset Quotes erd
22256 \begin_layout LyX-Code
22257 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22260 \begin_layout Standard
22261 With this, whenever you are using ddd and find a point in the program that
22262 you want to edit, you just press shift-ctrl-V (in the ddd window), and
22263 ddd you forward this information to LyX through the LyX server and then
22264 the LyX window will show the same file with the cursor at the same position
22265 ddd was pointing to.
22266 No more guessing or long scrolling to locate a point in the program back
22270 \begin_layout Standard
22271 Note however that you must enable the LyX server to get this feature working
22272 (it is disabled by default).
22273 You can enable it in
22285 ) by entering in the
22290 \begin_inset Quotes eld
22295 /home/<your-home-directory>/.lyx/lyxpipe
22298 \begin_inset Quotes erd
22304 \begin_layout Standard
22305 Read the LyX server documentation in the
22307 Customization Manual
22309 for further information.
22312 \begin_layout Subsubsection
22316 \begin_layout Standard
22317 There are six new buttons that can be added to your LyX toolbar.
22318 Five of these buttons are short cuts to layout styles:
22339 The last one is a short cut to the
22340 \begin_inset Quotes eld
22344 \begin_inset Quotes erd
22351 \begin_layout Standard
22352 LyX has a range of buttons that are available for tool bar customization.
22353 In my toolbar I like to combine the six short cuts above with two more:
22358 \SpecialChar \menuseparator
22363 \SpecialChar \menuseparator
22370 View\SpecialChar \menuseparator
22374 Here is how it looks like:
22377 \begin_layout LyX-Code
22381 \begin_layout LyX-Code
22385 \begin_layout LyX-Code
22386 Icon "layout Standard"
22389 \begin_layout LyX-Code
22390 Icon "layout Section"
22393 \begin_layout LyX-Code
22394 Icon "layout LaTeX"
22397 \begin_layout LyX-Code
22398 Icon "layout LyX-Code"
22401 \begin_layout LyX-Code
22402 Icon "layout Scrap"
22405 \begin_layout LyX-Code
22409 \begin_layout LyX-Code
22413 \begin_layout LyX-Code
22414 Icon "buffer-typeset"
22417 \begin_layout LyX-Code
22418 Icon "build-program"
22421 \begin_layout LyX-Code
22425 \begin_layout LyX-Code
22429 \begin_layout LyX-Code
22433 \begin_layout LyX-Code
22437 \begin_layout LyX-Code
22441 \begin_layout Subsubsection
22442 Colors customization
22445 \begin_layout Standard
22446 There are a number of colors in LyX that can be customized in
22451 One of the things that bothers people is the LaTeX font color.
22452 The default color is red, since the scraps uses LaTeX font, and there is
22453 a lot of scraps in literate documents, you may get tired of seeing everything
22455 You can change it by going to the tabs
22464 \begin_layout Standard
22465 The next thing is the visible presence of the newline character in the screen.
22466 You can choose the color of this particular character and make it blend
22468 I recommend you choosing a color that is close to the background but not
22469 equal, that way you still can see it is there, but it is not bothering
22474 \begin_layout Chapter
22478 \begin_layout Standard
22479 You can do everything with LyX that you can do with LaTeX.
22480 However, LyX cannot support every LaTeX feature directly.
22481 But you can always use TeX Code.
22482 This chapter shows you some more special things you might want to use.
22483 For other special things you can do with figures, tables, floats, boxes
22484 and notes, have a look at the
22487 \begin_inset space ~
22495 \begin_layout Section
22496 Multiple Text Columns
22499 \begin_layout Standard
22500 This feature is independent of the option
22502 Two-column document
22504 in the document settings under
22509 If you want to have 2
22510 \begin_inset space ~
22513 columns for the whole document, it is recommended to use the
22515 Two-column document
22518 For all other cases use this feature.
22521 \begin_layout Standard
22522 To use multiple text columns in your document, you have to load the module
22529 Document\SpecialChar \menuseparator
22530 Settings\SpecialChar \menuseparator
22533 ) and must have the LaTeX-package
22538 \begin_inset Index idx
22541 \begin_layout Plain Layout
22542 LaTeX-packages ! multicol
22550 \begin_layout Standard
22551 Footnotes within multiple columns will be placed at the bottom of the page
22552 and not under each column.
22553 Within the different columns you can use everything, with the limitation
22554 that for floats you need to use the float option
22561 \begin_layout Subsection
22565 \begin_layout Standard
22566 If you want to have 2
22567 \begin_inset space ~
22570 columns in your text, use the style
22572 Begin Multiple Columns
22574 where the columns should start.
22575 The content of the style is the number of the columns, so in this case
22577 \begin_inset Quotes eld
22581 \begin_inset Quotes erd
22585 At the point where the columns should end use the style
22587 End Multiple Columns
22592 \begin_layout Standard
22593 Here is an example:
22596 \begin_layout Begin Multiple Columns
22600 \begin_layout Standard
22605 The Adventure of the Empty House
22608 \begin_inset Newline newline
22613 Sir Arthur Conan Doyle
22616 \begin_layout Standard
22619 It was in the spring of the year 1894 that all London was interested, and
22620 the fashionable world dismayed, by the murder of the Honourable Ronald
22621 Adair under most unusual and inexplicable circumstances.
22622 The public has already learned those particulars of the crime which came
22623 out in the police investigation, but a good deal was suppressed upon that
22624 occasion, since the case for the prosecution was so overwhelmingly strong
22625 that it was not necessary to bring forward all the facts.
22626 Only now, at the end of nearly ten years, am I allowed to supply those
22627 missing links which make up the whole of that remarkable chain.
22628 The crime was of interest in itself, but that interest was as nothing to
22629 me compared to the inconceivable sequel, which afforded me the greatest
22630 shock and surprise of any event in my adventurous life.
22631 Even now, after this long interval, I find myself thrilling as I think
22632 of it, and feeling once more that sudden flood of joy, amazement, and increduli
22633 ty which utterly submerged my mind.
22634 Let me say to that public, which has shown some interest in those glimpses
22635 which I have occasionally given them of the thoughts and actions of a very
22636 remarkable man, that they are not to blame me if I have not shared my knowledge
22637 with them, for I should have considered it my first duty to do so, had
22638 I not been barred by a positive prohibition from his own lips, which was
22639 only withdrawn upon the third of last month.
22642 \begin_layout End Multiple Columns
22646 \begin_layout Standard
22647 Here is an example with 3
22648 \begin_inset space ~
22654 \begin_layout Begin Multiple Columns
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 End Multiple Columns
22686 \begin_layout Standard
22687 You can have up to 10
22688 \begin_inset space ~
22691 columns if you want to, but that might not be very pleasant for the readers
22695 \begin_layout Standard
22696 \begin_inset Newpage newpage
22702 \begin_layout Subsection
22703 Columns inside Columns
22706 \begin_layout Standard
22707 You can also have columns inside columns:
22710 \begin_layout Begin Multiple Columns
22714 \begin_layout Standard
22717 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22718 at that time governor of one of the Australian colonies.
22719 Adair's mother had returned from Australia to undergo the operation for
22720 cataract, and she, her son Ronald, and her daughter Hilda were living together
22724 \begin_layout Begin Multiple Columns
22728 \begin_layout Standard
22731 The youth moved in the best society–had, so far as was known, no enemies
22732 and no particular vices.
22733 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22734 had been broken off by mutual consent some months before, and there was
22735 no sign that it had left any very profound feeling behind it.
22736 For the rest {sic} the man's life moved in a narrow and conventional circle,
22737 for his habits were quiet and his nature unemotional.
22738 Yet it was upon this easy-going young aristocrat that death came, in most
22739 strange and unexpected form, between the hours of ten and eleven-twenty
22740 on the night of March 30, 1894.
22743 \begin_layout End Multiple Columns
22747 \begin_layout Standard
22750 Ronald Adair was fond of cards–playing continually, but never for such stakes
22752 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22753 It was shown that, after dinner on the day of his death, he had played
22754 a rubber of whist at the latter club.
22755 He had also played there in the afternoon.
22760 The evidence of those who had played with him– Mr.
22761 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
22762 and that there was a fairly equal fall of the cards.
22763 Adair might have lost five pounds, but not more.
22764 His fortune was a considerable one, and such a loss could not in any way
22766 He had played nearly every day at one club or other, but he was a cautious
22767 player, and usually rose a winner.
22768 It came out in evidence that, in partnership with Colonel Moran, he had
22769 actually won as much as four hundred and twenty pounds in a sitting, some
22770 weeks before, from Godfrey Milner and Lord Balmoral.
22771 So much for his recent history as it came out at the inquest.
22774 \begin_layout End Multiple Columns
22778 \begin_layout Subsection
22782 \begin_layout Standard
22783 The examples in this section show some more special features of multiple
22787 \begin_layout Standard
22788 For more features of multiple columns, have a look at the documentation
22789 of the LaTeX-package
22794 \begin_inset Index idx
22797 \begin_layout Plain Layout
22798 LaTeX-packages ! multicol
22804 \begin_inset CommandInset citation
22813 \begin_layout Subsubsection
22817 \begin_layout Standard
22818 To add a preface text for multiple columns, add the command
22821 \begin_layout Standard
22827 \begin_layout Standard
22828 as TeX Code behind the number of columns in the
22830 Begin Multiple Columns
22833 Behind the command follows the preface text.
22834 At the end of the style use the command
22837 \begin_layout Standard
22843 \begin_layout Standard
22845 An example with some preface text:
22848 \begin_layout Standard
22849 \begin_inset VSpace bigskip
22855 \begin_layout Begin Multiple Columns
22860 \begin_layout Plain Layout
22867 And the story continues and continues and continues and continues\SpecialChar \ldots{}
22872 \begin_layout Plain Layout
22882 \begin_layout Standard
22885 On the evening of the crime, he returned from the club exactly at ten.
22886 His mother and sister were out spending the evening with a relation.
22887 The servant deposed that she heard him enter the front room on the second
22888 floor, generally used as his sitting-room.
22889 She had lit a fire there, and as it smoked she had opened the window.
22890 No sound was heard from the room until eleven-twenty, the hour of the return
22891 of Lady Maynooth and her daughter.
22892 Desiring to say good-night, she attempted to enter her son's room.
22893 The door was locked on the inside, and no answer could be got to their
22894 cries and knocking.
22895 Help was obtained, and the door forced.
22896 The unfortunate young man was found lying near the table.
22897 His head had been horribly mutilated by an expanding revolver bullet, but
22898 no weapon of any sort was to be found in the room.
22901 \begin_layout End Multiple Columns
22905 \begin_layout Standard
22906 You can also use a section heading as the preface if you use a section command
22907 as TeX Code behind the first TeX Code.
22908 For example the command
22911 \begin_layout Standard
22916 subsection{subsection title}
22919 \begin_layout Standard
22920 creates a subsection.
22921 In this example the preface is a subsubsection:
22924 \begin_layout Begin Multiple Columns
22929 \begin_layout Plain Layout
22940 \begin_layout Plain Layout
22949 This is a subsubsection heading as a preface
22953 \begin_layout Plain Layout
22964 \begin_layout Plain Layout
22974 \begin_layout Standard
22977 A minute examination of the circumstances served only to make the case more
22979 In the first place, no reason could be given why the young man should have
22980 fastened the door upon the inside.
22981 There was the possibility that the murderer had done this, and had afterwards
22982 escaped by the window.
22983 The drop was at least twenty feet, however, and a bed of crocuses in full
22985 Neither the flowers nor the earth showed any sign of having been disturbed,
22986 nor were there any marks upon the narrow strip of grass which separated
22987 the house from the road.
22988 Apparently, therefore, it was the young man himself who had fastened the
22990 But how did he come by his death? No one could have climbed up to the window
22991 without leaving traces.
22992 Suppose a man had fired through the window, he would indeed be a remarkable
22993 shot who could with a revolver inflict so deadly a wound.
22994 Again, Park Lane is a frequented thoroughfare; there is a cab stand within
22995 a hundred yards of the house.
22996 No one had heard a shot.
22999 \begin_layout End Multiple Columns
23003 \begin_layout Standard
23004 If there is less vertical space left on the page at the beginning of the
23005 multiple columns than needed for 6
23006 \begin_inset space ~
23009 text lines, a page break will be inserted before the multiple columns.
23010 Depending on the number of lines of the preface text, you might want to
23012 It is determined by inserting the command
23015 \begin_layout Standard
23023 \begin_layout Standard
23024 as TeX Code behind the preface definition but before the final
23033 is hereby the number of text lines.
23034 In this example the space is set to 7
23035 \begin_inset space ~
23041 \begin_layout Begin Multiple Columns
23046 \begin_layout Plain Layout
23057 \begin_layout Plain Layout
23066 This is the sectioning command
23067 \begin_inset Newline newline
23071 \begin_inset Newline newline
23074 with multiple text lines
23078 \begin_layout Plain Layout
23089 \begin_layout Plain Layout
23102 \begin_layout Plain Layout
23112 \begin_layout Standard
23115 On the evening of the crime, he returned from the club exactly at ten.
23116 His mother and sister were out spending the evening with a relation.
23117 The servant deposed that she heard him enter the front room on the second
23118 floor, generally used as his sitting-room.
23119 She had lit a fire there, and as it smoked she had opened the window.
23120 No sound was heard from the room until eleven-twenty, the hour of the return
23121 of Lady Maynooth and her daughter.
23122 Desiring to say good-night, she attempted to enter her son's room.
23123 The door was locked on the inside, and no answer could be got to their
23124 cries and knocking.
23125 Help was obtained, and the door forced.
23126 The unfortunate young man was found lying near the table.
23127 His head had been horribly mutilated by an expanding revolver bullet, but
23128 no weapon of any sort was to be found in the room.
23131 \begin_layout End Multiple Columns
23135 \begin_layout Subsubsection
23139 \begin_layout Standard
23140 The amount of space before and after multiple columns can be changed by
23141 changing the length
23148 For example the command
23151 \begin_layout Standard
23161 \begin_layout Standard
23162 in TeX Code changes its value to 3
23163 \begin_inset space \thinspace{}
23167 The change must be made before the multiple columns' start.
23168 The predefined value is 13
23169 \begin_inset space \thinspace{}
23175 \begin_layout Standard
23183 \begin_inset space \thinspace{}
23189 \begin_layout Standard
23193 \begin_layout Plain Layout
23199 multicolsep}{2.5cm}
23207 \begin_layout Begin Multiple Columns
23211 \begin_layout Standard
23214 All day I turned these facts over in my mind, endeavouring to hit upon some
23215 theory which could reconcile them all, and to find that line of least resistanc
23216 e which my poor friend had declared to be the starting-point of every investigat
23218 I confess that I made little progress.
23219 In the evening I strolled across the Park, and found myself about six o'clock
23220 at the Oxford Street end of Park Lane.
23221 A group of loafers upon the pavements, all staring up at a particular window,
23222 directed me to the house which I had come to see.
23223 A tall, thin man with coloured glasses, whom I strongly suspected of being
23224 a plain-clothes detective, was pointing out some theory of his own, while
23225 the others crowded round to listen to what he said.
23226 I got as near him as I could, but his observations seemed to me to be absurd,
23227 so I withdrew again in some disgust.
23228 As I did so I struck against an elderly, deformed man, who had been behind
23229 me, and I knocked down several books which he was carrying.
23232 \begin_layout End Multiple Columns
23236 \begin_layout Standard
23237 \begin_inset Note Greyedout
23240 \begin_layout Plain Layout
23245 The values you set with
23251 will be used for all following multiple columns until you change them again.
23259 \begin_layout Standard
23263 \begin_layout Plain Layout
23275 \begin_inset Note Note
23278 \begin_layout Plain Layout
23279 go back to the default
23287 \begin_layout Standard
23288 \begin_inset Newpage newpage
23294 \begin_layout Subsubsection
23298 \begin_layout Standard
23299 The width of the columns is automatically calculated, but you can modify
23300 the space between the columns.
23301 This is done by changing the length
23308 Its predefined value is 10
23309 \begin_inset space \thinspace{}
23313 Here is an example where
23320 \begin_inset space \thinspace{}
23326 \begin_layout Standard
23330 \begin_layout Plain Layout
23344 \begin_layout Begin Multiple Columns
23348 \begin_layout Standard
23351 My observations of No.
23352 \begin_inset space \space{}
23355 427 Park Lane did little to clear up the problem in which I was interested.
23356 The house was separated from the street by a low wall and railing, the
23357 whole not more than five feet high.
23358 It was perfectly easy, therefore, for anyone to get into the garden, but
23359 the window was entirely inaccessible, since there was no water pipe or
23360 anything which could help the most active man to climb it.
23361 More puzzled than ever, I retraced my steps to Kensington.
23362 I had not been in my study five minutes when the maid entered to say that
23363 a person desired to see me.
23364 To my astonishment it was none other than my strange old book collector,
23365 his sharp, wizened face peering out from a frame of white hair, and his
23366 precious volumes, a dozen of them at least, wedged under his right arm.
23369 \begin_layout End Multiple Columns
23373 \begin_layout Standard
23377 \begin_layout Plain Layout
23389 \begin_inset Note Note
23392 \begin_layout Plain Layout
23393 go back to the default
23401 \begin_layout Subsubsection
23405 \begin_layout Standard
23406 Between the columns a rule with a width of the length
23413 If this rule width is set to 0
23414 \begin_inset space \thinspace{}
23417 pt (this is the default), the rule is suppressed.
23418 In the following example the line is 2
23419 \begin_inset space \thinspace{}
23425 \begin_layout Standard
23429 \begin_layout Plain Layout
23435 columnseprule}{2pt}
23443 \begin_layout Begin Multiple Columns
23447 \begin_layout Standard
23450 \begin_inset Quotes eld
23453 You're surprised to see me, sir,
23454 \begin_inset Quotes erd
23457 said he, in a strange, croaking voice.
23460 \begin_layout Standard
23463 I acknowledged that I was.
23466 \begin_layout Standard
23469 \begin_inset Quotes eld
23472 Well, I've a conscience, sir, and when I chanced to see you go into this
23473 house, as I came hobbling after you, I thought to myself, I'll just step
23474 in and see that kind gentleman, and tell him that if I was a bit gruff
23475 in my manner there was not any harm meant, and that I am much obliged to
23476 him for picking up my books.
23477 \begin_inset Quotes erd
23483 \begin_layout Standard
23486 \begin_inset Quotes eld
23489 You make too much of a trifle,
23490 \begin_inset Quotes erd
23495 \begin_inset Quotes eld
23498 May I ask how you knew who I was?
23499 \begin_inset Quotes erd
23505 \begin_layout Standard
23508 \begin_inset Quotes eld
23511 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
23512 you'll find my little bookshop at the corner of Church Street, and very
23513 happy to see you, I am sure.
23514 Maybe you collect yourself, sir.
23518 \begin_inset space ~
23531 --a bargain, every one of them.
23532 With five volumes you could just fill that gap on that second shelf.
23533 It looks untidy, does it not, sir?
23534 \begin_inset Quotes erd
23540 \begin_layout End Multiple Columns
23544 \begin_layout Standard
23548 \begin_layout Plain Layout
23554 columnseprule}{0pt}
23560 \begin_inset Note Note
23563 \begin_layout Plain Layout
23564 go back to the default
23572 \begin_layout Standard
23573 \begin_inset Newpage newpage
23579 \begin_layout Section
23580 Non-standard Paragraph Shapes
23583 \begin_layout Standard
23587 \begin_layout Plain Layout
23599 \begin_layout Standard
23603 \begin_layout Plain Layout
23612 \begin_layout Plain Layout
23626 \begin_layout Standard
23631 \begin_layout Plain Layout
23642 \begin_layout Plain Layout
23651 \begin_layout Plain Layout
23660 \begin_layout Plain Layout
23669 \begin_layout Plain Layout
23678 \begin_layout Plain Layout
23687 \begin_layout Plain Layout
23696 \begin_layout Plain Layout
23705 \begin_layout Plain Layout
23714 \begin_layout Plain Layout
23723 \begin_layout Plain Layout
23732 \begin_layout Plain Layout
23741 \begin_layout Plain Layout
23750 \begin_layout Plain Layout
23759 \begin_layout Plain Layout
23768 \begin_layout Plain Layout
23777 \begin_layout Plain Layout
23786 \begin_layout Plain Layout
23795 \begin_layout Plain Layout
23804 \begin_layout Plain Layout
23810 There are times when the tyranny of rectangular paragraphs must be overthrown.
23811 In such situations, a call to the delightful plain TeX command
23818 As you can see, completely arbitrary shapes can be laid out with a suitable
23819 set of line length definitions.
23820 While this parshape may look a bit silly and useless, one could conceive
23821 of situations such as finely tuned dropped capitals, word wrapping around
23822 non-rectangular graphics, etc.
23823 which will benefit from such handcrafting.
23826 \begin_layout Standard
23827 \begin_inset VSpace bigskip
23833 \begin_layout Standard
23838 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23845 is the number of lines of text which define the paragraph.
23846 If there turn out to be fewer lines, the shape is truncated; if there are
23847 more, the excess lines have the same dimensions as the last line of the
23857 entries specify the indentation of the line from the left margin, and the
23858 length of the line as measured from that point.
23859 The shape applies only to the current paragraph; everything is reset to
23860 normal for the next paragraph.
23863 \begin_layout Standard
23867 \begin_layout Plain Layout
23879 \begin_layout Bibliography
23880 \begin_inset CommandInset bibitem
23881 LatexCommand bibitem
23886 Documentation of the LaTeX-package
23887 \begin_inset CommandInset href
23890 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
23895 \begin_inset Index idx
23898 \begin_layout Plain Layout
23899 LaTeX-packages ! multicol