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
116 \notefontcolor #0000ff
123 \paragraph_separation indent
124 \paragraph_indentation default
125 \quotes_language english
128 \paperpagestyle headings
129 \tracking_changes false
130 \output_changes false
139 Additional LyX Features
142 \begin_layout Subtitle
151 \begin_layout Plain Layout
153 Principal maintainer of this file is
158 If you have comments or error corrections, please send them to the LyX
159 Documentation mailing list,
160 \begin_inset Flex Code
163 \begin_layout Plain Layout
165 <lyx-docs@lists.lyx.org>
178 \begin_layout Standard
179 \begin_inset CommandInset toc
180 LatexCommand tableofcontents
187 \begin_layout Chapter
191 \begin_layout Standard
192 This manual is essentially Part II of the
194 User's Guide\SpecialChar \@.
197 The reason for separating this document out is simple: the
201 is already quite lengthy, and it contains information on all of the basic
202 features one needs to know in order to prepare most documents.
203 However, the LyX Team has worked to make LyX extensible through various
204 configuration files and external packages.
205 That means that if you want to support the Fizzwizzle LaTeX package, you
206 can create a layout file (or module) for it without having to alter LyX
208 We've already had contributions of several new features this way, and some
209 of them are documented here.
210 There are also some more `advanced' features, such as how to control the
211 presentation of bibliographies and how to work with multi-part documents,
212 that are not covered in the
216 and are discussed here.
219 \begin_layout Standard
220 This manual also documents some special features, like fax support, version
221 control, and SGML support, which require additional software to work properly.
222 There is also a chapter on LyX's support for HTML.
223 And lastly, there's a chapter of LaTeX tools and tips, things you can use
224 to spruce up your documents by directly using the powerful features of
230 only WYSIWYM and will only ever interface to some, not all, LaTeX features.
233 \begin_layout Standard
234 If you haven't read the
238 yet, you are definitely in the wrong manual.
243 is the first place to go, since it describes the notation and format of
245 You should also be thoroughly familiar with the
249 and all of the basic features of LyX before attempting to read this one.
252 \begin_layout Standard
253 Since many of the topics in this manual depend heavily on LyX's interaction
254 with LaTeX, this first chapter covers the inner workings of LyX and how
255 to direct LyX to generate exactly the LaTeX code you want.
256 It is obviously for more seasoned LyX users.
259 \begin_layout Chapter
263 \begin_layout Section
267 \begin_layout Standard
268 This chapter is for both TeX-nicians and the LaTeX-curious.
269 In it, we'll explain how LyX and LaTeX work together to produce printable
271 This is the only place in any of the manuals where we assume you know something
275 \begin_layout Standard
276 At one time, LyX was called a
277 \begin_inset Quotes eld
280 WYSIWYM frontend to LaTeX,
281 \begin_inset Quotes erd
284 but that's no longer true.
285 There are frontends to LaTeX out there.
289 \begin_layout Plain Layout
290 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
291 There are also the LaTeX modes for vi and emacs, of course.
296 These are basically text editors with the ability to run LaTeX and mark
297 any errors in the file you're editing.
306 run LaTeX, and it also indicates errors in the file, it also does much,
308 For one thing, you don't need to know LaTeX to use LyX effectively.
309 And LyX has added its own extensions to LaTeX.
310 Try the following sometime: select
311 \begin_inset Flex MenuItem
314 \begin_layout Plain Layout
315 Export\SpecialChar \menuseparator
322 \begin_inset Flex MenuItem
325 \begin_layout Plain Layout
332 \begin_inset Flex MenuItem
335 \begin_layout Plain Layout
336 View\SpecialChar \menuseparator
342 ), then look at the preamble of the resulting
343 \begin_inset Flex Code
346 \begin_layout Plain Layout
353 You'll notice a variety of new macros defined specifically by LyX.
354 These macros are defined automatically, according to the features you use
358 \begin_layout Standard
359 There are several commands that automatically invoke LaTeX.
363 \begin_layout Itemize
364 \begin_inset Flex MenuItem
367 \begin_layout Plain Layout
368 View\SpecialChar \menuseparator
377 \begin_layout Itemize
378 \begin_inset Flex MenuItem
381 \begin_layout Plain Layout
382 View\SpecialChar \menuseparator
391 \begin_layout Itemize
392 \begin_inset Flex MenuItem
395 \begin_layout Plain Layout
396 File\SpecialChar \menuseparator
405 \begin_layout Itemize
406 \begin_inset Flex MenuItem
409 \begin_layout Plain Layout
410 File\SpecialChar \menuseparator
419 \begin_layout Standard
420 They will only invoke LaTeX if the file has changed since the last time
425 \begin_layout Standard
426 When LyX runs LaTeX on the file you're editing, it performs these steps:
429 \begin_layout Enumerate
430 Convert the document to LaTeX and save to a file with the extension
431 \begin_inset Flex Code
434 \begin_layout Plain Layout
441 \begin_inset Flex Code
444 \begin_layout Plain Layout
453 \begin_layout Enumerate
455 \begin_inset Flex Code
458 \begin_layout Plain Layout
464 file (maybe several times), and run any other commands (such as
465 \begin_inset Flex Code
468 \begin_layout Plain Layout
475 \begin_inset Flex Code
478 \begin_layout Plain Layout
484 ) needed to compile the LaTeX file.
487 \begin_layout Enumerate
488 If there are any errors, show the error log.
491 \begin_layout Standard
492 If you have run LaTeX using
493 \begin_inset Flex MenuItem
496 \begin_layout Plain Layout
499 \SpecialChar \menuseparator
507 , LyX then runs a DVI viewer to display the DVI-file.
509 \begin_inset Flex MenuItem
512 \begin_layout Plain Layout
515 \SpecialChar \menuseparator
523 , LyX performs further steps:
526 \begin_layout Itemize
528 \begin_inset Flex Code
531 \begin_layout Plain Layout
537 to convert the DVI file to PostScript.
540 \begin_layout Itemize
541 Run a PostScript viewer, such as
542 \begin_inset Flex Code
545 \begin_layout Plain Layout
551 , to display the PostScript file.
554 \begin_layout Standard
555 LyX does similar things when viewing, or exporting, other formats.
558 \begin_layout Section
559 Translating LaTeX files into LyX
562 \begin_layout Standard
563 You can import a LaTeX file into LyX by using the
564 \begin_inset Flex MenuItem
567 \begin_layout Plain Layout
568 File\SpecialChar \menuseparator
569 Import\SpecialChar \menuseparator
576 This will call a program named
577 \begin_inset Flex Code
580 \begin_layout Plain Layout
586 which will create a file
587 \begin_inset Flex Code
590 \begin_layout Plain Layout
597 \begin_inset Flex Code
600 \begin_layout Plain Layout
607 LyX will then open that file.
611 \begin_layout Plain Layout
612 \begin_inset Flex Code
615 \begin_layout Plain Layout
621 can also be run from the command line, of course.
629 \begin_layout Standard
630 \begin_inset Flex Code
633 \begin_layout Plain Layout
639 will translate most legal LaTeX, but not everything.
640 It will put things it doesn't understand into TeX code, so after translating
642 \begin_inset Flex Code
645 \begin_layout Plain Layout
651 , you can look for TeX code and hand-edit it until it looks right.
654 \begin_layout Standard
655 If you don't know what TeX code is, read the next section.
658 \begin_layout Section
659 \begin_inset CommandInset label
661 name "sec:Inserting-TeX-Code"
665 Inserting TeX Code into LyX Documents
668 \begin_layout Standard
669 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
670 You can always insert TeX code into any LyX document.
671 LyX cannot, and will never be able to, display every possible LaTeX construct.
672 If ever you need to insert LaTeX commands into your LyX document, you can
674 \begin_inset Flex Code
677 \begin_layout Plain Layout
683 box, which you can insert into your document with
684 \begin_inset Flex MenuItem
687 \begin_layout Plain Layout
688 Insert\SpecialChar \menuseparator
697 \begin_layout Standard
698 Here's an example of inserting LaTeX commands in a LyX document.
699 The code looks like this:
702 \begin_layout LyX-Code
706 \begin_inset Newline newline
712 \begin_inset Newline newline
715 This is an example for a minipage environment.
717 \begin_inset Newline newline
720 can put nearly everything in it, even (non-floating)
721 \begin_inset Newline newline
726 \begin_inset Newline newline
732 \begin_inset Newline newline
736 \begin_inset Newline newline
742 \begin_inset Newline newline
748 \begin_inset Newline newline
754 \begin_inset Newline newline
759 \begin_inset Newline newline
765 \begin_inset Newline newline
771 \begin_inset Newline newline
777 \begin_inset Newline newline
785 \begin_layout LyX-Code
789 \begin_layout Standard
791 \begin_inset Flex Code
794 \begin_layout Plain Layout
800 box containing this text is directly after this paragraph.
801 Those of you reading the manual in LyX will only see the TeX code inset.
802 Those reading a printed version of the manuals will see the actual results:
805 \begin_layout Standard
809 \begin_layout Plain Layout
816 \begin_layout Plain Layout
823 \begin_layout Plain Layout
825 This is an example for a minipage environment.
826 You can put nearly everything in it, even (non-floating) figures and tables.
830 \begin_layout Plain Layout
837 \begin_layout Plain Layout
842 \begin_layout Plain Layout
849 \begin_layout Plain Layout
856 \begin_layout Plain Layout
863 \begin_layout Plain Layout
869 \begin_layout Plain Layout
876 \begin_layout Plain Layout
883 \begin_layout Plain Layout
890 \begin_layout Plain Layout
902 \begin_layout Standard
903 In addition to using TeX code, you can also create a separate file containing
904 some complex LaTeX structure and then use
905 \begin_inset Flex MenuItem
908 \begin_layout Plain Layout
909 Insert\SpecialChar \menuseparator
919 to include your file (you should select the type
920 \begin_inset Flex Code
923 \begin_layout Plain Layout
930 We recommend that you only do this if you have a
931 \begin_inset Flex Code
934 \begin_layout Plain Layout
945 Otherwise, you'll have a big job tracking down LaTeX errors.
948 \begin_layout Standard
949 There are a few last points to emphasize:
952 \begin_layout Itemize
957 check if your LaTeX code is correct.
960 \begin_layout Itemize
961 Beware reinventing the wheel.
964 \begin_layout Standard
965 On that last point, LyX does have quite a few features tucked into it, and
967 Be sure to check the manuals to make sure that LyX doesn't have such-and-such
968 feature before you decide you have to do it by hand.
969 Moreover, there are numerous LaTeX packages out there to do all sorts of
970 things, from labels to envelopes to fancy multipage tables.
972 \begin_inset CommandInset href
975 target "http://www.ctan.org/"
982 \begin_layout Standard
983 If you do need to do some wild and fancy things within your document, be
984 sure to check out a good LaTeX book for assistance.
985 There are a number of them listed in the bibliography of the
992 \begin_layout Section
993 LyX and the LaTeX Preamble
996 \begin_layout Subsection
997 About the LaTeX Preamble
1000 \begin_layout Standard
1001 If you already know LaTeX, there is no need to explain here what the preamble
1003 If you don't, the following will give you some ideas—we recommend again
1004 that you consult a LaTeX book for further information.
1005 In any case, you should read the points below, because they explain what
1006 you can do and what you don't need to do in the LaTeX preamble of a LyX
1010 \begin_layout Standard
1011 The LaTeX preamble comes at the very beginning of a document,
1019 \begin_layout Itemize
1020 Declare the document class.
1022 \begin_inset Newline newline
1025 LyX already does this for you.
1026 If you're a seasoned LaTeX-nician, and you have a custom document class
1027 you want to use, check out the
1029 Customization Manual
1031 for information on how to make LyX interface to it.
1034 \begin_layout Itemize
1035 Declare the usage of packages.
1037 \begin_inset Newline newline
1040 LaTeX packages provide special commands, which are only available within
1041 a document when the package has been declared in the preamble.
1042 For example, the package
1043 \begin_inset Flex Code
1046 \begin_layout Plain Layout
1052 forces all paragraphs to be indented.
1053 There are other packages for labels, envelopes, margins, etc.
1057 \begin_layout Itemize
1058 Set counters, variables, lengths and widths.
1060 \begin_inset Newline newline
1063 There are several LaTeX counters and variables which
1067 be set globally from within the preamble in order to have the desired effect.
1068 (There are variables which you can set and reset inside the document, too.)
1069 Margins are a good example of something which must be set in the preamble.
1070 Another example is the label format for lists.
1071 You can actually set these just about anywhere, but it's best to do it
1072 just once, inside the preamble.
1075 \begin_layout Itemize
1076 Declare user defined commands (with
1077 \begin_inset Flex Code
1080 \begin_layout Plain Layout
1089 \begin_inset Flex Code
1092 \begin_layout Plain Layout
1101 \begin_inset Newline newline
1104 These are abbreviations for LaTeX commands which appear very often inside
1106 Although the preamble is a good place to declare such commands, they
1110 be declared anywhere (before they are used for the first time, of course).
1111 This can be useful if there is a lot of raw LaTeX code in your document,
1112 which normally should not be the case.
1115 \begin_layout Standard
1116 LyX adds its own set of definitions to the preamble of the
1117 \begin_inset Flex Code
1120 \begin_layout Plain Layout
1127 This makes LaTeX files generated by LyX portable.
1130 \begin_layout Subsection
1131 Changing the Preamble
1134 \begin_layout Standard
1135 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1136 can't change them without patching LyX itself.
1137 You can, however, add your own stuff to the preamble by selecting
1138 \begin_inset Flex MenuItem
1141 \begin_layout Plain Layout
1143 \begin_inset space ~
1152 \begin_inset Flex MenuItem
1155 \begin_layout Plain Layout
1156 Document\SpecialChar \menuseparator
1163 LyX adds anything in the
1164 \begin_inset Flex MenuItem
1167 \begin_layout Plain Layout
1173 dialog to its own built-in preamble.
1174 Before adding your own declarations in the preamble, you should make sure
1175 that LyX doesn't already support what you want to do.
1176 (Remember what we said about reinventing the wheel?) Also,
1178 make sure your preamble code is correct
1181 LyX doesn't check it for you.
1182 If there is an error, you're likely to get an error like
1183 \begin_inset Quotes eld
1187 \begin_inset Flex Code
1190 \begin_layout Plain Layout
1199 \begin_inset Quotes erd
1203 If you see this error, check your preamble.
1206 \begin_layout Subsection
1210 \begin_layout Standard
1211 Here are some examples of what you can add to a preamble, and what they
1215 \begin_layout Subsubsection
1219 \begin_layout Standard
1220 There are two variables under LaTeX that control page position:
1221 \begin_inset Flex Code
1224 \begin_layout Plain Layout
1233 \begin_inset Flex Code
1236 \begin_layout Plain Layout
1245 Their names should be self-explanatory.
1246 These variables are useful if you think for a moment about computer labels.
1247 Sometimes, the size of a print medium and the area of the medium that you
1248 can actually print on aren't the same.
1250 \begin_inset Flex Code
1253 \begin_layout Plain Layout
1262 \begin_inset Flex Code
1265 \begin_layout Plain Layout
1276 \begin_layout Standard
1277 The default values for
1278 \begin_inset Flex Code
1281 \begin_layout Plain Layout
1290 \begin_inset Flex Code
1293 \begin_layout Plain Layout
1302 \begin_inset space \thinspace{}
1306 \begin_inset space \thinspace{}
1310 \begin_inset space \space{}
1313 the page isn't shifted.
1314 Unfortunately, some DVI drivers always seem to shift the page.
1315 We have no idea why, or why the sysadmin hasn't fixed such behavior.
1316 If you're using LyX on a system that you don't personally maintain, and
1317 your sysadmin is a doofus,
1318 \begin_inset Flex Code
1321 \begin_layout Plain Layout
1330 \begin_inset Flex Code
1333 \begin_layout Plain Layout
1342 Suppose your left and top margins are always 0.5
1343 \begin_inset space \thinspace{}
1347 You can add this to the preamble:
1350 \begin_layout LyX-Code
1358 \begin_layout LyX-Code
1366 \begin_layout Standard
1367 and your margins should now be correct.
1370 \begin_layout Subsubsection
1374 \begin_layout Standard
1375 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1376 There's a rather nice package, available at your nearest CTAN archive,
1377 for printing sheets of labels:
1378 \begin_inset Flex Code
1381 \begin_layout Plain Layout
1388 Now, your system may not have this package installed by default.
1389 We leave that up to you to check.
1390 You'll also want to read the documentation for it; we're not going to do
1392 Since this is an example, however, we'll give you an example of how you
1396 \begin_layout Standard
1397 First, make sure you're using the
1398 \begin_inset Flex Code
1401 \begin_layout Plain Layout
1408 Next, you need to put the following in your preamble:
1411 \begin_layout LyX-Code
1417 \begin_layout LyX-Code
1423 \begin_layout LyX-Code
1429 \begin_layout LyX-Code
1435 \begin_layout LyX-Code
1441 \begin_layout LyX-Code
1447 \begin_layout LyX-Code
1453 \begin_layout Standard
1454 This sets things up for Avery label sheets, stock #5360.
1455 You're now ready to print labels, but you'll need to insert LaTeX code,
1456 placing the commands
1457 \begin_inset Flex Code
1460 \begin_layout Plain Layout
1469 \begin_inset Flex Code
1472 \begin_layout Plain Layout
1480 around each label text.
1481 This and other special features of
1482 \begin_inset Flex Code
1485 \begin_layout Plain Layout
1491 are explained in its documentation.
1494 \begin_layout Standard
1495 Someday, someone may write a LyX layout file to support this package directly.
1496 Maybe that someone is you.
1499 \begin_layout Subsubsection
1500 Example #3: Paragraph Indentation
1503 \begin_layout Standard
1504 Americans are trained to indent the first line of
1509 As with all of their other weird quirks, most Americans will whine and
1510 moan until they can have their way and indent the first line of all paragraphs.
1519 \begin_layout Standard
1520 Of course, this behavior isn't standard typography.
1521 In books, you typically only indent the first line of a paragraph
1525 it follows another one.
1526 The idea behind indenting the first line of a paragraph is to distinguish
1527 neighboring paragraphs from one another.
1528 If there is no previous paragraph—for example, if it follows a figure or
1529 is the first paragraph in a section—then there is no need for indentation.
1533 \begin_layout Standard
1534 If you're a typical American (we're still joking!), though, you don't care
1535 about such esoteric things; you want your indentation! Add this to the
1539 \begin_layout LyX-Code
1542 usepackage{indentfirst}
1545 \begin_layout Standard
1546 If your TeX distribution isn't braindead, you'll have this package, and
1547 all of your paragraphs will get the indentation the Founding Fathers intended
1551 \begin_layout Subsubsection
1552 Example #4: This Document
1555 \begin_layout Standard
1556 You can also check out the preamble of this document to get an idea of some
1557 of the advanced things you can do.
1560 \begin_layout Section
1561 LyX and LaTeX Errors
1564 \begin_layout Standard
1565 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1567 It then uses the logfile from the LaTeX run to do a post-mortem.
1568 After analyzing the logfile,LyX displays a dialog listing the errors.
1569 Clicking on any one of them will take you to the position in your LyX file
1570 where the error occurred.
1574 \begin_layout Plain Layout
1576 Analyzing the logfile is a tough job, and LyX doesn't always go to the
1578 There are also cases where LaTeX reports the error on one line, but the
1579 actual error is earlier.
1580 This is not unlike forgetting a closing brace in a program: You'll get
1581 an error, but only later.
1589 \begin_layout Standard
1590 Some folks also like to look at the log file directly: It is available from
1592 \begin_inset Flex MenuItem
1595 \begin_layout Plain Layout
1598 \SpecialChar \menuseparator
1602 \begin_inset space ~
1611 There are some fairly common error messages and warnings.
1612 We'll cover those here.
1613 You should look at a good LaTeX book for a complete listing.
1616 \begin_layout Itemize
1617 \begin_inset Flex Code
1620 \begin_layout Plain Layout
1627 \begin_inset Newline newline
1630 Anything beginning with these words is a warning message for the purpose
1632 \begin_inset Quotes eld
1636 \begin_inset Quotes erd
1639 the LaTeX code itself.
1640 You'll get messages like this if you added or changed cross-references
1641 or bibliography entries, in which case, LaTeX is trying to tell you that
1642 you need to make another run.
1643 You can by-and-large ignore these.
1646 \begin_layout Itemize
1647 \begin_inset Flex Code
1650 \begin_layout Plain Layout
1657 \begin_inset Newline newline
1660 Another warning message, this time about fonts which LaTeX couldn't find.
1661 The rest of the message will often say something about a replacement font
1663 You can safely ignore these, too.
1666 \begin_layout Itemize
1667 \begin_inset Flex Code
1670 \begin_layout Plain Layout
1679 \begin_inset Newline newline
1687 They are warnings about lines that were too long and run past the right
1689 Almost always, this is unnoticeable in the final output.
1690 (It can be just a point or two.) Or, only one or two characters extend past
1692 LaTeX seems to generate at least one of these messages for just about any
1694 \begin_inset Newline newline
1697 You can ignore these messages.
1698 Your eyes will tell you if there's a problem with something that's too
1699 wide; just look at the output.
1703 \begin_layout Plain Layout
1704 You can also enable the `draft' option in
1705 \begin_inset Flex MenuItem
1708 \begin_layout Plain Layout
1711 \SpecialChar \menuseparator
1719 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1727 \begin_layout Itemize
1728 \begin_inset Flex Code
1731 \begin_layout Plain Layout
1740 \begin_inset Newline newline
1743 Not quite as common as its cousin.
1744 LaTeX seems to like to print lines that are a bit too wide as opposed to
1745 ones that are a bit too narrow.
1746 We have no idea why.
1749 \begin_layout Itemize
1750 \begin_inset Flex Code
1753 \begin_layout Plain Layout
1762 \begin_inset Flex Code
1765 \begin_layout Plain Layout
1774 \begin_inset Newline newline
1777 Warnings about troubles breaking the page.
1778 Once again, just look at the output.
1779 Your eyes will tell you where something has gone wrong.
1782 \begin_layout Itemize
1783 \begin_inset Flex Code
1786 \begin_layout Plain Layout
1788 \begin_inset Quotes els
1792 \begin_inset Quotes ers
1801 \begin_inset Newline newline
1805 \begin_inset Quotes eld
1809 \begin_inset Quotes erd
1812 isn't installed on this system.
1813 This usually appears because some package your document needs isn't installed.
1814 If you didn't touch the preamble or didn't use the
1815 \begin_inset Flex Code
1818 \begin_layout Plain Layout
1826 command, then one of the packages LyX tried to load is missing.
1828 \begin_inset Flex MenuItem
1831 \begin_layout Plain Layout
1832 Help\SpecialChar \menuseparator
1838 to get a list of packages that LyX knows about.
1839 This file is updated whenever you reconfigure LyX (using
1840 \begin_inset Flex MenuItem
1843 \begin_layout Plain Layout
1844 Tools\SpecialChar \menuseparator
1850 ) and tells you which packages have been detected and what they do.
1851 \begin_inset Newline newline
1855 \begin_inset Flex Code
1858 \begin_layout Plain Layout
1866 command and the package in question isn't installed, then you'll need to
1867 install it yourself.
1870 \begin_layout Itemize
1871 \begin_inset Flex Code
1874 \begin_layout Plain Layout
1875 LaTeX Error: Unknown option
1881 \begin_inset Newline newline
1884 Error messages beginning with this are trying to tell you that you specified
1885 a bad or undefined option to a package.
1886 Check the package's documentation.
1889 \begin_layout Itemize
1890 \begin_inset Flex Code
1893 \begin_layout Plain Layout
1894 Undefined control sequence
1900 \begin_inset Newline newline
1903 If you've inserted LaTeX code into your document, but made a typo, you'll
1905 You may have forgotten to load a package.
1906 In any case, this error message usually means that you used an undefined
1911 \begin_layout Standard
1912 There are other error and warning messages.
1913 Some are self-explanatory.
1914 These are usually LaTeX messages.
1915 Others are downright cryptic.
1916 These are usually TeX error messages, and we really have
1920 what they mean or how to decipher them.
1924 \begin_layout Standard
1925 There's a general sequence you should follow if you get error messages:
1928 \begin_layout Enumerate
1929 Look at the LaTeX code you inserted for typos.
1932 \begin_layout Enumerate
1933 If there are no typos, check that you used the command(s) correctly.
1936 \begin_layout Enumerate
1937 If you get a bunch of error boxes piled up at the very top of the document—and
1938 especially if you see a
1939 \begin_inset Quotes eld
1943 \begin_inset Flex Code
1946 \begin_layout Plain Layout
1955 \begin_inset Quotes erd
1958 error—it means that there are errors in the preamble.
1959 Start debugging your preamble.
1962 \begin_layout Enumerate
1963 If you didn't add anything to the preamble and didn't add any LaTeX code
1964 to the document, the first suspect is your LaTeX distribution itself.
1965 Check for missing packages and install them.
1968 \begin_layout Enumerate
1969 Okay, so there are no missing packages.
1970 Did you use any of the fine-tuning options in LyX? Specifically, did you
1975 any of them, like trying to manually insert lots of
1976 \begin_inset Flex Code
1979 \begin_layout Plain Layout
1981 \begin_inset space ~
1990 \begin_inset Flex Code
1993 \begin_layout Plain Layout
2000 \begin_inset Flex Code
2003 \begin_layout Plain Layout
2009 ? Did you try to kludge something together with these instead of using the
2010 appropriate paragraph environment?
2013 \begin_layout Enumerate
2014 All right, you didn't use any of the fine-tuning options, you played by
2016 Did you try to pull a fancy maneuver? Did you do something funky inside
2017 a table or an equation, like inserting a graphic into a table cell?
2020 \begin_layout Enumerate
2021 Do you have long sections of text where LaTeX cannot find a place to break
2022 a line? By default, LaTeX is rather strict about how much extra inter-word
2023 spacing it will add in order to break a line.
2024 Preferably, you should rework the paragraph to avoid the problem.
2025 If this isn't an option, you can wrap your text in
2026 \begin_inset Flex Code
2029 \begin_layout Plain Layout
2037 to make LaTeX's line breaking more, well, sloppy.
2040 \begin_layout Enumerate
2041 Did you go overboard with the nesting? LyX (currently) doesn't check to
2042 make sure you're in the limits for nesting environments.
2043 If you nested a bunch of environments to the
2044 \begin_inset Formula $17^{\mathrm{th}}$
2047 level, that's the problem.
2048 (The limit in LaTeX is five.)
2051 \begin_layout Enumerate
2052 Okay, you didn't get any error messages, but your output looks awful.
2053 If you have a table or figure that's too wide or long for the page, you
2058 \begin_layout Enumerate
2059 rescale the figure so it fits.
2062 \begin_layout Enumerate
2063 trim down the table so it fits.
2067 \begin_layout Enumerate
2068 If something else is wrong with the output, and you didn't try to pull anything
2069 fancy or kludge the fine-tuning options, we're not sure what's wrong.
2072 \begin_layout Standard
2073 If all this doesn't help—well, then
2077 you might have found a bug in LyX\SpecialChar \ldots{}
2081 \begin_layout Chapter
2085 \begin_layout Section
2086 Customizing Bibliographies with BibTeX
2089 \begin_layout Standard
2090 The most basic information about how to use BibTeX with LyX is contained
2093 Bibliography databases (BibTeX)
2100 The following subsections explain special bibliography features supported
2104 \begin_layout Subsection
2105 Alternative Citation Styles
2108 \begin_layout Standard
2109 Standard BibTeX uses numbers (e.
2110 \begin_inset space \thinspace{}
2114 \begin_inset space \space{}
2118 \begin_inset Quotes eld
2122 \begin_inset Quotes erd
2125 ) to refer to a cited work.
2126 However, in many scientific disciplines, other citation styles are in use.
2127 The most common one is the author-year style (e.
2128 \begin_inset space \thinspace{}
2132 \begin_inset space \space{}
2136 \begin_inset Quotes eld
2140 \begin_inset Quotes erd
2144 LyX supports two packages that provide this style,
2145 \begin_inset Flex Code
2148 \begin_layout Plain Layout
2155 \begin_inset Flex Code
2158 \begin_layout Plain Layout
2165 Both packages have their pros and cons, which cannot be listed in detail.
2166 If you only want to have simple author-year (or author-numerical) style,
2167 or if you want to use one of the countless style files for
2168 \begin_inset Flex Code
2171 \begin_layout Plain Layout
2177 , than the established
2178 \begin_inset Flex Code
2181 \begin_layout Plain Layout
2187 package is probably your choice.
2188 If you need special features like short title references, ibidem etc., you
2190 \begin_inset Flex Code
2193 \begin_layout Plain Layout
2202 \begin_layout Standard
2203 The handling of both packages in LyX is basically the same.
2205 \begin_inset Flex MenuItem
2208 \begin_layout Plain Layout
2209 Document\SpecialChar \menuseparator
2216 \begin_inset Flex MenuItem
2219 \begin_layout Plain Layout
2226 \begin_inset Flex MenuItem
2229 \begin_layout Plain Layout
2236 \begin_inset Flex MenuItem
2239 \begin_layout Plain Layout
2246 With both packages, you will get some extra features in the citation dialog
2247 and you can select the style of the reference (
2248 \begin_inset Quotes eld
2252 \begin_inset Quotes erd
2256 \begin_inset Quotes eld
2260 \begin_inset Quotes erd
2264 \begin_inset Quotes eld
2268 \begin_inset Quotes erd
2272 \begin_inset Quotes eld
2276 \begin_inset Quotes erd
2280 Note that both packages need specifically designed style files.
2281 They both ship their own, but there are lots of additional style files,
2282 and there is even an interactive style file builder
2286 \begin_layout Plain Layout
2288 \begin_inset Flex URL
2291 \begin_layout Plain Layout
2293 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2304 \begin_inset Flex Code
2307 \begin_layout Plain Layout
2316 \begin_layout Subsection
2317 Sectioned Bibliographies
2320 \begin_layout Standard
2321 Sometimes you might need to divide your bibliography into several sections.
2322 If you are for instance a historian, the possibility to separate sources
2323 and scientific works is most likely a
2324 \begin_inset Quotes eld
2328 \begin_inset Quotes erd
2332 Unfortunately, BibTeX itself does not allow you to do this.
2333 But with the help of some LaTeX packages, BibTeX can be extended to fit
2337 \begin_layout Standard
2338 LyX provides native support for one of these packages,
2346 \begin_layout Plain Layout
2348 \begin_inset Flex URL
2351 \begin_layout Plain Layout
2353 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2363 The advantage of this package (compared to other packages like
2367 ) is that you don't need to define new citation commands.
2368 Instead, you need to prepare different bibliographic databases which include
2369 the entries for the different sections of the bibliography.
2370 For example: If you want to divide your bibliography into the sections
2372 \begin_inset Quotes eld
2376 \begin_inset Quotes erd
2380 \begin_inset Quotes eld
2384 \begin_inset Quotes erd
2387 , you first need to create two bibliographic databases, e.
2388 \begin_inset space \thinspace{}
2392 \begin_inset space \space{}
2396 \begin_inset Flex Code
2399 \begin_layout Plain Layout
2406 \begin_inset Flex Code
2409 \begin_layout Plain Layout
2419 \begin_layout Standard
2421 \begin_inset Flex MenuItem
2424 \begin_layout Plain Layout
2425 Document\SpecialChar \menuseparator
2432 \begin_inset Flex MenuItem
2435 \begin_layout Plain Layout
2442 \begin_inset Flex MenuItem
2445 \begin_layout Plain Layout
2446 Sectioned bibliography
2452 Now you can insert multiple BibTeX bibliographies, one for each section
2453 of your bibliography.
2454 Returning to our example: Insert the BibTeX bibliography
2455 \begin_inset Flex Code
2458 \begin_layout Plain Layout
2464 and a second one for the database
2465 \begin_inset Flex Code
2468 \begin_layout Plain Layout
2475 You are free to use the same or different styles for each section.
2476 Additionally, you can chose if the bibliography section should contain
2478 \begin_inset Quotes eld
2481 all cited references
2482 \begin_inset Quotes erd
2485 of the specified database(s) (which is the default),
2486 \begin_inset Quotes eld
2489 all uncited references
2490 \begin_inset Quotes erd
2494 \begin_inset Quotes eld
2498 \begin_inset Quotes erd
2502 This might be useful if you would like to separate your bibliography into
2504 \begin_inset Quotes eld
2508 \begin_inset Quotes erd
2512 \begin_inset Quotes eld
2516 \begin_inset Quotes erd
2520 \begin_inset Quotes eld
2524 \begin_inset Quotes erd
2528 The titles for the sections can be added as ordinary sections or subsections.
2530 \begin_inset Flex Code
2533 \begin_layout Plain Layout
2539 removes the bibliography title, you have manually re-add that, too (as
2540 a chapter* or section*, for instance).
2543 \begin_layout Subsection
2544 Multiple Bibliographies
2547 \begin_layout Standard
2548 Multiple bibliographies, e.
2549 \begin_inset space \thinspace{}
2553 \begin_inset space \space{}
2556 a bibliography for each section or chapter of the document, are not supported
2559 \begin_inset Flex Code
2562 \begin_layout Plain Layout
2568 package, which is used for the creation of sectioned bibliographies in
2569 LyX (see the previous section), provides an easy way to solve this task,
2570 if you are willing to use some
2571 \begin_inset Flex MenuItem
2574 \begin_layout Plain Layout
2581 \begin_inset space ~
2585 \begin_inset CommandInset ref
2587 reference "sec:Inserting-TeX-Code"
2595 \begin_layout Plain Layout
2596 An alternative approach is to use the
2597 \begin_inset Flex Code
2600 \begin_layout Plain Layout
2607 \begin_inset Flex Code
2610 \begin_layout Plain Layout
2616 package, respectively.
2624 \begin_layout Standard
2626 \begin_inset Flex MenuItem
2629 \begin_layout Plain Layout
2630 Document\SpecialChar \menuseparator
2637 \begin_inset Flex MenuItem
2640 \begin_layout Plain Layout
2647 \begin_inset Flex MenuItem
2650 \begin_layout Plain Layout
2651 Sectioned bibliography
2657 In the document, you have to enclose the sections, which shall contain
2658 their own bibliography (including the BibTeX bibliography itself), between
2660 \begin_inset Flex Code
2663 \begin_layout Plain Layout
2672 \begin_inset Flex Code
2675 \begin_layout Plain Layout
2683 (those commands have to be inserted as TeX code).
2684 The bibliography will contain all references which have been cited in the
2686 \begin_inset Flex Code
2689 \begin_layout Plain Layout
2700 If you are using this approach, then every citation reference has to be
2702 \begin_inset Flex Code
2705 \begin_layout Plain Layout
2713 \begin_inset Flex Code
2716 \begin_layout Plain Layout
2725 \begin_layout Section
2729 \begin_layout Subsection
2733 \begin_layout Standard
2734 When you are working on a large file with many sections, it is often convenient
2735 to break up the document into several files, or perhaps you have something
2736 where a table may change from time to time, but the preceding text does
2738 In these cases, you should seriously consider using multipart documents.
2739 For example, scientific papers often have five major sections: the introduction
2740 , observations, results, discussion, and conclusion.
2741 Each of these could be its own separate LyX file, with one
2742 \begin_inset Quotes eld
2746 \begin_inset Quotes erd
2749 file which contains the title, authors, abstract, references, etc., plus
2750 the five included files.
2751 It is important to note that each of these files is a full LyX file which
2752 can be formatted and printed on its own, as well as included in a master
2754 Each of these files must have the same document class, however—don't attempt
2755 to mix book classes with article classes.
2756 You may also include LaTeX files; however, these files must not have their
2758 \begin_inset space \thinspace{}
2762 \begin_inset space \space{}
2765 everything up to and including the
2766 \begin_inset Flex Code
2769 \begin_layout Plain Layout
2778 \begin_inset Flex Code
2781 \begin_layout Plain Layout
2789 line must be deleted) or else errors will be generated when you try to
2793 \begin_layout Standard
2794 LyX allows you to include files quite easily with
2795 \begin_inset Flex MenuItem
2798 \begin_layout Plain Layout
2799 Insert\SpecialChar \menuseparator
2801 \begin_inset space ~
2810 When you click on this selection a small box is inserted into the file
2811 at the current cursor location.
2812 Clicking on the box raises a dialog which allows you to select the file
2813 to be included, and the method of its inclusion.
2817 \begin_layout Standard
2818 The file selection box should by now be obvious.
2819 The three inclusion methods are
2820 \begin_inset Quotes eld
2824 \begin_inset Quotes erd
2828 \begin_inset Quotes eld
2832 \begin_inset Quotes erd
2836 \begin_inset Quotes eld
2840 \begin_inset Quotes erd
2844 The difference between
2845 \begin_inset Quotes eld
2849 \begin_inset Quotes erd
2853 \begin_inset Quotes eld
2857 \begin_inset Quotes erd
2860 is really only meaningful to LaTeXperts, but the practical difference is
2861 that files which are
2862 \begin_inset Quotes eld
2866 \begin_inset Quotes erd
2869 are typeset beginning on a new page, while files which are
2870 \begin_inset Quotes eld
2874 \begin_inset Quotes erd
2877 are typeset starting on the current page.
2880 \begin_layout Standard
2881 Generally, the master file is converted into a full LaTeX file before typesettin
2882 g, while the included files are converted to LaTeX files which do not have
2883 all the preamble information.
2886 \begin_layout Standard
2888 \begin_inset Quotes eld
2892 \begin_inset Quotes erd
2895 included file allows you to include a file typeset exactly as it appears
2897 \begin_inset space \thinspace{}
2901 \begin_inset space \space{}
2905 \begin_inset Flex Code
2908 \begin_layout Plain Layout
2914 mode, with the characters set in a fixed-width typewriter font.
2915 Normally, spaces in this file are invisible, though two consecutive spaces
2916 are conserved, unlike LyX's normal treatment of spaces.
2917 However, setting the
2918 \begin_inset Flex MenuItem
2921 \begin_layout Plain Layout
2923 \begin_inset space ~
2927 \begin_inset space ~
2931 \begin_inset space ~
2939 checkbox typesets a mark to unambiguously define the presence of a space.
2943 \begin_layout Subsection
2944 Cross-References Between Files
2947 \begin_layout Standard
2948 \begin_inset Box Shadowbox
2958 height_special "totalheight"
2961 \begin_layout Plain Layout
2962 This section is somewhat out of date.
2963 Need to describe default master documents and how children are opened when
2973 \begin_layout Standard
2974 It is possible to set up cross-references between the different files.
2975 First, open all the files in question: let's call them A and B in a two
2976 file example, where B is included in A.
2977 Let's say you insert a label in A, then want to reference it in B.
2978 Open the cross-reference dialog in whilst in document B, and you can select
2980 \begin_inset Quotes eld
2984 \begin_inset Quotes erd
2990 \begin_layout Subsection
2991 Bibliography Lists in all Subdocuments
2994 \begin_layout Standard
2995 \begin_inset Box Frameless
3005 height_special "totalheight"
3008 \begin_layout Plain Layout
3009 This section also needs updating.
3010 There is now material about this on the wiki, and it could be copied here.
3018 \begin_layout Standard
3019 Copy the bibliography list with all entries to all subdocuments and transform
3021 This way LyX will find the
3022 \begin_inset Flex Code
3025 \begin_layout Plain Layout
3031 -files and you can easily insert references without making the bibliography
3035 \begin_layout Standard
3036 As the bibliography list is in a comment, LaTeX won't use use it and the
3037 references will look like this: [?], instead of like this: [1].
3038 One solution is to use the LaTeX-package
3039 \begin_inset Flex Code
3042 \begin_layout Plain Layout
3048 that will only include comments by processing the files separately.
3049 To do this, add in the LaTeX preamble of every subdocument the following:
3052 \begin_layout LyX-Code
3058 \begin_layout LyX-Code
3061 includecomment{comment}
3064 \begin_layout Standard
3066 \begin_inset Flex URL
3069 \begin_layout Plain Layout
3071 http://wiki.lyx.org/FAQ/Unsorted#toc31
3079 \begin_layout Section
3083 \begin_layout Standard
3084 Users sometimes need to be able to
3085 \begin_inset Quotes eld
3089 \begin_inset Quotes erd
3092 a LyX file together with all the images (and other files) on which it depends,
3093 either for sending to a publisher or for sharing with a co-author.
3094 LyX 2.0 includes a Python script (
3095 \begin_inset Flex Code
3098 \begin_layout Plain Layout
3104 ) that automates this process.
3105 To use it, you must have either the
3106 \begin_inset Flex Code
3109 \begin_layout Plain Layout
3116 \begin_inset Flex Code
3119 \begin_layout Plain Layout
3125 python modules installed on your system.
3126 By default, the script prefers the
3127 \begin_inset Flex Code
3130 \begin_layout Plain Layout
3137 \begin_inset Flex Code
3140 \begin_layout Plain Layout
3146 format on Unix-like systems and the
3147 \begin_inset Flex Code
3150 \begin_layout Plain Layout
3159 \begin_layout Standard
3160 LyX's configuration process will set the script up to export a `LyX Archive',
3161 and this format will then be available under
3162 \begin_inset Flex Code
3165 \begin_layout Plain Layout
3166 File\SpecialChar \menuseparator
3175 \begin_layout Standard
3176 Independently of the platform, the generation of a particular archive format
3177 can be forced by adding either the
3178 \begin_inset Flex Code
3181 \begin_layout Plain Layout
3188 \begin_inset Flex Code
3191 \begin_layout Plain Layout
3198 \begin_inset Flex Code
3201 \begin_layout Plain Layout
3208 \begin_inset Flex Code
3211 \begin_layout Plain Layout
3217 format) switch to the
3218 \begin_inset Flex Code
3221 \begin_layout Plain Layout
3222 LyX\SpecialChar \menuseparator
3229 \begin_inset Flex Code
3232 \begin_layout Plain Layout
3233 Tools\SpecialChar \menuseparator
3234 Preferences\SpecialChar \menuseparator
3235 File Handling\SpecialChar \menuseparator
3242 (Make sure you add the switch after the script name, not before it.)
3245 \begin_layout Section
3246 Fancy Headers and Footers
3249 \begin_layout Standard
3250 The default page layout is rather plain; for an
3251 \begin_inset Flex Code
3254 \begin_layout Plain Layout
3260 document class, all you get is a centered page number at the bottom of
3262 This document uses KOMA-script's book class, so it appears to be a bit
3264 But to really put on a show, you need to set the document page style to
3266 \begin_inset Quotes eld
3270 \begin_inset Quotes erd
3273 , as mentioned in the
3278 This section describes the LaTeX code you need to insert in your LaTeX
3279 preamble in order to get the desired effects.
3282 \begin_layout Standard
3283 For more information on fancy headers, see the
3284 \begin_inset Flex Code
3287 \begin_layout Plain Layout
3293 package documentation.
3295 \begin_inset Flex URL
3298 \begin_layout Plain Layout
3300 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3308 \begin_layout Standard
3309 The page header is divided into three fields, not surprisingly labeled
3310 \begin_inset Quotes eld
3314 \begin_inset Quotes erd
3318 \begin_inset Quotes eld
3322 \begin_inset Quotes erd
3326 \begin_inset Quotes eld
3330 \begin_inset Quotes erd
3334 The footer is also divided into these three fields.
3335 The LaTeX commands to set these fields in the simplest manner are
3336 \begin_inset Flex Code
3339 \begin_layout Plain Layout
3348 \begin_inset Flex Code
3351 \begin_layout Plain Layout
3360 \begin_inset Flex Code
3363 \begin_layout Plain Layout
3372 \begin_inset Flex Code
3375 \begin_layout Plain Layout
3384 Suppose you wish to put your name in the upper left hand corner of each
3386 Simply insert the following command in the preamble:
3389 \begin_layout Standard
3398 \begin_layout Standard
3399 You will now see your name in the upper left.
3400 If a field has a default entry that you would like to get rid of (often
3401 the page number appears in the central footer, simply include a command
3402 with a blank argument, e.
3403 \begin_inset space \thinspace{}
3409 \begin_layout Standard
3417 \begin_layout Standard
3418 Let's get really fancy: lets put the section number with the word
3419 \begin_inset Quotes eld
3423 \begin_inset Quotes erd
3427 \begin_inset space \thinspace{}
3431 \begin_inset space \space{}
3434 Section 3) in the upper left, the page number (e.
3435 \begin_inset space \thinspace{}
3439 \begin_inset space \space{}
3442 Page 4) in the upper right, your name in the lower left, and the date in
3444 The following commands should now appear in the preamble:
3447 \begin_layout Standard
3457 \begin_layout Standard
3465 \begin_layout Standard
3475 \begin_layout Standard
3484 \begin_layout Standard
3492 \begin_layout Standard
3502 \begin_layout Standard
3504 \begin_inset Flex Code
3507 \begin_layout Plain Layout
3516 \begin_inset Flex Code
3519 \begin_layout Plain Layout
3527 access LaTeX's section and page counters, and so print out the current
3528 section and page numbers.
3530 \begin_inset Flex Code
3533 \begin_layout Plain Layout
3541 simply prints out today's date.
3544 \begin_layout Standard
3545 The thicknesses of the horizontal rules drawn beneath the header and above
3546 the footer can also be modified.
3547 If you don't want one of the rules, set its thickness to 0.
3548 The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3554 \begin_inset Flex Code
3557 \begin_layout Plain Layout
3562 headrulewidth}{0.4pt}
3568 \begin_inset Flex Code
3571 \begin_layout Plain Layout
3576 footrulewidth}{0.4pt}
3581 to set the thicknesses.
3584 \begin_layout Standard
3585 You can switch the header/footer settings on and off for individual pages
3587 \begin_inset Flex Code
3590 \begin_layout Plain Layout
3593 thispagestyle{empty}
3599 \begin_inset Flex Code
3602 \begin_layout Plain Layout
3605 thispagestyle{plain}
3611 \begin_inset Flex Code
3614 \begin_layout Plain Layout
3617 thispagestyle{fancy}
3623 Simply insert them in the text on the page you want changed and mark them
3625 In fact, title pages are marked as plain by default, while following pages
3626 are marked fancy when using the global fancy setting.
3629 \begin_layout Standard
3630 As a final example, it is possible to include an image in the header or
3632 Suppose you want to put a company logo in the upper lefthand corner.
3633 You might try something like
3636 \begin_layout Standard
3645 includegraphics{logo.eps}}}
3648 \begin_layout Standard
3650 (you may need to preface this with
3651 \begin_inset Flex Code
3654 \begin_layout Plain Layout
3658 usepackage{graphics}
3663 if you don't include graphics elsewhere in your document).
3666 \begin_layout Section
3667 Itemize Bullet Selection
3668 \begin_inset CommandInset label
3677 \begin_layout Standard
3683 \begin_layout Subsection
3687 \begin_layout Standard
3688 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3689 Using this dialog you can easily specify what bullet shape to use at each
3690 level of an itemized list.
3691 These settings are document-wide so you won't be able to specify different
3692 sets of bullets for different paragraphs.
3696 \begin_layout Plain Layout
3697 Well, actually you can but you'll have to do it by hand.
3705 \begin_layout Subsection
3709 \begin_layout Standard
3710 Open the dialog by selecting the
3711 \begin_inset Flex MenuItem
3714 \begin_layout Plain Layout
3715 Document\SpecialChar \menuseparator
3721 menu item and then select the
3722 \begin_inset Flex MenuItem
3725 \begin_layout Plain Layout
3734 \begin_layout Standard
3735 The dialog provides you with a table of bullet shapes.
3736 A column of buttons on the left of the table provides access to the six
3737 different panels of bullet shapes.
3738 The row of buttons across the top is used to select which bullet depth
3740 A text entry under the table shows the currently selected bullet shape's
3741 LaTeX equivalent and this can be edited if desired.
3742 If you do modify the text you will also need to specify any needed packages
3743 in the LaTeX preamble.
3746 \begin_layout Standard
3747 The six panels are divided up by the packages they require.
3748 The following table shows the mappings from button name to LaTeX packages.
3751 \begin_layout Standard
3753 \begin_inset Tabular
3754 <lyxtabular version="3" rows="7" columns="2">
3755 <features tabularvalignment="middle">
3756 <column alignment="center" valignment="top" width="0pt">
3757 <column alignment="center" valignment="top" width="0pt">
3759 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3762 \begin_layout Plain Layout
3777 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3780 \begin_layout Plain Layout
3797 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3800 \begin_layout Plain Layout
3815 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3818 \begin_layout Plain Layout
3834 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3837 \begin_layout Plain Layout
3852 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3855 \begin_layout Plain Layout
3872 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3875 \begin_layout Plain Layout
3890 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3893 \begin_layout Plain Layout
3910 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3913 \begin_layout Plain Layout
3928 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3931 \begin_layout Plain Layout
3948 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3951 \begin_layout Plain Layout
3966 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3969 \begin_layout Plain Layout
3986 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3989 \begin_layout Plain Layout
4004 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4007 \begin_layout Plain Layout
4030 \begin_layout Standard
4031 LyX doesn't stop you using bullets from packages you don't have.
4032 If you get errors from LaTeX when you try to view or print the file, then
4033 it is likely you are missing a package.
4037 \begin_layout Plain Layout
4038 LyX doesn't restrict your use since you may be editing locally and exporting
4047 \begin_layout Subsection
4051 \begin_layout Standard
4052 Select which bullet depth you want to change then select the bullet shape
4054 Any changes will not be visible in LyX, but are visible when viewing the
4058 \begin_layout Standard
4059 You can reset a bullet shape to the default simply by clicking your right
4060 mouse button on the appropriate bullet depth button.
4064 \begin_layout Plain Layout
4069 want to have multiple sets of paragraphs with different sets of bullets
4070 in each, then you're going to have to get your hands dirty with TeX code.
4071 The bullet selection dialog can help though because it provides you with
4072 the LaTeX code for a wide range of bullet shapes.
4073 To make your own custom paragraphs you have the following options:
4076 \begin_layout Plain Layout
4080 \begin_layout Plain Layout
4096 \begin_layout Plain Layout
4100 \begin_layout Plain Layout
4122 \begin_layout Itemize
4123 Use the LaTeX command
4124 \begin_inset Flex Code
4127 \begin_layout Plain Layout
4135 to specify a new bullet shape for a given depth.
4136 You'll also need to save the current bullet shape so you can restore it
4138 In this itemized list the following LaTeX code was used to change the bullet
4139 used for the first depth.
4143 \begin_layout LyX-Code
4153 \begin_layout LyX-Code
4170 \begin_layout Itemize
4171 Note that the itemize depth is specified in Roman numerals as part of the
4181 \begin_layout Itemize
4185 \begin_layout Plain Layout
4198 Specify each individual entry by starting each item with the bullet shape
4199 enclosed in square brackets and set as
4200 \begin_inset Flex MenuItem
4203 \begin_layout Plain Layout
4210 For example, this item was started with
4211 \begin_inset Flex Code
4214 \begin_layout Plain Layout
4229 \begin_layout Plain Layout
4233 \begin_layout Plain Layout
4249 \begin_layout Plain Layout
4250 You'll also need to revert the labelitem back to its previous setting for
4251 the global bullet shape settings to remain in effect.
4252 The way used here was:
4255 \begin_layout LyX-Code
4270 \begin_layout Chapter
4271 LyX and the World Wide Web
4274 \begin_layout Standard
4275 LyX has long supported the export of documents to various web-friendly formats,
4277 Before verson 2.0, however, HTML export was always accomplished by the use
4278 of external converters.
4282 \begin_layout Plain Layout
4283 For details on the use of external converters with LyX, see the
4287 section of the Customization manual.
4292 These fall into two large groups: there are converters that use LaTeX as
4293 an intermediate format, such as
4294 \begin_inset Flex Code
4297 \begin_layout Plain Layout
4304 \begin_inset Flex Code
4307 \begin_layout Plain Layout
4314 \begin_inset Flex Code
4317 \begin_layout Plain Layout
4323 , relying upon LyX to produce the LaTeX; and there is a converter that works
4324 directly on LyX files,
4325 \begin_inset Flex Code
4328 \begin_layout Plain Layout
4335 All of these have different advantages and disadvantages.
4339 \begin_layout Standard
4340 The LaTeX-based converters have the advantage that, in principle, they know
4341 everything about the exported document that LaTeX does.
4342 Such converters do not care, for example, if a certain block of code was
4343 produced by LyX or was Evil Red Text.
4344 These converters know about
4345 \begin_inset Flex Code
4348 \begin_layout Plain Layout
4354 files, counters, and references, and can often make use of the
4355 \begin_inset Flex Code
4358 \begin_layout Plain Layout
4364 files generated by BibTeX.
4365 On the other hand, LaTeX is a very hard language to parse---it is sometimes
4366 said that only TeX itself understands TeX---and LaTeX-based converters
4367 will often choke on what seem to be quite simple constructs; complex ones
4368 can throw them completely, and as of this writing, for example, the
4372 manual will not export with
4373 \begin_inset Flex Code
4376 \begin_layout Plain Layout
4382 , though the others will.
4383 The other issue concerns how math is handled.
4384 These converters typically convert the formulae into little pictures that
4385 are then linked from the HTML document.
4386 Since these are actually generated by LaTeX, they are accurate.
4387 But they do not scale well, and just getting them to look as if they are
4388 actually meant to be in your document---so that the font sizes seem to
4389 be roughly the same---can be a challenge.
4392 \begin_layout Standard
4394 \begin_inset Flex Code
4397 \begin_layout Plain Layout
4404 \begin_inset CommandInset href
4406 name "http://elyxer.nongnu.org/"
4407 target "http://elyxer.nongnu.org/"
4411 ) solves some of these problems.
4412 In particular, the formulae it produces scale perfectly, since it renders
4413 math using a combination of HTML and CSS rather than converting the formulae
4415 But even moderately complex formula are rendered less well than with
4416 \begin_inset Flex Code
4419 \begin_layout Plain Layout
4425 ; this reflects the limitations of HTML.
4429 \begin_layout Plain Layout
4431 \begin_inset Flex Code
4434 \begin_layout Plain Layout
4440 can also use jsMath and MathJax for equations, but this setting is only
4441 available globally and requires one to have access to a server that runs
4447 More importantly (as of version 1.1.1, at least),
4448 \begin_inset Flex Code
4451 \begin_layout Plain Layout
4457 has limited support for math macros and no support for user-defined paragraph
4458 or character styles.
4459 These limitations make
4460 \begin_inset Flex Code
4463 \begin_layout Plain Layout
4469 unsuitable for many of the documents LyX users produce.
4470 In principle, of course, these problems could be solved, but the LyX developers
4471 have decided to follow a different path and have made LyX itself capable
4472 of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4476 \begin_layout Standard
4477 As of this writing, XHTML output remains under development and should probably
4479 \begin_inset Quotes eld
4483 \begin_inset Quotes erd
4490 \begin_layout Plain Layout
4492 \begin_inset Flex Code
4495 \begin_layout Plain Layout
4496 development/HTML.notes
4501 , which can be found in the LyX source tree or
4502 \begin_inset CommandInset href
4504 name "accessed online"
4505 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4509 , usually contains up-to-date information about the state of XHTML output.
4510 See also the list of XHTML bugs on
4511 \begin_inset CommandInset href
4513 name "the bug tracker"
4514 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"
4523 Still, the developers have chosen this approach because it has several
4524 potential advantages over the other two.
4527 \begin_layout Standard
4528 These advantages are primarily due to the fact that the XHTML output routines,
4529 since they are part of LyX, know everything LyX knows about the document
4534 \begin_layout Plain Layout
4535 Another advantage is that, since these routines are internal to LyX, they
4536 are immune to changes in LyX's file format, or to changes in the semantics
4542 So they know about the table of contents (as displayed in the outline),
4543 about the counters associated with different paragraph styles, and about
4544 user-defined styles.
4545 The XHTML output routines know what LyX knows about internationalization,
4546 too, so they will output
4547 \begin_inset Quotes eld
4551 \begin_inset Quotes erd
4555 \begin_inset Quotes eld
4563 \begin_inset Quotes erd
4566 , depending upon the language in effect at the time.
4570 \begin_layout Standard
4571 Quite generally, the output routines know what LyX knows about document
4572 layout, that is, about how the document is to be rendered on screen.
4573 We use this information when we output the document as XHTML.
4578 generates CSS style information corresponding to the layout information
4579 it uses to render the document on screen: if section headings are supposed
4580 to be sans-serif and bold as seen in LyX, then (by default) they will be
4581 sans-serif and bold when viewed in a web browser, too.
4582 And this is true not just for pre-defined styles, like Section, but for
4583 any style, including user-defined styles.
4584 Indeed, the XHTML output routines make no distinction between user-defined
4585 paragraph and character styles and LyX's own pre-defined styles: in each
4586 case, everything LyX knows about the styles is contained in the layout
4588 And much the same is true as regards pre-defined textual insets, such as
4589 footnotes, and various custom insets.
4593 \begin_layout Standard
4594 The result is that XHTML output can be customized and extended in exactly
4595 the same way LaTeX output can be customized and extended: through layout
4597 See chapter five of the
4601 manual for the details.
4604 \begin_layout Standard
4605 The remainder of this chapter contains more detailed information on XHTML
4606 output, its limitations, and ways to work around those limitations.
4609 \begin_layout Section
4610 Math Output in XHTML
4613 \begin_layout Standard
4614 LyX offers four choices for how math is rendered.
4615 These have various advantages and disadvantages:
4618 \begin_layout Itemize
4620 \begin_inset Newline newline
4623 MathML is a dialect of XML designed specifically for mathematics on the
4624 web, and it typically renders very well in browsers that support it.
4625 The disadvantage is that not all browsers support MathML, and support is
4626 not complete even in the Gecko-based browsers, such as Firefox.
4627 \begin_inset Newline newline
4630 If LyX is unable to render a formula as MathML---for example, if the formula
4632 \begin_inset Flex Code
4635 \begin_layout Plain Layout
4641 package or ERT---then it will instead output the formula as an image.
4645 \begin_layout Itemize
4647 \begin_inset Newline newline
4651 \begin_inset Flex Code
4654 \begin_layout Plain Layout
4660 outputs math as HTML, styled by CSS.
4664 \begin_layout Plain Layout
4665 LyX has borrowed some of the CSS for its HTML output from
4666 \begin_inset Flex Code
4669 \begin_layout Plain Layout
4680 For simple formulae, this can work quite well, though with more complicated
4681 formulae it tends to break down.
4682 Still, this method has the advantage that it is very widely supported and
4683 so it may be appropriate for documents that contain only a little, fairly
4685 \begin_inset Newline newline
4688 If Lyx is unable to render a formula as HTML---for example, if the formula
4690 \begin_inset Flex Code
4693 \begin_layout Plain Layout
4699 package or ERT---then it will instead output the formula as an image.
4703 \begin_layout Itemize
4705 \begin_inset Newline newline
4709 \begin_inset Flex Code
4712 \begin_layout Plain Layout
4718 , LyX will output formulae as images, the very same images, in fact, that
4719 are used for instant preview.
4723 \begin_layout Plain Layout
4724 Instant preview does
4728 have to be on for images to be output, however.
4733 The advantage to this method is that the images are simply generated by
4734 LaTeX, so they are very accurate.
4735 The disadvantage, as mentioned earlier, is that these are bitmapped images,
4736 so they do not scale terribly well, and one cannot copy them, etc.
4737 (As of this writing, there are also problems about equation numbering.
4739 \begin_inset CommandInset href
4742 target "http://www.lyx.org/trac/ticket/6894"
4747 \begin_inset Newline newline
4750 The size of the images can be controlled by setting the
4751 \begin_inset Quotes eld
4755 \begin_inset Quotes erd
4759 \begin_inset Flex MenuItem
4762 \begin_layout Plain Layout
4763 Document\SpecialChar \menuseparator
4764 Settings\SpecialChar \menuseparator
4774 \begin_layout Plain Layout
4775 For those who want to know, this controls the resolution of the image in
4776 dots per inch and is based upon a default of 75 dpi.
4782 \begin_inset Newline newline
4785 If LyX for some reason fails to create an image for a formula (e.g., if a
4786 required LaTeX package is not installed), then it will fall back to outputing
4790 \begin_layout Itemize
4792 \begin_inset Newline newline
4795 Finally, LyX will happily output math as LaTeX.
4796 As well as being the output of last resort, this method can be used with
4798 \begin_inset CommandInset href
4801 target "http://www.math.union.edu/~dpvc/jsMath/"
4805 , which uses JavaScript to render LaTeX embedded in HTML documents.
4806 LyX wraps the LaTeX in either a
4807 \begin_inset Flex Code
4810 \begin_layout Plain Layout
4816 (for inline formulas) or
4817 \begin_inset Flex Code
4820 \begin_layout Plain Layout
4826 (for displayed formulas) with
4827 \begin_inset Flex Code
4830 \begin_layout Plain Layout
4836 , as is required for jsMath.
4839 \begin_layout Standard
4840 One of these output methods must be selected under
4841 \begin_inset Flex MenuItem
4844 \begin_layout Plain Layout
4845 Document\SpecialChar \menuseparator
4846 Settings\SpecialChar \menuseparator
4853 By default, LyX outputs MathML.
4854 This is a document-wide setting, therefore.
4857 \begin_layout Standard
4858 Eventually, LyX will offer the user the option to select an alternate output
4859 method for a particular inset, say, one that isn't being rendered very
4864 \begin_layout Plain Layout
4865 That said, since LyX falls back to images if the inset contains ERT, then
4866 one can force output as an image by putting some harmless ERT into the
4868 \begin_inset Formula $a=b\relax$
4879 \begin_layout Section
4880 Bibliography and Citations
4883 \begin_layout Standard
4884 XHTML output fully supports bibliographies and citations.
4888 \begin_layout Standard
4889 Citation labels are generated by the same machinery that generates LyX's
4890 on-screen labels, so the labels will look in the output much as they do
4891 in LyX, though better.
4892 If you are using numerical citations, then LyX will output numerical labels,
4893 such as [1] or [17], rather than simply showing the citation key in square
4894 brackets, as it does on-screen.
4895 If you are using author-year citations, then LyX will add lowercase letters
4896 to the years, just as BibTeX does, if it finds more than one citation for
4897 a given author-year combination.
4898 The labels will be printed with the bibliography entries.
4899 Note that there is, at present, no way to customize the appearance of the
4900 labels, for example, to choose between square brackets and parentheses.
4903 \begin_layout Standard
4904 Bibliography output is handled by the same machinery that handles the presentati
4905 on of reference information in the citation dialog, so you will see in the
4906 XHTML output pretty much what you would see if you were to look at a given
4907 entry in the citation dialog.
4908 The formatting can be customized in your layout file or, preferably, in
4914 manual for the details.
4917 \begin_layout Standard
4918 The main defect at present is that cross-referenced information is printed
4919 with every entry with which it is associated.
4920 So you can see things like this:
4925 \begin_inset Quotes eld
4928 Context and Logical Form
4929 \begin_inset Quotes erd
4934 Language in Context: Selected Essays
4936 (Oxford: Oxford University Press, 2007), pp.
4942 \begin_inset Quotes eld
4945 Semantics in Context
4946 \begin_inset Quotes erd
4951 Language in Context: Selected Essays
4953 (Oxford: Oxford University Press, 2007), pp.
4957 \begin_layout Standard
4958 This should be fixed before long.
4961 \begin_layout Standard
4962 There is no support at present for sectioned bibliographies.
4963 If you have multiple bibliographies, then LyX will print the same bibliography
4967 \begin_layout Section
4971 \begin_layout Standard
4972 LyX will happily export indexes as XHTML, but with certain limitations at
4976 \begin_layout Standard
4977 Index export will be most reliable when you do not attempt to use the fancy
4978 constructs that are described in the section on indexes in the
4986 \begin_layout Plain Layout
4987 The main issue here is that LyX itself does not really handle these.
4988 It just lets you enter what you would have to enter in raw LaTeX.
4993 We'll describe how they are handled using the subsection headings from
4997 \begin_layout Itemize
4998 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
4999 these, but the entries must be separated by
5000 \begin_inset Quotes eld
5004 \begin_inset Quotes erd
5007 , that is, there must be spaces around the exclamation point.
5008 This is because it is otherwise too difficult to check for escaped exclamation
5009 points, ones in math, and so forth.
5012 \begin_layout Itemize
5013 Page Ranges: There is no support at all for page ranges, since these make
5014 no sense with XHMTL.
5015 Instead, you will just get two index entries, one at either end.
5018 \begin_layout Itemize
5019 Cross-referencing: There is no support for cross-referencing.
5020 If LyX finds an entry containing the
5021 \begin_inset Quotes eld
5024 |see\SpecialChar \ldots{}
5026 \begin_inset Quotes erd
5029 construct, it is just dropped, and the rest is treated as an ordinary index
5033 \begin_layout Itemize
5034 Index Entry Order: LyX does support attempts to fix the sorting order.
5035 It will take what is before the first `@' it finds and use that for sorting,
5036 taking what follows the first `@' to be the actual entry.
5037 At present, LyX does not check for escaped `@', so do not try to index
5041 \begin_layout Itemize
5042 Index Entry Layout: You can format entries by using the text style dialog,
5043 or by using any other method available within LyX itself.
5044 There is no support for constructs like:
5045 \begin_inset Quotes eld
5049 \begin_inset Quotes erd
5053 Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
5054 and everything that follows it.
5057 \begin_layout Itemize
5058 Multiple Indexes: There is no support for multiple indexes.
5059 Rather, all index entries will be printed as one large index.
5060 To avoid our printing several versions of the index, we print only the
5061 main index, so make sure you have one.
5064 \begin_layout Section
5065 Nomenclature and Glossary
5068 \begin_layout Standard
5069 There is at present no support for glossaries.
5070 Adding it would be fairly trivial, and welcome.
5073 \begin_layout Chapter
5077 \begin_layout Section
5081 \begin_layout Standard
5082 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
5083 and retrieve information about the LyX internal state.
5084 This is only intended for advanced users, but they should find it useful.
5085 It is by writing to the LyX server, for example, that bibliography managers,
5086 such as JabRef, are able to
5087 \begin_inset Quotes eld
5091 \begin_inset Quotes erd
5097 \begin_layout Section
5098 Starting the LyX Server
5101 \begin_layout Standard
5102 The LyX server works through the use of a pair of named pipes.
5103 These are usually located in
5104 \begin_inset Flex Code
5107 \begin_layout Plain Layout
5113 , (except on Windows, where
5117 named pipes are special objects located in
5118 \begin_inset Flex Code
5121 \begin_layout Plain Layout
5133 ) and have the names
5134 \begin_inset Quotes eld
5138 \begin_inset Flex Code
5141 \begin_layout Plain Layout
5148 \begin_inset Quotes erd
5152 \begin_inset Quotes eld
5156 \begin_inset Flex Code
5159 \begin_layout Plain Layout
5166 \begin_inset Quotes erd
5170 External programs write into
5171 \begin_inset Flex Code
5174 \begin_layout Plain Layout
5180 and read back data from
5181 \begin_inset Flex Code
5184 \begin_layout Plain Layout
5191 The stem of the pipe names can be defined in the
5192 \begin_inset Flex MenuItem
5195 \begin_layout Plain Layout
5196 Tools\SpecialChar \menuseparator
5203 \begin_inset Flex Code
5206 \begin_layout Plain Layout
5207 "/home/myhome/lyxpipe"
5213 \begin_inset Flex Code
5216 \begin_layout Plain Layout
5230 on Windows (but any working path can be used).
5235 configure this manually in order for the server to start.
5238 \begin_layout Standard
5240 \begin_inset Flex Code
5243 \begin_layout Plain Layout
5250 \begin_inset Flex Code
5253 \begin_layout Plain Layout
5259 ' to create the pipes.
5260 If one of the pipes already exists, LyX will assume that another LyX process
5261 is already running and will not start the server.
5262 On POSIX (Unix like) systems, if for some other reason, an unused
5263 \begin_inset Quotes eld
5267 \begin_inset Quotes erd
5270 pipe is left in existence when LyX closes, then LyX will try to delete
5272 If this fails for some reason, you will need to delete the pipes manually
5273 and then restart LyX.
5274 On Windows, pipes are deleted by the OS on program termination or crash,
5276 \begin_inset Quotes eld
5280 \begin_inset Quotes erd
5283 pipes should not be possible.
5286 \begin_layout Standard
5287 To have several LyX processes with servers at the same time, you have to
5288 use different configurations, perhaps by using separate user directories,
5290 \begin_inset Flex Code
5293 \begin_layout Plain Layout
5299 file, for each process.
5302 \begin_layout Standard
5303 If you are developing a client program, you might find it useful to enable
5304 debugging information from the LyX server.
5305 Do this by starting LyX as
5306 \begin_inset Flex Code
5309 \begin_layout Plain Layout
5318 \begin_layout Standard
5319 You can find a complete example client written in C in the source distribution
5321 \begin_inset Flex Code
5324 \begin_layout Plain Layout
5325 development/lyxserver/server_monitor.c
5333 \begin_layout Standard
5334 Another useful tool is command-line based client you will find in
5335 \begin_inset Flex Code
5338 \begin_layout Plain Layout
5339 src/client/lyxclient
5347 \begin_layout Section
5348 Normal communication
5351 \begin_layout Standard
5352 To issue a LyX call, the client writes a line of ASCII text into the input
5354 This line has the following format:
5371 \begin_layout Description
5372 clientname is a name that the client can choose arbitrarily.
5373 Its only use is that LyX will echo it if it sends an answer—so a client
5374 can dispatch results from different requesters.
5377 \begin_layout Description
5378 function is the function you want LyX to perform.
5379 It is the same as the commands you'd use in the minibuffer.
5382 \begin_layout Description
5383 argument is an optional argument which is meaningful only to some functions
5385 \begin_inset Quotes eld
5389 \begin_inset Quotes erd
5392 LFUN will insert the argument as text at the cursor position).
5395 \begin_layout Standard
5396 The answer from LyX will arrive in the output pipe and be of the form
5413 \begin_layout Standard
5422 are just echoed from the command request, while
5426 is more or less useful information filled according to how the command
5427 execution worked out.
5428 Some commands, such as
5429 \begin_inset Quotes eld
5433 \begin_inset Quotes erd
5436 , will return information about the internal state of LyX, while other will
5437 return an empty data-response.
5438 This means that the command execution went fine.
5441 \begin_layout Standard
5442 In case of errors, the response from LyX will have this form
5459 \begin_layout Standard
5464 should contain an explanation of why the command failed.
5467 \begin_layout Standard
5471 \begin_layout LyX-Code
5472 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5473 \begin_inset Newline newline
5476 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5477 \begin_inset Newline newline
5480 read a <~/.lyxpipe.out
5481 \begin_inset Newline newline
5487 \begin_layout Section
5491 \begin_layout Standard
5492 LyX can notify clients of events going on asynchronously.
5493 Currently it will only do this if the user binds a key sequence with the
5495 \begin_inset Quotes eld
5499 \begin_inset Quotes erd
5503 The format of the string LyX sends is as follows:
5507 \begin_inset Flex Code
5510 \begin_layout Plain Layout
5521 \begin_layout Standard
5526 is the printed representation of the key sequence that was actually typed
5530 \begin_layout Standard
5531 This mechanism can be used to extend LyX's command set and implement macros.
5532 Bind some key sequence to
5533 \begin_inset Quotes eld
5537 \begin_inset Quotes erd
5541 Then start a client that listens on the output pipe, dispatches the command
5542 according to the sequence, and starts a function that may use LyX calls
5543 and LyX requests to issue a command or a series of commands to LyX.
5546 \begin_layout Section
5547 The simple LyX Server Protocol
5550 \begin_layout Standard
5551 LyX implements a simple protocol that can be used for session management.
5552 All messages are of the form
5565 \begin_layout Standard
5571 \begin_inset Quotes eld
5575 \begin_inset Quotes erd
5579 \begin_inset Quotes eld
5583 \begin_inset Quotes erd
5588 \begin_inset Quotes eld
5592 \begin_inset Quotes erd
5595 is received from a client, LyX will report back to inform the client that
5596 it's listening to it's messages, while
5597 \begin_inset Quotes eld
5601 \begin_inset Quotes erd
5604 sent from LyX will inform clients that LyX is closing.
5607 \begin_layout Section
5608 Reverse DVI/PDF search
5611 \begin_layout Standard
5612 Some DVI/PDF viewers
5616 \begin_layout Plain Layout
5617 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5618 Skim on Mac OSX and SumatraPDF on Windows.
5627 facility (also called
5632 This means that you can tell LyX to put the cursor to a specific line in
5633 the document by clicking at the respective position in the DVI/PDF output.
5634 To achieve this, the viewer must be able to communicate with LyX.
5635 This is done via the LyX server either by using the named pipe (
5639 ), or the UNIX domain socket (
5643 ) that LyX creates in its temporary directory (this is the way the
5644 \begin_inset Flex Code
5647 \begin_layout Plain Layout
5653 program communicates with LyX).
5654 In some cases, you need a helper script that mediates between the viewer
5655 and LyX, in others, the viewer can communicate with LyX directly.
5656 This depends on the selected viewer and on your operating system.
5657 The same applies to the way viewers need to be configured and the way the
5658 reverse search is actually performed.
5659 In what follows, we will thus describe how to setup reverse search for
5661 Before we turn to this, though, we will explain what needs to be done generally
5662 to enable reverse search in the DVI/PDF output.
5665 \begin_layout Subsection
5667 \begin_inset CommandInset label
5669 name "sub:rev-search"
5676 \begin_layout Standard
5677 In most cases LyX will do the work for you by enabling the option
5678 \begin_inset Flex MenuItem
5681 \begin_layout Plain Layout
5682 Synchronize with Output
5688 \begin_inset Flex MenuItem
5691 \begin_layout Plain Layout
5692 Document\SpecialChar \menuseparator
5693 Settings\SpecialChar \menuseparator
5700 In such a case LyX will automatically insert the necessary SyncTeX macro
5701 (for PDF) or load the srcltx package (for DVI) respectively.
5702 This option can be easily reached also on
5703 \begin_inset Flex Code
5706 \begin_layout Plain Layout
5715 \begin_layout Standard
5716 If you need a different setting, you can select or input a custom macro
5717 from the drop down box just below
5718 \begin_inset Flex MenuItem
5721 \begin_layout Plain Layout
5722 Document\SpecialChar \menuseparator
5723 Settings\SpecialChar \menuseparator
5724 Output\SpecialChar \menuseparator
5725 Synchronize with Output
5733 \begin_layout Standard
5734 Note that the method
5735 \begin_inset Flex Code
5738 \begin_layout Plain Layout
5746 enables gzip compression.
5747 If your viewer does not support it, you should instead use
5748 \begin_inset Flex Code
5751 \begin_layout Plain Layout
5762 \begin_layout Standard
5763 Please aöso note that including the
5764 \begin_inset Flex Code
5767 \begin_layout Plain Layout
5774 \begin_inset Flex Code
5777 \begin_layout Plain Layout
5783 sometimes has an undesired impact on the typesetting.
5784 Thus, you should switch output synchronization off for the final typesetting
5786 \begin_inset Flex Code
5789 \begin_layout Plain Layout
5796 \begin_inset Flex Code
5799 \begin_layout Plain Layout
5809 \begin_layout Standard
5810 In case you need some more special settings that are not covered by the
5811 automatic settings, read the next section about how to set up output synchroniz
5813 If the automatic setup suits your needs, you can readily jump to section
5814 \begin_inset space ~
5818 \begin_inset CommandInset ref
5820 reference "sub:configuring-viewers"
5824 , where the necessary configuration steps in your viewer -- needed both
5825 with the automatic and the manual setup -- are described.
5828 \begin_layout Subsection
5832 \begin_layout Standard
5833 LaTeX provides several different methods for reverse search.
5834 Some are built-in in the
5835 \begin_inset Flex Code
5838 \begin_layout Plain Layout
5844 program, some are provided by external packages.
5845 Your choice depends on whether your LaTeX distribution already provides
5846 a given method (the built-in methods are rather new) and whether your viewer
5848 The available methods are described in the following.
5851 \begin_layout Subsubsection*
5852 Built-in DVI-search via src-specials (DVI only)
5855 \begin_layout Standard
5856 This method provides the DVI file with the necessary information for reverse
5858 It is available in LaTeX since quite some time (any somewhat recent LaTeX
5859 distribution should include it), and it works reliably.
5860 To enable it, change the
5861 \begin_inset Flex MenuItem
5864 \begin_layout Plain Layout
5869 \begin_layout Plain Layout
5882 \begin_inset Flex MenuItem
5885 \begin_layout Plain Layout
5890 \begin_layout Plain Layout
5897 eX (plain)->DraftDVI
5903 \begin_inset Flex MenuItem
5906 \begin_layout Plain Layout
5907 Preferences\SpecialChar \menuseparator
5908 File Handling\SpecialChar \menuseparator
5915 \begin_inset Flex Code
5918 \begin_layout Plain Layout
5919 latex -src-specials $$i
5925 If this doesn't work, check if your TeX engine needs different options
5926 (the syntax might differ in some distributions).
5929 \begin_layout Subsubsection*
5930 External Packages (PDFSync and scrltx)
5933 \begin_layout Standard
5942 provide reverse search facility for PDF output (via pdflatex) and DVI output,
5944 In order to enable it, load the packages in the LyX preamble:
5947 \begin_layout Itemize
5948 \begin_inset Flex Code
5951 \begin_layout Plain Layout
5959 for reverse PDF search,
5962 \begin_layout Itemize
5963 \begin_inset Flex Code
5966 \begin_layout Plain Layout
5969 usepackage[active]{srcltx}
5974 for reverse DVI search.
5977 \begin_layout Standard
5978 If you want to be able to perform both DVI and PDF reverse searches, you
5979 can also insert in the preamble the following lines
5982 \begin_layout LyX-Code
5986 \begin_inset Newline newline
5992 \begin_inset Newline newline
5998 \begin_inset Newline newline
6004 \begin_inset Newline newline
6009 usepackage[active]{srcltx}
6010 \begin_inset Newline newline
6018 \begin_layout Standard
6019 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6020 right package will be used.
6023 \begin_layout Standard
6024 Note that PDFSync might affect the output layout of your document.
6025 It is therefore advised to disable PDFsync for final documents.
6028 \begin_layout Subsubsection*
6029 Built-in reverse search via SyncTeX (DVI and PDF)
6032 \begin_layout Standard
6034 \begin_inset Flex Code
6037 \begin_layout Plain Layout
6043 have built-in support for both PDF and DVI reverse search.
6048 facility is basically the result of the integration of the PDFSync package
6049 to the pdftex program and its merge with the
6054 You need at least TeXLive 2008 or a recent MikTeX distribution in order
6056 Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
6057 already provide SyncTeX support.
6060 \begin_layout Standard
6061 To enable SyncTeX for DVI output, change the
6062 \begin_inset Flex MenuItem
6065 \begin_layout Plain Layout
6070 \begin_layout Plain Layout
6083 \begin_inset Flex MenuItem
6086 \begin_layout Plain Layout
6091 \begin_layout Plain Layout
6098 eX (plain) -> DraftDVI
6104 \begin_inset Flex MenuItem
6107 \begin_layout Plain Layout
6108 Preferences\SpecialChar \menuseparator
6109 File Handling\SpecialChar \menuseparator
6116 \begin_inset Flex Code
6119 \begin_layout Plain Layout
6120 latex -synctex=1 $$i
6125 , and for PDF output, change the
6126 \begin_inset Flex MenuItem
6129 \begin_layout Plain Layout
6134 \begin_layout Plain Layout
6141 eX (pdflatex) -> PDF (pdflatex)
6147 \begin_inset Flex Code
6150 \begin_layout Plain Layout
6151 pdflatex -synctex=1 $$i
6157 Check the documentation of your viewer whether the viewer needs to be configure
6158 d for the use with SyncTeX.
6162 \begin_layout Plain Layout
6163 Note that the option
6164 \begin_inset Flex Code
6167 \begin_layout Plain Layout
6173 option enables gzip compression.
6174 If your viewer does not support it, you should instead use
6175 \begin_inset Flex Code
6178 \begin_layout Plain Layout
6192 \begin_layout Subsection
6193 Configuring and using specific viewers
6194 \begin_inset CommandInset label
6196 name "sub:configuring-viewers"
6203 \begin_layout Subsubsection*
6204 Xdvi (all platforms)
6207 \begin_layout Standard
6209 \begin_inset Flex Code
6212 \begin_layout Plain Layout
6218 , you don't need to do anything else for performing a reverse DVI search,
6219 as LyX already provides the necessary hooks for automatically using the
6221 \begin_inset Flex Code
6224 \begin_layout Plain Layout
6231 Just setup your document as described above (reverse search is triggered
6232 by Ctrl-click or Alt-click on Mac OSX, respectively).
6235 \begin_layout Standard
6236 However, if for whatever reason you want to use the named pipe instead of
6237 the socket for communicating with LyX, simply change the DVI viewer in
6239 \begin_inset Flex MenuItem
6242 \begin_layout Plain Layout
6243 Preferences\SpecialChar \menuseparator
6244 File Handling\SpecialChar \menuseparator
6254 \begin_layout Plain Layout
6255 On Mac OSX you have to use
6256 \begin_inset Flex Code
6259 \begin_layout Plain Layout
6260 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6271 \begin_inset Flex Code
6274 \begin_layout Plain Layout
6275 xdvi -editor 'lyxeditor.sh %f %l'
6281 \begin_inset Flex Code
6284 \begin_layout Plain Layout
6290 is a suitable script.
6291 For example, a minimal shell script is the following one:
6294 \begin_layout LyX-Code
6296 \begin_inset Newline newline
6299 LYXPIPE="/path/to/lyxpipe"
6300 \begin_inset Newline newline
6303 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6304 \begin_inset Newline newline
6307 echo "$COMMAND" > "${LYXPIPE}".in || exit
6308 \begin_inset Newline newline
6311 read < "${LYXPIPE}".out || exit
6314 \begin_layout Standard
6316 \begin_inset Flex Code
6319 \begin_layout Plain Layout
6329 \begin_layout Plain Layout
6336 XServer pipe path specified in
6337 \begin_inset Flex MenuItem
6340 \begin_layout Plain Layout
6341 Preferences\SpecialChar \menuseparator
6351 \begin_layout Plain Layout
6353 \begin_inset Flex Code
6356 \begin_layout Plain Layout
6362 folder of a source distribution you can find a
6363 \begin_inset Flex Code
6366 \begin_layout Plain Layout
6372 script which is able to locate the
6376 based on your preferences.
6384 \begin_layout Subsubsection*
6388 \begin_layout Standard
6390 \begin_inset Flex Code
6393 \begin_layout Plain Layout
6394 /Applications/MacDviX_Folder/calleditor.script
6399 , add the following lines:
6402 \begin_layout LyX-Code
6407 \begin_layout Plain Layout
6414 X.app/Contents/MacOS/lyxeditor "$2" $1
6415 \begin_inset Newline newline
6421 \begin_layout Standard
6422 Modify the lines accordingly if you install LyX somewhere else than in the
6423 Applications folder.
6426 \begin_layout Standard
6427 Reverse search is triggered by Alt-click (OPTION-click).
6430 \begin_layout Subsubsection*
6434 \begin_layout Standard
6436 \begin_inset Flex Code
6439 \begin_layout Plain Layout
6440 open -a Skim.app $$i
6445 to the viewer setting in
6446 \begin_inset Flex MenuItem
6449 \begin_layout Plain Layout
6450 Preferences\SpecialChar \menuseparator
6451 File Handling\SpecialChar \menuseparator
6452 File formats\SpecialChar \menuseparator
6459 \begin_inset Flex MenuItem
6462 \begin_layout Plain Layout
6463 Skim\SpecialChar \menuseparator
6464 Preferences\SpecialChar \menuseparator
6474 \begin_layout Plain Layout
6484 \begin_layout Standard
6485 Reverse search is triggered by COMMAND-SHIFT-click
6488 \begin_layout Subsubsection*
6492 \begin_layout Standard
6494 \begin_inset Flex MenuItem
6497 \begin_layout Plain Layout
6498 Settings\SpecialChar \menuseparator
6499 Configure Okular\SpecialChar \ldots{}
6500 \SpecialChar \menuseparator
6507 \begin_inset Quotes eld
6511 \begin_inset Quotes erd
6515 \begin_inset Flex Code
6518 \begin_layout Plain Layout
6527 \begin_layout Standard
6528 Reverse search is triggered by SHIFT-click.
6531 \begin_layout Subsubsection*
6535 \begin_layout Standard
6536 Launch yap, choose its
6537 \begin_inset Flex MenuItem
6540 \begin_layout Plain Layout
6541 View\SpecialChar \menuseparator
6548 \begin_inset Quotes eld
6552 \begin_inset Quotes erd
6557 \begin_inset Quotes eld
6560 New\SpecialChar \ldots{}
6562 \begin_inset Quotes erd
6565 button and, in the window that opens, enter
6566 \begin_inset Quotes eld
6570 \begin_inset Quotes erd
6573 (or any other name you like) in the
6574 \begin_inset Quotes eld
6578 \begin_inset Quotes erd
6582 Now click on the button labeled
6583 \begin_inset Quotes eld
6586 \SpecialChar \ldots{}
6588 \begin_inset Quotes erd
6591 to open a file dialog and navigate to the directory containing the batch
6593 \begin_inset Flex Code
6596 \begin_layout Plain Layout
6604 \begin_inset Flex Code
6607 \begin_layout Plain Layout
6613 and then specify the program arguments as
6614 \begin_inset Flex Code
6617 \begin_layout Plain Layout
6625 \begin_inset Flex Code
6628 \begin_layout Plain Layout
6634 wrapper is used for communicating with LyX through the
6641 \begin_layout LyX-Code
6643 \begin_inset Newline newline
6646 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
6655 \begin_inset Newline newline
6669 \begin_layout Standard
6670 Make sure that the LyXServer pipe path you specified in LyX is
6671 \begin_inset Flex Code
6674 \begin_layout Plain Layout
6688 , otherwise change the
6689 \begin_inset Flex Code
6692 \begin_layout Plain Layout
6698 wrapper accordingly.
6701 \begin_layout Standard
6702 In yap, reverse search is triggered by double-click.
6705 \begin_layout Subsubsection*
6706 SumatraPDF (Windows)
6709 \begin_layout Standard
6710 In order to use SumatraPDF for inverse search, enter
6711 \begin_inset Flex Code
6714 \begin_layout Plain Layout
6715 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6720 in the viewer setting in
6721 \begin_inset Flex MenuItem
6724 \begin_layout Plain Layout
6725 Preferences\SpecialChar \menuseparator
6726 File Handling\SpecialChar \menuseparator
6727 File formats\SpecialChar \menuseparator
6734 \begin_inset Flex Code
6737 \begin_layout Plain Layout
6743 is the previous wrapper.
6744 If SumatraPDF.exe is not in your command PATH, use its full file name.
6747 \begin_layout Standard
6748 Reverse search is triggered by double-click.
6751 \begin_layout Subsubsection*
6755 \begin_layout Standard
6756 First of all, make sure that yap is your default DVI viewer in the Windows
6757 environment, then launch it, choose its
6758 \begin_inset Flex MenuItem
6761 \begin_layout Plain Layout
6762 View\SpecialChar \menuseparator
6769 \begin_inset Quotes eld
6773 \begin_inset Quotes erd
6778 \begin_inset Quotes eld
6781 New\SpecialChar \ldots{}
6783 \begin_inset Quotes erd
6786 button and, in the window that opens, enter
6787 \begin_inset Quotes eld
6791 \begin_inset Quotes erd
6794 (or any other name you like) in the
6795 \begin_inset Quotes eld
6799 \begin_inset Quotes erd
6803 Now click on the button labeled
6804 \begin_inset Quotes eld
6807 \SpecialChar \ldots{}
6809 \begin_inset Quotes erd
6812 to open a file dialog and navigate to the directory containing the
6813 \begin_inset Flex Code
6816 \begin_layout Plain Layout
6822 program (which is installed by default on Cygwin along with the LyX executable).
6824 \begin_inset Flex Code
6827 \begin_layout Plain Layout
6833 and then specify the program arguments as
6834 \begin_inset Flex Code
6837 \begin_layout Plain Layout
6844 In this way, you will be using the
6848 for communicating with LyX.
6849 If, for whatever reason, you want to use the
6854 \begin_inset Flex Code
6857 \begin_layout Plain Layout
6863 option and be sure to specify the LyXServer pipe path in the LyX preferences.
6866 \begin_layout Standard
6867 In yap, reverse search is triggered by double-click.
6870 \begin_layout Subsubsection*
6874 \begin_layout Standard
6875 In order to use SumatraPDF for inverse search, enter
6876 \begin_inset Flex Code
6879 \begin_layout Plain Layout
6880 SumatraPDF -inverse-search "lyxeditor -g %f %l"
6885 in the viewer setting in
6886 \begin_inset Flex MenuItem
6889 \begin_layout Plain Layout
6890 Preferences\SpecialChar \menuseparator
6891 File Handling\SpecialChar \menuseparator
6892 File formats\SpecialChar \menuseparator
6899 If SumatraPDF.exe is not in your command PATH, use its full posix path.
6901 \begin_inset Flex Code
6904 \begin_layout Plain Layout
6910 enables communication via the
6916 \begin_inset Flex Code
6919 \begin_layout Plain Layout
6925 option if you want to use the
6929 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6932 \begin_layout Standard
6933 Reverse search is triggered by double-click.
6936 \begin_layout Section
6940 \begin_layout Standard
6941 Forward search is, as the name implies, in a sense the
6942 \begin_inset Quotes eld
6946 \begin_inset Quotes erd
6950 It allows you to let the viewer jump to a given position from within LyX.
6951 If forward search is set up (as described in what follows), you can put
6952 the cursor anywhere in your LyX document, and hit
6953 \begin_inset Flex MenuItem
6956 \begin_layout Plain Layout
6957 Navigate\SpecialChar \menuseparator
6964 \begin_inset Flex MenuItem
6967 \begin_layout Plain Layout
6973 in the context menu via right mouse click), and then the viewer will jump
6974 to that position as well.
6975 This implies, of course, that your viewer supports this function.
6978 \begin_layout Standard
6979 To make forward search possible, you first need to provide the generated
6980 output PDF/DVI file with additional information about the TeX sources.
6981 This can be done via the methods described in the section
6982 \begin_inset CommandInset ref
6984 reference "sub:rev-search"
6991 \begin_layout Standard
6992 Additionally, you need to configure LyX for using your viewers in
6993 \begin_inset Flex MenuItem
6996 \begin_layout Plain Layout
6997 Tools\SpecialChar \menuseparator
6998 Preferences\SpecialChar \menuseparator
6999 Output\SpecialChar \menuseparator
7006 We provide a range of tested configurations for some viewers, which you
7007 can select from the drop down list.
7008 If none of these configurations suits you, you have to find out and enter
7009 a suitable configuration yourself.
7010 The definition syntax uses the following placeholders:
7013 \begin_layout Itemize
7015 \begin_inset Flex Code
7018 \begin_layout Plain Layout
7027 \begin_layout Itemize
7029 \begin_inset Flex Code
7032 \begin_layout Plain Layout
7038 : name of the (temporary) exported .tex file
7041 \begin_layout Itemize
7043 \begin_inset Flex Code
7046 \begin_layout Plain Layout
7052 : name of the exported output file (either dvi or pdf, depending on which
7053 one exists in the temporary directory)
7056 \begin_layout Standard
7057 Note that only some of the viewers provide full forward search functionality,
7058 among them yap, xdvi, okular and Sumatra PDF.
7062 \begin_layout Plain Layout
7063 For Sumatra CMCDDE is needed --- downloadable from
7064 \begin_inset CommandInset href
7066 target "http://www.istri.fr/zip/CMCDDE.zip"
7075 While many of the widespread PDF viewers (most notably Adobe Reader) do
7076 not support forward search at all, some other viewers -- e.
7077 \begin_inset space \thinspace{}
7081 evince and xpdf -- allow at least to reload the document and jump to a
7082 specific page of the file, so you can at least navigate
7083 \begin_inset Quotes eld
7087 \begin_inset Quotes erd
7091 These latter functionality is provided by an external call of synctex (see
7092 the predefined example configurations).
7096 \begin_layout Standard
7097 Forward search works both with DVI and PDF output.
7098 LyX simply checks which preview format you have used before (i.
7099 \begin_inset space \thinspace{}
7102 e., which format is already there in the temporary directory) and chooses
7103 the appropriate configuration for the respective format.
7106 \begin_layout Chapter
7107 Special Document Classes
7110 \begin_layout Section
7114 \begin_layout Standard
7120 \begin_layout Subsection
7124 \begin_layout Standard
7125 This section describes how LyX can be used to write articles for submission
7126 to the scientific journal
7128 Astronomy and Astrophysics
7130 (www.edpsciences.fr/aa/
7131 \begin_inset Flex URL
7134 \begin_layout Plain Layout
7136 http://www.edpsciences.fr/aa/
7141 ) using Version 5.01 of the document class
7146 This package can be downloaded from the ftp site
7149 \begin_layout Standard
7150 \begin_inset VSpace medskip
7156 \begin_layout Standard
7158 \begin_inset Flex URL
7161 \begin_layout Plain Layout
7163 ftp://ftp.edpsciences.org/pub/aa/readme.html
7171 \begin_layout Standard
7172 \begin_inset VSpace medskip
7178 \begin_layout Standard
7179 A manual comes together with that package, and this text is not meant to
7180 replace the original manual but is merely a short guide in how to realize
7181 the correct form of your paper.
7185 \begin_layout Standard
7186 Please note that the publisher of the journal was changed from Springer
7187 to EDP Sciences starting January 1, 2001.
7188 That change involved also some slight changes to the style files, namely
7189 the removal of the thesaurus command.
7190 The LyX class aa supports the newest version of these style files, V 5.01.
7191 If you have an older version installed, please upgrade.
7192 For compatibility, the old (version 4) layout has been kept as
7197 Please refer to the comments in
7199 LyXDir/layouts/aapaper.layout
7204 \begin_layout Subsection
7208 \begin_layout Standard
7209 It is recommended you start from the example template distributed with LyX.
7210 If you are not using a template, note the following settings:
7213 \begin_layout Itemize
7220 Document\SpecialChar \menuseparator
7223 dialog (OK, that one was obvious).
7226 \begin_layout Itemize
7227 Don't change the option
7230 \begin_inset space ~
7240 The whole layout is done by the macros, you shouldn't change anything.
7243 \begin_layout Subsection
7247 \begin_layout Standard
7248 First thing to enter is the header information.
7249 It consists of seven entries, of which some are optional.
7253 \begin_layout Itemize
7261 \begin_layout Itemize
7269 \begin_layout Itemize
7277 \begin_layout Itemize
7285 \begin_layout Itemize
7290 : [optional] if more than one author: whom to contact for offprint requests.
7293 \begin_layout Itemize
7298 : [optional] mail address for contacts.
7301 \begin_layout Itemize
7309 Received: <date>; Accepted <date>
7312 \begin_layout Standard
7313 There is no need to issue the
7319 command, this is done automatically by LyX when the header is finished.
7320 Although the order of the single header entries doesn't matter it is advised
7321 to keep the above sequence, just to get the best optics and meets the layout
7322 of the real document.
7325 \begin_layout Standard
7326 If you want to place footnotes in the header block, e.
7327 \begin_inset space \thinspace{}
7331 \begin_inset space \space{}
7334 to state your present address, just use the standard footnote via the menu
7337 Insert\SpecialChar \menuseparator
7341 LyX will automagically use the term
7350 \begin_layout Standard
7351 In addition to these topics, the macros use three additional LaTeX commands
7352 that have no counterpart in LyX:
7355 \begin_layout Itemize
7362 to separate different names for more than one author and institute, respectivel
7366 \begin_layout Itemize
7373 to mark corresponding author/institute pairs.
7374 The institutes are numbered sequentially as they appear in the
7378 field, so you have to put a marker to each author.
7381 \begin_layout Itemize
7388 to supply an email address for fast contact.
7391 \begin_layout Standard
7392 In all cases, the appropriate command has to be entered in LyX and marked
7398 \begin_layout Subsection
7402 \begin_layout Standard
7403 The abstract should immediately follow the header block.
7404 With version 5 the abstract environment was changed to a command, and there
7405 is now a resctriction to only one paragraph.
7406 In addition, it should contain an entry with the keywords.
7407 This is not yet implemented for LyX, therefore you have to enter the LaTeX
7414 by hand and mark it as LaTeX code.
7415 Refer to the example paper.
7418 \begin_layout Subsection
7419 Supported environments
7422 \begin_layout Standard
7423 The A&A paper layout supports the following environments for structuring
7427 \begin_layout Itemize
7433 \begin_layout Itemize
7439 \begin_layout Itemize
7445 \begin_layout Itemize
7451 \begin_layout Itemize
7457 \begin_layout Itemize
7463 \begin_layout Itemize
7469 \begin_layout Itemize
7475 \begin_layout Itemize
7481 \begin_layout Itemize
7487 \begin_layout Itemize
7493 \begin_layout Itemize
7499 \begin_layout Subsection
7500 Commands not supported by LyX
7503 \begin_layout Standard
7504 Some commands are not yet supported by the
7509 Some have already been mentioned.
7510 For the sake of completeness, they are listed all together here:
7513 \begin_layout Itemize
7521 \begin_layout Itemize
7529 \begin_layout Itemize
7537 \begin_layout Itemize
7545 \begin_layout Itemize
7553 \begin_layout Itemize
7561 \begin_layout Itemize
7569 \begin_layout Itemize
7577 \begin_layout Standard
7578 If you want to use any of these commands, you have to enter them yourself.
7581 Do not forget to mark them as LaTeX code!
7584 \begin_layout Subsection
7585 Figure and Table Floats
7588 \begin_layout Standard
7589 LyX provides support for the necessary float environments
7591 figure, figure*, table
7597 , therefore we won't tell much about it here.
7601 \begin_inset space ~
7607 Just remember that tables should be left-aligned.
7608 For that, select the table and change the alignment in
7610 Edit\SpecialChar \menuseparator
7612 \begin_inset space ~
7618 \begin_layout Standard
7619 There is only one special thing: the figures with caption besides the figure.
7620 To create such a figure, you have to do the following:
7623 \begin_layout Enumerate
7624 Create a wide figure float:
7626 Insert\SpecialChar \menuseparator
7627 Float\SpecialChar \menuseparator
7630 , then right click in the figure and select
7636 \begin_inset space ~
7644 \begin_layout Enumerate
7645 Enter your caption text.
7648 \begin_layout Enumerate
7653 to move the cursor above the caption.
7656 \begin_layout Enumerate
7660 \begin_layout Enumerate
7661 Position the cursor behind the figure and insert a horizontal fill:
7663 Insert\SpecialChar \menuseparator
7665 \begin_inset space ~
7668 Character\SpecialChar \menuseparator
7670 \begin_inset space ~
7678 \begin_layout Enumerate
7679 Switch to LaTeX mode:
7682 \begin_inset space ~
7690 \begin_layout Enumerate
7700 Do not close the brace!
7703 \begin_layout Enumerate
7704 Position the cursor behind the caption text, switch to LaTeX mode and insert
7708 \begin_inset space ~
7720 \begin_layout Standard
7721 Also, refer to the figures in the example paper.
7724 \begin_layout Subsection
7728 \begin_layout Standard
7729 For submission, the paper has to be formated in a special double-spacing
7731 For this purpose, you have to give the option
7735 to the documentclass.
7736 This must be done using the extra class options field in the
7738 Document\SpecialChar \menuseparator
7742 Just enter the string
7749 \begin_layout Subsection
7753 \begin_layout Standard
7758 directory contains an example paper written with LyX.
7759 It is the example paper from the original macro package, translated to
7761 Use it for inspiration, and compare the original LaTeX code with LyX way
7765 \begin_layout Section
7769 \begin_layout Standard
7775 \begin_layout Subsection
7779 \begin_layout Standard
7780 AASTeX is a set of macros produced by the American Astronomical Society
7781 to facilitate electronic manuscript submission to the three journals they
7782 publish: the Astrophysical Journal (including the Letters and Supplement),
7783 the Astronomical Journal, and the Publications of the Astronomical Society
7785 LyX has proven to be an excellent tool for generating these documents,
7786 especially given its equation, citation, and figure handling capabilities.
7787 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7788 is the version described here, or higher.
7789 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7790 incompatible with LyX.
7791 The AASTeX package may be downloaded from the AASTeX Web site
7794 \begin_layout Standard
7795 \begin_inset VSpace medskip
7801 \begin_layout Standard
7803 \begin_inset Flex URL
7806 \begin_layout Plain Layout
7808 http://www.journals.uchicago.edu/AAS/AASTeX
7816 \begin_layout Standard
7817 \begin_inset VSpace medskip
7823 \begin_layout Standard
7824 A complete user guide is contained in that package and you should familiarize
7825 yourself with it thoroughly before embarking on writing a paper in LyX.
7826 LyX will not reduce the need to figure out all the AASTeX commands, it
7827 will only reduce the drudgery of typing everything in.
7828 It is your responsibility to ensure that the final exported LaTeX document
7829 conforms completely to the requirements of the journal to which you are
7830 submitting your paper.
7833 \begin_layout Subsection
7834 Starting a New Paper
7837 \begin_layout Standard
7838 I strongly suggest that you start with the AASTeX template file.
7841 File\SpecialChar \menuseparator
7848 , enter the new file name, then choose the
7853 This will show the most common fields found in a manuscript.
7854 Simply overwrite the existing text (including the brackets,
7858 ) with the correct information.
7859 Many of the AASTeX commands and environments can be implemented directly
7860 in LyX, but some cannot: most noticeably
7872 , which should stick out like a sore thumb if you actually just opened the
7874 For commands such as these, the LaTeX code must be entered directly and
7876 Such commands are referred to as TeX code, or Evil Red Text.
7877 I tried to minimize the amount of TeX code needed in an AASTeX document,
7878 but there is still a bit more required than any of us would like.
7881 \begin_layout Subsection
7882 Finishing Your Paper
7885 \begin_layout Standard
7886 When the paper is finished to your satisfaction and previews/prints correctly,
7888 \begin_inset Quotes eld
7892 \begin_inset Quotes erd
7895 actions which need to be done before you submit it to the journals.
7899 \begin_layout Enumerate
7900 Export your paper as a LaTeX file (
7902 File\SpecialChar \menuseparator
7903 Export\SpecialChar \menuseparator
7910 \begin_layout Enumerate
7915 file with your favorite text editor
7919 \begin_layout Enumerate
7920 remove the comment lines before the
7929 \begin_layout Enumerate
7934 usepackage...{fontenc}
7936 line if it appears (usually just after
7951 \begin_layout Enumerate
7952 remove everything between (and including) the
7964 commands, except for any commands you specifically put into the LaTeX preamble
7965 (which should appear immediately after the
7966 \begin_inset Quotes eld
7969 User specified LaTeX commands
7970 \begin_inset Quotes erd
7981 \begin_layout Enumerate
7982 Run the resulting file through LaTeX to make sure it still processes correctly.
7985 \begin_layout Enumerate
7986 Reread the journal requirements to make sure your filenames and formats
7990 \begin_layout Enumerate
7994 \begin_layout Subsection
7995 Comments On Specific Commands
7998 \begin_layout Standard
7999 I will not describe the detailed usage of the individual AASTeX commands:
8000 the AASTeX User Guide (
8004 ) gives a good description of each.
8005 Thus it's probably easiest for me to go down the list as found in the guide
8006 and offer comments where necessary.
8007 So let's begin \SpecialChar \ldots{}
8011 \begin_layout Subsubsection
8012 Things that work as expected
8015 \begin_layout Standard
8016 Because they work as you might expect, I simply list them and the section
8117 begin{thebibliography}
8125 (2.13.2), all the cite commands and their variations (2.13.2), the generic
8126 graphicx figure commands (2.14.1),
8150 (2.15.4, amongst other places),
8177 \begin_layout Standard
8178 The following style options also work correctly:
8199 Simply put them in the
8205 Layout\SpecialChar \menuseparator
8211 \begin_layout Subsubsection
8212 Things that work, but require more comment
8215 \begin_layout Standard
8216 The following items work, but require a little more discussion:
8219 \begin_layout Itemize
8220 These items are reserved for use by the journal editors, but you can put
8221 them into the LaTeX preamble if you feel compelled to do so:
8254 \begin_layout Itemize
8255 These items may be placed in the LaTeX preamble, and are included as blanks
8256 in the template file:
8277 \begin_layout Itemize
8284 (2.3) – can only be used
8285 \begin_inset Quotes eld
8289 \begin_inset Quotes erd
8292 , not in the middle of a paragraph.
8293 Use TeX code if you need to embed it.
8296 \begin_layout Itemize
8303 (2.3) – will have extra {} after it.
8304 This should not cause an error.
8307 \begin_layout Itemize
8314 (2.6) – can only be used
8315 \begin_inset Quotes eld
8319 \begin_inset Quotes erd
8322 , not in the middle of a paragraph.
8323 Use TeX code if you need to embed it.
8326 \begin_layout Itemize
8333 (2.8) – can't insert a cross-reference tag, you must type the tag name by
8337 \begin_layout Itemize
8351 \begin_layout Itemize
8358 (2.9) – will have extra {} after it.
8359 This should not cause an error.
8362 \begin_layout Itemize
8369 (2.11) – will have extra {} after it.
8370 This should not cause an error.
8373 \begin_layout Itemize
8380 (2.14.2) – you can insert an optional filename argument by placing the cursor
8381 at the beginning of the text and selecting
8383 Insert\SpecialChar \menuseparator
8388 \begin_inset Quotes eld
8392 \begin_inset Quotes erd
8395 inserts an optional argument of the type needed by
8402 Hopefully it will be renamed someday.
8405 \begin_layout Itemize
8418 for the catalog ID optional parameter
8421 \begin_layout Itemize
8434 for the catalog ID optional parameter
8437 \begin_layout Subsubsection
8438 Things not implemented, use TeX code
8441 \begin_layout Standard
8464 setcounter{equation}
8466 (2.12), Journal name abbreviations (2.13.4),
8502 (2.15.4, insert it as the first element in the lefthand cell after where
8504 Don't use any of LyX's rules in the table),
8516 (2.15.5), much of Misc (2.17, except
8567 \begin_layout Subsubsection
8568 Things that cannot be implemented
8571 \begin_layout Standard
8572 \SpecialChar \ldots{}
8573 at least in any meaningful sort of way, so I suggest ignoring them.
8574 They are the references environment (2.13.3), and the deluxetable environment
8576 If you really, really need to use deluxetable, I suggest editing it in
8577 a separate file with a text editor, then using
8579 Insert\SpecialChar \menuseparator
8581 \begin_inset space ~
8586 to include it in your LyX document.
8591 file to see an example of this.
8594 \begin_layout Subsection
8595 FAQs, Tips, Tricks, and Other Ruminations
8598 \begin_layout Subsubsection
8599 Getting LyX and AASTeX to cooperate
8602 \begin_layout Standard
8603 It can be a bit tricky to get LyX to recognize a new layout and document
8605 When all else fails, do this:
8608 \begin_layout Enumerate
8609 Make certain that LaTeX can find AASTeX.
8610 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8611 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
8618 \begin_layout Enumerate
8630 \begin_layout Enumerate
8633 Tools\SpecialChar \menuseparator
8636 in LyX, then restart LyX.
8639 \begin_layout Enumerate
8640 Open a regular new file, not from a template.
8641 Does AASTeX appear in the class list in
8643 Document\SpecialChar \menuseparator
8649 \begin_layout Standard
8650 If you get a warning from an existing AASTeX document about not being able
8651 to find the AASTeX layout or a message about
8652 \begin_inset Quotes eld
8655 You should not mix title layouts with normal ones
8656 \begin_inset Quotes erd
8659 , things haven't been installed correctly.
8662 \begin_layout Subsubsection
8663 LaTeX error processing a table
8666 \begin_layout Standard
8667 LyX, by default, attempts to center the table caption/title.
8668 This seems to produce a bad interaction in AASTeX so you should click somewhere
8669 in the caption/title, then select
8671 Edit\SpecialChar \menuseparator
8673 \begin_inset space ~
8687 This took care of it for me.
8690 \begin_layout Subsubsection
8694 \begin_layout Standard
8695 A couple of things: 1) I have noticed some funny spacing in the reference
8696 entries in the text.
8697 When you enter the bibliography item data, make sure their is
8701 space between the last author and the parenthesis setting off the year;
8705 \begin_inset space \thinspace{}
8709 \begin_inset space \space{}
8723 2) Entering the references at all is not obvious.
8724 The easiest thing is to start typing your first reference at the end of
8725 the document, then mark it as type
8730 That will put a small gray box in front of what you just typed.
8731 Click on the box to fill in the rest of the information.
8732 For new references, go to the end of an existing reference and press return.
8733 That will create a new line with its own box, etc.
8736 \begin_layout Subsubsection
8740 \begin_layout Standard
8741 Even though AASTeX provides its own figure commands (
8747 , for example), I much prefer LaTeX's standard figure commands (with the
8756 \begin_inset space ~
8759 commands as TeX code into a Figure Float box if you desire, but I never
8760 have much luck getting the layout right.
8761 With the standard graphics, LyX will insert a
8765 usepackage{graphicx}
8767 command into the LaTeX preamble and handle the figures in the standard
8768 LaTeX2e way, interspersing the figures in the text.
8769 I believe ApJ accepts figures exactly this way now; AJ might still use
8771 \begin_inset Quotes eld
8774 stack everything at the end
8775 \begin_inset Quotes erd
8781 \begin_layout Subsubsection
8782 Things I could have done, but didn't
8785 \begin_layout Standard
8787 \begin_inset Quotes eld
8791 \begin_inset Quotes erd
8794 things I could have implemented, but chose not to.
8795 For instance, I saw no point in double-spacing the text in the LyX window,
8796 even though it is double-spaced in the paper manuscript.
8797 Also, I chose not to make separate layouts for the preprint and preprint2
8799 Since I assume you will spend most of your time in the plain manuscript
8800 mode anyway, I decided not to chew up more disk space with this.
8804 \begin_layout Subsection
8808 \begin_layout Standard
8809 Your mileage may vary.
8810 I've now had papers published by both ApJ and AJ that have had 98% of the
8811 effort done in LyX; the last 2% was the LaTeX post-processing and a few
8813 I have had no trouble with the submission process, and I'm sure the journals
8814 were never aware that there might be a difference.
8815 So, go forth and publish!
8818 \begin_layout Section
8822 \begin_layout Standard
8832 \begin_layout Standard
8833 \begin_inset VSpace bigskip
8839 \begin_layout Standard
8841 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8842 papers to be submitted to American Mathematical Society publications.
8843 The layouts are not tailored to a specific journal, but easily can be.
8844 You should refer to the AMS documentation for specific instructions for
8845 each journal (usually it will entail only changing a single line in the
8847 That documentation is available on the Web at
8848 \begin_inset Flex URL
8851 \begin_layout Plain Layout
8859 \begin_inset Flex URL
8862 \begin_layout Plain Layout
8864 ftp://ftp.ams.org/pub/tex/amslatex/
8870 These layouts are appropriate, and useful, for any mathematical writing.
8874 \begin_layout Standard
8875 There are two basic AMS LaTeX layouts:
8878 \begin_layout Itemize
8879 amsart: The standard AMS article format.
8882 \begin_layout Itemize
8883 amsbook: the standard AMS book (really, monograph) format.
8887 \begin_layout Standard
8888 The layouts themselves contain only the minimum necessary to use the AMS
8890 They do not, in particular, contain any of the `theorem' environments used
8891 for setting theorems, lemmas, and the like.
8892 These are contained, instead, in the
8893 \begin_inset Flex Code
8896 \begin_layout Plain Layout
8902 module, which is loaded by default when when you select one of the AMS
8904 (It can also be used with other classes and can be removed, if you would
8905 rather use something else.) Less commonly used environments are in the
8906 \begin_inset Flex Code
8909 \begin_layout Plain Layout
8910 Theorems (AMS-Extended)
8915 module, which must be loaded manually.
8918 \begin_layout Standard
8919 By default, theorems and the like are numbered consecutively throughout
8920 the document, but this may be modified by loading the module
8921 \begin_inset Flex Code
8924 \begin_layout Plain Layout
8925 Theorems (Order by Section)
8930 or, if you are using
8931 \begin_inset Flex Code
8934 \begin_layout Plain Layout
8941 \begin_inset Flex Code
8944 \begin_layout Plain Layout
8945 Theorems (Order by Chapter)
8951 These will number the results as
8952 \begin_inset Formula $n.m$
8955 , where the first number refers to the section (or chapter) and the second
8956 refers to the total number of results so far in that section (or chapter).
8957 Many environments are also available unnumbered.
8958 These are indicated by an asterisk at the end.
8959 If you happen to want
8963 unnumbered results, the module
8964 \begin_inset Flex Code
8967 \begin_layout Plain Layout
8973 provides that option.
8976 \begin_layout Standard
8977 Note that these modules do not
8981 to be used with the AMS classes.
8982 It is perfectly possible to use the
8983 \begin_inset Flex Code
8986 \begin_layout Plain Layout
8992 module, and the others mentioned, with other classes, such as
8993 \begin_inset Flex Code
8996 \begin_layout Plain Layout
9003 \begin_inset Flex Code
9006 \begin_layout Plain Layout
9013 \begin_inset Flex Code
9016 \begin_layout Plain Layout
9025 \begin_layout Subsection
9026 What these layouts provide
9029 \begin_layout Standard
9030 There is a long list of included environments provided by these layouts.
9031 In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9032 variety of `theorem' environments.
9033 However, the AMS recommends the environments that are available in LyX.
9037 \begin_layout Standard
9038 The following environments—as well as the standard environments, such as
9040 \begin_inset Flex Noun
9043 \begin_layout Plain Layout
9050 \begin_inset Flex Noun
9053 \begin_layout Plain Layout
9060 \begin_inset Flex Noun
9063 \begin_layout Plain Layout
9070 \begin_inset Flex Noun
9073 \begin_layout Plain Layout
9080 \begin_inset Flex Noun
9083 \begin_layout Plain Layout
9090 \begin_inset Flex Code
9093 \begin_layout Plain Layout
9100 \begin_inset Flex Code
9103 \begin_layout Plain Layout
9112 \begin_layout Description
9113 Address This should be the author's permanent address.
9116 \begin_layout Description
9118 \begin_inset space ~
9121 Address This should be the author's temporary address at the time of submission,
9122 if different from the Address.
9125 \begin_layout Description
9126 Email Author's e-mail address
9129 \begin_layout Description
9130 URL Author's Web address, if desired.
9133 \begin_layout Description
9134 Keywords Key words or phrases used to identify specific topics discussed
9138 \begin_layout Description
9139 Subjectclass These refer to the AMS Subject Classifications, published and
9142 Mathematical Reviews
9145 These are also available online at the AMS cites listed above.
9148 \begin_layout Description
9152 \begin_layout Description
9156 \begin_layout Description
9160 \begin_layout Standard
9161 The following environments are provided by both the
9162 \begin_inset Flex Code
9165 \begin_layout Plain Layout
9172 \begin_inset Flex Code
9175 \begin_layout Plain Layout
9181 modules, in the latter case in both starred (unnumbered) and unstarred
9182 (numbered) versions.
9183 These same environments are provided only in the starred versions by the
9185 \begin_inset Flex Code
9188 \begin_layout Plain Layout
9197 \begin_layout Theorem
9198 This is typically used for the statements of major results.
9202 \begin_layout Corollary*
9203 This is used for statements which follow fairly directly from previous statement
9205 Again, these can be major results.
9210 These are smaller results needed to prove other statements.
9213 \begin_layout Proposition
9214 These are less major results which (hopefully) add to the general theory
9218 \begin_layout Conjecture
9219 These are statements provided without justification, which the author does
9220 not know how to prove, but which seem to be true (to the author, at least).
9223 \begin_layout Definition*
9224 Guess what this is for.
9225 The font is different for this environment than for the previous ones.
9229 \begin_layout Example*
9230 Used for examples illustrating proven results.
9233 \begin_layout Problem
9234 It's not really known what this is for.
9235 You should figure it out.
9238 \begin_layout Exercise*
9239 Write a description for this one.
9242 \begin_layout Remark
9243 This environment is also a type of theorem, usually a lesser sort of observation.
9246 \begin_layout Claim*
9247 Often used in the course of giving a proof of a larger result.
9251 Generally, these are used to break up long arguments, using specific instances
9257 The numbering scheme for cases is on its own, not together with other numbered
9263 At the end of this environment, a QED symbol (usually a square, but it can
9264 vary with different styles) is placed.
9265 If you want to have other environments within this one—for example, Case
9266 environments—and have the QED symbol appear only after them, then the other
9267 environments need to be nested within the proof environment.
9270 Nesting Environments
9276 for information on nesting.
9279 \begin_layout Standard
9280 And these environments are provided by
9281 \begin_inset Flex Code
9284 \begin_layout Plain Layout
9285 Theorems (AMS-Extended)
9293 \begin_layout Criterion*
9294 A required condition.
9297 \begin_layout Algorithm*
9298 A general procedure to be used.
9301 \begin_layout Axiom*
9302 This is a property or statement taken as true within the system being discussed.
9305 \begin_layout Condition*
9306 Sometimes used to state a condition assumed within the present context of
9311 Similar to a Remark.
9314 \begin_layout Notation*
9315 Used for the explanation of, yes, notation.
9318 \begin_layout Summary
9319 Do we really need to tell you?
9322 \begin_layout Acknowledgement*
9326 \begin_layout Conclusion*
9327 Sometimes used at the end of a long train of argument.
9331 Used in a way similar to Proposition, though perhaps lower on the scale.
9334 \begin_layout Standard
9335 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9337 They need to be available on your system in order to use these environments.
9340 \begin_layout Section
9348 \begin_layout Standard
9354 \begin_layout Subsection
9358 \begin_layout Standard
9359 These are the layout files for some of the journals of the American Geophysical
9361 It is assumed that you have both the AGU's own class files and AGUplus
9362 installed (everything to be found at
9363 \begin_inset Flex URL
9366 \begin_layout Plain Layout
9368 ftp://ftp.agu.org/journals/latex/journals
9376 \begin_layout Subsection
9380 \begin_layout Standard
9390 They are still called this in the LyX GUI, though their LaTeX equivalents
9391 in the AGU classes are
9402 \begin_layout Standard
9403 Newly defined styles are
9440 These are mostly manuscript attributes and defined in the AGU class documentati
9444 \begin_layout Standard
9445 I suspect this is still badly incomplete.
9448 \begin_layout Subsection
9452 \begin_layout Standard
9469 \begin_layout Subsection
9473 \begin_layout Itemize
9476 Journal of Geophysical Research
9485 \begin_layout Standard
9486 Add your own, it isn't so hard! Look at the
9497 \begin_layout Subsection
9498 Bugs and things to remember
9501 \begin_layout Standard
9502 In order to use the new layouts, you must remember to do the following for
9506 \begin_layout Enumerate
9512 This can be done in the
9514 Layout\SpecialChar \menuseparator
9519 Document\SpecialChar \menuseparator
9523 (AGU articles are always in English, right? So
9530 \begin_layout Enumerate
9540 (Yes, this is a bug.)
9543 \begin_layout Enumerate
9544 Make sure you use the
9548 bibliography style, by entering
9552 into the second field of the BibTeX inset.
9553 None of the standard styles will do.
9556 \begin_layout Section
9560 \begin_layout Standard
9566 \begin_layout Subsection
9570 \begin_layout Standard
9571 Broadway is for writing plays.
9572 The format is more decorative than Hollywood, and much less standardized.
9573 This format should be suitable for workshops.
9576 \begin_layout Subsection
9580 \begin_layout Standard
9581 The same as in Hollywood.
9584 \begin_layout Subsection
9588 \begin_layout Standard
9593 names as labels then cross-reference the label to insert the name.
9594 The cross-reference dialog will show the current cast of characters.
9597 \begin_layout Subsection
9598 Paper size and Margins
9601 \begin_layout Standard
9602 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9605 \begin_layout Subsection
9609 \begin_layout Standard
9610 The following environments are available.
9611 You can use broadway.bind to get the bind keys shown at the right.
9614 \begin_layout Itemize
9618 \begin_inset Newline newline
9623 You should not have to use this, but it is here for anything that does not
9627 \begin_layout Itemize
9631 \begin_inset space \hfill{}
9635 \begin_inset Newline newline
9640 Used to describe stage setting and the action.
9641 First use of speaker names in all CAPs.
9644 \begin_layout Itemize
9648 \begin_inset space \hfill{}
9652 \begin_inset Newline newline
9657 Automatically numbered.
9658 On screen it will be arabic, but will print as Roman.
9661 \begin_layout Itemize
9665 \begin_inset space \hfill{}
9669 \begin_inset Newline newline
9679 It is just centered text.
9682 \begin_layout Itemize
9686 \begin_inset space \hfill{}
9690 \begin_inset Newline newline
9695 Not automatically numbered.
9696 You supply the number.
9697 This is because I couldn't figure out how.
9700 \begin_layout Itemize
9704 \begin_inset space \hfill{}
9708 \begin_inset Newline newline
9713 A special case of Narrative to describe the setting and action as the curtain
9717 \begin_layout Itemize
9721 \begin_inset space \hfill{}
9725 \begin_inset Newline newline
9730 The speaker's (actor's) title, centered in all CAPS.
9733 \begin_layout Itemize
9737 \begin_inset space \hfill{}
9741 \begin_inset Newline newline
9746 Instructions to the speaker.
9747 The parentheses are automatically inserted.
9748 The ( will appear on screen, but both will be in the printed play.
9749 This environment is only used within
9756 \begin_layout Itemize
9760 \begin_inset space \hfill{}
9764 \begin_inset Newline newline
9769 What the Speaker says.
9772 \begin_layout Itemize
9776 \begin_inset space \hfill{}
9780 \begin_inset Newline newline
9785 The curtain comes down.
9788 \begin_layout Itemize
9792 \begin_inset space \hfill{}
9798 \begin_layout Itemize
9802 \begin_inset space \hfill{}
9808 \begin_layout Itemize
9812 \begin_inset space \hfill{}
9818 \begin_layout Standard
9822 \begin_layout Section
9826 \begin_layout Standard
9831 can be used to type letters according to German conventions.
9832 A template file is included in
9834 .../lyx/share/templates
9836 for you to use as a starting point.
9839 \begin_layout Section
9847 \begin_layout Standard
9853 \begin_layout Subsection
9857 \begin_layout Standard
9858 This is the layout file for the European Geophysical Society journals.
9863 can be downloaded from the web site of the EGS under
9864 \begin_inset Flex URL
9867 \begin_layout Plain Layout
9877 \begin_layout Subsection
9881 \begin_layout Standard
9884 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9892 The current layout file is unfortunately very unmodular and would benefit
9893 from using the various
9900 \begin_layout Section
9904 \begin_layout Standard
9905 See the LyX template file
9910 It contains all infos you need.
9913 \begin_layout Section
9919 \begin_inset CommandInset label
9928 \begin_layout Standard
9934 \begin_layout Subsection
9938 \begin_layout Standard
9939 This section describes how to use LyX to make slides for overhead projectors.
9940 There are two document classes that can do this: the default slides class
9946 This section documents the latter.
9949 \begin_layout Standard
9950 I'm going to say this again, nice and clear, so that there's no misunderstanding
9954 \begin_layout Standard
9955 \begin_inset VSpace bigskip
9961 \begin_layout Standard
9965 This section documents the class
9966 \begin_inset Quotes eld
9974 \begin_inset Quotes erd
9982 \begin_layout Standard
9983 \begin_inset VSpace bigskip
9989 \begin_layout Standard
9990 If you're looking for the documentation for
9991 \begin_inset Quotes eld
9999 \begin_inset Quotes erd
10002 , check out section
10003 \begin_inset space ~
10007 \begin_inset CommandInset ref
10009 reference "sec:slitex"
10014 If your machine doesn't have the
10019 \begin_inset Quotes eld
10027 \begin_inset Quotes erd
10030 ] installed, you'll probably have to use the default
10034 class, which isn't quite as good as
10039 \begin_layout Standard
10044 class is designed for use with version 2.1 of the
10048 LaTeX class file which is now an integral part of LaTeX2e.
10051 \begin_layout Subsection
10055 \begin_layout Standard
10056 Obviously, to use this document class, you need to select
10057 \begin_inset Quotes eld
10065 \begin_inset Quotes erd
10075 \begin_inset space ~
10081 There are some settings in the
10084 \begin_inset space ~
10089 dialog that you should know about that are specific to this class:
10092 \begin_layout Itemize
10093 Don't change the options
10104 \begin_inset space ~
10110 They're ignored by the
10117 \begin_layout Itemize
10118 The default font size is 20
10119 \begin_inset space \thinspace{}
10122 pt with the other options being 17
10123 \begin_inset space \thinspace{}
10127 \begin_inset space \thinspace{}
10131 \begin_inset space \thinspace{}
10137 \begin_layout Itemize
10138 The default font is
10146 but all math equations are still typeset in the usual roman font.
10149 \begin_layout Itemize
10154 supports A4 and Letter paper sizes as well as a special size for working
10156 \begin_inset space \thinspace{}
10160 It doesn't support A5, B5, legal or executive paper sizes.
10163 \begin_layout Itemize
10164 Don't bother changing the
10168 settings because they are ignored anyway.
10169 All floats appear where they are defined in the text.
10172 \begin_layout Itemize
10177 setting behaves a bit differently for this class.
10182 provides extensive footer and header capabilities including a user-defined
10185 \begin_inset space ~
10189 \begin_inset CommandInset ref
10191 reference "sec:foilfoot"
10196 The title page is treated differently to all other pages in the document
10205 has the logo centered at the bottom of the page (if one is defined).
10206 The possible page style choices and what they do are as follows:
10210 \begin_layout Labeling
10211 \labelwidthstring MMMMMMM
10218 The final output contains no page numbers, or other headers or footers
10219 (except footnotes of course).
10223 \begin_layout Labeling
10224 \labelwidthstring MMMMMMM
10231 The final output contains page numbers centered at the bottom of the page.
10232 No other headings or footers (other than footnotes).
10235 \begin_layout Labeling
10236 \labelwidthstring MMMMMMM
10241 Page numbers in lower right corner.
10242 Additional headers and footers are also shown.
10243 This is also the default.
10246 \begin_layout Labeling
10247 \labelwidthstring MMMMMMM
10252 Gives you access to the
10256 package although its use with
10260 is discouraged by the writer of the
10264 package because of some potential page layout clashes.
10268 \begin_layout Subsubsection
10272 \begin_layout Standard
10273 The following options may be used in the extra class options in the
10275 Document\SpecialChar \menuseparator
10281 \begin_layout Labeling
10282 \labelwidthstring MMMMMMx
10287 This sets up the page layout for 7.33
10288 \begin_inset space \thinspace{}
10292 \begin_inset space \thinspace{}
10295 in paper, which is about the same aspect ratio as a 35
10296 \begin_inset space \thinspace{}
10299 mm slide, making it a bit easier to work with this medium.
10302 \begin_layout Labeling
10303 \labelwidthstring MMMMMMx
10308 Places a rule across the page below the header on every page except the
10312 \begin_layout Labeling
10313 \labelwidthstring MMMMMMx
10318 Places a rule across the page above the footer on every page except the
10322 \begin_layout Labeling
10323 \labelwidthstring MMMMMMx
10328 This is automatically set each time you create a new
10337 to use the dvips driver to rotate those pages that are set as landscape
10341 \begin_layout Labeling
10342 \labelwidthstring MMMMMMx
10347 Simply changes the page dimensions to those of a landscape page but doesn't
10349 Thus if you use this option you need to use an external program to rotate
10350 each page or feed your paper through your printer as landscape.
10351 Note that this option effectively reverses the roles of the
10359 environments (don't worry these are described in the next section).
10362 \begin_layout Labeling
10363 \labelwidthstring MMMMMMx
10368 Equation numbers on the left.
10371 \begin_layout Labeling
10372 \labelwidthstring MMMMMMx
10377 Flush-left equations.
10380 \begin_layout Subsection
10381 Supported Environments
10384 \begin_layout Standard
10385 Most of the environments commonly supported in other classes are also supported
10391 There are several additional environments provided by
10395 as well as a couple added by LyX.
10396 The following environments are shared with other classes:
10399 \begin_layout Standard
10403 \begin_layout Plain Layout
10407 begin{multicols}{2}
10415 \begin_layout Itemize
10421 \begin_layout Itemize
10427 \begin_layout Itemize
10433 \begin_layout Itemize
10439 \begin_layout Itemize
10445 \begin_layout Itemize
10451 \begin_layout Itemize
10457 \begin_layout Itemize
10463 \begin_layout Itemize
10469 \begin_layout Itemize
10475 \begin_layout Itemize
10481 \begin_layout Itemize
10487 \begin_layout Itemize
10493 \begin_layout Itemize
10499 \begin_layout Itemize
10505 \begin_layout Itemize
10511 \begin_layout Itemize
10517 \begin_layout Itemize
10523 \begin_layout Standard
10527 \begin_layout Plain Layout
10539 \begin_layout Standard
10540 That is, all the major environments apart from the sectioning environments.
10541 Since foils are essentially self-contained sections, with a title and body,
10546 provides specific commands for starting new foils and these are:
10549 \begin_layout Itemize
10555 \begin_layout Itemize
10561 \begin_layout Standard
10562 LyX also provides slightly modified versions of these two environments called:
10565 \begin_layout Itemize
10571 \begin_layout Itemize
10574 ShortRotatefoilhead
10577 \begin_layout Standard
10578 and the differences will be explained in the next section.
10581 \begin_layout Standard
10582 Since foils are often used in presenting ideas or new theorems and such
10587 also provides a comprehensive box of goodies for presenting them:
10590 \begin_layout Standard
10594 \begin_layout Plain Layout
10598 begin{multicols}{2}
10606 \begin_layout Itemize
10612 \begin_layout Itemize
10618 \begin_layout Itemize
10624 \begin_layout Itemize
10630 \begin_layout Itemize
10636 \begin_layout Itemize
10642 \begin_layout Itemize
10648 \begin_layout Itemize
10654 \begin_layout Itemize
10660 \begin_layout Itemize
10666 \begin_layout Itemize
10672 \begin_layout Standard
10676 \begin_layout Plain Layout
10688 \begin_layout Standard
10689 The starred versions are unnumbered while the unstarred versions are numbered.
10690 There are also two list environments added by LyX and these are:
10693 \begin_layout Itemize
10699 \begin_layout Itemize
10705 \begin_layout Standard
10710 provides some powerful header and footer capabilities that are best set
10711 in the preamble although they may be set at any point in a document.
10712 If you want to change these settings in your document the best place to
10713 do so is at the very top of a foil, i.
10714 \begin_inset space \thinspace{}
10720 \begin_inset space \space{}
10725 straight after the foilhead.
10728 \begin_layout Standard
10729 For this purpose, the following command styles are provided [
10736 \begin_layout Standard
10740 \begin_layout Plain Layout
10744 begin{multicols}{2}
10752 \begin_layout Itemize
10756 \begin_inset space ~
10762 \begin_layout Itemize
10768 \begin_layout Itemize
10772 \begin_inset space ~
10778 \begin_layout Itemize
10782 \begin_inset space ~
10788 \begin_layout Itemize
10792 \begin_inset space ~
10799 \begin_layout Standard
10800 \begin_inset space ~
10807 \begin_layout Standard
10811 \begin_layout Plain Layout
10823 \begin_layout Standard
10824 There are also a few commands provided by
10828 that aren't directly supported by LyX but I'll tell you what they do and
10829 how to use them in section
10830 \begin_inset space ~
10834 \begin_inset CommandInset ref
10836 reference "sec:unsuppfoils"
10843 \begin_layout Subsection
10844 Building a Set of Foils
10847 \begin_layout Standard
10848 This section will give a simple introduction to using the different environments
10849 to build a set of foils.
10850 If you want to see an example set of foils, take a look at the
10854 file you find in LyX's
10861 \begin_layout Subsubsection
10862 Give It a Title Page
10865 \begin_layout Standard
10866 Unlike other classes that provide
10886 creates the title on a page of its own.
10887 If you leave out the
10891 environment LaTeX will substitute the current date (every time you regenerate
10895 \begin_layout Subsubsection
10899 \begin_layout Standard
10900 As I mentioned earlier, there are four ways of starting a new foil.
10901 For portrait foils you should use
10910 The difference between these two environments is the amount of space between
10911 the title of the foil (the foilhead) and the body of the foil.
10914 \begin_layout Standard
10915 Landscape foils are generated using the
10921 ShortRotatefoilhead
10924 Again the only difference is the spacing between foilhead and body.
10925 Both of the short versions have 0.5 inches less separation between the foilhead
10930 \begin_layout Standard
10931 One problem with the support for landscape foils is the requirement that
10932 you have to use the
10936 driver to generate the PostScript output otherwise the foils won't be rotated.
10937 It is possible to get landscape foils even if you haven't got the
10941 driver provided you can feed your foils sideways through your printer ;-)
10944 \begin_layout Subsubsection
10945 Theorems, Lemmas, Proofs and more
10948 \begin_layout Standard
10949 Due to a small bug in LyX you can't have two of the same type of these environme
10950 nts directly following each other.
10951 They must be separated by something.
10952 If you try, you will just be extending the previous environment as if you
10953 had merged the two environments together.
10954 So, how do you get around this problem? The simplest option is to insert
10955 some text between the two environments or add a
10959 environment between the two with just a
10960 \begin_inset Quotes eld
10968 \begin_inset Quotes erd
10972 This will force LyX to produce two separate environments and hence the
10973 correct LaTeX output.
10974 An example is provided in the example file included with the LyX distribution.
10975 Remember, this problem only occurs if you are trying to place two of the
10976 same type of theorem-like environments one directly after the other.
10979 \begin_layout Subsubsection
10983 \begin_layout Standard
10984 You get all the commonly supported list styles found in other classes as
10985 well as two new ones.
10986 I'll only describe the new ones here.
10987 If you want to find out more about the other list environments check out
10993 If you intend to use itemized lists you might also want to read about the
10997 \begin_inset space ~
11001 \begin_inset space ~
11006 dialog described above in section
11007 \begin_inset space ~
11011 \begin_inset CommandInset ref
11013 reference "sec:bullet"
11020 \begin_layout Standard
11021 The two new list styles,
11029 , are designed to make it easier for you to create lists of do's and don'ts
11030 or right and wrong by providing dedicated environments that use a tick
11031 or a cross as the label of the list.
11032 These lists are in fact dedicated variants of the
11037 They do however require that you have the
11041 packages installed.
11044 \begin_layout Subsubsection
11048 \begin_layout Standard
11053 redefines the floating tables and figures so that they appear exactly where
11054 they are in the text rather than pushing them to the top of the page or
11055 to some user specified location.
11056 In fact if you change the float placement settings they are simply ignored.
11059 \begin_layout Subsubsection
11060 Page Headers and Footers
11061 \begin_inset CommandInset label
11063 name "sec:foilfoot"
11070 \begin_layout Standard
11074 \begin_inset space ~
11083 are two commands used to control the left-footer text string.
11084 The first is meant to allow you to include a graphic logo on your foils
11086 \begin_inset Quotes eld
11094 \begin_inset Quotes erd
11098 While the second is meant to provide a classification for the audience,
11102 \begin_inset space \thinspace{}
11108 \begin_inset space \space{}
11112 It is empty by default.
11115 \begin_layout Standard
11116 The remaining page corners can be filled by
11119 \begin_inset space ~
11124 (which defaults to page numbers),
11127 \begin_inset space ~
11135 \begin_inset space ~
11143 \begin_layout Subsection
11149 \begin_inset CommandInset label
11151 name "sec:unsuppfoils"
11158 \begin_layout Standard
11159 All the commands mentioned below need to be set in a
11167 within another environment.
11170 \begin_layout Subsubsection
11174 \begin_layout Standard
11175 All lengths are adjusted using the
11198 should be replaced by the name given to the length you want to change and
11203 is the length value.
11204 All lengths should be specified in units of length such as inches (
11216 ) or relative to some document or font-based length such as
11226 \begin_layout Standard
11227 It's possible to change the spacing between a foilhead and the body of the
11228 foil by adjusting the length specified by
11235 For example, to make
11240 \begin_inset space \space{}
11243 in closer to their bodies put the following in the preamble:
11249 foilheadskip}{-0.5in}
11252 \begin_layout Standard
11253 The spacings around floats can be adjusted by setting these lengths:
11256 \begin_layout Labeling
11257 \labelwidthstring MMMMMMMMMMM
11264 Separation between the text and the top of the float
11267 \begin_layout Labeling
11268 \labelwidthstring MMMMMMMMMMM
11275 Separation between the float and the caption
11278 \begin_layout Labeling
11279 \labelwidthstring MMMMMMMMMMM
11286 Separation between the caption and the following text
11289 \begin_layout Labeling
11290 \labelwidthstring MMMMMMMMMMM
11297 You can make the captions narrower than the surrounding text by adjusting
11299 Best done relative to
11308 \begin_layout Standard
11309 There are also several title page related lengths that you may find useful
11310 if you have a long title or several authors:
11313 \begin_layout Labeling
11314 \labelwidthstring MMMMMMMMMMM
11321 Separation from headers to
11326 \begin_layout Labeling
11327 \labelwidthstring MMMMMMMMMMM
11345 \begin_layout Labeling
11346 \labelwidthstring MMMMMMMMMMM
11360 \begin_layout Labeling
11361 \labelwidthstring MMMMMMMMMMM
11377 \begin_layout Labeling
11378 \labelwidthstring MMMMMMMMMMM
11394 \begin_layout Standard
11395 The last length related command affects all the list environments.
11406 a list environment then all the vertical spacing between the list items
11408 Note that this is a command not a length so it doesn't require
11414 like the stuff mentioned above.
11417 \begin_layout Subsubsection
11418 Headers and Footers
11421 \begin_layout Standard
11434 commands control whether the logo in the
11438 definition appear on a given page.
11445 in the preamble then none of the foils will have the logo on them.
11446 If you don't want the logo on a particular page place the
11452 directly after the foilhead of that page and the
11458 directly after the next foilhead.
11461 \begin_layout Standard
11462 If you decide to use the
11466 page style setting in the
11469 \begin_inset space ~
11474 dialog you should probably add
11484 to your preamble so headers and footers on landscape pages are correctly
11485 placed when rotated.
11486 This is due to some clashes between the page layouts provided by the
11497 \begin_layout Section
11498 Hollywood (Hollywood spec scripts)
11501 \begin_layout Standard
11507 \begin_layout Subsection
11511 \begin_layout Standard
11512 Getting the format of a Hollywood script right is a
11513 \begin_inset Quotes eld
11517 \begin_inset Quotes erd
11520 It is designed to make the readers focus on content and to be easy and
11521 familiar for the actors to read.
11522 Each page of a script should be one minute of film.
11523 Nothing goes in a script that you cannot see or hear on screen.
11524 The courier 12 pt font should be used throughout.
11528 \begin_layout Subsection
11532 \begin_layout Standard
11533 Speakers' lines should NEVER break in mid-sentence.
11534 If a speaker's lines continue over a page break, repeat the
11538 title followed by (Cont'd).
11541 \begin_layout Subsection
11545 \begin_layout Standard
11550 names as labels then cross-reference the label to insert the name.
11551 The cross-reference dialog will show the current cast of characters.
11552 You can use this to insert the speaker name in narratives also.
11555 \begin_layout Subsection
11556 Paper size and Margins
11559 \begin_layout Standard
11560 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11563 \begin_layout Subsection
11567 \begin_layout Standard
11568 The following environments are available.
11569 You can use hollywood.bind to get the bind keys shown at the right.
11572 \begin_layout Itemize
11576 \begin_inset Newline newline
11581 Used where nothing else works.
11585 \begin_layout Itemize
11591 \begin_inset space \hfill{}
11599 \begin_inset Newline newline
11602 Usually followed by something like
11603 \begin_inset Quotes eld
11606 on Sally waking up.
11607 \begin_inset Quotes erd
11613 \begin_layout Itemize
11617 \begin_inset space \hfill{}
11621 \begin_inset Newline newline
11626 Introduces a new INTERIOR camera set-up.
11627 Always followed by DAY or NIGHT, or something similar to define the lighting
11629 Everthing on this line in CAPS.
11632 \begin_layout Itemize
11636 \begin_inset space \hfill{}
11640 \begin_inset Newline newline
11645 Introduces a new EXTERIOR camera set-up.
11646 Everthing on this line in CAPS.
11649 \begin_layout Itemize
11653 \begin_inset space \hfill{}
11657 \begin_inset Newline newline
11662 The character speaking.
11665 \begin_layout Itemize
11669 \begin_inset space \hfill{}
11673 \begin_inset Newline newline
11678 Instructions to the speaker.
11679 The () are automatically inserted, but only the ( will show in LyX.
11680 Both will be printed.
11683 \begin_layout Itemize
11687 \begin_inset space \hfill{}
11691 \begin_inset Newline newline
11703 \begin_layout Itemize
11707 \begin_inset space \hfill{}
11711 \begin_inset Newline newline
11716 Camera movement instruction.
11718 \begin_inset space \thinspace{}
11722 \begin_inset space \space{}
11728 \begin_layout Itemize
11732 \begin_inset space \hfill{}
11738 \begin_layout Itemize
11742 \begin_inset space \hfill{}
11748 \begin_layout Itemize
11752 \begin_inset space \hfill{}
11758 \begin_layout Itemize
11762 \begin_inset space \hfill{}
11768 \begin_layout Subsection
11772 \begin_layout Itemize
11776 \begin_layout Itemize
11780 \begin_layout Itemize
11782 \begin_inset space \thinspace{}
11789 \begin_layout Itemize
11794 \begin_layout Itemize
11795 PAN — camera movement
11798 \begin_layout Itemize
11799 INSERT — cut to close-up of
11802 \begin_layout Section
11806 \begin_layout Standard
11809 Panayotis Papasotiriou
11812 \begin_layout Subsection
11816 \begin_layout Standard
11817 The ijmpc package is a set of macros that facilitates electronic manuscript
11820 International Journal of Modern Physics C
11823 Similarly, the ijmpd package is for creating manuscripts to be submitted
11826 International Journal of Modern Physics D
11829 Both journals are published by World Scientific.
11830 The corresponding document classes are named
11839 These files, together with instructions for the authors, can be downloaded
11841 \begin_inset Flex URL
11844 \begin_layout Plain Layout
11846 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11852 \begin_inset Flex URL
11855 \begin_layout Plain Layout
11857 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11863 Both packages are modified versions of the standard
11864 \begin_inset Quotes eld
11868 \begin_inset Quotes erd
11871 package, and they are almost (but not exactly) identical.
11872 Most of their features are supported by LyX.
11873 I have used LyX successfully to write articles submitted to both journals
11874 without any problem.
11877 \begin_layout Subsection
11881 \begin_layout Standard
11882 As usual, the easiest way to write a paper is to start with a template.
11885 File\SpecialChar \menuseparator
11904 This will give an (almost) empty document that includes the most common
11905 fields found in a manuscript.
11906 Simply overwrite the existing text (including the brackets,
11911 You should keep in mind the following remarks.
11914 \begin_layout Enumerate
11915 LyX won't let you change the font size and the page style of the document,
11916 because such modifications are not allowed by both packages.
11919 \begin_layout Enumerate
11920 The language of the document should not be changed.
11921 Before previewing your paper, be sure that the babel package is not used.
11922 To do this, click on
11924 Tools\SpecialChar \menuseparator
11935 checkbox in the language settings, and click on
11943 , if you wish to make this change permanent).
11946 \begin_layout Enumerate
11948 \begin_inset Quotes eld
11952 \begin_inset Quotes erd
11955 style must be used to define keywords.
11958 \begin_layout Enumerate
11959 The ijmpc package provides a style named
11960 \begin_inset Quotes eld
11963 Classification Codes
11964 \begin_inset Quotes erd
11967 , which can be used to define classification codes, such as PACS numbers.
11968 Note that this facility is not supported by the ijmpd package.
11971 \begin_layout Enumerate
11972 Several new environments are available:
11973 \begin_inset Quotes eld
11977 \begin_inset Quotes erd
11981 \begin_inset Quotes eld
11985 \begin_inset Quotes erd
11989 \begin_inset Quotes eld
11993 \begin_inset Quotes erd
11997 \begin_inset Quotes eld
12001 \begin_inset Quotes erd
12005 \begin_inset Quotes eld
12009 \begin_inset Quotes erd
12013 \begin_inset Quotes eld
12017 \begin_inset Quotes erd
12021 \begin_inset Quotes eld
12025 \begin_inset Quotes erd
12029 \begin_inset Quotes eld
12033 \begin_inset Quotes erd
12037 \begin_inset Quotes eld
12041 \begin_inset Quotes erd
12045 \begin_inset Quotes eld
12049 \begin_inset Quotes erd
12053 \begin_inset Quotes eld
12057 \begin_inset Quotes erd
12061 \begin_inset Quotes eld
12065 \begin_inset Quotes erd
12069 \begin_inset Quotes eld
12073 \begin_inset Quotes erd
12077 \begin_inset Quotes eld
12081 \begin_inset Quotes erd
12085 Their use is more or less obvious.
12086 LyX supports all these environments; it will use the proper label, text
12087 style, and numbering scheme for each of them.
12090 \begin_layout Enumerate
12091 Both packages use basic citations; the natbib package should not be used.
12092 In LyX, citation references are shown as usual; in the output, citations
12093 are shown as superscripts.
12094 If you want to use a citation as normal text, you should use the
12099 \begin_inset space \thinspace{}
12103 \begin_inset space \space{}
12107 \begin_inset Quotes eld
12111 \begin_inset space \space{}
12121 \begin_inset Quotes erd
12127 \begin_layout Enumerate
12129 \begin_inset Quotes eld
12133 \begin_inset Quotes erd
12136 section in both packages.
12137 To put acknowledgments, just use the
12138 \begin_inset Quotes eld
12142 \begin_inset Quotes erd
12148 \begin_layout Enumerate
12149 Appendices may be added to the paper,
12153 the Acknowledgments and
12158 LyX provides a special environment, called
12159 \begin_inset Quotes eld
12163 \begin_inset Quotes erd
12166 which marks the beginning of the appendices.
12167 This environment should be left blank; it just sends a LaTeX command, but
12168 nothing is really printed.
12170 \begin_inset Quotes eld
12174 \begin_inset Quotes erd
12177 is printed with blue letters, as a signal that all sections after that
12178 point are appendices.
12179 To write an appendix, use the
12180 \begin_inset Quotes eld
12184 \begin_inset Quotes erd
12188 LyX will number each appendix with capital letters, as required by both
12191 \begin_inset Quotes eld
12195 \begin_inset Quotes erd
12202 be present before the first appendix; if not, all appendices will be numbered
12203 as normal sections in the output.
12206 \begin_layout Enumerate
12207 The ijmpc and the ijmpd packages use the
12211 command to implement table captions.
12212 As a result, a table created by LyX is printed correctly, but its caption
12214 However, you can use some TeX code to overcome this problem, so that captions
12215 are printed as expected.
12216 To do so, create a float table as usual, remove the caption, and replace
12217 it with the TeX code
12227 (sic); you must also the TeX code
12231 immediately after the tabular material.
12232 Study the example table included in the template files to see how this
12233 trick is implemented.
12234 Alternatively, If you need table captions, you should implement the whole
12239 file, then include this file to the LyX document (
12241 Insert\SpecialChar \menuseparator
12242 File\SpecialChar \menuseparator
12244 \begin_inset space ~
12250 Details on how to create a table float can be found in the files
12258 , included in the corresponding packages.
12261 \begin_layout Subsection
12262 Preparing a paper for submission
12265 \begin_layout Standard
12266 Before you submit your paper you must export the LyX document as a LaTeX
12269 File\SpecialChar \menuseparator
12270 Export\SpecialChar \menuseparator
12277 \begin_layout Plain Layout
12278 Actually you have the choice between LaTeX (plain) and pdflatex.
12279 If you intend to use pdflatex to prepare the paper, you should use the
12280 pdflatex option so that included graphics are converted to PDF format,
12281 ready for use by pdflatex.
12286 , then make the following changes to the resulting
12293 \begin_layout Enumerate
12294 Remove the comment lines before the
12303 \begin_layout Enumerate
12304 Remove everything between (and including) the
12316 commands, except for any commands you specifically put into the LaTeX preamble.
12319 \begin_layout Standard
12324 file should be saved and processed through LaTeX as many times as necessary.
12325 You may also want to check the resulting
12332 \begin_layout Subsection
12336 \begin_layout Standard
12337 The use of TeX code is reduced to two commands, which must be placed at
12338 the top of the document.
12339 If you started writing your paper by using the
12347 template, the TeX code needed is already in its place; you usually don't
12349 You may only modify the first TeX code to specify the information printed
12350 to the top of odd and even pages (authors' names and short paper's title,
12352 This TeX code must have the form
12356 markboth{Authors' Names}{Short Paper's Title}
12361 \begin_layout Section
12365 \begin_layout Standard
12371 \begin_layout Subsection
12375 \begin_layout Standard
12376 The iopart package provides a document class to create electronic manuscript
12377 submission to the journals published by the Institute of Physics.
12378 Instructions for the authors how to create a paper using the iopart class
12379 can be downloaded together with the iopart package from the site
12380 \begin_inset Flex URL
12383 \begin_layout Plain Layout
12385 ftp://ftp.iop.org/pub/journals/latex2e
12393 \begin_layout Subsection
12397 \begin_layout Standard
12398 The easiest way to write a paper is to start with the file
12402 that is available in LyX's examples files folder.
12403 Open this file, save it under a new name, and start writing.
12404 The example file explains how to use the special text environments.
12405 Here are the most important advices:
12408 \begin_layout Itemize
12409 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12412 Use AMS math package
12414 in the document settings under
12421 \begin_layout Itemize
12424 The title environment defines the kind of your paper.
12425 So use one of the following environments for the title:
12429 \begin_layout Itemize
12438 \begin_layout Itemize
12447 \begin_layout Itemize
12453 for a Topical review
12456 \begin_layout Itemize
12465 \begin_layout Itemize
12474 \begin_layout Itemize
12480 for a Paper (same as Title)
12483 \begin_layout Itemize
12489 for a Preliminary communication
12492 \begin_layout Itemize
12498 for a Rapid communication
12501 \begin_layout Itemize
12507 for a Letter to the editor
12511 \begin_layout Itemize
12514 All title environments except of
12518 can have an optional short title.
12521 \begin_layout Itemize
12522 There is a general title environment
12526 which is not directly supported by the LyX.
12527 This can be used as TeX code when your document doesn't fit into one of
12528 the other title types.
12531 \begin_layout Standard
12532 For more informations like hints for special table and formula formatting,
12533 look at the IOP author guidelines.
12536 \begin_layout Section
12540 \begin_layout Standard
12543 Panayotis Papasotiriou
12546 \begin_layout Subsection
12550 \begin_layout Standard
12551 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12552 that facilitates electronic manuscript submission to the journals they
12554 Most known of them (at least in my domain of interest) are
12556 Astrophysics and Space Science
12562 , but there are many others (see a complete list at
12563 \begin_inset Flex URL
12566 \begin_layout Plain Layout
12568 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12574 The Kluwer package may be downloaded from the site
12575 \begin_inset Flex URL
12578 \begin_layout Plain Layout
12580 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12586 A complete user guide is contained in that package (but it can also be
12587 downloaded separately).
12590 \begin_layout Standard
12591 LyX supports many features of the package but not everything.
12592 However, the TeX code needed is reduced to some
12593 \begin_inset Quotes eld
12597 \begin_inset Quotes erd
12600 commands of the package (see
12601 \begin_inset space ~
12605 \begin_inset CommandInset ref
12607 reference "subsec:kluwer_peculiarities"
12612 I have recently used LyX to write an article submitted to the
12614 Astrophysics and Space Science
12616 without any problem.
12619 \begin_layout Subsection
12623 \begin_layout Standard
12624 The easiest way to write a paper is to start with the Kluwer template file.
12627 File\SpecialChar \menuseparator
12639 This will give an (almost) empty document that includes the most common
12640 fields found in a manuscript and a short description of their use.
12641 As in most templates, simply overwrite the existing text (including the
12646 ) with the correct information.
12649 \begin_layout Subsection
12650 Preparing a paper for submission
12653 \begin_layout Standard
12654 As in the AASTeX package, before you submit your paper to a journal you
12656 \begin_inset Quotes eld
12660 \begin_inset Quotes erd
12666 \begin_layout Enumerate
12667 Export your paper as a LaTeX file.
12668 To do this, click on
12670 File\SpecialChar \menuseparator
12671 Export\SpecialChar \menuseparator
12678 \begin_layout Enumerate
12683 file with a text editor and make the following changes
12687 \begin_layout Enumerate
12688 remove the comment lines before the
12697 \begin_layout Enumerate
12698 remove everything between (and including) the
12710 commands, except for any commands you specifically put into the LaTeX preamble.
12713 \begin_layout Standard
12722 \begin_layout Enumerate
12727 file through LaTeX as many times as necessary (usually up to three).
12730 \begin_layout Enumerate
12736 \begin_inset space \thinspace{}
12740 \begin_inset space \space{}
12747 , and check if everything is OK (it should, if you didn't make any mistake).
12750 \begin_layout Subsection
12751 \begin_inset Quotes eld
12755 \begin_inset Quotes erd
12758 of the Kluwer package
12759 \begin_inset CommandInset label
12761 name "subsec:kluwer_peculiarities"
12768 \begin_layout Standard
12769 The Kluwer package has the following
12770 \begin_inset Quotes eld
12774 \begin_inset Quotes erd
12780 \begin_layout Enumerate
12781 It is possible to write multiple articles in the same LaTeX file
12785 \begin_layout Plain Layout
12786 I can't imagine any good reason to do this.
12792 Each article must be included in the environment
12793 \begin_inset Quotes eld
12797 \begin_inset Quotes erd
12801 Unfortunately, this environment cannot be omitted, even if you write just
12803 Therefore, each article starts with the command
12809 and, obviously, ends with the command
12816 Although this can be implemented in LyX, I didn't included it, since it
12817 looks ugly and can confuse the novice user.
12818 Therefore, you need to enter them directly and mark them as LaTeX code
12820 \begin_inset Quotes eld
12824 \begin_inset Quotes erd
12830 \begin_layout Enumerate
12831 Information given at the beginning of the article (i.
12832 \begin_inset space \thinspace{}
12836 \begin_inset space \space{}
12839 title, subtitle, author, institution, running title, running author, abstract
12840 and keywords) must be included in an environment called
12841 \begin_inset Quotes eld
12845 \begin_inset Quotes erd
12849 This is not implemented in LyX, so you must enter title, subtitle etc.
12850 \begin_inset space ~
12853 between two TeX code lines (
12868 \begin_layout Enumerate
12869 According to the user manual, the label of each bibliography item must be
12893 \begin_layout Standard
12898 template takes care of all these
12899 \begin_inset Quotes eld
12903 \begin_inset Quotes erd
12907 If you start a new paper using this template you don't need to do anything
12912 \begin_layout Enumerate
12913 don't delete the TeX code included in the template, and
12916 \begin_layout Enumerate
12917 copy the example bibliography item included in the template and modify it
12918 as necessary to enter new bibliography items.
12921 \begin_layout Section
12925 \begin_layout Standard
12931 \begin_layout Subsection
12935 \begin_layout Standard
12936 The LyX document classes
12938 article (koma-script)
12942 report (koma-script)
12960 correspond to the LaTeX document classes
12977 \begin_inset space ~
12980 of the Koma-Script family.
12981 They are replacements for the standard document classes
12997 , resp., and fit better to European typography conventions in a number of
13001 \begin_layout Itemize
13002 Standard character size is 11pt in
13004 article (koma-script)
13008 report (koma-script)
13016 letter (koma-script)
13021 \begin_layout Itemize
13022 Headings, labels of the description environment, and a number of elements
13025 letter (koma-script)
13027 document class are set in a bold sans serif font.
13031 \begin_layout Plain Layout
13032 There is a big difference between the bold sans serif old cm fonts and new
13033 ec fonts, especially in the appearance of headings.
13034 In comparison, the ec bold sans serif fonts look a bit thin.
13035 Here the LaTeX package
13043 helps to produce the
13044 \begin_inset Quotes eld
13048 \begin_inset Quotes erd
13051 appearance when using the ec fonts.
13056 The numbering of chapter headings is made in the same way as the numbering
13057 of section headings, that is without the extra line
13058 \begin_inset Quotes eld
13061 Chapter\SpecialChar \ldots{}
13063 \begin_inset Quotes erd
13067 In addition, the appearance of the headings can be modified by using a
13068 number of options (in LyX to be entered in the field
13071 \begin_inset space ~
13078 Layout\SpecialChar \menuseparator
13085 \begin_layout Itemize
13086 The main means in the Koma-Script document classes to design the type area
13095 (in LyX to be entered in the extra class options field in the dialog
13097 Document\SpecialChar \menuseparator
13101 They make a clearer modification of page margins possible as do the options
13104 Document\SpecialChar \menuseparator
13111 \begin_layout Itemize
13112 The LaTeX document classes of the Koma-Script family define a number of
13113 additional commands.
13114 Those part of it which makes sense in LyX is implemented in corresponding
13118 \begin_layout Standard
13119 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13120 can be found in the Koma-Script documentation
13131 \begin_layout Subsection
13132 article (koma-script), report (koma-script), and book (koma-script)
13135 \begin_layout Standard
13136 The document classes
13138 article (koma-script)
13142 report (koma-script)
13152 are implemented in the layout files
13165 They contain all the paragraph types of the corresponding standard document
13178 , resp., partly modified, with the exception of the LyX specific
13182 -type, which is replaced by the new
13186 -type having the same functionality.
13191 -Type there is a number of new paragraph types added.
13198 letter (koma-script)
13203 \begin_layout Itemize
13212 : are equivalents to
13220 , resp., additionally inserting an entry in the table of contents.
13229 are not contained in
13231 article (koma-script)
13236 \begin_layout Itemize
13245 : behave exactly as
13253 , resp., additionally clearing running heads.
13258 is not contained in
13260 article (koma-script)
13266 \begin_layout Plain Layout
13279 report (koma-script)
13281 , but since this is identical to
13285 , is has not been implemented in LyX.
13293 \begin_layout Itemize
13298 : generates a heading directly above the following paragraph in the standard
13299 character size without affecting the structure of the document.
13302 \begin_layout Itemize
13311 are special captions which respect the different space settings needed
13312 for captions placed above or below an element (if you follow strict typographic
13313 rules, you might want to place table captions always above the table).
13314 You can also use the class option
13318 , which will switch
13331 You need at least Koma-Script version 2.8q to use this.
13334 \begin_layout Itemize
13339 : can be used to set a bonmot, e.
13340 \begin_inset space \thinspace{}
13344 \begin_inset space \space{}
13347 at the beginning of a chapter.
13348 If you use the optional argument (
13350 Insert\SpecialChar \menuseparator
13352 \begin_inset space ~
13357 ), you can insert the dictum's author there.
13358 Dictum and author are separated by a line.
13359 You need at least Koma-Script version 2.8q to use this.
13364 is not contained in
13366 article (koma-script)
13371 \begin_layout Standard
13372 The following types, together with the standard types
13384 , form the title area of the document.
13385 They must be entered ahead of the first
13386 \begin_inset Quotes eld
13390 \begin_inset Quotes erd
13397 \begin_layout Plain Layout
13398 The corresponding LaTeX commands must appear before the
13409 When such a type is used more than once, the latter usage overwrites the
13410 former one, that means, for every type only the latest usage is valid.
13411 The order of the different types however has, like
13423 , no effect on the appearance of the produced document.
13426 \begin_layout Itemize
13431 : produces a centered paragraph above the ordinary title (
13443 ) for the subject of the document.
13446 \begin_layout Itemize
13451 : produces a centered paragraph below the ordinary title (
13463 ) for the publishers' name.
13466 \begin_layout Itemize
13473 report (koma-script)
13479 produces a centered paragraph on its own page behind the title page, or
13482 article (koma-script)
13484 produces a centered paragraph below the ordinary title (
13500 ) for a dedication.
13503 \begin_layout Itemize
13508 : produces a left aligned paragraph above the ordinary title (
13524 ) for a document`s head.
13527 \begin_layout Itemize
13532 : produces in a double-sided print in
13534 report (koma-script)
13540 a left-aligned paragraph at the top of the title page`s back or has no
13541 effect in a single-sided print or in
13543 article (koma-script)
13548 \begin_layout Itemize
13553 : produces in a double-sided print in
13555 report (koma-script)
13561 a left-aligned paragraph at the bottom of the title page`s back or has
13562 no effect in a single-sided print or in
13564 article (koma-script)
13569 \begin_layout Itemize
13574 : produces a special
13575 \begin_inset Quotes eld
13579 \begin_inset Quotes erd
13582 page ahead of the actual document containing a paragraph without special
13586 \begin_layout Standard
13587 The layout files for the document classes
13589 article (koma-script)
13593 report (koma-script)
13599 do include the file
13604 This is thought of as a place to define your own types.
13609 in your personal layout directory and edit the file!
13612 \begin_layout Subsection
13613 letter (koma-script)
13616 \begin_layout Standard
13620 letter (koma-script)
13622 is implemented in the layout file
13627 It contains all the paragraph types of the corresponding standard document
13632 , partly modified, with the exception of the LyX specific types
13644 type, which is replaced by the new
13649 In addition, it contains, in contrast to the standard document class, the
13667 Furthermore, there are a number of new letter specific types.
13670 \begin_layout Standard
13671 The appearance of the letter produced by this document class can be controlled
13672 by a number of LaTeX commands, which you can put in the LaTeX preamble.
13676 \begin_layout Plain Layout
13677 For example, the standard appearance of the letter`s heading, consisting
13678 of name and address, is quite self-willed.
13680 \begin_inset Quotes eld
13684 \begin_inset Quotes erd
13687 heading is produced by the following LaTeX commands in the preamble:
13690 \begin_layout LyX-Code
13700 \begin_layout LyX-Code
13716 \begin_layout LyX-Code
13726 \begin_layout LyX-Code
13746 A detailed German description of such LaTeX commands can be found in the
13747 Koma-Script documentation
13752 With it, the letter's author can produce his personal letter layout.
13755 \begin_layout Standard
13764 define the beginning of the letter and must be used in every letter.
13765 To emphasize them in the LyX document class, they are marked with the letter
13775 \begin_inset space ~
13778 in the left margin.
13779 It is possible to write any number of letters in one file.
13784 type produces a new letter using the same addressee and a
13788 type produces a new addressee.
13805 are ordinary paragraph types and can also be used several times in one
13806 and the same letter.
13809 \begin_layout Itemize
13814 : produces a paragraph for the addressee and implicitly defines the beginning
13818 \begin_layout Itemize
13823 : produces a paragraph for the form of address and implicitly produces a
13827 \begin_layout Itemize
13832 : produces a paragraph for a close.
13835 \begin_layout Itemize
13840 : produces a paragraph for a postscript.
13843 \begin_layout Itemize
13848 : produces a paragraph for a distribution list.
13851 \begin_layout Itemize
13856 : produces a paragraph for enclosures.
13859 \begin_layout Standard
13900 are input types provided with a label to enter information, which will
13901 be processed by the document class.
13905 \begin_layout Plain Layout
13906 It could be seen as a matter of inconsequence, that the types
13914 described above are not such input types as well.
13915 Because of the special meaning of those types, however, I have implemented
13916 them as ordinary paragraph types with a one letter mark in the left margin.
13917 Moreover, it would affect my feeling of symmetry, if the
13925 type had such a serious different appearance.
13930 The types must be used ahead of the corresponding
13937 \begin_layout Standard
13938 An implementation of these types in a WYSIWYG fashion does not seem to make
13939 sense, because the real appearance of the produced letter does not only
13940 depend on the usage of the particular type, but also on other factors.
13941 For example, a signature entered in the
13945 type will in the standard behavior appear in the produced letter only,
13946 when in the same letter also a
13951 The entered value of the
13955 type will in the standard behavior not appear in the produced letter at
13957 The possibility to design the letter`s heading freely is already indicated
13958 in a footnote above.
13961 \begin_layout Standard
13962 The input types can also be used as empty paragraphs.
13963 This makes sense e.
13964 \begin_inset space \thinspace{}
13968 \begin_inset space \space{}
13980 type is not used at all, in the standard behavior the value of the
13984 type is used as signature, whereas if an empty
13988 type is used, no signature value is defined.
13991 \begin_layout Standard
13992 By using the input types it is possible to write a letter template, containing
13993 filled input types with your personal dates (name, address, etc.) and empty
13994 input types for other dates you want to enter.
13997 \begin_layout Itemize
14002 : sender's name, in the standard behavior appears as a centered paragraph
14003 in small caps in the letter`s heading.
14006 \begin_layout Itemize
14011 : sender's signature, in the standard behavior appears below the
14020 type is used, the value of the
14024 type appears instead.
14027 \begin_layout Itemize
14032 : sender's address, in the standard behavior appears in a centered paragraph
14033 in the letter`s heading below the sender's name.
14036 \begin_layout Itemize
14041 : sender's telephone number, in the standard behavior only sets the LaTeX
14051 \begin_layout Itemize
14056 : place of the letter`s making.
14059 \begin_layout Itemize
14064 : date of the letter`s making.
14073 , in the standard behavior, produce the place and the date in a right-aligned
14074 line below the addressee's field.
14079 type is used, neither place nor date appear, independent of the value of
14089 type is used, the date of the letter `s production is used.
14092 \begin_layout Itemize
14097 : sender`s back address, in the standard behavior appears above the addressee's
14098 field in a small sans serif font.
14101 \begin_layout Itemize
14106 : special mail information, in the standard behavior appears underlined
14107 above the addressee's field below the back address.
14110 \begin_layout Itemize
14115 : additional information, in the standard behavior appears on right side
14116 below the addressee`s field.
14119 \begin_layout Itemize
14124 : the letter's title, in the standard behavior appears in a big, bold, sans
14125 serif font above the subject.
14128 \begin_layout Itemize
14133 : the letter's subject, in the standard behavior appears in a bold font
14141 \begin_layout Standard
14162 produce a business letter like line above the
14166 line containing the fields
14167 \begin_inset Quotes eld
14171 \begin_inset Quotes erd
14175 \begin_inset Quotes eld
14179 \begin_inset Quotes erd
14183 \begin_inset Quotes eld
14187 \begin_inset Quotes erd
14191 \begin_inset Quotes eld
14195 \begin_inset Quotes erd
14199 \begin_inset Quotes eld
14203 \begin_inset Quotes erd
14207 \begin_inset Quotes eld
14211 \begin_inset Quotes erd
14215 For the date field, the value of the
14221 \begin_inset Quotes eld
14224 business letter types
14225 \begin_inset Quotes erd
14228 is used, the value of the
14232 type however does not appear, but only the LaTeX variable
14239 The ordinary output of place and date in a right-aligned line below the
14240 addressee`s field is suppressed.
14241 The types are implemented as input types provided with a label and must
14242 be used ahead of the corresponding
14249 \begin_layout Itemize
14257 \begin_layout Itemize
14265 \begin_layout Itemize
14273 \begin_layout Itemize
14281 \begin_layout Itemize
14289 \begin_layout Subsection
14290 The new letter class: letter (koma-script v.2)
14293 \begin_layout Standard
14299 \begin_layout Standard
14300 \begin_inset VSpace medskip
14306 \begin_layout Standard
14308 Koma-Script version 2.8 has introduced a new letter class
14312 which supersedes the now unsupported
14317 It has — on the LaTeX side — a completely new interface and is not compatible
14318 with the old class.
14319 Therefore, LyX supports both, though it is recommended you use the new
14323 \begin_layout Standard
14324 This class covers the same functionality as
14326 letter (koma-script),
14329 The basic items are
14333 (receiver's address, same as
14337 in the old layout),
14350 will start a new letter (i.
14351 \begin_inset space \thinspace{}
14355 \begin_inset space \space{}
14358 you can write several letters per document).
14359 New elements are sender's
14375 and the possibility to use a
14381 Insert\SpecialChar \menuseparator
14387 \begin_layout Standard
14388 The biggest improvement is, though, that the letter's layout is configurable
14389 to meet almost any needs.
14390 This can be done via the preamble or with a special style file (Letter
14391 Class Option, extension
14395 ), that will be read in as a class option.
14399 \begin_layout Plain Layout
14400 The KOMA package comes with some default
14405 There is, for instance, a
14409 file that follows german typesetting rules, or a
14413 that provides the default layout of the old
14418 The latter can be loaded with the class option
14427 ayout\SpecialChar \menuseparator
14432 ocument\SpecialChar \menuseparator
14444 template that is included in LyX for examples.
14445 A detailed description is to be found in the Koma-Script documentation
14453 \begin_layout Subsection
14457 \begin_layout Standard
14458 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14462 \begin_layout Itemize
14463 The chapter number of a
14467 type appears on a line of its own above the chapter heading instead of
14468 appearing in the same line ahead of it.
14469 The cause for that is the LyX internal behavior for the labeltype
14473 in the layout file.
14476 \begin_layout Itemize
14477 The headings of the types
14485 are only put in the
14486 \begin_inset Quotes eld
14490 \begin_inset Quotes erd
14493 LaTeX table of contents, but not in the LyX table of contents (
14495 Document\SpecialChar \menuseparator
14497 \begin_inset space ~
14501 \begin_inset space ~
14509 \begin_layout Itemize
14510 The paragraphs in a
14514 document class appear in a skip separation mode, not indented.
14515 This is the standard behavior, no special LaTeX commands are needed for
14519 Document\SpecialChar \menuseparator
14522 dialog the corresponding radio button indicates
14531 value always has the effect that extra LaTeX commands are inserted in the
14532 document to produce the gap, which is not what is wanted in this case.
14535 \begin_layout Section
14539 \begin_layout Standard
14545 \begin_layout Subsection
14549 \begin_layout Standard
14550 Memoir is a very powerful and constantly evolving class.
14551 It has been designed with regard to fictional and non-fictional literature.
14552 Its aim is to let the user have maximum control over the typesetting of
14554 Memoir is based on the standard book class, but it can also emulate the
14555 article class (see below).
14558 \begin_layout Standard
14559 Peter Wilson, the developer of Memoir, is known as the author of lots of
14560 useful packages in the LaTeX world.
14561 Most of them have been merged with Memoir.
14562 Therefore, it is much easier to layout the table of contents, appendices,
14563 chapter designs and such.
14564 LyX, though, does not support all of these goodies natively.
14565 Some of them might be added to forthcoming releases
14569 \begin_layout Plain Layout
14570 You are invited to send suggestions to
14571 \begin_inset Flex URL
14574 \begin_layout Plain Layout
14576 lyx-devel@lists.lyx.org
14586 , lots will probably never, due to the limitations of LyX's framework.
14587 Of course you can still use all features with the help of some native LaTeX
14592 \begin_layout Plain Layout
14597 \begin_layout Plain Layout
14607 \begin_inset space ~
14611 \begin_inset CommandInset ref
14613 reference "sec:Inserting-TeX-Code"
14623 In this section, we can only list those features which are natively supported
14625 For detailed descriptions (and for the rest of features) we recommend you
14626 have a look at the detailed manual of the Memoir class
14630 \begin_layout Plain Layout
14635 \begin_layout Plain Layout
14645 \begin_inset Flex URL
14648 \begin_layout Plain Layout
14650 CTAN:/macros/latex/memoir/memman.pdf
14660 , which is not only a user guide for the class, but also both a comprehensive
14661 description on good typesetting and a superb example for good typesetting
14665 \begin_layout Subsection
14666 Basic features and restrictions
14669 \begin_layout Standard
14670 Memoir supports basically all features of the standard book classes.
14671 There are, however, some differences, as follows:
14674 \begin_layout Description
14676 \begin_inset space ~
14679 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14682 \begin_layout Description
14684 \begin_inset space ~
14687 style: The fancy page style is not supported, due to a command clash between
14688 Memoir and the fancyhdr package (they both define a command with the same
14689 name, which confuses LaTeX).
14690 Instead, Memoir comes with a number of its own page styles (see
14692 Layout\SpecialChar \menuseparator
14693 Document\SpecialChar \menuseparator
14695 \begin_inset space ~
14701 If you want to use these for the chapter pages, you have to use the command
14708 in the main text or in preamble (e.
14709 \begin_inset space \thinspace{}
14713 \begin_inset space \space{}
14720 chapterstyle{companion}
14725 \begin_layout Description
14726 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14727 optional argument in the standard classes.
14728 With this, you can specify an alternative version of the title for the
14729 table of contents and the headers (for instance, if the title is too long).
14730 In LyX, you can do this via
14732 Insert\SpecialChar \menuseparator
14734 \begin_inset space ~
14739 at the beginning of a chapter/section.
14740 Memoir features a second optional argument and thus separates the table
14741 of contents from the header.
14742 You can define three variants of a title with this: one for the main text,
14743 one for the table of contents, and one for the headers.
14744 Simply insert two optional arguments if you need this feature, the first
14745 one containing the short title for the Table of Contents, the second one
14746 containing an alternative short title for the headers.
14749 \begin_layout Description
14750 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14751 of contents, the list of figures and the list of table start a new page
14753 Memoir does not follow this route.
14754 You have to insert a page break yourself, if you want to have one.
14757 \begin_layout Description
14758 Titlepage: For some unknown reason, Memoir uses pagination on the title
14759 page (in the standard classes, title pages are
14760 \begin_inset Quotes eld
14764 \begin_inset Quotes erd
14768 \begin_inset space \thinspace{}
14772 \begin_inset space \space{}
14776 If you want an empty title page, type
14780 aliaspagestyle{title}{empty}
14785 \begin_layout Description
14786 Article: With the class option
14792 Layout\SpecialChar \menuseparator
14793 Document\SpecialChar \menuseparator
14795 \begin_inset space ~
14800 ), you can emulate article style.
14801 That is, counters (footnotes, figures, tables etc.) will not be reset on
14802 new chapters, chapters don't start a new page (but are—in contrary to
14803 \begin_inset Quotes eld
14807 \begin_inset Quotes erd
14810 article classes—still allowed), parts, though, use their own page, as in
14814 \begin_layout Description
14815 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14816 font commands, which have been used in the old LaTeX version 2.09 (e.
14817 \begin_inset space \thinspace{}
14821 \begin_inset space \space{}
14837 It produces an error and stops LaTeX whenever such a command appears.
14842 reallows the commands and spits out warnings instead (which does at least
14844 Since a lot of packages and particularly BibTeX style files are still using
14845 those commands, we have decided to use this option by default.
14848 \begin_layout Subsection
14852 \begin_layout Standard
14853 We will only describe the features supported by LyX (which is not much currently
14855 Please consult the Memoir manual
14859 \begin_layout Plain Layout
14864 \begin_layout Plain Layout
14874 \begin_inset Flex URL
14877 \begin_layout Plain Layout
14879 CTAN:/macros/latex/memoir/memman.pdf
14892 \begin_layout Description
14893 Abstract: You may wonder why an abstract is an extra feature.
14894 Well, it is in book class.
14895 Usually books don't have abstracts.
14896 Memoir, however, has.
14897 You can use it wherever and how often you like.
14900 \begin_layout Description
14901 Chapterprecis: You may know this older typesetting style: The contents of
14902 a chapter are summarized below the title and also in the table of contents
14904 \begin_inset space \thinspace{}
14908 \begin_inset space \space{}
14913 Our hero arrives in Troia; he loses some friends; he finds others
14916 Chapterprecis does exactly this.
14917 It is therefore only sensible below a chapter.
14920 \begin_layout Description
14921 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14922 The epigraph environment provides an elegant way of typesetting such a
14924 The motto itself (text) and its author (source) are divided by a short
14926 Unfortunately, we have to fool LyX a bit here again, since the environment
14927 needs two arguments (text and source).
14928 In this case, we have to use curly brackets (in TeX mode) between the two
14939 <author of the slogan>.
14942 \begin_layout Description
14943 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14944 complex figurative poems).
14945 LyX can only support a few of them.
14946 One is poemtitle, which is a centered title for poems, which will also
14947 be added to the table of contents (verse is the standard environment for
14949 Memoir has some enhanced versions of verse, but you need to use TeX code,
14950 because they have to be nested inside regular verse environments, which
14951 is not possible with LyX).
14954 \begin_layout Description
14955 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14958 \begin_layout Section
14959 Article (mwart), book (mwbk) and report (mwrep)
14960 \begin_inset Argument
14963 \begin_layout Plain Layout
14976 \begin_layout Standard
14982 \begin_layout Standard
14983 The LyX document classes
14999 correspond to the LaTeX document classes
15012 They are replacements for the standard document classes
15024 , resp., and fit better to Polish typography conventions in a number of points.
15028 \begin_layout Standard
15032 \begin_layout Itemize
15033 Unnumbered titles (with star, e.
15034 \begin_inset space \thinspace{}
15038 \begin_inset space \space{}
15045 ) are added into table of contents,
15048 \begin_layout Itemize
15049 Additional page styles:
15053 \begin_layout Description
15054 uheadings header with separated lines,
15057 \begin_layout Description
15058 myheadings custom header, contents headers via commands:
15073 \begin_layout Description
15074 myuheadings custom header with separated lines,
15077 \begin_layout Description
15078 outer page number is placed on outer side of page
15082 \begin_layout Itemize
15087 \begin_layout Description
15088 rmheadings serif titles — default,
15091 \begin_layout Description
15092 sfheadings sansserif titles,
15095 \begin_layout Description
15096 authortitle on title page first placed is author next title — default,
15099 \begin_layout Description
15100 titleauthor on title page first placed is title next author,
15103 \begin_layout Description
15104 withmarginpar reserve place on page for margins.
15108 \begin_layout Section
15112 \begin_layout Standard
15117 provides an alternative to the standard
15122 It provides similar functionality, but you might prefer this layout with
15123 sans serif sections, headings, and more.
15126 \begin_layout Section
15130 \begin_layout Standard
15136 \begin_layout Standard
15137 \begin_inset VSpace bigskip
15143 \begin_layout Standard
15148 \begin_inset space ~
15153 textclass works with the American Physical Sociey's RevTeX 4.0 (the
15154 \begin_inset Formula $\beta$
15157 release of May, 1999) class.
15160 \begin_layout Standard
15165 textclass, which works with RevTeX 3.1.
15166 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15167 That means that it doesn't interact very well with LyX, which requires
15168 LaTeX2e, although it has been kludged to work.
15169 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15173 \begin_inset space ~
15178 textclass should also be pretty easy to use.
15181 \begin_layout Standard
15182 These documents are supposed to be used in
15186 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15187 macros, and assume you'll know what to put in the preamble if necessary.
15190 \begin_layout Subsection
15194 \begin_layout Standard
15195 All you need to do is install RevTeX 4, as described in the package's README
15197 The package can be found at The RevTeX 4 Web Site
15198 \begin_inset Flex URL
15201 \begin_layout Plain Layout
15203 http://publish.aps.org/revtex4/
15209 Install it somewhere that LaTeX can see it.
15210 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15212 \begin_inset space \thinspace{}
15216 \begin_inset space \space{}
15219 not the directory where you installed the class file.) Then, if you reconfigure
15220 LyX, it will find the class file and let you use the RevTeX4 textclass.
15223 \begin_layout Standard
15224 Probably the easiest way to get started is either to import a RevTeX 4 document
15232 \begin_inset space ~
15237 template, found in the templates directory.
15240 \begin_layout Subsection
15244 \begin_layout Standard
15245 Optional arguments to
15252 \begin_inset Quotes eld
15256 \begin_inset Quotes erd
15260 \begin_inset Quotes eld
15264 \begin_inset Quotes erd
15274 \begin_inset space ~
15282 \begin_inset space ~
15288 Remember that in RevTeX, at least one optional argument is required!
15291 \begin_layout Standard
15292 Other preamble matter, like
15299 \begin_inset space ~
15305 \begin_inset space ~
15310 dialog, also as usual.
15313 \begin_layout Subsection
15317 \begin_layout Standard
15318 The layouts basically correspond to the commands in RevTeX4.0.
15319 For example, the Email layout corresponds to
15326 Note that (at least as of RevTeX 4.0 Beta), the
15334 layouts are exactly equivalent, so you shouldn't need to use both.
15338 \begin_layout Plain Layout
15339 In case you're curious, both were included so that
15343 would be able to translate both
15363 \begin_layout Subsection
15367 \begin_layout Standard
15368 There are a couple of important unique aspects of RevTeX 4 which might cause
15369 bugs that will be even more confusing in LyX.
15372 \begin_layout Standard
15390 The LyX equivalent is that there is a separate Thanks layout.
15395 write footnotes in the
15399 layout, or weird things may happen.
15400 See the RevTeX 4 documentation for more details.
15403 \begin_layout Standard
15407 \begin_inset space ~
15415 \begin_inset space ~
15424 layouts must be placed
15432 layout and the corresponding
15449 , the LaTeX won't compile.
15452 \begin_layout Subsection
15456 \begin_layout Standard
15457 The main problem with this layout is that you can't use the optional arguments
15458 to layouts like Email and Title.
15459 (The problem is not unique to this layout; you can't use optional arguments
15460 to the Section layouts either.) This means that after you export that file
15461 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15462 need to edit the LaTeX file with a text editor to add the optional arguments
15464 \begin_inset space \thinspace{}
15468 \begin_inset space \space{}
15471 the running title for the page headers.
15472 Lacking these layouts makes the
15478 (and the equivalent
15484 ) useless, so the corresponding layouts don't exist, and will have to be
15489 \begin_layout Plain Layout
15494 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15495 has not been updated yet to take advantage of it.
15503 \begin_layout Section
15504 Springer Journals (
15511 \begin_layout Standard
15517 \begin_layout Subsection
15521 \begin_layout Standard
15522 These are the layout files for some of the journal formats used by Springer
15523 Verlag and listed on
15524 \begin_inset Flex URL
15527 \begin_layout Plain Layout
15529 http://www.springer.de/author/tex/help-journals.html
15534 , where you should also go to fetch the class files (yes, these are LaTeX2e
15536 It is a modular system: the things common to all journals are implemented
15541 , which journal-specific layout files (such as, e.
15542 \begin_inset space \thinspace{}
15546 \begin_inset space \space{}
15553 for Journal of Geodesy) can include.
15556 \begin_layout Standard
15557 This means that implementing support for any other Springer journal on this
15558 list is as simple as writing your own
15566 file following the outline given in
15574 \begin_layout Standard
15575 It is reasonably well tested only for the Journal of Geodesy.
15584 come with the standard LyX distribution.
15585 Install the relevant class file (downloaded from Springer) in a proper
15586 directory, reconfigure LaTeX (in the teTeX case by running
15590 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15591 and it should work.
15594 \begin_layout Subsection
15598 \begin_layout Standard
15599 A large number of theorem-like styles —
15605 \SpecialChar \ldots{}
15611 \begin_layout Standard
15614 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15615 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15618 See the Springer class file documentation for details.
15621 \begin_layout Subsection
15625 \begin_layout Itemize
15637 \begin_layout Itemize
15640 Probability Theory and Related Fields
15646 — Jean-Marc Lasgouttes
15649 \begin_layout Standard
15650 Add your own, it isn't so hard!
15653 \begin_layout Subsection
15657 \begin_layout Standard
15658 These files are partly based on the older
15662 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15663 file from Springer.
15668 layout, are now defunct.
15669 Jean-Marc Lasgouttes helped out big in making me find my way around the
15670 LyX layout file mechanism.
15673 \begin_layout Subsection
15677 \begin_layout Standard
15679 But probably less than in the old hacked-LaTeX
15686 \begin_layout Standard
15688 \begin_inset space \thinspace{}
15691 g.: does not display the number for theorem-like layouts, just #.
15694 \begin_layout Section
15700 \begin_inset CommandInset label
15709 \begin_layout Standard
15717 \begin_layout Subsection
15721 \begin_layout Standard
15722 This section describes how to use LyX to make slides for overhead projectors.
15723 There are two document classes that can do this: the default slides class
15729 This section documents the former.
15732 \begin_layout Standard
15733 I'm going to say this again, nice and clear, so that there's no misunderstanding
15737 \begin_layout Standard
15738 \begin_inset VSpace bigskip
15744 \begin_layout Standard
15748 This section documents the class
15749 \begin_inset Quotes eld
15757 \begin_inset Quotes erd
15765 \begin_layout Standard
15766 \begin_inset VSpace bigskip
15772 \begin_layout Standard
15773 If you're looking for the documentation for
15774 \begin_inset Quotes eld
15782 \begin_inset Quotes erd
15785 , check out section
15786 \begin_inset space ~
15790 \begin_inset CommandInset ref
15792 reference "sec:foiltex"
15802 \begin_inset Quotes eld
15810 \begin_inset Quotes erd
15813 ] is actually somewhat better than the default
15821 \begin_layout Plain Layout
15822 \SpecialChar \ldots{}
15823 or so I've been told repeatedly by its advocates.
15824 Having never used it, I have no idea if this claim is true or not.
15829 which this section documents.
15832 \begin_layout Standard
15833 This class is the LaTeX2e improvement of the old
15838 Every LaTeX2e distribution includes this class [which I'll just refer to
15840 \begin_inset Quotes eld
15848 \begin_inset Quotes erd
15851 from now on], so you're bound to have it.
15852 As I noted earlier, there are other classes, such as
15856 , which also produce slides for overhead projectors and do a better job
15858 However, there are some things which
15862 can do which the others can't, such as generate overlays.
15863 Read on to learn more!
15866 \begin_layout Subsection
15868 \begin_inset CommandInset label
15870 name "sec:slidesetup"
15877 \begin_layout Standard
15878 Obviously, to use this document class, you need to select
15879 \begin_inset Quotes eld
15887 \begin_inset Quotes erd
15890 from the class list in the
15892 Document\SpecialChar \menuseparator
15896 There are some other special things you should know about this class:
15899 \begin_layout Itemize
15900 Don't bother changing the options
15905 They're not supported by the
15912 \begin_layout Itemize
15916 \begin_inset space ~
15921 behaves a bit differently for this class.
15922 The possible choices and what they do are as follows:
15926 \begin_layout Description
15931 The final output contains page numbers in the lower right corner.
15934 \begin_layout Description
15943 , but also prints out any time markers you've put in.
15944 This is the default.
15947 \begin_layout Description
15952 The final output contains no page numbers, time markers, or alignment markers.
15956 \begin_layout Itemize
15961 class has an extra option:
15967 \begin_inset Quotes eld
15975 \begin_inset Quotes erd
15978 in the extra class options.
15982 \begin_layout Standard
15983 Using this options allows you to add time markers to
15989 \begin_inset space ~
15993 \begin_inset CommandInset ref
15995 reference "sec:slideNote"
16003 \begin_layout Standard
16004 You can also use the template file
16005 \begin_inset Quotes eld
16013 \begin_inset Quotes erd
16016 to automatically set up a document to use the
16022 File\SpecialChar \menuseparator
16024 \begin_inset space ~
16028 \begin_inset space ~
16033 to open your new document].
16034 The template file also contains some examples of the special paragraph
16035 environments used by this class.
16036 I'll describe those next.
16039 \begin_layout Subsection
16040 Paragraph Environments
16043 \begin_layout Subsubsection
16044 Supported Environments
16047 \begin_layout Standard
16048 The first thing you'll notice when you start up a new
16052 document is the font size and type: it's the equivalent of the size
16053 \begin_inset Quotes eld
16061 \begin_inset Quotes erd
16067 \begin_inset space ~
16073 This is also what's used in the output.
16075 \begin_inset Quotes eld
16079 \begin_inset Quotes erd
16082 to remind you that this is a slide.
16083 Your final slides will use a larger font; ergo, you'll have less space.
16084 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16087 \begin_layout Standard
16088 The next thing that becomes obvious is the changes to the paragraph environment
16089 pull-down box [at the far-left end of the toolbar].
16090 Most of the paragraph environments you're used to seeing are missing.
16091 There are also five new ones.
16096 class itself only supports certain paragraph environments:
16099 \begin_layout Itemize
16105 \begin_layout Itemize
16111 \begin_layout Itemize
16117 \begin_layout Itemize
16123 \begin_layout Itemize
16129 \begin_layout Itemize
16135 \begin_layout Itemize
16141 \begin_layout Itemize
16147 \begin_layout Itemize
16153 \begin_layout Itemize
16159 \begin_layout Itemize
16165 \begin_layout Standard
16166 All of the other standard environments, including the section-heading environmen
16167 ts, aren't used in the
16174 \begin_layout Standard
16175 On the other hand, you'll notice the following new environments:
16178 \begin_layout Itemize
16184 \begin_layout Itemize
16190 \begin_layout Itemize
16196 \begin_layout Itemize
16202 \begin_layout Itemize
16208 \begin_layout Standard
16209 These five are kind of quirky, due to a
16210 \begin_inset Quotes eld
16214 \begin_inset Quotes erd
16218 You see, LyX doesn't permit you to nest any other paragraph environment
16219 into an empty environment.
16220 Now, that's fine and dandy, but it means that you wouldn't be able to start
16221 a slide with anything except plain text.
16222 To deal with this, I've performed a little
16223 \begin_inset Quotes eld
16227 \begin_inset Quotes erd
16233 \begin_layout Subsubsection
16234 Quirks of the New Environments
16235 \begin_inset CommandInset label
16237 name "sec:slideQuirk"
16244 \begin_layout Standard
16245 All five of the new paragraph environments are somewhat quirky due to inherent
16246 limitiations in the current version of LyX.
16247 As I just mentioned, LyX forbids environments that begin with another environme
16249 To get around this, the
16253 environment isn't a paragraph environment as described in the
16261 \begin_layout Standard
16262 You should consider
16275 \begin_inset Quotes eld
16278 pseudo-environments.
16279 \begin_inset Quotes erd
16282 They look like a section heading or a
16283 \begin_inset Quotes eld
16291 \begin_inset Quotes erd
16294 but really begin a [and, if necessary, end the previous] paragraph environment.
16304 \begin_inset Quotes eld
16308 \begin_inset Quotes erd
16311 These two perform some action.
16314 \begin_layout Standard
16315 A common feature of all five environments,
16335 , is a rather long-ish label.
16336 The text following this label — ordinarily the contents of the paragraph
16337 environment — is utterly irrelevant for
16358 LyX completely ignores it.
16359 In fact, you can leave these five environments completely empty.
16363 \begin_layout Standard
16368 to put any text after the rather long-ish label, you might want to.
16369 This could be a short description of the contents of the
16374 In that case, enter your descriptive comment and hit
16378 as you normally would.
16381 \begin_layout Standard
16382 If, on the other hand, you don't want to enter any descriptive text, you'll
16383 hit another LyX quirk.
16384 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16385 environment until you put something in the old one.
16389 \begin_layout Itemize
16390 Start entering the text that will
16418 \begin_layout Itemize
16419 Now move to the beginning of that paragraph.
16423 \begin_layout Itemize
16432 \begin_layout Itemize
16433 Finally, change this new, empty paragraph to a
16457 \begin_layout Standard
16458 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16462 \begin_layout Subsection
16463 Making a Presentation with
16476 \begin_layout Subsubsection
16484 \begin_layout Standard
16485 If you're expecting this section to teach you how to actually make a presentatio
16486 n, you'll be sorely disappointed.
16487 Naturally, I'll describe all of the ways the
16491 class can assist you in preparing the materials for a presentation.
16492 Filling in the contents, however, is up to you.
16497 the LyX philosophy.]
16500 \begin_layout Standard
16505 environment [in the manner described in section
16506 \begin_inset space ~
16510 \begin_inset CommandInset ref
16512 reference "sec:slideQuirk"
16516 ] tells LyX to begin a new slide [duh].
16517 The label for this environment/
16518 \begin_inset Quotes erd
16522 \begin_inset Quotes erd
16526 \begin_inset Quotes eld
16530 \begin_inset Quotes erd
16533 in cool blue, followed by the label,
16534 \begin_inset Quotes eld
16538 \begin_inset Quotes erd
16542 Any text or paragraph environments that follow this one go on the new slide.
16546 \begin_layout Standard
16547 Slides are probably the only time you'll need to forcibly end pages in LyX
16548 (this can be specified in the
16553 In fact, you'll want to, once you finish entering the contents of one slide.
16554 If you've entered more text than can physically fit on a slide, the extra
16555 overflows onto a new slide.
16556 I don't recommend doing this, however, since the overflow slide won't have
16557 any page number on it.
16558 Furthermore, it may interfere with any
16562 you've made to accompany the oversized
16569 \begin_layout Standard
16578 environments work the same way as the
16583 They both create an
16584 \begin_inset Quotes eld
16588 \begin_inset Quotes erd
16591 followed by a label [
16592 \begin_inset Quotes eld
16596 \begin_inset Quotes erd
16600 \begin_inset Quotes eld
16604 \begin_inset Quotes erd
16608 The color is a stunning magenta instead of blue, and the
16609 \begin_inset Quotes eld
16613 \begin_inset Quotes erd
16616 will look different, in style and in length.
16617 The label fonts of all three also differ from one another.
16620 \begin_layout Standard
16625 , if the contents of a
16633 exceed the physical size of a slide or sheet of paper, the extra will overflow
16635 Again, you should avoid this.
16636 It defeats the whole purpose of
16647 \begin_layout Subsubsection
16657 \begin_layout Standard
16662 is a slide that sits atop another slide.
16663 Perhaps you wish to discuss a figure on the main
16667 before displaying the text associated with it.
16668 One way to accomplish this is tape a flap of dark paper over the part of
16673 you want to display later.
16674 This method fails, however, if you wish to overlap one graph with another,
16676 You would then have to fumble while speaking to align the two separate,
16681 s to align the two graphs.
16686 environment in both cases makes life much easier.
16689 \begin_layout Standard
16694 receives the page number of its
16695 \begin_inset Quotes eld
16699 \begin_inset Quotes erd
16707 \begin_inset Quotes eld
16715 \begin_inset Quotes erd
16722 \begin_layout Plain Layout
16723 Presumably, mutliple
16728 \begin_inset Quotes eld
16736 \begin_inset Quotes erd
16740 \begin_inset Quotes eld
16748 \begin_inset Quotes erd
16752 \begin_inset Quotes eld
16760 \begin_inset Quotes erd
16764 \begin_inset space ~
16767 appended to the page number of the parent
16777 Clearly, you want the contents of both the
16785 to each fit on a single physical slide! You should probably consider an
16791 \begin_inset Quotes eld
16795 \begin_inset Quotes erd
16807 class provides a visual cue for this: the label at the start of an
16811 is shorter than that at the start of a
16816 Lastly, when you generate printable output, you'll find alignment markers
16817 in all four corners of both the
16821 page and its parent
16826 These will assist you in lining up the two physical slides.
16829 \begin_layout Standard
16830 The major problem in overlaying two slides is aligning the contents of the
16831 two transparencies.
16832 How much space should you leave for that graph on the second slide? Worse
16833 still, what if you want a graph and a sentence on second slide, but there
16834 is text on the main transparency that goes in between them? You could try
16835 and insert vertical space of the right size.
16836 The better way is to use
16847 \begin_layout Standard
16848 As their names imply,
16856 are two command-like paragraph environments that make all subsequent text
16857 invisible and visible, respectively.
16859 \begin_inset space ~
16863 \begin_inset CommandInset ref
16865 reference "sec:slideQuirk"
16869 that you don't place anything
16873 these two environments, however.
16878 , it inserts a centered, sky-blue label into the page reading
16879 \begin_inset Quotes eld
16882 <Invisible Text Follows>
16883 \begin_inset Quotes erd
16887 For paragraphs following this label, the parts of the
16895 ; it doesn't matter which] where they would be contain instead blank space.
16899 \begin_layout Standard
16904 , the corresponding centered label is
16905 \begin_inset Quotes eld
16908 <Visible Text Follows>
16909 \begin_inset Quotes erd
16913 Paragraphs following this label behave normally.
16914 Note that the beginning of a new
16926 automatically shuts off an
16931 It's therefore not necessary to use
16942 \begin_layout Standard
16943 By now, it should be obvious how to create overlay transparencies using
16944 the proper combination of
16963 \begin_layout Enumerate
16968 , including everything that will appear on it, whether on the main slide
16976 \begin_layout Enumerate
16977 Before each figure or paragraph that will appear only on the
16986 If necessary, insert a
16990 environment after the
16997 \begin_layout Enumerate
17002 immediately following the
17009 \begin_layout Enumerate
17010 Copy the contents of this
17021 \begin_layout Enumerate
17026 , change all of the
17037 \begin_layout Standard
17039 You've just made an
17046 \begin_layout Standard
17047 There's one problem with the way I've designed the LyX
17051 class: you can't make text in the middle of a paragraph invisible, nor
17052 make text in the middle of an invisible paragraph visible again.
17053 To accomplish this feat, you'll need to use some inlined LaTeX codes.
17057 \begin_layout Plain Layout
17058 The commands of interest are:
17061 \begin_layout Itemize
17066 invisible \SpecialChar \ldots{}
17070 \begin_layout Itemize
17075 visible \SpecialChar \ldots{}
17079 \begin_layout Plain Layout
17080 \SpecialChar \ldots{}
17081 and need to be marked as TeX.
17083 \begin_inset Quotes eld
17087 \begin_inset Quotes erd
17090 you wish to change goes in between the brackets [and after the
17103 If you don't know how to mark text as TeX, see the appropriate section
17116 \begin_layout Subsubsection
17126 \begin_inset CommandInset label
17128 name "sec:slideNote"
17135 \begin_layout Standard
17144 is associated with a
17145 \begin_inset Quotes eld
17149 \begin_inset Quotes erd
17161 class provides visual cues.
17166 is shorter than that of a
17170 [yet longer than that of an
17174 ] and, like the label of an
17178 is shockingly magenta.
17179 Additionally, the printed
17183 has the page number of its
17184 \begin_inset Quotes eld
17188 \begin_inset Quotes erd
17196 \begin_inset Quotes eld
17204 \begin_inset Quotes erd
17208 \begin_inset Quotes eld
17216 \begin_inset Quotes erd
17220 \begin_inset Quotes eld
17228 \begin_inset Quotes erd
17232 You can have multiple
17236 s associated with a single
17248 , you'll probably want to break up long
17252 s so that they fit on a single sheet of paper.
17255 \begin_layout Standard
17260 is obvious: it contains anything additional you might want to say about
17266 It could also be used as a sheet of reminders for a particular
17271 In the case of the latter, you might want to make use of time markers.
17277 \begin_inset Quotes eld
17281 \begin_inset Quotes erd
17284 support for time markers, a
17289 So, you'll have to resort to using the LaTeX codes.
17292 \begin_layout Standard
17293 To use time markers, you'll need to specify the extra class option
17294 \begin_inset Quotes eld
17302 \begin_inset Quotes erd
17306 \begin_inset space ~
17310 \begin_inset CommandInset ref
17312 reference "sec:slidesetup"
17317 This option turns on timing marks, which will appear in the lower-left-hand
17323 To set what appears in the time marker, you use the LaTeX commands
17324 \begin_inset Quotes eld
17334 \begin_inset Quotes erd
17338 \begin_inset Quotes eld
17348 \begin_inset Quotes erd
17352 The arguments of both commands are time measured in seconds.
17354 \begin_inset Quotes eld
17364 \begin_inset Quotes erd
17367 sets the time marker to a given time.
17369 \begin_inset Quotes eld
17379 \begin_inset Quotes erd
17382 increments the time marker by the specified amount.
17383 Using time markers and
17387 s in this fashion, you can remind yourself how much time to spend on a particula
17395 \begin_layout Standard
17396 There's one last feature to describe.
17397 Clearly, you'd like to print out all of your
17405 s on transparencies while printing all of your
17422 with which it is associated.
17423 What's a person to do?
17426 \begin_layout Standard
17427 Luckily, there are two LaTeX commands that allow you to select what to print
17429 Both must be placed into the preamble of your document.
17431 \begin_inset Quotes eld
17443 \begin_inset Quotes erd
17446 will cause the output to contain only the
17455 Correspondingly, the command
17456 \begin_inset Quotes eld
17468 \begin_inset Quotes erd
17471 prevents the output of anything but
17476 I'd advise placing both commands in the preamble and initially comment
17478 You can then preview your entire presentation as you write.
17479 When you're done writing, you can then uncomment one of the two to select
17480 what you want to print.
17481 I like to uncomment
17482 \begin_inset Quotes eld
17494 \begin_inset Quotes erd
17497 , print to a file with
17498 \begin_inset Quotes eld
17506 \begin_inset Quotes erd
17509 in its name, comment it back out, then uncomment
17510 \begin_inset Quotes eld
17522 \begin_inset Quotes erd
17526 \begin_inset Quotes eld
17534 \begin_inset Quotes erd
17538 I can then send either file to a printer, loading transparencies or plain
17539 paper as appropriate.
17542 \begin_layout Standard
17543 You can also provide other arguments to the
17544 \begin_inset Quotes eld
17554 \begin_inset Quotes erd
17558 \begin_inset Quotes eld
17568 \begin_inset Quotes erd
17572 See a good LaTeX book for details.
17575 \begin_layout Subsection
17580 Class Template File
17583 \begin_layout Standard
17584 I have also provided a template file,
17585 \begin_inset Quotes eld
17593 \begin_inset Quotes erd
17601 To use it, begin your new presentation with
17606 ile\SpecialChar \menuseparator
17608 \begin_inset space ~
17612 \begin_inset space ~
17622 Your new LyX presentation file will contain an example
17643 additionally contain an example of the use of
17652 Lastly, the preamble will contain:
17655 \begin_layout LyX-Code
17656 % Uncomment to print out only slides and overlays
17659 \begin_layout LyX-Code
17663 \begin_layout LyX-Code
17669 \begin_inset Newline newline
17675 \begin_layout LyX-Code
17676 % Uncomment to print out only notes
17679 \begin_layout LyX-Code
17683 \begin_layout LyX-Code
17691 \begin_layout Standard
17692 One final thing: I created this class to support the LaTeX2e
17693 \begin_inset Quotes eld
17701 \begin_inset Quotes erd
17704 class, one of the built-in LaTeX2e classes.
17705 Neither I nor the rest of the LyX Team endorse or oppose the use of this
17706 built-in slide class.
17707 It's here if you want it or need it.
17708 There exist other LaTeX2e classes for creating presentations, such as the
17714 \begin_inset space ~
17718 \begin_inset CommandInset ref
17720 reference "sec:foiltex"
17725 \begin_inset Quotes eld
17733 \begin_inset Quotes erd
17736 package [present on some TeX distributions].
17737 The latter is not yet supported under LyX.
17741 \begin_layout Plain Layout
17742 Perhaps you can take on the task\SpecialChar \ldots{}
17748 I know nothing about these other classes.
17749 Try them out to see what sort of alternative they provide.
17752 \begin_layout Chapter
17753 LyX Features needing Extra Software
17756 \begin_layout Section
17760 \begin_layout Standard
17766 \begin_layout Subsection
17770 \begin_layout Standard
17779 \begin_layout Plain Layout
17784 is not yet available when you are using the LaTeX distribution MiKTeX.
17789 , you'll find in the
17796 \begin_inset space ~
17807 \begin_inset CommandInset href
17809 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17816 \begin_layout Standard
17821 package is a program that was written by
17822 \begin_inset Flex Noun
17825 \begin_layout Plain Layout
17827 \begin_inset space ~
17835 in frustration because some constructs in LaTeX are sometimes non-intuitive,
17836 and easy to forget.
17837 The program runs over your LaTeX file, checks the integrity of the file,
17838 and flags some common errors.
17839 In other technical words, it is
17846 \begin_layout Standard
17847 Well, what is a syntax checker doing in LyX which is supposed to produce
17848 correct LaTeX anyways? The answer is simple: Just as
17852 not only checks the
17856 of C programs, but also does
17860 checks for type-errors,
17864 catches some common
17868 errors, in addition to the syntactical ones.
17873 is capable of detecting several common errors, such as
17876 \begin_layout Itemize
17877 Ellipsis detection:
17878 \begin_inset Newline newline
17881 Use \SpecialChar \ldots{}
17885 \begin_layout Itemize
17886 No space in front of/after parenthesis:
17887 \begin_inset Newline newline
17893 \begin_layout Itemize
17894 Enforcement of normal space after common abbreviations:
17895 \begin_inset Newline newline
17899 \begin_inset space \thinspace{}
17903 \begin_inset space \space{}
17906 is too wide spacing.
17909 \begin_layout Itemize
17910 Enforcement of end-of-sentence space when the last sentence ends with a
17912 \begin_inset Newline newline
17916 And this is wrong spacing.
17919 \begin_layout Itemize
17920 Space in front of labels and similar commands:
17921 \begin_inset Newline newline
17924 The label should stick right up to the text to avoid falling to a wrong
17927 \begin_inset CommandInset label
17937 \begin_layout Plain Layout
17938 This footnote is in danger of falling off to a wrong page
17943 The label is separated too much.
17946 \begin_layout Itemize
17947 Space in front of references, instead of hard spaces:
17948 \begin_inset Newline newline
17951 In you are in bad luck, the text will break right between the referenced
17952 text and reference number, and that's a pity.
17954 \begin_inset CommandInset ref
17956 reference "sec:chktex"
17963 \begin_layout Itemize
17965 \begin_inset Quotes eld
17969 \begin_inset Quotes erd
17973 \begin_inset Formula $\times$
17977 \begin_inset Newline newline
17980 2x2 looks cheap compared to
17981 \begin_inset Formula $2\times2$
17987 \begin_layout Standard
17988 and more \SpecialChar \ldots{}
17989 It is an invaluable tool when you are
17990 \begin_inset Quotes eld
17994 \begin_inset Quotes erd
17997 your document before printing, and you should run it right after the obligatory
17998 spelling check, and before you go fine tuning the typesetting.
18001 \begin_layout Subsection
18005 \begin_layout Standard
18006 If you have the program installed, usage is as simple as choosing
18008 Tools\SpecialChar \menuseparator
18010 \begin_inset space ~
18016 This will make LyX generate a LaTeX file of your document, start
18020 to check it, and then make LyX insert
18021 \begin_inset Quotes eld
18025 \begin_inset Quotes erd
18028 with the warnings from
18032 , if there were any.
18033 The warnings will be placed close to the point of the mistake, and you
18034 can quickly find them by using the
18036 Navigate\SpecialChar \menuseparator
18039 menu item, or the shortcut key
18048 Open the error boxes by clicking on them with the mouse, or use the shortcut
18057 bindings, or the corresponding
18066 Read the warning and correct the mistake, if it is a mistake.
18067 If you have trouble understanding what the warning is about, you can safely
18069 Remember that there is a hidden layer between the document on screen and
18070 the technical details in invoking
18074 , and this gap can make some warnings seem arcane or just right down plain
18078 \begin_layout Standard
18079 This document is an excellent testing bed for the feature, and it should
18080 provide quite a few warnings for you to fiddle with.
18081 Since computers are only so smart, expect most of the warnings to be false
18085 \begin_layout Subsection
18086 How to fine tune it
18089 \begin_layout Standard
18090 Sometimes, you'll find that
18094 makes more noise than suits your mood.
18095 Then you can choose not to use it, wait until your mood changes, or try
18100 to get better along with you.
18103 \begin_layout Standard
18112 very configurable and extensible, you shouldn't expect to solve all problems
18118 Since LyX has to generate a somewhat special LaTeX file to be able to match
18119 the line numbers from the
18127 \begin_layout Plain Layout
18128 You can inspect the specific output from
18134 Edit\SpecialChar \menuseparator
18136 \begin_inset space ~
18140 \begin_inset space ~
18154 to the internal document structure, some of the warnings will not seen
18155 to appear correctly.
18156 There are two things you can do about this:
18159 \begin_layout Itemize
18164 invocation command line in
18180 installation configuration file (usually with the file
18185 See below to learn what warnings can be enabled and disabled on the command
18190 \begin_layout Itemize
18191 Export your document as a raw LaTeX file using
18193 File\SpecialChar \menuseparator
18194 Export\SpecialChar \menuseparator
18202 Invoked in this way, it can be a hassle to find the corresponding place
18203 in the document inside LyX, but with a little patience, you should be able
18207 \begin_layout Standard
18208 Here follows the warning messages that can be enabled and disabled in
18217 to disable a warning, and
18221 to enable a warning.
18222 The emphasized entries are disabled by default, because the default is
18225 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18230 \begin_layout Standard
18231 Notice that you should only use the options that enable and disable warnings,
18232 because LyX relies on some of the other command line parameters to be set
18233 in a specific way to have a chance to communicate with
18240 \begin_layout Enumerate
18244 Command terminated with space.
18247 \begin_layout Enumerate
18250 Non-breaking space (
18251 \begin_inset Quotes eld
18259 \begin_inset Quotes erd
18262 ) should have been used.
18265 \begin_layout Enumerate
18269 You should enclose the previous parenthesis with
18270 \begin_inset Quotes eld
18278 \begin_inset Quotes erd
18284 \begin_layout Enumerate
18287 Italic correction (
18288 \begin_inset Quotes eld
18298 \begin_inset Quotes erd
18301 ) found in non-italic buffer.
18304 \begin_layout Enumerate
18307 Italic correction (
18308 \begin_inset Quotes eld
18318 \begin_inset Quotes erd
18321 ) found more than once.
18324 \begin_layout Enumerate
18328 No italic correction (
18329 \begin_inset Quotes eld
18339 \begin_inset Quotes erd
18345 \begin_layout Enumerate
18349 \begin_inset Quotes eld
18357 \begin_inset Quotes erd
18361 \begin_inset Quotes eld
18369 \begin_inset Quotes erd
18375 \begin_layout Enumerate
18378 Wrong length of dash may have been used.
18381 \begin_layout Enumerate
18385 \begin_inset Quotes eld
18393 \begin_inset Quotes erd
18397 \begin_inset Quotes eld
18405 \begin_inset Quotes erd
18411 \begin_layout Enumerate
18415 \begin_inset Quotes eld
18423 \begin_inset Quotes erd
18429 \begin_layout Enumerate
18433 \begin_inset Quotes eld
18441 \begin_inset Quotes erd
18444 to achieve an ellipsis.
18447 \begin_layout Enumerate
18450 Inter-word spacing (
18451 \begin_inset Quotes eld
18461 \begin_inset Quotes eld
18464 ) should perhaps be used.
18467 \begin_layout Enumerate
18470 Inter-sentence spacing (
18471 \begin_inset Quotes eld
18481 \begin_inset Quotes erd
18484 ) should perhaps be used.
18487 \begin_layout Enumerate
18490 Could not find argument for command.
18493 \begin_layout Enumerate
18497 \begin_inset Quotes eld
18505 \begin_inset Quotes erd
18511 \begin_layout Enumerate
18514 Math mode still on at end of LaTeX file.
18517 \begin_layout Enumerate
18521 \begin_inset Quotes eld
18529 \begin_inset Quotes erd
18532 doesn't match the number of
18533 \begin_inset Quotes eld
18541 \begin_inset Quotes erd
18547 \begin_layout Enumerate
18550 You should use either
18553 \begin_inset Quotes eld
18561 \begin_inset Quotes erd
18566 as an alternative to
18567 \begin_inset Quotes eld
18575 \begin_inset Quotes erd
18581 \begin_layout Enumerate
18588 " (ASCII 39) instead of "
18595 \begin_layout Enumerate
18598 User-specified pattern found.
18601 \begin_layout Enumerate
18604 This command might not be intended.
18607 \begin_layout Enumerate
18614 \begin_layout Enumerate
18632 \begin_layout Enumerate
18635 Delete this space to maintain correct page references.
18638 \begin_layout Enumerate
18642 You might wish to put this between a pair of
18643 \begin_inset Quotes eld
18651 \begin_inset Quotes erd
18657 \begin_layout Enumerate
18660 You ought to remove spaces in front of punctuation.
18663 \begin_layout Enumerate
18666 Could not execute LaTeX command.
18669 \begin_layout Enumerate
18678 in front of small punctuation.
18681 \begin_layout Enumerate
18689 may look prettier here.
18692 \begin_layout Enumerate
18696 Multiple spaces detected in output.
18699 \begin_layout Enumerate
18702 This text may be ignored.
18705 \begin_layout Enumerate
18711 \begin_inset Quotes eld
18716 to begin quotation, not
18723 \begin_layout Enumerate
18730 to end quotation, not
18733 \begin_inset Quotes eld
18741 \begin_layout Enumerate
18747 \begin_layout Enumerate
18750 You should perhaps use
18751 \begin_inset Quotes eld
18759 \begin_inset Quotes erd
18765 \begin_layout Enumerate
18768 You should put a space in front of/after parenthesis.
18771 \begin_layout Enumerate
18774 You should avoid spaces in front of/after parenthesis.
18777 \begin_layout Enumerate
18781 You should not use punctuation in front of/after quotes.
18784 \begin_layout Enumerate
18787 Double space found.
18790 \begin_layout Enumerate
18793 You should put punctuation outside inner/inside display math mode.
18796 \begin_layout Enumerate
18799 You ought to not use primitive TeX in LaTeX code.
18802 \begin_layout Enumerate
18805 You should remove spaces in front of
18806 \begin_inset Quotes eld
18814 \begin_inset Quotes erd
18820 \begin_layout Enumerate
18823 \begin_inset Quotes eld
18831 \begin_inset Quotes erd
18834 is normally not followed by
18835 \begin_inset Quotes eld
18843 \begin_inset Quotes erd
18849 \begin_layout Standard
18850 In later versions of LyX, we hope to provide a more complete interface to
18851 this tool (and it's smaller cousin
18855 ) to exploit the full power of it.
18856 But it's not exactly useless as it is now: go try it on one of your existing
18857 documents of a certain length and be surprised.
18860 \begin_layout Section
18861 Version Control in LyX
18864 \begin_layout Standard
18867 Lars Gullik Bjønnes
18874 \begin_layout Subsection
18878 \begin_layout Standard
18879 A friend of mine wanted to try LyX for a group project.
18880 When he didn't find support for version control or file locking, he dropped
18882 This angered me a bit, so I thought that I should at least make support
18883 for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
18884 This has been done.
18885 LyX now supports some of the most basic RCS/CVS/SVN commands.
18886 If you need something a bit more sophisticated you will have to do that
18887 manually in a terminal.
18890 \begin_layout Standard
18891 Also note that CVS support is not as good as subversion support so we advice
18893 Good place to start with Subversion is SVN Book
18897 \begin_layout Plain Layout
18898 \begin_inset CommandInset href
18900 target "http://svnbook.red-bean.com/"
18910 In case of RCS you should read
18911 \begin_inset Quotes eld
18915 \begin_inset Quotes erd
18918 (a man file, read it with
18923 This file describes all the basic features of RCS.
18924 You should especially notice the comment about a RCS directory, and the
18925 notion of a master RCS file (the file ending in
18932 \begin_layout Standard
18933 Before you begin to use the version control features in LyX, you should
18934 be familiar with RCS/CVS/SVN usage.
18935 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18936 package—no guarantees are made for older versions.
18937 Most of the log messages are not currently displayed after operations —
18938 you can check them in Messages pane if unsure.
18941 \begin_layout Standard
18942 For introducing your own external commands consult vc-command in the manual
18946 \begin_layout Subsection
18947 RCS commands in LyX
18950 \begin_layout Standard
18951 The following sections describe the RCS commands supported by LyX.
18952 You can find them in the
18954 File\SpecialChar \menuseparator
18956 \begin_inset space ~
18962 LyX was tested against RCS 5.7/5.8.
18965 \begin_layout Subsubsection
18971 \begin_layout Standard
18972 If your document is not under revision control, this is the only item shown
18974 And if it is under revision control, the
18978 item is not visible.
18982 \begin_layout Standard
18983 This command registers your document with RCS (unless you are under the
18984 directory managed by CVS)\SpecialChar \@.
18985 You are asked interactively to supply an initial
18986 description of the document.
18987 The document is now set in Read-Only mode and you have to
18990 \begin_inset space ~
18994 \begin_inset space ~
18998 \begin_inset space ~
19003 , before making any changes to it.
19004 A document under revision control has a
19005 \begin_inset Quotes eld
19008 [RCS:<version> <locker>]
19009 \begin_inset Quotes erd
19012 item tagged to the filename in the minibuffer.
19015 \begin_layout Standard
19016 RCS command that is run:
19018 ci -q -u -i -t-"<initial description>" <file-name>
19021 \begin_layout Standard
19026 to understand the switches.
19030 \begin_layout Subsubsection
19036 \begin_layout Standard
19037 When you are finished editing a file, you check in your changes.
19038 When you do this, you are asked for a description of the changes.
19039 This is stored in the history log.
19040 The version number is bumped, your changes are applied to the master RCS
19041 file, the document is unlocked and set to Read-Only mode.
19045 \begin_layout Standard
19048 ci -q -u -m"<description>" <file-name>
19051 \begin_layout Subsubsection
19057 \begin_layout Standard
19058 By doing this you lock the document so that only you can edit it.
19059 This will also make the document Read-Write only for you.
19060 You will usually continue editing for a while and when you are finished
19061 you check in your changes.
19062 The status line is changed to reflect that you have locked the file.
19066 \begin_layout Standard
19069 co -q -l <file-name>
19072 \begin_layout Subsubsection
19075 Revert To Repository Version
19078 \begin_layout Standard
19079 This will discard all changes made to the document since the last check
19081 You get a warning before changes are discarded.
19084 \begin_layout Standard
19087 co -f -u<version> <file-name>
19090 \begin_layout Subsubsection
19096 \begin_layout Standard
19097 This makes as if the last check in never happened.
19098 No changes are made to the document loaded into LyX, but the last version
19099 is removed from the master RCS file.
19103 \begin_layout Standard
19106 rcs -o<version> <file-name>
19109 \begin_layout Subsubsection
19115 \begin_layout Standard
19116 This shows the complete history of the RCS document.
19121 is shown in a browser.
19129 \begin_layout Subsubsection
19133 \begin_layout Standard
19134 LyX supports RCS version number, author name, date and time of last commit.
19135 All those are extracted from
19137 rlog -r <file-name>
19140 For other details see
19141 \begin_inset CommandInset ref
19143 reference "sub:VCS-Revision-Information"
19150 \begin_layout Subsection
19151 CVS commands in LyX
19154 \begin_layout Standard
19155 A subset of CVS operations is supported by LyX.
19156 You can find the commands in the
19158 File\SpecialChar \menuseparator
19160 \begin_inset space ~
19166 The version control system SVN is more powerful, so please use it instead
19167 of CVS if possible.
19170 \begin_layout Subsubsection
19176 \begin_layout Standard
19177 If you start from scratch with CVS you have to create your repository and
19178 checkout the working copy with external tools.
19179 If you're using a client-server setup you may need to login before doing
19180 the first repository checkout.
19183 \begin_layout Standard
19184 If your documents are under revision control and others are using the same
19185 repository problems arise when different changes to the same document at
19186 the same location happen.
19187 Standard CVS repositories doesn't operate with a file locking mechanism.
19188 This may be surprising, but conflicts only occur if people disagree on
19189 the proper content of the same part of a document.
19190 So, if co-workers are used to communicate regularly, these conflicts occur
19192 If they don't communicate they have a fundamental problem anyway.
19193 Nevertheless some people like to work with so called
19194 \begin_inset Quotes eld
19198 \begin_inset Quotes erd
19202 If they do so the working copy of all files is readonly when checked out
19203 first and the user starts editing after using a special command to make
19204 the working copy writable.
19205 When the changes are checked in the working copy returns to readonly state.
19206 With LyX one has to edit the
19207 \begin_inset Flex Code
19210 \begin_layout Plain Layout
19216 file and add the line
19217 \begin_inset Flex Code
19220 \begin_layout Plain Layout
19226 to work with reserved checkouts.
19227 The benefit is the possibility to see who is using a writable copy of some
19229 It's not guaranteed only one user makes a copy writable.
19232 \begin_layout Standard
19233 LyX tries to guess if you're using reserved or non-reserved checkouts.
19234 If your working copy is readonly or it is writable and an additional copy
19235 of your document exists in the CVS/Base sub-directory a reserved otherwise
19236 a non-reserved checkout is assumed.
19237 When a reserved checkout is detected you have to use
19238 \begin_inset Flex MenuItem
19241 \begin_layout Plain Layout
19247 to make your working copy writable if it's readonly.
19249 \begin_inset Flex MenuItem
19252 \begin_layout Plain Layout
19258 operation is possible and that makes your working copy readonly again after
19259 transferring your changes to the repository.
19262 \begin_layout Standard
19263 More information about CVS can be found here
19264 \begin_inset Flex URL
19267 \begin_layout Plain Layout
19269 http://www.nongnu.org/cvs
19275 \begin_inset Flex URL
19278 \begin_layout Plain Layout
19280 http://ximbiot.com/cvs
19288 \begin_layout Standard
19293 to understand the sub-commands and the switches mentioned below.
19296 \begin_layout Subsubsection
19302 \begin_layout Standard
19303 If your document is not under revision control, this is the only item shown
19305 And if it is under revision control, the
19312 item is not visible.
19316 \begin_layout Standard
19317 This command registers in CVS your document
19318 \begin_inset Flex Strong
19321 \begin_layout Plain Layout
19329 in case you have already the documents directory under CVS control (in
19335 This means you have to create or checkout the archive by yourself using
19337 (In case you forget that step LyX registers the document with RCS.)
19340 \begin_layout Standard
19341 Then you are asked interactively to supply an initial description of the
19343 Don't forget that registered file is not yet checked in.
19346 \begin_layout Standard
19347 CVS command that is run:
19349 cvs -q add -m"<entered message>" "<file-name>"
19352 \begin_layout Standard
19357 above and for all other CVS commands is an abbreviation for
19358 \begin_inset Quotes eld
19361 change the current working directory to file location and use the file name
19362 without path component as argument
19363 \begin_inset Quotes erd
19369 \begin_layout Subsubsection
19375 \begin_layout Standard
19376 When you are finished editing a file, you commit your changes.
19377 When you do this and you had changed the document, you are asked for a
19378 description of the changes.
19379 After that changes are written to the repository.
19380 In case you didn't change the document and a reserved checkout is detected
19381 the reservation made on
19382 \begin_inset Flex MenuItem
19385 \begin_layout Plain Layout
19394 \begin_layout Labeling
19395 \labelwidthstring 00.00.0000
19397 \begin_inset space ~
19401 \begin_inset space ~
19405 \begin_inset Newline newline
19409 \begin_inset Flex Code
19412 \begin_layout Plain Layout
19415 -q commit -m"<description>" "<file-name>"
19421 \begin_inset Newline newline
19425 \begin_inset Flex Code
19428 \begin_layout Plain Layout
19439 \begin_layout Subsubsection
19445 \begin_layout Standard
19446 When you are sharing a repository with others, you may have to incorporate
19447 their changes into your working copy.
19450 \begin_layout Standard
19453 cvs -q update "<file-name>"
19456 \begin_layout Standard
19457 If a readonly checkout is detected the working copy is made writable and
19461 \begin_layout Standard
19464 cvs -q edit "<file-name>"
19467 \begin_layout Subsubsection
19470 Revert To Repository Version
19473 \begin_layout Standard
19474 This will discard all changes made to the document since the last check
19476 You get a warning before changes are discarded.
19477 Firstly the file is deleted, secondly CVS update command is run.
19480 \begin_layout Standard
19483 cvs -q update "<file-name>"
19486 \begin_layout Standard
19487 If a reserved checkout is detected and the working copy has no changes only
19488 the reservation is undone.
19491 \begin_layout Standard
19494 cvs -q unedit "<file-name>"
19497 \begin_layout Subsubsection
19498 Update of the local directory checkout from repository
19501 \begin_layout Standard
19502 Once your documents gets more complex, containing sub-documents and pictures,
19504 \begin_inset Flex Code
19507 \begin_layout Plain Layout
19513 files and so on using version control becomes more complicated.
19514 LyX supports updating the whole tree in which resides the document.
19515 This become especially useful once you cooperate with people which neither
19516 have detailed knowledge about CVS usage nor they have ambition to commit
19517 additional material to the repository.
19518 You have to organize the files structure so that all external files are
19519 in the same directory or subdirectories of the document.
19520 It's good practice anyway to store multipart documents in an extra directory.
19523 \begin_layout Standard
19525 \begin_inset Flex Code
19528 \begin_layout Plain Layout
19529 Update local directory from repository
19534 command updates the whole directory.
19535 If local changes are detected user is warned before update starts.
19536 In case of merge conflicts both versions of the conflicting document parts
19537 are placed in the final document.
19538 You have to review and correct the result of the merge.
19539 You'll find the conflicts enclosed in pairs of
19540 \begin_inset Flex Code
19543 \begin_layout Plain Layout
19550 \begin_inset Flex Code
19553 \begin_layout Plain Layout
19560 \begin_inset Flex Code
19563 \begin_layout Plain Layout
19570 The first part is your version as before the update operation with the
19571 document name prepended.
19572 The second one is the repository version with the version number after
19574 \begin_inset Flex Code
19577 \begin_layout Plain Layout
19586 \begin_layout Labeling
19587 \labelwidthstring 00.00.0000
19589 \begin_inset space ~
19593 \begin_inset space ~
19597 \begin_inset Newline newline
19601 \begin_inset Flex Code
19604 \begin_layout Plain Layout
19612 (Ask if changes are detected.)
19613 \begin_inset Newline newline
19617 \begin_inset Flex Code
19620 \begin_layout Plain Layout
19621 cd $path; cvs -q update
19631 \begin_layout Standard
19633 \begin_inset Flex Code
19636 \begin_layout Plain Layout
19642 stands for the path to the document.
19645 \begin_layout Subsubsection
19651 \begin_layout Standard
19652 This shows the complete history of the CVS document.
19655 cvs log "<file-name>"
19657 is shown in a browser.
19660 \begin_layout Subsection
19661 SVN commands in LyX
19664 \begin_layout Standard
19665 SVN is now partially supported by LyX.
19666 You can find the commands in the
19668 File\SpecialChar \menuseparator
19670 \begin_inset space ~
19676 Please note that if you use password protected access to repository via
19677 ssh, you will be asked in terminal window.
19678 LyX was tested against SVN 1.5 and 1.6
19682 \begin_layout Plain Layout
19683 Most of the commands will work with 1.4 too, see
19684 \begin_inset CommandInset ref
19686 reference "sub:SVN-Repo-Update"
19698 \begin_layout Subsubsection
19704 \begin_layout Standard
19705 If your document is not under revision control, this is the only item shown
19707 And if it is under revision control, the
19714 item is not visible.
19718 \begin_layout Standard
19719 This command registers in SVN your document ONLY in case you have already
19720 the documents directory under SVN control (in particular
19725 This means you have to checkout the archive by yourself.
19729 \begin_layout Standard
19730 Then you are asked interactively to supply an initial description of the
19732 Don't forget that registered file is not yet commited.
19735 \begin_layout Standard
19736 SVN command that is run:
19739 \begin_inset Quotes eld
19743 \begin_inset Quotes erd
19749 \begin_layout Standard
19754 to understand the switches.
19758 \begin_layout Subsubsection
19764 \begin_layout Standard
19765 When you are finished editing a file, you commit your changes.
19766 When you do this, you are asked for a description of the changes.
19767 After that changes are commited.
19770 \begin_layout Standard
19775 \begin_layout Plain Layout
19776 In case locking is not enabled.
19778 \begin_inset CommandInset ref
19780 reference "subsec:SVN-File-Locking"
19791 svn commit -q -m"<description>" <file-name>
19794 \begin_layout Subsubsection
19800 \begin_layout Standard
19801 Updates the changes of this file from the repository.
19802 Be sure you understand SVN merging and conflicts resolving before using
19803 this function, because all conflicts has to be resolved manually by you!
19806 \begin_layout Standard
19811 \begin_layout Plain Layout
19819 svn update --non-interactive
19820 \begin_inset Quotes eld
19824 \begin_inset Quotes erd
19830 \begin_layout Subsubsection
19833 Revert To Repository Version
19836 \begin_layout Standard
19837 This will discard all changes made to the document since the last check
19839 You get a warning before changes are discarded.
19843 \begin_layout Standard
19847 \begin_inset Quotes eld
19851 \begin_inset Quotes erd
19857 \begin_layout Subsubsection
19858 \begin_inset CommandInset label
19860 name "sub:SVN-Repo-Update"
19864 Update of the local directory checkout from repository
19868 \begin_layout Plain Layout
19869 Note that this command will work only with subversion
19870 \begin_inset Formula $\geqq1.5$
19881 \begin_layout Standard
19882 All the commands above have one shortcomming - they deal with the current
19884 Once your document contains pictures, includes external
19885 \begin_inset Flex Code
19888 \begin_layout Plain Layout
19894 files and so on administration becomes more complicated.
19895 LyX now supports updating the whole tree in which resides the document
19899 \begin_layout Plain Layout
19900 One need to organize the files structure so that all external files are
19901 in the same directory or subdirectories of the document.
19908 This become especially useful once you cooperate with people which neither
19909 know about subversion management nor they have ambition to commit additional
19910 material to the repository.
19914 \begin_layout Standard
19915 \begin_inset Flex Code
19918 \begin_layout Plain Layout
19919 Update local directory from repository
19924 command updates the whole directory and in case of merge conflicts local
19925 version of the files are left, so no unintended data loss occurs.
19926 If local changes are detected user is warned before update starts.
19929 \begin_layout Labeling
19930 \labelwidthstring 00.00.0000
19932 \begin_inset space ~
19936 \begin_inset space ~
19940 \begin_inset Newline newline
19944 \begin_inset Flex Code
19947 \begin_layout Plain Layout
19953 (Ask if changes are detected.)
19954 \begin_inset Newline newline
19958 \begin_inset Flex Code
19961 \begin_layout Plain Layout
19962 svn update --accept mine-full $path
19970 \begin_layout Standard
19972 \begin_inset Flex Code
19975 \begin_layout Plain Layout
19981 stands for the path to the document.
19984 \begin_layout Subsubsection
19990 \begin_layout Standard
19991 This shows the complete history of the SVN document.
19995 \begin_inset Quotes eld
19999 \begin_inset Quotes erd
20004 is shown in a browser.
20007 \begin_layout Subsubsection
20009 \begin_inset CommandInset label
20011 name "subsec:SVN-File-Locking"
20018 \begin_layout Standard
20019 The file exchange through various revision control systems brings the problem
20020 of merge conflicts in case two different users try to edit the same (parts
20022 When such a conflict happens it needs manual resolving and one reasonable
20023 alternative is to provide some kind of locking mechanism, which guarantees
20024 that only one user is allowed to edit file at the given time.
20027 \begin_layout Standard
20028 SVN has two such mechanisms to provide mutual exclusivity for file access
20029 - locks and automatic setting of write permissions (see sec.
20031 \begin_inset CommandInset ref
20033 reference "subsec:Automatical-Locking-Property"
20038 \begin_inset Flex Code
20041 \begin_layout Plain Layout
20051 \begin_layout Plain Layout
20052 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20058 If this property is detected for a given document LyX starts to use SVN
20059 locks for document editing automatically and the whole check-in/out mechanism
20060 switches to the same regimen as for RCS.
20061 This in particular means there are two different modes of file use in LyX:
20064 \begin_layout Itemize
20066 The loaded file is in the read-only mode.
20067 For editing on needs to check-out.
20072 consists of updating from the repository and gaining write lock.
20073 If the lock is not possible to obtain, we remain in unlocked state.
20076 \begin_layout Itemize
20078 The loaded file is in the 'normal' edit mode.
20079 No other user is allowed to edit the file.
20084 consists of commiting changes and releasing write-lock.
20085 If no changes have been made to the document, no commit will be produced
20089 \begin_layout Plain Layout
20090 Don't be puzzled by the fact that you will be asked for commit message anyway.
20095 and only the write-lock will be released.
20098 \begin_layout Standard
20102 \begin_layout Labeling
20103 \labelwidthstring 00.00.0000
20106 svn commit -q -m"<description>" "<file-name>"
20107 \begin_inset Newline newline
20110 svn unlock "<file-name>"
20113 \begin_layout Labeling
20114 \labelwidthstring 00.00.0000
20117 svn update "<file-name>"
20118 \begin_inset Newline newline
20121 svn lock "<file-name>"
20124 \begin_layout Subsubsection
20127 \begin_inset CommandInset label
20129 name "subsec:Automatical-Locking-Property"
20135 Automatic Locking Property
20138 \begin_layout Standard
20139 The above mentioned automatic setting of write permissions of the .lyx file
20145 ile\SpecialChar \menuseparator
20151 \begin_inset space ~
20154 Control\SpecialChar \menuseparator
20159 oggle locking property
20162 This command is active only when the file is not locked on the svn server
20164 you need to check-out before proceeding).
20167 \begin_layout Labeling
20168 \labelwidthstring 00.00.0000
20170 \begin_inset space ~
20176 \begin_layout Labeling
20177 \labelwidthstring 00.00.0000
20180 svn propset svn:needs-lock ON "<file-name>"
20183 \begin_layout Labeling
20184 \labelwidthstring 00.00.0000
20187 svn propdel svn:needs-lock "<file-name>"
20190 \begin_layout Subsubsection
20191 \begin_inset CommandInset label
20193 name "sub:VCS-Revision-Information"
20197 Revision Information in Documents
20200 \begin_layout Standard
20201 There are more possibilities how to activate revision information in our
20205 \begin_layout Itemize
20206 LyX supports directly:
20210 \begin_layout Itemize
20211 tree revision information (
20212 \begin_inset Flex Code
20215 \begin_layout Plain Layout
20222 The result is the output of the
20223 \begin_inset Flex Code
20226 \begin_layout Plain Layout
20232 command, the following table gives you an idea, how to read the results.
20235 \begin_layout Standard
20237 \begin_inset Tabular
20238 <lyxtabular version="3" rows="6" columns="2">
20239 <features tabularvalignment="middle">
20240 <column alignment="center" valignment="top" width="0">
20241 <column alignment="center" valignment="top" width="0">
20243 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20246 \begin_layout Plain Layout
20252 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20255 \begin_layout Plain Layout
20263 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20266 \begin_layout Plain Layout
20272 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20275 \begin_layout Plain Layout
20276 mixed revision working copy
20283 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20286 \begin_layout Plain Layout
20292 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20295 \begin_layout Plain Layout
20296 modified working copy
20303 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20306 \begin_layout Plain Layout
20312 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20315 \begin_layout Plain Layout
20316 switched working copy
20323 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20326 \begin_layout Plain Layout
20332 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20335 \begin_layout Plain Layout
20336 partial working copy, from a sparse checkout
20343 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20346 \begin_layout Plain Layout
20352 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20355 \begin_layout Plain Layout
20356 mixed revision, modified, switched working copy
20369 \begin_layout Itemize
20370 file revision information.
20371 The result comes from parsing the output of
20372 \begin_inset Flex Code
20375 \begin_layout Plain Layout
20377 \begin_inset space ~
20381 \begin_inset space ~
20385 \begin_inset space ~
20394 Supported flags are:
20398 \begin_layout Itemize
20399 version number of the last commit (
20400 \begin_inset Flex Code
20403 \begin_layout Plain Layout
20412 \begin_layout Itemize
20413 author of the last commit (
20414 \begin_inset Flex Code
20417 \begin_layout Plain Layout
20426 \begin_layout Itemize
20427 date of the last commit (
20428 \begin_inset Flex Code
20431 \begin_layout Plain Layout
20440 \begin_layout Itemize
20441 time of the last commit (
20442 \begin_inset Flex Code
20445 \begin_layout Plain Layout
20455 \begin_layout Standard
20456 You can obtain this info via InsetInfo (e.g.
20458 \begin_inset Flex Code
20461 \begin_layout Plain Layout
20462 info-insert buffer vcs-date
20468 The information will be available only when you have the file stored under
20469 svn managment (i.e.
20471 \begin_inset Flex Code
20474 \begin_layout Plain Layout
20480 directory is available with your document).
20484 \begin_layout Itemize
20485 Another---a hacking one---possibility is to use svn keywords
20489 \begin_layout Plain Layout
20490 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20496 In short -- you set file keywords property (e.g.
20499 svn propset svn:keywords 'Rev' file.lyx
20501 ) and then paste keyword TeX code
20505 \begin_layout Plain Layout
20506 This is an easy way how to ensure that LyX won't break the line in the middle
20512 tag in your document (e.g.
20517 \begin_layout Plain Layout
20525 This way svn client will automatically substitute revision number (e.g.
20530 \begin_layout Plain Layout
20537 ) after each update and commit.
20538 There are more problems with this approach.
20539 Firstly, the '$' character is used in TeX world for math equations, so
20540 any occurence of math formula
20541 \begin_inset Formula $Rev$
20545 \begin_inset Formula $Rev:59$
20548 in your LyX document.
20549 Similarly for other keywords like Id, Date, Author, etc.
20550 Secondly svn output is dependent on your locales, so its very easy that
20551 svn would produce some problematic strings once Date is used.
20552 Thirdly you get the whole 'Rev: 59' string in your document instead of
20554 Until subversion implements user's custom keywords it will be hard to use
20555 this approach reliably or let LyX to support it directly.
20558 \begin_layout Subsection
20559 SVN and Windows Environment
20562 \begin_layout Quote
20563 My inclination is to say that if the user cannot figure out the command
20564 line operations on their own fairly quickly, they would be well advised
20565 to use TortoiseSVN.
20571 \begin_layout Subsubsection
20575 \begin_layout Standard
20576 In addition to installing LyX, and having access to a Subversion repository,
20577 the user will need to install the Subversion client program.
20578 A Windows installer for the client program is available from
20579 \begin_inset CommandInset href
20582 target "http://www.collab.net/nonav/downloads/subversion/"
20587 The user may also want to install
20588 \begin_inset CommandInset href
20591 target "http://tortoisesvn.tigris.org/"
20595 , which integrates Subversion operations into the context (rightclick) menu
20596 of Windows Explorer.
20597 Operations done outside LyX will typically be more convenient using the
20598 Explorer context menu.
20599 Note that TortoiseSVN is not a replacement for the client program, which
20600 is what LyX itself will use.
20603 \begin_layout Subsubsection
20604 Bringing a document under Subversion control
20607 \begin_layout Standard
20608 Before a LyX document can be brought under version control in Subversion,
20609 its parent directory needs to be under version control.
20610 If the document is being added to a project already in the repository,
20611 this is accomplished by checking the project out to the directory where
20612 the new document will be placed.
20613 If the project itself is not yet under version control (for instance, if
20614 this document starts a new project), the directory must be imported into
20616 This is done outside LyX.
20617 Both import and checkout are easily accomplished from the Explorer context
20618 menu using TortoiseSVN, or alternatively can be done using the command
20619 line client at a DOS prompt.
20620 The procedure for importing the project using TortoiseSVN is described
20621 below, assuming an existing repository and a new project being started
20629 For information on using the Subversion client program, run
20636 \begin_layout Enumerate
20643 in Windows Explorer, right click it, and select
20645 TortoiseSVN > Repo-browser
20648 If necessary, adjust the URL for the repository, then click OK.
20651 \begin_layout Enumerate
20652 Right click the level of the repository under which you want to place the
20653 new project folder (typically the top level) and click
20655 Create folder\SpecialChar \ldots{}
20658 Supply a name for the project folder and click OK.
20659 Add a message for the log file if desired, then click OK again.
20660 The new project folder should appear in the repository.
20661 Finally, click OK again to exit the repository browser.
20664 \begin_layout Enumerate
20665 Once again right click
20671 , this time selecting SVN Checkout\SpecialChar \ldots{}
20672 Select the URL of the project folder
20673 you just created in the repository, and set the checkout directory to
20681 You will be warned about a non-empty folder; click OK to proceed.
20682 You should now have a
20693 \begin_layout Enumerate
20694 Create or open your document in LyX and click
20699 ile\SpecialChar \menuseparator
20705 \begin_inset space ~
20708 Control\SpecialChar \menuseparator
20716 Add a log message and click OK to commit the document to version control.
20719 \begin_layout Standard
20720 From this point onward, you should have full functionality in the
20725 ile\SpecialChar \menuseparator
20731 \begin_inset space ~
20737 You also have the option of checking the document in and out, viewing its
20739 using the TortoiseSVN context menu in Windows Explorer or the Subversion
20740 client program from a command prompt.
20743 \begin_layout Subsubsection
20744 SSH tunnel used with SVN under Windows
20747 \begin_layout Standard
20748 Compared with Linux setting up svn client to communicate over ssh under
20749 Windows is a rather troublesome task.
20750 We will at least offer some hints how to setup the client side but prior
20751 knowledge about ssh and the Windows command line is needed, also be prepared
20752 for a great deal of frustration\SpecialChar \ldots{}
20756 \begin_layout Enumerate
20757 Get a svn client for windows, as described in the previous sections.
20758 When it is a fresh install run some svn command (e.g.
20760 \begin_inset Flex Code
20763 \begin_layout Plain Layout
20769 ) to create config files, which you will need to change later on.
20772 \begin_layout Enumerate
20773 Choose a ssh client for Windows.
20774 There are several possibilities, we will use the one from Putty tools
20778 \begin_layout Plain Layout
20779 \begin_inset Flex URL
20782 \begin_layout Plain Layout
20784 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20795 You will need to set the connection up so that the client doesn't ask for
20796 any password from you.
20797 To keep things easy we will use only keys without any additional password
20802 \begin_layout Enumerate
20804 \begin_inset Flex Code
20807 \begin_layout Plain Layout
20814 Save your private .ppk key file and put the public one on the server side.
20815 If the SVN server runs on Linux, note that the format of the public key
20816 is not compatible with Linux openssh and you will need to direcly copy-paste
20819 Public key for pasting into OpenSSH authorized_keys file
20821 :” edit field into the server's
20822 \begin_inset Flex Code
20825 \begin_layout Plain Layout
20826 ~/.ssh/authorized_keys
20832 \begin_inset Flex Code
20835 \begin_layout Plain Layout
20844 \begin_layout Enumerate
20846 \begin_inset Flex Code
20849 \begin_layout Plain Layout
20856 In the SVN config file
20860 \begin_layout Plain Layout
20861 Exact path depends on Windows version, usually somewhere around
20862 \begin_inset Flex Code
20865 \begin_layout Plain Layout
20868 Documents and Settings
20882 \begin_inset Flex Code
20885 \begin_layout Plain Layout
20900 , section [tunnels], setup ssh command, e.g.
20902 \begin_inset Flex Code
20905 \begin_layout Plain Layout
20906 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20915 \begin_layout Plain Layout
20916 It will usually take a lot of time to get exact command right and it depends
20918 For example do not have some remote server saved as a default session in
20920 If things fail, try to connect via plink without SVN first.
20929 \begin_layout Enumerate
20930 Checkout the SVN archive, e.g.
20932 \begin_inset Flex Code
20935 \begin_layout Plain Layout
20936 svn co svn+ssh://user@server/repository_path
20944 \begin_layout Subsubsection
20945 End-of-Line Conversions
20948 \begin_layout Standard
20949 When the collaborators are mixing Linux and Windows environments, LyX will
20950 use different line endings inside the .lyx files.
20951 This is not a problem as far as LyX functionality is concerned, but the
20952 commit diffs will be huge and merge-conflicts prone.
20953 Fortunately SVN itself knows
20957 \begin_layout Plain Layout
20958 \begin_inset Flex URL
20961 \begin_layout Plain Layout
20963 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
20973 how to deal with CR/LF problems when switching .lyx files to the
20974 \begin_inset Flex Code
20977 \begin_layout Plain Layout
20987 \begin_layout Plain Layout
20989 \begin_inset Flex Code
20992 \begin_layout Plain Layout
20993 svn propset svn:eol-style native FILE_NAME
21006 \begin_layout Subsection
21010 \begin_layout Standard
21011 With the recent addition of the vc-command function LyX power users are
21012 allowed to create their own commands for revision control.
21015 \begin_layout Standard
21016 As an example you can see how two TortoiseSVN commands could be integrated
21020 \begin_layout Description
21022 \begin_inset Flex Code
21025 \begin_layout Plain Layout
21026 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21034 \begin_layout Description
21036 \begin_inset Flex Code
21039 \begin_layout Plain Layout
21040 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21048 \begin_layout Subsection
21049 Version control and Document comparison
21052 \begin_layout Standard
21053 One of the typical uses of version control is to inspect the changes between
21054 revisions, usually by creating
21055 \begin_inset Flex Code
21058 \begin_layout Plain Layout
21065 While this is useful for plain text files, it is much less useful in the
21066 case of LyX files, which have more complicated structure.
21067 Hence we provide binding to the Document comparison feature.
21068 They are two ways of calling this feature - either by direct call of
21069 \begin_inset Flex Code
21072 \begin_layout Plain Layout
21078 LyX function (for details see LyX functions manual) or by icon/menu item
21080 \begin_inset Flex MenuItem
21083 \begin_layout Plain Layout
21084 Compare with older revision...
21090 One can either compare two chosen revisions of the document or he can simply
21091 compare the current version of edited text with older revisions (where
21093 \begin_inset Flex MenuItem
21096 \begin_layout Plain Layout
21102 ' revisions back means comparison of the edited file with last commited
21107 \begin_layout Standard
21108 This feature is supported for SVN and RCS though due to the more complicated
21109 versioning scheme of RCS there is a constraint -- when addressing the revisions
21110 in dialog, numbers always point to the last number in RCS revision number,
21115 \begin_layout Section
21116 Literate Programming
21119 \begin_layout Standard
21124 (kayvan@sylvan.com)
21128 original documentation written by
21130 Edmar Wienskoski Jr.
21133 (edmar-w-jr@technologist.com)
21136 \begin_layout Subsection
21140 \begin_layout Standard
21141 The main purpose of this documentation is to show you how to use LyX for
21142 literate programming, where it is assumed that you are familiar with this
21143 programming technique, and know what
21144 \begin_inset Quotes eld
21148 \begin_inset Quotes erd
21152 \begin_inset Quotes eld
21156 \begin_inset Quotes erd
21160 If that is not the case, please follow the web links provided in the following
21162 There is a lot of good documentation out there covering old development
21163 history to the latest tools tips.
21166 \begin_layout Standard
21167 It is also assumed that you are familiar with LyX itself to a point that
21168 you are comfortable changing your LyX preferences, and X resources file.
21169 If that is not the case please refer to other LyX documentation to cover
21170 your specific needs.
21173 \begin_layout Subsection
21174 Literate Programming
21177 \begin_layout Standard
21178 From the Literate Programming FAQ:
21181 \begin_layout Quotation
21182 Literate programming is the combination of documentation and source together
21183 in a fashion suited for reading by human beings.
21184 In fact, literate programs should be enjoyable reading, even inviting!
21185 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21186 and documentation in a single file.
21187 Literate programming tools then parse the file to produce either readable
21188 documentation or compilable source.
21189 The WEB style of literate programming was created by D.
21190 \begin_inset space \thinspace{}
21194 Knuth during the development of his TeX typesetting software.
21198 \begin_layout Standard
21199 Another excerpt says:
21202 \begin_layout Quotation
21205 How is literate programming different from verbose commenting?
21208 \begin_layout Quotation
21209 There are three distinguishing characteristics.
21210 In order of importance, they are:
21214 \begin_layout Itemize
21215 flexible order of elaboration
21218 \begin_layout Itemize
21219 automatic support for browsing
21222 \begin_layout Itemize
21223 typeset documentation, especially diagrams and mathematics
21227 \begin_layout Standard
21228 Now that I sparked your curiosity, take a look in the references.
21231 \begin_layout Subsubsection
21235 \begin_layout Standard
21236 The complete Literate Programming FAQ can be found at:
21239 \begin_layout Quote
21240 Literate Programming FAQ
21241 \begin_inset Flex URL
21244 \begin_layout Plain Layout
21246 http://www.literateprogramming.com/lpfaq.pdf
21254 \begin_layout Standard
21255 The FAQ lists 23 (twenty three!) different literate programming tools.
21256 Where some are specialized or
21257 \begin_inset Quotes eld
21261 \begin_inset Quotes erd
21264 for particular programming languages, while other have general scope.
21269 for my own use for several reasons:
21272 \begin_layout Itemize
21273 It can generate the documentation either in LaTeX or HTML.
21276 \begin_layout Itemize
21277 It has a open architecture, i.
21278 \begin_inset space \thinspace{}
21282 \begin_inset space \space{}
21285 it is easy to plug in new filters and to perform special processing that
21290 \begin_layout Itemize
21291 There is a good selection of filters available already (the HTML is one
21295 \begin_layout Itemize
21299 \begin_layout Standard
21300 The Noweb web page can be found at:
21303 \begin_layout Quote
21305 \begin_inset Flex URL
21308 \begin_layout Plain Layout
21310 http://www.cs.virginia.edu/~nr/noweb/
21318 \begin_layout Standard
21319 Starting from there you can reach many other interesting links and even
21320 some literate program examples.
21323 \begin_layout Subsection
21324 LyX and Literate Programming
21327 \begin_layout Standard
21328 The LyX support for Literate Programming is provided by using the generic
21329 LyX converters mechanism.
21330 This support is provided in a
21331 \begin_inset Quotes eld
21335 \begin_inset Quotes erd
21339 \begin_inset space \thinspace{}
21343 \begin_inset space \space{}
21346 you will be able to use this new LyX feature with some other literate programmin
21347 g tool of your choice by just changing your LyX preferences.
21350 \begin_layout Subsubsection
21351 Generating documents and code (weaving and tangling)
21354 \begin_layout Paragraph
21355 Selecting the document class
21358 \begin_layout Standard
21359 If you have installed Noweb and LyX successfully, whenever you open a new
21360 document or try to change the document class of an existing one, you will
21361 find that there are three new document classes available:
21364 \begin_layout Itemize
21368 \begin_layout Itemize
21372 \begin_layout Itemize
21376 \begin_layout Standard
21377 You must select one of them to create your literate documents from.
21381 \begin_layout Standard
21382 Note that literate documents are not limited to these three classes.
21383 New classes can be generated from other styles like letter or in combination
21384 with other class variations like Article (AMS).
21385 If you have special needs that cannot be covered by one of the existing
21386 classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21387 will arrange to insert a new entry, or teach you how to do it.
21391 \begin_layout Plain Layout
21392 It is very simple, it involves the creation of a file with four lines, and
21393 re-running of the auto configuration.
21398 Moreover, if you use a literate tool other than Noweb you may need to create
21399 a new set of document classes for it.
21402 \begin_layout Paragraph
21406 \begin_layout Standard
21407 LyX enables you to write code with a layout named
21415 \begin_layout Plain Layout
21416 The equivalent Noweb term is
21417 \begin_inset Quotes eld
21421 \begin_inset Quotes erd
21425 For historical reasons, I got used to the term
21426 \begin_inset Quotes eld
21430 \begin_inset Quotes erd
21433 introduced by other literate tool named Nuweb, which I used for many years
21434 before rendering myself to Noweb.
21439 Noweb delimits scraps like this:
21442 \begin_layout LyX-Code
21446 \begin_layout LyX-Code
21450 \begin_layout LyX-Code
21454 \begin_layout LyX-Code
21458 \begin_layout LyX-Code
21462 \begin_layout Standard
21463 The problem is that whatever is written in between the << and the
21467 must be taken literally, i.
21468 \begin_inset space \thinspace{}
21472 \begin_inset space \space{}
21475 LyX should be prevented from making any special interpretation of what has
21477 This is handled by a special layout named Scrap, that works like a normal
21478 paragraph but has a free spacing capability.
21481 \begin_layout Standard
21482 The down side of the Scrap paragraph layout is that consecutive paragraphs
21483 of code will be spaced with one empty line in the source code and also
21484 in the printed documentation.
21485 The work around is to enter each line of code within a single Scrap, with
21486 a newline (ctrl-return).
21487 The example above will look like this:
21491 \begin_layout Plain Layout
21492 If you have a printed version of this document you will not see any difference
21493 between the previous example and this one.
21501 \begin_layout LyX-Code
21503 \begin_inset Newline newline
21507 \begin_inset Newline newline
21511 \begin_inset Newline newline
21515 \begin_inset Newline newline
21521 \begin_layout Standard
21522 This layout works fine.
21523 The only real inconvenience is that you have to type ctrl-return instead
21528 \begin_layout Plain Layout
21529 It is in my list of
21530 \begin_inset Quotes eld
21534 \begin_inset Quotes erd
21545 \begin_layout Standard
21546 As a special note, you can also use the
21547 \begin_inset Quotes eld
21551 \begin_inset Quotes erd
21554 construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21558 \begin_layout LyX-Code
21560 \begin_inset Newline newline
21563 def some_function(args):
21564 \begin_inset Newline newline
21567 "This is the doc string for this function."
21568 \begin_inset Newline newline
21571 print "My args: ", args
21574 \begin_layout LyX-Code
21575 @ %def some_function
21578 \begin_layout Standard
21579 For an example of this usage and the resulting cross-reference output, look
21580 at the Literate python program in
21582 LIBDIR/examples/listerrors.lyx
21584 which should make this all clear.
21587 \begin_layout Paragraph
21588 Generating the documentation
21591 \begin_layout Standard
21592 At this point you already have a new document file with a proper document
21593 class, and with some code and text on it.
21594 How do I print it? The answer is simple, you select
21596 View\SpecialChar \menuseparator
21600 Just like you would do for a plain document.
21601 No special procedure is required.
21604 \begin_layout Standard
21605 To help orientate you, I will now explain what happens inside LyX:
21608 \begin_layout Enumerate
21611 Update\SpecialChar \menuseparator
21614 menu option is chosen, a LaTeX file is generated.
21619 \begin_layout Standard
21620 If the document is of any literate class the generated file will be named
21621 with an extension name defined by the
21622 \begin_inset Quotes eld
21626 \begin_inset Quotes erd
21629 format (defined in the Preferences panel), otherwise the file will have
21638 \begin_layout Enumerate
21639 Note that the only difference so far is in the name of the file, no special
21640 processing is required by LyX.
21641 Given that you formatted the code using the Scrap layout that, by itself,
21642 takes care of the business.
21645 \begin_layout Enumerate
21646 If the document is of any literate class LyX will then use the internal
21647 LyX to Noweb converter, followed by the Noweb to LaTeX converter
21651 \begin_layout Plain Layout
21652 The converters are defined in the
21654 Tools\SpecialChar \menuseparator
21658 \begin_inset Quotes eld
21662 \begin_inset Quotes erd
21674 manual for general information about converters.
21679 to generate the LaTeX file.
21683 \begin_layout Standard
21684 Otherwise it will just skip this step.
21688 \begin_layout Enumerate
21689 Finally, LaTeX is invoked and the regular post processing continues as in
21693 \begin_layout Standard
21694 Independence from a particular
21695 \begin_inset Quotes eld
21699 \begin_inset Quotes erd
21702 is easily achieved by changing the commands that are run by the various
21706 \begin_layout Paragraph
21707 Generating the code
21710 \begin_layout Standard
21711 When the build menu option is chosen or the corresponding button in the
21712 toolbar is pressed, a LaTeX file is generated just like step 1 above.
21713 Next, LyX invokes the
21718 This converter needs to be defined by the user and is not installed by
21719 default, though the Program format is.
21720 This converter (like any other converter) will have two parts:
21723 \begin_layout Enumerate
21724 The converter program itself.
21725 This program performs the conversion from the one format to the other (in
21726 this case, from the Noweb format to the Program pseudo-format).
21729 \begin_layout Enumerate
21730 The error log parser.
21731 This is a program whose sole purpose is to rewrite error messages in a
21732 format that LyX understands.
21733 This makes it possible for LyX to place error boxes in the right places
21734 in the file buffer.
21737 \begin_layout Standard
21738 The first part, the
21739 \begin_inset Quotes eld
21743 \begin_inset Quotes erd
21746 setting, should be set to
21747 \begin_inset Quotes eld
21755 \begin_inset Quotes erd
21759 This basically means that LyX will call
21760 \begin_inset Quotes eld
21764 \begin_inset Quotes erd
21767 (a program or script) with the name of the Noweb file (normally a file
21768 in the LyX temp directory).
21772 \begin_layout Standard
21773 This is an implementation of
21774 \begin_inset Quotes eld
21778 \begin_inset Quotes erd
21781 that you can place in a directory on your path:
21784 \begin_layout LyX-Code
21788 \begin_layout LyX-Code
21792 \begin_layout LyX-Code
21793 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
21796 \begin_layout Standard
21797 The next part of the converter setting is the
21798 \begin_inset Quotes eld
21802 \begin_inset Quotes erd
21805 which is to be set to
21806 \begin_inset Quotes eld
21811 parselog=listerrors
21814 \begin_inset Quotes erd
21818 This will run any errors that are generated by the
21819 \begin_inset Quotes eld
21823 \begin_inset Quotes erd
21826 process through the
21827 \begin_inset Quotes eld
21831 \begin_inset Quotes erd
21837 \begin_layout Standard
21838 The converter code looks in
21846 then on the path for the
21847 \begin_inset Quotes eld
21851 \begin_inset Quotes erd
21857 \begin_layout Standard
21858 The build will normally take place in LyX's temporary directory, so the
21859 files produced by the conversion will be in that directory.
21860 LyX will copy out what it regards as the `main' file, but the
21864 conversion may produce several files, and so most of these would then be
21865 deleted when LyX was closed.
21866 The present solution is to use a `copier',
21870 \begin_layout Plain Layout
21879 manual for information on these.
21888 script in its default mode, so that the entire contents of the temporary
21889 directory is copied.
21890 More will get copied than is needed, to be sure, but nothing will be lost.
21891 If, however, you know what extensions the generated files will have, this
21892 can be improved by using the
21901 This option takes a comma-separated list of extensions to copy.
21902 So, for example, if the conversion will generate only files with the extensions
21911 , then the correct definition would be:
21914 \begin_layout LyX-Code
21915 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
21918 \begin_layout Standard
21919 The result will be that only files with these two extensions will be copied
21923 \begin_layout Paragraph
21924 Build instructions in the document
21927 \begin_layout Standard
21928 The last piece of the integration between LyX and noweb is the
21929 \begin_inset Quotes eld
21933 \begin_inset Quotes erd
21937 Generally, the instructions for building your program should be embedded
21938 in a scrap of its own.
21940 \begin_inset Quotes eld
21944 \begin_inset Quotes erd
21947 above uses the notangle command to look for this scrap (called
21948 \begin_inset Quotes eld
21952 \begin_inset Quotes erd
21955 ) and runs its contents through
21956 \begin_inset Quotes eld
21960 \begin_inset Quotes erd
21966 \begin_layout Standard
21967 Typically, such a scrap would look something like this:
21970 \begin_layout LyX-Code
21972 \begin_inset Newline newline
21976 \begin_inset Newline newline
21980 \begin_inset Newline newline
21983 if [ -z "${NOWEB_SOURCE}" ]
21984 \begin_inset Newline newline
21988 \begin_inset Newline newline
21991 NOWEB_SOURCE=myfile.nw
21992 \begin_inset Newline newline
21996 \begin_inset Newline newline
22000 code to extract files ...]
22001 \begin_inset Newline newline
22005 code to compile files ...]
22006 \begin_inset Newline newline
22012 \begin_layout Standard
22015 LIBDIR/examples/listerrors.lyx
22019 LIBDIR/examples/Literate.lyx
22021 which implement two versions of the
22022 \begin_inset Quotes eld
22026 \begin_inset Quotes erd
22029 program for some illustrations of how all of these pieces go together or
22032 LIBDIR/examples/noweb2lyx.lyx.
22035 Interestingly, these three files show off the language-indepence of the
22036 LyX literate programming support since they are written in Python, C and
22040 \begin_layout Subsubsection
22044 \begin_layout Standard
22045 All the Literate Programming support is configured by the
22047 Tools\SpecialChar \menuseparator
22051 \begin_inset Quotes eld
22055 \begin_inset Quotes erd
22059 The important parts are:
22062 \begin_layout Description
22064 \begin_inset space ~
22068 \begin_inset Quotes eld
22072 \begin_inset Quotes erd
22076 \begin_inset space ~
22079 format Set up via the Formats tab, this is where the Noweb-specific pieces
22089 , the file extension is set to
22094 This tells LyX to create a file with a
22098 extension in the first step of the conversion process.
22101 \begin_layout Description
22103 \begin_inset space ~
22111 \begin_inset space ~
22114 format This is an empty format whose sole purpose is to be the endpoint
22115 of a conversion (which then allows us to set up a converter for it).
22118 \begin_layout Description
22127 This converter performs the
22128 \begin_inset Quotes eld
22132 \begin_inset Quotes erd
22135 of the literate document.
22136 For Noweb, it is set to
22137 \begin_inset Quotes eld
22142 noweave -delay -index $$i > $$o
22145 \begin_inset Quotes erd
22151 \begin_layout Description
22161 \begin_inset Quotes eld
22165 \begin_inset Quotes erd
22169 As stated above, the Converter is set to
22170 \begin_inset Quotes eld
22178 \begin_inset Quotes erd
22181 , with Flags set to
22182 \begin_inset Quotes eld
22187 originaldir,parselog=listerrors
22190 \begin_inset Quotes erd
22196 \begin_layout Subsubsection
22200 \begin_layout Standard
22201 There is also a new function implemented in the LyX server, the
22202 \begin_inset Quotes eld
22205 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22209 \begin_layout Standard
22210 When debugging code with ddd/gdb, it is possible to invoke a text editor
22211 at the current execution position with a single key stroke.
22212 The default ddd configuration for that is shift-ctrl-V.
22213 It happens that you can define the editor command line invocation in ddd
22216 Edit\SpecialChar \menuseparator
22217 Preferences\SpecialChar \menuseparator
22220 dialog and changing the "Edit Sources" entry.
22223 \begin_layout Standard
22224 I take advantage of the new created LyX server function and this ddd feature,
22226 \begin_inset Quotes eld
22230 \begin_inset Quotes erd
22236 \begin_layout LyX-Code
22237 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22240 \begin_layout Standard
22241 With this, whenever you are using ddd and find a point in the program that
22242 you want to edit, you just press shift-ctrl-V (in the ddd window), and
22243 ddd you forward this information to LyX through the LyX server and then
22244 the LyX window will show the same file with the cursor at the same position
22245 ddd was pointing to.
22246 No more guessing or long scrolling to locate a point in the program back
22250 \begin_layout Standard
22251 Note however that you must enable the LyX server to get this feature working
22252 (it is disabled by default).
22253 You can enable it in
22265 ) by entering in the
22270 \begin_inset Quotes eld
22275 /home/<your-home-directory>/.lyx/lyxpipe
22278 \begin_inset Quotes erd
22284 \begin_layout Standard
22285 Read the LyX server documentation in the
22287 Customization Manual
22289 for further information.
22292 \begin_layout Subsubsection
22296 \begin_layout Standard
22297 There are six new buttons that can be added to your LyX toolbar.
22298 Five of these buttons are short cuts to layout styles:
22319 The last one is a short cut to the
22320 \begin_inset Quotes eld
22324 \begin_inset Quotes erd
22331 \begin_layout Standard
22332 LyX has a range of buttons that are available for tool bar customization.
22333 In my toolbar I like to combine the six short cuts above with two more:
22338 \SpecialChar \menuseparator
22343 \SpecialChar \menuseparator
22350 View\SpecialChar \menuseparator
22354 Here is how it looks like:
22357 \begin_layout LyX-Code
22361 \begin_layout LyX-Code
22365 \begin_layout LyX-Code
22366 Icon "layout Standard"
22369 \begin_layout LyX-Code
22370 Icon "layout Section"
22373 \begin_layout LyX-Code
22374 Icon "layout LaTeX"
22377 \begin_layout LyX-Code
22378 Icon "layout LyX-Code"
22381 \begin_layout LyX-Code
22382 Icon "layout Scrap"
22385 \begin_layout LyX-Code
22389 \begin_layout LyX-Code
22393 \begin_layout LyX-Code
22394 Icon "buffer-typeset"
22397 \begin_layout LyX-Code
22398 Icon "build-program"
22401 \begin_layout LyX-Code
22405 \begin_layout LyX-Code
22409 \begin_layout LyX-Code
22413 \begin_layout LyX-Code
22417 \begin_layout LyX-Code
22421 \begin_layout Subsubsection
22422 Colors customization
22425 \begin_layout Standard
22426 There are a number of colors in LyX that can be customized in
22431 One of the things that bothers people is the LaTeX font color.
22432 The default color is red, since the scraps uses LaTeX font, and there is
22433 a lot of scraps in literate documents, you may get tired of seeing everything
22435 You can change it by going to the tabs
22444 \begin_layout Standard
22445 The next thing is the visible presence of the newline character in the screen.
22446 You can choose the color of this particular character and make it blend
22448 I recommend you choosing a color that is close to the background but not
22449 equal, that way you still can see it is there, but it is not bothering
22454 \begin_layout Chapter
22458 \begin_layout Standard
22459 You can do everything with LyX that you can do with LaTeX.
22460 However, LyX cannot support every LaTeX feature directly.
22461 But you can always use TeX Code.
22462 This chapter shows you some more special things you might want to use.
22463 For other special things you can do with figures, tables, floats, boxes
22464 and notes, have a look at the
22471 \begin_layout Section
22472 Multiple Text Columns
22475 \begin_layout Standard
22476 This feature is independent of the option
22478 Two-column document
22480 in the document settings under
22485 If you want to have 2
22486 \begin_inset space ~
22489 columns for the whole document, it is recommended to use the
22491 Two-column document
22494 For all other cases use this feature.
22497 \begin_layout Standard
22498 To use multiple text columns in your document, you have to load the module
22505 Document\SpecialChar \menuseparator
22506 Settings\SpecialChar \menuseparator
22509 ) and must have the LaTeX-package
22514 \begin_inset Index idx
22517 \begin_layout Plain Layout
22518 LaTeX-packages ! multicol
22526 \begin_layout Standard
22527 Footnotes within multiple columns will be placed at the bottom of the page
22528 and not under each column.
22529 Within the different columns you can use everything, with the limitation
22530 that for floats you need to use the float option
22537 \begin_layout Subsection
22541 \begin_layout Standard
22542 If you want to have 2
22543 \begin_inset space ~
22546 columns in your text, use the style
22548 Begin Multiple Columns
22550 where the columns should start.
22551 The content of the style is the number of the columns, so in this case
22553 \begin_inset Quotes eld
22557 \begin_inset Quotes erd
22561 At the point where the columns should end use the style
22563 End Multiple Columns
22568 \begin_layout Standard
22569 Here is an example:
22572 \begin_layout Begin Multiple Columns
22576 \begin_layout Standard
22581 The Adventure of the Empty House
22584 \begin_inset Newline newline
22589 Sir Arthur Conan Doyle
22592 \begin_layout Standard
22595 It was in the spring of the year 1894 that all London was interested, and
22596 the fashionable world dismayed, by the murder of the Honourable Ronald
22597 Adair under most unusual and inexplicable circumstances.
22598 The public has already learned those particulars of the crime which came
22599 out in the police investigation, but a good deal was suppressed upon that
22600 occasion, since the case for the prosecution was so overwhelmingly strong
22601 that it was not necessary to bring forward all the facts.
22602 Only now, at the end of nearly ten years, am I allowed to supply those
22603 missing links which make up the whole of that remarkable chain.
22604 The crime was of interest in itself, but that interest was as nothing to
22605 me compared to the inconceivable sequel, which afforded me the greatest
22606 shock and surprise of any event in my adventurous life.
22607 Even now, after this long interval, I find myself thrilling as I think
22608 of it, and feeling once more that sudden flood of joy, amazement, and increduli
22609 ty which utterly submerged my mind.
22610 Let me say to that public, which has shown some interest in those glimpses
22611 which I have occasionally given them of the thoughts and actions of a very
22612 remarkable man, that they are not to blame me if I have not shared my knowledge
22613 with them, for I should have considered it my first duty to do so, had
22614 I not been barred by a positive prohibition from his own lips, which was
22615 only withdrawn upon the third of last month.
22618 \begin_layout End Multiple Columns
22622 \begin_layout Standard
22623 Here is an example with 3
22624 \begin_inset space ~
22630 \begin_layout Begin Multiple Columns
22634 \begin_layout Standard
22637 It can be imagined that my close intimacy with Sherlock Holmes had interested
22638 me deeply in crime, and that after his disappearance I never failed to
22639 read with care the various problems which came before the public.
22640 And I even attempted, more than once, for my own private satisfaction,
22641 to employ his methods in their solution, though with indifferent success.
22642 There was none, however, which appealed to me like this tragedy of Ronald
22644 As I read the evidence at the inquest, which led up to a verdict of willful
22645 murder against some person or persons unknown, I realized more clearly
22646 than I had ever done the loss which the community had sustained by the
22647 death of Sherlock Holmes.
22648 There were points about this strange business which would, I was sure,
22649 have specially appealed to him, and the efforts of the police would have
22650 been supplemented, or more probably anticipated, by the trained observation
22651 and the alert mind of the first criminal agent in Europe.
22652 All day, as I drove upon my round, I turned over the case in my mind and
22653 found no explanation which appeared to me to be adequate.
22654 At the risk of telling a twice-told tale, I will recapitulate the facts
22655 as they were known to the public at the conclusion of the inquest.
22658 \begin_layout End Multiple Columns
22662 \begin_layout Standard
22663 You can have up to 10
22664 \begin_inset space ~
22667 columns if you want to, but that might not be very pleasant for the readers
22671 \begin_layout Standard
22672 \begin_inset Newpage newpage
22678 \begin_layout Subsection
22679 Columns inside Columns
22682 \begin_layout Standard
22683 You can also have columns inside columns:
22686 \begin_layout Begin Multiple Columns
22690 \begin_layout Standard
22693 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22694 at that time governor of one of the Australian colonies.
22695 Adair's mother had returned from Australia to undergo the operation for
22696 cataract, and she, her son Ronald, and her daughter Hilda were living together
22700 \begin_layout Begin Multiple Columns
22704 \begin_layout Standard
22707 The youth moved in the best society–had, so far as was known, no enemies
22708 and no particular vices.
22709 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22710 had been broken off by mutual consent some months before, and there was
22711 no sign that it had left any very profound feeling behind it.
22712 For the rest {sic} the man's life moved in a narrow and conventional circle,
22713 for his habits were quiet and his nature unemotional.
22714 Yet it was upon this easy-going young aristocrat that death came, in most
22715 strange and unexpected form, between the hours of ten and eleven-twenty
22716 on the night of March 30, 1894.
22719 \begin_layout End Multiple Columns
22723 \begin_layout Standard
22726 Ronald Adair was fond of cards–playing continually, but never for such stakes
22728 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22729 It was shown that, after dinner on the day of his death, he had played
22730 a rubber of whist at the latter club.
22731 He had also played there in the afternoon.
22736 The evidence of those who had played with him– Mr.
22737 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
22738 and that there was a fairly equal fall of the cards.
22739 Adair might have lost five pounds, but not more.
22740 His fortune was a considerable one, and such a loss could not in any way
22742 He had played nearly every day at one club or other, but he was a cautious
22743 player, and usually rose a winner.
22744 It came out in evidence that, in partnership with Colonel Moran, he had
22745 actually won as much as four hundred and twenty pounds in a sitting, some
22746 weeks before, from Godfrey Milner and Lord Balmoral.
22747 So much for his recent history as it came out at the inquest.
22750 \begin_layout End Multiple Columns
22754 \begin_layout Subsection
22758 \begin_layout Standard
22759 The examples in this section show some more special features of multiple
22763 \begin_layout Standard
22764 For more features of multiple columns, have a look at the documentation
22765 of the LaTeX-package
22770 \begin_inset Index idx
22773 \begin_layout Plain Layout
22774 LaTeX-packages ! multicol
22780 \begin_inset CommandInset citation
22789 \begin_layout Subsubsection
22793 \begin_layout Standard
22794 To add a preface text for multiple columns, add the command
22797 \begin_layout Standard
22803 \begin_layout Standard
22804 as TeX Code behind the number of columns in the
22806 Begin Multiple Columns
22809 Behind the command follows the preface text.
22810 At the end of the style use the command
22813 \begin_layout Standard
22819 \begin_layout Standard
22821 An example with some preface text:
22824 \begin_layout Standard
22825 \begin_inset VSpace bigskip
22831 \begin_layout Begin Multiple Columns
22836 \begin_layout Plain Layout
22843 And the story continues and continues and continues and continues\SpecialChar \ldots{}
22848 \begin_layout Plain Layout
22858 \begin_layout Standard
22861 On the evening of the crime, he returned from the club exactly at ten.
22862 His mother and sister were out spending the evening with a relation.
22863 The servant deposed that she heard him enter the front room on the second
22864 floor, generally used as his sitting-room.
22865 She had lit a fire there, and as it smoked she had opened the window.
22866 No sound was heard from the room until eleven-twenty, the hour of the return
22867 of Lady Maynooth and her daughter.
22868 Desiring to say good-night, she attempted to enter her son's room.
22869 The door was locked on the inside, and no answer could be got to their
22870 cries and knocking.
22871 Help was obtained, and the door forced.
22872 The unfortunate young man was found lying near the table.
22873 His head had been horribly mutilated by an expanding revolver bullet, but
22874 no weapon of any sort was to be found in the room.
22877 \begin_layout End Multiple Columns
22881 \begin_layout Standard
22882 You can also use a section heading as the preface if you use a section command
22883 as TeX Code behind the first TeX Code.
22884 For example the command
22887 \begin_layout Standard
22892 subsection{subsection title}
22895 \begin_layout Standard
22896 creates a subsection.
22897 In this example the preface is a subsubsection:
22900 \begin_layout Begin Multiple Columns
22905 \begin_layout Plain Layout
22916 \begin_layout Plain Layout
22925 This is a subsubsection heading as a preface
22929 \begin_layout Plain Layout
22940 \begin_layout Plain Layout
22950 \begin_layout Standard
22953 A minute examination of the circumstances served only to make the case more
22955 In the first place, no reason could be given why the young man should have
22956 fastened the door upon the inside.
22957 There was the possibility that the murderer had done this, and had afterwards
22958 escaped by the window.
22959 The drop was at least twenty feet, however, and a bed of crocuses in full
22961 Neither the flowers nor the earth showed any sign of having been disturbed,
22962 nor were there any marks upon the narrow strip of grass which separated
22963 the house from the road.
22964 Apparently, therefore, it was the young man himself who had fastened the
22966 But how did he come by his death? No one could have climbed up to the window
22967 without leaving traces.
22968 Suppose a man had fired through the window, he would indeed be a remarkable
22969 shot who could with a revolver inflict so deadly a wound.
22970 Again, Park Lane is a frequented thoroughfare; there is a cab stand within
22971 a hundred yards of the house.
22972 No one had heard a shot.
22975 \begin_layout End Multiple Columns
22979 \begin_layout Standard
22980 If there is less vertical space left on the page at the beginning of the
22981 multiple columns than needed for 6
22982 \begin_inset space ~
22985 text lines, a page break will be inserted before the multiple columns.
22986 Depending on the number of lines of the preface text, you might want to
22988 It is determined by inserting the command
22991 \begin_layout Standard
22999 \begin_layout Standard
23000 as TeX Code behind the preface definition but before the final
23009 is hereby the number of text lines.
23010 In this example the space is set to 7
23011 \begin_inset space ~
23017 \begin_layout Begin Multiple Columns
23022 \begin_layout Plain Layout
23033 \begin_layout Plain Layout
23042 This is the sectioning command
23043 \begin_inset Newline newline
23047 \begin_inset Newline newline
23050 with multiple text lines
23054 \begin_layout Plain Layout
23065 \begin_layout Plain Layout
23078 \begin_layout Plain Layout
23088 \begin_layout Standard
23091 On the evening of the crime, he returned from the club exactly at ten.
23092 His mother and sister were out spending the evening with a relation.
23093 The servant deposed that she heard him enter the front room on the second
23094 floor, generally used as his sitting-room.
23095 She had lit a fire there, and as it smoked she had opened the window.
23096 No sound was heard from the room until eleven-twenty, the hour of the return
23097 of Lady Maynooth and her daughter.
23098 Desiring to say good-night, she attempted to enter her son's room.
23099 The door was locked on the inside, and no answer could be got to their
23100 cries and knocking.
23101 Help was obtained, and the door forced.
23102 The unfortunate young man was found lying near the table.
23103 His head had been horribly mutilated by an expanding revolver bullet, but
23104 no weapon of any sort was to be found in the room.
23107 \begin_layout End Multiple Columns
23111 \begin_layout Subsubsection
23115 \begin_layout Standard
23116 The amount of space before and after multiple columns can be changed by
23117 changing the length
23124 For example the command
23127 \begin_layout Standard
23137 \begin_layout Standard
23138 in TeX Code changes its value to 3
23139 \begin_inset space \thinspace{}
23143 The change must be made before the multiple columns' start.
23144 The predefined value is 13
23145 \begin_inset space \thinspace{}
23151 \begin_layout Standard
23159 \begin_inset space \thinspace{}
23165 \begin_layout Standard
23169 \begin_layout Plain Layout
23175 multicolsep}{2.5cm}
23183 \begin_layout Begin Multiple Columns
23187 \begin_layout Standard
23190 All day I turned these facts over in my mind, endeavouring to hit upon some
23191 theory which could reconcile them all, and to find that line of least resistanc
23192 e which my poor friend had declared to be the starting-point of every investigat
23194 I confess that I made little progress.
23195 In the evening I strolled across the Park, and found myself about six o'clock
23196 at the Oxford Street end of Park Lane.
23197 A group of loafers upon the pavements, all staring up at a particular window,
23198 directed me to the house which I had come to see.
23199 A tall, thin man with coloured glasses, whom I strongly suspected of being
23200 a plain-clothes detective, was pointing out some theory of his own, while
23201 the others crowded round to listen to what he said.
23202 I got as near him as I could, but his observations seemed to me to be absurd,
23203 so I withdrew again in some disgust.
23204 As I did so I struck against an elderly, deformed man, who had been behind
23205 me, and I knocked down several books which he was carrying.
23208 \begin_layout End Multiple Columns
23212 \begin_layout Standard
23213 \begin_inset Note Greyedout
23216 \begin_layout Plain Layout
23221 The values you set with
23227 will be used for all following multiple columns until to change them again.
23235 \begin_layout Standard
23239 \begin_layout Plain Layout
23251 \begin_inset Note Note
23254 \begin_layout Plain Layout
23255 go back to the default
23263 \begin_layout Standard
23264 \begin_inset Newpage newpage
23270 \begin_layout Subsubsection
23274 \begin_layout Standard
23275 The width of the columns is automatically calculated, but you can modify
23276 the space between the columns.
23277 This is done by changing the length
23284 Its predefined value is 10
23285 \begin_inset space \thinspace{}
23289 Here is an example where
23296 \begin_inset space \thinspace{}
23302 \begin_layout Standard
23306 \begin_layout Plain Layout
23320 \begin_layout Begin Multiple Columns
23324 \begin_layout Standard
23327 My observations of No.
23328 \begin_inset space \space{}
23331 427 Park Lane did little to clear up the problem in which I was interested.
23332 The house was separated from the street by a low wall and railing, the
23333 whole not more than five feet high.
23334 It was perfectly easy, therefore, for anyone to get into the garden, but
23335 the window was entirely inaccessible, since there was no water pipe or
23336 anything which could help the most active man to climb it.
23337 More puzzled than ever, I retraced my steps to Kensington.
23338 I had not been in my study five minutes when the maid entered to say that
23339 a person desired to see me.
23340 To my astonishment it was none other than my strange old book collector,
23341 his sharp, wizened face peering out from a frame of white hair, and his
23342 precious volumes, a dozen of them at least, wedged under his right arm.
23345 \begin_layout End Multiple Columns
23349 \begin_layout Standard
23353 \begin_layout Plain Layout
23365 \begin_inset Note Note
23368 \begin_layout Plain Layout
23369 go back to the default
23377 \begin_layout Subsubsection
23381 \begin_layout Standard
23382 Between the columns a rule with a width of the length
23389 If this rule width is set to 0
23390 \begin_inset space \thinspace{}
23393 pt (this is the default), the rule is suppressed.
23394 In the following example the line is 2
23395 \begin_inset space \thinspace{}
23401 \begin_layout Standard
23405 \begin_layout Plain Layout
23411 columnseprule}{2pt}
23419 \begin_layout Begin Multiple Columns
23423 \begin_layout Standard
23426 \begin_inset Quotes eld
23429 You're surprised to see me, sir,
23430 \begin_inset Quotes erd
23433 said he, in a strange, croaking voice.
23436 \begin_layout Standard
23439 I acknowledged that I was.
23442 \begin_layout Standard
23445 \begin_inset Quotes eld
23448 Well, I've a conscience, sir, and when I chanced to see you go into this
23449 house, as I came hobbling after you, I thought to myself, I'll just step
23450 in and see that kind gentleman, and tell him that if I was a bit gruff
23451 in my manner there was not any harm meant, and that I am much obliged to
23452 him for picking up my books.
23453 \begin_inset Quotes erd
23459 \begin_layout Standard
23462 \begin_inset Quotes eld
23465 You make too much of a trifle,
23466 \begin_inset Quotes erd
23471 \begin_inset Quotes eld
23474 May I ask how you knew who I was?
23475 \begin_inset Quotes erd
23481 \begin_layout Standard
23484 \begin_inset Quotes eld
23487 Well, sir, if it isn't too great a liberty, I am a neighbour of yours, for
23488 you'll find my little bookshop at the corner of Church Street, and very
23489 happy to see you, I am sure.
23490 Maybe you collect yourself, sir.
23494 \begin_inset space ~
23507 --a bargain, every one of them.
23508 With five volumes you could just fill that gap on that second shelf.
23509 It looks untidy, does it not, sir?
23510 \begin_inset Quotes erd
23516 \begin_layout End Multiple Columns
23520 \begin_layout Standard
23524 \begin_layout Plain Layout
23530 columnseprule}{0pt}
23536 \begin_inset Note Note
23539 \begin_layout Plain Layout
23540 go back to the default
23548 \begin_layout Standard
23549 \begin_inset Newpage newpage
23555 \begin_layout Section
23556 Non-standard Paragraph Shapes
23559 \begin_layout Standard
23563 \begin_layout Plain Layout
23575 \begin_layout Standard
23579 \begin_layout Plain Layout
23588 \begin_layout Plain Layout
23602 \begin_layout Standard
23607 \begin_layout Plain Layout
23618 \begin_layout Plain Layout
23627 \begin_layout Plain Layout
23636 \begin_layout Plain Layout
23645 \begin_layout Plain Layout
23654 \begin_layout Plain Layout
23663 \begin_layout Plain Layout
23672 \begin_layout Plain Layout
23681 \begin_layout Plain Layout
23690 \begin_layout Plain Layout
23699 \begin_layout Plain Layout
23708 \begin_layout Plain Layout
23717 \begin_layout Plain Layout
23726 \begin_layout Plain Layout
23735 \begin_layout Plain Layout
23744 \begin_layout Plain Layout
23753 \begin_layout Plain Layout
23762 \begin_layout Plain Layout
23771 \begin_layout Plain Layout
23780 \begin_layout Plain Layout
23786 There are times when the tyranny of rectangular paragraphs must be overthrown.
23787 In such situations, a call to the delightful plain TeX command
23794 As you can see, completely arbitrary shapes can be laid out with a suitable
23795 set of line length definitions.
23796 While this parshape may look a bit silly and useless, one could conceive
23797 of situations such as finely tuned dropped capitals, word wrapping around
23798 non-rectangular graphics, etc.
23799 which will benefit from such handcrafting.
23802 \begin_layout Standard
23803 \begin_inset VSpace bigskip
23809 \begin_layout Standard
23814 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23821 is the number of lines of text which define the paragraph.
23822 If there turn out to be fewer lines, the shape is truncated; if there are
23823 more, the excess lines have the same dimensions as the last line of the
23833 entries specify the indentation of the line from the left margin, and the
23834 length of the line as measured from that point.
23835 The shape applies only to the current paragraph; everything is reset to
23836 normal for the next paragraph.
23839 \begin_layout Standard
23843 \begin_layout Plain Layout
23855 \begin_layout Bibliography
23856 \begin_inset CommandInset bibitem
23857 LatexCommand bibitem
23862 Documentation of the LaTeX-package
23863 \begin_inset CommandInset href
23866 target "http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf"
23871 \begin_inset Index idx
23874 \begin_layout Plain Layout
23875 LaTeX-packages ! multicol