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"
112 \paperorientation portrait
115 \notefontcolor #0000ff
122 \paragraph_separation indent
123 \paragraph_indentation default
124 \quotes_language english
127 \paperpagestyle headings
128 \tracking_changes false
129 \output_changes false
138 Additional LyX Features
141 \begin_layout Subtitle
150 \begin_layout Plain Layout
152 Principal maintainer of this file is
157 If you have comments or error corrections, please send them to the LyX
158 Documentation mailing list,
159 \begin_inset Flex Code
162 \begin_layout Plain Layout
164 <lyx-docs@lists.lyx.org>
177 \begin_layout Standard
178 \begin_inset CommandInset toc
179 LatexCommand tableofcontents
186 \begin_layout Chapter
190 \begin_layout Standard
191 This manual is essentially Part II of the
193 User's Guide\SpecialChar \@.
196 The reason for separating this document out is simple: the
200 is already quite lengthy, and it contains information on all of the basic
201 features one needs to know in order to prepare most documents.
202 However, the LyX Team has worked to make LyX extensible through various
203 configuration files and external packages.
204 That means that if you want to support the Fizzwizzle LaTeX package, you
205 can create a layout file (or module) for it without having to alter LyX
207 We've already had contributions of several new features this way, and some
208 of them are documented here.
209 There are also some more `advanced' features, such as how to control the
210 presentation of bibliographies and how to work with multi-part documents,
211 that are not covered in the
215 and are discussed here.
218 \begin_layout Standard
219 This manual also documents some special features, like fax support, version
220 control, and SGML support, which require additional software to work properly.
221 There is also a chapter on LyX's support for HTML.
222 And lastly, there's a chapter of LaTeX tools and tips, things you can use
223 to spruce up your documents by directly using the powerful features of
229 only WYSIWYM and will only ever interface to some, not all, LaTeX features.
232 \begin_layout Standard
233 If you haven't read the
237 yet, you are definitely in the wrong manual.
242 is the first place to go, since it describes the notation and format of
244 You should also be thoroughly familiar with the
248 and all of the basic features of LyX before attempting to read this one.
251 \begin_layout Standard
252 Since many of the topics in this manual depend heavily on LyX's interaction
253 with LaTeX, this first chapter covers the inner workings of LyX and how
254 to direct LyX to generate exactly the LaTeX code you want.
255 It is obviously for more seasoned LyX users.
258 \begin_layout Chapter
262 \begin_layout Section
266 \begin_layout Standard
267 This chapter is for both TeX-nicians and the LaTeX-curious.
268 In it, we'll explain how LyX and LaTeX work together to produce printable
270 This is the only place in any of the manuals where we assume you know something
274 \begin_layout Standard
275 At one time, LyX was called a
276 \begin_inset Quotes eld
279 WYSIWYM frontend to LaTeX,
280 \begin_inset Quotes erd
283 but that's no longer true.
284 There are frontends to LaTeX out there.
288 \begin_layout Plain Layout
289 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
290 There are also the LaTeX modes for vi and emacs, of course.
295 These are basically text editors with the ability to run LaTeX and mark
296 any errors in the file you're editing.
305 run LaTeX, and it also indicates errors in the file, it also does much,
307 For one thing, you don't need to know LaTeX to use LyX effectively.
308 And LyX has added its own extensions to LaTeX.
309 Try the following sometime: select
310 \begin_inset Flex MenuItem
313 \begin_layout Plain Layout
314 Export\SpecialChar \menuseparator
321 \begin_inset Flex MenuItem
324 \begin_layout Plain Layout
331 \begin_inset Flex MenuItem
334 \begin_layout Plain Layout
335 View\SpecialChar \menuseparator
341 ), then look at the preamble of the resulting
342 \begin_inset Flex Code
345 \begin_layout Plain Layout
352 You'll notice a variety of new macros defined specifically by LyX.
353 These macros are defined automatically, according to the features you use
357 \begin_layout Standard
358 There are several commands that automatically invoke LaTeX.
362 \begin_layout Itemize
363 \begin_inset Flex MenuItem
366 \begin_layout Plain Layout
367 View\SpecialChar \menuseparator
376 \begin_layout Itemize
377 \begin_inset Flex MenuItem
380 \begin_layout Plain Layout
381 View\SpecialChar \menuseparator
390 \begin_layout Itemize
391 \begin_inset Flex MenuItem
394 \begin_layout Plain Layout
395 File\SpecialChar \menuseparator
404 \begin_layout Itemize
405 \begin_inset Flex MenuItem
408 \begin_layout Plain Layout
409 File\SpecialChar \menuseparator
418 \begin_layout Standard
419 They will only invoke LaTeX if the file has changed since the last time
424 \begin_layout Standard
425 When LyX runs LaTeX on the file you're editing, it performs these steps:
428 \begin_layout Enumerate
429 Convert the document to LaTeX and save to a file with the extension
430 \begin_inset Flex Code
433 \begin_layout Plain Layout
440 \begin_inset Flex Code
443 \begin_layout Plain Layout
452 \begin_layout Enumerate
454 \begin_inset Flex Code
457 \begin_layout Plain Layout
463 file (maybe several times), and run any other commands (such as
464 \begin_inset Flex Code
467 \begin_layout Plain Layout
474 \begin_inset Flex Code
477 \begin_layout Plain Layout
483 ) needed to compile the LaTeX file.
486 \begin_layout Enumerate
487 If there are any errors, show the error log.
490 \begin_layout Standard
491 If you have run LaTeX using
492 \begin_inset Flex MenuItem
495 \begin_layout Plain Layout
498 \SpecialChar \menuseparator
506 , LyX then runs a DVI viewer to display the DVI-file.
508 \begin_inset Flex MenuItem
511 \begin_layout Plain Layout
514 \SpecialChar \menuseparator
522 , LyX performs further steps:
525 \begin_layout Itemize
527 \begin_inset Flex Code
530 \begin_layout Plain Layout
536 to convert the DVI file to PostScript.
539 \begin_layout Itemize
540 Run a PostScript viewer, such as
541 \begin_inset Flex Code
544 \begin_layout Plain Layout
550 , to display the PostScript file.
553 \begin_layout Standard
554 LyX does similar things when viewing, or exporting, other formats.
557 \begin_layout Section
558 Translating LaTeX files into LyX
561 \begin_layout Standard
562 You can import a LaTeX file into LyX by using the
563 \begin_inset Flex MenuItem
566 \begin_layout Plain Layout
567 File\SpecialChar \menuseparator
568 Import\SpecialChar \menuseparator
575 This will call a program named
576 \begin_inset Flex Code
579 \begin_layout Plain Layout
585 which will create a file
586 \begin_inset Flex Code
589 \begin_layout Plain Layout
596 \begin_inset Flex Code
599 \begin_layout Plain Layout
606 LyX will then open that file.
610 \begin_layout Plain Layout
611 \begin_inset Flex Code
614 \begin_layout Plain Layout
620 can also be run from the command line, of course.
628 \begin_layout Standard
629 \begin_inset Flex Code
632 \begin_layout Plain Layout
638 will translate most legal LaTeX, but not everything.
639 It will put things it doesn't understand into TeX code, so after translating
641 \begin_inset Flex Code
644 \begin_layout Plain Layout
650 , you can look for TeX code and hand-edit it until it looks right.
653 \begin_layout Standard
654 If you don't know what TeX code is, read the next section.
657 \begin_layout Section
658 \begin_inset CommandInset label
660 name "sec:Inserting-TeX-Code"
664 Inserting TeX Code into LyX Documents
667 \begin_layout Standard
668 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
669 You can always insert TeX code into any LyX document.
670 LyX cannot, and will never be able to, display every possible LaTeX construct.
671 If ever you need to insert LaTeX commands into your LyX document, you can
673 \begin_inset Flex Code
676 \begin_layout Plain Layout
682 box, which you can insert into your document with
683 \begin_inset Flex MenuItem
686 \begin_layout Plain Layout
687 Insert\SpecialChar \menuseparator
696 \begin_layout Standard
697 Here's an example of inserting LaTeX commands in a LyX document.
698 The code looks like this:
701 \begin_layout LyX-Code
705 \begin_inset Newline newline
711 \begin_inset Newline newline
714 This is an example for a minipage environment.
716 \begin_inset Newline newline
719 can put nearly everything in it, even (non-floating)
720 \begin_inset Newline newline
725 \begin_inset Newline newline
731 \begin_inset Newline newline
735 \begin_inset Newline newline
741 \begin_inset Newline newline
747 \begin_inset Newline newline
753 \begin_inset Newline newline
758 \begin_inset Newline newline
764 \begin_inset Newline newline
770 \begin_inset Newline newline
776 \begin_inset Newline newline
784 \begin_layout LyX-Code
788 \begin_layout Standard
790 \begin_inset Flex Code
793 \begin_layout Plain Layout
799 box containing this text is directly after this paragraph.
800 Those of you reading the manual in LyX will only see the TeX code inset.
801 Those reading a printed version of the manuals will see the actual results:
804 \begin_layout Standard
808 \begin_layout Plain Layout
815 \begin_layout Plain Layout
822 \begin_layout Plain Layout
824 This is an example for a minipage environment.
825 You can put nearly everything in it, even (non-floating) figures and tables.
829 \begin_layout Plain Layout
836 \begin_layout Plain Layout
841 \begin_layout Plain Layout
848 \begin_layout Plain Layout
855 \begin_layout Plain Layout
862 \begin_layout Plain Layout
868 \begin_layout Plain Layout
875 \begin_layout Plain Layout
882 \begin_layout Plain Layout
889 \begin_layout Plain Layout
901 \begin_layout Standard
902 In addition to using TeX code, you can also create a separate file containing
903 some complex LaTeX structure and then use
904 \begin_inset Flex MenuItem
907 \begin_layout Plain Layout
908 Insert\SpecialChar \menuseparator
918 to include your file (you should select the type
919 \begin_inset Flex Code
922 \begin_layout Plain Layout
929 We recommend that you only do this if you have a
930 \begin_inset Flex Code
933 \begin_layout Plain Layout
944 Otherwise, you'll have a big job tracking down LaTeX errors.
947 \begin_layout Standard
948 There are a few last points to emphasize:
951 \begin_layout Itemize
956 check if your LaTeX code is correct.
959 \begin_layout Itemize
960 Beware reinventing the wheel.
963 \begin_layout Standard
964 On that last point, LyX does have quite a few features tucked into it, and
966 Be sure to check the manuals to make sure that LyX doesn't have such-and-such
967 feature before you decide you have to do it by hand.
968 Moreover, there are numerous LaTeX packages out there to do all sorts of
969 things, from labels to envelopes to fancy multipage tables.
971 \begin_inset CommandInset href
974 target "http://www.ctan.org/"
981 \begin_layout Standard
982 If you do need to do some wild and fancy things within your document, be
983 sure to check out a good LaTeX book for assistance.
984 There are a number of them listed in the bibliography of the
991 \begin_layout Section
992 LyX and the LaTeX Preamble
995 \begin_layout Subsection
996 About the LaTeX Preamble
999 \begin_layout Standard
1000 If you already know LaTeX, there is no need to explain here what the preamble
1002 If you don't, the following will give you some ideas—we recommend again
1003 that you consult a LaTeX book for further information.
1004 In any case, you should read the points below, because they explain what
1005 you can do and what you don't need to do in the LaTeX preamble of a LyX
1009 \begin_layout Standard
1010 The LaTeX preamble comes at the very beginning of a document,
1018 \begin_layout Itemize
1019 Declare the document class.
1021 \begin_inset Newline newline
1024 LyX already does this for you.
1025 If you're a seasoned LaTeX-nician, and you have a custom document class
1026 you want to use, check out the
1028 Customization Manual
1030 for information on how to make LyX interface to it.
1033 \begin_layout Itemize
1034 Declare the usage of packages.
1036 \begin_inset Newline newline
1039 LaTeX packages provide special commands, which are only available within
1040 a document when the package has been declared in the preamble.
1041 For example, the package
1042 \begin_inset Flex Code
1045 \begin_layout Plain Layout
1051 forces all paragraphs to be indented.
1052 There are other packages for labels, envelopes, margins, etc.
1056 \begin_layout Itemize
1057 Set counters, variables, lengths and widths.
1059 \begin_inset Newline newline
1062 There are several LaTeX counters and variables which
1066 be set globally from within the preamble in order to have the desired effect.
1067 (There are variables which you can set and reset inside the document, too.)
1068 Margins are a good example of something which must be set in the preamble.
1069 Another example is the label format for lists.
1070 You can actually set these just about anywhere, but it's best to do it
1071 just once, inside the preamble.
1074 \begin_layout Itemize
1075 Declare user defined commands (with
1076 \begin_inset Flex Code
1079 \begin_layout Plain Layout
1088 \begin_inset Flex Code
1091 \begin_layout Plain Layout
1100 \begin_inset Newline newline
1103 These are abbreviations for LaTeX commands which appear very often inside
1105 Although the preamble is a good place to declare such commands, they
1109 be declared anywhere (before they are used for the first time, of course).
1110 This can be useful if there is a lot of raw LaTeX code in your document,
1111 which normally should not be the case.
1114 \begin_layout Standard
1115 LyX adds its own set of definitions to the preamble of the
1116 \begin_inset Flex Code
1119 \begin_layout Plain Layout
1126 This makes LaTeX files generated by LyX portable.
1129 \begin_layout Subsection
1130 Changing the Preamble
1133 \begin_layout Standard
1134 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1135 can't change them without patching LyX itself.
1136 You can, however, add your own stuff to the preamble by selecting
1137 \begin_inset Flex MenuItem
1140 \begin_layout Plain Layout
1142 \begin_inset space ~
1151 \begin_inset Flex MenuItem
1154 \begin_layout Plain Layout
1155 Document\SpecialChar \menuseparator
1162 LyX adds anything in the
1163 \begin_inset Flex MenuItem
1166 \begin_layout Plain Layout
1172 dialog to its own built-in preamble.
1173 Before adding your own declarations in the preamble, you should make sure
1174 that LyX doesn't already support what you want to do.
1175 (Remember what we said about reinventing the wheel?) Also,
1177 make sure your preamble code is correct
1180 LyX doesn't check it for you.
1181 If there is an error, you're likely to get an error like
1182 \begin_inset Quotes eld
1186 \begin_inset Flex Code
1189 \begin_layout Plain Layout
1198 \begin_inset Quotes erd
1202 If you see this error, check your preamble.
1205 \begin_layout Subsection
1209 \begin_layout Standard
1210 Here are some examples of what you can add to a preamble, and what they
1214 \begin_layout Subsubsection
1218 \begin_layout Standard
1219 There are two variables under LaTeX that control page position:
1220 \begin_inset Flex Code
1223 \begin_layout Plain Layout
1232 \begin_inset Flex Code
1235 \begin_layout Plain Layout
1244 Their names should be self-explanatory.
1245 These variables are useful if you think for a moment about computer labels.
1246 Sometimes, the size of a print medium and the area of the medium that you
1247 can actually print on aren't the same.
1249 \begin_inset Flex Code
1252 \begin_layout Plain Layout
1261 \begin_inset Flex Code
1264 \begin_layout Plain Layout
1275 \begin_layout Standard
1276 The default values for
1277 \begin_inset Flex Code
1280 \begin_layout Plain Layout
1289 \begin_inset Flex Code
1292 \begin_layout Plain Layout
1301 \begin_inset space \thinspace{}
1305 \begin_inset space \thinspace{}
1309 \begin_inset space \space{}
1312 the page isn't shifted.
1313 Unfortunately, some DVI drivers always seem to shift the page.
1314 We have no idea why, or why the sysadmin hasn't fixed such behavior.
1315 If you're using LyX on a system that you don't personally maintain, and
1316 your sysadmin is a doofus,
1317 \begin_inset Flex Code
1320 \begin_layout Plain Layout
1329 \begin_inset Flex Code
1332 \begin_layout Plain Layout
1341 Suppose your left and top margins are always 0.5
1342 \begin_inset space \thinspace{}
1346 You can add this to the preamble:
1349 \begin_layout LyX-Code
1357 \begin_layout LyX-Code
1365 \begin_layout Standard
1366 and your margins should now be correct.
1369 \begin_layout Subsubsection
1373 \begin_layout Standard
1374 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1375 There's a rather nice package, available at your nearest CTAN archive,
1376 for printing sheets of labels:
1377 \begin_inset Flex Code
1380 \begin_layout Plain Layout
1387 Now, your system may not have this package installed by default.
1388 We leave that up to you to check.
1389 You'll also want to read the documentation for it; we're not going to do
1391 Since this is an example, however, we'll give you an example of how you
1395 \begin_layout Standard
1396 First, make sure you're using the
1397 \begin_inset Flex Code
1400 \begin_layout Plain Layout
1407 Next, you need to put the following in your preamble:
1410 \begin_layout LyX-Code
1416 \begin_layout LyX-Code
1422 \begin_layout LyX-Code
1428 \begin_layout LyX-Code
1434 \begin_layout LyX-Code
1440 \begin_layout LyX-Code
1446 \begin_layout LyX-Code
1452 \begin_layout Standard
1453 This sets things up for Avery label sheets, stock #5360.
1454 You're now ready to print labels, but you'll need to insert LaTeX code,
1455 placing the commands
1456 \begin_inset Flex Code
1459 \begin_layout Plain Layout
1468 \begin_inset Flex Code
1471 \begin_layout Plain Layout
1479 around each label text.
1480 This and other special features of
1481 \begin_inset Flex Code
1484 \begin_layout Plain Layout
1490 are explained in its documentation.
1493 \begin_layout Standard
1494 Someday, someone may write a LyX layout file to support this package directly.
1495 Maybe that someone is you.
1498 \begin_layout Subsubsection
1499 Example #3: Paragraph Indentation
1502 \begin_layout Standard
1503 Americans are trained to indent the first line of
1508 As with all of their other weird quirks, most Americans will whine and
1509 moan until they can have their way and indent the first line of all paragraphs.
1518 \begin_layout Standard
1519 Of course, this behavior isn't standard typography.
1520 In books, you typically only indent the first line of a paragraph
1524 it follows another one.
1525 The idea behind indenting the first line of a paragraph is to distinguish
1526 neighboring paragraphs from one another.
1527 If there is no previous paragraph—for example, if it follows a figure or
1528 is the first paragraph in a section—then there is no need for indentation.
1532 \begin_layout Standard
1533 If you're a typical American (we're still joking!), though, you don't care
1534 about such esoteric things; you want your indentation! Add this to the
1538 \begin_layout LyX-Code
1541 usepackage{indentfirst}
1544 \begin_layout Standard
1545 If your TeX distribution isn't braindead, you'll have this package, and
1546 all of your paragraphs will get the indentation the Founding Fathers intended
1550 \begin_layout Subsubsection
1551 Example #4: This Document
1554 \begin_layout Standard
1555 You can also check out the preamble of this document to get an idea of some
1556 of the advanced things you can do.
1559 \begin_layout Section
1560 LyX and LaTeX Errors
1563 \begin_layout Standard
1564 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1566 It then uses the logfile from the LaTeX run to do a post-mortem.
1567 After analyzing the logfile,LyX displays a dialog listing the errors.
1568 Clicking on any one of them will take you to the position in your LyX file
1569 where the error occurred.
1573 \begin_layout Plain Layout
1575 Analyzing the logfile is a tough job, and LyX doesn't always go to the
1577 There are also cases where LaTeX reports the error on one line, but the
1578 actual error is earlier.
1579 This is not unlike forgetting a closing brace in a program: You'll get
1580 an error, but only later.
1588 \begin_layout Standard
1589 Some folks also like to look at the log file directly: It is available from
1591 \begin_inset Flex MenuItem
1594 \begin_layout Plain Layout
1597 \SpecialChar \menuseparator
1601 \begin_inset space ~
1610 There are some fairly common error messages and warnings.
1611 We'll cover those here.
1612 You should look at a good LaTeX book for a complete listing.
1615 \begin_layout Itemize
1616 \begin_inset Flex Code
1619 \begin_layout Plain Layout
1626 \begin_inset Newline newline
1629 Anything beginning with these words is a warning message for the purpose
1631 \begin_inset Quotes eld
1635 \begin_inset Quotes erd
1638 the LaTeX code itself.
1639 You'll get messages like this if you added or changed cross-references
1640 or bibliography entries, in which case, LaTeX is trying to tell you that
1641 you need to make another run.
1642 You can by-and-large ignore these.
1645 \begin_layout Itemize
1646 \begin_inset Flex Code
1649 \begin_layout Plain Layout
1656 \begin_inset Newline newline
1659 Another warning message, this time about fonts which LaTeX couldn't find.
1660 The rest of the message will often say something about a replacement font
1662 You can safely ignore these, too.
1665 \begin_layout Itemize
1666 \begin_inset Flex Code
1669 \begin_layout Plain Layout
1678 \begin_inset Newline newline
1686 They are warnings about lines that were too long and run past the right
1688 Almost always, this is unnoticeable in the final output.
1689 (It can be just a point or two.) Or, only one or two characters extend past
1691 LaTeX seems to generate at least one of these messages for just about any
1693 \begin_inset Newline newline
1696 You can ignore these messages.
1697 Your eyes will tell you if there's a problem with something that's too
1698 wide; just look at the output.
1702 \begin_layout Plain Layout
1703 You can also enable the `draft' option in
1704 \begin_inset Flex MenuItem
1707 \begin_layout Plain Layout
1710 \SpecialChar \menuseparator
1718 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1726 \begin_layout Itemize
1727 \begin_inset Flex Code
1730 \begin_layout Plain Layout
1739 \begin_inset Newline newline
1742 Not quite as common as its cousin.
1743 LaTeX seems to like to print lines that are a bit too wide as opposed to
1744 ones that are a bit too narrow.
1745 We have no idea why.
1748 \begin_layout Itemize
1749 \begin_inset Flex Code
1752 \begin_layout Plain Layout
1761 \begin_inset Flex Code
1764 \begin_layout Plain Layout
1773 \begin_inset Newline newline
1776 Warnings about troubles breaking the page.
1777 Once again, just look at the output.
1778 Your eyes will tell you where something has gone wrong.
1781 \begin_layout Itemize
1782 \begin_inset Flex Code
1785 \begin_layout Plain Layout
1787 \begin_inset Quotes els
1791 \begin_inset Quotes ers
1800 \begin_inset Newline newline
1804 \begin_inset Quotes eld
1808 \begin_inset Quotes erd
1811 isn't installed on this system.
1812 This usually appears because some package your document needs isn't installed.
1813 If you didn't touch the preamble or didn't use the
1814 \begin_inset Flex Code
1817 \begin_layout Plain Layout
1825 command, then one of the packages LyX tried to load is missing.
1827 \begin_inset Flex MenuItem
1830 \begin_layout Plain Layout
1831 Help\SpecialChar \menuseparator
1837 to get a list of packages that LyX knows about.
1838 This file is updated whenever you reconfigure LyX (using
1839 \begin_inset Flex MenuItem
1842 \begin_layout Plain Layout
1843 Tools\SpecialChar \menuseparator
1849 ) and tells you which packages have been detected and what they do.
1850 \begin_inset Newline newline
1854 \begin_inset Flex Code
1857 \begin_layout Plain Layout
1865 command and the package in question isn't installed, then you'll need to
1866 install it yourself.
1869 \begin_layout Itemize
1870 \begin_inset Flex Code
1873 \begin_layout Plain Layout
1874 LaTeX Error: Unknown option
1880 \begin_inset Newline newline
1883 Error messages beginning with this are trying to tell you that you specified
1884 a bad or undefined option to a package.
1885 Check the package's documentation.
1888 \begin_layout Itemize
1889 \begin_inset Flex Code
1892 \begin_layout Plain Layout
1893 Undefined control sequence
1899 \begin_inset Newline newline
1902 If you've inserted LaTeX code into your document, but made a typo, you'll
1904 You may have forgotten to load a package.
1905 In any case, this error message usually means that you used an undefined
1910 \begin_layout Standard
1911 There are other error and warning messages.
1912 Some are self-explanatory.
1913 These are usually LaTeX messages.
1914 Others are downright cryptic.
1915 These are usually TeX error messages, and we really have
1919 what they mean or how to decipher them.
1923 \begin_layout Standard
1924 There's a general sequence you should follow if you get error messages:
1927 \begin_layout Enumerate
1928 Look at the LaTeX code you inserted for typos.
1931 \begin_layout Enumerate
1932 If there are no typos, check that you used the command(s) correctly.
1935 \begin_layout Enumerate
1936 If you get a bunch of error boxes piled up at the very top of the document—and
1937 especially if you see a
1938 \begin_inset Quotes eld
1942 \begin_inset Flex Code
1945 \begin_layout Plain Layout
1954 \begin_inset Quotes erd
1957 error—it means that there are errors in the preamble.
1958 Start debugging your preamble.
1961 \begin_layout Enumerate
1962 If you didn't add anything to the preamble and didn't add any LaTeX code
1963 to the document, the first suspect is your LaTeX distribution itself.
1964 Check for missing packages and install them.
1967 \begin_layout Enumerate
1968 Okay, so there are no missing packages.
1969 Did you use any of the fine-tuning options in LyX? Specifically, did you
1974 any of them, like trying to manually insert lots of
1975 \begin_inset Flex Code
1978 \begin_layout Plain Layout
1980 \begin_inset space ~
1989 \begin_inset Flex Code
1992 \begin_layout Plain Layout
1999 \begin_inset Flex Code
2002 \begin_layout Plain Layout
2008 ? Did you try to kludge something together with these instead of using the
2009 appropriate paragraph environment?
2012 \begin_layout Enumerate
2013 All right, you didn't use any of the fine-tuning options, you played by
2015 Did you try to pull a fancy maneuver? Did you do something funky inside
2016 a table or an equation, like inserting a graphic into a table cell?
2019 \begin_layout Enumerate
2020 Do you have long sections of text where LaTeX cannot find a place to break
2021 a line? By default, LaTeX is rather strict about how much extra inter-word
2022 spacing it will add in order to break a line.
2023 Preferably, you should rework the paragraph to avoid the problem.
2024 If this isn't an option, you can wrap your text in
2025 \begin_inset Flex Code
2028 \begin_layout Plain Layout
2036 to make LaTeX's line breaking more, well, sloppy.
2039 \begin_layout Enumerate
2040 Did you go overboard with the nesting? LyX (currently) doesn't check to
2041 make sure you're in the limits for nesting environments.
2042 If you nested a bunch of environments to the
2043 \begin_inset Formula $17^{\mathrm{th}}$
2046 level, that's the problem.
2047 (The limit in LaTeX is five.)
2050 \begin_layout Enumerate
2051 Okay, you didn't get any error messages, but your output looks awful.
2052 If you have a table or figure that's too wide or long for the page, you
2057 \begin_layout Enumerate
2058 rescale the figure so it fits.
2061 \begin_layout Enumerate
2062 trim down the table so it fits.
2066 \begin_layout Enumerate
2067 If something else is wrong with the output, and you didn't try to pull anything
2068 fancy or kludge the fine-tuning options, we're not sure what's wrong.
2071 \begin_layout Standard
2072 If all this doesn't help—well, then
2076 you might have found a bug in LyX\SpecialChar \ldots{}
2080 \begin_layout Chapter
2084 \begin_layout Section
2085 Customizing Bibliographies with BibTeX
2088 \begin_layout Standard
2089 The most basic information about how to use BibTeX with LyX is contained
2092 Bibliography databases (BibTeX)
2099 The following subsections explain special bibliography features supported
2103 \begin_layout Subsection
2104 Alternative Citation Styles
2107 \begin_layout Standard
2108 Standard BibTeX uses numbers (e.
2109 \begin_inset space \thinspace{}
2113 \begin_inset space \space{}
2117 \begin_inset Quotes eld
2121 \begin_inset Quotes erd
2124 ) to refer to a cited work.
2125 However, in many scientific disciplines, other citation styles are in use.
2126 The most common one is the author-year style (e.
2127 \begin_inset space \thinspace{}
2131 \begin_inset space \space{}
2135 \begin_inset Quotes eld
2139 \begin_inset Quotes erd
2143 LyX supports two packages that provide this style,
2144 \begin_inset Flex Code
2147 \begin_layout Plain Layout
2154 \begin_inset Flex Code
2157 \begin_layout Plain Layout
2164 Both packages have their pros and cons, which cannot be listed in detail.
2165 If you only want to have simple author-year (or author-numerical) style,
2166 or if you want to use one of the countless style files for
2167 \begin_inset Flex Code
2170 \begin_layout Plain Layout
2176 , than the established
2177 \begin_inset Flex Code
2180 \begin_layout Plain Layout
2186 package is probably your choice.
2187 If you need special features like short title references, ibidem etc., you
2189 \begin_inset Flex Code
2192 \begin_layout Plain Layout
2201 \begin_layout Standard
2202 The handling of both packages in LyX is basically the same.
2204 \begin_inset Flex MenuItem
2207 \begin_layout Plain Layout
2208 Document\SpecialChar \menuseparator
2215 \begin_inset Flex MenuItem
2218 \begin_layout Plain Layout
2225 \begin_inset Flex MenuItem
2228 \begin_layout Plain Layout
2235 \begin_inset Flex MenuItem
2238 \begin_layout Plain Layout
2245 With both packages, you will get some extra features in the citation dialog
2246 and you can select the style of the reference (
2247 \begin_inset Quotes eld
2251 \begin_inset Quotes erd
2255 \begin_inset Quotes eld
2259 \begin_inset Quotes erd
2263 \begin_inset Quotes eld
2267 \begin_inset Quotes erd
2271 \begin_inset Quotes eld
2275 \begin_inset Quotes erd
2279 Note that both packages need specifically designed style files.
2280 They both ship their own, but there are lots of additional style files,
2281 and there is even an interactive style file builder
2285 \begin_layout Plain Layout
2287 \begin_inset Flex URL
2290 \begin_layout Plain Layout
2292 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2303 \begin_inset Flex Code
2306 \begin_layout Plain Layout
2315 \begin_layout Subsection
2316 Sectioned Bibliographies
2319 \begin_layout Standard
2320 Sometimes you might need to divide your bibliography into several sections.
2321 If you are for instance a historian, the possibility to separate sources
2322 and scientific works is most likely a
2323 \begin_inset Quotes eld
2327 \begin_inset Quotes erd
2331 Unfortunately, BibTeX itself does not allow you to do this.
2332 But with the help of some LaTeX packages, BibTeX can be extended to fit
2336 \begin_layout Standard
2337 LyX provides native support for one of these packages,
2345 \begin_layout Plain Layout
2347 \begin_inset Flex URL
2350 \begin_layout Plain Layout
2352 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2362 The advantage of this package (compared to other packages like
2366 ) is that you don't need to define new citation commands.
2367 Instead, you need to prepare different bibliographic databases which include
2368 the entries for the different sections of the bibliography.
2369 For example: If you want to divide your bibliography into the sections
2371 \begin_inset Quotes eld
2375 \begin_inset Quotes erd
2379 \begin_inset Quotes eld
2383 \begin_inset Quotes erd
2386 , you first need to create two bibliographic databases, e.
2387 \begin_inset space \thinspace{}
2391 \begin_inset space \space{}
2395 \begin_inset Flex Code
2398 \begin_layout Plain Layout
2405 \begin_inset Flex Code
2408 \begin_layout Plain Layout
2418 \begin_layout Standard
2420 \begin_inset Flex MenuItem
2423 \begin_layout Plain Layout
2424 Document\SpecialChar \menuseparator
2431 \begin_inset Flex MenuItem
2434 \begin_layout Plain Layout
2441 \begin_inset Flex MenuItem
2444 \begin_layout Plain Layout
2445 Sectioned bibliography
2451 Now you can insert multiple BibTeX bibliographies, one for each section
2452 of your bibliography.
2453 Returning to our example: Insert the BibTeX bibliography
2454 \begin_inset Flex Code
2457 \begin_layout Plain Layout
2463 and a second one for the database
2464 \begin_inset Flex Code
2467 \begin_layout Plain Layout
2474 You are free to use the same or different styles for each section.
2475 Additionally, you can chose if the bibliography section should contain
2477 \begin_inset Quotes eld
2480 all cited references
2481 \begin_inset Quotes erd
2484 of the specified database(s) (which is the default),
2485 \begin_inset Quotes eld
2488 all uncited references
2489 \begin_inset Quotes erd
2493 \begin_inset Quotes eld
2497 \begin_inset Quotes erd
2501 This might be useful if you would like to separate your bibliography into
2503 \begin_inset Quotes eld
2507 \begin_inset Quotes erd
2511 \begin_inset Quotes eld
2515 \begin_inset Quotes erd
2519 \begin_inset Quotes eld
2523 \begin_inset Quotes erd
2527 The titles for the sections can be added as ordinary sections or subsections.
2529 \begin_inset Flex Code
2532 \begin_layout Plain Layout
2538 removes the bibliography title, you have manually re-add that, too (as
2539 a chapter* or section*, for instance).
2542 \begin_layout Subsection
2543 Multiple Bibliographies
2546 \begin_layout Standard
2547 Multiple bibliographies, e.
2548 \begin_inset space \thinspace{}
2552 \begin_inset space \space{}
2555 a bibliography for each section or chapter of the document, are not supported
2558 \begin_inset Flex Code
2561 \begin_layout Plain Layout
2567 package, which is used for the creation of sectioned bibliographies in
2568 LyX (see the previous section), provides an easy way to solve this task,
2569 if you are willing to use some
2570 \begin_inset Flex MenuItem
2573 \begin_layout Plain Layout
2580 \begin_inset space ~
2584 \begin_inset CommandInset ref
2586 reference "sec:Inserting-TeX-Code"
2594 \begin_layout Plain Layout
2595 An alternative approach is to use the
2596 \begin_inset Flex Code
2599 \begin_layout Plain Layout
2606 \begin_inset Flex Code
2609 \begin_layout Plain Layout
2615 package, respectively.
2623 \begin_layout Standard
2625 \begin_inset Flex MenuItem
2628 \begin_layout Plain Layout
2629 Document\SpecialChar \menuseparator
2636 \begin_inset Flex MenuItem
2639 \begin_layout Plain Layout
2646 \begin_inset Flex MenuItem
2649 \begin_layout Plain Layout
2650 Sectioned bibliography
2656 In the document, you have to enclose the sections, which shall contain
2657 their own bibliography (including the BibTeX bibliography itself), between
2659 \begin_inset Flex Code
2662 \begin_layout Plain Layout
2671 \begin_inset Flex Code
2674 \begin_layout Plain Layout
2682 (those commands have to be inserted as TeX code).
2683 The bibliography will contain all references which have been cited in the
2685 \begin_inset Flex Code
2688 \begin_layout Plain Layout
2699 If you are using this approach, then every citation reference has to be
2701 \begin_inset Flex Code
2704 \begin_layout Plain Layout
2712 \begin_inset Flex Code
2715 \begin_layout Plain Layout
2724 \begin_layout Section
2728 \begin_layout Subsection
2732 \begin_layout Standard
2733 When you are working on a large file with many sections, it is often convenient
2734 to break up the document into several files, or perhaps you have something
2735 where a table may change from time to time, but the preceding text does
2737 In these cases, you should seriously consider using multipart documents.
2738 For example, scientific papers often have five major sections: the introduction
2739 , observations, results, discussion, and conclusion.
2740 Each of these could be its own separate LyX file, with one
2741 \begin_inset Quotes eld
2745 \begin_inset Quotes erd
2748 file which contains the title, authors, abstract, references, etc., plus
2749 the five included files.
2750 It is important to note that each of these files is a full LyX file which
2751 can be formatted and printed on its own, as well as included in a master
2753 Each of these files must have the same document class, however—don't attempt
2754 to mix book classes with article classes.
2755 You may also include LaTeX files; however, these files must not have their
2757 \begin_inset space \thinspace{}
2761 \begin_inset space \space{}
2764 everything up to and including the
2765 \begin_inset Flex Code
2768 \begin_layout Plain Layout
2777 \begin_inset Flex Code
2780 \begin_layout Plain Layout
2788 line must be deleted) or else errors will be generated when you try to
2792 \begin_layout Standard
2793 LyX allows you to include files quite easily with
2794 \begin_inset Flex MenuItem
2797 \begin_layout Plain Layout
2798 Insert\SpecialChar \menuseparator
2800 \begin_inset space ~
2809 When you click on this selection a small box is inserted into the file
2810 at the current cursor location.
2811 Clicking on the box raises a dialog which allows you to select the file
2812 to be included, and the method of its inclusion.
2816 \begin_layout Standard
2817 The file selection box should by now be obvious.
2818 The three inclusion methods are
2819 \begin_inset Quotes eld
2823 \begin_inset Quotes erd
2827 \begin_inset Quotes eld
2831 \begin_inset Quotes erd
2835 \begin_inset Quotes eld
2839 \begin_inset Quotes erd
2843 The difference between
2844 \begin_inset Quotes eld
2848 \begin_inset Quotes erd
2852 \begin_inset Quotes eld
2856 \begin_inset Quotes erd
2859 is really only meaningful to LaTeXperts, but the practical difference is
2860 that files which are
2861 \begin_inset Quotes eld
2865 \begin_inset Quotes erd
2868 are typeset beginning on a new page, while files which are
2869 \begin_inset Quotes eld
2873 \begin_inset Quotes erd
2876 are typeset starting on the current page.
2879 \begin_layout Standard
2880 Generally, the master file is converted into a full LaTeX file before typesettin
2881 g, while the included files are converted to LaTeX files which do not have
2882 all the preamble information.
2885 \begin_layout Standard
2887 \begin_inset Quotes eld
2891 \begin_inset Quotes erd
2894 included file allows you to include a file typeset exactly as it appears
2896 \begin_inset space \thinspace{}
2900 \begin_inset space \space{}
2904 \begin_inset Flex Code
2907 \begin_layout Plain Layout
2913 mode, with the characters set in a fixed-width typewriter font.
2914 Normally, spaces in this file are invisible, though two consecutive spaces
2915 are conserved, unlike LyX's normal treatment of spaces.
2916 However, setting the
2917 \begin_inset Flex MenuItem
2920 \begin_layout Plain Layout
2922 \begin_inset space ~
2926 \begin_inset space ~
2930 \begin_inset space ~
2938 checkbox typesets a mark to unambiguously define the presence of a space.
2942 \begin_layout Subsection
2943 Cross-References Between Files
2946 \begin_layout Standard
2947 \begin_inset Box Shadowbox
2957 height_special "totalheight"
2960 \begin_layout Plain Layout
2961 This section is somewhat out of date.
2962 Need to describe default master documents and how children are opened when
2972 \begin_layout Standard
2973 It is possible to set up cross-references between the different files.
2974 First, open all the files in question: let's call them A and B in a two
2975 file example, where B is included in A.
2976 Let's say you insert a label in A, then want to reference it in B.
2977 Open the cross-reference dialog in whilst in document B, and you can select
2979 \begin_inset Quotes eld
2983 \begin_inset Quotes erd
2989 \begin_layout Subsection
2990 Bibliography Lists in all Subdocuments
2993 \begin_layout Standard
2994 \begin_inset Box Frameless
3004 height_special "totalheight"
3007 \begin_layout Plain Layout
3008 This section also needs updating.
3009 There is now material about this on the wiki, and it could be copied here.
3017 \begin_layout Standard
3018 Copy the bibliography list with all entries to all subdocuments and transform
3020 This way LyX will find the
3021 \begin_inset Flex Code
3024 \begin_layout Plain Layout
3030 -files and you can easily insert references without making the bibliography
3034 \begin_layout Standard
3035 As the bibliography list is in a comment, LaTeX won't use use it and the
3036 references will look like this: [?], instead of like this: [1].
3037 One solution is to use the LaTeX-package
3038 \begin_inset Flex Code
3041 \begin_layout Plain Layout
3047 that will only include comments by processing the files separately.
3048 To do this, add in the LaTeX preamble of every subdocument the following:
3051 \begin_layout LyX-Code
3057 \begin_layout LyX-Code
3060 includecomment{comment}
3063 \begin_layout Standard
3065 \begin_inset Flex URL
3068 \begin_layout Plain Layout
3070 http://wiki.lyx.org/FAQ/Unsorted#toc31
3078 \begin_layout Section
3082 \begin_layout Standard
3083 Users sometimes need to be able to
3084 \begin_inset Quotes eld
3088 \begin_inset Quotes erd
3091 a LyX file together with all the images (and other files) on which it depends,
3092 either for sending to a publisher or for sharing with a co-author.
3093 LyX 2.0 includes a Python script (
3094 \begin_inset Flex Code
3097 \begin_layout Plain Layout
3103 ) that automates this process.
3104 To use it, you must have either the
3105 \begin_inset Flex Code
3108 \begin_layout Plain Layout
3115 \begin_inset Flex Code
3118 \begin_layout Plain Layout
3124 python modules installed on your system.
3125 By default, the script prefers the
3126 \begin_inset Flex Code
3129 \begin_layout Plain Layout
3136 \begin_inset Flex Code
3139 \begin_layout Plain Layout
3145 format on Unix-like systems and the
3146 \begin_inset Flex Code
3149 \begin_layout Plain Layout
3158 \begin_layout Standard
3159 LyX's configuration process will set the script up to export a `LyX Archive',
3160 and this format will then be available under
3161 \begin_inset Flex Code
3164 \begin_layout Plain Layout
3165 File\SpecialChar \menuseparator
3174 \begin_layout Standard
3175 Independently of the platform, the generation of a particular archive format
3176 can be forced by adding either the
3177 \begin_inset Flex Code
3180 \begin_layout Plain Layout
3187 \begin_inset Flex Code
3190 \begin_layout Plain Layout
3197 \begin_inset Flex Code
3200 \begin_layout Plain Layout
3207 \begin_inset Flex Code
3210 \begin_layout Plain Layout
3216 format) switch to the
3217 \begin_inset Flex Code
3220 \begin_layout Plain Layout
3221 LyX\SpecialChar \menuseparator
3228 \begin_inset Flex Code
3231 \begin_layout Plain Layout
3232 Tools\SpecialChar \menuseparator
3233 Preferences\SpecialChar \menuseparator
3234 File Handling\SpecialChar \menuseparator
3241 (Make sure you add the switch after the script name, not before it.)
3244 \begin_layout Section
3245 Fancy Headers and Footers
3248 \begin_layout Standard
3249 The default page layout is rather plain; for an
3250 \begin_inset Flex Code
3253 \begin_layout Plain Layout
3259 document class, all you get is a centered page number at the bottom of
3261 This document uses KOMA-script's book class, so it appears to be a bit
3263 But to really put on a show, you need to set the document page style to
3265 \begin_inset Quotes eld
3269 \begin_inset Quotes erd
3272 , as mentioned in the
3277 This section describes the LaTeX code you need to insert in your LaTeX
3278 preamble in order to get the desired effects.
3281 \begin_layout Standard
3282 For more information on fancy headers, see the
3283 \begin_inset Flex Code
3286 \begin_layout Plain Layout
3292 package documentation.
3294 \begin_inset Flex URL
3297 \begin_layout Plain Layout
3299 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3307 \begin_layout Standard
3308 The page header is divided into three fields, not surprisingly labeled
3309 \begin_inset Quotes eld
3313 \begin_inset Quotes erd
3317 \begin_inset Quotes eld
3321 \begin_inset Quotes erd
3325 \begin_inset Quotes eld
3329 \begin_inset Quotes erd
3333 The footer is also divided into these three fields.
3334 The LaTeX commands to set these fields in the simplest manner are
3335 \begin_inset Flex Code
3338 \begin_layout Plain Layout
3347 \begin_inset Flex Code
3350 \begin_layout Plain Layout
3359 \begin_inset Flex Code
3362 \begin_layout Plain Layout
3371 \begin_inset Flex Code
3374 \begin_layout Plain Layout
3383 Suppose you wish to put your name in the upper left hand corner of each
3385 Simply insert the following command in the preamble:
3388 \begin_layout Standard
3397 \begin_layout Standard
3398 You will now see your name in the upper left.
3399 If a field has a default entry that you would like to get rid of (often
3400 the page number appears in the central footer, simply include a command
3401 with a blank argument, e.
3402 \begin_inset space \thinspace{}
3408 \begin_layout Standard
3416 \begin_layout Standard
3417 Let's get really fancy: lets put the section number with the word
3418 \begin_inset Quotes eld
3422 \begin_inset Quotes erd
3426 \begin_inset space \thinspace{}
3430 \begin_inset space \space{}
3433 Section 3) in the upper left, the page number (e.
3434 \begin_inset space \thinspace{}
3438 \begin_inset space \space{}
3441 Page 4) in the upper right, your name in the lower left, and the date in
3443 The following commands should now appear in the preamble:
3446 \begin_layout Standard
3456 \begin_layout Standard
3464 \begin_layout Standard
3474 \begin_layout Standard
3483 \begin_layout Standard
3491 \begin_layout Standard
3501 \begin_layout Standard
3503 \begin_inset Flex Code
3506 \begin_layout Plain Layout
3515 \begin_inset Flex Code
3518 \begin_layout Plain Layout
3526 access LaTeX's section and page counters, and so print out the current
3527 section and page numbers.
3529 \begin_inset Flex Code
3532 \begin_layout Plain Layout
3540 simply prints out today's date.
3543 \begin_layout Standard
3544 The thicknesses of the horizontal rules drawn beneath the header and above
3545 the footer can also be modified.
3546 If you don't want one of the rules, set its thickness to 0.
3547 The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3553 \begin_inset Flex Code
3556 \begin_layout Plain Layout
3561 headrulewidth}{0.4pt}
3567 \begin_inset Flex Code
3570 \begin_layout Plain Layout
3575 footrulewidth}{0.4pt}
3580 to set the thicknesses.
3583 \begin_layout Standard
3584 You can switch the header/footer settings on and off for individual pages
3586 \begin_inset Flex Code
3589 \begin_layout Plain Layout
3592 thispagestyle{empty}
3598 \begin_inset Flex Code
3601 \begin_layout Plain Layout
3604 thispagestyle{plain}
3610 \begin_inset Flex Code
3613 \begin_layout Plain Layout
3616 thispagestyle{fancy}
3622 Simply insert them in the text on the page you want changed and mark them
3624 In fact, title pages are marked as plain by default, while following pages
3625 are marked fancy when using the global fancy setting.
3628 \begin_layout Standard
3629 As a final example, it is possible to include an image in the header or
3631 Suppose you want to put a company logo in the upper lefthand corner.
3632 You might try something like
3635 \begin_layout Standard
3644 includegraphics{logo.eps}}}
3647 \begin_layout Standard
3649 (you may need to preface this with
3650 \begin_inset Flex Code
3653 \begin_layout Plain Layout
3657 usepackage{graphics}
3662 if you don't include graphics elsewhere in your document).
3665 \begin_layout Section
3666 Itemize Bullet Selection
3667 \begin_inset CommandInset label
3676 \begin_layout Standard
3682 \begin_layout Subsection
3686 \begin_layout Standard
3687 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3688 Using this dialog you can easily specify what bullet shape to use at each
3689 level of an itemized list.
3690 These settings are document-wide so you won't be able to specify different
3691 sets of bullets for different paragraphs.
3695 \begin_layout Plain Layout
3696 Well, actually you can but you'll have to do it by hand.
3704 \begin_layout Subsection
3708 \begin_layout Standard
3709 Open the dialog by selecting the
3710 \begin_inset Flex MenuItem
3713 \begin_layout Plain Layout
3714 Document\SpecialChar \menuseparator
3720 menu item and then select the
3721 \begin_inset Flex MenuItem
3724 \begin_layout Plain Layout
3733 \begin_layout Standard
3734 The dialog provides you with a table of bullet shapes.
3735 A column of buttons on the left of the table provides access to the six
3736 different panels of bullet shapes.
3737 The row of buttons across the top is used to select which bullet depth
3739 A text entry under the table shows the currently selected bullet shape's
3740 LaTeX equivalent and this can be edited if desired.
3741 If you do modify the text you will also need to specify any needed packages
3742 in the LaTeX preamble.
3745 \begin_layout Standard
3746 The six panels are divided up by the packages they require.
3747 The following table shows the mappings from button name to LaTeX packages.
3750 \begin_layout Standard
3752 \begin_inset Tabular
3753 <lyxtabular version="3" rows="7" columns="2">
3754 <features tabularvalignment="middle">
3755 <column alignment="center" valignment="top" width="0pt">
3756 <column alignment="center" valignment="top" width="0pt">
3758 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3761 \begin_layout Plain Layout
3776 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3779 \begin_layout Plain Layout
3796 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3799 \begin_layout Plain Layout
3814 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3817 \begin_layout Plain Layout
3833 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3836 \begin_layout Plain Layout
3851 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3854 \begin_layout Plain Layout
3871 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3874 \begin_layout Plain Layout
3889 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3892 \begin_layout Plain Layout
3909 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3912 \begin_layout Plain Layout
3927 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3930 \begin_layout Plain Layout
3947 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3950 \begin_layout Plain Layout
3965 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3968 \begin_layout Plain Layout
3985 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3988 \begin_layout Plain Layout
4003 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4006 \begin_layout Plain Layout
4029 \begin_layout Standard
4030 LyX doesn't stop you using bullets from packages you don't have.
4031 If you get errors from LaTeX when you try to view or print the file, then
4032 it is likely you are missing a package.
4036 \begin_layout Plain Layout
4037 LyX doesn't restrict your use since you may be editing locally and exporting
4046 \begin_layout Subsection
4050 \begin_layout Standard
4051 Select which bullet depth you want to change then select the bullet shape
4053 Any changes will not be visible in LyX, but are visible when viewing the
4057 \begin_layout Standard
4058 You can reset a bullet shape to the default simply by clicking your right
4059 mouse button on the appropriate bullet depth button.
4063 \begin_layout Plain Layout
4068 want to have multiple sets of paragraphs with different sets of bullets
4069 in each, then you're going to have to get your hands dirty with TeX code.
4070 The bullet selection dialog can help though because it provides you with
4071 the LaTeX code for a wide range of bullet shapes.
4072 To make your own custom paragraphs you have the following options:
4075 \begin_layout Plain Layout
4079 \begin_layout Plain Layout
4095 \begin_layout Plain Layout
4099 \begin_layout Plain Layout
4121 \begin_layout Itemize
4122 Use the LaTeX command
4123 \begin_inset Flex Code
4126 \begin_layout Plain Layout
4134 to specify a new bullet shape for a given depth.
4135 You'll also need to save the current bullet shape so you can restore it
4137 In this itemized list the following LaTeX code was used to change the bullet
4138 used for the first depth.
4142 \begin_layout LyX-Code
4152 \begin_layout LyX-Code
4169 \begin_layout Itemize
4170 Note that the itemize depth is specified in Roman numerals as part of the
4180 \begin_layout Itemize
4184 \begin_layout Plain Layout
4197 Specify each individual entry by starting each item with the bullet shape
4198 enclosed in square brackets and set as
4199 \begin_inset Flex MenuItem
4202 \begin_layout Plain Layout
4209 For example, this item was started with
4210 \begin_inset Flex Code
4213 \begin_layout Plain Layout
4228 \begin_layout Plain Layout
4232 \begin_layout Plain Layout
4248 \begin_layout Plain Layout
4249 You'll also need to revert the labelitem back to its previous setting for
4250 the global bullet shape settings to remain in effect.
4251 The way used here was:
4254 \begin_layout LyX-Code
4269 \begin_layout Chapter
4270 LyX and the World Wide Web
4273 \begin_layout Standard
4274 LyX has long supported the export of documents to various web-friendly formats,
4276 Before verson 2.0, however, HTML export was always accomplished by the use
4277 of external converters.
4281 \begin_layout Plain Layout
4282 For details on the use of external converters with LyX, see the
4286 section of the Customization manual.
4291 These fall into two large groups: there are converters that use LaTeX as
4292 an intermediate format, such as
4293 \begin_inset Flex Code
4296 \begin_layout Plain Layout
4303 \begin_inset Flex Code
4306 \begin_layout Plain Layout
4313 \begin_inset Flex Code
4316 \begin_layout Plain Layout
4322 , relying upon LyX to produce the LaTeX; and there is a converter that works
4323 directly on LyX files,
4324 \begin_inset Flex Code
4327 \begin_layout Plain Layout
4334 All of these have different advantages and disadvantages.
4338 \begin_layout Standard
4339 The LaTeX-based converters have the advantage that, in principle, they know
4340 everything about the exported document that LaTeX does.
4341 Such converters do not care, for example, if a certain block of code was
4342 produced by LyX or was Evil Red Text.
4343 These converters know about
4344 \begin_inset Flex Code
4347 \begin_layout Plain Layout
4353 files, counters, and references, and can often make use of the
4354 \begin_inset Flex Code
4357 \begin_layout Plain Layout
4363 files generated by BibTeX.
4364 On the other hand, LaTeX is a very hard language to parse---it is sometimes
4365 said that only TeX itself understands TeX---and LaTeX-based converters
4366 will often choke on what seem to be quite simple constructs; complex ones
4367 can throw them completely, and as of this writing, for example, the
4371 manual will not export with
4372 \begin_inset Flex Code
4375 \begin_layout Plain Layout
4381 , though the others will.
4382 The other issue concerns how math is handled.
4383 These converters typically convert the formulae into little pictures that
4384 are then linked from the HTML document.
4385 Since these are actually generated by LaTeX, they are accurate.
4386 But they do not scale well, and just getting them to look as if they are
4387 actually meant to be in your document---so that the font sizes seem to
4388 be roughly the same---can be a challenge.
4391 \begin_layout Standard
4393 \begin_inset Flex Code
4396 \begin_layout Plain Layout
4403 \begin_inset CommandInset href
4405 name "http://elyxer.nongnu.org/"
4406 target "http://elyxer.nongnu.org/"
4410 ) solves some of these problems.
4411 In particular, the formulae it produces scale perfectly, since it renders
4412 math using a combination of HTML and CSS rather than converting the formulae
4414 But even moderately complex formula are rendered less well than with
4415 \begin_inset Flex Code
4418 \begin_layout Plain Layout
4424 ; this reflects the limitations of HTML.
4428 \begin_layout Plain Layout
4430 \begin_inset Flex Code
4433 \begin_layout Plain Layout
4439 can also use jsMath and MathJax for equations, but this setting is only
4440 available globally and requires one to have access to a server that runs
4446 More importantly (as of version 1.1.1, at least),
4447 \begin_inset Flex Code
4450 \begin_layout Plain Layout
4456 has limited support for math macros and no support for user-defined paragraph
4457 or character styles.
4458 These limitations make
4459 \begin_inset Flex Code
4462 \begin_layout Plain Layout
4468 unsuitable for many of the documents LyX users produce.
4469 In principle, of course, these problems could be solved, but the LyX developers
4470 have decided to follow a different path and have made LyX itself capable
4471 of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4475 \begin_layout Standard
4476 As of this writing, XHTML output remains under development and should probably
4478 \begin_inset Quotes eld
4482 \begin_inset Quotes erd
4489 \begin_layout Plain Layout
4491 \begin_inset Flex Code
4494 \begin_layout Plain Layout
4495 development/HTML.notes
4500 , which can be found in the LyX source tree or
4501 \begin_inset CommandInset href
4503 name "accessed online"
4504 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4508 , usually contains up-to-date information about the state of XHTML output.
4509 See also the list of XHTML bugs on
4510 \begin_inset CommandInset href
4512 name "the bug tracker"
4513 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"
4522 Still, the developers have chosen this approach because it has several
4523 potential advantages over the other two.
4526 \begin_layout Standard
4527 These advantages are primarily due to the fact that the XHTML output routines,
4528 since they are part of LyX, know everything LyX knows about the document
4533 \begin_layout Plain Layout
4534 Another advantage is that, since these routines are internal to LyX, they
4535 are immune to changes in LyX's file format, or to changes in the semantics
4541 So they know about the table of contents (as displayed in the outline),
4542 about the counters associated with different paragraph styles, and about
4543 user-defined styles.
4544 The XHTML output routines know what LyX knows about internationalization,
4545 too, so they will output
4546 \begin_inset Quotes eld
4550 \begin_inset Quotes erd
4554 \begin_inset Quotes eld
4562 \begin_inset Quotes erd
4565 , depending upon the language in effect at the time.
4569 \begin_layout Standard
4570 Quite generally, the output routines know what LyX knows about document
4571 layout, that is, about how the document is to be rendered on screen.
4572 We use this information when we output the document as XHTML.
4577 generates CSS style information corresponding to the layout information
4578 it uses to render the document on screen: if section headings are supposed
4579 to be sans-serif and bold as seen in LyX, then (by default) they will be
4580 sans-serif and bold when viewed in a web browser, too.
4581 And this is true not just for pre-defined styles, like Section, but for
4582 any style, including user-defined styles.
4583 Indeed, the XHTML output routines make no distinction between user-defined
4584 paragraph and character styles and LyX's own pre-defined styles: in each
4585 case, everything LyX knows about the styles is contained in the layout
4587 And much the same is true as regards pre-defined textual insets, such as
4588 footnotes, and various custom insets.
4592 \begin_layout Standard
4593 The result is that XHTML output can be customized and extended in exactly
4594 the same way LaTeX output can be customized and extended: through layout
4596 See chapter five of the
4600 manual for the details.
4603 \begin_layout Standard
4604 The remainder of this chapter contains more detailed information on XHTML
4605 output, its limitations, and ways to work around those limitations.
4608 \begin_layout Section
4609 Math Output in XHTML
4612 \begin_layout Standard
4613 LyX offers four choices for how math is rendered.
4614 These have various advantages and disadvantages:
4617 \begin_layout Itemize
4619 \begin_inset Newline newline
4622 MathML is a dialect of XML designed specifically for mathematics on the
4623 web, and it typically renders very well in browsers that support it.
4624 The disadvantage is that not all browsers support MathML, and support is
4625 not complete even in the Gecko-based browsers, such as Firefox.
4626 \begin_inset Newline newline
4629 If LyX is unable to render a formula as MathML---for example, if the formula
4631 \begin_inset Flex Code
4634 \begin_layout Plain Layout
4640 package or ERT---then it will instead output the formula as an image.
4644 \begin_layout Itemize
4646 \begin_inset Newline newline
4650 \begin_inset Flex Code
4653 \begin_layout Plain Layout
4659 outputs math as HTML, styled by CSS.
4663 \begin_layout Plain Layout
4664 LyX has borrowed some of the CSS for its HTML output from
4665 \begin_inset Flex Code
4668 \begin_layout Plain Layout
4679 For simple formulae, this can work quite well, though with more complicated
4680 formulae it tends to break down.
4681 Still, this method has the advantage that it is very widely supported and
4682 so it may be appropriate for documents that contain only a little, fairly
4684 \begin_inset Newline newline
4687 If Lyx is unable to render a formula as HTML---for example, if the formula
4689 \begin_inset Flex Code
4692 \begin_layout Plain Layout
4698 package or ERT---then it will instead output the formula as an image.
4702 \begin_layout Itemize
4704 \begin_inset Newline newline
4708 \begin_inset Flex Code
4711 \begin_layout Plain Layout
4717 , LyX will output formulae as images, the very same images, in fact, that
4718 are used for instant preview.
4722 \begin_layout Plain Layout
4723 Instant preview does
4727 have to be on for images to be output, however.
4732 The advantage to this method is that the images are simply generated by
4733 LaTeX, so they are very accurate.
4734 The disadvantage, as mentioned earlier, is that these are bitmapped images,
4735 so they do not scale terribly well, and one cannot copy them, etc.
4736 (As of this writing, there are also problems about equation numbering.
4738 \begin_inset CommandInset href
4741 target "http://www.lyx.org/trac/ticket/6894"
4746 \begin_inset Newline newline
4749 The size of the images can be controlled by setting the
4750 \begin_inset Quotes eld
4754 \begin_inset Quotes erd
4758 \begin_inset Flex MenuItem
4761 \begin_layout Plain Layout
4762 Document\SpecialChar \menuseparator
4763 Settings\SpecialChar \menuseparator
4773 \begin_layout Plain Layout
4774 For those who want to know, this controls the resolution of the image in
4775 dots per inch and is based upon a default of 75 dpi.
4781 \begin_inset Newline newline
4784 If LyX for some reason fails to create an image for a formula (e.g., if a
4785 required LaTeX package is not installed), then it will fall back to outputing
4789 \begin_layout Itemize
4791 \begin_inset Newline newline
4794 Finally, LyX will happily output math as LaTeX.
4795 As well as being the output of last resort, this method can be used with
4797 \begin_inset CommandInset href
4800 target "http://www.math.union.edu/~dpvc/jsMath/"
4804 , which uses JavaScript to render LaTeX embedded in HTML documents.
4805 LyX wraps the LaTeX in either a
4806 \begin_inset Flex Code
4809 \begin_layout Plain Layout
4815 (for inline formulas) or
4816 \begin_inset Flex Code
4819 \begin_layout Plain Layout
4825 (for displayed formulas) with
4826 \begin_inset Flex Code
4829 \begin_layout Plain Layout
4835 , as is required for jsMath.
4838 \begin_layout Standard
4839 One of these output methods must be selected under
4840 \begin_inset Flex MenuItem
4843 \begin_layout Plain Layout
4844 Document\SpecialChar \menuseparator
4845 Settings\SpecialChar \menuseparator
4852 By default, LyX outputs MathML.
4853 This is a document-wide setting, therefore.
4856 \begin_layout Standard
4857 Eventually, LyX will offer the user the option to select an alternate output
4858 method for a particular inset, say, one that isn't being rendered very
4863 \begin_layout Plain Layout
4864 That said, since LyX falls back to images if the inset contains ERT, then
4865 one can force output as an image by putting some harmless ERT into the
4867 \begin_inset Formula $a=b\relax$
4878 \begin_layout Section
4879 Bibliography and Citations
4882 \begin_layout Standard
4883 XHTML output fully supports bibliographies and citations.
4887 \begin_layout Standard
4888 Citation labels are generated by the same machinery that generates LyX's
4889 on-screen labels, so the labels will look in the output much as they do
4890 in LyX, though better.
4891 If you are using numerical citations, then LyX will output numerical labels,
4892 such as [1] or [17], rather than simply showing the citation key in square
4893 brackets, as it does on-screen.
4894 If you are using author-year citations, then LyX will add lowercase letters
4895 to the years, just as BibTeX does, if it finds more than one citation for
4896 a given author-year combination.
4897 The labels will be printed with the bibliography entries.
4898 Note that there is, at present, no way to customize the appearance of the
4899 labels, for example, to choose between square brackets and parentheses.
4902 \begin_layout Standard
4903 Bibliography output is handled by the same machinery that handles the presentati
4904 on of reference information in the citation dialog, so you will see in the
4905 XHTML output pretty much what you would see if you were to look at a given
4906 entry in the citation dialog.
4907 The formatting can be customized in your layout file or, preferably, in
4913 manual for the details.
4916 \begin_layout Standard
4917 The main defect at present is that cross-referenced information is printed
4918 with every entry with which it is associated.
4919 So you can see things like this:
4924 \begin_inset Quotes eld
4927 Context and Logical Form
4928 \begin_inset Quotes erd
4933 Language in Context: Selected Essays
4935 (Oxford: Oxford University Press, 2007), pp.
4941 \begin_inset Quotes eld
4944 Semantics in Context
4945 \begin_inset Quotes erd
4950 Language in Context: Selected Essays
4952 (Oxford: Oxford University Press, 2007), pp.
4956 \begin_layout Standard
4957 This should be fixed before long.
4960 \begin_layout Standard
4961 There is no support at present for sectioned bibliographies.
4962 If you have multiple bibliographies, then LyX will print the same bibliography
4966 \begin_layout Section
4970 \begin_layout Standard
4971 LyX will happily export indexes as XHTML, but with certain limitations at
4975 \begin_layout Standard
4976 Index export will be most reliable when you do not attempt to use the fancy
4977 constructs that are described in the section on indexes in the
4985 \begin_layout Plain Layout
4986 The main issue here is that LyX itself does not really handle these.
4987 It just lets you enter what you would have to enter in raw LaTeX.
4992 We'll describe how they are handled using the subsection headings from
4996 \begin_layout Itemize
4997 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
4998 these, but the entries must be separated by
4999 \begin_inset Quotes eld
5003 \begin_inset Quotes erd
5006 , that is, there must be spaces around the exclamation point.
5007 This is because it is otherwise too difficult to check for escaped exclamation
5008 points, ones in math, and so forth.
5011 \begin_layout Itemize
5012 Page Ranges: There is no support at all for page ranges, since these make
5013 no sense with XHMTL.
5014 Instead, you will just get two index entries, one at either end.
5017 \begin_layout Itemize
5018 Cross-referencing: There is no support for cross-referencing.
5019 If LyX finds an entry containing the
5020 \begin_inset Quotes eld
5023 |see\SpecialChar \ldots{}
5025 \begin_inset Quotes erd
5028 construct, it is just dropped, and the rest is treated as an ordinary index
5032 \begin_layout Itemize
5033 Index Entry Order: LyX does support attempts to fix the sorting order.
5034 It will take what is before the first `@' it finds and use that for sorting,
5035 taking what follows the first `@' to be the actual entry.
5036 At present, LyX does not check for escaped `@', so do not try to index
5040 \begin_layout Itemize
5041 Index Entry Layout: You can format entries by using the text style dialog,
5042 or by using any other method available within LyX itself.
5043 There is no support for constructs like:
5044 \begin_inset Quotes eld
5048 \begin_inset Quotes erd
5052 Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
5053 and everything that follows it.
5056 \begin_layout Itemize
5057 Multiple Indexes: There is no support for multiple indexes.
5058 Rather, all index entries will be printed as one large index.
5059 To avoid our printing several versions of the index, we print only the
5060 main index, so make sure you have one.
5063 \begin_layout Section
5064 Nomenclature and Glossary
5067 \begin_layout Standard
5068 There is at present no support for glossaries.
5069 Adding it would be fairly trivial, and welcome.
5072 \begin_layout Chapter
5076 \begin_layout Section
5080 \begin_layout Standard
5081 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
5082 and retrieve information about the LyX internal state.
5083 This is only intended for advanced users, but they should find it useful.
5084 It is by writing to the LyX server, for example, that bibliography managers,
5085 such as JabRef, are able to
5086 \begin_inset Quotes eld
5090 \begin_inset Quotes erd
5096 \begin_layout Section
5097 Starting the LyX Server
5100 \begin_layout Standard
5101 The LyX server works through the use of a pair of named pipes.
5102 These are usually located in
5103 \begin_inset Flex Code
5106 \begin_layout Plain Layout
5112 , (except on Windows, where
5116 named pipes are special objects located in
5117 \begin_inset Flex Code
5120 \begin_layout Plain Layout
5132 ) and have the names
5133 \begin_inset Quotes eld
5137 \begin_inset Flex Code
5140 \begin_layout Plain Layout
5147 \begin_inset Quotes erd
5151 \begin_inset Quotes eld
5155 \begin_inset Flex Code
5158 \begin_layout Plain Layout
5165 \begin_inset Quotes erd
5169 External programs write into
5170 \begin_inset Flex Code
5173 \begin_layout Plain Layout
5179 and read back data from
5180 \begin_inset Flex Code
5183 \begin_layout Plain Layout
5190 The stem of the pipe names can be defined in the
5191 \begin_inset Flex MenuItem
5194 \begin_layout Plain Layout
5195 Tools\SpecialChar \menuseparator
5202 \begin_inset Flex Code
5205 \begin_layout Plain Layout
5206 "/home/myhome/lyxpipe"
5212 \begin_inset Flex Code
5215 \begin_layout Plain Layout
5229 on Windows (but any working path can be used).
5234 configure this manually in order for the server to start.
5237 \begin_layout Standard
5239 \begin_inset Flex Code
5242 \begin_layout Plain Layout
5249 \begin_inset Flex Code
5252 \begin_layout Plain Layout
5258 ' to create the pipes.
5259 If one of the pipes already exists, LyX will assume that another LyX process
5260 is already running and will not start the server.
5261 On POSIX (Unix like) systems, if for some other reason, an unused
5262 \begin_inset Quotes eld
5266 \begin_inset Quotes erd
5269 pipe is left in existence when LyX closes, then LyX will try to delete
5271 If this fails for some reason, you will need to delete the pipes manually
5272 and then restart LyX.
5273 On Windows, pipes are deleted by the OS on program termination or crash,
5275 \begin_inset Quotes eld
5279 \begin_inset Quotes erd
5282 pipes should not be possible.
5285 \begin_layout Standard
5286 To have several LyX processes with servers at the same time, you have to
5287 use different configurations, perhaps by using separate user directories,
5289 \begin_inset Flex Code
5292 \begin_layout Plain Layout
5298 file, for each process.
5301 \begin_layout Standard
5302 If you are developing a client program, you might find it useful to enable
5303 debugging information from the LyX server.
5304 Do this by starting LyX as
5305 \begin_inset Flex Code
5308 \begin_layout Plain Layout
5317 \begin_layout Standard
5318 You can find a complete example client written in C in the source distribution
5320 \begin_inset Flex Code
5323 \begin_layout Plain Layout
5324 development/lyxserver/server_monitor.c
5332 \begin_layout Standard
5333 Another useful tool is command-line based client you will find in
5334 \begin_inset Flex Code
5337 \begin_layout Plain Layout
5338 src/client/lyxclient
5346 \begin_layout Section
5347 Normal communication
5350 \begin_layout Standard
5351 To issue a LyX call, the client writes a line of ASCII text into the input
5353 This line has the following format:
5370 \begin_layout Description
5371 clientname is a name that the client can choose arbitrarily.
5372 Its only use is that LyX will echo it if it sends an answer—so a client
5373 can dispatch results from different requesters.
5376 \begin_layout Description
5377 function is the function you want LyX to perform.
5378 It is the same as the commands you'd use in the minibuffer.
5381 \begin_layout Description
5382 argument is an optional argument which is meaningful only to some functions
5384 \begin_inset Quotes eld
5388 \begin_inset Quotes erd
5391 LFUN will insert the argument as text at the cursor position).
5394 \begin_layout Standard
5395 The answer from LyX will arrive in the output pipe and be of the form
5412 \begin_layout Standard
5421 are just echoed from the command request, while
5425 is more or less useful information filled according to how the command
5426 execution worked out.
5427 Some commands, such as
5428 \begin_inset Quotes eld
5432 \begin_inset Quotes erd
5435 , will return information about the internal state of LyX, while other will
5436 return an empty data-response.
5437 This means that the command execution went fine.
5440 \begin_layout Standard
5441 In case of errors, the response from LyX will have this form
5458 \begin_layout Standard
5463 should contain an explanation of why the command failed.
5466 \begin_layout Standard
5470 \begin_layout LyX-Code
5471 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5472 \begin_inset Newline newline
5475 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5476 \begin_inset Newline newline
5479 read a <~/.lyxpipe.out
5480 \begin_inset Newline newline
5486 \begin_layout Section
5490 \begin_layout Standard
5491 LyX can notify clients of events going on asynchronously.
5492 Currently it will only do this if the user binds a key sequence with the
5494 \begin_inset Quotes eld
5498 \begin_inset Quotes erd
5502 The format of the string LyX sends is as follows:
5506 \begin_inset Flex Code
5509 \begin_layout Plain Layout
5520 \begin_layout Standard
5525 is the printed representation of the key sequence that was actually typed
5529 \begin_layout Standard
5530 This mechanism can be used to extend LyX's command set and implement macros.
5531 Bind some key sequence to
5532 \begin_inset Quotes eld
5536 \begin_inset Quotes erd
5540 Then start a client that listens on the output pipe, dispatches the command
5541 according to the sequence, and starts a function that may use LyX calls
5542 and LyX requests to issue a command or a series of commands to LyX.
5545 \begin_layout Section
5546 The simple LyX Server Protocol
5549 \begin_layout Standard
5550 LyX implements a simple protocol that can be used for session management.
5551 All messages are of the form
5564 \begin_layout Standard
5570 \begin_inset Quotes eld
5574 \begin_inset Quotes erd
5578 \begin_inset Quotes eld
5582 \begin_inset Quotes erd
5587 \begin_inset Quotes eld
5591 \begin_inset Quotes erd
5594 is received from a client, LyX will report back to inform the client that
5595 it's listening to it's messages, while
5596 \begin_inset Quotes eld
5600 \begin_inset Quotes erd
5603 sent from LyX will inform clients that LyX is closing.
5606 \begin_layout Section
5607 Reverse DVI/PDF search
5610 \begin_layout Standard
5611 Some DVI/PDF viewers
5615 \begin_layout Plain Layout
5616 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5617 Skim on Mac OSX and SumatraPDF on Windows.
5626 facility (also called
5631 This means that you can tell LyX to put the cursor to a specific line in
5632 the document by clicking at the respective position in the DVI/PDF output.
5633 To achieve this, the viewer must be able to communicate with LyX.
5634 This is done via the LyX server either by using the named pipe (
5638 ), or the UNIX domain socket (
5642 ) that LyX creates in its temporary directory (this is the way the
5643 \begin_inset Flex Code
5646 \begin_layout Plain Layout
5652 program communicates with LyX).
5653 In some cases, you need a helper script that mediates between the viewer
5654 and LyX, in others, the viewer can communicate with LyX directly.
5655 This depends on the selected viewer and on your operating system.
5656 The same applies to the way viewers need to be configured and the way the
5657 reverse search is actually performed.
5658 In what follows, we will thus describe how to setup reverse search for
5660 Before we turn to this, though, we will explain what needs to be done generally
5661 to enable reverse search in the DVI/PDF output.
5664 \begin_layout Subsection
5666 \begin_inset CommandInset label
5668 name "sub:rev-search"
5675 \begin_layout Standard
5676 In most cases LyX will do the work for you by enabling the option
5677 \begin_inset Flex MenuItem
5680 \begin_layout Plain Layout
5681 Synchronize with Output
5687 \begin_inset Flex MenuItem
5690 \begin_layout Plain Layout
5691 Document\SpecialChar \menuseparator
5692 Settings\SpecialChar \menuseparator
5699 In such a case LyX will automatically insert the necessary SyncTeX macro
5700 (for PDF) or load the srcltx package (for DVI) respectively.
5701 This option can be easily reached also on
5702 \begin_inset Flex Code
5705 \begin_layout Plain Layout
5714 \begin_layout Standard
5715 If you need a different setting, you can select or input a custom macro
5716 from the drop down box just below
5717 \begin_inset Flex MenuItem
5720 \begin_layout Plain Layout
5721 Document\SpecialChar \menuseparator
5722 Settings\SpecialChar \menuseparator
5723 Output\SpecialChar \menuseparator
5724 Synchronize with Output
5732 \begin_layout Standard
5733 Note that the method
5734 \begin_inset Flex Code
5737 \begin_layout Plain Layout
5745 enables gzip compression.
5746 If your viewer does not support it, you should instead use
5747 \begin_inset Flex Code
5750 \begin_layout Plain Layout
5761 \begin_layout Standard
5762 Please aöso note that including the
5763 \begin_inset Flex Code
5766 \begin_layout Plain Layout
5773 \begin_inset Flex Code
5776 \begin_layout Plain Layout
5782 sometimes has an undesired impact on the typesetting.
5783 Thus, you should switch output synchronization off for the final typesetting
5785 \begin_inset Flex Code
5788 \begin_layout Plain Layout
5795 \begin_inset Flex Code
5798 \begin_layout Plain Layout
5808 \begin_layout Standard
5809 In case you need some more special settings that are not covered by the
5810 automatic settings, read the next section about how to set up output synchroniz
5812 If the automatic setup suits your needs, you can readily jump to section
5813 \begin_inset space ~
5817 \begin_inset CommandInset ref
5819 reference "sub:configuring-viewers"
5823 , where the necessary configuration steps in your viewer -- needed both
5824 with the automatic and the manual setup -- are described.
5827 \begin_layout Subsection
5831 \begin_layout Standard
5832 LaTeX provides several different methods for reverse search.
5833 Some are built-in in the
5834 \begin_inset Flex Code
5837 \begin_layout Plain Layout
5843 program, some are provided by external packages.
5844 Your choice depends on whether your LaTeX distribution already provides
5845 a given method (the built-in methods are rather new) and whether your viewer
5847 The available methods are described in the following.
5850 \begin_layout Subsubsection*
5851 Built-in DVI-search via src-specials (DVI only)
5854 \begin_layout Standard
5855 This method provides the DVI file with the necessary information for reverse
5857 It is available in LaTeX since quite some time (any somewhat recent LaTeX
5858 distribution should include it), and it works reliably.
5859 To enable it, change the
5860 \begin_inset Flex MenuItem
5863 \begin_layout Plain Layout
5868 \begin_layout Plain Layout
5881 \begin_inset Flex MenuItem
5884 \begin_layout Plain Layout
5889 \begin_layout Plain Layout
5896 eX (plain)->DraftDVI
5902 \begin_inset Flex MenuItem
5905 \begin_layout Plain Layout
5906 Preferences\SpecialChar \menuseparator
5907 File Handling\SpecialChar \menuseparator
5914 \begin_inset Flex Code
5917 \begin_layout Plain Layout
5918 latex -src-specials $$i
5924 If this doesn't work, check if your TeX engine needs different options
5925 (the syntax might differ in some distributions).
5928 \begin_layout Subsubsection*
5929 External Packages (PDFSync and scrltx)
5932 \begin_layout Standard
5941 provide reverse search facility for PDF output (via pdflatex) and DVI output,
5943 In order to enable it, load the packages in the LyX preamble:
5946 \begin_layout Itemize
5947 \begin_inset Flex Code
5950 \begin_layout Plain Layout
5958 for reverse PDF search,
5961 \begin_layout Itemize
5962 \begin_inset Flex Code
5965 \begin_layout Plain Layout
5968 usepackage[active]{srcltx}
5973 for reverse DVI search.
5976 \begin_layout Standard
5977 If you want to be able to perform both DVI and PDF reverse searches, you
5978 can also insert in the preamble the following lines
5981 \begin_layout LyX-Code
5985 \begin_inset Newline newline
5991 \begin_inset Newline newline
5997 \begin_inset Newline newline
6003 \begin_inset Newline newline
6008 usepackage[active]{srcltx}
6009 \begin_inset Newline newline
6017 \begin_layout Standard
6018 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6019 right package will be used.
6022 \begin_layout Standard
6023 Note that PDFSync might affect the output layout of your document.
6024 It is therefore advised to disable PDFsync for final documents.
6027 \begin_layout Subsubsection*
6028 Built-in reverse search via SyncTeX (DVI and PDF)
6031 \begin_layout Standard
6033 \begin_inset Flex Code
6036 \begin_layout Plain Layout
6042 have built-in support for both PDF and DVI reverse search.
6047 facility is basically the result of the integration of the PDFSync package
6048 to the pdftex program and its merge with the
6053 You need at least TeXLive 2008 or a recent MikTeX distribution in order
6055 Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
6056 already provide SyncTeX support.
6059 \begin_layout Standard
6060 To enable SyncTeX for DVI output, change the
6061 \begin_inset Flex MenuItem
6064 \begin_layout Plain Layout
6069 \begin_layout Plain Layout
6082 \begin_inset Flex MenuItem
6085 \begin_layout Plain Layout
6090 \begin_layout Plain Layout
6097 eX (plain) -> DraftDVI
6103 \begin_inset Flex MenuItem
6106 \begin_layout Plain Layout
6107 Preferences\SpecialChar \menuseparator
6108 File Handling\SpecialChar \menuseparator
6115 \begin_inset Flex Code
6118 \begin_layout Plain Layout
6119 latex -synctex=1 $$i
6124 , and for PDF output, change the
6125 \begin_inset Flex MenuItem
6128 \begin_layout Plain Layout
6133 \begin_layout Plain Layout
6140 eX (pdflatex) -> PDF (pdflatex)
6146 \begin_inset Flex Code
6149 \begin_layout Plain Layout
6150 pdflatex -synctex=1 $$i
6156 Check the documentation of your viewer whether the viewer needs to be configure
6157 d for the use with SyncTeX.
6161 \begin_layout Plain Layout
6162 Note that the option
6163 \begin_inset Flex Code
6166 \begin_layout Plain Layout
6172 option enables gzip compression.
6173 If your viewer does not support it, you should instead use
6174 \begin_inset Flex Code
6177 \begin_layout Plain Layout
6191 \begin_layout Subsection
6192 Configuring and using specific viewers
6193 \begin_inset CommandInset label
6195 name "sub:configuring-viewers"
6202 \begin_layout Subsubsection*
6203 Xdvi (all platforms)
6206 \begin_layout Standard
6208 \begin_inset Flex Code
6211 \begin_layout Plain Layout
6217 , you don't need to do anything else for performing a reverse DVI search,
6218 as LyX already provides the necessary hooks for automatically using the
6220 \begin_inset Flex Code
6223 \begin_layout Plain Layout
6230 Just setup your document as described above (reverse search is triggered
6231 by Ctrl-click or Alt-click on Mac OSX, respectively).
6234 \begin_layout Standard
6235 However, if for whatever reason you want to use the named pipe instead of
6236 the socket for communicating with LyX, simply change the DVI viewer in
6238 \begin_inset Flex MenuItem
6241 \begin_layout Plain Layout
6242 Preferences\SpecialChar \menuseparator
6243 File Handling\SpecialChar \menuseparator
6253 \begin_layout Plain Layout
6254 On Mac OSX you have to use
6255 \begin_inset Flex Code
6258 \begin_layout Plain Layout
6259 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6270 \begin_inset Flex Code
6273 \begin_layout Plain Layout
6274 xdvi -editor 'lyxeditor.sh %f %l'
6280 \begin_inset Flex Code
6283 \begin_layout Plain Layout
6289 is a suitable script.
6290 For example, a minimal shell script is the following one:
6293 \begin_layout LyX-Code
6295 \begin_inset Newline newline
6298 LYXPIPE="/path/to/lyxpipe"
6299 \begin_inset Newline newline
6302 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6303 \begin_inset Newline newline
6306 echo "$COMMAND" > "${LYXPIPE}".in || exit
6307 \begin_inset Newline newline
6310 read < "${LYXPIPE}".out || exit
6313 \begin_layout Standard
6315 \begin_inset Flex Code
6318 \begin_layout Plain Layout
6328 \begin_layout Plain Layout
6335 XServer pipe path specified in
6336 \begin_inset Flex MenuItem
6339 \begin_layout Plain Layout
6340 Preferences\SpecialChar \menuseparator
6350 \begin_layout Plain Layout
6352 \begin_inset Flex Code
6355 \begin_layout Plain Layout
6361 folder of a source distribution you can find a
6362 \begin_inset Flex Code
6365 \begin_layout Plain Layout
6371 script which is able to locate the
6375 based on your preferences.
6383 \begin_layout Subsubsection*
6387 \begin_layout Standard
6389 \begin_inset Flex Code
6392 \begin_layout Plain Layout
6393 /Applications/MacDviX_Folder/calleditor.script
6398 , add the following lines:
6401 \begin_layout LyX-Code
6406 \begin_layout Plain Layout
6413 X.app/Contents/MacOS/lyxeditor "$2" $1
6414 \begin_inset Newline newline
6420 \begin_layout Standard
6421 Modify the lines accordingly if you install LyX somewhere else than in the
6422 Applications folder.
6425 \begin_layout Standard
6426 Reverse search is triggered by Alt-click (OPTION-click).
6429 \begin_layout Subsubsection*
6433 \begin_layout Standard
6435 \begin_inset Flex Code
6438 \begin_layout Plain Layout
6439 open -a Skim.app $$i
6444 to the viewer setting in
6445 \begin_inset Flex MenuItem
6448 \begin_layout Plain Layout
6449 Preferences\SpecialChar \menuseparator
6450 File Handling\SpecialChar \menuseparator
6451 File formats\SpecialChar \menuseparator
6458 \begin_inset Flex MenuItem
6461 \begin_layout Plain Layout
6462 Skim\SpecialChar \menuseparator
6463 Preferences\SpecialChar \menuseparator
6473 \begin_layout Plain Layout
6483 \begin_layout Standard
6484 Reverse search is triggered by COMMAND-SHIFT-click
6487 \begin_layout Subsubsection*
6491 \begin_layout Standard
6493 \begin_inset Flex MenuItem
6496 \begin_layout Plain Layout
6497 Settings\SpecialChar \menuseparator
6498 Configure Okular\SpecialChar \ldots{}
6499 \SpecialChar \menuseparator
6506 \begin_inset Quotes eld
6510 \begin_inset Quotes erd
6514 \begin_inset Flex Code
6517 \begin_layout Plain Layout
6526 \begin_layout Standard
6527 Reverse search is triggered by SHIFT-click.
6530 \begin_layout Subsubsection*
6534 \begin_layout Standard
6535 Launch yap, choose its
6536 \begin_inset Flex MenuItem
6539 \begin_layout Plain Layout
6540 View\SpecialChar \menuseparator
6547 \begin_inset Quotes eld
6551 \begin_inset Quotes erd
6556 \begin_inset Quotes eld
6559 New\SpecialChar \ldots{}
6561 \begin_inset Quotes erd
6564 button and, in the window that opens, enter
6565 \begin_inset Quotes eld
6569 \begin_inset Quotes erd
6572 (or any other name you like) in the
6573 \begin_inset Quotes eld
6577 \begin_inset Quotes erd
6581 Now click on the button labeled
6582 \begin_inset Quotes eld
6585 \SpecialChar \ldots{}
6587 \begin_inset Quotes erd
6590 to open a file dialog and navigate to the directory containing the batch
6592 \begin_inset Flex Code
6595 \begin_layout Plain Layout
6603 \begin_inset Flex Code
6606 \begin_layout Plain Layout
6612 and then specify the program arguments as
6613 \begin_inset Flex Code
6616 \begin_layout Plain Layout
6624 \begin_inset Flex Code
6627 \begin_layout Plain Layout
6633 wrapper is used for communicating with LyX through the
6640 \begin_layout LyX-Code
6642 \begin_inset Newline newline
6645 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
6654 \begin_inset Newline newline
6668 \begin_layout Standard
6669 Make sure that the LyXServer pipe path you specified in LyX is
6670 \begin_inset Flex Code
6673 \begin_layout Plain Layout
6687 , otherwise change the
6688 \begin_inset Flex Code
6691 \begin_layout Plain Layout
6697 wrapper accordingly.
6700 \begin_layout Standard
6701 In yap, reverse search is triggered by double-click.
6704 \begin_layout Subsubsection*
6705 SumatraPDF (Windows)
6708 \begin_layout Standard
6709 In order to use SumatraPDF for inverse search, enter
6710 \begin_inset Flex Code
6713 \begin_layout Plain Layout
6714 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6719 in the viewer setting in
6720 \begin_inset Flex MenuItem
6723 \begin_layout Plain Layout
6724 Preferences\SpecialChar \menuseparator
6725 File Handling\SpecialChar \menuseparator
6726 File formats\SpecialChar \menuseparator
6733 \begin_inset Flex Code
6736 \begin_layout Plain Layout
6742 is the previous wrapper.
6743 If SumatraPDF.exe is not in your command PATH, use its full file name.
6746 \begin_layout Standard
6747 Reverse search is triggered by double-click.
6750 \begin_layout Subsubsection*
6754 \begin_layout Standard
6755 First of all, make sure that yap is your default DVI viewer in the Windows
6756 environment, then launch it, choose its
6757 \begin_inset Flex MenuItem
6760 \begin_layout Plain Layout
6761 View\SpecialChar \menuseparator
6768 \begin_inset Quotes eld
6772 \begin_inset Quotes erd
6777 \begin_inset Quotes eld
6780 New\SpecialChar \ldots{}
6782 \begin_inset Quotes erd
6785 button and, in the window that opens, enter
6786 \begin_inset Quotes eld
6790 \begin_inset Quotes erd
6793 (or any other name you like) in the
6794 \begin_inset Quotes eld
6798 \begin_inset Quotes erd
6802 Now click on the button labeled
6803 \begin_inset Quotes eld
6806 \SpecialChar \ldots{}
6808 \begin_inset Quotes erd
6811 to open a file dialog and navigate to the directory containing the
6812 \begin_inset Flex Code
6815 \begin_layout Plain Layout
6821 program (which is installed by default on Cygwin along with the LyX executable).
6823 \begin_inset Flex Code
6826 \begin_layout Plain Layout
6832 and then specify the program arguments as
6833 \begin_inset Flex Code
6836 \begin_layout Plain Layout
6843 In this way, you will be using the
6847 for communicating with LyX.
6848 If, for whatever reason, you want to use the
6853 \begin_inset Flex Code
6856 \begin_layout Plain Layout
6862 option and be sure to specify the LyXServer pipe path in the LyX preferences.
6865 \begin_layout Standard
6866 In yap, reverse search is triggered by double-click.
6869 \begin_layout Subsubsection*
6873 \begin_layout Standard
6874 In order to use SumatraPDF for inverse search, enter
6875 \begin_inset Flex Code
6878 \begin_layout Plain Layout
6879 SumatraPDF -inverse-search "lyxeditor -g %f %l"
6884 in the viewer setting in
6885 \begin_inset Flex MenuItem
6888 \begin_layout Plain Layout
6889 Preferences\SpecialChar \menuseparator
6890 File Handling\SpecialChar \menuseparator
6891 File formats\SpecialChar \menuseparator
6898 If SumatraPDF.exe is not in your command PATH, use its full posix path.
6900 \begin_inset Flex Code
6903 \begin_layout Plain Layout
6909 enables communication via the
6915 \begin_inset Flex Code
6918 \begin_layout Plain Layout
6924 option if you want to use the
6928 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6931 \begin_layout Standard
6932 Reverse search is triggered by double-click.
6935 \begin_layout Section
6939 \begin_layout Standard
6940 Forward search is, as the name implies, in a sense the
6941 \begin_inset Quotes eld
6945 \begin_inset Quotes erd
6949 It allows you to let the viewer jump to a given position from within LyX.
6950 If forward search is set up (as described in what follows), you can put
6951 the cursor anywhere in your LyX document, and hit
6952 \begin_inset Flex MenuItem
6955 \begin_layout Plain Layout
6956 Navigate\SpecialChar \menuseparator
6963 \begin_inset Flex MenuItem
6966 \begin_layout Plain Layout
6972 in the context menu via right mouse click), and then the viewer will jump
6973 to that position as well.
6974 This implies, of course, that your viewer supports this function.
6977 \begin_layout Standard
6978 To make forward search possible, you first need to provide the generated
6979 output PDF/DVI file with additional information about the TeX sources.
6980 This can be done via the methods described in the section
6981 \begin_inset CommandInset ref
6983 reference "sub:rev-search"
6990 \begin_layout Standard
6991 Additionally, you need to configure LyX for using your viewers in
6992 \begin_inset Flex MenuItem
6995 \begin_layout Plain Layout
6996 Tools\SpecialChar \menuseparator
6997 Preferences\SpecialChar \menuseparator
6998 Output\SpecialChar \menuseparator
7005 We provide a range of tested configurations for some viewers, which you
7006 can select from the drop down list.
7007 If none of these configurations suits you, you have to find out and enter
7008 a suitable configuration yourself.
7009 The definition syntax uses the following placeholders:
7012 \begin_layout Itemize
7014 \begin_inset Flex Code
7017 \begin_layout Plain Layout
7026 \begin_layout Itemize
7028 \begin_inset Flex Code
7031 \begin_layout Plain Layout
7037 : name of the (temporary) exported .tex file
7040 \begin_layout Itemize
7042 \begin_inset Flex Code
7045 \begin_layout Plain Layout
7051 : name of the exported output file (either dvi or pdf, depending on which
7052 one exists in the temporary directory)
7055 \begin_layout Standard
7056 Note that only some of the viewers provide full forward search functionality,
7057 among them yap, xdvi, okular and Sumatra PDF.
7061 \begin_layout Plain Layout
7062 For Sumatra CMCDDE is needed --- downloadable from
7063 \begin_inset CommandInset href
7065 target "http://www.istri.fr/zip/CMCDDE.zip"
7074 While many of the widespread PDF viewers (most notably Adobe Reader) do
7075 not support forward search at all, some other viewers -- e.
7076 \begin_inset space \thinspace{}
7080 evince and xpdf -- allow at least to reload the document and jump to a
7081 specific page of the file, so you can at least navigate
7082 \begin_inset Quotes eld
7086 \begin_inset Quotes erd
7090 These latter functionality is provided by an external call of synctex (see
7091 the predefined example configurations).
7095 \begin_layout Standard
7096 Forward search works both with DVI and PDF output.
7097 LyX simply checks which preview format you have used before (i.
7098 \begin_inset space \thinspace{}
7101 e., which format is already there in the temporary directory) and chooses
7102 the appropriate configuration for the respective format.
7105 \begin_layout Chapter
7106 Special Document Classes
7109 \begin_layout Section
7113 \begin_layout Standard
7119 \begin_layout Subsection
7123 \begin_layout Standard
7124 This section describes how LyX can be used to write articles for submission
7125 to the scientific journal
7127 Astronomy and Astrophysics
7129 (www.edpsciences.fr/aa/
7130 \begin_inset Flex URL
7133 \begin_layout Plain Layout
7135 http://www.edpsciences.fr/aa/
7140 ) using Version 5.01 of the document class
7145 This package can be downloaded from the ftp site
7148 \begin_layout Standard
7149 \begin_inset VSpace medskip
7155 \begin_layout Standard
7157 \begin_inset Flex URL
7160 \begin_layout Plain Layout
7162 ftp://ftp.edpsciences.org/pub/aa/readme.html
7170 \begin_layout Standard
7171 \begin_inset VSpace medskip
7177 \begin_layout Standard
7178 A manual comes together with that package, and this text is not meant to
7179 replace the original manual but is merely a short guide in how to realize
7180 the correct form of your paper.
7184 \begin_layout Standard
7185 Please note that the publisher of the journal was changed from Springer
7186 to EDP Sciences starting January 1, 2001.
7187 That change involved also some slight changes to the style files, namely
7188 the removal of the thesaurus command.
7189 The LyX class aa supports the newest version of these style files, V 5.01.
7190 If you have an older version installed, please upgrade.
7191 For compatibility, the old (version 4) layout has been kept as
7196 Please refer to the comments in
7198 LyXDir/layouts/aapaper.layout
7203 \begin_layout Subsection
7207 \begin_layout Standard
7208 It is recommended you start from the example template distributed with LyX.
7209 If you are not using a template, note the following settings:
7212 \begin_layout Itemize
7219 Document\SpecialChar \menuseparator
7222 dialog (OK, that one was obvious).
7225 \begin_layout Itemize
7226 Don't change the option
7229 \begin_inset space ~
7239 The whole layout is done by the macros, you shouldn't change anything.
7242 \begin_layout Subsection
7246 \begin_layout Standard
7247 First thing to enter is the header information.
7248 It consists of seven entries, of which some are optional.
7252 \begin_layout Itemize
7260 \begin_layout Itemize
7268 \begin_layout Itemize
7276 \begin_layout Itemize
7284 \begin_layout Itemize
7289 : [optional] if more than one author: whom to contact for offprint requests.
7292 \begin_layout Itemize
7297 : [optional] mail address for contacts.
7300 \begin_layout Itemize
7308 Received: <date>; Accepted <date>
7311 \begin_layout Standard
7312 There is no need to issue the
7318 command, this is done automatically by LyX when the header is finished.
7319 Although the order of the single header entries doesn't matter it is advised
7320 to keep the above sequence, just to get the best optics and meets the layout
7321 of the real document.
7324 \begin_layout Standard
7325 If you want to place footnotes in the header block, e.
7326 \begin_inset space \thinspace{}
7330 \begin_inset space \space{}
7333 to state your present address, just use the standard footnote via the menu
7336 Insert\SpecialChar \menuseparator
7340 LyX will automagically use the term
7349 \begin_layout Standard
7350 In addition to these topics, the macros use three additional LaTeX commands
7351 that have no counterpart in LyX:
7354 \begin_layout Itemize
7361 to separate different names for more than one author and institute, respectivel
7365 \begin_layout Itemize
7372 to mark corresponding author/institute pairs.
7373 The institutes are numbered sequentially as they appear in the
7377 field, so you have to put a marker to each author.
7380 \begin_layout Itemize
7387 to supply an email address for fast contact.
7390 \begin_layout Standard
7391 In all cases, the appropriate command has to be entered in LyX and marked
7397 \begin_layout Subsection
7401 \begin_layout Standard
7402 The abstract should immediately follow the header block.
7403 With version 5 the abstract environment was changed to a command, and there
7404 is now a resctriction to only one paragraph.
7405 In addition, it should contain an entry with the keywords.
7406 This is not yet implemented for LyX, therefore you have to enter the LaTeX
7413 by hand and mark it as LaTeX code.
7414 Refer to the example paper.
7417 \begin_layout Subsection
7418 Supported environments
7421 \begin_layout Standard
7422 The A&A paper layout supports the following environments for structuring
7426 \begin_layout Itemize
7432 \begin_layout Itemize
7438 \begin_layout Itemize
7444 \begin_layout Itemize
7450 \begin_layout Itemize
7456 \begin_layout Itemize
7462 \begin_layout Itemize
7468 \begin_layout Itemize
7474 \begin_layout Itemize
7480 \begin_layout Itemize
7486 \begin_layout Itemize
7492 \begin_layout Itemize
7498 \begin_layout Subsection
7499 Commands not supported by LyX
7502 \begin_layout Standard
7503 Some commands are not yet supported by the
7508 Some have already been mentioned.
7509 For the sake of completeness, they are listed all together here:
7512 \begin_layout Itemize
7520 \begin_layout Itemize
7528 \begin_layout Itemize
7536 \begin_layout Itemize
7544 \begin_layout Itemize
7552 \begin_layout Itemize
7560 \begin_layout Itemize
7568 \begin_layout Itemize
7576 \begin_layout Standard
7577 If you want to use any of these commands, you have to enter them yourself.
7580 Do not forget to mark them as LaTeX code!
7583 \begin_layout Subsection
7584 Figure and Table Floats
7587 \begin_layout Standard
7588 LyX provides support for the necessary float environments
7590 figure, figure*, table
7596 , therefore we won't tell much about it here.
7600 \begin_inset space ~
7606 Just remember that tables should be left-aligned.
7607 For that, select the table and change the alignment in
7609 Edit\SpecialChar \menuseparator
7611 \begin_inset space ~
7617 \begin_layout Standard
7618 There is only one special thing: the figures with caption besides the figure.
7619 To create such a figure, you have to do the following:
7622 \begin_layout Enumerate
7623 Create a wide figure float:
7625 Insert\SpecialChar \menuseparator
7626 Float\SpecialChar \menuseparator
7629 , then right click in the figure and select
7635 \begin_inset space ~
7643 \begin_layout Enumerate
7644 Enter your caption text.
7647 \begin_layout Enumerate
7652 to move the cursor above the caption.
7655 \begin_layout Enumerate
7659 \begin_layout Enumerate
7660 Position the cursor behind the figure and insert a horizontal fill:
7662 Insert\SpecialChar \menuseparator
7664 \begin_inset space ~
7667 Character\SpecialChar \menuseparator
7669 \begin_inset space ~
7677 \begin_layout Enumerate
7678 Switch to LaTeX mode:
7681 \begin_inset space ~
7689 \begin_layout Enumerate
7699 Do not close the brace!
7702 \begin_layout Enumerate
7703 Position the cursor behind the caption text, switch to LaTeX mode and insert
7707 \begin_inset space ~
7719 \begin_layout Standard
7720 Also, refer to the figures in the example paper.
7723 \begin_layout Subsection
7727 \begin_layout Standard
7728 For submission, the paper has to be formated in a special double-spacing
7730 For this purpose, you have to give the option
7734 to the documentclass.
7735 This must be done using the extra class options field in the
7737 Document\SpecialChar \menuseparator
7741 Just enter the string
7748 \begin_layout Subsection
7752 \begin_layout Standard
7757 directory contains an example paper written with LyX.
7758 It is the example paper from the original macro package, translated to
7760 Use it for inspiration, and compare the original LaTeX code with LyX way
7764 \begin_layout Section
7768 \begin_layout Standard
7774 \begin_layout Subsection
7778 \begin_layout Standard
7779 AASTeX is a set of macros produced by the American Astronomical Society
7780 to facilitate electronic manuscript submission to the three journals they
7781 publish: the Astrophysical Journal (including the Letters and Supplement),
7782 the Astronomical Journal, and the Publications of the Astronomical Society
7784 LyX has proven to be an excellent tool for generating these documents,
7785 especially given its equation, citation, and figure handling capabilities.
7786 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7787 is the version described here, or higher.
7788 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7789 incompatible with LyX.
7790 The AASTeX package may be downloaded from the AASTeX Web site
7793 \begin_layout Standard
7794 \begin_inset VSpace medskip
7800 \begin_layout Standard
7802 \begin_inset Flex URL
7805 \begin_layout Plain Layout
7807 http://www.journals.uchicago.edu/AAS/AASTeX
7815 \begin_layout Standard
7816 \begin_inset VSpace medskip
7822 \begin_layout Standard
7823 A complete user guide is contained in that package and you should familiarize
7824 yourself with it thoroughly before embarking on writing a paper in LyX.
7825 LyX will not reduce the need to figure out all the AASTeX commands, it
7826 will only reduce the drudgery of typing everything in.
7827 It is your responsibility to ensure that the final exported LaTeX document
7828 conforms completely to the requirements of the journal to which you are
7829 submitting your paper.
7832 \begin_layout Subsection
7833 Starting a New Paper
7836 \begin_layout Standard
7837 I strongly suggest that you start with the AASTeX template file.
7840 File\SpecialChar \menuseparator
7847 , enter the new file name, then choose the
7852 This will show the most common fields found in a manuscript.
7853 Simply overwrite the existing text (including the brackets,
7857 ) with the correct information.
7858 Many of the AASTeX commands and environments can be implemented directly
7859 in LyX, but some cannot: most noticeably
7871 , which should stick out like a sore thumb if you actually just opened the
7873 For commands such as these, the LaTeX code must be entered directly and
7875 Such commands are referred to as TeX code, or Evil Red Text.
7876 I tried to minimize the amount of TeX code needed in an AASTeX document,
7877 but there is still a bit more required than any of us would like.
7880 \begin_layout Subsection
7881 Finishing Your Paper
7884 \begin_layout Standard
7885 When the paper is finished to your satisfaction and previews/prints correctly,
7887 \begin_inset Quotes eld
7891 \begin_inset Quotes erd
7894 actions which need to be done before you submit it to the journals.
7898 \begin_layout Enumerate
7899 Export your paper as a LaTeX file (
7901 File\SpecialChar \menuseparator
7902 Export\SpecialChar \menuseparator
7909 \begin_layout Enumerate
7914 file with your favorite text editor
7918 \begin_layout Enumerate
7919 remove the comment lines before the
7928 \begin_layout Enumerate
7933 usepackage...{fontenc}
7935 line if it appears (usually just after
7950 \begin_layout Enumerate
7951 remove everything between (and including) the
7963 commands, except for any commands you specifically put into the LaTeX preamble
7964 (which should appear immediately after the
7965 \begin_inset Quotes eld
7968 User specified LaTeX commands
7969 \begin_inset Quotes erd
7980 \begin_layout Enumerate
7981 Run the resulting file through LaTeX to make sure it still processes correctly.
7984 \begin_layout Enumerate
7985 Reread the journal requirements to make sure your filenames and formats
7989 \begin_layout Enumerate
7993 \begin_layout Subsection
7994 Comments On Specific Commands
7997 \begin_layout Standard
7998 I will not describe the detailed usage of the individual AASTeX commands:
7999 the AASTeX User Guide (
8003 ) gives a good description of each.
8004 Thus it's probably easiest for me to go down the list as found in the guide
8005 and offer comments where necessary.
8006 So let's begin \SpecialChar \ldots{}
8010 \begin_layout Subsubsection
8011 Things that work as expected
8014 \begin_layout Standard
8015 Because they work as you might expect, I simply list them and the section
8116 begin{thebibliography}
8124 (2.13.2), all the cite commands and their variations (2.13.2), the generic
8125 graphicx figure commands (2.14.1),
8149 (2.15.4, amongst other places),
8176 \begin_layout Standard
8177 The following style options also work correctly:
8198 Simply put them in the
8204 Layout\SpecialChar \menuseparator
8210 \begin_layout Subsubsection
8211 Things that work, but require more comment
8214 \begin_layout Standard
8215 The following items work, but require a little more discussion:
8218 \begin_layout Itemize
8219 These items are reserved for use by the journal editors, but you can put
8220 them into the LaTeX preamble if you feel compelled to do so:
8253 \begin_layout Itemize
8254 These items may be placed in the LaTeX preamble, and are included as blanks
8255 in the template file:
8276 \begin_layout Itemize
8283 (2.3) – can only be used
8284 \begin_inset Quotes eld
8288 \begin_inset Quotes erd
8291 , not in the middle of a paragraph.
8292 Use TeX code if you need to embed it.
8295 \begin_layout Itemize
8302 (2.3) – will have extra {} after it.
8303 This should not cause an error.
8306 \begin_layout Itemize
8313 (2.6) – can only be used
8314 \begin_inset Quotes eld
8318 \begin_inset Quotes erd
8321 , not in the middle of a paragraph.
8322 Use TeX code if you need to embed it.
8325 \begin_layout Itemize
8332 (2.8) – can't insert a cross-reference tag, you must type the tag name by
8336 \begin_layout Itemize
8350 \begin_layout Itemize
8357 (2.9) – will have extra {} after it.
8358 This should not cause an error.
8361 \begin_layout Itemize
8368 (2.11) – will have extra {} after it.
8369 This should not cause an error.
8372 \begin_layout Itemize
8379 (2.14.2) – you can insert an optional filename argument by placing the cursor
8380 at the beginning of the text and selecting
8382 Insert\SpecialChar \menuseparator
8387 \begin_inset Quotes eld
8391 \begin_inset Quotes erd
8394 inserts an optional argument of the type needed by
8401 Hopefully it will be renamed someday.
8404 \begin_layout Itemize
8417 for the catalog ID optional parameter
8420 \begin_layout Itemize
8433 for the catalog ID optional parameter
8436 \begin_layout Subsubsection
8437 Things not implemented, use TeX code
8440 \begin_layout Standard
8463 setcounter{equation}
8465 (2.12), Journal name abbreviations (2.13.4),
8501 (2.15.4, insert it as the first element in the lefthand cell after where
8503 Don't use any of LyX's rules in the table),
8515 (2.15.5), much of Misc (2.17, except
8566 \begin_layout Subsubsection
8567 Things that cannot be implemented
8570 \begin_layout Standard
8571 \SpecialChar \ldots{}
8572 at least in any meaningful sort of way, so I suggest ignoring them.
8573 They are the references environment (2.13.3), and the deluxetable environment
8575 If you really, really need to use deluxetable, I suggest editing it in
8576 a separate file with a text editor, then using
8578 Insert\SpecialChar \menuseparator
8580 \begin_inset space ~
8585 to include it in your LyX document.
8590 file to see an example of this.
8593 \begin_layout Subsection
8594 FAQs, Tips, Tricks, and Other Ruminations
8597 \begin_layout Subsubsection
8598 Getting LyX and AASTeX to cooperate
8601 \begin_layout Standard
8602 It can be a bit tricky to get LyX to recognize a new layout and document
8604 When all else fails, do this:
8607 \begin_layout Enumerate
8608 Make certain that LaTeX can find AASTeX.
8609 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8610 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
8617 \begin_layout Enumerate
8629 \begin_layout Enumerate
8632 Tools\SpecialChar \menuseparator
8635 in LyX, then restart LyX.
8638 \begin_layout Enumerate
8639 Open a regular new file, not from a template.
8640 Does AASTeX appear in the class list in
8642 Document\SpecialChar \menuseparator
8648 \begin_layout Standard
8649 If you get a warning from an existing AASTeX document about not being able
8650 to find the AASTeX layout or a message about
8651 \begin_inset Quotes eld
8654 You should not mix title layouts with normal ones
8655 \begin_inset Quotes erd
8658 , things haven't been installed correctly.
8661 \begin_layout Subsubsection
8662 LaTeX error processing a table
8665 \begin_layout Standard
8666 LyX, by default, attempts to center the table caption/title.
8667 This seems to produce a bad interaction in AASTeX so you should click somewhere
8668 in the caption/title, then select
8670 Edit\SpecialChar \menuseparator
8672 \begin_inset space ~
8686 This took care of it for me.
8689 \begin_layout Subsubsection
8693 \begin_layout Standard
8694 A couple of things: 1) I have noticed some funny spacing in the reference
8695 entries in the text.
8696 When you enter the bibliography item data, make sure their is
8700 space between the last author and the parenthesis setting off the year;
8704 \begin_inset space \thinspace{}
8708 \begin_inset space \space{}
8722 2) Entering the references at all is not obvious.
8723 The easiest thing is to start typing your first reference at the end of
8724 the document, then mark it as type
8729 That will put a small gray box in front of what you just typed.
8730 Click on the box to fill in the rest of the information.
8731 For new references, go to the end of an existing reference and press return.
8732 That will create a new line with its own box, etc.
8735 \begin_layout Subsubsection
8739 \begin_layout Standard
8740 Even though AASTeX provides its own figure commands (
8746 , for example), I much prefer LaTeX's standard figure commands (with the
8755 \begin_inset space ~
8758 commands as TeX code into a Figure Float box if you desire, but I never
8759 have much luck getting the layout right.
8760 With the standard graphics, LyX will insert a
8764 usepackage{graphicx}
8766 command into the LaTeX preamble and handle the figures in the standard
8767 LaTeX2e way, interspersing the figures in the text.
8768 I believe ApJ accepts figures exactly this way now; AJ might still use
8770 \begin_inset Quotes eld
8773 stack everything at the end
8774 \begin_inset Quotes erd
8780 \begin_layout Subsubsection
8781 Things I could have done, but didn't
8784 \begin_layout Standard
8786 \begin_inset Quotes eld
8790 \begin_inset Quotes erd
8793 things I could have implemented, but chose not to.
8794 For instance, I saw no point in double-spacing the text in the LyX window,
8795 even though it is double-spaced in the paper manuscript.
8796 Also, I chose not to make separate layouts for the preprint and preprint2
8798 Since I assume you will spend most of your time in the plain manuscript
8799 mode anyway, I decided not to chew up more disk space with this.
8803 \begin_layout Subsection
8807 \begin_layout Standard
8808 Your mileage may vary.
8809 I've now had papers published by both ApJ and AJ that have had 98% of the
8810 effort done in LyX; the last 2% was the LaTeX post-processing and a few
8812 I have had no trouble with the submission process, and I'm sure the journals
8813 were never aware that there might be a difference.
8814 So, go forth and publish!
8817 \begin_layout Section
8821 \begin_layout Standard
8831 \begin_layout Standard
8832 \begin_inset VSpace bigskip
8838 \begin_layout Standard
8840 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8841 papers to be submitted to American Mathematical Society publications.
8842 The layouts are not tailored to a specific journal, but easily can be.
8843 You should refer to the AMS documentation for specific instructions for
8844 each journal (usually it will entail only changing a single line in the
8846 That documentation is available on the Web at
8847 \begin_inset Flex URL
8850 \begin_layout Plain Layout
8858 \begin_inset Flex URL
8861 \begin_layout Plain Layout
8863 ftp://ftp.ams.org/pub/tex/amslatex/
8869 These layouts are appropriate, and useful, for any mathematical writing.
8873 \begin_layout Standard
8874 There are two basic AMS LaTeX layouts:
8877 \begin_layout Itemize
8878 amsart: The standard AMS article format.
8881 \begin_layout Itemize
8882 amsbook: the standard AMS book (really, monograph) format.
8886 \begin_layout Standard
8887 The layouts themselves contain only the minimum necessary to use the AMS
8889 They do not, in particular, contain any of the `theorem' environments used
8890 for setting theorems, lemmas, and the like.
8891 These are contained, instead, in the
8892 \begin_inset Flex Code
8895 \begin_layout Plain Layout
8901 module, which is loaded by default when when you select one of the AMS
8903 (It can also be used with other classes and can be removed, if you would
8904 rather use something else.) Less commonly used environments are in the
8905 \begin_inset Flex Code
8908 \begin_layout Plain Layout
8909 Theorems (AMS-Extended)
8914 module, which must be loaded manually.
8917 \begin_layout Standard
8918 By default, theorems and the like are numbered consecutively throughout
8919 the document, but this may be modified by loading the module
8920 \begin_inset Flex Code
8923 \begin_layout Plain Layout
8924 Theorems (Order by Section)
8929 or, if you are using
8930 \begin_inset Flex Code
8933 \begin_layout Plain Layout
8940 \begin_inset Flex Code
8943 \begin_layout Plain Layout
8944 Theorems (Order by Chapter)
8950 These will number the results as
8951 \begin_inset Formula $n.m$
8954 , where the first number refers to the section (or chapter) and the second
8955 refers to the total number of results so far in that section (or chapter).
8956 Many environments are also available unnumbered.
8957 These are indicated by an asterisk at the end.
8958 If you happen to want
8962 unnumbered results, the module
8963 \begin_inset Flex Code
8966 \begin_layout Plain Layout
8972 provides that option.
8975 \begin_layout Standard
8976 Note that these modules do not
8980 to be used with the AMS classes.
8981 It is perfectly possible to use the
8982 \begin_inset Flex Code
8985 \begin_layout Plain Layout
8991 module, and the others mentioned, with other classes, such as
8992 \begin_inset Flex Code
8995 \begin_layout Plain Layout
9002 \begin_inset Flex Code
9005 \begin_layout Plain Layout
9012 \begin_inset Flex Code
9015 \begin_layout Plain Layout
9024 \begin_layout Subsection
9025 What these layouts provide
9028 \begin_layout Standard
9029 There is a long list of included environments provided by these layouts.
9030 In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9031 variety of `theorem' environments.
9032 However, the AMS recommends the environments that are available in LyX.
9036 \begin_layout Standard
9037 The following environments—as well as the standard environments, such as
9039 \begin_inset Flex Noun
9042 \begin_layout Plain Layout
9049 \begin_inset Flex Noun
9052 \begin_layout Plain Layout
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 Code
9092 \begin_layout Plain Layout
9099 \begin_inset Flex Code
9102 \begin_layout Plain Layout
9111 \begin_layout Description
9112 Address This should be the author's permanent address.
9115 \begin_layout Description
9117 \begin_inset space ~
9120 Address This should be the author's temporary address at the time of submission,
9121 if different from the Address.
9124 \begin_layout Description
9125 Email Author's e-mail address
9128 \begin_layout Description
9129 URL Author's Web address, if desired.
9132 \begin_layout Description
9133 Keywords Key words or phrases used to identify specific topics discussed
9137 \begin_layout Description
9138 Subjectclass These refer to the AMS Subject Classifications, published and
9141 Mathematical Reviews
9144 These are also available online at the AMS cites listed above.
9147 \begin_layout Description
9151 \begin_layout Description
9155 \begin_layout Description
9159 \begin_layout Standard
9160 The following environments are provided by both the
9161 \begin_inset Flex Code
9164 \begin_layout Plain Layout
9171 \begin_inset Flex Code
9174 \begin_layout Plain Layout
9180 modules, in the latter case in both starred (unnumbered) and unstarred
9181 (numbered) versions.
9182 These same environments are provided only in the starred versions by the
9184 \begin_inset Flex Code
9187 \begin_layout Plain Layout
9196 \begin_layout Theorem
9197 This is typically used for the statements of major results.
9201 \begin_layout Corollary*
9202 This is used for statements which follow fairly directly from previous statement
9204 Again, these can be major results.
9209 These are smaller results needed to prove other statements.
9212 \begin_layout Proposition
9213 These are less major results which (hopefully) add to the general theory
9217 \begin_layout Conjecture
9218 These are statements provided without justification, which the author does
9219 not know how to prove, but which seem to be true (to the author, at least).
9222 \begin_layout Definition*
9223 Guess what this is for.
9224 The font is different for this environment than for the previous ones.
9228 \begin_layout Example*
9229 Used for examples illustrating proven results.
9232 \begin_layout Problem
9233 It's not really known what this is for.
9234 You should figure it out.
9237 \begin_layout Exercise*
9238 Write a description for this one.
9241 \begin_layout Remark
9242 This environment is also a type of theorem, usually a lesser sort of observation.
9245 \begin_layout Claim*
9246 Often used in the course of giving a proof of a larger result.
9250 Generally, these are used to break up long arguments, using specific instances
9256 The numbering scheme for cases is on its own, not together with other numbered
9262 At the end of this environment, a QED symbol (usually a square, but it can
9263 vary with different styles) is placed.
9264 If you want to have other environments within this one—for example, Case
9265 environments—and have the QED symbol appear only after them, then the other
9266 environments need to be nested within the proof environment.
9269 Nesting Environments
9275 for information on nesting.
9278 \begin_layout Standard
9279 And these environments are provided by
9280 \begin_inset Flex Code
9283 \begin_layout Plain Layout
9284 Theorems (AMS-Extended)
9292 \begin_layout Criterion*
9293 A required condition.
9296 \begin_layout Algorithm*
9297 A general procedure to be used.
9300 \begin_layout Axiom*
9301 This is a property or statement taken as true within the system being discussed.
9304 \begin_layout Condition*
9305 Sometimes used to state a condition assumed within the present context of
9310 Similar to a Remark.
9313 \begin_layout Notation*
9314 Used for the explanation of, yes, notation.
9317 \begin_layout Summary
9318 Do we really need to tell you?
9321 \begin_layout Acknowledgement*
9325 \begin_layout Conclusion*
9326 Sometimes used at the end of a long train of argument.
9330 Used in a way similar to Proposition, though perhaps lower on the scale.
9333 \begin_layout Standard
9334 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9336 They need to be available on your system in order to use these environments.
9339 \begin_layout Section
9347 \begin_layout Standard
9353 \begin_layout Subsection
9357 \begin_layout Standard
9358 These are the layout files for some of the journals of the American Geophysical
9360 It is assumed that you have both the AGU's own class files and AGUplus
9361 installed (everything to be found at
9362 \begin_inset Flex URL
9365 \begin_layout Plain Layout
9367 ftp://ftp.agu.org/journals/latex/journals
9375 \begin_layout Subsection
9379 \begin_layout Standard
9389 They are still called this in the LyX GUI, though their LaTeX equivalents
9390 in the AGU classes are
9401 \begin_layout Standard
9402 Newly defined styles are
9439 These are mostly manuscript attributes and defined in the AGU class documentati
9443 \begin_layout Standard
9444 I suspect this is still badly incomplete.
9447 \begin_layout Subsection
9451 \begin_layout Standard
9468 \begin_layout Subsection
9472 \begin_layout Itemize
9475 Journal of Geophysical Research
9484 \begin_layout Standard
9485 Add your own, it isn't so hard! Look at the
9496 \begin_layout Subsection
9497 Bugs and things to remember
9500 \begin_layout Standard
9501 In order to use the new layouts, you must remember to do the following for
9505 \begin_layout Enumerate
9511 This can be done in the
9513 Layout\SpecialChar \menuseparator
9518 Document\SpecialChar \menuseparator
9522 (AGU articles are always in English, right? So
9529 \begin_layout Enumerate
9539 (Yes, this is a bug.)
9542 \begin_layout Enumerate
9543 Make sure you use the
9547 bibliography style, by entering
9551 into the second field of the BibTeX inset.
9552 None of the standard styles will do.
9555 \begin_layout Section
9559 \begin_layout Standard
9565 \begin_layout Subsection
9569 \begin_layout Standard
9570 Broadway is for writing plays.
9571 The format is more decorative than Hollywood, and much less standardized.
9572 This format should be suitable for workshops.
9575 \begin_layout Subsection
9579 \begin_layout Standard
9580 The same as in Hollywood.
9583 \begin_layout Subsection
9587 \begin_layout Standard
9592 names as labels then cross-reference the label to insert the name.
9593 The cross-reference dialog will show the current cast of characters.
9596 \begin_layout Subsection
9597 Paper size and Margins
9600 \begin_layout Standard
9601 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9604 \begin_layout Subsection
9608 \begin_layout Standard
9609 The following environments are available.
9610 You can use broadway.bind to get the bind keys shown at the right.
9613 \begin_layout Itemize
9617 \begin_inset Newline newline
9622 You should not have to use this, but it is here for anything that does not
9626 \begin_layout Itemize
9630 \begin_inset space \hfill{}
9634 \begin_inset Newline newline
9639 Used to describe stage setting and the action.
9640 First use of speaker names in all CAPs.
9643 \begin_layout Itemize
9647 \begin_inset space \hfill{}
9651 \begin_inset Newline newline
9656 Automatically numbered.
9657 On screen it will be arabic, but will print as Roman.
9660 \begin_layout Itemize
9664 \begin_inset space \hfill{}
9668 \begin_inset Newline newline
9678 It is just centered text.
9681 \begin_layout Itemize
9685 \begin_inset space \hfill{}
9689 \begin_inset Newline newline
9694 Not automatically numbered.
9695 You supply the number.
9696 This is because I couldn't figure out how.
9699 \begin_layout Itemize
9703 \begin_inset space \hfill{}
9707 \begin_inset Newline newline
9712 A special case of Narrative to describe the setting and action as the curtain
9716 \begin_layout Itemize
9720 \begin_inset space \hfill{}
9724 \begin_inset Newline newline
9729 The speaker's (actor's) title, centered in all CAPS.
9732 \begin_layout Itemize
9736 \begin_inset space \hfill{}
9740 \begin_inset Newline newline
9745 Instructions to the speaker.
9746 The parentheses are automatically inserted.
9747 The ( will appear on screen, but both will be in the printed play.
9748 This environment is only used within
9755 \begin_layout Itemize
9759 \begin_inset space \hfill{}
9763 \begin_inset Newline newline
9768 What the Speaker says.
9771 \begin_layout Itemize
9775 \begin_inset space \hfill{}
9779 \begin_inset Newline newline
9784 The curtain comes down.
9787 \begin_layout Itemize
9791 \begin_inset space \hfill{}
9797 \begin_layout Itemize
9801 \begin_inset space \hfill{}
9807 \begin_layout Itemize
9811 \begin_inset space \hfill{}
9817 \begin_layout Standard
9821 \begin_layout Section
9825 \begin_layout Standard
9830 can be used to type letters according to German conventions.
9831 A template file is included in
9833 .../lyx/share/templates
9835 for you to use as a starting point.
9838 \begin_layout Section
9846 \begin_layout Standard
9852 \begin_layout Subsection
9856 \begin_layout Standard
9857 This is the layout file for the European Geophysical Society journals.
9862 can be downloaded from the web site of the EGS under
9863 \begin_inset Flex URL
9866 \begin_layout Plain Layout
9876 \begin_layout Subsection
9880 \begin_layout Standard
9883 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9891 The current layout file is unfortunately very unmodular and would benefit
9892 from using the various
9899 \begin_layout Section
9903 \begin_layout Standard
9904 See the LyX template file
9909 It contains all infos you need.
9912 \begin_layout Section
9918 \begin_inset CommandInset label
9927 \begin_layout Standard
9933 \begin_layout Subsection
9937 \begin_layout Standard
9938 This section describes how to use LyX to make slides for overhead projectors.
9939 There are two document classes that can do this: the default slides class
9945 This section documents the latter.
9948 \begin_layout Standard
9949 I'm going to say this again, nice and clear, so that there's no misunderstanding
9953 \begin_layout Standard
9954 \begin_inset VSpace bigskip
9960 \begin_layout Standard
9964 This section documents the class
9965 \begin_inset Quotes eld
9973 \begin_inset Quotes erd
9981 \begin_layout Standard
9982 \begin_inset VSpace bigskip
9988 \begin_layout Standard
9989 If you're looking for the documentation for
9990 \begin_inset Quotes eld
9998 \begin_inset Quotes erd
10001 , check out section
10002 \begin_inset space ~
10006 \begin_inset CommandInset ref
10008 reference "sec:slitex"
10013 If your machine doesn't have the
10018 \begin_inset Quotes eld
10026 \begin_inset Quotes erd
10029 ] installed, you'll probably have to use the default
10033 class, which isn't quite as good as
10038 \begin_layout Standard
10043 class is designed for use with version 2.1 of the
10047 LaTeX class file which is now an integral part of LaTeX2e.
10050 \begin_layout Subsection
10054 \begin_layout Standard
10055 Obviously, to use this document class, you need to select
10056 \begin_inset Quotes eld
10064 \begin_inset Quotes erd
10074 \begin_inset space ~
10080 There are some settings in the
10083 \begin_inset space ~
10088 dialog that you should know about that are specific to this class:
10091 \begin_layout Itemize
10092 Don't change the options
10103 \begin_inset space ~
10109 They're ignored by the
10116 \begin_layout Itemize
10117 The default font size is 20
10118 \begin_inset space \thinspace{}
10121 pt with the other options being 17
10122 \begin_inset space \thinspace{}
10126 \begin_inset space \thinspace{}
10130 \begin_inset space \thinspace{}
10136 \begin_layout Itemize
10137 The default font is
10145 but all math equations are still typeset in the usual roman font.
10148 \begin_layout Itemize
10153 supports A4 and Letter paper sizes as well as a special size for working
10155 \begin_inset space \thinspace{}
10159 It doesn't support A5, B5, legal or executive paper sizes.
10162 \begin_layout Itemize
10163 Don't bother changing the
10167 settings because they are ignored anyway.
10168 All floats appear where they are defined in the text.
10171 \begin_layout Itemize
10176 setting behaves a bit differently for this class.
10181 provides extensive footer and header capabilities including a user-defined
10184 \begin_inset space ~
10188 \begin_inset CommandInset ref
10190 reference "sec:foilfoot"
10195 The title page is treated differently to all other pages in the document
10204 has the logo centered at the bottom of the page (if one is defined).
10205 The possible page style choices and what they do are as follows:
10209 \begin_layout Labeling
10210 \labelwidthstring MMMMMMM
10217 The final output contains no page numbers, or other headers or footers
10218 (except footnotes of course).
10222 \begin_layout Labeling
10223 \labelwidthstring MMMMMMM
10230 The final output contains page numbers centered at the bottom of the page.
10231 No other headings or footers (other than footnotes).
10234 \begin_layout Labeling
10235 \labelwidthstring MMMMMMM
10240 Page numbers in lower right corner.
10241 Additional headers and footers are also shown.
10242 This is also the default.
10245 \begin_layout Labeling
10246 \labelwidthstring MMMMMMM
10251 Gives you access to the
10255 package although its use with
10259 is discouraged by the writer of the
10263 package because of some potential page layout clashes.
10267 \begin_layout Subsubsection
10271 \begin_layout Standard
10272 The following options may be used in the extra class options in the
10274 Document\SpecialChar \menuseparator
10280 \begin_layout Labeling
10281 \labelwidthstring MMMMMMx
10286 This sets up the page layout for 7.33
10287 \begin_inset space \thinspace{}
10291 \begin_inset space \thinspace{}
10294 in paper, which is about the same aspect ratio as a 35
10295 \begin_inset space \thinspace{}
10298 mm slide, making it a bit easier to work with this medium.
10301 \begin_layout Labeling
10302 \labelwidthstring MMMMMMx
10307 Places a rule across the page below the header on every page except the
10311 \begin_layout Labeling
10312 \labelwidthstring MMMMMMx
10317 Places a rule across the page above the footer on every page except the
10321 \begin_layout Labeling
10322 \labelwidthstring MMMMMMx
10327 This is automatically set each time you create a new
10336 to use the dvips driver to rotate those pages that are set as landscape
10340 \begin_layout Labeling
10341 \labelwidthstring MMMMMMx
10346 Simply changes the page dimensions to those of a landscape page but doesn't
10348 Thus if you use this option you need to use an external program to rotate
10349 each page or feed your paper through your printer as landscape.
10350 Note that this option effectively reverses the roles of the
10358 environments (don't worry these are described in the next section).
10361 \begin_layout Labeling
10362 \labelwidthstring MMMMMMx
10367 Equation numbers on the left.
10370 \begin_layout Labeling
10371 \labelwidthstring MMMMMMx
10376 Flush-left equations.
10379 \begin_layout Subsection
10380 Supported Environments
10383 \begin_layout Standard
10384 Most of the environments commonly supported in other classes are also supported
10390 There are several additional environments provided by
10394 as well as a couple added by LyX.
10395 The following environments are shared with other classes:
10398 \begin_layout Standard
10402 \begin_layout Plain Layout
10406 begin{multicols}{2}
10414 \begin_layout Itemize
10420 \begin_layout Itemize
10426 \begin_layout Itemize
10432 \begin_layout Itemize
10438 \begin_layout Itemize
10444 \begin_layout Itemize
10450 \begin_layout Itemize
10456 \begin_layout Itemize
10462 \begin_layout Itemize
10468 \begin_layout Itemize
10474 \begin_layout Itemize
10480 \begin_layout Itemize
10486 \begin_layout Itemize
10492 \begin_layout Itemize
10498 \begin_layout Itemize
10504 \begin_layout Itemize
10510 \begin_layout Itemize
10516 \begin_layout Itemize
10522 \begin_layout Standard
10526 \begin_layout Plain Layout
10538 \begin_layout Standard
10539 That is, all the major environments apart from the sectioning environments.
10540 Since foils are essentially self-contained sections, with a title and body,
10545 provides specific commands for starting new foils and these are:
10548 \begin_layout Itemize
10554 \begin_layout Itemize
10560 \begin_layout Standard
10561 LyX also provides slightly modified versions of these two environments called:
10564 \begin_layout Itemize
10570 \begin_layout Itemize
10573 ShortRotatefoilhead
10576 \begin_layout Standard
10577 and the differences will be explained in the next section.
10580 \begin_layout Standard
10581 Since foils are often used in presenting ideas or new theorems and such
10586 also provides a comprehensive box of goodies for presenting them:
10589 \begin_layout Standard
10593 \begin_layout Plain Layout
10597 begin{multicols}{2}
10605 \begin_layout Itemize
10611 \begin_layout Itemize
10617 \begin_layout Itemize
10623 \begin_layout Itemize
10629 \begin_layout Itemize
10635 \begin_layout Itemize
10641 \begin_layout Itemize
10647 \begin_layout Itemize
10653 \begin_layout Itemize
10659 \begin_layout Itemize
10665 \begin_layout Itemize
10671 \begin_layout Standard
10675 \begin_layout Plain Layout
10687 \begin_layout Standard
10688 The starred versions are unnumbered while the unstarred versions are numbered.
10689 There are also two list environments added by LyX and these are:
10692 \begin_layout Itemize
10698 \begin_layout Itemize
10704 \begin_layout Standard
10709 provides some powerful header and footer capabilities that are best set
10710 in the preamble although they may be set at any point in a document.
10711 If you want to change these settings in your document the best place to
10712 do so is at the very top of a foil, i.
10713 \begin_inset space \thinspace{}
10719 \begin_inset space \space{}
10724 straight after the foilhead.
10727 \begin_layout Standard
10728 For this purpose, the following command styles are provided [
10735 \begin_layout Standard
10739 \begin_layout Plain Layout
10743 begin{multicols}{2}
10751 \begin_layout Itemize
10755 \begin_inset space ~
10761 \begin_layout Itemize
10767 \begin_layout Itemize
10771 \begin_inset space ~
10777 \begin_layout Itemize
10781 \begin_inset space ~
10787 \begin_layout Itemize
10791 \begin_inset space ~
10798 \begin_layout Standard
10799 \begin_inset space ~
10806 \begin_layout Standard
10810 \begin_layout Plain Layout
10822 \begin_layout Standard
10823 There are also a few commands provided by
10827 that aren't directly supported by LyX but I'll tell you what they do and
10828 how to use them in section
10829 \begin_inset space ~
10833 \begin_inset CommandInset ref
10835 reference "sec:unsuppfoils"
10842 \begin_layout Subsection
10843 Building a Set of Foils
10846 \begin_layout Standard
10847 This section will give a simple introduction to using the different environments
10848 to build a set of foils.
10849 If you want to see an example set of foils, take a look at the
10853 file you find in LyX's
10860 \begin_layout Subsubsection
10861 Give It a Title Page
10864 \begin_layout Standard
10865 Unlike other classes that provide
10885 creates the title on a page of its own.
10886 If you leave out the
10890 environment LaTeX will substitute the current date (every time you regenerate
10894 \begin_layout Subsubsection
10898 \begin_layout Standard
10899 As I mentioned earlier, there are four ways of starting a new foil.
10900 For portrait foils you should use
10909 The difference between these two environments is the amount of space between
10910 the title of the foil (the foilhead) and the body of the foil.
10913 \begin_layout Standard
10914 Landscape foils are generated using the
10920 ShortRotatefoilhead
10923 Again the only difference is the spacing between foilhead and body.
10924 Both of the short versions have 0.5 inches less separation between the foilhead
10929 \begin_layout Standard
10930 One problem with the support for landscape foils is the requirement that
10931 you have to use the
10935 driver to generate the PostScript output otherwise the foils won't be rotated.
10936 It is possible to get landscape foils even if you haven't got the
10940 driver provided you can feed your foils sideways through your printer ;-)
10943 \begin_layout Subsubsection
10944 Theorems, Lemmas, Proofs and more
10947 \begin_layout Standard
10948 Due to a small bug in LyX you can't have two of the same type of these environme
10949 nts directly following each other.
10950 They must be separated by something.
10951 If you try, you will just be extending the previous environment as if you
10952 had merged the two environments together.
10953 So, how do you get around this problem? The simplest option is to insert
10954 some text between the two environments or add a
10958 environment between the two with just a
10959 \begin_inset Quotes eld
10967 \begin_inset Quotes erd
10971 This will force LyX to produce two separate environments and hence the
10972 correct LaTeX output.
10973 An example is provided in the example file included with the LyX distribution.
10974 Remember, this problem only occurs if you are trying to place two of the
10975 same type of theorem-like environments one directly after the other.
10978 \begin_layout Subsubsection
10982 \begin_layout Standard
10983 You get all the commonly supported list styles found in other classes as
10984 well as two new ones.
10985 I'll only describe the new ones here.
10986 If you want to find out more about the other list environments check out
10992 If you intend to use itemized lists you might also want to read about the
10996 \begin_inset space ~
11000 \begin_inset space ~
11005 dialog described above in section
11006 \begin_inset space ~
11010 \begin_inset CommandInset ref
11012 reference "sec:bullet"
11019 \begin_layout Standard
11020 The two new list styles,
11028 , are designed to make it easier for you to create lists of do's and don'ts
11029 or right and wrong by providing dedicated environments that use a tick
11030 or a cross as the label of the list.
11031 These lists are in fact dedicated variants of the
11036 They do however require that you have the
11040 packages installed.
11043 \begin_layout Subsubsection
11047 \begin_layout Standard
11052 redefines the floating tables and figures so that they appear exactly where
11053 they are in the text rather than pushing them to the top of the page or
11054 to some user specified location.
11055 In fact if you change the float placement settings they are simply ignored.
11058 \begin_layout Subsubsection
11059 Page Headers and Footers
11060 \begin_inset CommandInset label
11062 name "sec:foilfoot"
11069 \begin_layout Standard
11073 \begin_inset space ~
11082 are two commands used to control the left-footer text string.
11083 The first is meant to allow you to include a graphic logo on your foils
11085 \begin_inset Quotes eld
11093 \begin_inset Quotes erd
11097 While the second is meant to provide a classification for the audience,
11101 \begin_inset space \thinspace{}
11107 \begin_inset space \space{}
11111 It is empty by default.
11114 \begin_layout Standard
11115 The remaining page corners can be filled by
11118 \begin_inset space ~
11123 (which defaults to page numbers),
11126 \begin_inset space ~
11134 \begin_inset space ~
11142 \begin_layout Subsection
11148 \begin_inset CommandInset label
11150 name "sec:unsuppfoils"
11157 \begin_layout Standard
11158 All the commands mentioned below need to be set in a
11166 within another environment.
11169 \begin_layout Subsubsection
11173 \begin_layout Standard
11174 All lengths are adjusted using the
11197 should be replaced by the name given to the length you want to change and
11202 is the length value.
11203 All lengths should be specified in units of length such as inches (
11215 ) or relative to some document or font-based length such as
11225 \begin_layout Standard
11226 It's possible to change the spacing between a foilhead and the body of the
11227 foil by adjusting the length specified by
11234 For example, to make
11239 \begin_inset space \space{}
11242 in closer to their bodies put the following in the preamble:
11248 foilheadskip}{-0.5in}
11251 \begin_layout Standard
11252 The spacings around floats can be adjusted by setting these lengths:
11255 \begin_layout Labeling
11256 \labelwidthstring MMMMMMMMMMM
11263 Separation between the text and the top of the float
11266 \begin_layout Labeling
11267 \labelwidthstring MMMMMMMMMMM
11274 Separation between the float and the caption
11277 \begin_layout Labeling
11278 \labelwidthstring MMMMMMMMMMM
11285 Separation between the caption and the following text
11288 \begin_layout Labeling
11289 \labelwidthstring MMMMMMMMMMM
11296 You can make the captions narrower than the surrounding text by adjusting
11298 Best done relative to
11307 \begin_layout Standard
11308 There are also several title page related lengths that you may find useful
11309 if you have a long title or several authors:
11312 \begin_layout Labeling
11313 \labelwidthstring MMMMMMMMMMM
11320 Separation from headers to
11325 \begin_layout Labeling
11326 \labelwidthstring MMMMMMMMMMM
11344 \begin_layout Labeling
11345 \labelwidthstring MMMMMMMMMMM
11359 \begin_layout Labeling
11360 \labelwidthstring MMMMMMMMMMM
11376 \begin_layout Labeling
11377 \labelwidthstring MMMMMMMMMMM
11393 \begin_layout Standard
11394 The last length related command affects all the list environments.
11405 a list environment then all the vertical spacing between the list items
11407 Note that this is a command not a length so it doesn't require
11413 like the stuff mentioned above.
11416 \begin_layout Subsubsection
11417 Headers and Footers
11420 \begin_layout Standard
11433 commands control whether the logo in the
11437 definition appear on a given page.
11444 in the preamble then none of the foils will have the logo on them.
11445 If you don't want the logo on a particular page place the
11451 directly after the foilhead of that page and the
11457 directly after the next foilhead.
11460 \begin_layout Standard
11461 If you decide to use the
11465 page style setting in the
11468 \begin_inset space ~
11473 dialog you should probably add
11483 to your preamble so headers and footers on landscape pages are correctly
11484 placed when rotated.
11485 This is due to some clashes between the page layouts provided by the
11496 \begin_layout Section
11497 Hollywood (Hollywood spec scripts)
11500 \begin_layout Standard
11506 \begin_layout Subsection
11510 \begin_layout Standard
11511 Getting the format of a Hollywood script right is a
11512 \begin_inset Quotes eld
11516 \begin_inset Quotes erd
11519 It is designed to make the readers focus on content and to be easy and
11520 familiar for the actors to read.
11521 Each page of a script should be one minute of film.
11522 Nothing goes in a script that you cannot see or hear on screen.
11523 The courier 12 pt font should be used throughout.
11527 \begin_layout Subsection
11531 \begin_layout Standard
11532 Speakers' lines should NEVER break in mid-sentence.
11533 If a speaker's lines continue over a page break, repeat the
11537 title followed by (Cont'd).
11540 \begin_layout Subsection
11544 \begin_layout Standard
11549 names as labels then cross-reference the label to insert the name.
11550 The cross-reference dialog will show the current cast of characters.
11551 You can use this to insert the speaker name in narratives also.
11554 \begin_layout Subsection
11555 Paper size and Margins
11558 \begin_layout Standard
11559 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11562 \begin_layout Subsection
11566 \begin_layout Standard
11567 The following environments are available.
11568 You can use hollywood.bind to get the bind keys shown at the right.
11571 \begin_layout Itemize
11575 \begin_inset Newline newline
11580 Used where nothing else works.
11584 \begin_layout Itemize
11590 \begin_inset space \hfill{}
11598 \begin_inset Newline newline
11601 Usually followed by something like
11602 \begin_inset Quotes eld
11605 on Sally waking up.
11606 \begin_inset Quotes erd
11612 \begin_layout Itemize
11616 \begin_inset space \hfill{}
11620 \begin_inset Newline newline
11625 Introduces a new INTERIOR camera set-up.
11626 Always followed by DAY or NIGHT, or something similar to define the lighting
11628 Everthing on this line in CAPS.
11631 \begin_layout Itemize
11635 \begin_inset space \hfill{}
11639 \begin_inset Newline newline
11644 Introduces a new EXTERIOR camera set-up.
11645 Everthing on this line in CAPS.
11648 \begin_layout Itemize
11652 \begin_inset space \hfill{}
11656 \begin_inset Newline newline
11661 The character speaking.
11664 \begin_layout Itemize
11668 \begin_inset space \hfill{}
11672 \begin_inset Newline newline
11677 Instructions to the speaker.
11678 The () are automatically inserted, but only the ( will show in LyX.
11679 Both will be printed.
11682 \begin_layout Itemize
11686 \begin_inset space \hfill{}
11690 \begin_inset Newline newline
11702 \begin_layout Itemize
11706 \begin_inset space \hfill{}
11710 \begin_inset Newline newline
11715 Camera movement instruction.
11717 \begin_inset space \thinspace{}
11721 \begin_inset space \space{}
11727 \begin_layout Itemize
11731 \begin_inset space \hfill{}
11737 \begin_layout Itemize
11741 \begin_inset space \hfill{}
11747 \begin_layout Itemize
11751 \begin_inset space \hfill{}
11757 \begin_layout Itemize
11761 \begin_inset space \hfill{}
11767 \begin_layout Subsection
11771 \begin_layout Itemize
11775 \begin_layout Itemize
11779 \begin_layout Itemize
11781 \begin_inset space \thinspace{}
11788 \begin_layout Itemize
11793 \begin_layout Itemize
11794 PAN — camera movement
11797 \begin_layout Itemize
11798 INSERT — cut to close-up of
11801 \begin_layout Section
11805 \begin_layout Standard
11808 Panayotis Papasotiriou
11811 \begin_layout Subsection
11815 \begin_layout Standard
11816 The ijmpc package is a set of macros that facilitates electronic manuscript
11819 International Journal of Modern Physics C
11822 Similarly, the ijmpd package is for creating manuscripts to be submitted
11825 International Journal of Modern Physics D
11828 Both journals are published by World Scientific.
11829 The corresponding document classes are named
11838 These files, together with instructions for the authors, can be downloaded
11840 \begin_inset Flex URL
11843 \begin_layout Plain Layout
11845 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11851 \begin_inset Flex URL
11854 \begin_layout Plain Layout
11856 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11862 Both packages are modified versions of the standard
11863 \begin_inset Quotes eld
11867 \begin_inset Quotes erd
11870 package, and they are almost (but not exactly) identical.
11871 Most of their features are supported by LyX.
11872 I have used LyX successfully to write articles submitted to both journals
11873 without any problem.
11876 \begin_layout Subsection
11880 \begin_layout Standard
11881 As usual, the easiest way to write a paper is to start with a template.
11884 File\SpecialChar \menuseparator
11903 This will give an (almost) empty document that includes the most common
11904 fields found in a manuscript.
11905 Simply overwrite the existing text (including the brackets,
11910 You should keep in mind the following remarks.
11913 \begin_layout Enumerate
11914 LyX won't let you change the font size and the page style of the document,
11915 because such modifications are not allowed by both packages.
11918 \begin_layout Enumerate
11919 The language of the document should not be changed.
11920 Before previewing your paper, be sure that the babel package is not used.
11921 To do this, click on
11923 Tools\SpecialChar \menuseparator
11934 checkbox in the language settings, and click on
11942 , if you wish to make this change permanent).
11945 \begin_layout Enumerate
11947 \begin_inset Quotes eld
11951 \begin_inset Quotes erd
11954 style must be used to define keywords.
11957 \begin_layout Enumerate
11958 The ijmpc package provides a style named
11959 \begin_inset Quotes eld
11962 Classification Codes
11963 \begin_inset Quotes erd
11966 , which can be used to define classification codes, such as PACS numbers.
11967 Note that this facility is not supported by the ijmpd package.
11970 \begin_layout Enumerate
11971 Several new environments are available:
11972 \begin_inset Quotes eld
11976 \begin_inset Quotes erd
11980 \begin_inset Quotes eld
11984 \begin_inset Quotes erd
11988 \begin_inset Quotes eld
11992 \begin_inset Quotes erd
11996 \begin_inset Quotes eld
12000 \begin_inset Quotes erd
12004 \begin_inset Quotes eld
12008 \begin_inset Quotes erd
12012 \begin_inset Quotes eld
12016 \begin_inset Quotes erd
12020 \begin_inset Quotes eld
12024 \begin_inset Quotes erd
12028 \begin_inset Quotes eld
12032 \begin_inset Quotes erd
12036 \begin_inset Quotes eld
12040 \begin_inset Quotes erd
12044 \begin_inset Quotes eld
12048 \begin_inset Quotes erd
12052 \begin_inset Quotes eld
12056 \begin_inset Quotes erd
12060 \begin_inset Quotes eld
12064 \begin_inset Quotes erd
12068 \begin_inset Quotes eld
12072 \begin_inset Quotes erd
12076 \begin_inset Quotes eld
12080 \begin_inset Quotes erd
12084 Their use is more or less obvious.
12085 LyX supports all these environments; it will use the proper label, text
12086 style, and numbering scheme for each of them.
12089 \begin_layout Enumerate
12090 Both packages use basic citations; the natbib package should not be used.
12091 In LyX, citation references are shown as usual; in the output, citations
12092 are shown as superscripts.
12093 If you want to use a citation as normal text, you should use the
12098 \begin_inset space \thinspace{}
12102 \begin_inset space \space{}
12106 \begin_inset Quotes eld
12110 \begin_inset space \space{}
12120 \begin_inset Quotes erd
12126 \begin_layout Enumerate
12128 \begin_inset Quotes eld
12132 \begin_inset Quotes erd
12135 section in both packages.
12136 To put acknowledgments, just use the
12137 \begin_inset Quotes eld
12141 \begin_inset Quotes erd
12147 \begin_layout Enumerate
12148 Appendices may be added to the paper,
12152 the Acknowledgments and
12157 LyX provides a special environment, called
12158 \begin_inset Quotes eld
12162 \begin_inset Quotes erd
12165 which marks the beginning of the appendices.
12166 This environment should be left blank; it just sends a LaTeX command, but
12167 nothing is really printed.
12169 \begin_inset Quotes eld
12173 \begin_inset Quotes erd
12176 is printed with blue letters, as a signal that all sections after that
12177 point are appendices.
12178 To write an appendix, use the
12179 \begin_inset Quotes eld
12183 \begin_inset Quotes erd
12187 LyX will number each appendix with capital letters, as required by both
12190 \begin_inset Quotes eld
12194 \begin_inset Quotes erd
12201 be present before the first appendix; if not, all appendices will be numbered
12202 as normal sections in the output.
12205 \begin_layout Enumerate
12206 The ijmpc and the ijmpd packages use the
12210 command to implement table captions.
12211 As a result, a table created by LyX is printed correctly, but its caption
12213 However, you can use some TeX code to overcome this problem, so that captions
12214 are printed as expected.
12215 To do so, create a float table as usual, remove the caption, and replace
12216 it with the TeX code
12226 (sic); you must also the TeX code
12230 immediately after the tabular material.
12231 Study the example table included in the template files to see how this
12232 trick is implemented.
12233 Alternatively, If you need table captions, you should implement the whole
12238 file, then include this file to the LyX document (
12240 Insert\SpecialChar \menuseparator
12241 File\SpecialChar \menuseparator
12243 \begin_inset space ~
12249 Details on how to create a table float can be found in the files
12257 , included in the corresponding packages.
12260 \begin_layout Subsection
12261 Preparing a paper for submission
12264 \begin_layout Standard
12265 Before you submit your paper you must export the LyX document as a LaTeX
12268 File\SpecialChar \menuseparator
12269 Export\SpecialChar \menuseparator
12276 \begin_layout Plain Layout
12277 Actually you have the choice between LaTeX (plain) and pdflatex.
12278 If you intend to use pdflatex to prepare the paper, you should use the
12279 pdflatex option so that included graphics are converted to PDF format,
12280 ready for use by pdflatex.
12285 , then make the following changes to the resulting
12292 \begin_layout Enumerate
12293 Remove the comment lines before the
12302 \begin_layout Enumerate
12303 Remove everything between (and including) the
12315 commands, except for any commands you specifically put into the LaTeX preamble.
12318 \begin_layout Standard
12323 file should be saved and processed through LaTeX as many times as necessary.
12324 You may also want to check the resulting
12331 \begin_layout Subsection
12335 \begin_layout Standard
12336 The use of TeX code is reduced to two commands, which must be placed at
12337 the top of the document.
12338 If you started writing your paper by using the
12346 template, the TeX code needed is already in its place; you usually don't
12348 You may only modify the first TeX code to specify the information printed
12349 to the top of odd and even pages (authors' names and short paper's title,
12351 This TeX code must have the form
12355 markboth{Authors' Names}{Short Paper's Title}
12360 \begin_layout Section
12364 \begin_layout Standard
12370 \begin_layout Subsection
12374 \begin_layout Standard
12375 The iopart package provides a document class to create electronic manuscript
12376 submission to the journals published by the Institute of Physics.
12377 Instructions for the authors how to create a paper using the iopart class
12378 can be downloaded together with the iopart package from the site
12379 \begin_inset Flex URL
12382 \begin_layout Plain Layout
12384 ftp://ftp.iop.org/pub/journals/latex2e
12392 \begin_layout Subsection
12396 \begin_layout Standard
12397 The easiest way to write a paper is to start with the file
12401 that is available in LyX's examples files folder.
12402 Open this file, save it under a new name, and start writing.
12403 The example file explains how to use the special text environments.
12404 Here are the most important advices:
12407 \begin_layout Itemize
12408 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12411 Use AMS math package
12413 in the document settings under
12420 \begin_layout Itemize
12423 The title environment defines the kind of your paper.
12424 So use one of the following environments for the title:
12428 \begin_layout Itemize
12437 \begin_layout Itemize
12446 \begin_layout Itemize
12452 for a Topical review
12455 \begin_layout Itemize
12464 \begin_layout Itemize
12473 \begin_layout Itemize
12479 for a Paper (same as Title)
12482 \begin_layout Itemize
12488 for a Preliminary communication
12491 \begin_layout Itemize
12497 for a Rapid communication
12500 \begin_layout Itemize
12506 for a Letter to the editor
12510 \begin_layout Itemize
12513 All title environments except of
12517 can have an optional short title.
12520 \begin_layout Itemize
12521 There is a general title environment
12525 which is not directly supported by the LyX.
12526 This can be used as TeX code when your document doesn't fit into one of
12527 the other title types.
12530 \begin_layout Standard
12531 For more informations like hints for special table and formula formatting,
12532 look at the IOP author guidelines.
12535 \begin_layout Section
12539 \begin_layout Standard
12542 Panayotis Papasotiriou
12545 \begin_layout Subsection
12549 \begin_layout Standard
12550 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12551 that facilitates electronic manuscript submission to the journals they
12553 Most known of them (at least in my domain of interest) are
12555 Astrophysics and Space Science
12561 , but there are many others (see a complete list at
12562 \begin_inset Flex URL
12565 \begin_layout Plain Layout
12567 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12573 The Kluwer package may be downloaded from the site
12574 \begin_inset Flex URL
12577 \begin_layout Plain Layout
12579 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12585 A complete user guide is contained in that package (but it can also be
12586 downloaded separately).
12589 \begin_layout Standard
12590 LyX supports many features of the package but not everything.
12591 However, the TeX code needed is reduced to some
12592 \begin_inset Quotes eld
12596 \begin_inset Quotes erd
12599 commands of the package (see
12600 \begin_inset space ~
12604 \begin_inset CommandInset ref
12606 reference "subsec:kluwer_peculiarities"
12611 I have recently used LyX to write an article submitted to the
12613 Astrophysics and Space Science
12615 without any problem.
12618 \begin_layout Subsection
12622 \begin_layout Standard
12623 The easiest way to write a paper is to start with the Kluwer template file.
12626 File\SpecialChar \menuseparator
12638 This will give an (almost) empty document that includes the most common
12639 fields found in a manuscript and a short description of their use.
12640 As in most templates, simply overwrite the existing text (including the
12645 ) with the correct information.
12648 \begin_layout Subsection
12649 Preparing a paper for submission
12652 \begin_layout Standard
12653 As in the AASTeX package, before you submit your paper to a journal you
12655 \begin_inset Quotes eld
12659 \begin_inset Quotes erd
12665 \begin_layout Enumerate
12666 Export your paper as a LaTeX file.
12667 To do this, click on
12669 File\SpecialChar \menuseparator
12670 Export\SpecialChar \menuseparator
12677 \begin_layout Enumerate
12682 file with a text editor and make the following changes
12686 \begin_layout Enumerate
12687 remove the comment lines before the
12696 \begin_layout Enumerate
12697 remove everything between (and including) the
12709 commands, except for any commands you specifically put into the LaTeX preamble.
12712 \begin_layout Standard
12721 \begin_layout Enumerate
12726 file through LaTeX as many times as necessary (usually up to three).
12729 \begin_layout Enumerate
12735 \begin_inset space \thinspace{}
12739 \begin_inset space \space{}
12746 , and check if everything is OK (it should, if you didn't make any mistake).
12749 \begin_layout Subsection
12750 \begin_inset Quotes eld
12754 \begin_inset Quotes erd
12757 of the Kluwer package
12758 \begin_inset CommandInset label
12760 name "subsec:kluwer_peculiarities"
12767 \begin_layout Standard
12768 The Kluwer package has the following
12769 \begin_inset Quotes eld
12773 \begin_inset Quotes erd
12779 \begin_layout Enumerate
12780 It is possible to write multiple articles in the same LaTeX file
12784 \begin_layout Plain Layout
12785 I can't imagine any good reason to do this.
12791 Each article must be included in the environment
12792 \begin_inset Quotes eld
12796 \begin_inset Quotes erd
12800 Unfortunately, this environment cannot be omitted, even if you write just
12802 Therefore, each article starts with the command
12808 and, obviously, ends with the command
12815 Although this can be implemented in LyX, I didn't included it, since it
12816 looks ugly and can confuse the novice user.
12817 Therefore, you need to enter them directly and mark them as LaTeX code
12819 \begin_inset Quotes eld
12823 \begin_inset Quotes erd
12829 \begin_layout Enumerate
12830 Information given at the beginning of the article (i.
12831 \begin_inset space \thinspace{}
12835 \begin_inset space \space{}
12838 title, subtitle, author, institution, running title, running author, abstract
12839 and keywords) must be included in an environment called
12840 \begin_inset Quotes eld
12844 \begin_inset Quotes erd
12848 This is not implemented in LyX, so you must enter title, subtitle etc.
12849 \begin_inset space ~
12852 between two TeX code lines (
12867 \begin_layout Enumerate
12868 According to the user manual, the label of each bibliography item must be
12892 \begin_layout Standard
12897 template takes care of all these
12898 \begin_inset Quotes eld
12902 \begin_inset Quotes erd
12906 If you start a new paper using this template you don't need to do anything
12911 \begin_layout Enumerate
12912 don't delete the TeX code included in the template, and
12915 \begin_layout Enumerate
12916 copy the example bibliography item included in the template and modify it
12917 as necessary to enter new bibliography items.
12920 \begin_layout Section
12924 \begin_layout Standard
12930 \begin_layout Subsection
12934 \begin_layout Standard
12935 The LyX document classes
12937 article (koma-script)
12941 report (koma-script)
12959 correspond to the LaTeX document classes
12976 \begin_inset space ~
12979 of the Koma-Script family.
12980 They are replacements for the standard document classes
12996 , resp., and fit better to European typography conventions in a number of
13000 \begin_layout Itemize
13001 Standard character size is 11pt in
13003 article (koma-script)
13007 report (koma-script)
13015 letter (koma-script)
13020 \begin_layout Itemize
13021 Headings, labels of the description environment, and a number of elements
13024 letter (koma-script)
13026 document class are set in a bold sans serif font.
13030 \begin_layout Plain Layout
13031 There is a big difference between the bold sans serif old cm fonts and new
13032 ec fonts, especially in the appearance of headings.
13033 In comparison, the ec bold sans serif fonts look a bit thin.
13034 Here the LaTeX package
13042 helps to produce the
13043 \begin_inset Quotes eld
13047 \begin_inset Quotes erd
13050 appearance when using the ec fonts.
13055 The numbering of chapter headings is made in the same way as the numbering
13056 of section headings, that is without the extra line
13057 \begin_inset Quotes eld
13060 Chapter\SpecialChar \ldots{}
13062 \begin_inset Quotes erd
13066 In addition, the appearance of the headings can be modified by using a
13067 number of options (in LyX to be entered in the field
13070 \begin_inset space ~
13077 Layout\SpecialChar \menuseparator
13084 \begin_layout Itemize
13085 The main means in the Koma-Script document classes to design the type area
13094 (in LyX to be entered in the extra class options field in the dialog
13096 Document\SpecialChar \menuseparator
13100 They make a clearer modification of page margins possible as do the options
13103 Document\SpecialChar \menuseparator
13110 \begin_layout Itemize
13111 The LaTeX document classes of the Koma-Script family define a number of
13112 additional commands.
13113 Those part of it which makes sense in LyX is implemented in corresponding
13117 \begin_layout Standard
13118 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13119 can be found in the Koma-Script documentation
13130 \begin_layout Subsection
13131 article (koma-script), report (koma-script), and book (koma-script)
13134 \begin_layout Standard
13135 The document classes
13137 article (koma-script)
13141 report (koma-script)
13151 are implemented in the layout files
13164 They contain all the paragraph types of the corresponding standard document
13177 , resp., partly modified, with the exception of the LyX specific
13181 -type, which is replaced by the new
13185 -type having the same functionality.
13190 -Type there is a number of new paragraph types added.
13197 letter (koma-script)
13202 \begin_layout Itemize
13211 : are equivalents to
13219 , resp., additionally inserting an entry in the table of contents.
13228 are not contained in
13230 article (koma-script)
13235 \begin_layout Itemize
13244 : behave exactly as
13252 , resp., additionally clearing running heads.
13257 is not contained in
13259 article (koma-script)
13265 \begin_layout Plain Layout
13278 report (koma-script)
13280 , but since this is identical to
13284 , is has not been implemented in LyX.
13292 \begin_layout Itemize
13297 : generates a heading directly above the following paragraph in the standard
13298 character size without affecting the structure of the document.
13301 \begin_layout Itemize
13310 are special captions which respect the different space settings needed
13311 for captions placed above or below an element (if you follow strict typographic
13312 rules, you might want to place table captions always above the table).
13313 You can also use the class option
13317 , which will switch
13330 You need at least Koma-Script version 2.8q to use this.
13333 \begin_layout Itemize
13338 : can be used to set a bonmot, e.
13339 \begin_inset space \thinspace{}
13343 \begin_inset space \space{}
13346 at the beginning of a chapter.
13347 If you use the optional argument (
13349 Insert\SpecialChar \menuseparator
13351 \begin_inset space ~
13356 ), you can insert the dictum's author there.
13357 Dictum and author are separated by a line.
13358 You need at least Koma-Script version 2.8q to use this.
13363 is not contained in
13365 article (koma-script)
13370 \begin_layout Standard
13371 The following types, together with the standard types
13383 , form the title area of the document.
13384 They must be entered ahead of the first
13385 \begin_inset Quotes eld
13389 \begin_inset Quotes erd
13396 \begin_layout Plain Layout
13397 The corresponding LaTeX commands must appear before the
13408 When such a type is used more than once, the latter usage overwrites the
13409 former one, that means, for every type only the latest usage is valid.
13410 The order of the different types however has, like
13422 , no effect on the appearance of the produced document.
13425 \begin_layout Itemize
13430 : produces a centered paragraph above the ordinary title (
13442 ) for the subject of the document.
13445 \begin_layout Itemize
13450 : produces a centered paragraph below the ordinary title (
13462 ) for the publishers' name.
13465 \begin_layout Itemize
13472 report (koma-script)
13478 produces a centered paragraph on its own page behind the title page, or
13481 article (koma-script)
13483 produces a centered paragraph below the ordinary title (
13499 ) for a dedication.
13502 \begin_layout Itemize
13507 : produces a left aligned paragraph above the ordinary title (
13523 ) for a document`s head.
13526 \begin_layout Itemize
13531 : produces in a double-sided print in
13533 report (koma-script)
13539 a left-aligned paragraph at the top of the title page`s back or has no
13540 effect in a single-sided print or in
13542 article (koma-script)
13547 \begin_layout Itemize
13552 : produces in a double-sided print in
13554 report (koma-script)
13560 a left-aligned paragraph at the bottom of the title page`s back or has
13561 no effect in a single-sided print or in
13563 article (koma-script)
13568 \begin_layout Itemize
13573 : produces a special
13574 \begin_inset Quotes eld
13578 \begin_inset Quotes erd
13581 page ahead of the actual document containing a paragraph without special
13585 \begin_layout Standard
13586 The layout files for the document classes
13588 article (koma-script)
13592 report (koma-script)
13598 do include the file
13603 This is thought of as a place to define your own types.
13608 in your personal layout directory and edit the file!
13611 \begin_layout Subsection
13612 letter (koma-script)
13615 \begin_layout Standard
13619 letter (koma-script)
13621 is implemented in the layout file
13626 It contains all the paragraph types of the corresponding standard document
13631 , partly modified, with the exception of the LyX specific types
13643 type, which is replaced by the new
13648 In addition, it contains, in contrast to the standard document class, the
13666 Furthermore, there are a number of new letter specific types.
13669 \begin_layout Standard
13670 The appearance of the letter produced by this document class can be controlled
13671 by a number of LaTeX commands, which you can put in the LaTeX preamble.
13675 \begin_layout Plain Layout
13676 For example, the standard appearance of the letter`s heading, consisting
13677 of name and address, is quite self-willed.
13679 \begin_inset Quotes eld
13683 \begin_inset Quotes erd
13686 heading is produced by the following LaTeX commands in the preamble:
13689 \begin_layout LyX-Code
13699 \begin_layout LyX-Code
13715 \begin_layout LyX-Code
13725 \begin_layout LyX-Code
13745 A detailed German description of such LaTeX commands can be found in the
13746 Koma-Script documentation
13751 With it, the letter's author can produce his personal letter layout.
13754 \begin_layout Standard
13763 define the beginning of the letter and must be used in every letter.
13764 To emphasize them in the LyX document class, they are marked with the letter
13774 \begin_inset space ~
13777 in the left margin.
13778 It is possible to write any number of letters in one file.
13783 type produces a new letter using the same addressee and a
13787 type produces a new addressee.
13804 are ordinary paragraph types and can also be used several times in one
13805 and the same letter.
13808 \begin_layout Itemize
13813 : produces a paragraph for the addressee and implicitly defines the beginning
13817 \begin_layout Itemize
13822 : produces a paragraph for the form of address and implicitly produces a
13826 \begin_layout Itemize
13831 : produces a paragraph for a close.
13834 \begin_layout Itemize
13839 : produces a paragraph for a postscript.
13842 \begin_layout Itemize
13847 : produces a paragraph for a distribution list.
13850 \begin_layout Itemize
13855 : produces a paragraph for enclosures.
13858 \begin_layout Standard
13899 are input types provided with a label to enter information, which will
13900 be processed by the document class.
13904 \begin_layout Plain Layout
13905 It could be seen as a matter of inconsequence, that the types
13913 described above are not such input types as well.
13914 Because of the special meaning of those types, however, I have implemented
13915 them as ordinary paragraph types with a one letter mark in the left margin.
13916 Moreover, it would affect my feeling of symmetry, if the
13924 type had such a serious different appearance.
13929 The types must be used ahead of the corresponding
13936 \begin_layout Standard
13937 An implementation of these types in a WYSIWYG fashion does not seem to make
13938 sense, because the real appearance of the produced letter does not only
13939 depend on the usage of the particular type, but also on other factors.
13940 For example, a signature entered in the
13944 type will in the standard behavior appear in the produced letter only,
13945 when in the same letter also a
13950 The entered value of the
13954 type will in the standard behavior not appear in the produced letter at
13956 The possibility to design the letter`s heading freely is already indicated
13957 in a footnote above.
13960 \begin_layout Standard
13961 The input types can also be used as empty paragraphs.
13962 This makes sense e.
13963 \begin_inset space \thinspace{}
13967 \begin_inset space \space{}
13979 type is not used at all, in the standard behavior the value of the
13983 type is used as signature, whereas if an empty
13987 type is used, no signature value is defined.
13990 \begin_layout Standard
13991 By using the input types it is possible to write a letter template, containing
13992 filled input types with your personal dates (name, address, etc.) and empty
13993 input types for other dates you want to enter.
13996 \begin_layout Itemize
14001 : sender's name, in the standard behavior appears as a centered paragraph
14002 in small caps in the letter`s heading.
14005 \begin_layout Itemize
14010 : sender's signature, in the standard behavior appears below the
14019 type is used, the value of the
14023 type appears instead.
14026 \begin_layout Itemize
14031 : sender's address, in the standard behavior appears in a centered paragraph
14032 in the letter`s heading below the sender's name.
14035 \begin_layout Itemize
14040 : sender's telephone number, in the standard behavior only sets the LaTeX
14050 \begin_layout Itemize
14055 : place of the letter`s making.
14058 \begin_layout Itemize
14063 : date of the letter`s making.
14072 , in the standard behavior, produce the place and the date in a right-aligned
14073 line below the addressee's field.
14078 type is used, neither place nor date appear, independent of the value of
14088 type is used, the date of the letter `s production is used.
14091 \begin_layout Itemize
14096 : sender`s back address, in the standard behavior appears above the addressee's
14097 field in a small sans serif font.
14100 \begin_layout Itemize
14105 : special mail information, in the standard behavior appears underlined
14106 above the addressee's field below the back address.
14109 \begin_layout Itemize
14114 : additional information, in the standard behavior appears on right side
14115 below the addressee`s field.
14118 \begin_layout Itemize
14123 : the letter's title, in the standard behavior appears in a big, bold, sans
14124 serif font above the subject.
14127 \begin_layout Itemize
14132 : the letter's subject, in the standard behavior appears in a bold font
14140 \begin_layout Standard
14161 produce a business letter like line above the
14165 line containing the fields
14166 \begin_inset Quotes eld
14170 \begin_inset Quotes erd
14174 \begin_inset Quotes eld
14178 \begin_inset Quotes erd
14182 \begin_inset Quotes eld
14186 \begin_inset Quotes erd
14190 \begin_inset Quotes eld
14194 \begin_inset Quotes erd
14198 \begin_inset Quotes eld
14202 \begin_inset Quotes erd
14206 \begin_inset Quotes eld
14210 \begin_inset Quotes erd
14214 For the date field, the value of the
14220 \begin_inset Quotes eld
14223 business letter types
14224 \begin_inset Quotes erd
14227 is used, the value of the
14231 type however does not appear, but only the LaTeX variable
14238 The ordinary output of place and date in a right-aligned line below the
14239 addressee`s field is suppressed.
14240 The types are implemented as input types provided with a label and must
14241 be used ahead of the corresponding
14248 \begin_layout Itemize
14256 \begin_layout Itemize
14264 \begin_layout Itemize
14272 \begin_layout Itemize
14280 \begin_layout Itemize
14288 \begin_layout Subsection
14289 The new letter class: letter (koma-script v.2)
14292 \begin_layout Standard
14298 \begin_layout Standard
14299 \begin_inset VSpace medskip
14305 \begin_layout Standard
14307 Koma-Script version 2.8 has introduced a new letter class
14311 which supersedes the now unsupported
14316 It has — on the LaTeX side — a completely new interface and is not compatible
14317 with the old class.
14318 Therefore, LyX supports both, though it is recommended you use the new
14322 \begin_layout Standard
14323 This class covers the same functionality as
14325 letter (koma-script),
14328 The basic items are
14332 (receiver's address, same as
14336 in the old layout),
14349 will start a new letter (i.
14350 \begin_inset space \thinspace{}
14354 \begin_inset space \space{}
14357 you can write several letters per document).
14358 New elements are sender's
14374 and the possibility to use a
14380 Insert\SpecialChar \menuseparator
14386 \begin_layout Standard
14387 The biggest improvement is, though, that the letter's layout is configurable
14388 to meet almost any needs.
14389 This can be done via the preamble or with a special style file (Letter
14390 Class Option, extension
14394 ), that will be read in as a class option.
14398 \begin_layout Plain Layout
14399 The KOMA package comes with some default
14404 There is, for instance, a
14408 file that follows german typesetting rules, or a
14412 that provides the default layout of the old
14417 The latter can be loaded with the class option
14426 ayout\SpecialChar \menuseparator
14431 ocument\SpecialChar \menuseparator
14443 template that is included in LyX for examples.
14444 A detailed description is to be found in the Koma-Script documentation
14452 \begin_layout Subsection
14456 \begin_layout Standard
14457 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14461 \begin_layout Itemize
14462 The chapter number of a
14466 type appears on a line of its own above the chapter heading instead of
14467 appearing in the same line ahead of it.
14468 The cause for that is the LyX internal behavior for the labeltype
14472 in the layout file.
14475 \begin_layout Itemize
14476 The headings of the types
14484 are only put in the
14485 \begin_inset Quotes eld
14489 \begin_inset Quotes erd
14492 LaTeX table of contents, but not in the LyX table of contents (
14494 Document\SpecialChar \menuseparator
14496 \begin_inset space ~
14500 \begin_inset space ~
14508 \begin_layout Itemize
14509 The paragraphs in a
14513 document class appear in a skip separation mode, not indented.
14514 This is the standard behavior, no special LaTeX commands are needed for
14518 Document\SpecialChar \menuseparator
14521 dialog the corresponding radio button indicates
14530 value always has the effect that extra LaTeX commands are inserted in the
14531 document to produce the gap, which is not what is wanted in this case.
14534 \begin_layout Section
14538 \begin_layout Standard
14544 \begin_layout Subsection
14548 \begin_layout Standard
14549 Memoir is a very powerful and constantly evolving class.
14550 It has been designed with regard to fictional and non-fictional literature.
14551 Its aim is to let the user have maximum control over the typesetting of
14553 Memoir is based on the standard book class, but it can also emulate the
14554 article class (see below).
14557 \begin_layout Standard
14558 Peter Wilson, the developer of Memoir, is known as the author of lots of
14559 useful packages in the LaTeX world.
14560 Most of them have been merged with Memoir.
14561 Therefore, it is much easier to layout the table of contents, appendices,
14562 chapter designs and such.
14563 LyX, though, does not support all of these goodies natively.
14564 Some of them might be added to forthcoming releases
14568 \begin_layout Plain Layout
14569 You are invited to send suggestions to
14570 \begin_inset Flex URL
14573 \begin_layout Plain Layout
14575 lyx-devel@lists.lyx.org
14585 , lots will probably never, due to the limitations of LyX's framework.
14586 Of course you can still use all features with the help of some native LaTeX
14591 \begin_layout Plain Layout
14596 \begin_layout Plain Layout
14606 \begin_inset space ~
14610 \begin_inset CommandInset ref
14612 reference "sec:Inserting-TeX-Code"
14622 In this section, we can only list those features which are natively supported
14624 For detailed descriptions (and for the rest of features) we recommend you
14625 have a look at the detailed manual of the Memoir class
14629 \begin_layout Plain Layout
14634 \begin_layout Plain Layout
14644 \begin_inset Flex URL
14647 \begin_layout Plain Layout
14649 CTAN:/macros/latex/memoir/memman.pdf
14659 , which is not only a user guide for the class, but also both a comprehensive
14660 description on good typesetting and a superb example for good typesetting
14664 \begin_layout Subsection
14665 Basic features and restrictions
14668 \begin_layout Standard
14669 Memoir supports basically all features of the standard book classes.
14670 There are, however, some differences, as follows:
14673 \begin_layout Description
14675 \begin_inset space ~
14678 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14681 \begin_layout Description
14683 \begin_inset space ~
14686 style: The fancy page style is not supported, due to a command clash between
14687 Memoir and the fancyhdr package (they both define a command with the same
14688 name, which confuses LaTeX).
14689 Instead, Memoir comes with a number of its own page styles (see
14691 Layout\SpecialChar \menuseparator
14692 Document\SpecialChar \menuseparator
14694 \begin_inset space ~
14700 If you want to use these for the chapter pages, you have to use the command
14707 in the main text or in preamble (e.
14708 \begin_inset space \thinspace{}
14712 \begin_inset space \space{}
14719 chapterstyle{companion}
14724 \begin_layout Description
14725 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14726 optional argument in the standard classes.
14727 With this, you can specify an alternative version of the title for the
14728 table of contents and the headers (for instance, if the title is too long).
14729 In LyX, you can do this via
14731 Insert\SpecialChar \menuseparator
14733 \begin_inset space ~
14738 at the beginning of a chapter/section.
14739 Memoir features a second optional argument and thus separates the table
14740 of contents from the header.
14741 You can define three variants of a title with this: one for the main text,
14742 one for the table of contents, and one for the headers.
14743 Simply insert two optional arguments if you need this feature, the first
14744 one containing the short title for the Table of Contents, the second one
14745 containing an alternative short title for the headers.
14748 \begin_layout Description
14749 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14750 of contents, the list of figures and the list of table start a new page
14752 Memoir does not follow this route.
14753 You have to insert a page break yourself, if you want to have one.
14756 \begin_layout Description
14757 Titlepage: For some unknown reason, Memoir uses pagination on the title
14758 page (in the standard classes, title pages are
14759 \begin_inset Quotes eld
14763 \begin_inset Quotes erd
14767 \begin_inset space \thinspace{}
14771 \begin_inset space \space{}
14775 If you want an empty title page, type
14779 aliaspagestyle{title}{empty}
14784 \begin_layout Description
14785 Article: With the class option
14791 Layout\SpecialChar \menuseparator
14792 Document\SpecialChar \menuseparator
14794 \begin_inset space ~
14799 ), you can emulate article style.
14800 That is, counters (footnotes, figures, tables etc.) will not be reset on
14801 new chapters, chapters don't start a new page (but are—in contrary to
14802 \begin_inset Quotes eld
14806 \begin_inset Quotes erd
14809 article classes—still allowed), parts, though, use their own page, as in
14813 \begin_layout Description
14814 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14815 font commands, which have been used in the old LaTeX version 2.09 (e.
14816 \begin_inset space \thinspace{}
14820 \begin_inset space \space{}
14836 It produces an error and stops LaTeX whenever such a command appears.
14841 reallows the commands and spits out warnings instead (which does at least
14843 Since a lot of packages and particularly BibTeX style files are still using
14844 those commands, we have decided to use this option by default.
14847 \begin_layout Subsection
14851 \begin_layout Standard
14852 We will only describe the features supported by LyX (which is not much currently
14854 Please consult the Memoir manual
14858 \begin_layout Plain Layout
14863 \begin_layout Plain Layout
14873 \begin_inset Flex URL
14876 \begin_layout Plain Layout
14878 CTAN:/macros/latex/memoir/memman.pdf
14891 \begin_layout Description
14892 Abstract: You may wonder why an abstract is an extra feature.
14893 Well, it is in book class.
14894 Usually books don't have abstracts.
14895 Memoir, however, has.
14896 You can use it wherever and how often you like.
14899 \begin_layout Description
14900 Chapterprecis: You may know this older typesetting style: The contents of
14901 a chapter are summarized below the title and also in the table of contents
14903 \begin_inset space \thinspace{}
14907 \begin_inset space \space{}
14912 Our hero arrives in Troia; he loses some friends; he finds others
14915 Chapterprecis does exactly this.
14916 It is therefore only sensible below a chapter.
14919 \begin_layout Description
14920 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14921 The epigraph environment provides an elegant way of typesetting such a
14923 The motto itself (text) and its author (source) are divided by a short
14925 Unfortunately, we have to fool LyX a bit here again, since the environment
14926 needs two arguments (text and source).
14927 In this case, we have to use curly brackets (in TeX mode) between the two
14938 <author of the slogan>.
14941 \begin_layout Description
14942 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14943 complex figurative poems).
14944 LyX can only support a few of them.
14945 One is poemtitle, which is a centered title for poems, which will also
14946 be added to the table of contents (verse is the standard environment for
14948 Memoir has some enhanced versions of verse, but you need to use TeX code,
14949 because they have to be nested inside regular verse environments, which
14950 is not possible with LyX).
14953 \begin_layout Description
14954 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14957 \begin_layout Section
14958 Article (mwart), book (mwbk) and report (mwrep)
14959 \begin_inset Argument
14962 \begin_layout Plain Layout
14975 \begin_layout Standard
14981 \begin_layout Standard
14982 The LyX document classes
14998 correspond to the LaTeX document classes
15011 They are replacements for the standard document classes
15023 , resp., and fit better to Polish typography conventions in a number of points.
15027 \begin_layout Standard
15031 \begin_layout Itemize
15032 Unnumbered titles (with star, e.
15033 \begin_inset space \thinspace{}
15037 \begin_inset space \space{}
15044 ) are added into table of contents,
15047 \begin_layout Itemize
15048 Additional page styles:
15052 \begin_layout Description
15053 uheadings header with separated lines,
15056 \begin_layout Description
15057 myheadings custom header, contents headers via commands:
15072 \begin_layout Description
15073 myuheadings custom header with separated lines,
15076 \begin_layout Description
15077 outer page number is placed on outer side of page
15081 \begin_layout Itemize
15086 \begin_layout Description
15087 rmheadings serif titles — default,
15090 \begin_layout Description
15091 sfheadings sansserif titles,
15094 \begin_layout Description
15095 authortitle on title page first placed is author next title — default,
15098 \begin_layout Description
15099 titleauthor on title page first placed is title next author,
15102 \begin_layout Description
15103 withmarginpar reserve place on page for margins.
15107 \begin_layout Section
15111 \begin_layout Standard
15116 provides an alternative to the standard
15121 It provides similar functionality, but you might prefer this layout with
15122 sans serif sections, headings, and more.
15125 \begin_layout Section
15129 \begin_layout Standard
15135 \begin_layout Standard
15136 \begin_inset VSpace bigskip
15142 \begin_layout Standard
15147 \begin_inset space ~
15152 textclass works with the American Physical Sociey's RevTeX 4.0 (the
15153 \begin_inset Formula $\beta$
15156 release of May, 1999) class.
15159 \begin_layout Standard
15164 textclass, which works with RevTeX 3.1.
15165 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15166 That means that it doesn't interact very well with LyX, which requires
15167 LaTeX2e, although it has been kludged to work.
15168 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15172 \begin_inset space ~
15177 textclass should also be pretty easy to use.
15180 \begin_layout Standard
15181 These documents are supposed to be used in
15185 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15186 macros, and assume you'll know what to put in the preamble if necessary.
15189 \begin_layout Subsection
15193 \begin_layout Standard
15194 All you need to do is install RevTeX 4, as described in the package's README
15196 The package can be found at The RevTeX 4 Web Site
15197 \begin_inset Flex URL
15200 \begin_layout Plain Layout
15202 http://publish.aps.org/revtex4/
15208 Install it somewhere that LaTeX can see it.
15209 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15211 \begin_inset space \thinspace{}
15215 \begin_inset space \space{}
15218 not the directory where you installed the class file.) Then, if you reconfigure
15219 LyX, it will find the class file and let you use the RevTeX4 textclass.
15222 \begin_layout Standard
15223 Probably the easiest way to get started is either to import a RevTeX 4 document
15231 \begin_inset space ~
15236 template, found in the templates directory.
15239 \begin_layout Subsection
15243 \begin_layout Standard
15244 Optional arguments to
15251 \begin_inset Quotes eld
15255 \begin_inset Quotes erd
15259 \begin_inset Quotes eld
15263 \begin_inset Quotes erd
15273 \begin_inset space ~
15281 \begin_inset space ~
15287 Remember that in RevTeX, at least one optional argument is required!
15290 \begin_layout Standard
15291 Other preamble matter, like
15298 \begin_inset space ~
15304 \begin_inset space ~
15309 dialog, also as usual.
15312 \begin_layout Subsection
15316 \begin_layout Standard
15317 The layouts basically correspond to the commands in RevTeX4.0.
15318 For example, the Email layout corresponds to
15325 Note that (at least as of RevTeX 4.0 Beta), the
15333 layouts are exactly equivalent, so you shouldn't need to use both.
15337 \begin_layout Plain Layout
15338 In case you're curious, both were included so that
15342 would be able to translate both
15362 \begin_layout Subsection
15366 \begin_layout Standard
15367 There are a couple of important unique aspects of RevTeX 4 which might cause
15368 bugs that will be even more confusing in LyX.
15371 \begin_layout Standard
15389 The LyX equivalent is that there is a separate Thanks layout.
15394 write footnotes in the
15398 layout, or weird things may happen.
15399 See the RevTeX 4 documentation for more details.
15402 \begin_layout Standard
15406 \begin_inset space ~
15414 \begin_inset space ~
15423 layouts must be placed
15431 layout and the corresponding
15448 , the LaTeX won't compile.
15451 \begin_layout Subsection
15455 \begin_layout Standard
15456 The main problem with this layout is that you can't use the optional arguments
15457 to layouts like Email and Title.
15458 (The problem is not unique to this layout; you can't use optional arguments
15459 to the Section layouts either.) This means that after you export that file
15460 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15461 need to edit the LaTeX file with a text editor to add the optional arguments
15463 \begin_inset space \thinspace{}
15467 \begin_inset space \space{}
15470 the running title for the page headers.
15471 Lacking these layouts makes the
15477 (and the equivalent
15483 ) useless, so the corresponding layouts don't exist, and will have to be
15488 \begin_layout Plain Layout
15493 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15494 has not been updated yet to take advantage of it.
15502 \begin_layout Section
15503 Springer Journals (
15510 \begin_layout Standard
15516 \begin_layout Subsection
15520 \begin_layout Standard
15521 These are the layout files for some of the journal formats used by Springer
15522 Verlag and listed on
15523 \begin_inset Flex URL
15526 \begin_layout Plain Layout
15528 http://www.springer.de/author/tex/help-journals.html
15533 , where you should also go to fetch the class files (yes, these are LaTeX2e
15535 It is a modular system: the things common to all journals are implemented
15540 , which journal-specific layout files (such as, e.
15541 \begin_inset space \thinspace{}
15545 \begin_inset space \space{}
15552 for Journal of Geodesy) can include.
15555 \begin_layout Standard
15556 This means that implementing support for any other Springer journal on this
15557 list is as simple as writing your own
15565 file following the outline given in
15573 \begin_layout Standard
15574 It is reasonably well tested only for the Journal of Geodesy.
15583 come with the standard LyX distribution.
15584 Install the relevant class file (downloaded from Springer) in a proper
15585 directory, reconfigure LaTeX (in the teTeX case by running
15589 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15590 and it should work.
15593 \begin_layout Subsection
15597 \begin_layout Standard
15598 A large number of theorem-like styles —
15604 \SpecialChar \ldots{}
15610 \begin_layout Standard
15613 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15614 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15617 See the Springer class file documentation for details.
15620 \begin_layout Subsection
15624 \begin_layout Itemize
15636 \begin_layout Itemize
15639 Probability Theory and Related Fields
15645 — Jean-Marc Lasgouttes
15648 \begin_layout Standard
15649 Add your own, it isn't so hard!
15652 \begin_layout Subsection
15656 \begin_layout Standard
15657 These files are partly based on the older
15661 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15662 file from Springer.
15667 layout, are now defunct.
15668 Jean-Marc Lasgouttes helped out big in making me find my way around the
15669 LyX layout file mechanism.
15672 \begin_layout Subsection
15676 \begin_layout Standard
15678 But probably less than in the old hacked-LaTeX
15685 \begin_layout Standard
15687 \begin_inset space \thinspace{}
15690 g.: does not display the number for theorem-like layouts, just #.
15693 \begin_layout Section
15699 \begin_inset CommandInset label
15708 \begin_layout Standard
15716 \begin_layout Subsection
15720 \begin_layout Standard
15721 This section describes how to use LyX to make slides for overhead projectors.
15722 There are two document classes that can do this: the default slides class
15728 This section documents the former.
15731 \begin_layout Standard
15732 I'm going to say this again, nice and clear, so that there's no misunderstanding
15736 \begin_layout Standard
15737 \begin_inset VSpace bigskip
15743 \begin_layout Standard
15747 This section documents the class
15748 \begin_inset Quotes eld
15756 \begin_inset Quotes erd
15764 \begin_layout Standard
15765 \begin_inset VSpace bigskip
15771 \begin_layout Standard
15772 If you're looking for the documentation for
15773 \begin_inset Quotes eld
15781 \begin_inset Quotes erd
15784 , check out section
15785 \begin_inset space ~
15789 \begin_inset CommandInset ref
15791 reference "sec:foiltex"
15801 \begin_inset Quotes eld
15809 \begin_inset Quotes erd
15812 ] is actually somewhat better than the default
15820 \begin_layout Plain Layout
15821 \SpecialChar \ldots{}
15822 or so I've been told repeatedly by its advocates.
15823 Having never used it, I have no idea if this claim is true or not.
15828 which this section documents.
15831 \begin_layout Standard
15832 This class is the LaTeX2e improvement of the old
15837 Every LaTeX2e distribution includes this class [which I'll just refer to
15839 \begin_inset Quotes eld
15847 \begin_inset Quotes erd
15850 from now on], so you're bound to have it.
15851 As I noted earlier, there are other classes, such as
15855 , which also produce slides for overhead projectors and do a better job
15857 However, there are some things which
15861 can do which the others can't, such as generate overlays.
15862 Read on to learn more!
15865 \begin_layout Subsection
15867 \begin_inset CommandInset label
15869 name "sec:slidesetup"
15876 \begin_layout Standard
15877 Obviously, to use this document class, you need to select
15878 \begin_inset Quotes eld
15886 \begin_inset Quotes erd
15889 from the class list in the
15891 Document\SpecialChar \menuseparator
15895 There are some other special things you should know about this class:
15898 \begin_layout Itemize
15899 Don't bother changing the options
15904 They're not supported by the
15911 \begin_layout Itemize
15915 \begin_inset space ~
15920 behaves a bit differently for this class.
15921 The possible choices and what they do are as follows:
15925 \begin_layout Description
15930 The final output contains page numbers in the lower right corner.
15933 \begin_layout Description
15942 , but also prints out any time markers you've put in.
15943 This is the default.
15946 \begin_layout Description
15951 The final output contains no page numbers, time markers, or alignment markers.
15955 \begin_layout Itemize
15960 class has an extra option:
15966 \begin_inset Quotes eld
15974 \begin_inset Quotes erd
15977 in the extra class options.
15981 \begin_layout Standard
15982 Using this options allows you to add time markers to
15988 \begin_inset space ~
15992 \begin_inset CommandInset ref
15994 reference "sec:slideNote"
16002 \begin_layout Standard
16003 You can also use the template file
16004 \begin_inset Quotes eld
16012 \begin_inset Quotes erd
16015 to automatically set up a document to use the
16021 File\SpecialChar \menuseparator
16023 \begin_inset space ~
16027 \begin_inset space ~
16032 to open your new document].
16033 The template file also contains some examples of the special paragraph
16034 environments used by this class.
16035 I'll describe those next.
16038 \begin_layout Subsection
16039 Paragraph Environments
16042 \begin_layout Subsubsection
16043 Supported Environments
16046 \begin_layout Standard
16047 The first thing you'll notice when you start up a new
16051 document is the font size and type: it's the equivalent of the size
16052 \begin_inset Quotes eld
16060 \begin_inset Quotes erd
16066 \begin_inset space ~
16072 This is also what's used in the output.
16074 \begin_inset Quotes eld
16078 \begin_inset Quotes erd
16081 to remind you that this is a slide.
16082 Your final slides will use a larger font; ergo, you'll have less space.
16083 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16086 \begin_layout Standard
16087 The next thing that becomes obvious is the changes to the paragraph environment
16088 pull-down box [at the far-left end of the toolbar].
16089 Most of the paragraph environments you're used to seeing are missing.
16090 There are also five new ones.
16095 class itself only supports certain paragraph environments:
16098 \begin_layout Itemize
16104 \begin_layout Itemize
16110 \begin_layout Itemize
16116 \begin_layout Itemize
16122 \begin_layout Itemize
16128 \begin_layout Itemize
16134 \begin_layout Itemize
16140 \begin_layout Itemize
16146 \begin_layout Itemize
16152 \begin_layout Itemize
16158 \begin_layout Itemize
16164 \begin_layout Standard
16165 All of the other standard environments, including the section-heading environmen
16166 ts, aren't used in the
16173 \begin_layout Standard
16174 On the other hand, you'll notice the following new environments:
16177 \begin_layout Itemize
16183 \begin_layout Itemize
16189 \begin_layout Itemize
16195 \begin_layout Itemize
16201 \begin_layout Itemize
16207 \begin_layout Standard
16208 These five are kind of quirky, due to a
16209 \begin_inset Quotes eld
16213 \begin_inset Quotes erd
16217 You see, LyX doesn't permit you to nest any other paragraph environment
16218 into an empty environment.
16219 Now, that's fine and dandy, but it means that you wouldn't be able to start
16220 a slide with anything except plain text.
16221 To deal with this, I've performed a little
16222 \begin_inset Quotes eld
16226 \begin_inset Quotes erd
16232 \begin_layout Subsubsection
16233 Quirks of the New Environments
16234 \begin_inset CommandInset label
16236 name "sec:slideQuirk"
16243 \begin_layout Standard
16244 All five of the new paragraph environments are somewhat quirky due to inherent
16245 limitiations in the current version of LyX.
16246 As I just mentioned, LyX forbids environments that begin with another environme
16248 To get around this, the
16252 environment isn't a paragraph environment as described in the
16260 \begin_layout Standard
16261 You should consider
16274 \begin_inset Quotes eld
16277 pseudo-environments.
16278 \begin_inset Quotes erd
16281 They look like a section heading or a
16282 \begin_inset Quotes eld
16290 \begin_inset Quotes erd
16293 but really begin a [and, if necessary, end the previous] paragraph environment.
16303 \begin_inset Quotes eld
16307 \begin_inset Quotes erd
16310 These two perform some action.
16313 \begin_layout Standard
16314 A common feature of all five environments,
16334 , is a rather long-ish label.
16335 The text following this label — ordinarily the contents of the paragraph
16336 environment — is utterly irrelevant for
16357 LyX completely ignores it.
16358 In fact, you can leave these five environments completely empty.
16362 \begin_layout Standard
16367 to put any text after the rather long-ish label, you might want to.
16368 This could be a short description of the contents of the
16373 In that case, enter your descriptive comment and hit
16377 as you normally would.
16380 \begin_layout Standard
16381 If, on the other hand, you don't want to enter any descriptive text, you'll
16382 hit another LyX quirk.
16383 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16384 environment until you put something in the old one.
16388 \begin_layout Itemize
16389 Start entering the text that will
16417 \begin_layout Itemize
16418 Now move to the beginning of that paragraph.
16422 \begin_layout Itemize
16431 \begin_layout Itemize
16432 Finally, change this new, empty paragraph to a
16456 \begin_layout Standard
16457 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16461 \begin_layout Subsection
16462 Making a Presentation with
16475 \begin_layout Subsubsection
16483 \begin_layout Standard
16484 If you're expecting this section to teach you how to actually make a presentatio
16485 n, you'll be sorely disappointed.
16486 Naturally, I'll describe all of the ways the
16490 class can assist you in preparing the materials for a presentation.
16491 Filling in the contents, however, is up to you.
16496 the LyX philosophy.]
16499 \begin_layout Standard
16504 environment [in the manner described in section
16505 \begin_inset space ~
16509 \begin_inset CommandInset ref
16511 reference "sec:slideQuirk"
16515 ] tells LyX to begin a new slide [duh].
16516 The label for this environment/
16517 \begin_inset Quotes erd
16521 \begin_inset Quotes erd
16525 \begin_inset Quotes eld
16529 \begin_inset Quotes erd
16532 in cool blue, followed by the label,
16533 \begin_inset Quotes eld
16537 \begin_inset Quotes erd
16541 Any text or paragraph environments that follow this one go on the new slide.
16545 \begin_layout Standard
16546 Slides are probably the only time you'll need to forcibly end pages in LyX
16547 (this can be specified in the
16552 In fact, you'll want to, once you finish entering the contents of one slide.
16553 If you've entered more text than can physically fit on a slide, the extra
16554 overflows onto a new slide.
16555 I don't recommend doing this, however, since the overflow slide won't have
16556 any page number on it.
16557 Furthermore, it may interfere with any
16561 you've made to accompany the oversized
16568 \begin_layout Standard
16577 environments work the same way as the
16582 They both create an
16583 \begin_inset Quotes eld
16587 \begin_inset Quotes erd
16590 followed by a label [
16591 \begin_inset Quotes eld
16595 \begin_inset Quotes erd
16599 \begin_inset Quotes eld
16603 \begin_inset Quotes erd
16607 The color is a stunning magenta instead of blue, and the
16608 \begin_inset Quotes eld
16612 \begin_inset Quotes erd
16615 will look different, in style and in length.
16616 The label fonts of all three also differ from one another.
16619 \begin_layout Standard
16624 , if the contents of a
16632 exceed the physical size of a slide or sheet of paper, the extra will overflow
16634 Again, you should avoid this.
16635 It defeats the whole purpose of
16646 \begin_layout Subsubsection
16656 \begin_layout Standard
16661 is a slide that sits atop another slide.
16662 Perhaps you wish to discuss a figure on the main
16666 before displaying the text associated with it.
16667 One way to accomplish this is tape a flap of dark paper over the part of
16672 you want to display later.
16673 This method fails, however, if you wish to overlap one graph with another,
16675 You would then have to fumble while speaking to align the two separate,
16680 s to align the two graphs.
16685 environment in both cases makes life much easier.
16688 \begin_layout Standard
16693 receives the page number of its
16694 \begin_inset Quotes eld
16698 \begin_inset Quotes erd
16706 \begin_inset Quotes eld
16714 \begin_inset Quotes erd
16721 \begin_layout Plain Layout
16722 Presumably, mutliple
16727 \begin_inset Quotes eld
16735 \begin_inset Quotes erd
16739 \begin_inset Quotes eld
16747 \begin_inset Quotes erd
16751 \begin_inset Quotes eld
16759 \begin_inset Quotes erd
16763 \begin_inset space ~
16766 appended to the page number of the parent
16776 Clearly, you want the contents of both the
16784 to each fit on a single physical slide! You should probably consider an
16790 \begin_inset Quotes eld
16794 \begin_inset Quotes erd
16806 class provides a visual cue for this: the label at the start of an
16810 is shorter than that at the start of a
16815 Lastly, when you generate printable output, you'll find alignment markers
16816 in all four corners of both the
16820 page and its parent
16825 These will assist you in lining up the two physical slides.
16828 \begin_layout Standard
16829 The major problem in overlaying two slides is aligning the contents of the
16830 two transparencies.
16831 How much space should you leave for that graph on the second slide? Worse
16832 still, what if you want a graph and a sentence on second slide, but there
16833 is text on the main transparency that goes in between them? You could try
16834 and insert vertical space of the right size.
16835 The better way is to use
16846 \begin_layout Standard
16847 As their names imply,
16855 are two command-like paragraph environments that make all subsequent text
16856 invisible and visible, respectively.
16858 \begin_inset space ~
16862 \begin_inset CommandInset ref
16864 reference "sec:slideQuirk"
16868 that you don't place anything
16872 these two environments, however.
16877 , it inserts a centered, sky-blue label into the page reading
16878 \begin_inset Quotes eld
16881 <Invisible Text Follows>
16882 \begin_inset Quotes erd
16886 For paragraphs following this label, the parts of the
16894 ; it doesn't matter which] where they would be contain instead blank space.
16898 \begin_layout Standard
16903 , the corresponding centered label is
16904 \begin_inset Quotes eld
16907 <Visible Text Follows>
16908 \begin_inset Quotes erd
16912 Paragraphs following this label behave normally.
16913 Note that the beginning of a new
16925 automatically shuts off an
16930 It's therefore not necessary to use
16941 \begin_layout Standard
16942 By now, it should be obvious how to create overlay transparencies using
16943 the proper combination of
16962 \begin_layout Enumerate
16967 , including everything that will appear on it, whether on the main slide
16975 \begin_layout Enumerate
16976 Before each figure or paragraph that will appear only on the
16985 If necessary, insert a
16989 environment after the
16996 \begin_layout Enumerate
17001 immediately following the
17008 \begin_layout Enumerate
17009 Copy the contents of this
17020 \begin_layout Enumerate
17025 , change all of the
17036 \begin_layout Standard
17038 You've just made an
17045 \begin_layout Standard
17046 There's one problem with the way I've designed the LyX
17050 class: you can't make text in the middle of a paragraph invisible, nor
17051 make text in the middle of an invisible paragraph visible again.
17052 To accomplish this feat, you'll need to use some inlined LaTeX codes.
17056 \begin_layout Plain Layout
17057 The commands of interest are:
17060 \begin_layout Itemize
17065 invisible \SpecialChar \ldots{}
17069 \begin_layout Itemize
17074 visible \SpecialChar \ldots{}
17078 \begin_layout Plain Layout
17079 \SpecialChar \ldots{}
17080 and need to be marked as TeX.
17082 \begin_inset Quotes eld
17086 \begin_inset Quotes erd
17089 you wish to change goes in between the brackets [and after the
17102 If you don't know how to mark text as TeX, see the appropriate section
17115 \begin_layout Subsubsection
17125 \begin_inset CommandInset label
17127 name "sec:slideNote"
17134 \begin_layout Standard
17143 is associated with a
17144 \begin_inset Quotes eld
17148 \begin_inset Quotes erd
17160 class provides visual cues.
17165 is shorter than that of a
17169 [yet longer than that of an
17173 ] and, like the label of an
17177 is shockingly magenta.
17178 Additionally, the printed
17182 has the page number of its
17183 \begin_inset Quotes eld
17187 \begin_inset Quotes erd
17195 \begin_inset Quotes eld
17203 \begin_inset Quotes erd
17207 \begin_inset Quotes eld
17215 \begin_inset Quotes erd
17219 \begin_inset Quotes eld
17227 \begin_inset Quotes erd
17231 You can have multiple
17235 s associated with a single
17247 , you'll probably want to break up long
17251 s so that they fit on a single sheet of paper.
17254 \begin_layout Standard
17259 is obvious: it contains anything additional you might want to say about
17265 It could also be used as a sheet of reminders for a particular
17270 In the case of the latter, you might want to make use of time markers.
17276 \begin_inset Quotes eld
17280 \begin_inset Quotes erd
17283 support for time markers, a
17288 So, you'll have to resort to using the LaTeX codes.
17291 \begin_layout Standard
17292 To use time markers, you'll need to specify the extra class option
17293 \begin_inset Quotes eld
17301 \begin_inset Quotes erd
17305 \begin_inset space ~
17309 \begin_inset CommandInset ref
17311 reference "sec:slidesetup"
17316 This option turns on timing marks, which will appear in the lower-left-hand
17322 To set what appears in the time marker, you use the LaTeX commands
17323 \begin_inset Quotes eld
17333 \begin_inset Quotes erd
17337 \begin_inset Quotes eld
17347 \begin_inset Quotes erd
17351 The arguments of both commands are time measured in seconds.
17353 \begin_inset Quotes eld
17363 \begin_inset Quotes erd
17366 sets the time marker to a given time.
17368 \begin_inset Quotes eld
17378 \begin_inset Quotes erd
17381 increments the time marker by the specified amount.
17382 Using time markers and
17386 s in this fashion, you can remind yourself how much time to spend on a particula
17394 \begin_layout Standard
17395 There's one last feature to describe.
17396 Clearly, you'd like to print out all of your
17404 s on transparencies while printing all of your
17421 with which it is associated.
17422 What's a person to do?
17425 \begin_layout Standard
17426 Luckily, there are two LaTeX commands that allow you to select what to print
17428 Both must be placed into the preamble of your document.
17430 \begin_inset Quotes eld
17442 \begin_inset Quotes erd
17445 will cause the output to contain only the
17454 Correspondingly, the command
17455 \begin_inset Quotes eld
17467 \begin_inset Quotes erd
17470 prevents the output of anything but
17475 I'd advise placing both commands in the preamble and initially comment
17477 You can then preview your entire presentation as you write.
17478 When you're done writing, you can then uncomment one of the two to select
17479 what you want to print.
17480 I like to uncomment
17481 \begin_inset Quotes eld
17493 \begin_inset Quotes erd
17496 , print to a file with
17497 \begin_inset Quotes eld
17505 \begin_inset Quotes erd
17508 in its name, comment it back out, then uncomment
17509 \begin_inset Quotes eld
17521 \begin_inset Quotes erd
17525 \begin_inset Quotes eld
17533 \begin_inset Quotes erd
17537 I can then send either file to a printer, loading transparencies or plain
17538 paper as appropriate.
17541 \begin_layout Standard
17542 You can also provide other arguments to the
17543 \begin_inset Quotes eld
17553 \begin_inset Quotes erd
17557 \begin_inset Quotes eld
17567 \begin_inset Quotes erd
17571 See a good LaTeX book for details.
17574 \begin_layout Subsection
17579 Class Template File
17582 \begin_layout Standard
17583 I have also provided a template file,
17584 \begin_inset Quotes eld
17592 \begin_inset Quotes erd
17600 To use it, begin your new presentation with
17605 ile\SpecialChar \menuseparator
17607 \begin_inset space ~
17611 \begin_inset space ~
17621 Your new LyX presentation file will contain an example
17642 additionally contain an example of the use of
17651 Lastly, the preamble will contain:
17654 \begin_layout LyX-Code
17655 % Uncomment to print out only slides and overlays
17658 \begin_layout LyX-Code
17662 \begin_layout LyX-Code
17668 \begin_inset Newline newline
17674 \begin_layout LyX-Code
17675 % Uncomment to print out only notes
17678 \begin_layout LyX-Code
17682 \begin_layout LyX-Code
17690 \begin_layout Standard
17691 One final thing: I created this class to support the LaTeX2e
17692 \begin_inset Quotes eld
17700 \begin_inset Quotes erd
17703 class, one of the built-in LaTeX2e classes.
17704 Neither I nor the rest of the LyX Team endorse or oppose the use of this
17705 built-in slide class.
17706 It's here if you want it or need it.
17707 There exist other LaTeX2e classes for creating presentations, such as the
17713 \begin_inset space ~
17717 \begin_inset CommandInset ref
17719 reference "sec:foiltex"
17724 \begin_inset Quotes eld
17732 \begin_inset Quotes erd
17735 package [present on some TeX distributions].
17736 The latter is not yet supported under LyX.
17740 \begin_layout Plain Layout
17741 Perhaps you can take on the task\SpecialChar \ldots{}
17747 I know nothing about these other classes.
17748 Try them out to see what sort of alternative they provide.
17751 \begin_layout Chapter
17752 LyX Features needing Extra Software
17755 \begin_layout Section
17759 \begin_layout Standard
17765 \begin_layout Subsection
17769 \begin_layout Standard
17778 \begin_layout Plain Layout
17783 is not yet available when you are using the LaTeX distribution MiKTeX.
17788 , you'll find in the
17795 \begin_inset space ~
17806 \begin_inset CommandInset href
17808 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17815 \begin_layout Standard
17820 package is a program that was written by
17821 \begin_inset Flex Noun
17824 \begin_layout Plain Layout
17826 \begin_inset space ~
17834 in frustration because some constructs in LaTeX are sometimes non-intuitive,
17835 and easy to forget.
17836 The program runs over your LaTeX file, checks the integrity of the file,
17837 and flags some common errors.
17838 In other technical words, it is
17845 \begin_layout Standard
17846 Well, what is a syntax checker doing in LyX which is supposed to produce
17847 correct LaTeX anyways? The answer is simple: Just as
17851 not only checks the
17855 of C programs, but also does
17859 checks for type-errors,
17863 catches some common
17867 errors, in addition to the syntactical ones.
17872 is capable of detecting several common errors, such as
17875 \begin_layout Itemize
17876 Ellipsis detection:
17877 \begin_inset Newline newline
17880 Use \SpecialChar \ldots{}
17884 \begin_layout Itemize
17885 No space in front of/after parenthesis:
17886 \begin_inset Newline newline
17892 \begin_layout Itemize
17893 Enforcement of normal space after common abbreviations:
17894 \begin_inset Newline newline
17898 \begin_inset space \thinspace{}
17902 \begin_inset space \space{}
17905 is too wide spacing.
17908 \begin_layout Itemize
17909 Enforcement of end-of-sentence space when the last sentence ends with a
17911 \begin_inset Newline newline
17915 And this is wrong spacing.
17918 \begin_layout Itemize
17919 Space in front of labels and similar commands:
17920 \begin_inset Newline newline
17923 The label should stick right up to the text to avoid falling to a wrong
17926 \begin_inset CommandInset label
17936 \begin_layout Plain Layout
17937 This footnote is in danger of falling off to a wrong page
17942 The label is separated too much.
17945 \begin_layout Itemize
17946 Space in front of references, instead of hard spaces:
17947 \begin_inset Newline newline
17950 In you are in bad luck, the text will break right between the referenced
17951 text and reference number, and that's a pity.
17953 \begin_inset CommandInset ref
17955 reference "sec:chktex"
17962 \begin_layout Itemize
17964 \begin_inset Quotes eld
17968 \begin_inset Quotes erd
17972 \begin_inset Formula $\times$
17976 \begin_inset Newline newline
17979 2x2 looks cheap compared to
17980 \begin_inset Formula $2\times2$
17986 \begin_layout Standard
17987 and more \SpecialChar \ldots{}
17988 It is an invaluable tool when you are
17989 \begin_inset Quotes eld
17993 \begin_inset Quotes erd
17996 your document before printing, and you should run it right after the obligatory
17997 spelling check, and before you go fine tuning the typesetting.
18000 \begin_layout Subsection
18004 \begin_layout Standard
18005 If you have the program installed, usage is as simple as choosing
18007 Tools\SpecialChar \menuseparator
18009 \begin_inset space ~
18015 This will make LyX generate a LaTeX file of your document, start
18019 to check it, and then make LyX insert
18020 \begin_inset Quotes eld
18024 \begin_inset Quotes erd
18027 with the warnings from
18031 , if there were any.
18032 The warnings will be placed close to the point of the mistake, and you
18033 can quickly find them by using the
18035 Navigate\SpecialChar \menuseparator
18038 menu item, or the shortcut key
18047 Open the error boxes by clicking on them with the mouse, or use the shortcut
18056 bindings, or the corresponding
18065 Read the warning and correct the mistake, if it is a mistake.
18066 If you have trouble understanding what the warning is about, you can safely
18068 Remember that there is a hidden layer between the document on screen and
18069 the technical details in invoking
18073 , and this gap can make some warnings seem arcane or just right down plain
18077 \begin_layout Standard
18078 This document is an excellent testing bed for the feature, and it should
18079 provide quite a few warnings for you to fiddle with.
18080 Since computers are only so smart, expect most of the warnings to be false
18084 \begin_layout Subsection
18085 How to fine tune it
18088 \begin_layout Standard
18089 Sometimes, you'll find that
18093 makes more noise than suits your mood.
18094 Then you can choose not to use it, wait until your mood changes, or try
18099 to get better along with you.
18102 \begin_layout Standard
18111 very configurable and extensible, you shouldn't expect to solve all problems
18117 Since LyX has to generate a somewhat special LaTeX file to be able to match
18118 the line numbers from the
18126 \begin_layout Plain Layout
18127 You can inspect the specific output from
18133 Edit\SpecialChar \menuseparator
18135 \begin_inset space ~
18139 \begin_inset space ~
18153 to the internal document structure, some of the warnings will not seen
18154 to appear correctly.
18155 There are two things you can do about this:
18158 \begin_layout Itemize
18163 invocation command line in
18179 installation configuration file (usually with the file
18184 See below to learn what warnings can be enabled and disabled on the command
18189 \begin_layout Itemize
18190 Export your document as a raw LaTeX file using
18192 File\SpecialChar \menuseparator
18193 Export\SpecialChar \menuseparator
18201 Invoked in this way, it can be a hassle to find the corresponding place
18202 in the document inside LyX, but with a little patience, you should be able
18206 \begin_layout Standard
18207 Here follows the warning messages that can be enabled and disabled in
18216 to disable a warning, and
18220 to enable a warning.
18221 The emphasized entries are disabled by default, because the default is
18224 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18229 \begin_layout Standard
18230 Notice that you should only use the options that enable and disable warnings,
18231 because LyX relies on some of the other command line parameters to be set
18232 in a specific way to have a chance to communicate with
18239 \begin_layout Enumerate
18243 Command terminated with space.
18246 \begin_layout Enumerate
18249 Non-breaking space (
18250 \begin_inset Quotes eld
18258 \begin_inset Quotes erd
18261 ) should have been used.
18264 \begin_layout Enumerate
18268 You should enclose the previous parenthesis with
18269 \begin_inset Quotes eld
18277 \begin_inset Quotes erd
18283 \begin_layout Enumerate
18286 Italic correction (
18287 \begin_inset Quotes eld
18297 \begin_inset Quotes erd
18300 ) found in non-italic buffer.
18303 \begin_layout Enumerate
18306 Italic correction (
18307 \begin_inset Quotes eld
18317 \begin_inset Quotes erd
18320 ) found more than once.
18323 \begin_layout Enumerate
18327 No italic correction (
18328 \begin_inset Quotes eld
18338 \begin_inset Quotes erd
18344 \begin_layout Enumerate
18348 \begin_inset Quotes eld
18356 \begin_inset Quotes erd
18360 \begin_inset Quotes eld
18368 \begin_inset Quotes erd
18374 \begin_layout Enumerate
18377 Wrong length of dash may have been used.
18380 \begin_layout Enumerate
18384 \begin_inset Quotes eld
18392 \begin_inset Quotes erd
18396 \begin_inset Quotes eld
18404 \begin_inset Quotes erd
18410 \begin_layout Enumerate
18414 \begin_inset Quotes eld
18422 \begin_inset Quotes erd
18428 \begin_layout Enumerate
18432 \begin_inset Quotes eld
18440 \begin_inset Quotes erd
18443 to achieve an ellipsis.
18446 \begin_layout Enumerate
18449 Inter-word spacing (
18450 \begin_inset Quotes eld
18460 \begin_inset Quotes eld
18463 ) should perhaps be used.
18466 \begin_layout Enumerate
18469 Inter-sentence spacing (
18470 \begin_inset Quotes eld
18480 \begin_inset Quotes erd
18483 ) should perhaps be used.
18486 \begin_layout Enumerate
18489 Could not find argument for command.
18492 \begin_layout Enumerate
18496 \begin_inset Quotes eld
18504 \begin_inset Quotes erd
18510 \begin_layout Enumerate
18513 Math mode still on at end of LaTeX file.
18516 \begin_layout Enumerate
18520 \begin_inset Quotes eld
18528 \begin_inset Quotes erd
18531 doesn't match the number of
18532 \begin_inset Quotes eld
18540 \begin_inset Quotes erd
18546 \begin_layout Enumerate
18549 You should use either
18552 \begin_inset Quotes eld
18560 \begin_inset Quotes erd
18565 as an alternative to
18566 \begin_inset Quotes eld
18574 \begin_inset Quotes erd
18580 \begin_layout Enumerate
18587 " (ASCII 39) instead of "
18594 \begin_layout Enumerate
18597 User-specified pattern found.
18600 \begin_layout Enumerate
18603 This command might not be intended.
18606 \begin_layout Enumerate
18613 \begin_layout Enumerate
18631 \begin_layout Enumerate
18634 Delete this space to maintain correct page references.
18637 \begin_layout Enumerate
18641 You might wish to put this between a pair of
18642 \begin_inset Quotes eld
18650 \begin_inset Quotes erd
18656 \begin_layout Enumerate
18659 You ought to remove spaces in front of punctuation.
18662 \begin_layout Enumerate
18665 Could not execute LaTeX command.
18668 \begin_layout Enumerate
18677 in front of small punctuation.
18680 \begin_layout Enumerate
18688 may look prettier here.
18691 \begin_layout Enumerate
18695 Multiple spaces detected in output.
18698 \begin_layout Enumerate
18701 This text may be ignored.
18704 \begin_layout Enumerate
18710 \begin_inset Quotes eld
18715 to begin quotation, not
18722 \begin_layout Enumerate
18729 to end quotation, not
18732 \begin_inset Quotes eld
18740 \begin_layout Enumerate
18746 \begin_layout Enumerate
18749 You should perhaps use
18750 \begin_inset Quotes eld
18758 \begin_inset Quotes erd
18764 \begin_layout Enumerate
18767 You should put a space in front of/after parenthesis.
18770 \begin_layout Enumerate
18773 You should avoid spaces in front of/after parenthesis.
18776 \begin_layout Enumerate
18780 You should not use punctuation in front of/after quotes.
18783 \begin_layout Enumerate
18786 Double space found.
18789 \begin_layout Enumerate
18792 You should put punctuation outside inner/inside display math mode.
18795 \begin_layout Enumerate
18798 You ought to not use primitive TeX in LaTeX code.
18801 \begin_layout Enumerate
18804 You should remove spaces in front of
18805 \begin_inset Quotes eld
18813 \begin_inset Quotes erd
18819 \begin_layout Enumerate
18822 \begin_inset Quotes eld
18830 \begin_inset Quotes erd
18833 is normally not followed by
18834 \begin_inset Quotes eld
18842 \begin_inset Quotes erd
18848 \begin_layout Standard
18849 In later versions of LyX, we hope to provide a more complete interface to
18850 this tool (and it's smaller cousin
18854 ) to exploit the full power of it.
18855 But it's not exactly useless as it is now: go try it on one of your existing
18856 documents of a certain length and be surprised.
18859 \begin_layout Section
18860 Version Control in LyX
18863 \begin_layout Standard
18866 Lars Gullik Bjønnes
18873 \begin_layout Subsection
18877 \begin_layout Standard
18878 A friend of mine wanted to try LyX for a group project.
18879 When he didn't find support for version control or file locking, he dropped
18881 This angered me a bit, so I thought that I should at least make support
18882 for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
18883 This has been done.
18884 LyX now supports some of the most basic RCS/CVS/SVN commands.
18885 If you need something a bit more sophisticated you will have to do that
18886 manually in a terminal.
18889 \begin_layout Standard
18890 Also note that CVS support is not as good as subversion support so we advice
18892 Good place to start with Subversion is SVN Book
18896 \begin_layout Plain Layout
18897 \begin_inset CommandInset href
18899 target "http://svnbook.red-bean.com/"
18909 In case of RCS you should read
18910 \begin_inset Quotes eld
18914 \begin_inset Quotes erd
18917 (a man file, read it with
18922 This file describes all the basic features of RCS.
18923 You should especially notice the comment about a RCS directory, and the
18924 notion of a master RCS file (the file ending in
18931 \begin_layout Standard
18932 Before you begin to use the version control features in LyX, you should
18933 be familiar with RCS/CVS/SVN usage.
18934 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18935 package—no guarantees are made for older versions.
18936 Most of the log messages are not currently displayed after operations —
18937 you can check them in Messages pane if unsure.
18940 \begin_layout Standard
18941 For introducing your own external commands consult vc-command in the manual
18945 \begin_layout Subsection
18946 RCS commands in LyX
18949 \begin_layout Standard
18950 The following sections describe the RCS commands supported by LyX.
18951 You can find them in the
18953 File\SpecialChar \menuseparator
18955 \begin_inset space ~
18961 LyX was tested against RCS 5.7/5.8.
18964 \begin_layout Subsubsection
18970 \begin_layout Standard
18971 If your document is not under revision control, this is the only item shown
18973 And if it is under revision control, the
18977 item is not visible.
18981 \begin_layout Standard
18982 This command registers your document with RCS (unless you are under the
18983 directory managed by CVS)\SpecialChar \@.
18984 You are asked interactively to supply an initial
18985 description of the document.
18986 The document is now set in Read-Only mode and you have to
18989 \begin_inset space ~
18993 \begin_inset space ~
18997 \begin_inset space ~
19002 , before making any changes to it.
19003 A document under revision control has a
19004 \begin_inset Quotes eld
19007 [RCS:<version> <locker>]
19008 \begin_inset Quotes erd
19011 item tagged to the filename in the minibuffer.
19014 \begin_layout Standard
19015 RCS command that is run:
19017 ci -q -u -i -t-"<initial description>" <file-name>
19020 \begin_layout Standard
19025 to understand the switches.
19029 \begin_layout Subsubsection
19035 \begin_layout Standard
19036 When you are finished editing a file, you check in your changes.
19037 When you do this, you are asked for a description of the changes.
19038 This is stored in the history log.
19039 The version number is bumped, your changes are applied to the master RCS
19040 file, the document is unlocked and set to Read-Only mode.
19044 \begin_layout Standard
19047 ci -q -u -m"<description>" <file-name>
19050 \begin_layout Subsubsection
19056 \begin_layout Standard
19057 By doing this you lock the document so that only you can edit it.
19058 This will also make the document Read-Write only for you.
19059 You will usually continue editing for a while and when you are finished
19060 you check in your changes.
19061 The status line is changed to reflect that you have locked the file.
19065 \begin_layout Standard
19068 co -q -l <file-name>
19071 \begin_layout Subsubsection
19074 Revert To Repository Version
19077 \begin_layout Standard
19078 This will discard all changes made to the document since the last check
19080 You get a warning before changes are discarded.
19083 \begin_layout Standard
19086 co -f -u<version> <file-name>
19089 \begin_layout Subsubsection
19095 \begin_layout Standard
19096 This makes as if the last check in never happened.
19097 No changes are made to the document loaded into LyX, but the last version
19098 is removed from the master RCS file.
19102 \begin_layout Standard
19105 rcs -o<version> <file-name>
19108 \begin_layout Subsubsection
19114 \begin_layout Standard
19115 This shows the complete history of the RCS document.
19120 is shown in a browser.
19128 \begin_layout Subsubsection
19132 \begin_layout Standard
19133 LyX supports RCS version number, author name, date and time of last commit.
19134 All those are extracted from
19136 rlog -r <file-name>
19139 For other details see
19140 \begin_inset CommandInset ref
19142 reference "sub:VCS-Revision-Information"
19149 \begin_layout Subsection
19150 CVS commands in LyX
19153 \begin_layout Standard
19154 A subset of CVS operations is supported by LyX.
19155 You can find the commands in the
19157 File\SpecialChar \menuseparator
19159 \begin_inset space ~
19165 The version control system SVN is more powerful, so please use it instead
19166 of CVS if possible.
19169 \begin_layout Subsubsection
19175 \begin_layout Standard
19176 If you start from scratch with CVS you have to create your repository and
19177 checkout the working copy with external tools.
19178 If you're using a client-server setup you may need to login before doing
19179 the first repository checkout.
19182 \begin_layout Standard
19183 If your documents are under revision control and others are using the same
19184 repository problems arise when different changes to the same document at
19185 the same location happen.
19186 Standard CVS repositories doesn't operate with a file locking mechanism.
19187 This may be surprising, but conflicts only occur if people disagree on
19188 the proper content of the same part of a document.
19189 So, if co-workers are used to communicate regularly, these conflicts occur
19191 If they don't communicate they have a fundamental problem anyway.
19192 Nevertheless some people like to work with so called
19193 \begin_inset Quotes eld
19197 \begin_inset Quotes erd
19201 If they do so the working copy of all files is readonly when checked out
19202 first and the user starts editing after using a special command to make
19203 the working copy writable.
19204 When the changes are checked in the working copy returns to readonly state.
19205 With LyX one has to edit the
19206 \begin_inset Flex Code
19209 \begin_layout Plain Layout
19215 file and add the line
19216 \begin_inset Flex Code
19219 \begin_layout Plain Layout
19225 to work with reserved checkouts.
19226 The benefit is the possibility to see who is using a writable copy of some
19228 It's not guaranteed only one user makes a copy writable.
19231 \begin_layout Standard
19232 LyX tries to guess if you're using reserved or non-reserved checkouts.
19233 If your working copy is readonly or it is writable and an additional copy
19234 of your document exists in the CVS/Base sub-directory a reserved otherwise
19235 a non-reserved checkout is assumed.
19236 When a reserved checkout is detected you have to use
19237 \begin_inset Flex MenuItem
19240 \begin_layout Plain Layout
19246 to make your working copy writable if it's readonly.
19248 \begin_inset Flex MenuItem
19251 \begin_layout Plain Layout
19257 operation is possible and that makes your working copy readonly again after
19258 transferring your changes to the repository.
19261 \begin_layout Standard
19262 More information about CVS can be found here
19263 \begin_inset Flex URL
19266 \begin_layout Plain Layout
19268 http://www.nongnu.org/cvs
19274 \begin_inset Flex URL
19277 \begin_layout Plain Layout
19279 http://ximbiot.com/cvs
19287 \begin_layout Standard
19292 to understand the sub-commands and the switches mentioned below.
19295 \begin_layout Subsubsection
19301 \begin_layout Standard
19302 If your document is not under revision control, this is the only item shown
19304 And if it is under revision control, the
19311 item is not visible.
19315 \begin_layout Standard
19316 This command registers in CVS your document
19317 \begin_inset Flex Strong
19320 \begin_layout Plain Layout
19328 in case you have already the documents directory under CVS control (in
19334 This means you have to create or checkout the archive by yourself using
19336 (In case you forget that step LyX registers the document with RCS.)
19339 \begin_layout Standard
19340 Then you are asked interactively to supply an initial description of the
19342 Don't forget that registered file is not yet checked in.
19345 \begin_layout Standard
19346 CVS command that is run:
19348 cvs -q add -m"<entered message>" "<file-name>"
19351 \begin_layout Standard
19356 above and for all other CVS commands is an abbreviation for
19357 \begin_inset Quotes eld
19360 change the current working directory to file location and use the file name
19361 without path component as argument
19362 \begin_inset Quotes erd
19368 \begin_layout Subsubsection
19374 \begin_layout Standard
19375 When you are finished editing a file, you commit your changes.
19376 When you do this and you had changed the document, you are asked for a
19377 description of the changes.
19378 After that changes are written to the repository.
19379 In case you didn't change the document and a reserved checkout is detected
19380 the reservation made on
19381 \begin_inset Flex MenuItem
19384 \begin_layout Plain Layout
19393 \begin_layout Labeling
19394 \labelwidthstring 00.00.0000
19396 \begin_inset space ~
19400 \begin_inset space ~
19404 \begin_inset Newline newline
19408 \begin_inset Flex Code
19411 \begin_layout Plain Layout
19414 -q commit -m"<description>" "<file-name>"
19420 \begin_inset Newline newline
19424 \begin_inset Flex Code
19427 \begin_layout Plain Layout
19438 \begin_layout Subsubsection
19444 \begin_layout Standard
19445 When you are sharing a repository with others, you may have to incorporate
19446 their changes into your working copy.
19449 \begin_layout Standard
19452 cvs -q update "<file-name>"
19455 \begin_layout Standard
19456 If a readonly checkout is detected the working copy is made writable and
19460 \begin_layout Standard
19463 cvs -q edit "<file-name>"
19466 \begin_layout Subsubsection
19469 Revert To Repository Version
19472 \begin_layout Standard
19473 This will discard all changes made to the document since the last check
19475 You get a warning before changes are discarded.
19476 Firstly the file is deleted, secondly CVS update command is run.
19479 \begin_layout Standard
19482 cvs -q update "<file-name>"
19485 \begin_layout Standard
19486 If a reserved checkout is detected and the working copy has no changes only
19487 the reservation is undone.
19490 \begin_layout Standard
19493 cvs -q unedit "<file-name>"
19496 \begin_layout Subsubsection
19497 Update of the local directory checkout from repository
19500 \begin_layout Standard
19501 Once your documents gets more complex, containing sub-documents and pictures,
19503 \begin_inset Flex Code
19506 \begin_layout Plain Layout
19512 files and so on using version control becomes more complicated.
19513 LyX supports updating the whole tree in which resides the document.
19514 This become especially useful once you cooperate with people which neither
19515 have detailed knowledge about CVS usage nor they have ambition to commit
19516 additional material to the repository.
19517 You have to organize the files structure so that all external files are
19518 in the same directory or subdirectories of the document.
19519 It's good practice anyway to store multipart documents in an extra directory.
19522 \begin_layout Standard
19524 \begin_inset Flex Code
19527 \begin_layout Plain Layout
19528 Update local directory from repository
19533 command updates the whole directory.
19534 If local changes are detected user is warned before update starts.
19535 In case of merge conflicts both versions of the conflicting document parts
19536 are placed in the final document.
19537 You have to review and correct the result of the merge.
19538 You'll find the conflicts enclosed in pairs of
19539 \begin_inset Flex Code
19542 \begin_layout Plain Layout
19549 \begin_inset Flex Code
19552 \begin_layout Plain Layout
19559 \begin_inset Flex Code
19562 \begin_layout Plain Layout
19569 The first part is your version as before the update operation with the
19570 document name prepended.
19571 The second one is the repository version with the version number after
19573 \begin_inset Flex Code
19576 \begin_layout Plain Layout
19585 \begin_layout Labeling
19586 \labelwidthstring 00.00.0000
19588 \begin_inset space ~
19592 \begin_inset space ~
19596 \begin_inset Newline newline
19600 \begin_inset Flex Code
19603 \begin_layout Plain Layout
19611 (Ask if changes are detected.)
19612 \begin_inset Newline newline
19616 \begin_inset Flex Code
19619 \begin_layout Plain Layout
19620 cd $path; cvs -q update
19630 \begin_layout Standard
19632 \begin_inset Flex Code
19635 \begin_layout Plain Layout
19641 stands for the path to the document.
19644 \begin_layout Subsubsection
19650 \begin_layout Standard
19651 This shows the complete history of the CVS document.
19654 cvs log "<file-name>"
19656 is shown in a browser.
19659 \begin_layout Subsection
19660 SVN commands in LyX
19663 \begin_layout Standard
19664 SVN is now partially supported by LyX.
19665 You can find the commands in the
19667 File\SpecialChar \menuseparator
19669 \begin_inset space ~
19675 Please note that if you use password protected access to repository via
19676 ssh, you will be asked in terminal window.
19677 LyX was tested against SVN 1.5 and 1.6
19681 \begin_layout Plain Layout
19682 Most of the commands will work with 1.4 too, see
19683 \begin_inset CommandInset ref
19685 reference "sub:SVN-Repo-Update"
19697 \begin_layout Subsubsection
19703 \begin_layout Standard
19704 If your document is not under revision control, this is the only item shown
19706 And if it is under revision control, the
19713 item is not visible.
19717 \begin_layout Standard
19718 This command registers in SVN your document ONLY in case you have already
19719 the documents directory under SVN control (in particular
19724 This means you have to checkout the archive by yourself.
19728 \begin_layout Standard
19729 Then you are asked interactively to supply an initial description of the
19731 Don't forget that registered file is not yet commited.
19734 \begin_layout Standard
19735 SVN command that is run:
19738 \begin_inset Quotes eld
19742 \begin_inset Quotes erd
19748 \begin_layout Standard
19753 to understand the switches.
19757 \begin_layout Subsubsection
19763 \begin_layout Standard
19764 When you are finished editing a file, you commit your changes.
19765 When you do this, you are asked for a description of the changes.
19766 After that changes are commited.
19769 \begin_layout Standard
19774 \begin_layout Plain Layout
19775 In case locking is not enabled.
19777 \begin_inset CommandInset ref
19779 reference "subsec:SVN-File-Locking"
19790 svn commit -q -m"<description>" <file-name>
19793 \begin_layout Subsubsection
19799 \begin_layout Standard
19800 Updates the changes of this file from the repository.
19801 Be sure you understand SVN merging and conflicts resolving before using
19802 this function, because all conflicts has to be resolved manually by you!
19805 \begin_layout Standard
19810 \begin_layout Plain Layout
19818 svn update --non-interactive
19819 \begin_inset Quotes eld
19823 \begin_inset Quotes erd
19829 \begin_layout Subsubsection
19832 Revert To Repository Version
19835 \begin_layout Standard
19836 This will discard all changes made to the document since the last check
19838 You get a warning before changes are discarded.
19842 \begin_layout Standard
19846 \begin_inset Quotes eld
19850 \begin_inset Quotes erd
19856 \begin_layout Subsubsection
19857 \begin_inset CommandInset label
19859 name "sub:SVN-Repo-Update"
19863 Update of the local directory checkout from repository
19867 \begin_layout Plain Layout
19868 Note that this command will work only with subversion
19869 \begin_inset Formula $\geqq1.5$
19880 \begin_layout Standard
19881 All the commands above have one shortcomming - they deal with the current
19883 Once your document contains pictures, includes external
19884 \begin_inset Flex Code
19887 \begin_layout Plain Layout
19893 files and so on administration becomes more complicated.
19894 LyX now supports updating the whole tree in which resides the document
19898 \begin_layout Plain Layout
19899 One need to organize the files structure so that all external files are
19900 in the same directory or subdirectories of the document.
19907 This become especially useful once you cooperate with people which neither
19908 know about subversion management nor they have ambition to commit additional
19909 material to the repository.
19913 \begin_layout Standard
19914 \begin_inset Flex Code
19917 \begin_layout Plain Layout
19918 Update local directory from repository
19923 command updates the whole directory and in case of merge conflicts local
19924 version of the files are left, so no unintended data loss occurs.
19925 If local changes are detected user is warned before update starts.
19928 \begin_layout Labeling
19929 \labelwidthstring 00.00.0000
19931 \begin_inset space ~
19935 \begin_inset space ~
19939 \begin_inset Newline newline
19943 \begin_inset Flex Code
19946 \begin_layout Plain Layout
19952 (Ask if changes are detected.)
19953 \begin_inset Newline newline
19957 \begin_inset Flex Code
19960 \begin_layout Plain Layout
19961 svn update --accept mine-full $path
19969 \begin_layout Standard
19971 \begin_inset Flex Code
19974 \begin_layout Plain Layout
19980 stands for the path to the document.
19983 \begin_layout Subsubsection
19989 \begin_layout Standard
19990 This shows the complete history of the SVN document.
19994 \begin_inset Quotes eld
19998 \begin_inset Quotes erd
20003 is shown in a browser.
20006 \begin_layout Subsubsection
20008 \begin_inset CommandInset label
20010 name "subsec:SVN-File-Locking"
20017 \begin_layout Standard
20018 The file exchange through various revision control systems brings the problem
20019 of merge conflicts in case two different users try to edit the same (parts
20021 When such a conflict happens it needs manual resolving and one reasonable
20022 alternative is to provide some kind of locking mechanism, which guarantees
20023 that only one user is allowed to edit file at the given time.
20026 \begin_layout Standard
20027 SVN has two such mechanisms to provide mutual exclusivity for file access
20028 - locks and automatic setting of write permissions (see sec.
20030 \begin_inset CommandInset ref
20032 reference "subsec:Automatical-Locking-Property"
20037 \begin_inset Flex Code
20040 \begin_layout Plain Layout
20050 \begin_layout Plain Layout
20051 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20057 If this property is detected for a given document LyX starts to use SVN
20058 locks for document editing automatically and the whole check-in/out mechanism
20059 switches to the same regimen as for RCS.
20060 This in particular means there are two different modes of file use in LyX:
20063 \begin_layout Itemize
20065 The loaded file is in the read-only mode.
20066 For editing on needs to check-out.
20071 consists of updating from the repository and gaining write lock.
20072 If the lock is not possible to obtain, we remain in unlocked state.
20075 \begin_layout Itemize
20077 The loaded file is in the 'normal' edit mode.
20078 No other user is allowed to edit the file.
20083 consists of commiting changes and releasing write-lock.
20084 If no changes have been made to the document, no commit will be produced
20088 \begin_layout Plain Layout
20089 Don't be puzzled by the fact that you will be asked for commit message anyway.
20094 and only the write-lock will be released.
20097 \begin_layout Standard
20101 \begin_layout Labeling
20102 \labelwidthstring 00.00.0000
20105 svn commit -q -m"<description>" "<file-name>"
20106 \begin_inset Newline newline
20109 svn unlock "<file-name>"
20112 \begin_layout Labeling
20113 \labelwidthstring 00.00.0000
20116 svn update "<file-name>"
20117 \begin_inset Newline newline
20120 svn lock "<file-name>"
20123 \begin_layout Subsubsection
20126 \begin_inset CommandInset label
20128 name "subsec:Automatical-Locking-Property"
20134 Automatic Locking Property
20137 \begin_layout Standard
20138 The above mentioned automatic setting of write permissions of the .lyx file
20144 ile\SpecialChar \menuseparator
20150 \begin_inset space ~
20153 Control\SpecialChar \menuseparator
20158 oggle locking property
20161 This command is active only when the file is not locked on the svn server
20163 you need to check-out before proceeding).
20166 \begin_layout Labeling
20167 \labelwidthstring 00.00.0000
20169 \begin_inset space ~
20175 \begin_layout Labeling
20176 \labelwidthstring 00.00.0000
20179 svn propset svn:needs-lock ON "<file-name>"
20182 \begin_layout Labeling
20183 \labelwidthstring 00.00.0000
20186 svn propdel svn:needs-lock "<file-name>"
20189 \begin_layout Subsubsection
20190 \begin_inset CommandInset label
20192 name "sub:VCS-Revision-Information"
20196 Revision Information in Documents
20199 \begin_layout Standard
20200 There are more possibilities how to activate revision information in our
20204 \begin_layout Itemize
20205 LyX supports directly:
20209 \begin_layout Itemize
20210 tree revision information (
20211 \begin_inset Flex Code
20214 \begin_layout Plain Layout
20221 The result is the output of the
20222 \begin_inset Flex Code
20225 \begin_layout Plain Layout
20231 command, the following table gives you an idea, how to read the results.
20234 \begin_layout Standard
20236 \begin_inset Tabular
20237 <lyxtabular version="3" rows="6" columns="2">
20238 <features tabularvalignment="middle">
20239 <column alignment="center" valignment="top" width="0">
20240 <column alignment="center" valignment="top" width="0">
20242 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20245 \begin_layout Plain Layout
20251 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20254 \begin_layout Plain Layout
20262 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20265 \begin_layout Plain Layout
20271 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20274 \begin_layout Plain Layout
20275 mixed revision working copy
20282 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20285 \begin_layout Plain Layout
20291 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20294 \begin_layout Plain Layout
20295 modified working copy
20302 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20305 \begin_layout Plain Layout
20311 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20314 \begin_layout Plain Layout
20315 switched working copy
20322 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20325 \begin_layout Plain Layout
20331 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20334 \begin_layout Plain Layout
20335 partial working copy, from a sparse checkout
20342 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20345 \begin_layout Plain Layout
20351 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20354 \begin_layout Plain Layout
20355 mixed revision, modified, switched working copy
20368 \begin_layout Itemize
20369 file revision information.
20370 The result comes from parsing the output of
20371 \begin_inset Flex Code
20374 \begin_layout Plain Layout
20376 \begin_inset space ~
20380 \begin_inset space ~
20384 \begin_inset space ~
20393 Supported flags are:
20397 \begin_layout Itemize
20398 version number of the last commit (
20399 \begin_inset Flex Code
20402 \begin_layout Plain Layout
20411 \begin_layout Itemize
20412 author of the last commit (
20413 \begin_inset Flex Code
20416 \begin_layout Plain Layout
20425 \begin_layout Itemize
20426 date of the last commit (
20427 \begin_inset Flex Code
20430 \begin_layout Plain Layout
20439 \begin_layout Itemize
20440 time of the last commit (
20441 \begin_inset Flex Code
20444 \begin_layout Plain Layout
20454 \begin_layout Standard
20455 You can obtain this info via InsetInfo (e.g.
20457 \begin_inset Flex Code
20460 \begin_layout Plain Layout
20461 info-insert buffer vcs-date
20467 The information will be available only when you have the file stored under
20468 svn managment (i.e.
20470 \begin_inset Flex Code
20473 \begin_layout Plain Layout
20479 directory is available with your document).
20483 \begin_layout Itemize
20484 Another---a hacking one---possibility is to use svn keywords
20488 \begin_layout Plain Layout
20489 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20495 In short -- you set file keywords property (e.g.
20498 svn propset svn:keywords 'Rev' file.lyx
20500 ) and then paste keyword TeX code
20504 \begin_layout Plain Layout
20505 This is an easy way how to ensure that LyX won't break the line in the middle
20511 tag in your document (e.g.
20516 \begin_layout Plain Layout
20524 This way svn client will automatically substitute revision number (e.g.
20529 \begin_layout Plain Layout
20536 ) after each update and commit.
20537 There are more problems with this approach.
20538 Firstly, the '$' character is used in TeX world for math equations, so
20539 any occurence of math formula
20540 \begin_inset Formula $Rev$
20544 \begin_inset Formula $Rev:59$
20547 in your LyX document.
20548 Similarly for other keywords like Id, Date, Author, etc.
20549 Secondly svn output is dependent on your locales, so its very easy that
20550 svn would produce some problematic strings once Date is used.
20551 Thirdly you get the whole 'Rev: 59' string in your document instead of
20553 Until subversion implements user's custom keywords it will be hard to use
20554 this approach reliably or let LyX to support it directly.
20557 \begin_layout Subsection
20558 SVN and Windows Environment
20561 \begin_layout Quote
20562 My inclination is to say that if the user cannot figure out the command
20563 line operations on their own fairly quickly, they would be well advised
20564 to use TortoiseSVN.
20570 \begin_layout Subsubsection
20574 \begin_layout Standard
20575 In addition to installing LyX, and having access to a Subversion repository,
20576 the user will need to install the Subversion client program.
20577 A Windows installer for the client program is available from
20578 \begin_inset CommandInset href
20581 target "http://www.collab.net/nonav/downloads/subversion/"
20586 The user may also want to install
20587 \begin_inset CommandInset href
20590 target "http://tortoisesvn.tigris.org/"
20594 , which integrates Subversion operations into the context (rightclick) menu
20595 of Windows Explorer.
20596 Operations done outside LyX will typically be more convenient using the
20597 Explorer context menu.
20598 Note that TortoiseSVN is not a replacement for the client program, which
20599 is what LyX itself will use.
20602 \begin_layout Subsubsection
20603 Bringing a document under Subversion control
20606 \begin_layout Standard
20607 Before a LyX document can be brought under version control in Subversion,
20608 its parent directory needs to be under version control.
20609 If the document is being added to a project already in the repository,
20610 this is accomplished by checking the project out to the directory where
20611 the new document will be placed.
20612 If the project itself is not yet under version control (for instance, if
20613 this document starts a new project), the directory must be imported into
20615 This is done outside LyX.
20616 Both import and checkout are easily accomplished from the Explorer context
20617 menu using TortoiseSVN, or alternatively can be done using the command
20618 line client at a DOS prompt.
20619 The procedure for importing the project using TortoiseSVN is described
20620 below, assuming an existing repository and a new project being started
20628 For information on using the Subversion client program, run
20635 \begin_layout Enumerate
20642 in Windows Explorer, right click it, and select
20644 TortoiseSVN > Repo-browser
20647 If necessary, adjust the URL for the repository, then click OK.
20650 \begin_layout Enumerate
20651 Right click the level of the repository under which you want to place the
20652 new project folder (typically the top level) and click
20654 Create folder\SpecialChar \ldots{}
20657 Supply a name for the project folder and click OK.
20658 Add a message for the log file if desired, then click OK again.
20659 The new project folder should appear in the repository.
20660 Finally, click OK again to exit the repository browser.
20663 \begin_layout Enumerate
20664 Once again right click
20670 , this time selecting SVN Checkout\SpecialChar \ldots{}
20671 Select the URL of the project folder
20672 you just created in the repository, and set the checkout directory to
20680 You will be warned about a non-empty folder; click OK to proceed.
20681 You should now have a
20692 \begin_layout Enumerate
20693 Create or open your document in LyX and click
20698 ile\SpecialChar \menuseparator
20704 \begin_inset space ~
20707 Control\SpecialChar \menuseparator
20715 Add a log message and click OK to commit the document to version control.
20718 \begin_layout Standard
20719 From this point onward, you should have full functionality in the
20724 ile\SpecialChar \menuseparator
20730 \begin_inset space ~
20736 You also have the option of checking the document in and out, viewing its
20738 using the TortoiseSVN context menu in Windows Explorer or the Subversion
20739 client program from a command prompt.
20742 \begin_layout Subsubsection
20743 SSH tunnel used with SVN under Windows
20746 \begin_layout Standard
20747 Compared with Linux setting up svn client to communicate over ssh under
20748 Windows is a rather troublesome task.
20749 We will at least offer some hints how to setup the client side but prior
20750 knowledge about ssh and the Windows command line is needed, also be prepared
20751 for a great deal of frustration\SpecialChar \ldots{}
20755 \begin_layout Enumerate
20756 Get a svn client for windows, as described in the previous sections.
20757 When it is a fresh install run some svn command (e.g.
20759 \begin_inset Flex Code
20762 \begin_layout Plain Layout
20768 ) to create config files, which you will need to change later on.
20771 \begin_layout Enumerate
20772 Choose a ssh client for Windows.
20773 There are several possibilities, we will use the one from Putty tools
20777 \begin_layout Plain Layout
20778 \begin_inset Flex URL
20781 \begin_layout Plain Layout
20783 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20794 You will need to set the connection up so that the client doesn't ask for
20795 any password from you.
20796 To keep things easy we will use only keys without any additional password
20801 \begin_layout Enumerate
20803 \begin_inset Flex Code
20806 \begin_layout Plain Layout
20813 Save your private .ppk key file and put the public one on the server side.
20814 If the SVN server runs on Linux, note that the format of the public key
20815 is not compatible with Linux openssh and you will need to direcly copy-paste
20818 Public key for pasting into OpenSSH authorized_keys file
20820 :” edit field into the server's
20821 \begin_inset Flex Code
20824 \begin_layout Plain Layout
20825 ~/.ssh/authorized_keys
20831 \begin_inset Flex Code
20834 \begin_layout Plain Layout
20843 \begin_layout Enumerate
20845 \begin_inset Flex Code
20848 \begin_layout Plain Layout
20855 In the SVN config file
20859 \begin_layout Plain Layout
20860 Exact path depends on Windows version, usually somewhere around
20861 \begin_inset Flex Code
20864 \begin_layout Plain Layout
20867 Documents and Settings
20881 \begin_inset Flex Code
20884 \begin_layout Plain Layout
20899 , section [tunnels], setup ssh command, e.g.
20901 \begin_inset Flex Code
20904 \begin_layout Plain Layout
20905 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20914 \begin_layout Plain Layout
20915 It will usually take a lot of time to get exact command right and it depends
20917 For example do not have some remote server saved as a default session in
20919 If things fail, try to connect via plink without SVN first.
20928 \begin_layout Enumerate
20929 Checkout the SVN archive, e.g.
20931 \begin_inset Flex Code
20934 \begin_layout Plain Layout
20935 svn co svn+ssh://user@server/repository_path
20943 \begin_layout Subsubsection
20944 End-of-Line Conversions
20947 \begin_layout Standard
20948 When the collaborators are mixing Linux and Windows environments, LyX will
20949 use different line endings inside the .lyx files.
20950 This is not a problem as far as LyX functionality is concerned, but the
20951 commit diffs will be huge and merge-conflicts prone.
20952 Fortunately SVN itself knows
20956 \begin_layout Plain Layout
20957 \begin_inset Flex URL
20960 \begin_layout Plain Layout
20962 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
20972 how to deal with CR/LF problems when switching .lyx files to the
20973 \begin_inset Flex Code
20976 \begin_layout Plain Layout
20986 \begin_layout Plain Layout
20988 \begin_inset Flex Code
20991 \begin_layout Plain Layout
20992 svn propset svn:eol-style native FILE_NAME
21005 \begin_layout Subsection
21009 \begin_layout Standard
21010 With the recent addition of the vc-command function LyX power users are
21011 allowed to create their own commands for revision control.
21014 \begin_layout Standard
21015 As an example you can see how two TortoiseSVN commands could be integrated
21019 \begin_layout Description
21021 \begin_inset Flex Code
21024 \begin_layout Plain Layout
21025 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21033 \begin_layout Description
21035 \begin_inset Flex Code
21038 \begin_layout Plain Layout
21039 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21047 \begin_layout Subsection
21048 Version control and Document comparison
21051 \begin_layout Standard
21052 One of the typical uses of version control is to inspect the changes between
21053 revisions, usually by creating
21054 \begin_inset Flex Code
21057 \begin_layout Plain Layout
21064 While this is useful for plain text files, it is much less useful in the
21065 case of LyX files, which have more complicated structure.
21066 Hence we provide binding to the Document comparison feature.
21067 They are two ways of calling this feature - either by direct call of
21068 \begin_inset Flex Code
21071 \begin_layout Plain Layout
21077 LyX function (for details see LyX functions manual) or by icon/menu item
21079 \begin_inset Flex MenuItem
21082 \begin_layout Plain Layout
21083 Compare with older revision...
21089 One can either compare two chosen revisions of the document or he can simply
21090 compare the current version of edited text with older revisions (where
21092 \begin_inset Flex MenuItem
21095 \begin_layout Plain Layout
21101 ' revisions back means comparison of the edited file with last commited
21106 \begin_layout Standard
21107 This feature is supported for SVN and RCS though due to the more complicated
21108 versioning scheme of RCS there is a constraint -- when addressing the revisions
21109 in dialog, numbers always point to the last number in RCS revision number,
21114 \begin_layout Section
21115 Literate Programming
21118 \begin_layout Standard
21123 (kayvan@sylvan.com)
21127 original documentation written by
21129 Edmar Wienskoski Jr.
21132 (edmar-w-jr@technologist.com)
21135 \begin_layout Subsection
21139 \begin_layout Standard
21140 The main purpose of this documentation is to show you how to use LyX for
21141 literate programming, where it is assumed that you are familiar with this
21142 programming technique, and know what
21143 \begin_inset Quotes eld
21147 \begin_inset Quotes erd
21151 \begin_inset Quotes eld
21155 \begin_inset Quotes erd
21159 If that is not the case, please follow the web links provided in the following
21161 There is a lot of good documentation out there covering old development
21162 history to the latest tools tips.
21165 \begin_layout Standard
21166 It is also assumed that you are familiar with LyX itself to a point that
21167 you are comfortable changing your LyX preferences, and X resources file.
21168 If that is not the case please refer to other LyX documentation to cover
21169 your specific needs.
21172 \begin_layout Subsection
21173 Literate Programming
21176 \begin_layout Standard
21177 From the Literate Programming FAQ:
21180 \begin_layout Quotation
21181 Literate programming is the combination of documentation and source together
21182 in a fashion suited for reading by human beings.
21183 In fact, literate programs should be enjoyable reading, even inviting!
21184 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21185 and documentation in a single file.
21186 Literate programming tools then parse the file to produce either readable
21187 documentation or compilable source.
21188 The WEB style of literate programming was created by D.
21189 \begin_inset space \thinspace{}
21193 Knuth during the development of his TeX typesetting software.
21197 \begin_layout Standard
21198 Another excerpt says:
21201 \begin_layout Quotation
21204 How is literate programming different from verbose commenting?
21207 \begin_layout Quotation
21208 There are three distinguishing characteristics.
21209 In order of importance, they are:
21213 \begin_layout Itemize
21214 flexible order of elaboration
21217 \begin_layout Itemize
21218 automatic support for browsing
21221 \begin_layout Itemize
21222 typeset documentation, especially diagrams and mathematics
21226 \begin_layout Standard
21227 Now that I sparked your curiosity, take a look in the references.
21230 \begin_layout Subsubsection
21234 \begin_layout Standard
21235 The complete Literate Programming FAQ can be found at:
21238 \begin_layout Quote
21239 Literate Programming FAQ
21240 \begin_inset Flex URL
21243 \begin_layout Plain Layout
21245 http://www.literateprogramming.com/lpfaq.pdf
21253 \begin_layout Standard
21254 The FAQ lists 23 (twenty three!) different literate programming tools.
21255 Where some are specialized or
21256 \begin_inset Quotes eld
21260 \begin_inset Quotes erd
21263 for particular programming languages, while other have general scope.
21268 for my own use for several reasons:
21271 \begin_layout Itemize
21272 It can generate the documentation either in LaTeX or HTML.
21275 \begin_layout Itemize
21276 It has a open architecture, i.
21277 \begin_inset space \thinspace{}
21281 \begin_inset space \space{}
21284 it is easy to plug in new filters and to perform special processing that
21289 \begin_layout Itemize
21290 There is a good selection of filters available already (the HTML is one
21294 \begin_layout Itemize
21298 \begin_layout Standard
21299 The Noweb web page can be found at:
21302 \begin_layout Quote
21304 \begin_inset Flex URL
21307 \begin_layout Plain Layout
21309 http://www.cs.virginia.edu/~nr/noweb/
21317 \begin_layout Standard
21318 Starting from there you can reach many other interesting links and even
21319 some literate program examples.
21322 \begin_layout Subsection
21323 LyX and Literate Programming
21326 \begin_layout Standard
21327 The LyX support for Literate Programming is provided by using the generic
21328 LyX converters mechanism.
21329 This support is provided in a
21330 \begin_inset Quotes eld
21334 \begin_inset Quotes erd
21338 \begin_inset space \thinspace{}
21342 \begin_inset space \space{}
21345 you will be able to use this new LyX feature with some other literate programmin
21346 g tool of your choice by just changing your LyX preferences.
21349 \begin_layout Subsubsection
21350 Generating documents and code (weaving and tangling)
21353 \begin_layout Paragraph
21354 Selecting the document class
21357 \begin_layout Standard
21358 If you have installed Noweb and LyX successfully, whenever you open a new
21359 document or try to change the document class of an existing one, you will
21360 find that there are three new document classes available:
21363 \begin_layout Itemize
21367 \begin_layout Itemize
21371 \begin_layout Itemize
21375 \begin_layout Standard
21376 You must select one of them to create your literate documents from.
21380 \begin_layout Standard
21381 Note that literate documents are not limited to these three classes.
21382 New classes can be generated from other styles like letter or in combination
21383 with other class variations like Article (AMS).
21384 If you have special needs that cannot be covered by one of the existing
21385 classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21386 will arrange to insert a new entry, or teach you how to do it.
21390 \begin_layout Plain Layout
21391 It is very simple, it involves the creation of a file with four lines, and
21392 re-running of the auto configuration.
21397 Moreover, if you use a literate tool other than Noweb you may need to create
21398 a new set of document classes for it.
21401 \begin_layout Paragraph
21405 \begin_layout Standard
21406 LyX enables you to write code with a layout named
21414 \begin_layout Plain Layout
21415 The equivalent Noweb term is
21416 \begin_inset Quotes eld
21420 \begin_inset Quotes erd
21424 For historical reasons, I got used to the term
21425 \begin_inset Quotes eld
21429 \begin_inset Quotes erd
21432 introduced by other literate tool named Nuweb, which I used for many years
21433 before rendering myself to Noweb.
21438 Noweb delimits scraps like this:
21441 \begin_layout LyX-Code
21445 \begin_layout LyX-Code
21449 \begin_layout LyX-Code
21453 \begin_layout LyX-Code
21457 \begin_layout LyX-Code
21461 \begin_layout Standard
21462 The problem is that whatever is written in between the << and the
21466 must be taken literally, i.
21467 \begin_inset space \thinspace{}
21471 \begin_inset space \space{}
21474 LyX should be prevented from making any special interpretation of what has
21476 This is handled by a special layout named Scrap, that works like a normal
21477 paragraph but has a free spacing capability.
21480 \begin_layout Standard
21481 The down side of the Scrap paragraph layout is that consecutive paragraphs
21482 of code will be spaced with one empty line in the source code and also
21483 in the printed documentation.
21484 The work around is to enter each line of code within a single Scrap, with
21485 a newline (ctrl-return).
21486 The example above will look like this:
21490 \begin_layout Plain Layout
21491 If you have a printed version of this document you will not see any difference
21492 between the previous example and this one.
21500 \begin_layout LyX-Code
21502 \begin_inset Newline newline
21506 \begin_inset Newline newline
21510 \begin_inset Newline newline
21514 \begin_inset Newline newline
21520 \begin_layout Standard
21521 This layout works fine.
21522 The only real inconvenience is that you have to type ctrl-return instead
21527 \begin_layout Plain Layout
21528 It is in my list of
21529 \begin_inset Quotes eld
21533 \begin_inset Quotes erd
21544 \begin_layout Standard
21545 As a special note, you can also use the
21546 \begin_inset Quotes eld
21550 \begin_inset Quotes erd
21553 construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21557 \begin_layout LyX-Code
21559 \begin_inset Newline newline
21562 def some_function(args):
21563 \begin_inset Newline newline
21566 "This is the doc string for this function."
21567 \begin_inset Newline newline
21570 print "My args: ", args
21573 \begin_layout LyX-Code
21574 @ %def some_function
21577 \begin_layout Standard
21578 For an example of this usage and the resulting cross-reference output, look
21579 at the Literate python program in
21581 LIBDIR/examples/listerrors.lyx
21583 which should make this all clear.
21586 \begin_layout Paragraph
21587 Generating the documentation
21590 \begin_layout Standard
21591 At this point you already have a new document file with a proper document
21592 class, and with some code and text on it.
21593 How do I print it? The answer is simple, you select
21595 View\SpecialChar \menuseparator
21599 Just like you would do for a plain document.
21600 No special procedure is required.
21603 \begin_layout Standard
21604 To help orientate you, I will now explain what happens inside LyX:
21607 \begin_layout Enumerate
21610 Update\SpecialChar \menuseparator
21613 menu option is chosen, a LaTeX file is generated.
21618 \begin_layout Standard
21619 If the document is of any literate class the generated file will be named
21620 with an extension name defined by the
21621 \begin_inset Quotes eld
21625 \begin_inset Quotes erd
21628 format (defined in the Preferences panel), otherwise the file will have
21637 \begin_layout Enumerate
21638 Note that the only difference so far is in the name of the file, no special
21639 processing is required by LyX.
21640 Given that you formatted the code using the Scrap layout that, by itself,
21641 takes care of the business.
21644 \begin_layout Enumerate
21645 If the document is of any literate class LyX will then use the internal
21646 LyX to Noweb converter, followed by the Noweb to LaTeX converter
21650 \begin_layout Plain Layout
21651 The converters are defined in the
21653 Tools\SpecialChar \menuseparator
21657 \begin_inset Quotes eld
21661 \begin_inset Quotes erd
21673 manual for general information about converters.
21678 to generate the LaTeX file.
21682 \begin_layout Standard
21683 Otherwise it will just skip this step.
21687 \begin_layout Enumerate
21688 Finally, LaTeX is invoked and the regular post processing continues as in
21692 \begin_layout Standard
21693 Independence from a particular
21694 \begin_inset Quotes eld
21698 \begin_inset Quotes erd
21701 is easily achieved by changing the commands that are run by the various
21705 \begin_layout Paragraph
21706 Generating the code
21709 \begin_layout Standard
21710 When the build menu option is chosen or the corresponding button in the
21711 toolbar is pressed, a LaTeX file is generated just like step 1 above.
21712 Next, LyX invokes the
21717 This converter needs to be defined by the user and is not installed by
21718 default, though the Program format is.
21719 This converter (like any other converter) will have two parts:
21722 \begin_layout Enumerate
21723 The converter program itself.
21724 This program performs the conversion from the one format to the other (in
21725 this case, from the Noweb format to the Program pseudo-format).
21728 \begin_layout Enumerate
21729 The error log parser.
21730 This is a program whose sole purpose is to rewrite error messages in a
21731 format that LyX understands.
21732 This makes it possible for LyX to place error boxes in the right places
21733 in the file buffer.
21736 \begin_layout Standard
21737 The first part, the
21738 \begin_inset Quotes eld
21742 \begin_inset Quotes erd
21745 setting, should be set to
21746 \begin_inset Quotes eld
21754 \begin_inset Quotes erd
21758 This basically means that LyX will call
21759 \begin_inset Quotes eld
21763 \begin_inset Quotes erd
21766 (a program or script) with the name of the Noweb file (normally a file
21767 in the LyX temp directory).
21771 \begin_layout Standard
21772 This is an implementation of
21773 \begin_inset Quotes eld
21777 \begin_inset Quotes erd
21780 that you can place in a directory on your path:
21783 \begin_layout LyX-Code
21787 \begin_layout LyX-Code
21791 \begin_layout LyX-Code
21792 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
21795 \begin_layout Standard
21796 The next part of the converter setting is the
21797 \begin_inset Quotes eld
21801 \begin_inset Quotes erd
21804 which is to be set to
21805 \begin_inset Quotes eld
21810 parselog=listerrors
21813 \begin_inset Quotes erd
21817 This will run any errors that are generated by the
21818 \begin_inset Quotes eld
21822 \begin_inset Quotes erd
21825 process through the
21826 \begin_inset Quotes eld
21830 \begin_inset Quotes erd
21836 \begin_layout Standard
21837 The converter code looks in
21845 then on the path for the
21846 \begin_inset Quotes eld
21850 \begin_inset Quotes erd
21856 \begin_layout Standard
21857 The build will normally take place in LyX's temporary directory, so the
21858 files produced by the conversion will be in that directory.
21859 LyX will copy out what it regards as the `main' file, but the
21863 conversion may produce several files, and so most of these would then be
21864 deleted when LyX was closed.
21865 The present solution is to use a `copier',
21869 \begin_layout Plain Layout
21878 manual for information on these.
21887 script in its default mode, so that the entire contents of the temporary
21888 directory is copied.
21889 More will get copied than is needed, to be sure, but nothing will be lost.
21890 If, however, you know what extensions the generated files will have, this
21891 can be improved by using the
21900 This option takes a comma-separated list of extensions to copy.
21901 So, for example, if the conversion will generate only files with the extensions
21910 , then the correct definition would be:
21913 \begin_layout LyX-Code
21914 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
21917 \begin_layout Standard
21918 The result will be that only files with these two extensions will be copied
21922 \begin_layout Paragraph
21923 Build instructions in the document
21926 \begin_layout Standard
21927 The last piece of the integration between LyX and noweb is the
21928 \begin_inset Quotes eld
21932 \begin_inset Quotes erd
21936 Generally, the instructions for building your program should be embedded
21937 in a scrap of its own.
21939 \begin_inset Quotes eld
21943 \begin_inset Quotes erd
21946 above uses the notangle command to look for this scrap (called
21947 \begin_inset Quotes eld
21951 \begin_inset Quotes erd
21954 ) and runs its contents through
21955 \begin_inset Quotes eld
21959 \begin_inset Quotes erd
21965 \begin_layout Standard
21966 Typically, such a scrap would look something like this:
21969 \begin_layout LyX-Code
21971 \begin_inset Newline newline
21975 \begin_inset Newline newline
21979 \begin_inset Newline newline
21982 if [ -z "${NOWEB_SOURCE}" ]
21983 \begin_inset Newline newline
21987 \begin_inset Newline newline
21990 NOWEB_SOURCE=myfile.nw
21991 \begin_inset Newline newline
21995 \begin_inset Newline newline
21999 code to extract files ...]
22000 \begin_inset Newline newline
22004 code to compile files ...]
22005 \begin_inset Newline newline
22011 \begin_layout Standard
22014 LIBDIR/examples/listerrors.lyx
22018 LIBDIR/examples/Literate.lyx
22020 which implement two versions of the
22021 \begin_inset Quotes eld
22025 \begin_inset Quotes erd
22028 program for some illustrations of how all of these pieces go together or
22031 LIBDIR/examples/noweb2lyx.lyx.
22034 Interestingly, these three files show off the language-indepence of the
22035 LyX literate programming support since they are written in Python, C and
22039 \begin_layout Subsubsection
22043 \begin_layout Standard
22044 All the Literate Programming support is configured by the
22046 Tools\SpecialChar \menuseparator
22050 \begin_inset Quotes eld
22054 \begin_inset Quotes erd
22058 The important parts are:
22061 \begin_layout Description
22063 \begin_inset space ~
22067 \begin_inset Quotes eld
22071 \begin_inset Quotes erd
22075 \begin_inset space ~
22078 format Set up via the Formats tab, this is where the Noweb-specific pieces
22088 , the file extension is set to
22093 This tells LyX to create a file with a
22097 extension in the first step of the conversion process.
22100 \begin_layout Description
22102 \begin_inset space ~
22110 \begin_inset space ~
22113 format This is an empty format whose sole purpose is to be the endpoint
22114 of a conversion (which then allows us to set up a converter for it).
22117 \begin_layout Description
22126 This converter performs the
22127 \begin_inset Quotes eld
22131 \begin_inset Quotes erd
22134 of the literate document.
22135 For Noweb, it is set to
22136 \begin_inset Quotes eld
22141 noweave -delay -index $$i > $$o
22144 \begin_inset Quotes erd
22150 \begin_layout Description
22160 \begin_inset Quotes eld
22164 \begin_inset Quotes erd
22168 As stated above, the Converter is set to
22169 \begin_inset Quotes eld
22177 \begin_inset Quotes erd
22180 , with Flags set to
22181 \begin_inset Quotes eld
22186 originaldir,parselog=listerrors
22189 \begin_inset Quotes erd
22195 \begin_layout Subsubsection
22199 \begin_layout Standard
22200 There is also a new function implemented in the LyX server, the
22201 \begin_inset Quotes eld
22204 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22208 \begin_layout Standard
22209 When debugging code with ddd/gdb, it is possible to invoke a text editor
22210 at the current execution position with a single key stroke.
22211 The default ddd configuration for that is shift-ctrl-V.
22212 It happens that you can define the editor command line invocation in ddd
22215 Edit\SpecialChar \menuseparator
22216 Preferences\SpecialChar \menuseparator
22219 dialog and changing the "Edit Sources" entry.
22222 \begin_layout Standard
22223 I take advantage of the new created LyX server function and this ddd feature,
22225 \begin_inset Quotes eld
22229 \begin_inset Quotes erd
22235 \begin_layout LyX-Code
22236 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22239 \begin_layout Standard
22240 With this, whenever you are using ddd and find a point in the program that
22241 you want to edit, you just press shift-ctrl-V (in the ddd window), and
22242 ddd you forward this information to LyX through the LyX server and then
22243 the LyX window will show the same file with the cursor at the same position
22244 ddd was pointing to.
22245 No more guessing or long scrolling to locate a point in the program back
22249 \begin_layout Standard
22250 Note however that you must enable the LyX server to get this feature working
22251 (it is disabled by default).
22252 You can enable it in
22264 ) by entering in the
22269 \begin_inset Quotes eld
22274 /home/<your-home-directory>/.lyx/lyxpipe
22277 \begin_inset Quotes erd
22283 \begin_layout Standard
22284 Read the LyX server documentation in the
22286 Customization Manual
22288 for further information.
22291 \begin_layout Subsubsection
22295 \begin_layout Standard
22296 There are six new buttons that can be added to your LyX toolbar.
22297 Five of these buttons are short cuts to layout styles:
22318 The last one is a short cut to the
22319 \begin_inset Quotes eld
22323 \begin_inset Quotes erd
22330 \begin_layout Standard
22331 LyX has a range of buttons that are available for tool bar customization.
22332 In my toolbar I like to combine the six short cuts above with two more:
22337 \SpecialChar \menuseparator
22342 \SpecialChar \menuseparator
22349 View\SpecialChar \menuseparator
22353 Here is how it looks like:
22356 \begin_layout LyX-Code
22360 \begin_layout LyX-Code
22364 \begin_layout LyX-Code
22365 Icon "layout Standard"
22368 \begin_layout LyX-Code
22369 Icon "layout Section"
22372 \begin_layout LyX-Code
22373 Icon "layout LaTeX"
22376 \begin_layout LyX-Code
22377 Icon "layout LyX-Code"
22380 \begin_layout LyX-Code
22381 Icon "layout Scrap"
22384 \begin_layout LyX-Code
22388 \begin_layout LyX-Code
22392 \begin_layout LyX-Code
22393 Icon "buffer-typeset"
22396 \begin_layout LyX-Code
22397 Icon "build-program"
22400 \begin_layout LyX-Code
22404 \begin_layout LyX-Code
22408 \begin_layout LyX-Code
22412 \begin_layout LyX-Code
22416 \begin_layout LyX-Code
22420 \begin_layout Subsubsection
22421 Colors customization
22424 \begin_layout Standard
22425 There are a number of colors in LyX that can be customized in
22430 One of the things that bothers people is the LaTeX font color.
22431 The default color is red, since the scraps uses LaTeX font, and there is
22432 a lot of scraps in literate documents, you may get tired of seeing everything
22434 You can change it by going to the tabs
22443 \begin_layout Standard
22444 The next thing is the visible presence of the newline character in the screen.
22445 You can choose the color of this particular character and make it blend
22447 I recommend you choosing a color that is close to the background but not
22448 equal, that way you still can see it is there, but it is not bothering
22453 \begin_layout Chapter
22457 \begin_layout Standard
22458 You can do everything with LyX that you can do with LaTeX.
22459 However, LyX cannot support every LaTeX feature directly.
22460 But you can always use TeX Code.
22461 This chapter shows you some more special things you might want to use.
22462 For other special things you can do with figures, tables, floats, boxes
22463 and notes, have a look at the
22470 \begin_layout Section
22471 Multiple Text Columns
22474 \begin_layout Standard
22475 This feature is independent of the option
22477 Two-column document
22479 in the document settings under
22484 If you want to have 2
22485 \begin_inset space ~
22488 columns for the whole document, it is recommended to use the
22490 Two-column document
22493 For all other cases use this feature.
22496 \begin_layout Standard
22497 To use multiple text columns in your document, you have to load the module
22504 Document\SpecialChar \menuseparator
22505 Settings\SpecialChar \menuseparator
22508 ) and must have the LaTeX-package
22513 \begin_inset Index idx
22516 \begin_layout Plain Layout
22517 LaTeX-packages ! multicol
22525 \begin_layout Standard
22526 Footnotes within multiple columns will be placed at the bottom of the page
22527 and not under each column.
22528 Within the different columns you can use everything, with the limitation
22529 that for floats you need to use the float option
22536 \begin_layout Subsection
22540 \begin_layout Standard
22541 If you want to have 2
22542 \begin_inset space ~
22545 columns in your text, use the style
22547 Begin Multiple Columns
22549 where the columns should start.
22550 The content of the style is the number of the columns, so in this case
22552 \begin_inset Quotes eld
22556 \begin_inset Quotes erd
22560 At the point where the columns should end use the style
22562 End Multiple Columns
22567 \begin_layout Standard
22568 Here is an example:
22571 \begin_layout Begin Multiple Columns
22575 \begin_layout Standard
22580 The Adventure of the Empty House
22583 \begin_inset Newline newline
22588 Sir Arthur Conan Doyle
22591 \begin_layout Standard
22594 It was in the spring of the year 1894 that all London was interested, and
22595 the fashionable world dismayed, by the murder of the Honourable Ronald
22596 Adair under most unusual and inexplicable circumstances.
22597 The public has already learned those particulars of the crime which came
22598 out in the police investigation, but a good deal was suppressed upon that
22599 occasion, since the case for the prosecution was so overwhelmingly strong
22600 that it was not necessary to bring forward all the facts.
22601 Only now, at the end of nearly ten years, am I allowed to supply those
22602 missing links which make up the whole of that remarkable chain.
22603 The crime was of interest in itself, but that interest was as nothing to
22604 me compared to the inconceivable sequel, which afforded me the greatest
22605 shock and surprise of any event in my adventurous life.
22606 Even now, after this long interval, I find myself thrilling as I think
22607 of it, and feeling once more that sudden flood of joy, amazement, and increduli
22608 ty which utterly submerged my mind.
22609 Let me say to that public, which has shown some interest in those glimpses
22610 which I have occasionally given them of the thoughts and actions of a very
22611 remarkable man, that they are not to blame me if I have not shared my knowledge
22612 with them, for I should have considered it my first duty to do so, had
22613 I not been barred by a positive prohibition from his own lips, which was
22614 only withdrawn upon the third of last month.
22617 \begin_layout End Multiple Columns
22621 \begin_layout Standard
22622 Here is an example with 3
22623 \begin_inset space ~
22629 \begin_layout Begin Multiple Columns
22633 \begin_layout Standard
22636 It can be imagined that my close intimacy with Sherlock Holmes had interested
22637 me deeply in crime, and that after his disappearance I never failed to
22638 read with care the various problems which came before the public.
22639 And I even attempted, more than once, for my own private satisfaction,
22640 to employ his methods in their solution, though with indifferent success.
22641 There was none, however, which appealed to me like this tragedy of Ronald
22643 As I read the evidence at the inquest, which led up to a verdict of willful
22644 murder against some person or persons unknown, I realized more clearly
22645 than I had ever done the loss which the community had sustained by the
22646 death of Sherlock Holmes.
22647 There were points about this strange business which would, I was sure,
22648 have specially appealed to him, and the efforts of the police would have
22649 been supplemented, or more probably anticipated, by the trained observation
22650 and the alert mind of the first criminal agent in Europe.
22651 All day, as I drove upon my round, I turned over the case in my mind and
22652 found no explanation which appeared to me to be adequate.
22653 At the risk of telling a twice-told tale, I will recapitulate the facts
22654 as they were known to the public at the conclusion of the inquest.
22657 \begin_layout End Multiple Columns
22661 \begin_layout Standard
22662 You can have up to 10
22663 \begin_inset space ~
22666 columns if you want to, but that might not be very pleasant for the readers
22670 \begin_layout Standard
22671 \begin_inset Newpage newpage
22677 \begin_layout Subsection
22678 Columns inside Columns
22681 \begin_layout Standard
22682 You can also have columns inside columns:
22685 \begin_layout Begin Multiple Columns
22689 \begin_layout Standard
22692 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22693 at that time governor of one of the Australian colonies.
22694 Adair's mother had returned from Australia to undergo the operation for
22695 cataract, and she, her son Ronald, and her daughter Hilda were living together
22699 \begin_layout Begin Multiple Columns
22703 \begin_layout Standard
22706 The youth moved in the best society–had, so far as was known, no enemies
22707 and no particular vices.
22708 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22709 had been broken off by mutual consent some months before, and there was
22710 no sign that it had left any very profound feeling behind it.
22711 For the rest {sic} the man's life moved in a narrow and conventional circle,
22712 for his habits were quiet and his nature unemotional.
22713 Yet it was upon this easy-going young aristocrat that death came, in most
22714 strange and unexpected form, between the hours of ten and eleven-twenty
22715 on the night of March 30, 1894.
22718 \begin_layout End Multiple Columns
22722 \begin_layout Standard
22725 Ronald Adair was fond of cards–playing continually, but never for such stakes
22727 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22728 It was shown that, after dinner on the day of his death, he had played
22729 a rubber of whist at the latter club.
22730 He had also played there in the afternoon.
22735 The evidence of those who had played with him– Mr.
22736 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
22737 and that there was a fairly equal fall of the cards.
22738 Adair might have lost five pounds, but not more.
22739 His fortune was a considerable one, and such a loss could not in any way
22741 He had played nearly every day at one club or other, but he was a cautious
22742 player, and usually rose a winner.
22743 It came out in evidence that, in partnership with Colonel Moran, he had
22744 actually won as much as four hundred and twenty pounds in a sitting, some
22745 weeks before, from Godfrey Milner and Lord Balmoral.
22746 So much for his recent history as it came out at the inquest.
22749 \begin_layout End Multiple Columns
22753 \begin_layout Subsection
22757 \begin_layout Standard
22758 The examples in this section show some more special features of multiple
22762 \begin_layout Standard
22763 For more features of multiple columns, have a look at the documentation
22764 of the LaTeX-package
22769 \begin_inset Index idx
22772 \begin_layout Plain Layout
22773 LaTeX-packages ! multicol
22779 \begin_inset CommandInset citation
22788 \begin_layout Subsubsection
22792 \begin_layout Standard
22793 To add a preface text for multiple columns, add the command
22796 \begin_layout Standard
22802 \begin_layout Standard
22803 as TeX Code behind the number of columns in the
22805 Begin Multiple Columns
22808 Behind the command follows the preface text.
22809 At the end of the style use the command
22812 \begin_layout Standard
22818 \begin_layout Standard
22820 An example with some preface text:
22823 \begin_layout Standard
22824 \begin_inset VSpace bigskip
22830 \begin_layout Begin Multiple Columns
22835 \begin_layout Plain Layout
22842 And the story continues and continues and continues and continues\SpecialChar \ldots{}
22847 \begin_layout Plain Layout
22857 \begin_layout Standard
22860 On the evening of the crime, he returned from the club exactly at ten.
22861 His mother and sister were out spending the evening with a relation.
22862 The servant deposed that she heard him enter the front room on the second
22863 floor, generally used as his sitting-room.
22864 She had lit a fire there, and as it smoked she had opened the window.
22865 No sound was heard from the room until eleven-twenty, the hour of the return
22866 of Lady Maynooth and her daughter.
22867 Desiring to say good-night, she attempted to enter her son's room.
22868 The door was locked on the inside, and no answer could be got to their
22869 cries and knocking.
22870 Help was obtained, and the door forced.
22871 The unfortunate young man was found lying near the table.
22872 His head had been horribly mutilated by an expanding revolver bullet, but
22873 no weapon of any sort was to be found in the room.
22876 \begin_layout End Multiple Columns
22880 \begin_layout Standard
22881 You can also use a section heading as the preface if you use a section command
22882 as TeX Code behind the first TeX Code.
22883 For example the command
22886 \begin_layout Standard
22891 subsection{subsection title}
22894 \begin_layout Standard
22895 creates a subsection.
22896 In this example the preface is a subsubsection:
22899 \begin_layout Begin Multiple Columns
22904 \begin_layout Plain Layout
22915 \begin_layout Plain Layout
22924 This is a subsubsection heading as a preface
22928 \begin_layout Plain Layout
22939 \begin_layout Plain Layout
22949 \begin_layout Standard
22952 A minute examination of the circumstances served only to make the case more
22954 In the first place, no reason could be given why the young man should have
22955 fastened the door upon the inside.
22956 There was the possibility that the murderer had done this, and had afterwards
22957 escaped by the window.
22958 The drop was at least twenty feet, however, and a bed of crocuses in full
22960 Neither the flowers nor the earth showed any sign of having been disturbed,
22961 nor were there any marks upon the narrow strip of grass which separated
22962 the house from the road.
22963 Apparently, therefore, it was the young man himself who had fastened the
22965 But how did he come by his death? No one could have climbed up to the window
22966 without leaving traces.
22967 Suppose a man had fired through the window, he would indeed be a remarkable
22968 shot who could with a revolver inflict so deadly a wound.
22969 Again, Park Lane is a frequented thoroughfare; there is a cab stand within
22970 a hundred yards of the house.
22971 No one had heard a shot.
22974 \begin_layout End Multiple Columns
22978 \begin_layout Standard
22979 If there is less vertical space left on the page at the beginning of the
22980 multiple columns than needed for 6
22981 \begin_inset space ~
22984 text lines, a page break will be inserted before the multiple columns.
22985 Depending on the number of lines of the preface text, you might want to
22987 It is determined by inserting the command
22990 \begin_layout Standard
22998 \begin_layout Standard
22999 as TeX Code behind the preface definition but before the final
23008 is hereby the number of text lines.
23009 In this example the space is set to 7
23010 \begin_inset space ~
23016 \begin_layout Begin Multiple Columns
23021 \begin_layout Plain Layout
23032 \begin_layout Plain Layout
23041 This is the sectioning command
23042 \begin_inset Newline newline
23046 \begin_inset Newline newline
23049 with multiple text lines
23053 \begin_layout Plain Layout
23064 \begin_layout Plain Layout
23077 \begin_layout Plain Layout
23087 \begin_layout Standard
23090 On the evening of the crime, he returned from the club exactly at ten.
23091 His mother and sister were out spending the evening with a relation.
23092 The servant deposed that she heard him enter the front room on the second
23093 floor, generally used as his sitting-room.
23094 She had lit a fire there, and as it smoked she had opened the window.
23095 No sound was heard from the room until eleven-twenty, the hour of the return
23096 of Lady Maynooth and her daughter.
23097 Desiring to say good-night, she attempted to enter her son's room.
23098 The door was locked on the inside, and no answer could be got to their
23099 cries and knocking.
23100 Help was obtained, and the door forced.
23101 The unfortunate young man was found lying near the table.
23102 His head had been horribly mutilated by an expanding revolver bullet, but
23103 no weapon of any sort was to be found in the room.
23106 \begin_layout End Multiple Columns
23110 \begin_layout Subsubsection
23114 \begin_layout Standard
23115 The amount of space before and after multiple columns can be changed by
23116 changing the length
23123 For example the command
23126 \begin_layout Standard
23136 \begin_layout Standard
23137 in TeX Code changes its value to 3
23138 \begin_inset space \thinspace{}
23142 The change must be made before the multiple columns' start.
23143 The predefined value is 13
23144 \begin_inset space \thinspace{}
23150 \begin_layout Standard
23158 \begin_inset space \thinspace{}
23164 \begin_layout Standard
23168 \begin_layout Plain Layout
23174 multicolsep}{2.5cm}
23182 \begin_layout Begin Multiple Columns
23186 \begin_layout Standard
23189 All day I turned these facts over in my mind, endeavouring to hit upon some
23190 theory which could reconcile them all, and to find that line of least resistanc
23191 e which my poor friend had declared to be the starting-point of every investigat
23193 I confess that I made little progress.
23194 In the evening I strolled across the Park, and found myself about six o'clock
23195 at the Oxford Street end of Park Lane.
23196 A group of loafers upon the pavements, all staring up at a particular window,
23197 directed me to the house which I had come to see.
23198 A tall, thin man with coloured glasses, whom I strongly suspected of being
23199 a plain-clothes detective, was pointing out some theory of his own, while
23200 the others crowded round to listen to what he said.
23201 I got as near him as I could, but his observations seemed to me to be absurd,
23202 so I withdrew again in some disgust.
23203 As I did so I struck against an elderly, deformed man, who had been behind
23204 me, and I knocked down several books which he was carrying.
23207 \begin_layout End Multiple Columns
23211 \begin_layout Standard
23212 \begin_inset Note Greyedout
23215 \begin_layout Plain Layout
23220 The values you set with
23226 will be used for all following multiple columns until to change them again.
23234 \begin_layout Standard
23238 \begin_layout Plain Layout
23250 \begin_inset Note Note
23253 \begin_layout Plain Layout
23254 go back to the default
23262 \begin_layout Standard
23263 \begin_inset Newpage newpage
23269 \begin_layout Subsubsection
23273 \begin_layout Standard
23274 The width of the columns is automatically calculated, but you can modify
23275 the space between the columns.
23276 This is done by changing the length
23283 Its predefined value is 10
23284 \begin_inset space \thinspace{}
23288 Here is an example where
23295 \begin_inset space \thinspace{}
23301 \begin_layout Standard
23305 \begin_layout Plain Layout
23319 \begin_layout Begin Multiple Columns
23323 \begin_layout Standard
23326 My observations of No.
23327 \begin_inset space \space{}
23330 427 Park Lane did little to clear up the problem in which I was interested.
23331 The house was separated from the street by a low wall and railing, the
23332 whole not more than five feet high.
23333 It was perfectly easy, therefore, for anyone to get into the garden, but
23334 the window was entirely inaccessible, since there was no water pipe or
23335 anything which could help the most active man to climb it.
23336 More puzzled than ever, I retraced my steps to Kensington.
23337 I had not been in my study five minutes when the maid entered to say that
23338 a person desired to see me.
23339 To my astonishment it was none other than my strange old book collector,
23340 his sharp, wizened face peering out from a frame of white hair, and his
23341 precious volumes, a dozen of them at least, wedged under his right arm.
23344 \begin_layout End Multiple Columns
23348 \begin_layout Standard
23352 \begin_layout Plain Layout
23364 \begin_inset Note Note
23367 \begin_layout Plain Layout
23368 go back to the default
23376 \begin_layout Subsubsection
23380 \begin_layout Standard
23381 Between the columns a rule with a width of the length
23388 If this rule width is set to 0
23389 \begin_inset space \thinspace{}
23392 pt (this is the default), the rule is suppressed.
23393 In the following example the line is 2
23394 \begin_inset space \thinspace{}
23400 \begin_layout Standard
23404 \begin_layout Plain Layout
23410 columnseprule}{2pt}
23418 \begin_layout Begin Multiple Columns
23422 \begin_layout Standard
23425 \begin_inset Quotes eld
23428 You're surprised to see me, sir,
23429 \begin_inset Quotes erd
23432 said he, in a strange, croaking voice.
23435 \begin_layout Standard
23438 I acknowledged that I was.
23441 \begin_layout Standard
23444 \begin_inset Quotes eld
23447 Well, I've a conscience, sir, and when I chanced to see you go into this
23448 house, as I came hobbling after you, I thought to myself, I'll just step
23449 in and see that kind gentleman, and tell him that if I was a bit gruff
23450 in my manner there was not any harm meant, and that I am much obliged to
23451 him for picking up my books.
23452 \begin_inset Quotes erd
23458 \begin_layout Standard
23461 \begin_inset Quotes eld
23464 You make too much of a trifle,
23465 \begin_inset Quotes erd
23470 \begin_inset Quotes eld
23473 May I ask how you knew who I was?
23474 \begin_inset Quotes erd
23480 \begin_layout Standard
23483 \begin_inset Quotes eld
23486 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
23487 you'll find my little bookshop at the corner of Church Street, and very
23488 happy to see you, I am sure.
23489 Maybe you collect yourself, sir.
23493 \begin_inset space ~
23506 --a bargain, every one of them.
23507 With five volumes you could just fill that gap on that second shelf.
23508 It looks untidy, does it not, sir?
23509 \begin_inset Quotes erd
23515 \begin_layout End Multiple Columns
23519 \begin_layout Standard
23523 \begin_layout Plain Layout
23529 columnseprule}{0pt}
23535 \begin_inset Note Note
23538 \begin_layout Plain Layout
23539 go back to the default
23547 \begin_layout Standard
23548 \begin_inset Newpage newpage
23554 \begin_layout Section
23555 Non-standard Paragraph Shapes
23558 \begin_layout Standard
23562 \begin_layout Plain Layout
23574 \begin_layout Standard
23578 \begin_layout Plain Layout
23587 \begin_layout Plain Layout
23601 \begin_layout Standard
23606 \begin_layout Plain Layout
23617 \begin_layout Plain Layout
23626 \begin_layout Plain Layout
23635 \begin_layout Plain Layout
23644 \begin_layout Plain Layout
23653 \begin_layout Plain Layout
23662 \begin_layout Plain Layout
23671 \begin_layout Plain Layout
23680 \begin_layout Plain Layout
23689 \begin_layout Plain Layout
23698 \begin_layout Plain Layout
23707 \begin_layout Plain Layout
23716 \begin_layout Plain Layout
23725 \begin_layout Plain Layout
23734 \begin_layout Plain Layout
23743 \begin_layout Plain Layout
23752 \begin_layout Plain Layout
23761 \begin_layout Plain Layout
23770 \begin_layout Plain Layout
23779 \begin_layout Plain Layout
23785 There are times when the tyranny of rectangular paragraphs must be overthrown.
23786 In such situations, a call to the delightful plain TeX command
23793 As you can see, completely arbitrary shapes can be laid out with a suitable
23794 set of line length definitions.
23795 While this parshape may look a bit silly and useless, one could conceive
23796 of situations such as finely tuned dropped capitals, word wrapping around
23797 non-rectangular graphics, etc.
23798 which will benefit from such handcrafting.
23801 \begin_layout Standard
23802 \begin_inset VSpace bigskip
23808 \begin_layout Standard
23813 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23820 is the number of lines of text which define the paragraph.
23821 If there turn out to be fewer lines, the shape is truncated; if there are
23822 more, the excess lines have the same dimensions as the last line of the
23832 entries specify the indentation of the line from the left margin, and the
23833 length of the line as measured from that point.
23834 The shape applies only to the current paragraph; everything is reset to
23835 normal for the next paragraph.
23838 \begin_layout Standard
23842 \begin_layout Plain Layout
23854 \begin_layout Bibliography
23855 \begin_inset CommandInset bibitem
23856 LatexCommand bibitem
23861 Documentation of the LaTeX-package
23862 \begin_inset CommandInset href
23865 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
23870 \begin_inset Index idx
23873 \begin_layout Plain Layout
23874 LaTeX-packages ! multicol