1 #LyX 2.0 created this file. For more info see http://www.lyx.org/
7 % DO NOT ALTER THIS PREAMBLE!!!
9 % This preamble is designed to ensure that the manual prints
10 % out as advertised. If you mess with this preamble,
11 % parts of the manual may not print out as expected. If you
12 % have problems LaTeXing this file, please contact
13 % the documentation team
14 % email: lyx-docs@lists.lyx.org
20 % set fonts for nicer pdf view
21 \IfFileExists{lmodern.sty}
22 {\usepackage{lmodern}}{}
24 \fi % end if pdflatex is used
26 % the pages of the TOC are numbered roman
27 % and a PDF-bookmark for the TOC is added
29 \let\myTOC\tableofcontents
30 \renewcommand{\tableofcontents}{%
31 \pdfbookmark[1]{\contentsname}{}
34 \pagenumbering{arabic}}
36 % redefine the \LyX macro for PDF bookmarks
37 \def\LyX{\texorpdfstring{%
38 L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}
41 % used for multi-column text
44 % extra space for tables
45 \newcommand{\extratablespace}[1]{\noalign{\vskip#1}}
47 \options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
48 \use_default_options false
54 \maintain_unincluded_children false
57 InsetLayout CharStyle:MenuItem
66 \newcommand*{\menuitem}[1]{{\sffamily #1}}
71 \language_package default
76 \font_typewriter default
77 \font_default_family default
78 \use_non_tex_fonts false
85 \default_output_format default
87 \bibtex_command default
88 \index_command default
92 \pdf_title "LyX's Additional Features manual"
93 \pdf_author "LyX Team"
94 \pdf_subject "LyX's additional features documentation"
95 \pdf_keywords "LyX, Documentation, Additional"
97 \pdf_bookmarksnumbered true
98 \pdf_bookmarksopen false
99 \pdf_bookmarksopenlevel 1
100 \pdf_breaklinks false
104 \pdf_pdfusetitle false
105 \pdf_quoted_options "linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue, pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
115 \paperorientation portrait
124 \paragraph_separation indent
125 \paragraph_indentation default
126 \quotes_language english
129 \paperpagestyle headings
130 \tracking_changes false
131 \output_changes false
140 Additional LyX Features
143 \begin_layout Subtitle
152 \begin_layout Plain Layout
154 Principal maintainer of this file is
159 If you have comments or error corrections, please send them to the LyX
160 Documentation mailing list,
161 \begin_inset Flex Code
164 \begin_layout Plain Layout
166 <lyx-docs@lists.lyx.org>
179 \begin_layout Standard
180 \begin_inset CommandInset toc
181 LatexCommand tableofcontents
188 \begin_layout Chapter
192 \begin_layout Standard
193 This manual is essentially Part II of the
195 User's Guide\SpecialChar \@.
198 The reason for separating this document out is simple: the
202 is already quite lengthy, and it contains information on all of the basic
203 features one needs to know in order to prepare most documents.
204 However, the LyX Team has worked to make LyX extensible through various
205 configuration files and external packages.
206 That means that if you want to support the Fizzwizzle LaTeX package, you
207 can create a layout file (or module) for it without having to alter LyX
209 We've already had contributions of several new features this way, and some
210 of them are documented here.
211 There are also some more `advanced' features, such as how to control the
212 presentation of bibliographies and how to work with multi-part documents,
213 that are not covered in the
217 and are discussed here.
220 \begin_layout Standard
221 This manual also documents some special features, like fax support, version
222 control, and SGML support, which require additional software to work properly.
223 There is also a chapter on LyX's support for HTML.
224 And lastly, there's a chapter of LaTeX tools and tips, things you can use
225 to spruce up your documents by directly using the powerful features of
231 only WYSIWYM and will only ever interface to some, not all, LaTeX features.
234 \begin_layout Standard
235 If you haven't read the
239 yet, you are definitely in the wrong manual.
244 is the first place to go, since it describes the notation and format of
246 You should also be thoroughly familiar with the
250 and all of the basic features of LyX before attempting to read this one.
253 \begin_layout Standard
254 Since many of the topics in this manual depend heavily on LyX's interaction
255 with LaTeX, this first chapter covers the inner workings of LyX and how
256 to direct LyX to generate exactly the LaTeX code you want.
257 It is obviously for more seasoned LyX users.
260 \begin_layout Chapter
264 \begin_layout Section
268 \begin_layout Standard
269 This chapter is for both TeX-nicians and the LaTeX-curious.
270 In it, we'll explain how LyX and LaTeX work together to produce printable
272 This is the only place in any of the manuals where we assume you know something
276 \begin_layout Standard
277 At one time, LyX was called a
278 \begin_inset Quotes eld
281 WYSIWYM frontend to LaTeX,
282 \begin_inset Quotes erd
285 but that's no longer true.
286 There are frontends to LaTeX out there.
290 \begin_layout Plain Layout
291 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
292 There are also the LaTeX modes for vi and emacs, of course.
297 These are basically text editors with the ability to run LaTeX and mark
298 any errors in the file you're editing.
307 run LaTeX, and it also indicates errors in the file, it also does much,
309 For one thing, you don't need to know LaTeX to use LyX effectively.
310 And LyX has added its own extensions to LaTeX.
311 Try the following sometime: select
312 \begin_inset Flex MenuItem
315 \begin_layout Plain Layout
316 Export\SpecialChar \menuseparator
323 \begin_inset Flex MenuItem
326 \begin_layout Plain Layout
333 \begin_inset Flex MenuItem
336 \begin_layout Plain Layout
337 View\SpecialChar \menuseparator
343 ), then look at the preamble of the resulting
344 \begin_inset Flex Code
347 \begin_layout Plain Layout
354 You'll notice a variety of new macros defined specifically by LyX.
355 These macros are defined automatically, according to the features you use
359 \begin_layout Standard
360 There are several commands that automatically invoke LaTeX.
364 \begin_layout Itemize
365 \begin_inset Flex MenuItem
368 \begin_layout Plain Layout
369 View\SpecialChar \menuseparator
378 \begin_layout Itemize
379 \begin_inset Flex MenuItem
382 \begin_layout Plain Layout
383 View\SpecialChar \menuseparator
384 Update\SpecialChar \menuseparator
393 \begin_layout Itemize
394 \begin_inset Flex MenuItem
397 \begin_layout Plain Layout
398 File\SpecialChar \menuseparator
407 \begin_layout Itemize
408 \begin_inset Flex MenuItem
411 \begin_layout Plain Layout
412 File\SpecialChar \menuseparator
421 \begin_layout Standard
422 They will only invoke LaTeX if the file has changed since the last time
427 \begin_layout Standard
428 When LyX runs LaTeX on the file you're editing, it performs these steps:
431 \begin_layout Enumerate
432 Convert the document to LaTeX and save to a file with the extension
433 \begin_inset Flex Code
436 \begin_layout Plain Layout
443 \begin_inset Flex Code
446 \begin_layout Plain Layout
455 \begin_layout Enumerate
457 \begin_inset Flex Code
460 \begin_layout Plain Layout
466 file (maybe several times), and run any other commands (such as
467 \begin_inset Flex Code
470 \begin_layout Plain Layout
477 \begin_inset Flex Code
480 \begin_layout Plain Layout
486 ) needed to compile the LaTeX file.
489 \begin_layout Enumerate
490 If there are any errors, show the error log.
493 \begin_layout Standard
494 If you've run LaTeX using
495 \begin_inset Flex MenuItem
498 \begin_layout Plain Layout
501 \SpecialChar \menuseparator
509 , LyX then runs a DVI viewer to display the DVI-file.
511 \begin_inset Flex MenuItem
514 \begin_layout Plain Layout
517 \SpecialChar \menuseparator
525 , LyX performs further steps:
528 \begin_layout Itemize
530 \begin_inset Flex Code
533 \begin_layout Plain Layout
539 to convert the DVI file to PostScript.
542 \begin_layout Itemize
543 Run a PostScript viewer, such as
544 \begin_inset Flex Code
547 \begin_layout Plain Layout
553 , to display the PostScript file.
556 \begin_layout Standard
557 LyX does similar things when viewing, or exporting, other formats.
560 \begin_layout Section
561 Translating LaTeX files into LyX
564 \begin_layout Standard
565 You can import a LaTeX file into LyX by using the
566 \begin_inset Flex MenuItem
569 \begin_layout Plain Layout
570 File\SpecialChar \menuseparator
571 Import\SpecialChar \menuseparator
578 This will call a program named
579 \begin_inset Flex Code
582 \begin_layout Plain Layout
588 which will create a file
589 \begin_inset Flex Code
592 \begin_layout Plain Layout
599 \begin_inset Flex Code
602 \begin_layout Plain Layout
609 LyX will then open that file.
613 \begin_layout Plain Layout
614 \begin_inset Flex Code
617 \begin_layout Plain Layout
623 can also be run from the command line, of course.
631 \begin_layout Standard
632 \begin_inset Flex Code
635 \begin_layout Plain Layout
641 will translate most legal LaTeX, but not everything.
642 It will put things it doesn't understand into TeX code, so after translating
644 \begin_inset Flex Code
647 \begin_layout Plain Layout
653 , you can look for TeX code and hand-edit it until it looks right.
656 \begin_layout Standard
657 If you don't know what TeX code is, read the next section.
660 \begin_layout Section
661 \begin_inset CommandInset label
663 name "sec:Inserting-TeX-Code"
667 Inserting TeX Code into LyX Documents
670 \begin_layout Standard
671 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
672 You can always insert TeX code into any LyX document.
673 LyX cannot, and will never be able to, display every possible LaTeX construct.
674 If ever you need to insert LaTeX commands into your LyX document, you can
676 \begin_inset Flex Code
679 \begin_layout Plain Layout
685 box, which you can insert into your document with
686 \begin_inset Flex MenuItem
689 \begin_layout Plain Layout
690 Insert\SpecialChar \menuseparator
699 \begin_layout Standard
700 Here's an example of inserting LaTeX commands in a LyX document.
701 The code looks like this:
704 \begin_layout LyX-Code
708 \begin_inset Newline newline
714 \begin_inset Newline newline
717 This is an example for a minipage environment.
719 \begin_inset Newline newline
722 can put nearly everything in it, even (non-floating)
723 \begin_inset Newline newline
728 \begin_inset Newline newline
734 \begin_inset Newline newline
738 \begin_inset Newline newline
744 \begin_inset Newline newline
750 \begin_inset Newline newline
756 \begin_inset Newline newline
761 \begin_inset Newline newline
767 \begin_inset Newline newline
773 \begin_inset Newline newline
779 \begin_inset Newline newline
787 \begin_layout LyX-Code
791 \begin_layout Standard
793 \begin_inset Flex Code
796 \begin_layout Plain Layout
802 box containing this text is directly after this paragraph.
803 Those of you reading the manual in LyX will only see the TeX code inset.
804 Those reading a printed version of the manuals will see the actual results:
807 \begin_layout Standard
811 \begin_layout Plain Layout
818 \begin_layout Plain Layout
825 \begin_layout Plain Layout
827 This is an example for a minipage environment.
828 You can put nearly everything in it, even (non-floating) figures and tables.
832 \begin_layout Plain Layout
839 \begin_layout Plain Layout
844 \begin_layout Plain Layout
851 \begin_layout Plain Layout
858 \begin_layout Plain Layout
865 \begin_layout Plain Layout
871 \begin_layout Plain Layout
878 \begin_layout Plain Layout
885 \begin_layout Plain Layout
892 \begin_layout Plain Layout
904 \begin_layout Standard
905 In addition to using TeX code, you can also create a separate file containing
906 some complex LaTeX structure and then use
907 \begin_inset Flex MenuItem
910 \begin_layout Plain Layout
911 Insert\SpecialChar \menuseparator
921 to include your file (you should select the type
922 \begin_inset Flex Code
925 \begin_layout Plain Layout
932 We recommend that you only do this if you have a
933 \begin_inset Flex Code
936 \begin_layout Plain Layout
947 Otherwise, you'll have a big job tracking down LaTeX errors.
950 \begin_layout Standard
951 There are a few last points to emphasize:
954 \begin_layout Itemize
959 check if your LaTeX code is correct.
962 \begin_layout Itemize
963 Beware reinventing the wheel.
966 \begin_layout Standard
967 On that last point, LyX does have quite a few features tucked into it, and
969 Be sure to check the manuals to make sure that LyX doesn't have such-and-such
970 feature before you decide you have to do it by hand.
971 Moreover, there are numerous LaTeX packages out there to do all sorts of
972 things, from labels to envelopes to fancy multipage tables.
974 \begin_inset CommandInset href
977 target "http://www.ctan.org/"
981 for details, and see chapter
982 \begin_inset CommandInset ref
984 reference "cha:secrets"
991 \begin_layout Standard
992 If you do need to do some wild and fancy things within your document, be
993 sure to check out a good LaTeX book for assistance.
994 There are a number of them listed in the bibliography of the
1001 \begin_layout Section
1002 LyX and the LaTeX Preamble
1005 \begin_layout Subsection
1006 About the LaTeX Preamble
1009 \begin_layout Standard
1010 If you already know LaTeX, there is no need to explain here what the preamble
1012 If you don't, the following will give you some ideas—we recommend again
1013 that you consult a LaTeX book for further information.
1014 In any case, you should read the points below, because they explain what
1015 you can do and what you don't need to do in the LaTeX preamble of a LyX
1019 \begin_layout Standard
1020 The LaTeX preamble comes at the very beginning of a document,
1028 \begin_layout Itemize
1029 Declare the document class.
1031 \begin_inset Newline newline
1034 LyX already does this for you.
1035 If you're a seasoned LaTeX-nician, and you have a custom document class
1036 you want to use, check out the
1038 Customization Manual
1040 for information on how to make LyX interface to it.
1043 \begin_layout Itemize
1044 Declare the usage of packages.
1046 \begin_inset Newline newline
1049 LaTeX packages provide special commands, which are only available within
1050 a document when the package has been declared in the preamble.
1051 For example, the package
1052 \begin_inset Flex Code
1055 \begin_layout Plain Layout
1061 forces all paragraphs to be indented.
1062 There are other packages for labels, envelopes, margins, etc.
1066 \begin_layout Itemize
1067 Set counters, variables, lengths and widths.
1069 \begin_inset Newline newline
1072 There are several LaTeX counters and variables which
1076 be set globally from within the preamble in order to have the desired effect.
1077 (There are variables which you can set and reset inside the document, too.)
1078 Margins are a good example of something which must be set in the preamble.
1079 Another example is the label format for lists.
1080 You can actually set these just about anywhere, but it's best to do it
1081 just once, inside the preamble.
1084 \begin_layout Itemize
1085 Declare user defined commands (with
1086 \begin_inset Flex Code
1089 \begin_layout Plain Layout
1098 \begin_inset Flex Code
1101 \begin_layout Plain Layout
1110 \begin_inset Newline newline
1113 These are abbreviations for LaTeX commands which appear very often inside
1115 Although the preamble is a good place to declare such commands, they
1119 be declared anywhere (before they are used for the first time, of course).
1120 This can be useful if there is a lot of raw LaTeX code in your document,
1121 which normally should not be the case.
1124 \begin_layout Standard
1125 LyX adds its own set of definitions to the preamble of the
1126 \begin_inset Flex Code
1129 \begin_layout Plain Layout
1136 This makes LaTeX files generated by LyX portable.
1139 \begin_layout Subsection
1140 Changing the Preamble
1143 \begin_layout Standard
1144 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1145 can't change them without patching LyX itself.
1146 You can, however, add your own stuff to the preamble by selecting
1147 \begin_inset Flex MenuItem
1150 \begin_layout Plain Layout
1152 \begin_inset space ~
1161 \begin_inset Flex MenuItem
1164 \begin_layout Plain Layout
1165 Document\SpecialChar \menuseparator
1172 LyX adds anything in the
1173 \begin_inset Flex MenuItem
1176 \begin_layout Plain Layout
1182 dialog to its own built-in preamble.
1183 Before adding your own declarations in the preamble, you should make sure
1184 that LyX doesn't already support what you want to do.
1185 (Remember what we said about reinventing the wheel?) Also,
1187 make sure your preamble code is correct
1190 LyX doesn't check it for you.
1191 If there is an error, you're likely to get an error like
1192 \begin_inset Quotes eld
1196 \begin_inset Flex Code
1199 \begin_layout Plain Layout
1208 \begin_inset Quotes erd
1212 If you see this error, check your preamble.
1215 \begin_layout Subsection
1219 \begin_layout Standard
1220 Here are some examples of what you can add to a preamble, and what they
1224 \begin_layout Subsubsection
1228 \begin_layout Standard
1229 There are two variables under LaTeX that control page position:
1230 \begin_inset Flex Code
1233 \begin_layout Plain Layout
1242 \begin_inset Flex Code
1245 \begin_layout Plain Layout
1254 Their names should be self-explanatory.
1255 These variables are useful if you think for a moment about computer labels.
1256 Sometimes, the size of a print medium and the area of the medium that you
1257 can actually print on aren't the same.
1259 \begin_inset Flex Code
1262 \begin_layout Plain Layout
1271 \begin_inset Flex Code
1274 \begin_layout Plain Layout
1285 \begin_layout Standard
1286 The default values for
1287 \begin_inset Flex Code
1290 \begin_layout Plain Layout
1299 \begin_inset Flex Code
1302 \begin_layout Plain Layout
1311 \begin_inset space \thinspace{}
1315 \begin_inset space \thinspace{}
1319 \begin_inset space \space{}
1322 the page isn't shifted.
1323 Unfortunately, some DVI drivers always seem to shift the page.
1324 We have no idea why, or why the sysadmin hasn't fixed such behavior.
1325 If you're using LyX on a system that you don't personally maintain, and
1326 your sysadmin is a doofus,
1327 \begin_inset Flex Code
1330 \begin_layout Plain Layout
1339 \begin_inset Flex Code
1342 \begin_layout Plain Layout
1351 Suppose your left and top margins are always 0.5
1352 \begin_inset space \thinspace{}
1356 You can add this to the preamble:
1359 \begin_layout LyX-Code
1367 \begin_layout LyX-Code
1375 \begin_layout Standard
1376 and your margins should now be correct.
1379 \begin_layout Subsubsection
1383 \begin_layout Standard
1384 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1385 There's a rather nice package, available at your nearest CTAN archive,
1386 for printing sheets of labels:
1387 \begin_inset Flex Code
1390 \begin_layout Plain Layout
1397 Now, your system may not have this package installed by default.
1398 We leave that up to you to check.
1399 You'll also want to read the documentation for it; we're not going to do
1401 Since this is an example, however, we'll give you an example of how you
1405 \begin_layout Standard
1406 First, make sure you're using the
1407 \begin_inset Flex Code
1410 \begin_layout Plain Layout
1417 Next, you need to put the following in your preamble:
1420 \begin_layout LyX-Code
1426 \begin_layout LyX-Code
1432 \begin_layout LyX-Code
1438 \begin_layout LyX-Code
1444 \begin_layout LyX-Code
1450 \begin_layout LyX-Code
1456 \begin_layout LyX-Code
1462 \begin_layout Standard
1463 This sets things up for Avery label sheets, stock #5360.
1464 You're now ready to print labels, but you'll need to insert LaTeX code,
1465 placing the commands
1466 \begin_inset Flex Code
1469 \begin_layout Plain Layout
1478 \begin_inset Flex Code
1481 \begin_layout Plain Layout
1489 around each label text.
1490 This and other special features of
1491 \begin_inset Flex Code
1494 \begin_layout Plain Layout
1500 are explained in its documentation.
1503 \begin_layout Standard
1504 Someday, someone may write a LyX layout file to support this package directly.
1505 Maybe that someone is you.
1508 \begin_layout Subsubsection
1509 Example #3: Paragraph Indentation
1512 \begin_layout Standard
1513 Americans are trained to indent the first line of
1518 As with all of their other weird quirks, most Americans will whine and
1519 moan until they can have their way and indent the first line of all paragraphs.
1528 \begin_layout Standard
1529 Of course, this behavior isn't standard typography.
1530 In books, you typically only indent the first line of a paragraph
1534 it follows another one.
1535 The idea behind indenting the first line of a paragraph is to distinguish
1536 neighboring paragraphs from one another.
1537 If there is no previous paragraph—for example, if it follows a figure or
1538 is the first paragraph in a section—then there is no need for indentation.
1542 \begin_layout Standard
1543 If you're a typical American (we're still joking!), though, you don't care
1544 about such esoteric things; you want your indentation! Add this to the
1548 \begin_layout LyX-Code
1551 usepackage{indentfirst}
1554 \begin_layout Standard
1555 If your TeX distribution isn't braindead, you'll have this package, and
1556 all of your paragraphs will get the indentation the Founding Fathers intended
1560 \begin_layout Subsubsection
1561 Example #4: This Document
1564 \begin_layout Standard
1565 You can also check out the preamble of this document to get an idea of some
1566 of the advanced things you can do.
1567 Also, there are more examples and an assortment of LaTeX
1568 \begin_inset Quotes eld
1572 \begin_inset Quotes erd
1576 \begin_inset space ~
1580 \begin_inset CommandInset ref
1582 reference "cha:secrets"
1590 \begin_layout Section
1591 LyX and LaTeX Errors
1594 \begin_layout Standard
1595 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1597 It then uses the logfile from the LaTeX run to do a post-mortem.
1598 After analyzing the logfile,LyX displays a dialog listing the errors.
1599 Clicking on any one of them will take you to the position in your LyX file
1600 where the error occurred.
1604 \begin_layout Plain Layout
1606 Analyzing the logfile is a tough job, and LyX doesn't always go to the
1608 There are also cases where LaTeX reports the error on one line, but the
1609 actual error is earlier.
1610 This is not unlike forgetting a closing brace in a program: You'll get
1611 an error, but only later.
1619 \begin_layout Standard
1620 Some folks also like to look at the log file directly: It is available from
1622 \begin_inset Flex MenuItem
1625 \begin_layout Plain Layout
1628 \SpecialChar \menuseparator
1632 \begin_inset space ~
1641 There are some fairly common error messages and warnings.
1642 We'll cover those here.
1643 You should look at a good LaTeX book for a complete listing.
1646 \begin_layout Itemize
1647 \begin_inset Flex Code
1650 \begin_layout Plain Layout
1657 \begin_inset Newline newline
1660 Anything beginning with these words is a warning message for the purpose
1662 \begin_inset Quotes eld
1666 \begin_inset Quotes erd
1669 the LaTeX code itself.
1670 You'll get messages like this if you added or changed cross-references
1671 or bibliography entries, in which case, LaTeX is trying to tell you that
1672 you need to make another run.
1673 You can by-and-large ignore these.
1676 \begin_layout Itemize
1677 \begin_inset Flex Code
1680 \begin_layout Plain Layout
1687 \begin_inset Newline newline
1690 Another warning message, this time about fonts which LaTeX couldn't find.
1691 The rest of the message will often say something about a replacement font
1693 You can safely ignore these, too.
1696 \begin_layout Itemize
1697 \begin_inset Flex Code
1700 \begin_layout Plain Layout
1709 \begin_inset Newline newline
1717 They are warnings about lines that were too long and run past the right
1719 Almost always, this is unnoticeable in the final output.
1720 (It can be just a point or two.) Or, only one or two characters extend past
1722 LaTeX seems to generate at least one of these messages for just about any
1724 \begin_inset Newline newline
1727 You can ignore these messages.
1728 Your eyes will tell you if there's a problem with something that's too
1729 wide; just look at the output.
1733 \begin_layout Plain Layout
1734 You can also enable the `draft' option in
1735 \begin_inset Flex MenuItem
1738 \begin_layout Plain Layout
1741 \SpecialChar \menuseparator
1749 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1757 \begin_layout Itemize
1758 \begin_inset Flex Code
1761 \begin_layout Plain Layout
1770 \begin_inset Newline newline
1773 Not quite as common as its cousin.
1774 LaTeX seems to like to print lines that are a bit too wide as opposed to
1775 ones that are a bit too narrow.
1776 We have no idea why.
1779 \begin_layout Itemize
1780 \begin_inset Flex Code
1783 \begin_layout Plain Layout
1792 \begin_inset Flex Code
1795 \begin_layout Plain Layout
1804 \begin_inset Newline newline
1807 Warnings about troubles breaking the page.
1808 Once again, just look at the output.
1809 Your eyes will tell you where something has gone wrong.
1812 \begin_layout Itemize
1813 \begin_inset Flex Code
1816 \begin_layout Plain Layout
1818 \begin_inset Quotes els
1822 \begin_inset Quotes ers
1831 \begin_inset Newline newline
1835 \begin_inset Quotes eld
1839 \begin_inset Quotes erd
1842 isn't installed on this system.
1843 This usually appears because some package your document needs isn't installed.
1844 If you didn't touch the preamble or didn't use the
1845 \begin_inset Flex Code
1848 \begin_layout Plain Layout
1856 command, then one of the packages LyX tried to load is missing.
1858 \begin_inset Flex MenuItem
1861 \begin_layout Plain Layout
1862 Help\SpecialChar \menuseparator
1868 to get a list of packages that LyX knows about.
1869 This file is updated whenever you reconfigure LyX (using
1870 \begin_inset Flex MenuItem
1873 \begin_layout Plain Layout
1874 Tools\SpecialChar \menuseparator
1880 ) and tells you which packages have been detected and what they do.
1881 \begin_inset Newline newline
1885 \begin_inset Flex Code
1888 \begin_layout Plain Layout
1896 command and the package in question isn't installed, then you'll need to
1897 install it yourself.
1900 \begin_layout Itemize
1901 \begin_inset Flex Code
1904 \begin_layout Plain Layout
1905 LaTeX Error: Unknown option
1911 \begin_inset Newline newline
1914 Error messages beginning with this are trying to tell you that you specified
1915 a bad or undefined option to a package.
1916 Check the package's documentation.
1919 \begin_layout Itemize
1920 \begin_inset Flex Code
1923 \begin_layout Plain Layout
1924 Undefined control sequence
1930 \begin_inset Newline newline
1933 If you've inserted LaTeX code into your document, but made a typo, you'll
1935 You may have forgotten to load a package.
1936 In any case, this error message usually means that you used an undefined
1941 \begin_layout Standard
1942 There are other error and warning messages.
1943 Some are self-explanatory.
1944 These are usually LaTeX messages.
1945 Others are downright cryptic.
1946 These are usually TeX error messages, and we really have
1950 what they mean or how to decipher them.
1954 \begin_layout Standard
1955 There's a general sequence you should follow if you get error messages:
1958 \begin_layout Enumerate
1959 Look at the LaTeX code you inserted for typos.
1962 \begin_layout Enumerate
1963 If there are no typos, check that you used the command(s) correctly.
1966 \begin_layout Enumerate
1967 If you get a bunch of error boxes piled up at the very top of the document—and
1968 especially if you see a
1969 \begin_inset Quotes eld
1973 \begin_inset Flex Code
1976 \begin_layout Plain Layout
1985 \begin_inset Quotes erd
1988 error—it means that there are errors in the preamble.
1989 Start debugging your preamble.
1992 \begin_layout Enumerate
1993 If you didn't add anything to the preamble and didn't add any LaTeX code
1994 to the document, the first suspect is your LaTeX distribution itself.
1995 Check for missing packages and install them.
1998 \begin_layout Enumerate
1999 Okay, so there are no missing packages.
2000 Did you use any of the fine-tuning options in LyX? Specifically, did you
2005 any of them, like trying to manually insert lots of
2006 \begin_inset Flex Code
2009 \begin_layout Plain Layout
2011 \begin_inset space ~
2020 \begin_inset Flex Code
2023 \begin_layout Plain Layout
2030 \begin_inset Flex Code
2033 \begin_layout Plain Layout
2039 ? Did you try to kludge something together with these instead of using the
2040 appropriate paragraph environment?
2043 \begin_layout Enumerate
2044 All right, you didn't use any of the fine-tuning options, you played by
2046 Did you try to pull a fancy maneuver? Did you do something funky inside
2047 a table or an equation, like inserting a graphic into a table cell?
2050 \begin_layout Enumerate
2051 Do you have long sections of text where LaTeX cannot find a place to break
2052 a line? By default, LaTeX is rather strict about how much extra inter-word
2053 spacing it will add in order to break a line.
2054 Preferably, you should rework the paragraph to avoid the problem.
2055 If this isn't an option, you can wrap your text in
2056 \begin_inset Flex Code
2059 \begin_layout Plain Layout
2067 to make LaTeX's line breaking more, well, sloppy.
2070 \begin_layout Enumerate
2071 Did you go overboard with the nesting? LyX (currently) doesn't check to
2072 make sure you're in the limits for nesting environments.
2073 If you nested a bunch of environments to the
2074 \begin_inset Formula $17^{\mathrm{th}}$
2077 level, that's the problem.
2078 (The limit in LaTeX is five.)
2081 \begin_layout Enumerate
2082 Okay, you didn't get any error messages, but your output looks awful.
2083 If you have a table or figure that's too wide or long for the page, you
2088 \begin_layout Enumerate
2089 rescale the figure so it fits.
2092 \begin_layout Enumerate
2093 trim down the table so it fits.
2097 \begin_layout Enumerate
2098 If something else is wrong with the output, and you didn't try to pull anything
2099 fancy or kludge the fine-tuning options, we're not sure what's wrong.
2102 \begin_layout Standard
2103 If all this doesn't help—well, then
2107 you might have found a bug in LyX\SpecialChar \ldots{}
2111 \begin_layout Chapter
2115 \begin_layout Section
2116 Customizing Bibliographies with BibTeX
2119 \begin_layout Standard
2120 The most basic information about how to use BibTeX with LyX is contained
2123 Bibliography databases (BibTeX)
2130 The following subsections explain special bibliography features supported
2134 \begin_layout Subsection
2135 Alternative Citation Styles
2138 \begin_layout Standard
2139 Standard BibTeX uses numbers (e.
2140 \begin_inset space \thinspace{}
2144 \begin_inset space \space{}
2148 \begin_inset Quotes eld
2152 \begin_inset Quotes erd
2155 ) to refer to a cited work.
2156 However, in many scientific disciplines, other citation styles are in use.
2157 The most common one is the author-year style (e.
2158 \begin_inset space \thinspace{}
2162 \begin_inset space \space{}
2166 \begin_inset Quotes eld
2170 \begin_inset Quotes erd
2174 LyX supports two packages that provide this style,
2175 \begin_inset Flex Code
2178 \begin_layout Plain Layout
2185 \begin_inset Flex Code
2188 \begin_layout Plain Layout
2195 Both packages have their pros and cons, which cannot be listed in detail.
2196 If you only want to have simple author-year (or author-numerical) style,
2197 or if you want to use one of the countless style files for
2198 \begin_inset Flex Code
2201 \begin_layout Plain Layout
2207 , than the established
2208 \begin_inset Flex Code
2211 \begin_layout Plain Layout
2217 package is probably your choice.
2218 If you need special features like short title references, ibidem etc., you
2220 \begin_inset Flex Code
2223 \begin_layout Plain Layout
2232 \begin_layout Standard
2233 The handling of both packages in LyX is basically the same.
2235 \begin_inset Flex MenuItem
2238 \begin_layout Plain Layout
2239 Document\SpecialChar \menuseparator
2246 \begin_inset Flex MenuItem
2249 \begin_layout Plain Layout
2256 \begin_inset Flex MenuItem
2259 \begin_layout Plain Layout
2266 \begin_inset Flex MenuItem
2269 \begin_layout Plain Layout
2276 With both packages, you will get some extra features in the citation dialog
2277 and you can select the style of the reference (
2278 \begin_inset Quotes eld
2282 \begin_inset Quotes erd
2286 \begin_inset Quotes eld
2290 \begin_inset Quotes erd
2294 \begin_inset Quotes eld
2298 \begin_inset Quotes erd
2302 \begin_inset Quotes eld
2306 \begin_inset Quotes erd
2310 Note that both packages need specifically designed style files.
2311 They both ship their own, but there are lots of additional style files,
2312 and there is even an interactive style file builder
2316 \begin_layout Plain Layout
2318 \begin_inset Flex URL
2321 \begin_layout Plain Layout
2323 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2334 \begin_inset Flex Code
2337 \begin_layout Plain Layout
2346 \begin_layout Subsection
2347 Sectioned Bibliographies
2350 \begin_layout Standard
2351 Sometimes you might need to divide your bibliography into several sections.
2352 If you are for instance a historian, the possibility to separate sources
2353 and scientific works is most likely a
2354 \begin_inset Quotes eld
2358 \begin_inset Quotes erd
2362 Unfortunately, BibTeX itself does not allow you to do this.
2363 But with the help of some LaTeX packages, BibTeX can be extended to fit
2367 \begin_layout Standard
2368 LyX provides native support for one of these packages,
2376 \begin_layout Plain Layout
2378 \begin_inset Flex URL
2381 \begin_layout Plain Layout
2383 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2393 The advantage of this package (compared to other packages like
2397 ) is that you don't need to define new citation commands.
2398 Instead, you need to prepare different bibliographic databases which include
2399 the entries for the different sections of the bibliography.
2400 For example: If you want to divide your bibliography into the sections
2402 \begin_inset Quotes eld
2406 \begin_inset Quotes erd
2410 \begin_inset Quotes eld
2414 \begin_inset Quotes erd
2417 , you first need to create two bibliographic databases, e.
2418 \begin_inset space \thinspace{}
2422 \begin_inset space \space{}
2426 \begin_inset Flex Code
2429 \begin_layout Plain Layout
2436 \begin_inset Flex Code
2439 \begin_layout Plain Layout
2449 \begin_layout Standard
2451 \begin_inset Flex MenuItem
2454 \begin_layout Plain Layout
2455 Document\SpecialChar \menuseparator
2462 \begin_inset Flex MenuItem
2465 \begin_layout Plain Layout
2472 \begin_inset Flex MenuItem
2475 \begin_layout Plain Layout
2476 Sectioned bibliography
2482 Now you can insert multiple BibTeX bibliographies, one for each section
2483 of your bibliography.
2484 Returning to our example: Insert the BibTeX bibliography
2485 \begin_inset Flex Code
2488 \begin_layout Plain Layout
2494 and a second one for the database
2495 \begin_inset Flex Code
2498 \begin_layout Plain Layout
2505 You are free to use the same or different styles for each section.
2506 Additionally, you can chose if the bibliography section should contain
2508 \begin_inset Quotes eld
2511 all cited references
2512 \begin_inset Quotes erd
2515 of the specified database(s) (which is the default),
2516 \begin_inset Quotes eld
2519 all uncited references
2520 \begin_inset Quotes erd
2524 \begin_inset Quotes eld
2528 \begin_inset Quotes erd
2532 This might be useful if you would like to separate your bibliography into
2534 \begin_inset Quotes eld
2538 \begin_inset Quotes erd
2542 \begin_inset Quotes eld
2546 \begin_inset Quotes erd
2550 \begin_inset Quotes eld
2554 \begin_inset Quotes erd
2558 The titles for the sections can be added as ordinary sections or subsections.
2560 \begin_inset Flex Code
2563 \begin_layout Plain Layout
2569 removes the bibliography title, you have manually re-add that, too (as
2570 a chapter* or section*, for instance).
2573 \begin_layout Subsection
2574 Multiple Bibliographies
2577 \begin_layout Standard
2578 Multiple bibliographies, e.
2579 \begin_inset space \thinspace{}
2583 \begin_inset space \space{}
2586 a bibliography for each section or chapter of the document, are not supported
2589 \begin_inset Flex Code
2592 \begin_layout Plain Layout
2598 package, which is used for the creation of sectioned bibliographies in
2599 LyX (see the previous section), provides an easy way to solve this task,
2600 if you are willing to use some
2601 \begin_inset Flex MenuItem
2604 \begin_layout Plain Layout
2611 \begin_inset space ~
2615 \begin_inset CommandInset ref
2617 reference "sec:Inserting-TeX-Code"
2625 \begin_layout Plain Layout
2626 An alternative approach is to use the
2627 \begin_inset Flex Code
2630 \begin_layout Plain Layout
2637 \begin_inset Flex Code
2640 \begin_layout Plain Layout
2646 package, respectively.
2654 \begin_layout Standard
2656 \begin_inset Flex MenuItem
2659 \begin_layout Plain Layout
2660 Document\SpecialChar \menuseparator
2667 \begin_inset Flex MenuItem
2670 \begin_layout Plain Layout
2677 \begin_inset Flex MenuItem
2680 \begin_layout Plain Layout
2681 Sectioned bibliography
2687 In the document, you have to enclose the sections, which shall contain
2688 their own bibliography (including the BibTeX bibliography itself), between
2690 \begin_inset Flex Code
2693 \begin_layout Plain Layout
2702 \begin_inset Flex Code
2705 \begin_layout Plain Layout
2713 (those commands have to be inserted as TeX code).
2714 The bibliography will contain all references which have been cited in the
2716 \begin_inset Flex Code
2719 \begin_layout Plain Layout
2730 If you are using this approach, then every citation reference has to be
2732 \begin_inset Flex Code
2735 \begin_layout Plain Layout
2743 \begin_inset Flex Code
2746 \begin_layout Plain Layout
2755 \begin_layout Section
2759 \begin_layout Subsection
2763 \begin_layout Standard
2764 When you are working on a large file with many sections, it is often convenient
2765 to break up the document into several files, or perhaps you have something
2766 where a table may change from time to time, but the preceding text does
2768 In these cases, you should seriously consider using multipart documents.
2769 For example, scientific papers often have five major sections: the introduction
2770 , observations, results, discussion, and conclusion.
2771 Each of these could be its own separate LyX file, with one
2772 \begin_inset Quotes eld
2776 \begin_inset Quotes erd
2779 file which contains the title, authors, abstract, references, etc., plus
2780 the five included files.
2781 It is important to note that each of these files is a full LyX file which
2782 can be formatted and printed on its own, as well as included in a master
2784 Each of these files must have the same document class, however—don't attempt
2785 to mix book classes with article classes.
2786 You may also include LaTeX files; however, these files must not have their
2788 \begin_inset space \thinspace{}
2792 \begin_inset space \space{}
2795 everything up to and including the
2796 \begin_inset Flex Code
2799 \begin_layout Plain Layout
2808 \begin_inset Flex Code
2811 \begin_layout Plain Layout
2819 line must be deleted) or else errors will be generated when you try to
2823 \begin_layout Standard
2824 LyX allows you to include files quite easily with
2825 \begin_inset Flex MenuItem
2828 \begin_layout Plain Layout
2829 Insert\SpecialChar \menuseparator
2831 \begin_inset space ~
2840 When you click on this selection a small box is inserted into the file
2841 at the current cursor location.
2842 Clicking on the box raises a dialog which allows you to select the file
2843 to be included, and the method of its inclusion.
2847 \begin_layout Standard
2848 The file selection box should by now be obvious.
2849 The three inclusion methods are
2850 \begin_inset Quotes eld
2854 \begin_inset Quotes erd
2858 \begin_inset Quotes eld
2862 \begin_inset Quotes erd
2866 \begin_inset Quotes eld
2870 \begin_inset Quotes erd
2874 The difference between
2875 \begin_inset Quotes eld
2879 \begin_inset Quotes erd
2883 \begin_inset Quotes eld
2887 \begin_inset Quotes erd
2890 is really only meaningful to LaTeXperts, but the practical difference is
2891 that files which are
2892 \begin_inset Quotes eld
2896 \begin_inset Quotes erd
2899 are typeset beginning on a new page, while files which are
2900 \begin_inset Quotes eld
2904 \begin_inset Quotes erd
2907 are typeset starting on the current page.
2910 \begin_layout Standard
2911 Generally, the master file is converted into a full LaTeX file before typesettin
2912 g, while the included files are converted to LaTeX files which do not have
2913 all the preamble information.
2916 \begin_layout Standard
2918 \begin_inset Quotes eld
2922 \begin_inset Quotes erd
2925 included file allows you to include a file typeset exactly as it appears
2927 \begin_inset space \thinspace{}
2931 \begin_inset space \space{}
2935 \begin_inset Flex Code
2938 \begin_layout Plain Layout
2944 mode, with the characters set in a fixed-width typewriter font.
2945 Normally, spaces in this file are invisible, though two consecutive spaces
2946 are conserved, unlike LyX's normal treatment of spaces.
2947 However, setting the
2948 \begin_inset Flex MenuItem
2951 \begin_layout Plain Layout
2953 \begin_inset space ~
2957 \begin_inset space ~
2961 \begin_inset space ~
2969 checkbox typesets a mark to unambiguously define the presence of a space.
2973 \begin_layout Subsection
2974 Cross-References Between Files
2977 \begin_layout Standard
2978 \begin_inset Box Shadowbox
2988 height_special "totalheight"
2991 \begin_layout Plain Layout
2992 This section is somewhat out of date.
2993 Need to describe default master documents and how children are opened when
3003 \begin_layout Standard
3004 It is possible to set up cross-references between the different files.
3005 First, open all the files in question: let's call them A and B in a two
3006 file example, where B is included in A.
3007 Let's say you insert a label in A, then want to reference it in B.
3008 Open the cross-reference dialog in whilst in document B, and you can select
3010 \begin_inset Quotes eld
3014 \begin_inset Quotes erd
3020 \begin_layout Subsection
3021 Bibliography Lists in all Subdocuments
3024 \begin_layout Standard
3025 \begin_inset Box Frameless
3035 height_special "totalheight"
3038 \begin_layout Plain Layout
3039 This section also needs updating.
3040 There is now material about this on the wiki, and it could be copied here.
3048 \begin_layout Standard
3049 Copy the bibliography list with all entries to all subdocuments and transform
3051 This way LyX will find the
3052 \begin_inset Flex Code
3055 \begin_layout Plain Layout
3061 -files and you can easily insert references without making the bibliography
3065 \begin_layout Standard
3066 As the bibliography list is in a comment, LaTeX won't use use it and the
3067 references will look like this: [?], instead of like this: [1].
3068 One solution is to use the LaTeX-package
3069 \begin_inset Flex Code
3072 \begin_layout Plain Layout
3078 that will only include comments by processing the files separately.
3079 To do this, add in the LaTeX preamble of every subdocument the following:
3082 \begin_layout LyX-Code
3088 \begin_layout LyX-Code
3091 includecomment{comment}
3094 \begin_layout Standard
3096 \begin_inset Flex URL
3099 \begin_layout Plain Layout
3101 http://wiki.lyx.org/FAQ/Unsorted#toc31
3109 \begin_layout Section
3113 \begin_layout Standard
3114 Users sometimes need to be able to
3115 \begin_inset Quotes eld
3119 \begin_inset Quotes erd
3122 a LyX file together with all the images (and other files) on which it depends,
3123 either for sending to a publisher or for sharing with a co-author.
3124 LyX 2.0 includes a Python script (
3125 \begin_inset Flex Code
3128 \begin_layout Plain Layout
3134 ) that automates this process.
3135 To use it, you must have either the
3136 \begin_inset Flex Code
3139 \begin_layout Plain Layout
3146 \begin_inset Flex Code
3149 \begin_layout Plain Layout
3155 python modules installed on your system.
3156 By default, the script prefers the
3157 \begin_inset Flex Code
3160 \begin_layout Plain Layout
3167 \begin_inset Flex Code
3170 \begin_layout Plain Layout
3176 format on Unix-like systems and the
3177 \begin_inset Flex Code
3180 \begin_layout Plain Layout
3189 \begin_layout Standard
3190 LyX's configuration process will set the script up to export a `LyX Archive',
3191 and this format will then be available under
3192 \begin_inset Flex Code
3195 \begin_layout Plain Layout
3196 File\SpecialChar \menuseparator
3205 \begin_layout Standard
3206 Independently of the platform, the generation of a particular archive format
3207 can be forced by adding either the
3208 \begin_inset Flex Code
3211 \begin_layout Plain Layout
3218 \begin_inset Flex Code
3221 \begin_layout Plain Layout
3228 \begin_inset Flex Code
3231 \begin_layout Plain Layout
3238 \begin_inset Flex Code
3241 \begin_layout Plain Layout
3247 format) switch to the
3248 \begin_inset Flex Code
3251 \begin_layout Plain Layout
3252 LyX\SpecialChar \menuseparator
3259 \begin_inset Flex Code
3262 \begin_layout Plain Layout
3263 Tools\SpecialChar \menuseparator
3264 Preferences\SpecialChar \menuseparator
3265 File Handling\SpecialChar \menuseparator
3272 (Make sure you add the switch after the script name, not before it.)
3275 \begin_layout Section
3276 Fancy Headers and Footers
3279 \begin_layout Standard
3280 The default page layout is rather plain; for an
3281 \begin_inset Flex Code
3284 \begin_layout Plain Layout
3290 document class, all you get is a centered page number at the bottom of
3292 This document uses KOMA-script's book class, so it appears to be a bit
3294 But to really put on a show, you need to set the document page style to
3296 \begin_inset Quotes eld
3300 \begin_inset Quotes erd
3303 , as mentioned in the
3308 This section describes the LaTeX code you need to insert in your LaTeX
3309 preamble in order to get the desired effects.
3312 \begin_layout Standard
3313 For more information on fancy headers, see the
3314 \begin_inset Flex Code
3317 \begin_layout Plain Layout
3323 package documentation.
3325 \begin_inset Flex URL
3328 \begin_layout Plain Layout
3330 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3338 \begin_layout Standard
3339 The page header is divided into three fields, not surprisingly labeled
3340 \begin_inset Quotes eld
3344 \begin_inset Quotes erd
3348 \begin_inset Quotes eld
3352 \begin_inset Quotes erd
3356 \begin_inset Quotes eld
3360 \begin_inset Quotes erd
3364 The footer is also divided into these three fields.
3365 The LaTeX commands to set these fields in the simplest manner are
3366 \begin_inset Flex Code
3369 \begin_layout Plain Layout
3378 \begin_inset Flex Code
3381 \begin_layout Plain Layout
3390 \begin_inset Flex Code
3393 \begin_layout Plain Layout
3402 \begin_inset Flex Code
3405 \begin_layout Plain Layout
3414 Suppose you wish to put your name in the upper left hand corner of each
3416 Simply insert the following command in the preamble:
3419 \begin_layout Standard
3428 \begin_layout Standard
3429 You will now see your name in the upper left.
3430 If a field has a default entry that you would like to get rid of (often
3431 the page number appears in the central footer, simply include a command
3432 with a blank argument, e.
3433 \begin_inset space \thinspace{}
3439 \begin_layout Standard
3447 \begin_layout Standard
3448 Let's get really fancy: lets put the section number with the word
3449 \begin_inset Quotes eld
3453 \begin_inset Quotes erd
3457 \begin_inset space \thinspace{}
3461 \begin_inset space \space{}
3464 Section 3) in the upper left, the page number (e.
3465 \begin_inset space \thinspace{}
3469 \begin_inset space \space{}
3472 Page 4) in the upper right, your name in the lower left, and the date in
3474 The following commands should now appear in the preamble:
3477 \begin_layout Standard
3487 \begin_layout Standard
3495 \begin_layout Standard
3505 \begin_layout Standard
3514 \begin_layout Standard
3522 \begin_layout Standard
3532 \begin_layout Standard
3534 \begin_inset Flex Code
3537 \begin_layout Plain Layout
3546 \begin_inset Flex Code
3549 \begin_layout Plain Layout
3557 access LaTeX's section and page counters, and so print out the current
3558 section and page numbers.
3560 \begin_inset Flex Code
3563 \begin_layout Plain Layout
3571 simply prints out today's date.
3574 \begin_layout Standard
3575 The thicknesses of the horizontal rules drawn beneath the header and above
3576 the footer can also be modified.
3577 If you don't want one of the rules, set its thickness to 0.
3578 The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3584 \begin_inset Flex Code
3587 \begin_layout Plain Layout
3592 headrulewidth}{0.4pt}
3598 \begin_inset Flex Code
3601 \begin_layout Plain Layout
3606 footrulewidth}{0.4pt}
3611 to set the thicknesses.
3614 \begin_layout Standard
3615 You can switch the header/footer settings on and off for individual pages
3617 \begin_inset Flex Code
3620 \begin_layout Plain Layout
3623 thispagestyle{empty}
3629 \begin_inset Flex Code
3632 \begin_layout Plain Layout
3635 thispagestyle{plain}
3641 \begin_inset Flex Code
3644 \begin_layout Plain Layout
3647 thispagestyle{fancy}
3653 Simply insert them in the text on the page you want changed and mark them
3655 In fact, title pages are marked as plain by default, while following pages
3656 are marked fancy when using the global fancy setting.
3659 \begin_layout Standard
3660 As a final example, it is possible to include an image in the header or
3662 Suppose you want to put a company logo in the upper lefthand corner.
3663 You might try something like
3666 \begin_layout Standard
3675 includegraphics{logo.eps}}}
3678 \begin_layout Standard
3680 (you may need to preface this with
3681 \begin_inset Flex Code
3684 \begin_layout Plain Layout
3688 usepackage{graphics}
3693 if you don't include graphics elsewhere in your document).
3696 \begin_layout Section
3697 Itemize Bullet Selection
3698 \begin_inset CommandInset label
3707 \begin_layout Standard
3713 \begin_layout Subsection
3717 \begin_layout Standard
3718 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3719 Using this dialog you can easily specify what bullet shape to use at each
3720 level of an itemized list.
3721 These settings are document-wide so you won't be able to specify different
3722 sets of bullets for different paragraphs.
3726 \begin_layout Plain Layout
3727 Well, actually you can but you'll have to do it by hand.
3735 \begin_layout Subsection
3739 \begin_layout Standard
3740 Open the dialog by selecting the
3741 \begin_inset Flex MenuItem
3744 \begin_layout Plain Layout
3745 Document\SpecialChar \menuseparator
3751 menu item and then select the
3752 \begin_inset Flex MenuItem
3755 \begin_layout Plain Layout
3764 \begin_layout Standard
3765 The dialog provides you with a table of bullet shapes.
3766 A column of buttons on the left of the table provides access to the six
3767 different panels of bullet shapes.
3768 The row of buttons across the top is used to select which bullet depth
3770 A text entry under the table shows the currently selected bullet shape's
3771 LaTeX equivalent and this can be edited if desired.
3772 If you do modify the text you will also need to specify any needed packages
3773 in the LaTeX preamble.
3776 \begin_layout Standard
3777 The six panels are divided up by the packages they require.
3778 The following table shows the mappings from button name to LaTeX packages.
3781 \begin_layout Standard
3783 \begin_inset Tabular
3784 <lyxtabular version="3" rows="7" columns="2">
3785 <features tabularvalignment="middle">
3786 <column alignment="center" valignment="top" width="0pt">
3787 <column alignment="center" valignment="top" width="0pt">
3789 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3792 \begin_layout Plain Layout
3807 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3810 \begin_layout Plain Layout
3827 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3830 \begin_layout Plain Layout
3845 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3848 \begin_layout Plain Layout
3864 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3867 \begin_layout Plain Layout
3882 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3885 \begin_layout Plain Layout
3902 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3905 \begin_layout Plain Layout
3920 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3923 \begin_layout Plain Layout
3940 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3943 \begin_layout Plain Layout
3958 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3961 \begin_layout Plain Layout
3978 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3981 \begin_layout Plain Layout
3996 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3999 \begin_layout Plain Layout
4016 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4019 \begin_layout Plain Layout
4034 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4037 \begin_layout Plain Layout
4060 \begin_layout Standard
4061 LyX doesn't stop you using bullets from packages you don't have.
4062 If you get errors from LaTeX when you try to view or print the file, then
4063 it is likely you are missing a package.
4067 \begin_layout Plain Layout
4068 LyX doesn't restrict your use since you may be editing locally and exporting
4077 \begin_layout Subsection
4081 \begin_layout Standard
4082 Select which bullet depth you want to change then select the bullet shape
4084 Any changes will not be visible in LyX, but are visible when viewing the
4088 \begin_layout Standard
4089 You can reset a bullet shape to the default simply by clicking your right
4090 mouse button on the appropriate bullet depth button.
4094 \begin_layout Plain Layout
4099 want to have multiple sets of paragraphs with different sets of bullets
4100 in each, then you're going to have to get your hands dirty with TeX code.
4101 The bullet selection dialog can help though because it provides you with
4102 the LaTeX code for a wide range of bullet shapes.
4103 To make your own custom paragraphs you have the following options:
4106 \begin_layout Plain Layout
4110 \begin_layout Plain Layout
4126 \begin_layout Plain Layout
4130 \begin_layout Plain Layout
4152 \begin_layout Itemize
4153 Use the LaTeX command
4154 \begin_inset Flex Code
4157 \begin_layout Plain Layout
4165 to specify a new bullet shape for a given depth.
4166 You'll also need to save the current bullet shape so you can restore it
4168 In this itemized list the following LaTeX code was used to change the bullet
4169 used for the first depth.
4173 \begin_layout LyX-Code
4183 \begin_layout LyX-Code
4200 \begin_layout Itemize
4201 Note that the itemize depth is specified in Roman numerals as part of the
4211 \begin_layout Itemize
4215 \begin_layout Plain Layout
4228 Specify each individual entry by starting each item with the bullet shape
4229 enclosed in square brackets and set as
4230 \begin_inset Flex MenuItem
4233 \begin_layout Plain Layout
4240 For example, this item was started with
4241 \begin_inset Flex Code
4244 \begin_layout Plain Layout
4259 \begin_layout Plain Layout
4263 \begin_layout Plain Layout
4279 \begin_layout Plain Layout
4280 You'll also need to revert the labelitem back to its previous setting for
4281 the global bullet shape settings to remain in effect.
4282 The way used here was:
4285 \begin_layout LyX-Code
4300 \begin_layout Chapter
4301 LyX and the World Wide Web
4304 \begin_layout Standard
4305 LyX has long supported the export of documents to various web-friendly formats,
4307 Before verson 2.0, however, HTML export was always accomplished by the use
4308 of external converters.
4312 \begin_layout Plain Layout
4313 For details on the use of external converters with LyX, see the
4317 section of the Customization manual.
4322 These fall into two large groups: there are converters that use LaTeX as
4323 an intermediate format, such as
4324 \begin_inset Flex Code
4327 \begin_layout Plain Layout
4334 \begin_inset Flex Code
4337 \begin_layout Plain Layout
4344 \begin_inset Flex Code
4347 \begin_layout Plain Layout
4353 , relying upon LyX to produce the LaTeX; and there is a converter that works
4354 directly on LyX files,
4355 \begin_inset Flex Code
4358 \begin_layout Plain Layout
4365 All of these have different advantages and disadvantages.
4369 \begin_layout Standard
4370 The LaTeX-based converters have the advantage that, in principle, they know
4371 everything about the exported document that LaTeX does.
4372 Such converters do not care, for example, if a certain block of code was
4373 produced by LyX or was Evil Red Text.
4374 These converters know about
4375 \begin_inset Flex Code
4378 \begin_layout Plain Layout
4384 files, counters, and references, and can often make use of the
4385 \begin_inset Flex Code
4388 \begin_layout Plain Layout
4394 files generated by BibTeX.
4395 On the other hand, LaTeX is a very hard language to parse---it is sometimes
4396 said that only TeX itself understands TeX---and LaTeX-based converters
4397 will often choke on what seem to be quite simple constructs; complex ones
4398 can throw them completely, and as of this writing, for example, the
4402 manual will not export with
4403 \begin_inset Flex Code
4406 \begin_layout Plain Layout
4412 , though the others will.
4413 The other issue concerns how math is handled.
4414 These converters typically convert the formulae into little pictures that
4415 are then linked from the HTML document.
4416 Since these are actually generated by LaTeX, they are accurate.
4417 But they do not scale well, and just getting them to look as if they are
4418 actually meant to be in your document---so that the font sizes seem to
4419 be roughly the same---can be a challenge.
4422 \begin_layout Standard
4424 \begin_inset Flex Code
4427 \begin_layout Plain Layout
4434 \begin_inset CommandInset href
4436 name "http://elyxer.nongnu.org/"
4437 target "http://elyxer.nongnu.org/"
4441 ) solves some of these problems.
4442 In particular, the formulae it produces scale perfectly, since it renders
4443 math using a combination of HTML and CSS rather than converting the formulae
4445 But even moderately complex formula are rendered less well than with
4446 \begin_inset Flex Code
4449 \begin_layout Plain Layout
4455 ; this reflects the limitations of HTML.
4459 \begin_layout Plain Layout
4461 \begin_inset Flex Code
4464 \begin_layout Plain Layout
4470 can also use jsMath and MathJax for equations, but this setting is only
4471 available globally and requires one to have access to a server that runs
4477 More importantly (as of version 1.1.1, at least),
4478 \begin_inset Flex Code
4481 \begin_layout Plain Layout
4487 has limited support for math macros and no support for user-defined paragraph
4488 or character styles.
4489 These limitations make
4490 \begin_inset Flex Code
4493 \begin_layout Plain Layout
4499 unsuitable for many of the documents LyX users produce.
4500 In principle, of course, these problems could be solved, but the LyX developers
4501 have decided to follow a different path and have made LyX itself capable
4502 of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4506 \begin_layout Standard
4507 As of this writing, XHTML output remains under development and should probably
4509 \begin_inset Quotes eld
4513 \begin_inset Quotes erd
4520 \begin_layout Plain Layout
4522 \begin_inset Flex Code
4525 \begin_layout Plain Layout
4526 development/HTML.notes
4531 , which can be found in the LyX source tree or
4532 \begin_inset CommandInset href
4534 name "accessed online"
4535 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4539 , usually contains up-to-date information about the state of XHTML output.
4540 See also the list of XHTML bugs on
4541 \begin_inset CommandInset href
4543 name "the bug tracker"
4544 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"
4553 Still, the developers have chosen this approach because it has several
4554 potential advantages over the other two.
4557 \begin_layout Standard
4558 These advantages are primarily due to the fact that the XHTML output routines,
4559 since they are part of LyX, know everything LyX knows about the document
4564 \begin_layout Plain Layout
4565 Another advantage is that, since these routines are internal to LyX, they
4566 are immune to changes in LyX's file format, or to changes in the semantics
4572 So they know about the table of contents (as displayed in the outline),
4573 about the counters associated with different paragraph styles, and about
4574 user-defined styles.
4575 The XHTML output routines know what LyX knows about internationalization,
4576 too, so they will output
4577 \begin_inset Quotes eld
4581 \begin_inset Quotes erd
4585 \begin_inset Quotes eld
4593 \begin_inset Quotes erd
4596 , depending upon the language in effect at the time.
4600 \begin_layout Standard
4601 Quite generally, the output routines know what LyX knows about document
4602 layout, that is, about how the document is to be rendered on screen.
4603 We use this information when we output the document as XHTML.
4608 generates CSS style information corresponding to the layout information
4609 it uses to render the document on screen: if section headings are supposed
4610 to be sans-serif and bold as seen in LyX, then (by default) they will be
4611 sans-serif and bold when viewed in a web browser, too.
4612 And this is true not just for pre-defined styles, like Section, but for
4613 any style, including user-defined styles.
4614 Indeed, the XHTML output routines make no distinction between user-defined
4615 paragraph and character styles and LyX's own pre-defined styles: in each
4616 case, everything LyX knows about the styles is contained in the layout
4618 And much the same is true as regards pre-defined textual insets, such as
4619 footnotes, and various custom insets.
4623 \begin_layout Standard
4624 The result is that XHTML output can be customized and extended in exactly
4625 the same way LaTeX output can be customized and extended: through layout
4627 See chapter five of the
4631 manual for the details.
4634 \begin_layout Standard
4635 The remainder of this chapter contains more detailed information on XHTML
4636 output, its limitations, and ways to work around those limitations.
4639 \begin_layout Section
4640 Math Output in XHTML
4643 \begin_layout Standard
4644 LyX offers four choices for how math is rendered.
4645 These have various advantages and disadvantages:
4648 \begin_layout Itemize
4650 \begin_inset Newline newline
4653 MathML is a dialect of XML designed specifically for mathematics on the
4654 web, and it typically renders very well in browsers that support it.
4655 The disadvantage is that not all browsers support MathML, and support is
4656 not complete even in the Gecko-based browsers, such as Firefox.
4657 \begin_inset Newline newline
4660 If LyX is unable to render a formula as MathML---for example, if the formula
4662 \begin_inset Flex Code
4665 \begin_layout Plain Layout
4671 package or ERT---then it will instead output the formula as an image.
4675 \begin_layout Itemize
4677 \begin_inset Newline newline
4681 \begin_inset Flex Code
4684 \begin_layout Plain Layout
4690 outputs math as HTML, styled by CSS.
4694 \begin_layout Plain Layout
4695 LyX has borrowed some of the CSS for its HTML output from
4696 \begin_inset Flex Code
4699 \begin_layout Plain Layout
4710 For simple formulae, this can work quite well, though with more complicated
4711 formulae it tends to break down.
4712 Still, this method has the advantage that it is very widely supported and
4713 so it may be appropriate for documents that contain only a little, fairly
4715 \begin_inset Newline newline
4718 If Lyx is unable to render a formula as HTML---for example, if the formula
4720 \begin_inset Flex Code
4723 \begin_layout Plain Layout
4729 package or ERT---then it will instead output the formula as an image.
4733 \begin_layout Itemize
4735 \begin_inset Newline newline
4739 \begin_inset Flex Code
4742 \begin_layout Plain Layout
4748 , LyX will output formulae as images, the very same images, in fact, that
4749 are used for instant preview.
4753 \begin_layout Plain Layout
4754 Instant preview does
4758 have to be on for images to be output, however.
4763 The advantage to this method is that the images are simply generated by
4764 LaTeX, so they are very accurate.
4765 The disadvantage, as mentioned earlier, is that these are bitmapped images,
4766 so they do not scale terribly well, and one cannot copy them, etc.
4767 (As of this writing, there are also problems about equation numbering.
4769 \begin_inset CommandInset href
4772 target "http://www.lyx.org/trac/ticket/6894"
4777 \begin_inset Newline newline
4780 The size of the images can be controlled by setting the
4781 \begin_inset Quotes eld
4785 \begin_inset Quotes erd
4789 \begin_inset Flex MenuItem
4792 \begin_layout Plain Layout
4793 Document\SpecialChar \menuseparator
4794 Settings\SpecialChar \menuseparator
4804 \begin_layout Plain Layout
4805 For those who want to know, this controls the resolution of the image in
4806 dots per inch and is based upon a default of 75 dpi.
4812 \begin_inset Newline newline
4815 If LyX for some reason fails to create an image for a formula (e.g., if a
4816 required LaTeX package is not installed), then it will fall back to outputing
4820 \begin_layout Itemize
4822 \begin_inset Newline newline
4825 Finally, LyX will happily output math as LaTeX.
4826 As well as being the output of last resort, this method can be used with
4828 \begin_inset CommandInset href
4831 target "http://www.math.union.edu/~dpvc/jsMath/"
4835 , which uses JavaScript to render LaTeX embedded in HTML documents.
4836 LyX wraps the LaTeX in either a
4837 \begin_inset Flex Code
4840 \begin_layout Plain Layout
4846 (for inline formulas) or
4847 \begin_inset Flex Code
4850 \begin_layout Plain Layout
4856 (for displayed formulas) with
4857 \begin_inset Flex Code
4860 \begin_layout Plain Layout
4866 , as is required for jsMath.
4869 \begin_layout Standard
4870 One of these output methods must be selected under
4871 \begin_inset Flex MenuItem
4874 \begin_layout Plain Layout
4875 Document\SpecialChar \menuseparator
4876 Settings\SpecialChar \menuseparator
4883 By default, LyX outputs MathML.
4884 This is a document-wide setting, therefore.
4887 \begin_layout Standard
4888 Eventually, LyX will offer the user the option to select an alternate output
4889 method for a particular inset, say, one that isn't being rendered very
4894 \begin_layout Plain Layout
4895 That said, since LyX falls back to images if the inset contains ERT, then
4896 one can force output as an image by putting some harmless ERT into the
4898 \begin_inset Formula $a=b\relax$
4909 \begin_layout Section
4910 Bibliography and Citations
4913 \begin_layout Standard
4914 XHTML output fully supports bibliographies and citations.
4918 \begin_layout Standard
4919 Citation labels are generated by the same machinery that generates LyX's
4920 on-screen labels, so the labels will look in the output much as they do
4921 in LyX, though better.
4922 If you are using numerical citations, then LyX will output numerical labels,
4923 such as [1] or [17], rather than simply showing the citation key in square
4924 brackets, as it does on-screen.
4925 If you are using author-year citations, then LyX will add lowercase letters
4926 to the years, just as BibTeX does, if it finds more than one citation for
4927 a given author-year combination.
4928 The labels will be printed with the bibliography entries.
4929 Note that there is, at present, no way to customize the appearance of the
4930 labels, for example, to choose between square brackets and parentheses.
4933 \begin_layout Standard
4934 Bibliography output is handled by the same machinery that handles the presentati
4935 on of reference information in the citation dialog, so you will see in the
4936 XHTML output pretty much what you would see if you were to look at a given
4937 entry in the citation dialog.
4938 The formatting can be customized in your layout file or, preferably, in
4944 manual for the details.
4947 \begin_layout Standard
4948 The main defect at present is that cross-referenced information is printed
4949 with every entry with which it is associated.
4950 So you can see things like this:
4955 \begin_inset Quotes eld
4958 Context and Logical Form
4959 \begin_inset Quotes erd
4964 Language in Context: Selected Essays
4966 (Oxford: Oxford University Press, 2007), pp.
4972 \begin_inset Quotes eld
4975 Semantics in Context
4976 \begin_inset Quotes erd
4981 Language in Context: Selected Essays
4983 (Oxford: Oxford University Press, 2007), pp.
4987 \begin_layout Standard
4988 This should be fixed before long.
4991 \begin_layout Standard
4992 There is no support at present for sectioned bibliographies.
4993 If you have multiple bibliographies, then LyX will print the same bibliography
4997 \begin_layout Section
5001 \begin_layout Standard
5002 LyX will happily export indexes as XHTML, but with certain limitations at
5006 \begin_layout Standard
5007 Index export will be most reliable when you do not attempt to use the fancy
5008 constructs that are described in the section on indexes in the
5016 \begin_layout Plain Layout
5017 The main issue here is that LyX itself does not really handle these.
5018 It just lets you enter what you would have to enter in raw LaTeX.
5023 We'll describe how they are handled using the subsection headings from
5027 \begin_layout Itemize
5028 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
5029 these, but the entries must be separated by
5030 \begin_inset Quotes eld
5034 \begin_inset Quotes erd
5037 , that is, there must be spaces around the exclamation point.
5038 This is because it is otherwise too difficult to check for escaped exclamation
5039 points, ones in math, and so forth.
5042 \begin_layout Itemize
5043 Page Ranges: There is no support at all for page ranges, since these make
5044 no sense with XHMTL.
5045 Instead, you will just get two index entries, one at either end.
5048 \begin_layout Itemize
5049 Cross-referencing: There is no support for cross-referencing.
5050 If LyX finds an entry containing the
5051 \begin_inset Quotes eld
5054 |see\SpecialChar \ldots{}
5056 \begin_inset Quotes erd
5059 construct, it is just dropped, and the rest is treated as an ordinary index
5063 \begin_layout Itemize
5064 Index Entry Order: LyX does support attempts to fix the sorting order.
5065 It will take what is before the first `@' it finds and use that for sorting,
5066 taking what follows the first `@' to be the actual entry.
5067 At present, LyX does not check for escaped `@', so do not try to index
5071 \begin_layout Itemize
5072 Index Entry Layout: You can format entries by using the text style dialog,
5073 or by using any other method available within LyX itself.
5074 There is no support for constructs like:
5075 \begin_inset Quotes eld
5079 \begin_inset Quotes erd
5083 Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
5084 and everything that follows it.
5087 \begin_layout Itemize
5088 Multiple Indexes: There is no support for multiple indexes.
5089 Rather, all index entries will be printed as one large index.
5090 To avoid our printing several versions of the index, we print only the
5091 main index, so make sure you have one.
5094 \begin_layout Section
5095 Nomenclature and Glossary
5098 \begin_layout Standard
5099 There is at present no support for glossaries.
5100 Adding it would be fairly trivial, and welcome.
5103 \begin_layout Chapter
5107 \begin_layout Section
5111 \begin_layout Standard
5112 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
5113 and retrieve information about the LyX internal state.
5114 This is only intended for advanced users, but they should find it useful.
5115 It is by writing to the LyX server, for example, that bibliography managers,
5116 such as JabRef, are able to
5117 \begin_inset Quotes eld
5121 \begin_inset Quotes erd
5127 \begin_layout Section
5128 Starting the LyX Server
5131 \begin_layout Standard
5132 The LyX server works through the use of a pair of named pipes.
5133 These are usually located in
5134 \begin_inset Flex Code
5137 \begin_layout Plain Layout
5143 , (except on Windows, where
5147 named pipes are special objects located in
5148 \begin_inset Flex Code
5151 \begin_layout Plain Layout
5163 ) and have the names
5164 \begin_inset Quotes eld
5168 \begin_inset Flex Code
5171 \begin_layout Plain Layout
5178 \begin_inset Quotes erd
5182 \begin_inset Quotes eld
5186 \begin_inset Flex Code
5189 \begin_layout Plain Layout
5196 \begin_inset Quotes erd
5200 External programs write into
5201 \begin_inset Flex Code
5204 \begin_layout Plain Layout
5210 and read back data from
5211 \begin_inset Flex Code
5214 \begin_layout Plain Layout
5221 The stem of the pipe names can be defined in the
5222 \begin_inset Flex MenuItem
5225 \begin_layout Plain Layout
5226 Tools\SpecialChar \menuseparator
5233 \begin_inset Flex Code
5236 \begin_layout Plain Layout
5237 "/home/myhome/lyxpipe"
5243 \begin_inset Flex Code
5246 \begin_layout Plain Layout
5260 on Windows (but any working path can be used).
5265 configure this manually in order for the server to start.
5268 \begin_layout Standard
5270 \begin_inset Flex Code
5273 \begin_layout Plain Layout
5280 \begin_inset Flex Code
5283 \begin_layout Plain Layout
5289 ' to create the pipes.
5290 If one of the pipes already exists, LyX will assume that another LyX process
5291 is already running and will not start the server.
5292 On POSIX (Unix like) systems, if for some other reason, an unused
5293 \begin_inset Quotes eld
5297 \begin_inset Quotes erd
5300 pipe is left in existence when LyX closes, then LyX will try to delete
5302 If this fails for some reason, you will need to delete the pipes manually
5303 and then restart LyX.
5304 On Windows, pipes are deleted by the OS on program termination or crash,
5306 \begin_inset Quotes eld
5310 \begin_inset Quotes erd
5313 pipes should not be possible.
5316 \begin_layout Standard
5317 To have several LyX processes with servers at the same time, you have to
5318 use different configurations, perhaps by using separate user directories,
5320 \begin_inset Flex Code
5323 \begin_layout Plain Layout
5329 file, for each process.
5332 \begin_layout Standard
5333 If you are developing a client program, you might find it useful to enable
5334 debugging information from the LyX server.
5335 Do this by starting LyX as
5336 \begin_inset Flex Code
5339 \begin_layout Plain Layout
5348 \begin_layout Standard
5349 You can find a complete example client written in C in the source distribution
5351 \begin_inset Flex Code
5354 \begin_layout Plain Layout
5355 development/lyxserver/server_monitor.c
5363 \begin_layout Standard
5364 Another useful tool is command-line based client you will find in
5365 \begin_inset Flex Code
5368 \begin_layout Plain Layout
5369 src/client/lyxclient
5377 \begin_layout Section
5378 Normal communication
5381 \begin_layout Standard
5382 To issue a LyX call, the client writes a line of ASCII text into the input
5384 This line has the following format:
5401 \begin_layout Description
5402 clientname is a name that the client can choose arbitrarily.
5403 Its only use is that LyX will echo it if it sends an answer—so a client
5404 can dispatch results from different requesters.
5407 \begin_layout Description
5408 function is the function you want LyX to perform.
5409 It is the same as the commands you'd use in the minibuffer.
5412 \begin_layout Description
5413 argument is an optional argument which is meaningful only to some functions
5415 \begin_inset Quotes eld
5419 \begin_inset Quotes erd
5422 LFUN will insert the argument as text at the cursor position).
5425 \begin_layout Standard
5426 The answer from LyX will arrive in the output pipe and be of the form
5443 \begin_layout Standard
5452 are just echoed from the command request, while
5456 is more or less useful information filled according to how the command
5457 execution worked out.
5458 Some commands, such as
5459 \begin_inset Quotes eld
5463 \begin_inset Quotes erd
5466 , will return information about the internal state of LyX, while other will
5467 return an empty data-response.
5468 This means that the command execution went fine.
5471 \begin_layout Standard
5472 In case of errors, the response from LyX will have this form
5489 \begin_layout Standard
5494 should contain an explanation of why the command failed.
5497 \begin_layout Standard
5501 \begin_layout LyX-Code
5502 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5503 \begin_inset Newline newline
5506 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5507 \begin_inset Newline newline
5510 read a <~/.lyxpipe.out
5511 \begin_inset Newline newline
5517 \begin_layout Section
5521 \begin_layout Standard
5522 LyX can notify clients of events going on asynchronously.
5523 Currently it will only do this if the user binds a key sequence with the
5525 \begin_inset Quotes eld
5529 \begin_inset Quotes erd
5533 The format of the string LyX sends is as follows:
5537 \begin_inset Flex Code
5540 \begin_layout Plain Layout
5551 \begin_layout Standard
5556 is the printed representation of the key sequence that was actually typed
5560 \begin_layout Standard
5561 This mechanism can be used to extend LyX's command set and implement macros.
5562 Bind some key sequence to
5563 \begin_inset Quotes eld
5567 \begin_inset Quotes erd
5571 Then start a client that listens on the output pipe, dispatches the command
5572 according to the sequence, and starts a function that may use LyX calls
5573 and LyX requests to issue a command or a series of commands to LyX.
5576 \begin_layout Section
5577 The simple LyX Server Protocol
5580 \begin_layout Standard
5581 LyX implements a simple protocol that can be used for session management.
5582 All messages are of the form
5595 \begin_layout Standard
5601 \begin_inset Quotes eld
5605 \begin_inset Quotes erd
5609 \begin_inset Quotes eld
5613 \begin_inset Quotes erd
5618 \begin_inset Quotes eld
5622 \begin_inset Quotes erd
5625 is received from a client, LyX will report back to inform the client that
5626 it's listening to it's messages, while
5627 \begin_inset Quotes eld
5631 \begin_inset Quotes erd
5634 sent from LyX will inform clients that LyX is closing.
5637 \begin_layout Section
5638 Reverse DVI/PDF search
5641 \begin_layout Standard
5642 Some DVI/PDF viewers
5646 \begin_layout Plain Layout
5647 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5648 Skim on Mac OSX and SumatraPDF on Windows.
5657 facility (also called
5662 This means that you can tell LyX to put the cursor to a specific line in
5663 the document by clicking at the respective position in the DVI/PDF output.
5664 To achieve this, the viewer must be able to communicate with LyX.
5665 This is done via the LyX server either by using the named pipe (
5669 ), or the UNIX domain socket (
5673 ) that LyX creates in its temporary directory (this is the way the
5674 \begin_inset Flex Code
5677 \begin_layout Plain Layout
5683 program communicates with LyX).
5684 In some cases, you need a helper script that mediates between the viewer
5685 and LyX, in others, the viewer can communicate with LyX directly.
5686 This depends on the selected viewer and on your operating system.
5687 The same applies to the way viewers need to be configured and the way the
5688 reverse search is actually performed.
5689 In what follows, we will thus describe how to setup reverse search for
5691 Before we turn to this, though, we will explain what needs to be done generally
5692 to enable reverse search in the DVI/PDF output.
5695 \begin_layout Subsection
5697 \begin_inset CommandInset label
5699 name "sub:rev-search"
5706 \begin_layout Standard
5707 In most cases LyX will do the work for you by enabling
5708 \begin_inset Flex MenuItem
5711 \begin_layout Plain Layout
5712 Document\SpecialChar \menuseparator
5713 Output\SpecialChar \menuseparator
5714 Synchronize with Output
5720 In such a case LyX will automatically insert the necessary SyncTeX macro
5721 (for PDF) or load the srcltx package (for DVI) respectively.
5722 This option can be easily reached also on
5723 \begin_inset Flex Code
5726 \begin_layout Plain Layout
5735 \begin_layout Standard
5736 If you need a different setting, you can select or input a custom macro
5737 from the drop down box just below
5738 \begin_inset Flex MenuItem
5741 \begin_layout Plain Layout
5742 Document\SpecialChar \menuseparator
5743 Settings\SpecialChar \menuseparator
5744 Output\SpecialChar \menuseparator
5745 Synchronize with Output
5753 \begin_layout Standard
5754 Please note that including the
5755 \begin_inset Flex Code
5758 \begin_layout Plain Layout
5765 \begin_inset Flex Code
5768 \begin_layout Plain Layout
5774 sometimes has an undesired impact on the typesetting.
5775 Thus, you should switch output synchronization off for the final typesetting
5777 \begin_inset Flex Code
5780 \begin_layout Plain Layout
5787 \begin_inset Flex Code
5790 \begin_layout Plain Layout
5799 \begin_layout Standard
5800 In case you need some more special settings that are not covered by the
5801 automatic settings, read the next section about how to set up output synchroniz
5803 If the automatic setup suits your needs, you can readily jump to section
5804 \begin_inset space ~
5808 \begin_inset CommandInset ref
5810 reference "sub:configuring-viewers"
5814 , where the necessary configuration steps in your viewer -- needed both
5815 with the automatic and the manual setup -- are described.
5818 \begin_layout Subsection
5822 \begin_layout Standard
5823 LaTeX provides several different methods for reverse search.
5824 Some are built-in in the
5825 \begin_inset Flex Code
5828 \begin_layout Plain Layout
5834 program, some are provided by external packages.
5835 Your choice depends on whether your LaTeX distribution already provides
5836 a given method (the built-in methods are rather new) and whether your viewer
5838 The available methods are described in the following.
5841 \begin_layout Subsubsection*
5842 Built-in DVI-search via src-specials (DVI only)
5845 \begin_layout Standard
5846 This method provides the DVI file with the necessary information for reverse
5848 It is available in LaTeX since quite some time (any somewhat recent LaTeX
5849 distribution should include it), and it works reliably.
5850 To enable it, change the
5851 \begin_inset Flex MenuItem
5854 \begin_layout Plain Layout
5859 \begin_layout Plain Layout
5872 \begin_inset Flex MenuItem
5875 \begin_layout Plain Layout
5880 \begin_layout Plain Layout
5887 eX (plain)->DraftDVI
5893 \begin_inset Flex MenuItem
5896 \begin_layout Plain Layout
5897 Preferences\SpecialChar \menuseparator
5898 File Handling\SpecialChar \menuseparator
5905 \begin_inset Flex Code
5908 \begin_layout Plain Layout
5909 latex -src-specials $$i
5915 If this doesn't work, check if your TeX engine needs different options
5916 (the syntax might differ in some distributions).
5919 \begin_layout Subsubsection*
5920 External Packages (PDFSync and scrltx)
5923 \begin_layout Standard
5932 provide reverse search facility for PDF output (via pdflatex) and DVI output,
5934 In order to enable it, load the packages in the LyX preamble:
5937 \begin_layout Itemize
5938 \begin_inset Flex Code
5941 \begin_layout Plain Layout
5949 for reverse PDF search,
5952 \begin_layout Itemize
5953 \begin_inset Flex Code
5956 \begin_layout Plain Layout
5959 usepackage[active]{srcltx}
5964 for reverse DVI search.
5967 \begin_layout Standard
5968 If you want to be able to perform both DVI and PDF reverse searches, you
5969 can also insert in the preamble the following lines
5972 \begin_layout LyX-Code
5976 \begin_inset Newline newline
5982 \begin_inset Newline newline
5988 \begin_inset Newline newline
5994 \begin_inset Newline newline
5999 usepackage[active]{srcltx}
6000 \begin_inset Newline newline
6008 \begin_layout Standard
6009 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6010 right package will be used.
6013 \begin_layout Standard
6014 Note that PDFSync might affect the output layout of your document.
6015 It is therefore advised to disable PDFsync for final documents.
6018 \begin_layout Subsubsection*
6019 Built-in reverse search via SyncTeX (DVI and PDF)
6022 \begin_layout Standard
6024 \begin_inset Flex Code
6027 \begin_layout Plain Layout
6033 have built-in support for both PDF and DVI reverse search.
6038 facility is basically the result of the integration of the PDFSync package
6039 to the pdftex program and its merge with the
6044 You need at least TeXLive 2008 or a recent MikTeX distribution in order
6046 Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
6047 already provide SyncTeX support.
6050 \begin_layout Standard
6051 To enable SyncTeX for DVI output, change the
6052 \begin_inset Flex MenuItem
6055 \begin_layout Plain Layout
6060 \begin_layout Plain Layout
6073 \begin_inset Flex MenuItem
6076 \begin_layout Plain Layout
6081 \begin_layout Plain Layout
6088 eX (plain) -> DraftDVI
6094 \begin_inset Flex MenuItem
6097 \begin_layout Plain Layout
6098 Preferences\SpecialChar \menuseparator
6099 File Handling\SpecialChar \menuseparator
6106 \begin_inset Flex Code
6109 \begin_layout Plain Layout
6110 latex -synctex=1 $$i
6115 , and for PDF output, change the
6116 \begin_inset Flex MenuItem
6119 \begin_layout Plain Layout
6124 \begin_layout Plain Layout
6131 eX (pdflatex) -> PDF (pdflatex)
6137 \begin_inset Flex Code
6140 \begin_layout Plain Layout
6141 pdflatex -synctex=1 $$i
6147 Check the documentation of your viewer whether the viewer needs to be configure
6148 d for the use with SyncTeX.
6152 \begin_layout Plain Layout
6154 \begin_inset Flex Code
6157 \begin_layout Plain Layout
6163 option enables gzip compression.
6164 If your viewer does not support it, you should instead use
6165 \begin_inset Flex Code
6168 \begin_layout Plain Layout
6182 \begin_layout Subsection
6183 Configuring and using specific viewers
6184 \begin_inset CommandInset label
6186 name "sub:configuring-viewers"
6193 \begin_layout Subsubsection*
6194 Xdvi (all platforms)
6197 \begin_layout Standard
6199 \begin_inset Flex Code
6202 \begin_layout Plain Layout
6208 , you don't need to do anything else for performing a reverse DVI search,
6209 as LyX already provides the necessary hooks for automatically using the
6211 \begin_inset Flex Code
6214 \begin_layout Plain Layout
6221 Just setup your document as described above (reverse search is triggered
6222 by Ctrl-click or Alt-click on Mac OSX, respectively).
6225 \begin_layout Standard
6226 However, if for whatever reason you want to use the named pipe instead of
6227 the socket for communicating with LyX, simply change the DVI viewer in
6229 \begin_inset Flex MenuItem
6232 \begin_layout Plain Layout
6233 Preferences\SpecialChar \menuseparator
6234 File Handling\SpecialChar \menuseparator
6244 \begin_layout Plain Layout
6245 On Mac OSX you have to use
6246 \begin_inset Flex Code
6249 \begin_layout Plain Layout
6250 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6261 \begin_inset Flex Code
6264 \begin_layout Plain Layout
6265 xdvi -editor 'lyxeditor.sh %f %l'
6271 \begin_inset Flex Code
6274 \begin_layout Plain Layout
6280 is a suitable script.
6281 For example, a minimal shell script is the following one:
6284 \begin_layout LyX-Code
6286 \begin_inset Newline newline
6289 LYXPIPE="/path/to/lyxpipe"
6290 \begin_inset Newline newline
6293 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6294 \begin_inset Newline newline
6297 echo "$COMMAND" > "${LYXPIPE}".in || exit
6298 \begin_inset Newline newline
6301 read < "${LYXPIPE}".out || exit
6304 \begin_layout Standard
6306 \begin_inset Flex Code
6309 \begin_layout Plain Layout
6319 \begin_layout Plain Layout
6326 XServer pipe path specified in
6327 \begin_inset Flex MenuItem
6330 \begin_layout Plain Layout
6331 Preferences\SpecialChar \menuseparator
6341 \begin_layout Plain Layout
6343 \begin_inset Flex Code
6346 \begin_layout Plain Layout
6352 folder of a source distribution you can find a
6353 \begin_inset Flex Code
6356 \begin_layout Plain Layout
6362 script which is able to locate the
6366 based on your preferences.
6374 \begin_layout Subsubsection*
6378 \begin_layout Standard
6380 \begin_inset Flex Code
6383 \begin_layout Plain Layout
6384 /Applications/MacDviX_Folder/calleditor.script
6389 , add the following lines:
6392 \begin_layout LyX-Code
6397 \begin_layout Plain Layout
6404 X.app/Contents/MacOS/lyxeditor "$2" $1
6405 \begin_inset Newline newline
6411 \begin_layout Standard
6412 Modify the lines accordingly if you install LyX somewhere else than in the
6413 Applications folder.
6416 \begin_layout Standard
6417 Reverse search is triggered by Alt-click (OPTION-click).
6420 \begin_layout Subsubsection*
6424 \begin_layout Standard
6426 \begin_inset Flex Code
6429 \begin_layout Plain Layout
6430 open -a Skim.app $$i
6435 to the viewer setting in
6436 \begin_inset Flex MenuItem
6439 \begin_layout Plain Layout
6440 Preferences\SpecialChar \menuseparator
6441 File Handling\SpecialChar \menuseparator
6442 File formats\SpecialChar \menuseparator
6449 \begin_inset Flex MenuItem
6452 \begin_layout Plain Layout
6453 Skim\SpecialChar \menuseparator
6454 Preferences\SpecialChar \menuseparator
6464 \begin_layout Plain Layout
6474 \begin_layout Standard
6475 Reverse search is triggered by COMMAND-SHIFT-click
6478 \begin_layout Subsubsection*
6482 \begin_layout Standard
6484 \begin_inset Flex MenuItem
6487 \begin_layout Plain Layout
6488 Settings\SpecialChar \menuseparator
6489 Configure Okular\SpecialChar \ldots{}
6490 \SpecialChar \menuseparator
6497 \begin_inset Quotes eld
6501 \begin_inset Quotes erd
6505 \begin_inset Flex Code
6508 \begin_layout Plain Layout
6517 \begin_layout Standard
6518 Reverse search is triggered by SHIFT-click.
6521 \begin_layout Subsubsection*
6525 \begin_layout Standard
6526 Launch yap, choose its
6527 \begin_inset Flex MenuItem
6530 \begin_layout Plain Layout
6531 View\SpecialChar \menuseparator
6538 \begin_inset Quotes eld
6542 \begin_inset Quotes erd
6547 \begin_inset Quotes eld
6550 New\SpecialChar \ldots{}
6552 \begin_inset Quotes erd
6555 button and, in the window that opens, enter
6556 \begin_inset Quotes eld
6560 \begin_inset Quotes erd
6563 (or any other name you like) in the
6564 \begin_inset Quotes eld
6568 \begin_inset Quotes erd
6572 Now click on the button labeled
6573 \begin_inset Quotes eld
6576 \SpecialChar \ldots{}
6578 \begin_inset Quotes erd
6581 to open a file dialog and navigate to the directory containing the batch
6583 \begin_inset Flex Code
6586 \begin_layout Plain Layout
6594 \begin_inset Flex Code
6597 \begin_layout Plain Layout
6603 and then specify the program arguments as
6604 \begin_inset Flex Code
6607 \begin_layout Plain Layout
6615 \begin_inset Flex Code
6618 \begin_layout Plain Layout
6624 wrapper is used for communicating with LyX through the
6631 \begin_layout LyX-Code
6633 \begin_inset Newline newline
6636 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
6645 \begin_inset Newline newline
6659 \begin_layout Standard
6660 Make sure that the LyXServer pipe path you specified in LyX is
6661 \begin_inset Flex Code
6664 \begin_layout Plain Layout
6678 , otherwise change the
6679 \begin_inset Flex Code
6682 \begin_layout Plain Layout
6688 wrapper accordingly.
6691 \begin_layout Standard
6692 In yap, reverse search is triggered by double-click.
6695 \begin_layout Subsubsection*
6696 SumatraPDF (Windows)
6699 \begin_layout Standard
6700 In order to use SumatraPDF for inverse search, enter
6701 \begin_inset Flex Code
6704 \begin_layout Plain Layout
6705 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6710 in the viewer setting in
6711 \begin_inset Flex MenuItem
6714 \begin_layout Plain Layout
6715 Preferences\SpecialChar \menuseparator
6716 File Handling\SpecialChar \menuseparator
6717 File formats\SpecialChar \menuseparator
6724 \begin_inset Flex Code
6727 \begin_layout Plain Layout
6733 is the previous wrapper.
6734 If SumatraPDF.exe is not in your command PATH, use its full file name.
6737 \begin_layout Standard
6738 Reverse search is triggered by double-click.
6741 \begin_layout Subsubsection*
6745 \begin_layout Standard
6746 First of all, make sure that yap is your default DVI viewer in the Windows
6747 environment, then launch it, choose its
6748 \begin_inset Flex MenuItem
6751 \begin_layout Plain Layout
6752 View\SpecialChar \menuseparator
6759 \begin_inset Quotes eld
6763 \begin_inset Quotes erd
6768 \begin_inset Quotes eld
6771 New\SpecialChar \ldots{}
6773 \begin_inset Quotes erd
6776 button and, in the window that opens, enter
6777 \begin_inset Quotes eld
6781 \begin_inset Quotes erd
6784 (or any other name you like) in the
6785 \begin_inset Quotes eld
6789 \begin_inset Quotes erd
6793 Now click on the button labeled
6794 \begin_inset Quotes eld
6797 \SpecialChar \ldots{}
6799 \begin_inset Quotes erd
6802 to open a file dialog and navigate to the directory containing the
6803 \begin_inset Flex Code
6806 \begin_layout Plain Layout
6812 program (which is installed by default on Cygwin along with the LyX executable).
6814 \begin_inset Flex Code
6817 \begin_layout Plain Layout
6823 and then specify the program arguments as
6824 \begin_inset Flex Code
6827 \begin_layout Plain Layout
6834 In this way, you will be using the
6838 for communicating with LyX.
6839 If, for whatever reason, you want to use the
6844 \begin_inset Flex Code
6847 \begin_layout Plain Layout
6853 option and be sure to specify the LyXServer pipe path in the LyX preferences.
6856 \begin_layout Standard
6857 In yap, reverse search is triggered by double-click.
6860 \begin_layout Subsubsection*
6864 \begin_layout Standard
6865 In order to use SumatraPDF for inverse search, enter
6866 \begin_inset Flex Code
6869 \begin_layout Plain Layout
6875 in the viewer setting in
6876 \begin_inset Flex MenuItem
6879 \begin_layout Plain Layout
6880 Preferences\SpecialChar \menuseparator
6881 File Handling\SpecialChar \menuseparator
6882 File formats\SpecialChar \menuseparator
6889 \begin_inset Flex Code
6892 \begin_layout Plain Layout
6898 is the following script (to be placed in your command PATH,
6899 \begin_inset Flex Code
6902 \begin_layout Plain Layout
6908 being the best choice):
6911 \begin_layout LyX-Code
6913 \begin_inset Newline newline
6917 \begin_inset Newline newline
6920 SumatraPDF -inverse-search "lyxeditor -g %f %l" $(basename $1)
6923 \begin_layout Standard
6924 This wrapper script is needed because SumatraPDF is a native Windows application
6925 and does not understand the posix paths used by the Cygwin version of LyX.
6926 If SumatraPDF.exe is not in your command PATH, use its full posix path in
6929 \begin_inset Flex Code
6932 \begin_layout Plain Layout
6938 enables communication via the
6944 \begin_inset Flex Code
6947 \begin_layout Plain Layout
6953 option if you want to use the
6957 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6960 \begin_layout Standard
6961 Reverse search is triggered by double-click.
6964 \begin_layout Section
6968 \begin_layout Standard
6969 Forward search is, as the name implies, in a sense the
6970 \begin_inset Quotes eld
6974 \begin_inset Quotes erd
6978 It allows you to let the viewer jump to a given position from within LyX.
6979 If forward search is set up (as described in what follows), you can put
6980 the cursor anywhere in your LyX document, and hit
6981 \begin_inset Flex MenuItem
6984 \begin_layout Plain Layout
6985 Navigate\SpecialChar \menuseparator
6992 \begin_inset Flex MenuItem
6995 \begin_layout Plain Layout
7001 in the context menu via right mouse click), and then the viewer will jump
7002 to that position as well.
7003 This implies, of course, that your viewer supports this function.
7006 \begin_layout Standard
7007 To make forward search possible, you first need to provide the generated
7008 output PDF/DVI file with additional information about the TeX sources.
7009 This can be done via the methods described in the section
7010 \begin_inset CommandInset ref
7012 reference "sub:rev-search"
7019 \begin_layout Standard
7020 Additionally, you need to configure LyX for using your viewers in
7021 \begin_inset Flex MenuItem
7024 \begin_layout Plain Layout
7025 Tools\SpecialChar \menuseparator
7026 Preferences\SpecialChar \menuseparator
7027 Output\SpecialChar \menuseparator
7034 We provide a range of tested configurations for some viewers, which you
7035 can select from the drop down list.
7036 If none of these configurations suits you, you have to find out and enter
7037 a suitable configuration yourself.
7038 The definition syntax uses the following placeholders:
7041 \begin_layout Itemize
7043 \begin_inset Flex Code
7046 \begin_layout Plain Layout
7055 \begin_layout Itemize
7057 \begin_inset Flex Code
7060 \begin_layout Plain Layout
7066 : name of the (temporary) exported .tex file
7069 \begin_layout Itemize
7071 \begin_inset Flex Code
7074 \begin_layout Plain Layout
7080 : name of the exported output file (either dvi or pdf, depending on which
7081 one exists in the temporary directory)
7084 \begin_layout Standard
7085 Note that only some of the viewers provide full forward search functionality,
7086 among them yap, xdvi, okular and Sumatra PDF
7090 \begin_layout Plain Layout
7091 For Sumatra CMCDDE is needed --- downloadable from http://www.istri.fr/zip/CMCDDE.z
7098 While many of the widespread PDF viewers (most notably Adobe Reader) do
7099 not support forward search at all, some other viewers -- e.
7100 \begin_inset space \thinspace{}
7104 evince and xpdf -- allow at least to reload the document and jump to a
7105 specific page of the file, so you can at least navigate
7106 \begin_inset Quotes eld
7110 \begin_inset Quotes erd
7114 These latter functionality is provided by an external call of synctex (see
7115 the predefined example configurations).
7119 \begin_layout Standard
7120 Forward search works both with DVI and PDF output.
7121 LyX simply checks which preview format you have used before (i.
7122 \begin_inset space \thinspace{}
7125 e., which format is already there in the temporary directory) and chooses
7126 the appropriate configuration for the respective format.
7129 \begin_layout Chapter
7130 Special Document Classes
7133 \begin_layout Section
7137 \begin_layout Standard
7143 \begin_layout Subsection
7147 \begin_layout Standard
7148 This section describes how LyX can be used to write articles for submission
7149 to the scientific journal
7151 Astronomy and Astrophysics
7153 (www.edpsciences.fr/aa/
7154 \begin_inset Flex URL
7157 \begin_layout Plain Layout
7159 http://www.edpsciences.fr/aa/
7164 ) using Version 5.01 of the document class
7169 This package can be downloaded from the ftp site
7172 \begin_layout Standard
7173 \begin_inset VSpace medskip
7179 \begin_layout Standard
7181 \begin_inset Flex URL
7184 \begin_layout Plain Layout
7186 ftp://ftp.edpsciences.org/pub/aa/readme.html
7194 \begin_layout Standard
7195 \begin_inset VSpace medskip
7201 \begin_layout Standard
7202 A manual comes together with that package, and this text is not meant to
7203 replace the original manual but is merely a short guide in how to realize
7204 the correct form of your paper.
7208 \begin_layout Standard
7209 Please note that the publisher of the journal was changed from Springer
7210 to EDP Sciences starting January 1, 2001.
7211 That change involved also some slight changes to the style files, namely
7212 the removal of the thesaurus command.
7213 The LyX class aa supports the newest version of these style files, V 5.01.
7214 If you have an older version installed, please upgrade.
7215 For compatibility, the old (version 4) layout has been kept as
7220 Please refer to the comments in
7222 LyXDir/layouts/aapaper.layout
7227 \begin_layout Subsection
7231 \begin_layout Standard
7232 It is recommended you start from the example template distributed with LyX.
7233 If you are not using a template, note the following settings:
7236 \begin_layout Itemize
7243 Document\SpecialChar \menuseparator
7246 dialog (OK, that one was obvious).
7249 \begin_layout Itemize
7250 Don't change the option
7253 \begin_inset space ~
7263 The whole layout is done by the macros, you shouldn't change anything.
7266 \begin_layout Subsection
7270 \begin_layout Standard
7271 First thing to enter is the header information.
7272 It consists of seven entries, of which some are optional.
7276 \begin_layout Itemize
7284 \begin_layout Itemize
7292 \begin_layout Itemize
7300 \begin_layout Itemize
7308 \begin_layout Itemize
7313 : [optional] if more than one author: whom to contact for offprint requests.
7316 \begin_layout Itemize
7321 : [optional] mail address for contacts.
7324 \begin_layout Itemize
7332 Received: <date>; Accepted <date>
7335 \begin_layout Standard
7336 There is no need to issue the
7342 command, this is done automatically by LyX when the header is finished.
7343 Although the order of the single header entries doesn't matter it is advised
7344 to keep the above sequence, just to get the best optics and meets the layout
7345 of the real document.
7348 \begin_layout Standard
7349 If you want to place footnotes in the header block, e.
7350 \begin_inset space \thinspace{}
7354 \begin_inset space \space{}
7357 to state your present address, just use the standard footnote via the menu
7360 Insert\SpecialChar \menuseparator
7364 LyX will automagically use the term
7373 \begin_layout Standard
7374 In addition to these topics, the macros use three additional LaTeX commands
7375 that have no counterpart in LyX:
7378 \begin_layout Itemize
7385 to separate different names for more than one author and institute, respectivel
7389 \begin_layout Itemize
7396 to mark corresponding author/institute pairs.
7397 The institutes are numbered sequentially as they appear in the
7401 field, so you have to put a marker to each author.
7404 \begin_layout Itemize
7411 to supply an email address for fast contact.
7414 \begin_layout Standard
7415 In all cases, the appropriate command has to be entered in LyX and marked
7421 \begin_layout Subsection
7425 \begin_layout Standard
7426 The abstract should immediately follow the header block.
7427 With version 5 the abstract environment was changed to a command, and there
7428 is now a resctriction to only one paragraph.
7429 In addition, it should contain an entry with the keywords.
7430 This is not yet implemented for LyX, therefore you have to enter the LaTeX
7437 by hand and mark it as LaTeX code.
7438 Refer to the example paper.
7441 \begin_layout Subsection
7442 Supported environments
7445 \begin_layout Standard
7446 The A&A paper layout supports the following environments for structuring
7450 \begin_layout Itemize
7456 \begin_layout Itemize
7462 \begin_layout Itemize
7468 \begin_layout Itemize
7474 \begin_layout Itemize
7480 \begin_layout Itemize
7486 \begin_layout Itemize
7492 \begin_layout Itemize
7498 \begin_layout Itemize
7504 \begin_layout Itemize
7510 \begin_layout Itemize
7516 \begin_layout Itemize
7522 \begin_layout Subsection
7523 Commands not supported by LyX
7526 \begin_layout Standard
7527 Some commands are not yet supported by the
7532 Some have already been mentioned.
7533 For the sake of completeness, they are listed all together here:
7536 \begin_layout Itemize
7544 \begin_layout Itemize
7552 \begin_layout Itemize
7560 \begin_layout Itemize
7568 \begin_layout Itemize
7576 \begin_layout Itemize
7584 \begin_layout Itemize
7592 \begin_layout Itemize
7600 \begin_layout Standard
7601 If you want to use any of these commands, you have to enter them yourself.
7604 Do not forget to mark them as LaTeX code!
7607 \begin_layout Subsection
7608 Figure and Table Floats
7611 \begin_layout Standard
7612 LyX provides support for the necessary float environments
7614 figure, figure*, table
7620 , therefore we won't tell much about it here.
7624 \begin_inset space ~
7630 Just remember that tables should be left-aligned.
7631 For that, select the table and change the alignment in
7633 Edit\SpecialChar \menuseparator
7635 \begin_inset space ~
7641 \begin_layout Standard
7642 There is only one special thing: the figures with caption besides the figure.
7643 To create such a figure, you have to do the following:
7646 \begin_layout Enumerate
7647 Create a wide figure float:
7649 Insert\SpecialChar \menuseparator
7650 Float\SpecialChar \menuseparator
7653 , then right click in the figure and select
7659 \begin_inset space ~
7667 \begin_layout Enumerate
7668 Enter your caption text.
7671 \begin_layout Enumerate
7676 to move the cursor above the caption.
7679 \begin_layout Enumerate
7683 \begin_layout Enumerate
7684 Position the cursor behind the figure and insert a horizontal fill:
7686 Insert\SpecialChar \menuseparator
7688 \begin_inset space ~
7691 Character\SpecialChar \menuseparator
7693 \begin_inset space ~
7701 \begin_layout Enumerate
7702 Switch to LaTeX mode:
7705 \begin_inset space ~
7713 \begin_layout Enumerate
7723 Do not close the brace!
7726 \begin_layout Enumerate
7727 Position the cursor behind the caption text, switch to LaTeX mode and insert
7731 \begin_inset space ~
7743 \begin_layout Standard
7744 Also, refer to the figures in the example paper.
7747 \begin_layout Subsection
7751 \begin_layout Standard
7752 For submission, the paper has to be formated in a special double-spacing
7754 For this purpose, you have to give the option
7758 to the documentclass.
7759 This must be done using the extra class options field in the
7761 Document\SpecialChar \menuseparator
7765 Just enter the string
7772 \begin_layout Subsection
7776 \begin_layout Standard
7781 directory contains an example paper written with LyX.
7782 It is the example paper from the original macro package, translated to
7784 Use it for inspiration, and compare the original LaTeX code with LyX way
7788 \begin_layout Section
7792 \begin_layout Standard
7798 \begin_layout Subsection
7802 \begin_layout Standard
7803 AASTeX is a set of macros produced by the American Astronomical Society
7804 to facilitate electronic manuscript submission to the three journals they
7805 publish: the Astrophysical Journal (including the Letters and Supplement),
7806 the Astronomical Journal, and the Publications of the Astronomical Society
7808 LyX has proven to be an excellent tool for generating these documents,
7809 especially given its equation, citation, and figure handling capabilities.
7810 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7811 is the version described here, or higher.
7812 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7813 incompatible with LyX.
7814 The AASTeX package may be downloaded from the AASTeX Web site
7817 \begin_layout Standard
7818 \begin_inset VSpace medskip
7824 \begin_layout Standard
7826 \begin_inset Flex URL
7829 \begin_layout Plain Layout
7831 http://www.journals.uchicago.edu/AAS/AASTeX
7839 \begin_layout Standard
7840 \begin_inset VSpace medskip
7846 \begin_layout Standard
7847 A complete user guide is contained in that package and you should familiarize
7848 yourself with it thoroughly before embarking on writing a paper in LyX.
7849 LyX will not reduce the need to figure out all the AASTeX commands, it
7850 will only reduce the drudgery of typing everything in.
7851 It is your responsibility to ensure that the final exported LaTeX document
7852 conforms completely to the requirements of the journal to which you are
7853 submitting your paper.
7856 \begin_layout Subsection
7857 Starting a New Paper
7860 \begin_layout Standard
7861 I strongly suggest that you start with the AASTeX template file.
7864 File\SpecialChar \menuseparator
7871 , enter the new file name, then choose the
7876 This will show the most common fields found in a manuscript.
7877 Simply overwrite the existing text (including the brackets,
7881 ) with the correct information.
7882 Many of the AASTeX commands and environments can be implemented directly
7883 in LyX, but some cannot: most noticeably
7895 , which should stick out like a sore thumb if you actually just opened the
7897 For commands such as these, the LaTeX code must be entered directly and
7899 Such commands are referred to as TeX code, or Evil Red Text.
7900 I tried to minimize the amount of TeX code needed in an AASTeX document,
7901 but there is still a bit more required than any of us would like.
7904 \begin_layout Subsection
7905 Finishing Your Paper
7908 \begin_layout Standard
7909 When the paper is finished to your satisfaction and previews/prints correctly,
7911 \begin_inset Quotes eld
7915 \begin_inset Quotes erd
7918 actions which need to be done before you submit it to the journals.
7922 \begin_layout Enumerate
7923 Export your paper as a LaTeX file (
7925 File\SpecialChar \menuseparator
7926 Export\SpecialChar \menuseparator
7933 \begin_layout Enumerate
7938 file with your favorite text editor
7942 \begin_layout Enumerate
7943 remove the comment lines before the
7952 \begin_layout Enumerate
7957 usepackage...{fontenc}
7959 line if it appears (usually just after
7974 \begin_layout Enumerate
7975 remove everything between (and including) the
7987 commands, except for any commands you specifically put into the LaTeX preamble
7988 (which should appear immediately after the
7989 \begin_inset Quotes eld
7992 User specified LaTeX commands
7993 \begin_inset Quotes erd
8004 \begin_layout Enumerate
8005 Run the resulting file through LaTeX to make sure it still processes correctly.
8008 \begin_layout Enumerate
8009 Reread the journal requirements to make sure your filenames and formats
8013 \begin_layout Enumerate
8017 \begin_layout Subsection
8018 Comments On Specific Commands
8021 \begin_layout Standard
8022 I will not describe the detailed usage of the individual AASTeX commands:
8023 the AASTeX User Guide (
8027 ) gives a good description of each.
8028 Thus it's probably easiest for me to go down the list as found in the guide
8029 and offer comments where necessary.
8030 So let's begin \SpecialChar \ldots{}
8034 \begin_layout Subsubsection
8035 Things that work as expected
8038 \begin_layout Standard
8039 Because they work as you might expect, I simply list them and the section
8140 begin{thebibliography}
8148 (2.13.2), all the cite commands and their variations (2.13.2), the generic
8149 graphicx figure commands (2.14.1),
8173 (2.15.4, amongst other places),
8200 \begin_layout Standard
8201 The following style options also work correctly:
8222 Simply put them in the
8228 Layout\SpecialChar \menuseparator
8234 \begin_layout Subsubsection
8235 Things that work, but require more comment
8238 \begin_layout Standard
8239 The following items work, but require a little more discussion:
8242 \begin_layout Itemize
8243 These items are reserved for use by the journal editors, but you can put
8244 them into the LaTeX preamble if you feel compelled to do so:
8277 \begin_layout Itemize
8278 These items may be placed in the LaTeX preamble, and are included as blanks
8279 in the template file:
8300 \begin_layout Itemize
8307 (2.3) – can only be used
8308 \begin_inset Quotes eld
8312 \begin_inset Quotes erd
8315 , not in the middle of a paragraph.
8316 Use TeX code if you need to embed it.
8319 \begin_layout Itemize
8326 (2.3) – will have extra {} after it.
8327 This should not cause an error.
8330 \begin_layout Itemize
8337 (2.6) – can only be used
8338 \begin_inset Quotes eld
8342 \begin_inset Quotes erd
8345 , not in the middle of a paragraph.
8346 Use TeX code if you need to embed it.
8349 \begin_layout Itemize
8356 (2.8) – can't insert a cross-reference tag, you must type the tag name by
8360 \begin_layout Itemize
8374 \begin_layout Itemize
8381 (2.9) – will have extra {} after it.
8382 This should not cause an error.
8385 \begin_layout Itemize
8392 (2.11) – will have extra {} after it.
8393 This should not cause an error.
8396 \begin_layout Itemize
8403 (2.14.2) – you can insert an optional filename argument by placing the cursor
8404 at the beginning of the text and selecting
8406 Insert\SpecialChar \menuseparator
8411 \begin_inset Quotes eld
8415 \begin_inset Quotes erd
8418 inserts an optional argument of the type needed by
8425 Hopefully it will be renamed someday.
8428 \begin_layout Itemize
8441 for the catalog ID optional parameter
8444 \begin_layout Itemize
8457 for the catalog ID optional parameter
8460 \begin_layout Subsubsection
8461 Things not implemented, use TeX code
8464 \begin_layout Standard
8487 setcounter{equation}
8489 (2.12), Journal name abbreviations (2.13.4),
8525 (2.15.4, insert it as the first element in the lefthand cell after where
8527 Don't use any of LyX's rules in the table),
8539 (2.15.5), much of Misc (2.17, except
8590 \begin_layout Subsubsection
8591 Things that cannot be implemented
8594 \begin_layout Standard
8595 \SpecialChar \ldots{}
8596 at least in any meaningful sort of way, so I suggest ignoring them.
8597 They are the references environment (2.13.3), and the deluxetable environment
8599 If you really, really need to use deluxetable, I suggest editing it in
8600 a separate file with a text editor, then using
8602 Insert\SpecialChar \menuseparator
8604 \begin_inset space ~
8609 to include it in your LyX document.
8614 file to see an example of this.
8617 \begin_layout Subsection
8618 FAQs, Tips, Tricks, and Other Ruminations
8621 \begin_layout Subsubsection
8622 Getting LyX and AASTeX to cooperate
8625 \begin_layout Standard
8626 It can be a bit tricky to get LyX to recognize a new layout and document
8628 When all else fails, do this:
8631 \begin_layout Enumerate
8632 Make certain that LaTeX can find AASTeX.
8633 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8634 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
8641 \begin_layout Enumerate
8653 \begin_layout Enumerate
8656 Tools\SpecialChar \menuseparator
8659 in LyX, then restart LyX.
8662 \begin_layout Enumerate
8663 Open a regular new file, not from a template.
8664 Does AASTeX appear in the class list in
8666 Document\SpecialChar \menuseparator
8672 \begin_layout Standard
8673 If you get a warning from an existing AASTeX document about not being able
8674 to find the AASTeX layout or a message about
8675 \begin_inset Quotes eld
8678 You should not mix title layouts with normal ones
8679 \begin_inset Quotes erd
8682 , things haven't been installed correctly.
8685 \begin_layout Subsubsection
8686 LaTeX error processing a table
8689 \begin_layout Standard
8690 LyX, by default, attempts to center the table caption/title.
8691 This seems to produce a bad interaction in AASTeX so you should click somewhere
8692 in the caption/title, then select
8694 Edit\SpecialChar \menuseparator
8696 \begin_inset space ~
8710 This took care of it for me.
8713 \begin_layout Subsubsection
8717 \begin_layout Standard
8718 A couple of things: 1) I have noticed some funny spacing in the reference
8719 entries in the text.
8720 When you enter the bibliography item data, make sure their is
8724 space between the last author and the parenthesis setting off the year;
8728 \begin_inset space \thinspace{}
8732 \begin_inset space \space{}
8746 2) Entering the references at all is not obvious.
8747 The easiest thing is to start typing your first reference at the end of
8748 the document, then mark it as type
8753 That will put a small gray box in front of what you just typed.
8754 Click on the box to fill in the rest of the information.
8755 For new references, go to the end of an existing reference and press return.
8756 That will create a new line with its own box, etc.
8759 \begin_layout Subsubsection
8763 \begin_layout Standard
8764 Even though AASTeX provides its own figure commands (
8770 , for example), I much prefer LaTeX's standard figure commands (with the
8779 \begin_inset space ~
8782 commands as TeX code into a Figure Float box if you desire, but I never
8783 have much luck getting the layout right.
8784 With the standard graphics, LyX will insert a
8788 usepackage{graphicx}
8790 command into the LaTeX preamble and handle the figures in the standard
8791 LaTeX2e way, interspersing the figures in the text.
8792 I believe ApJ accepts figures exactly this way now; AJ might still use
8794 \begin_inset Quotes eld
8797 stack everything at the end
8798 \begin_inset Quotes erd
8804 \begin_layout Subsubsection
8805 Things I could have done, but didn't
8808 \begin_layout Standard
8810 \begin_inset Quotes eld
8814 \begin_inset Quotes erd
8817 things I could have implemented, but chose not to.
8818 For instance, I saw no point in double-spacing the text in the LyX window,
8819 even though it is double-spaced in the paper manuscript.
8820 Also, I chose not to make separate layouts for the preprint and preprint2
8822 Since I assume you will spend most of your time in the plain manuscript
8823 mode anyway, I decided not to chew up more disk space with this.
8827 \begin_layout Subsection
8831 \begin_layout Standard
8832 Your mileage may vary.
8833 I've now had papers published by both ApJ and AJ that have had 98% of the
8834 effort done in LyX; the last 2% was the LaTeX post-processing and a few
8836 I have had no trouble with the submission process, and I'm sure the journals
8837 were never aware that there might be a difference.
8838 So, go forth and publish!
8841 \begin_layout Section
8845 \begin_layout Standard
8855 \begin_layout Standard
8856 \begin_inset VSpace bigskip
8862 \begin_layout Standard
8864 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8865 papers to be submitted to American Mathematical Society publications.
8866 The layouts are not tailored to a specific journal, but easily can be.
8867 You should refer to the AMS documentation for specific instructions for
8868 each journal (usually it will entail only changing a single line in the
8870 That documentation is available on the Web at
8871 \begin_inset Flex URL
8874 \begin_layout Plain Layout
8882 \begin_inset Flex URL
8885 \begin_layout Plain Layout
8887 ftp://ftp.ams.org/pub/tex/amslatex/
8893 These layouts are appropriate, and useful, for any mathematical writing.
8897 \begin_layout Standard
8898 There are two basic AMS LaTeX layouts:
8901 \begin_layout Itemize
8902 amsart: The standard AMS article format.
8905 \begin_layout Itemize
8906 amsbook: the standard AMS book (really, monograph) format.
8910 \begin_layout Standard
8911 The layouts themselves contain only the minimum necessary to use the AMS
8913 They do not, in particular, contain any of the `theorem' environments used
8914 for setting theorems, lemmas, and the like.
8915 These are contained, instead, in the
8916 \begin_inset Flex Code
8919 \begin_layout Plain Layout
8925 module, which is loaded by default when when you select one of the AMS
8927 (It can also be used with other classes and can be removed, if you would
8928 rather use something else.) Less commonly used environments are in the
8929 \begin_inset Flex Code
8932 \begin_layout Plain Layout
8933 Theorems (AMS-Extended)
8938 module, which must be loaded manually.
8941 \begin_layout Standard
8942 By default, theorems and the like are numbered consecutively throughout
8943 the document, but this may be modified by loading the module
8944 \begin_inset Flex Code
8947 \begin_layout Plain Layout
8948 Theorems (Order by Section)
8953 or, if you are using
8954 \begin_inset Flex Code
8957 \begin_layout Plain Layout
8964 \begin_inset Flex Code
8967 \begin_layout Plain Layout
8968 Theorems (Order by Chapter)
8974 These will number the results as
8975 \begin_inset Formula $n.m$
8978 , where the first number refers to the section (or chapter) and the second
8979 refers to the total number of results so far in that section (or chapter).
8980 Many environments are also available unnumbered.
8981 These are indicated by an asterisk at the end.
8982 If you happen to want
8986 unnumbered results, the module
8987 \begin_inset Flex Code
8990 \begin_layout Plain Layout
8996 provides that option.
8999 \begin_layout Standard
9000 Note that these modules do not
9004 to be used with the AMS classes.
9005 It is perfectly possible to use the
9006 \begin_inset Flex Code
9009 \begin_layout Plain Layout
9015 module, and the others mentioned, with other classes, such as
9016 \begin_inset Flex Code
9019 \begin_layout Plain Layout
9026 \begin_inset Flex Code
9029 \begin_layout Plain Layout
9036 \begin_inset Flex Code
9039 \begin_layout Plain Layout
9048 \begin_layout Subsection
9049 What these layouts provide
9052 \begin_layout Standard
9053 There is a long list of included environments provided by these layouts.
9054 In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9055 variety of `theorem' environments.
9056 However, the AMS recommends the environments that are available in LyX.
9060 \begin_layout Standard
9061 The following environments—as well as the standard environments, such as
9063 \begin_inset Flex Noun
9066 \begin_layout Plain Layout
9073 \begin_inset Flex Noun
9076 \begin_layout Plain Layout
9083 \begin_inset Flex Noun
9086 \begin_layout Plain Layout
9093 \begin_inset Flex Noun
9096 \begin_layout Plain Layout
9103 \begin_inset Flex Noun
9106 \begin_layout Plain Layout
9113 \begin_inset Flex Code
9116 \begin_layout Plain Layout
9123 \begin_inset Flex Code
9126 \begin_layout Plain Layout
9135 \begin_layout Description
9136 Address This should be the author's permanent address.
9139 \begin_layout Description
9141 \begin_inset space ~
9144 Address This should be the author's temporary address at the time of submission,
9145 if different from the Address.
9148 \begin_layout Description
9149 Email Author's e-mail address
9152 \begin_layout Description
9153 URL Author's Web address, if desired.
9156 \begin_layout Description
9157 Keywords Key words or phrases used to identify specific topics discussed
9161 \begin_layout Description
9162 Subjectclass These refer to the AMS Subject Classifications, published and
9165 Mathematical Reviews
9168 These are also available online at the AMS cites listed above.
9171 \begin_layout Description
9175 \begin_layout Description
9179 \begin_layout Description
9183 \begin_layout Standard
9184 The following environments are provided by both the
9185 \begin_inset Flex Code
9188 \begin_layout Plain Layout
9195 \begin_inset Flex Code
9198 \begin_layout Plain Layout
9204 modules, in the latter case in both starred (unnumbered) and unstarred
9205 (numbered) versions.
9206 These same environments are provided only in the starred versions by the
9208 \begin_inset Flex Code
9211 \begin_layout Plain Layout
9220 \begin_layout Theorem
9221 This is typically used for the statements of major results.
9225 \begin_layout Corollary*
9226 This is used for statements which follow fairly directly from previous statement
9228 Again, these can be major results.
9233 These are smaller results needed to prove other statements.
9236 \begin_layout Proposition
9237 These are less major results which (hopefully) add to the general theory
9241 \begin_layout Conjecture
9242 These are statements provided without justification, which the author does
9243 not know how to prove, but which seem to be true (to the author, at least).
9246 \begin_layout Definition*
9247 Guess what this is for.
9248 The font is different for this environment than for the previous ones.
9252 \begin_layout Example*
9253 Used for examples illustrating proven results.
9256 \begin_layout Problem
9257 It's not really known what this is for.
9258 You should figure it out.
9261 \begin_layout Exercise*
9262 Write a description for this one.
9265 \begin_layout Remark
9266 This environment is also a type of theorem, usually a lesser sort of observation.
9269 \begin_layout Claim*
9270 Often used in the course of giving a proof of a larger result.
9274 Generally, these are used to break up long arguments, using specific instances
9280 The numbering scheme for cases is on its own, not together with other numbered
9286 At the end of this environment, a QED symbol (usually a square, but it can
9287 vary with different styles) is placed.
9288 If you want to have other environments within this one—for example, Case
9289 environments—and have the QED symbol appear only after them, then the other
9290 environments need to be nested within the proof environment.
9293 Nesting Environments
9299 for information on nesting.
9302 \begin_layout Standard
9303 And these environments are provided by
9304 \begin_inset Flex Code
9307 \begin_layout Plain Layout
9308 Theorems (AMS-Extended)
9316 \begin_layout Criterion*
9317 A required condition.
9320 \begin_layout Algorithm*
9321 A general procedure to be used.
9324 \begin_layout Axiom*
9325 This is a property or statement taken as true within the system being discussed.
9328 \begin_layout Condition*
9329 Sometimes used to state a condition assumed within the present context of
9334 Similar to a Remark.
9337 \begin_layout Notation*
9338 Used for the explanation of, yes, notation.
9341 \begin_layout Summary
9342 Do we really need to tell you?
9345 \begin_layout Acknowledgement*
9349 \begin_layout Conclusion*
9350 Sometimes used at the end of a long train of argument.
9354 Used in a way similar to Proposition, though perhaps lower on the scale.
9357 \begin_layout Standard
9358 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9360 They need to be available on your system in order to use these environments.
9363 \begin_layout Section
9371 \begin_layout Standard
9377 \begin_layout Subsection
9381 \begin_layout Standard
9382 These are the layout files for some of the journals of the American Geophysical
9384 It is assumed that you have both the AGU's own class files and AGUplus
9385 installed (everything to be found at
9386 \begin_inset Flex URL
9389 \begin_layout Plain Layout
9391 ftp://ftp.agu.org/journals/latex/journals
9399 \begin_layout Subsection
9403 \begin_layout Standard
9413 They are still called this in the LyX GUI, though their LaTeX equivalents
9414 in the AGU classes are
9425 \begin_layout Standard
9426 Newly defined styles are
9463 These are mostly manuscript attributes and defined in the AGU class documentati
9467 \begin_layout Standard
9468 I suspect this is still badly incomplete.
9471 \begin_layout Subsection
9475 \begin_layout Standard
9492 \begin_layout Subsection
9496 \begin_layout Itemize
9499 Journal of Geophysical Research
9508 \begin_layout Standard
9509 Add your own, it isn't so hard! Look at the
9520 \begin_layout Subsection
9521 Bugs and things to remember
9524 \begin_layout Standard
9525 In order to use the new layouts, you must remember to do the following for
9529 \begin_layout Enumerate
9535 This can be done in the
9537 Layout\SpecialChar \menuseparator
9542 Document\SpecialChar \menuseparator
9546 (AGU articles are always in English, right? So
9553 \begin_layout Enumerate
9563 (Yes, this is a bug.)
9566 \begin_layout Enumerate
9567 Make sure you use the
9571 bibliography style, by entering
9575 into the second field of the BibTeX inset.
9576 None of the standard styles will do.
9579 \begin_layout Section
9583 \begin_layout Standard
9589 \begin_layout Subsection
9593 \begin_layout Standard
9594 Broadway is for writing plays.
9595 The format is more decorative than Hollywood, and much less standardized.
9596 This format should be suitable for workshops.
9599 \begin_layout Subsection
9603 \begin_layout Standard
9604 The same as in Hollywood.
9607 \begin_layout Subsection
9611 \begin_layout Standard
9616 names as labels then cross-reference the label to insert the name.
9617 The cross-reference dialog will show the current cast of characters.
9620 \begin_layout Subsection
9621 Paper size and Margins
9624 \begin_layout Standard
9625 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9628 \begin_layout Subsection
9632 \begin_layout Standard
9633 The following environments are available.
9634 You can use broadway.bind to get the bind keys shown at the right.
9637 \begin_layout Itemize
9641 \begin_inset Newline newline
9646 You should not have to use this, but it is here for anything that does not
9650 \begin_layout Itemize
9654 \begin_inset space \hfill{}
9658 \begin_inset Newline newline
9663 Used to describe stage setting and the action.
9664 First use of speaker names in all CAPs.
9667 \begin_layout Itemize
9671 \begin_inset space \hfill{}
9675 \begin_inset Newline newline
9680 Automatically numbered.
9681 On screen it will be arabic, but will print as Roman.
9684 \begin_layout Itemize
9688 \begin_inset space \hfill{}
9692 \begin_inset Newline newline
9702 It is just centered text.
9705 \begin_layout Itemize
9709 \begin_inset space \hfill{}
9713 \begin_inset Newline newline
9718 Not automatically numbered.
9719 You supply the number.
9720 This is because I couldn't figure out how.
9723 \begin_layout Itemize
9727 \begin_inset space \hfill{}
9731 \begin_inset Newline newline
9736 A special case of Narrative to describe the setting and action as the curtain
9740 \begin_layout Itemize
9744 \begin_inset space \hfill{}
9748 \begin_inset Newline newline
9753 The speaker's (actor's) title, centered in all CAPS.
9756 \begin_layout Itemize
9760 \begin_inset space \hfill{}
9764 \begin_inset Newline newline
9769 Instructions to the speaker.
9770 The parentheses are automatically inserted.
9771 The ( will appear on screen, but both will be in the printed play.
9772 This environment is only used within
9779 \begin_layout Itemize
9783 \begin_inset space \hfill{}
9787 \begin_inset Newline newline
9792 What the Speaker says.
9795 \begin_layout Itemize
9799 \begin_inset space \hfill{}
9803 \begin_inset Newline newline
9808 The curtain comes down.
9811 \begin_layout Itemize
9815 \begin_inset space \hfill{}
9821 \begin_layout Itemize
9825 \begin_inset space \hfill{}
9831 \begin_layout Itemize
9835 \begin_inset space \hfill{}
9841 \begin_layout Standard
9845 \begin_layout Section
9849 \begin_layout Standard
9854 can be used to type letters according to German conventions.
9855 A template file is included in
9857 .../lyx/share/templates
9859 for you to use as a starting point.
9862 \begin_layout Section
9870 \begin_layout Standard
9876 \begin_layout Subsection
9880 \begin_layout Standard
9881 This is the layout file for the European Geophysical Society journals.
9886 can be downloaded from the web site of the EGS under
9887 \begin_inset Flex URL
9890 \begin_layout Plain Layout
9900 \begin_layout Subsection
9904 \begin_layout Standard
9907 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9915 The current layout file is unfortunately very unmodular and would benefit
9916 from using the various
9923 \begin_layout Section
9927 \begin_layout Standard
9928 See the LyX template file
9933 It contains all infos you need.
9936 \begin_layout Section
9942 \begin_inset CommandInset label
9951 \begin_layout Standard
9957 \begin_layout Subsection
9961 \begin_layout Standard
9962 This section describes how to use LyX to make slides for overhead projectors.
9963 There are two document classes that can do this: the default slides class
9969 This section documents the latter.
9972 \begin_layout Standard
9973 I'm going to say this again, nice and clear, so that there's no misunderstanding
9977 \begin_layout Standard
9978 \begin_inset VSpace bigskip
9984 \begin_layout Standard
9988 This section documents the class
9989 \begin_inset Quotes eld
9997 \begin_inset Quotes erd
10005 \begin_layout Standard
10006 \begin_inset VSpace bigskip
10012 \begin_layout Standard
10013 If you're looking for the documentation for
10014 \begin_inset Quotes eld
10022 \begin_inset Quotes erd
10025 , check out section
10026 \begin_inset space ~
10030 \begin_inset CommandInset ref
10032 reference "sec:slitex"
10037 If your machine doesn't have the
10042 \begin_inset Quotes eld
10050 \begin_inset Quotes erd
10053 ] installed, you'll probably have to use the default
10057 class, which isn't quite as good as
10062 \begin_layout Standard
10067 class is designed for use with version 2.1 of the
10071 LaTeX class file which is now an integral part of LaTeX2e.
10074 \begin_layout Subsection
10078 \begin_layout Standard
10079 Obviously, to use this document class, you need to select
10080 \begin_inset Quotes eld
10088 \begin_inset Quotes erd
10098 \begin_inset space ~
10104 There are some settings in the
10107 \begin_inset space ~
10112 dialog that you should know about that are specific to this class:
10115 \begin_layout Itemize
10116 Don't change the options
10127 \begin_inset space ~
10133 They're ignored by the
10140 \begin_layout Itemize
10141 The default font size is 20
10142 \begin_inset space \thinspace{}
10145 pt with the other options being 17
10146 \begin_inset space \thinspace{}
10150 \begin_inset space \thinspace{}
10154 \begin_inset space \thinspace{}
10160 \begin_layout Itemize
10161 The default font is
10169 but all math equations are still typeset in the usual roman font.
10172 \begin_layout Itemize
10177 supports A4 and Letter paper sizes as well as a special size for working
10179 \begin_inset space \thinspace{}
10183 It doesn't support A5, B5, legal or executive paper sizes.
10186 \begin_layout Itemize
10187 Don't bother changing the
10191 settings because they are ignored anyway.
10192 All floats appear where they are defined in the text.
10195 \begin_layout Itemize
10200 setting behaves a bit differently for this class.
10205 provides extensive footer and header capabilities including a user-defined
10208 \begin_inset space ~
10212 \begin_inset CommandInset ref
10214 reference "sec:foilfoot"
10219 The title page is treated differently to all other pages in the document
10228 has the logo centered at the bottom of the page (if one is defined).
10229 The possible page style choices and what they do are as follows:
10233 \begin_layout Labeling
10234 \labelwidthstring MMMMMMM
10241 The final output contains no page numbers, or other headers or footers
10242 (except footnotes of course).
10246 \begin_layout Labeling
10247 \labelwidthstring MMMMMMM
10254 The final output contains page numbers centered at the bottom of the page.
10255 No other headings or footers (other than footnotes).
10258 \begin_layout Labeling
10259 \labelwidthstring MMMMMMM
10264 Page numbers in lower right corner.
10265 Additional headers and footers are also shown.
10266 This is also the default.
10269 \begin_layout Labeling
10270 \labelwidthstring MMMMMMM
10275 Gives you access to the
10279 package although its use with
10283 is discouraged by the writer of the
10287 package because of some potential page layout clashes.
10291 \begin_layout Subsubsection
10295 \begin_layout Standard
10296 The following options may be used in the extra class options in the
10298 Document\SpecialChar \menuseparator
10304 \begin_layout Labeling
10305 \labelwidthstring MMMMMMx
10310 This sets up the page layout for 7.33
10311 \begin_inset space \thinspace{}
10315 \begin_inset space \thinspace{}
10318 in paper, which is about the same aspect ratio as a 35
10319 \begin_inset space \thinspace{}
10322 mm slide, making it a bit easier to work with this medium.
10325 \begin_layout Labeling
10326 \labelwidthstring MMMMMMx
10331 Places a rule across the page below the header on every page except the
10335 \begin_layout Labeling
10336 \labelwidthstring MMMMMMx
10341 Places a rule across the page above the footer on every page except the
10345 \begin_layout Labeling
10346 \labelwidthstring MMMMMMx
10351 This is automatically set each time you create a new
10360 to use the dvips driver to rotate those pages that are set as landscape
10364 \begin_layout Labeling
10365 \labelwidthstring MMMMMMx
10370 Simply changes the page dimensions to those of a landscape page but doesn't
10372 Thus if you use this option you need to use an external program to rotate
10373 each page or feed your paper through your printer as landscape.
10374 Note that this option effectively reverses the roles of the
10382 environments (don't worry these are described in the next section).
10385 \begin_layout Labeling
10386 \labelwidthstring MMMMMMx
10391 Equation numbers on the left.
10394 \begin_layout Labeling
10395 \labelwidthstring MMMMMMx
10400 Flush-left equations.
10403 \begin_layout Subsection
10404 Supported Environments
10407 \begin_layout Standard
10408 Most of the environments commonly supported in other classes are also supported
10414 There are several additional environments provided by
10418 as well as a couple added by LyX.
10419 The following environments are shared with other classes:
10422 \begin_layout Standard
10426 \begin_layout Plain Layout
10430 begin{multicols}{2}
10438 \begin_layout Itemize
10444 \begin_layout Itemize
10450 \begin_layout Itemize
10456 \begin_layout Itemize
10462 \begin_layout Itemize
10468 \begin_layout Itemize
10474 \begin_layout Itemize
10480 \begin_layout Itemize
10486 \begin_layout Itemize
10492 \begin_layout Itemize
10498 \begin_layout Itemize
10504 \begin_layout Itemize
10510 \begin_layout Itemize
10516 \begin_layout Itemize
10522 \begin_layout Itemize
10528 \begin_layout Itemize
10534 \begin_layout Itemize
10540 \begin_layout Itemize
10546 \begin_layout Standard
10550 \begin_layout Plain Layout
10562 \begin_layout Standard
10563 That is, all the major environments apart from the sectioning environments.
10564 Since foils are essentially self-contained sections, with a title and body,
10569 provides specific commands for starting new foils and these are:
10572 \begin_layout Itemize
10578 \begin_layout Itemize
10584 \begin_layout Standard
10585 LyX also provides slightly modified versions of these two environments called:
10588 \begin_layout Itemize
10594 \begin_layout Itemize
10597 ShortRotatefoilhead
10600 \begin_layout Standard
10601 and the differences will be explained in the next section.
10604 \begin_layout Standard
10605 Since foils are often used in presenting ideas or new theorems and such
10610 also provides a comprehensive box of goodies for presenting them:
10613 \begin_layout Standard
10617 \begin_layout Plain Layout
10621 begin{multicols}{2}
10629 \begin_layout Itemize
10635 \begin_layout Itemize
10641 \begin_layout Itemize
10647 \begin_layout Itemize
10653 \begin_layout Itemize
10659 \begin_layout Itemize
10665 \begin_layout Itemize
10671 \begin_layout Itemize
10677 \begin_layout Itemize
10683 \begin_layout Itemize
10689 \begin_layout Itemize
10695 \begin_layout Standard
10699 \begin_layout Plain Layout
10711 \begin_layout Standard
10712 The starred versions are unnumbered while the unstarred versions are numbered.
10713 There are also two list environments added by LyX and these are:
10716 \begin_layout Itemize
10722 \begin_layout Itemize
10728 \begin_layout Standard
10733 provides some powerful header and footer capabilities that are best set
10734 in the preamble although they may be set at any point in a document.
10735 If you want to change these settings in your document the best place to
10736 do so is at the very top of a foil, i.
10737 \begin_inset space \thinspace{}
10743 \begin_inset space \space{}
10748 straight after the foilhead.
10751 \begin_layout Standard
10752 For this purpose, the following command styles are provided [
10759 \begin_layout Standard
10763 \begin_layout Plain Layout
10767 begin{multicols}{2}
10775 \begin_layout Itemize
10779 \begin_inset space ~
10785 \begin_layout Itemize
10791 \begin_layout Itemize
10795 \begin_inset space ~
10801 \begin_layout Itemize
10805 \begin_inset space ~
10811 \begin_layout Itemize
10815 \begin_inset space ~
10822 \begin_layout Standard
10823 \begin_inset space ~
10830 \begin_layout Standard
10834 \begin_layout Plain Layout
10846 \begin_layout Standard
10847 There are also a few commands provided by
10851 that aren't directly supported by LyX but I'll tell you what they do and
10852 how to use them in section
10853 \begin_inset space ~
10857 \begin_inset CommandInset ref
10859 reference "sec:unsuppfoils"
10866 \begin_layout Subsection
10867 Building a Set of Foils
10870 \begin_layout Standard
10871 This section will give a simple introduction to using the different environments
10872 to build a set of foils.
10873 If you want to see an example set of foils, take a look at the
10877 file you find in LyX's
10884 \begin_layout Subsubsection
10885 Give It a Title Page
10888 \begin_layout Standard
10889 Unlike other classes that provide
10909 creates the title on a page of its own.
10910 If you leave out the
10914 environment LaTeX will substitute the current date (every time you regenerate
10918 \begin_layout Subsubsection
10922 \begin_layout Standard
10923 As I mentioned earlier, there are four ways of starting a new foil.
10924 For portrait foils you should use
10933 The difference between these two environments is the amount of space between
10934 the title of the foil (the foilhead) and the body of the foil.
10937 \begin_layout Standard
10938 Landscape foils are generated using the
10944 ShortRotatefoilhead
10947 Again the only difference is the spacing between foilhead and body.
10948 Both of the short versions have 0.5 inches less separation between the foilhead
10953 \begin_layout Standard
10954 One problem with the support for landscape foils is the requirement that
10955 you have to use the
10959 driver to generate the PostScript output otherwise the foils won't be rotated.
10960 It is possible to get landscape foils even if you haven't got the
10964 driver provided you can feed your foils sideways through your printer ;-)
10967 \begin_layout Subsubsection
10968 Theorems, Lemmas, Proofs and more
10971 \begin_layout Standard
10972 Due to a small bug in LyX you can't have two of the same type of these environme
10973 nts directly following each other.
10974 They must be separated by something.
10975 If you try, you will just be extending the previous environment as if you
10976 had merged the two environments together.
10977 So, how do you get around this problem? The simplest option is to insert
10978 some text between the two environments or add a
10982 environment between the two with just a
10983 \begin_inset Quotes eld
10991 \begin_inset Quotes erd
10995 This will force LyX to produce two separate environments and hence the
10996 correct LaTeX output.
10997 An example is provided in the example file included with the LyX distribution.
10998 Remember, this problem only occurs if you are trying to place two of the
10999 same type of theorem-like environments one directly after the other.
11002 \begin_layout Subsubsection
11006 \begin_layout Standard
11007 You get all the commonly supported list styles found in other classes as
11008 well as two new ones.
11009 I'll only describe the new ones here.
11010 If you want to find out more about the other list environments check out
11016 If you intend to use itemized lists you might also want to read about the
11020 \begin_inset space ~
11024 \begin_inset space ~
11029 dialog described above in section
11030 \begin_inset space ~
11034 \begin_inset CommandInset ref
11036 reference "sec:bullet"
11043 \begin_layout Standard
11044 The two new list styles,
11052 , are designed to make it easier for you to create lists of do's and don'ts
11053 or right and wrong by providing dedicated environments that use a tick
11054 or a cross as the label of the list.
11055 These lists are in fact dedicated variants of the
11060 They do however require that you have the
11064 packages installed.
11067 \begin_layout Subsubsection
11071 \begin_layout Standard
11076 redefines the floating tables and figures so that they appear exactly where
11077 they are in the text rather than pushing them to the top of the page or
11078 to some user specified location.
11079 In fact if you change the float placement settings they are simply ignored.
11082 \begin_layout Subsubsection
11083 Page Headers and Footers
11084 \begin_inset CommandInset label
11086 name "sec:foilfoot"
11093 \begin_layout Standard
11097 \begin_inset space ~
11106 are two commands used to control the left-footer text string.
11107 The first is meant to allow you to include a graphic logo on your foils
11109 \begin_inset Quotes eld
11117 \begin_inset Quotes erd
11121 While the second is meant to provide a classification for the audience,
11125 \begin_inset space \thinspace{}
11131 \begin_inset space \space{}
11135 It is empty by default.
11138 \begin_layout Standard
11139 The remaining page corners can be filled by
11142 \begin_inset space ~
11147 (which defaults to page numbers),
11150 \begin_inset space ~
11158 \begin_inset space ~
11166 \begin_layout Subsection
11172 \begin_inset CommandInset label
11174 name "sec:unsuppfoils"
11181 \begin_layout Standard
11182 All the commands mentioned below need to be set in a
11190 within another environment.
11193 \begin_layout Subsubsection
11197 \begin_layout Standard
11198 All lengths are adjusted using the
11221 should be replaced by the name given to the length you want to change and
11226 is the length value.
11227 All lengths should be specified in units of length such as inches (
11239 ) or relative to some document or font-based length such as
11249 \begin_layout Standard
11250 It's possible to change the spacing between a foilhead and the body of the
11251 foil by adjusting the length specified by
11258 For example, to make
11263 \begin_inset space \space{}
11266 in closer to their bodies put the following in the preamble:
11272 foilheadskip}{-0.5in}
11275 \begin_layout Standard
11276 The spacings around floats can be adjusted by setting these lengths:
11279 \begin_layout Labeling
11280 \labelwidthstring MMMMMMMMMMM
11287 Separation between the text and the top of the float
11290 \begin_layout Labeling
11291 \labelwidthstring MMMMMMMMMMM
11298 Separation between the float and the caption
11301 \begin_layout Labeling
11302 \labelwidthstring MMMMMMMMMMM
11309 Separation between the caption and the following text
11312 \begin_layout Labeling
11313 \labelwidthstring MMMMMMMMMMM
11320 You can make the captions narrower than the surrounding text by adjusting
11322 Best done relative to
11331 \begin_layout Standard
11332 There are also several title page related lengths that you may find useful
11333 if you have a long title or several authors:
11336 \begin_layout Labeling
11337 \labelwidthstring MMMMMMMMMMM
11344 Separation from headers to
11349 \begin_layout Labeling
11350 \labelwidthstring MMMMMMMMMMM
11368 \begin_layout Labeling
11369 \labelwidthstring MMMMMMMMMMM
11383 \begin_layout Labeling
11384 \labelwidthstring MMMMMMMMMMM
11400 \begin_layout Labeling
11401 \labelwidthstring MMMMMMMMMMM
11417 \begin_layout Standard
11418 The last length related command affects all the list environments.
11429 a list environment then all the vertical spacing between the list items
11431 Note that this is a command not a length so it doesn't require
11437 like the stuff mentioned above.
11440 \begin_layout Subsubsection
11441 Headers and Footers
11444 \begin_layout Standard
11457 commands control whether the logo in the
11461 definition appear on a given page.
11468 in the preamble then none of the foils will have the logo on them.
11469 If you don't want the logo on a particular page place the
11475 directly after the foilhead of that page and the
11481 directly after the next foilhead.
11484 \begin_layout Standard
11485 If you decide to use the
11489 page style setting in the
11492 \begin_inset space ~
11497 dialog you should probably add
11507 to your preamble so headers and footers on landscape pages are correctly
11508 placed when rotated.
11509 This is due to some clashes between the page layouts provided by the
11520 \begin_layout Section
11521 Hollywood (Hollywood spec scripts)
11524 \begin_layout Standard
11530 \begin_layout Subsection
11534 \begin_layout Standard
11535 Getting the format of a Hollywood script right is a
11536 \begin_inset Quotes eld
11540 \begin_inset Quotes erd
11543 It is designed to make the readers focus on content and to be easy and
11544 familiar for the actors to read.
11545 Each page of a script should be one minute of film.
11546 Nothing goes in a script that you cannot see or hear on screen.
11547 The courier 12 pt font should be used throughout.
11551 \begin_layout Subsection
11555 \begin_layout Standard
11556 Speakers' lines should NEVER break in mid-sentence.
11557 If a speaker's lines continue over a page break, repeat the
11561 title followed by (Cont'd).
11564 \begin_layout Subsection
11568 \begin_layout Standard
11573 names as labels then cross-reference the label to insert the name.
11574 The cross-reference dialog will show the current cast of characters.
11575 You can use this to insert the speaker name in narratives also.
11578 \begin_layout Subsection
11579 Paper size and Margins
11582 \begin_layout Standard
11583 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11586 \begin_layout Subsection
11590 \begin_layout Standard
11591 The following environments are available.
11592 You can use hollywood.bind to get the bind keys shown at the right.
11595 \begin_layout Itemize
11599 \begin_inset Newline newline
11604 Used where nothing else works.
11608 \begin_layout Itemize
11614 \begin_inset space \hfill{}
11622 \begin_inset Newline newline
11625 Usually followed by something like
11626 \begin_inset Quotes eld
11629 on Sally waking up.
11630 \begin_inset Quotes erd
11636 \begin_layout Itemize
11640 \begin_inset space \hfill{}
11644 \begin_inset Newline newline
11649 Introduces a new INTERIOR camera set-up.
11650 Always followed by DAY or NIGHT, or something similar to define the lighting
11652 Everthing on this line in CAPS.
11655 \begin_layout Itemize
11659 \begin_inset space \hfill{}
11663 \begin_inset Newline newline
11668 Introduces a new EXTERIOR camera set-up.
11669 Everthing on this line in CAPS.
11672 \begin_layout Itemize
11676 \begin_inset space \hfill{}
11680 \begin_inset Newline newline
11685 The character speaking.
11688 \begin_layout Itemize
11692 \begin_inset space \hfill{}
11696 \begin_inset Newline newline
11701 Instructions to the speaker.
11702 The () are automatically inserted, but only the ( will show in LyX.
11703 Both will be printed.
11706 \begin_layout Itemize
11710 \begin_inset space \hfill{}
11714 \begin_inset Newline newline
11726 \begin_layout Itemize
11730 \begin_inset space \hfill{}
11734 \begin_inset Newline newline
11739 Camera movement instruction.
11741 \begin_inset space \thinspace{}
11745 \begin_inset space \space{}
11751 \begin_layout Itemize
11755 \begin_inset space \hfill{}
11761 \begin_layout Itemize
11765 \begin_inset space \hfill{}
11771 \begin_layout Itemize
11775 \begin_inset space \hfill{}
11781 \begin_layout Itemize
11785 \begin_inset space \hfill{}
11791 \begin_layout Subsection
11795 \begin_layout Itemize
11799 \begin_layout Itemize
11803 \begin_layout Itemize
11805 \begin_inset space \thinspace{}
11812 \begin_layout Itemize
11817 \begin_layout Itemize
11818 PAN — camera movement
11821 \begin_layout Itemize
11822 INSERT — cut to close-up of
11825 \begin_layout Section
11829 \begin_layout Standard
11832 Panayotis Papasotiriou
11835 \begin_layout Subsection
11839 \begin_layout Standard
11840 The ijmpc package is a set of macros that facilitates electronic manuscript
11843 International Journal of Modern Physics C
11846 Similarly, the ijmpd package is for creating manuscripts to be submitted
11849 International Journal of Modern Physics D
11852 Both journals are published by World Scientific.
11853 The corresponding document classes are named
11862 These files, together with instructions for the authors, can be downloaded
11864 \begin_inset Flex URL
11867 \begin_layout Plain Layout
11869 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11875 \begin_inset Flex URL
11878 \begin_layout Plain Layout
11880 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
11886 Both packages are modified versions of the standard
11887 \begin_inset Quotes eld
11891 \begin_inset Quotes erd
11894 package, and they are almost (but not exactly) identical.
11895 Most of their features are supported by LyX.
11896 I have used LyX successfully to write articles submitted to both journals
11897 without any problem.
11900 \begin_layout Subsection
11904 \begin_layout Standard
11905 As usual, the easiest way to write a paper is to start with a template.
11908 File\SpecialChar \menuseparator
11927 This will give an (almost) empty document that includes the most common
11928 fields found in a manuscript.
11929 Simply overwrite the existing text (including the brackets,
11934 You should keep in mind the following remarks.
11937 \begin_layout Enumerate
11938 LyX won't let you change the font size and the page style of the document,
11939 because such modifications are not allowed by both packages.
11942 \begin_layout Enumerate
11943 The language of the document should not be changed.
11944 Before previewing your paper, be sure that the babel package is not used.
11945 To do this, click on
11947 Tools\SpecialChar \menuseparator
11958 checkbox in the language settings, and click on
11966 , if you wish to make this change permanent).
11969 \begin_layout Enumerate
11971 \begin_inset Quotes eld
11975 \begin_inset Quotes erd
11978 style must be used to define keywords.
11981 \begin_layout Enumerate
11982 The ijmpc package provides a style named
11983 \begin_inset Quotes eld
11986 Classification Codes
11987 \begin_inset Quotes erd
11990 , which can be used to define classification codes, such as PACS numbers.
11991 Note that this facility is not supported by the ijmpd package.
11994 \begin_layout Enumerate
11995 Several new environments are available:
11996 \begin_inset Quotes eld
12000 \begin_inset Quotes erd
12004 \begin_inset Quotes eld
12008 \begin_inset Quotes erd
12012 \begin_inset Quotes eld
12016 \begin_inset Quotes erd
12020 \begin_inset Quotes eld
12024 \begin_inset Quotes erd
12028 \begin_inset Quotes eld
12032 \begin_inset Quotes erd
12036 \begin_inset Quotes eld
12040 \begin_inset Quotes erd
12044 \begin_inset Quotes eld
12048 \begin_inset Quotes erd
12052 \begin_inset Quotes eld
12056 \begin_inset Quotes erd
12060 \begin_inset Quotes eld
12064 \begin_inset Quotes erd
12068 \begin_inset Quotes eld
12072 \begin_inset Quotes erd
12076 \begin_inset Quotes eld
12080 \begin_inset Quotes erd
12084 \begin_inset Quotes eld
12088 \begin_inset Quotes erd
12092 \begin_inset Quotes eld
12096 \begin_inset Quotes erd
12100 \begin_inset Quotes eld
12104 \begin_inset Quotes erd
12108 Their use is more or less obvious.
12109 LyX supports all these environments; it will use the proper label, text
12110 style, and numbering scheme for each of them.
12113 \begin_layout Enumerate
12114 Both packages use basic citations; the natbib package should not be used.
12115 In LyX, citation references are shown as usual; in the output, citations
12116 are shown as superscripts.
12117 If you want to use a citation as normal text, you should use the
12122 \begin_inset space \thinspace{}
12126 \begin_inset space \space{}
12130 \begin_inset Quotes eld
12134 \begin_inset space \space{}
12144 \begin_inset Quotes erd
12150 \begin_layout Enumerate
12152 \begin_inset Quotes eld
12156 \begin_inset Quotes erd
12159 section in both packages.
12160 To put acknowledgments, just use the
12161 \begin_inset Quotes eld
12165 \begin_inset Quotes erd
12171 \begin_layout Enumerate
12172 Appendices may be added to the paper,
12176 the Acknowledgments and
12181 LyX provides a special environment, called
12182 \begin_inset Quotes eld
12186 \begin_inset Quotes erd
12189 which marks the beginning of the appendices.
12190 This environment should be left blank; it just sends a LaTeX command, but
12191 nothing is really printed.
12193 \begin_inset Quotes eld
12197 \begin_inset Quotes erd
12200 is printed with blue letters, as a signal that all sections after that
12201 point are appendices.
12202 To write an appendix, use the
12203 \begin_inset Quotes eld
12207 \begin_inset Quotes erd
12211 LyX will number each appendix with capital letters, as required by both
12214 \begin_inset Quotes eld
12218 \begin_inset Quotes erd
12225 be present before the first appendix; if not, all appendices will be numbered
12226 as normal sections in the output.
12229 \begin_layout Enumerate
12230 The ijmpc and the ijmpd packages use the
12234 command to implement table captions.
12235 As a result, a table created by LyX is printed correctly, but its caption
12237 However, you can use some TeX code to overcome this problem, so that captions
12238 are printed as expected.
12239 To do so, create a float table as usual, remove the caption, and replace
12240 it with the TeX code
12250 (sic); you must also the TeX code
12254 immediately after the tabular material.
12255 Study the example table included in the template files to see how this
12256 trick is implemented.
12257 Alternatively, If you need table captions, you should implement the whole
12262 file, then include this file to the LyX document (
12264 Insert\SpecialChar \menuseparator
12265 File\SpecialChar \menuseparator
12267 \begin_inset space ~
12273 Details on how to create a table float can be found in the files
12281 , included in the corresponding packages.
12284 \begin_layout Subsection
12285 Preparing a paper for submission
12288 \begin_layout Standard
12289 Before you submit your paper you must export the LyX document as a LaTeX
12292 File\SpecialChar \menuseparator
12293 Export\SpecialChar \menuseparator
12300 \begin_layout Plain Layout
12301 Actually you have the choice between LaTeX (plain) and pdflatex.
12302 If you intend to use pdflatex to prepare the paper, you should use the
12303 pdflatex option so that included graphics are converted to PDF format,
12304 ready for use by pdflatex.
12309 , then make the following changes to the resulting
12316 \begin_layout Enumerate
12317 Remove the comment lines before the
12326 \begin_layout Enumerate
12327 Remove everything between (and including) the
12339 commands, except for any commands you specifically put into the LaTeX preamble.
12342 \begin_layout Standard
12347 file should be saved and processed through LaTeX as many times as necessary.
12348 You may also want to check the resulting
12355 \begin_layout Subsection
12359 \begin_layout Standard
12360 The use of TeX code is reduced to two commands, which must be placed at
12361 the top of the document.
12362 If you started writing your paper by using the
12370 template, the TeX code needed is already in its place; you usually don't
12372 You may only modify the first TeX code to specify the information printed
12373 to the top of odd and even pages (authors' names and short paper's title,
12375 This TeX code must have the form
12379 markboth{Authors' Names}{Short Paper's Title}
12384 \begin_layout Section
12388 \begin_layout Standard
12394 \begin_layout Subsection
12398 \begin_layout Standard
12399 The iopart package provides a document class to create electronic manuscript
12400 submission to the journals published by the Institute of Physics.
12401 Instructions for the authors how to create a paper using the iopart class
12402 can be downloaded together with the iopart package from the site
12403 \begin_inset Flex URL
12406 \begin_layout Plain Layout
12408 ftp://ftp.iop.org/pub/journals/latex2e
12416 \begin_layout Subsection
12420 \begin_layout Standard
12421 The easiest way to write a paper is to start with the file
12425 that is available in LyX's examples files folder.
12426 Open this file, save it under a new name, and start writing.
12427 The example file explains how to use the special text environments.
12428 Here are the most important advices:
12431 \begin_layout Itemize
12432 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12435 Use AMS math package
12437 in the document settings under
12444 \begin_layout Itemize
12447 The title environment defines the kind of your paper.
12448 So use one of the following environments for the title:
12452 \begin_layout Itemize
12461 \begin_layout Itemize
12470 \begin_layout Itemize
12476 for a Topical review
12479 \begin_layout Itemize
12488 \begin_layout Itemize
12497 \begin_layout Itemize
12503 for a Paper (same as Title)
12506 \begin_layout Itemize
12512 for a Preliminary communication
12515 \begin_layout Itemize
12521 for a Rapid communication
12524 \begin_layout Itemize
12530 for a Letter to the editor
12534 \begin_layout Itemize
12537 All title environments except of
12541 can have an optional short title.
12544 \begin_layout Itemize
12545 There is a general title environment
12549 which is not directly supported by the LyX.
12550 This can be used as TeX code when your document doesn't fit into one of
12551 the other title types.
12554 \begin_layout Standard
12555 For more informations like hints for special table and formula formatting,
12556 look at the IOP author guidelines.
12559 \begin_layout Section
12563 \begin_layout Standard
12566 Panayotis Papasotiriou
12569 \begin_layout Subsection
12573 \begin_layout Standard
12574 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12575 that facilitates electronic manuscript submission to the journals they
12577 Most known of them (at least in my domain of interest) are
12579 Astrophysics and Space Science
12585 , but there are many others (see a complete list at
12586 \begin_inset Flex URL
12589 \begin_layout Plain Layout
12591 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12597 The Kluwer package may be downloaded from the site
12598 \begin_inset Flex URL
12601 \begin_layout Plain Layout
12603 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12609 A complete user guide is contained in that package (but it can also be
12610 downloaded separately).
12613 \begin_layout Standard
12614 LyX supports many features of the package but not everything.
12615 However, the TeX code needed is reduced to some
12616 \begin_inset Quotes eld
12620 \begin_inset Quotes erd
12623 commands of the package (see
12624 \begin_inset space ~
12628 \begin_inset CommandInset ref
12630 reference "subsec:kluwer_peculiarities"
12635 I have recently used LyX to write an article submitted to the
12637 Astrophysics and Space Science
12639 without any problem.
12642 \begin_layout Subsection
12646 \begin_layout Standard
12647 The easiest way to write a paper is to start with the Kluwer template file.
12650 File\SpecialChar \menuseparator
12662 This will give an (almost) empty document that includes the most common
12663 fields found in a manuscript and a short description of their use.
12664 As in most templates, simply overwrite the existing text (including the
12669 ) with the correct information.
12672 \begin_layout Subsection
12673 Preparing a paper for submission
12676 \begin_layout Standard
12677 As in the AASTeX package, before you submit your paper to a journal you
12679 \begin_inset Quotes eld
12683 \begin_inset Quotes erd
12689 \begin_layout Enumerate
12690 Export your paper as a LaTeX file.
12691 To do this, click on
12693 File\SpecialChar \menuseparator
12694 Export\SpecialChar \menuseparator
12701 \begin_layout Enumerate
12706 file with a text editor and make the following changes
12710 \begin_layout Enumerate
12711 remove the comment lines before the
12720 \begin_layout Enumerate
12721 remove everything between (and including) the
12733 commands, except for any commands you specifically put into the LaTeX preamble.
12736 \begin_layout Standard
12745 \begin_layout Enumerate
12750 file through LaTeX as many times as necessary (usually up to three).
12753 \begin_layout Enumerate
12759 \begin_inset space \thinspace{}
12763 \begin_inset space \space{}
12770 , and check if everything is OK (it should, if you didn't make any mistake).
12773 \begin_layout Subsection
12774 \begin_inset Quotes eld
12778 \begin_inset Quotes erd
12781 of the Kluwer package
12782 \begin_inset CommandInset label
12784 name "subsec:kluwer_peculiarities"
12791 \begin_layout Standard
12792 The Kluwer package has the following
12793 \begin_inset Quotes eld
12797 \begin_inset Quotes erd
12803 \begin_layout Enumerate
12804 It is possible to write multiple articles in the same LaTeX file
12808 \begin_layout Plain Layout
12809 I can't imagine any good reason to do this.
12815 Each article must be included in the environment
12816 \begin_inset Quotes eld
12820 \begin_inset Quotes erd
12824 Unfortunately, this environment cannot be omitted, even if you write just
12826 Therefore, each article starts with the command
12832 and, obviously, ends with the command
12839 Although this can be implemented in LyX, I didn't included it, since it
12840 looks ugly and can confuse the novice user.
12841 Therefore, you need to enter them directly and mark them as LaTeX code
12843 \begin_inset Quotes eld
12847 \begin_inset Quotes erd
12853 \begin_layout Enumerate
12854 Information given at the beginning of the article (i.
12855 \begin_inset space \thinspace{}
12859 \begin_inset space \space{}
12862 title, subtitle, author, institution, running title, running author, abstract
12863 and keywords) must be included in an environment called
12864 \begin_inset Quotes eld
12868 \begin_inset Quotes erd
12872 This is not implemented in LyX, so you must enter title, subtitle etc.
12873 \begin_inset space ~
12876 between two TeX code lines (
12891 \begin_layout Enumerate
12892 According to the user manual, the label of each bibliography item must be
12916 \begin_layout Standard
12921 template takes care of all these
12922 \begin_inset Quotes eld
12926 \begin_inset Quotes erd
12930 If you start a new paper using this template you don't need to do anything
12935 \begin_layout Enumerate
12936 don't delete the TeX code included in the template, and
12939 \begin_layout Enumerate
12940 copy the example bibliography item included in the template and modify it
12941 as necessary to enter new bibliography items.
12944 \begin_layout Section
12948 \begin_layout Standard
12954 \begin_layout Subsection
12958 \begin_layout Standard
12959 The LyX document classes
12961 article (koma-script)
12965 report (koma-script)
12983 correspond to the LaTeX document classes
13000 \begin_inset space ~
13003 of the Koma-Script family.
13004 They are replacements for the standard document classes
13020 , resp., and fit better to European typography conventions in a number of
13024 \begin_layout Itemize
13025 Standard character size is 11pt in
13027 article (koma-script)
13031 report (koma-script)
13039 letter (koma-script)
13044 \begin_layout Itemize
13045 Headings, labels of the description environment, and a number of elements
13048 letter (koma-script)
13050 document class are set in a bold sans serif font.
13054 \begin_layout Plain Layout
13055 There is a big difference between the bold sans serif old cm fonts and new
13056 ec fonts, especially in the appearance of headings.
13057 In comparison, the ec bold sans serif fonts look a bit thin.
13058 Here the LaTeX package
13066 helps to produce the
13067 \begin_inset Quotes eld
13071 \begin_inset Quotes erd
13074 appearance when using the ec fonts.
13079 The numbering of chapter headings is made in the same way as the numbering
13080 of section headings, that is without the extra line
13081 \begin_inset Quotes eld
13084 Chapter\SpecialChar \ldots{}
13086 \begin_inset Quotes erd
13090 In addition, the appearance of the headings can be modified by using a
13091 number of options (in LyX to be entered in the field
13094 \begin_inset space ~
13101 Layout\SpecialChar \menuseparator
13108 \begin_layout Itemize
13109 The main means in the Koma-Script document classes to design the type area
13118 (in LyX to be entered in the extra class options field in the dialog
13120 Document\SpecialChar \menuseparator
13124 They make a clearer modification of page margins possible as do the options
13127 Document\SpecialChar \menuseparator
13134 \begin_layout Itemize
13135 The LaTeX document classes of the Koma-Script family define a number of
13136 additional commands.
13137 Those part of it which makes sense in LyX is implemented in corresponding
13141 \begin_layout Standard
13142 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13143 can be found in the Koma-Script documentation
13154 \begin_layout Subsection
13155 article (koma-script), report (koma-script), and book (koma-script)
13158 \begin_layout Standard
13159 The document classes
13161 article (koma-script)
13165 report (koma-script)
13175 are implemented in the layout files
13188 They contain all the paragraph types of the corresponding standard document
13201 , resp., partly modified, with the exception of the LyX specific
13205 -type, which is replaced by the new
13209 -type having the same functionality.
13214 -Type there is a number of new paragraph types added.
13221 letter (koma-script)
13226 \begin_layout Itemize
13235 : are equivalents to
13243 , resp., additionally inserting an entry in the table of contents.
13252 are not contained in
13254 article (koma-script)
13259 \begin_layout Itemize
13268 : behave exactly as
13276 , resp., additionally clearing running heads.
13281 is not contained in
13283 article (koma-script)
13289 \begin_layout Plain Layout
13302 report (koma-script)
13304 , but since this is identical to
13308 , is has not been implemented in LyX.
13316 \begin_layout Itemize
13321 : generates a heading directly above the following paragraph in the standard
13322 character size without affecting the structure of the document.
13325 \begin_layout Itemize
13334 are special captions which respect the different space settings needed
13335 for captions placed above or below an element (if you follow strict typographic
13336 rules, you might want to place table captions always above the table).
13337 You can also use the class option
13341 , which will switch
13354 You need at least Koma-Script version 2.8q to use this.
13357 \begin_layout Itemize
13362 : can be used to set a bonmot, e.
13363 \begin_inset space \thinspace{}
13367 \begin_inset space \space{}
13370 at the beginning of a chapter.
13371 If you use the optional argument (
13373 Insert\SpecialChar \menuseparator
13375 \begin_inset space ~
13380 ), you can insert the dictum's author there.
13381 Dictum and author are separated by a line.
13382 You need at least Koma-Script version 2.8q to use this.
13387 is not contained in
13389 article (koma-script)
13394 \begin_layout Standard
13395 The following types, together with the standard types
13407 , form the title area of the document.
13408 They must be entered ahead of the first
13409 \begin_inset Quotes eld
13413 \begin_inset Quotes erd
13420 \begin_layout Plain Layout
13421 The corresponding LaTeX commands must appear before the
13432 When such a type is used more than once, the latter usage overwrites the
13433 former one, that means, for every type only the latest usage is valid.
13434 The order of the different types however has, like
13446 , no effect on the appearance of the produced document.
13449 \begin_layout Itemize
13454 : produces a centered paragraph above the ordinary title (
13466 ) for the subject of the document.
13469 \begin_layout Itemize
13474 : produces a centered paragraph below the ordinary title (
13486 ) for the publishers' name.
13489 \begin_layout Itemize
13496 report (koma-script)
13502 produces a centered paragraph on its own page behind the title page, or
13505 article (koma-script)
13507 produces a centered paragraph below the ordinary title (
13523 ) for a dedication.
13526 \begin_layout Itemize
13531 : produces a left aligned paragraph above the ordinary title (
13547 ) for a document`s head.
13550 \begin_layout Itemize
13555 : produces in a double-sided print in
13557 report (koma-script)
13563 a left-aligned paragraph at the top of the title page`s back or has no
13564 effect in a single-sided print or in
13566 article (koma-script)
13571 \begin_layout Itemize
13576 : produces in a double-sided print in
13578 report (koma-script)
13584 a left-aligned paragraph at the bottom of the title page`s back or has
13585 no effect in a single-sided print or in
13587 article (koma-script)
13592 \begin_layout Itemize
13597 : produces a special
13598 \begin_inset Quotes eld
13602 \begin_inset Quotes erd
13605 page ahead of the actual document containing a paragraph without special
13609 \begin_layout Standard
13610 The layout files for the document classes
13612 article (koma-script)
13616 report (koma-script)
13622 do include the file
13627 This is thought of as a place to define your own types.
13632 in your personal layout directory and edit the file!
13635 \begin_layout Subsection
13636 letter (koma-script)
13639 \begin_layout Standard
13643 letter (koma-script)
13645 is implemented in the layout file
13650 It contains all the paragraph types of the corresponding standard document
13655 , partly modified, with the exception of the LyX specific types
13667 type, which is replaced by the new
13672 In addition, it contains, in contrast to the standard document class, the
13690 Furthermore, there are a number of new letter specific types.
13693 \begin_layout Standard
13694 The appearance of the letter produced by this document class can be controlled
13695 by a number of LaTeX commands, which you can put in the LaTeX preamble.
13699 \begin_layout Plain Layout
13700 For example, the standard appearance of the letter`s heading, consisting
13701 of name and address, is quite self-willed.
13703 \begin_inset Quotes eld
13707 \begin_inset Quotes erd
13710 heading is produced by the following LaTeX commands in the preamble:
13713 \begin_layout LyX-Code
13723 \begin_layout LyX-Code
13739 \begin_layout LyX-Code
13749 \begin_layout LyX-Code
13769 A detailed German description of such LaTeX commands can be found in the
13770 Koma-Script documentation
13775 With it, the letter's author can produce his personal letter layout.
13778 \begin_layout Standard
13787 define the beginning of the letter and must be used in every letter.
13788 To emphasize them in the LyX document class, they are marked with the letter
13798 \begin_inset space ~
13801 in the left margin.
13802 It is possible to write any number of letters in one file.
13807 type produces a new letter using the same addressee and a
13811 type produces a new addressee.
13828 are ordinary paragraph types and can also be used several times in one
13829 and the same letter.
13832 \begin_layout Itemize
13837 : produces a paragraph for the addressee and implicitly defines the beginning
13841 \begin_layout Itemize
13846 : produces a paragraph for the form of address and implicitly produces a
13850 \begin_layout Itemize
13855 : produces a paragraph for a close.
13858 \begin_layout Itemize
13863 : produces a paragraph for a postscript.
13866 \begin_layout Itemize
13871 : produces a paragraph for a distribution list.
13874 \begin_layout Itemize
13879 : produces a paragraph for enclosures.
13882 \begin_layout Standard
13923 are input types provided with a label to enter information, which will
13924 be processed by the document class.
13928 \begin_layout Plain Layout
13929 It could be seen as a matter of inconsequence, that the types
13937 described above are not such input types as well.
13938 Because of the special meaning of those types, however, I have implemented
13939 them as ordinary paragraph types with a one letter mark in the left margin.
13940 Moreover, it would affect my feeling of symmetry, if the
13948 type had such a serious different appearance.
13953 The types must be used ahead of the corresponding
13960 \begin_layout Standard
13961 An implementation of these types in a WYSIWYG fashion does not seem to make
13962 sense, because the real appearance of the produced letter does not only
13963 depend on the usage of the particular type, but also on other factors.
13964 For example, a signature entered in the
13968 type will in the standard behavior appear in the produced letter only,
13969 when in the same letter also a
13974 The entered value of the
13978 type will in the standard behavior not appear in the produced letter at
13980 The possibility to design the letter`s heading freely is already indicated
13981 in a footnote above.
13984 \begin_layout Standard
13985 The input types can also be used as empty paragraphs.
13986 This makes sense e.
13987 \begin_inset space \thinspace{}
13991 \begin_inset space \space{}
14003 type is not used at all, in the standard behavior the value of the
14007 type is used as signature, whereas if an empty
14011 type is used, no signature value is defined.
14014 \begin_layout Standard
14015 By using the input types it is possible to write a letter template, containing
14016 filled input types with your personal dates (name, address, etc.) and empty
14017 input types for other dates you want to enter.
14020 \begin_layout Itemize
14025 : sender's name, in the standard behavior appears as a centered paragraph
14026 in small caps in the letter`s heading.
14029 \begin_layout Itemize
14034 : sender's signature, in the standard behavior appears below the
14043 type is used, the value of the
14047 type appears instead.
14050 \begin_layout Itemize
14055 : sender's address, in the standard behavior appears in a centered paragraph
14056 in the letter`s heading below the sender's name.
14059 \begin_layout Itemize
14064 : sender's telephone number, in the standard behavior only sets the LaTeX
14074 \begin_layout Itemize
14079 : place of the letter`s making.
14082 \begin_layout Itemize
14087 : date of the letter`s making.
14096 , in the standard behavior, produce the place and the date in a right-aligned
14097 line below the addressee's field.
14102 type is used, neither place nor date appear, independent of the value of
14112 type is used, the date of the letter `s production is used.
14115 \begin_layout Itemize
14120 : sender`s back address, in the standard behavior appears above the addressee's
14121 field in a small sans serif font.
14124 \begin_layout Itemize
14129 : special mail information, in the standard behavior appears underlined
14130 above the addressee's field below the back address.
14133 \begin_layout Itemize
14138 : additional information, in the standard behavior appears on right side
14139 below the addressee`s field.
14142 \begin_layout Itemize
14147 : the letter's title, in the standard behavior appears in a big, bold, sans
14148 serif font above the subject.
14151 \begin_layout Itemize
14156 : the letter's subject, in the standard behavior appears in a bold font
14164 \begin_layout Standard
14185 produce a business letter like line above the
14189 line containing the fields
14190 \begin_inset Quotes eld
14194 \begin_inset Quotes erd
14198 \begin_inset Quotes eld
14202 \begin_inset Quotes erd
14206 \begin_inset Quotes eld
14210 \begin_inset Quotes erd
14214 \begin_inset Quotes eld
14218 \begin_inset Quotes erd
14222 \begin_inset Quotes eld
14226 \begin_inset Quotes erd
14230 \begin_inset Quotes eld
14234 \begin_inset Quotes erd
14238 For the date field, the value of the
14244 \begin_inset Quotes eld
14247 business letter types
14248 \begin_inset Quotes erd
14251 is used, the value of the
14255 type however does not appear, but only the LaTeX variable
14262 The ordinary output of place and date in a right-aligned line below the
14263 addressee`s field is suppressed.
14264 The types are implemented as input types provided with a label and must
14265 be used ahead of the corresponding
14272 \begin_layout Itemize
14280 \begin_layout Itemize
14288 \begin_layout Itemize
14296 \begin_layout Itemize
14304 \begin_layout Itemize
14312 \begin_layout Subsection
14313 The new letter class: letter (koma-script v.2)
14316 \begin_layout Standard
14322 \begin_layout Standard
14323 \begin_inset VSpace medskip
14329 \begin_layout Standard
14331 Koma-Script version 2.8 has introduced a new letter class
14335 which supersedes the now unsupported
14340 It has — on the LaTeX side — a completely new interface and is not compatible
14341 with the old class.
14342 Therefore, LyX supports both, though it is recommended you use the new
14346 \begin_layout Standard
14347 This class covers the same functionality as
14349 letter (koma-script),
14352 The basic items are
14356 (receiver's address, same as
14360 in the old layout),
14373 will start a new letter (i.
14374 \begin_inset space \thinspace{}
14378 \begin_inset space \space{}
14381 you can write several letters per document).
14382 New elements are sender's
14398 and the possibility to use a
14404 Insert\SpecialChar \menuseparator
14410 \begin_layout Standard
14411 The biggest improvement is, though, that the letter's layout is configurable
14412 to meet almost any needs.
14413 This can be done via the preamble or with a special style file (Letter
14414 Class Option, extension
14418 ), that will be read in as a class option.
14422 \begin_layout Plain Layout
14423 The KOMA package comes with some default
14428 There is, for instance, a
14432 file that follows german typesetting rules, or a
14436 that provides the default layout of the old
14441 The latter can be loaded with the class option
14450 ayout\SpecialChar \menuseparator
14455 ocument\SpecialChar \menuseparator
14467 template that is included in LyX for examples.
14468 A detailed description is to be found in the Koma-Script documentation
14476 \begin_layout Subsection
14480 \begin_layout Standard
14481 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14485 \begin_layout Itemize
14486 The chapter number of a
14490 type appears on a line of its own above the chapter heading instead of
14491 appearing in the same line ahead of it.
14492 The cause for that is the LyX internal behavior for the labeltype
14496 in the layout file.
14499 \begin_layout Itemize
14500 The headings of the types
14508 are only put in the
14509 \begin_inset Quotes eld
14513 \begin_inset Quotes erd
14516 LaTeX table of contents, but not in the LyX table of contents (
14518 Document\SpecialChar \menuseparator
14520 \begin_inset space ~
14524 \begin_inset space ~
14532 \begin_layout Itemize
14533 The paragraphs in a
14537 document class appear in a skip separation mode, not indented.
14538 This is the standard behavior, no special LaTeX commands are needed for
14542 Document\SpecialChar \menuseparator
14545 dialog the corresponding radio button indicates
14554 value always has the effect that extra LaTeX commands are inserted in the
14555 document to produce the gap, which is not what is wanted in this case.
14558 \begin_layout Section
14562 \begin_layout Standard
14568 \begin_layout Subsection
14572 \begin_layout Standard
14573 Memoir is a very powerful and constantly evolving class.
14574 It has been designed with regard to fictional and non-fictional literature.
14575 Its aim is to let the user have maximum control over the typesetting of
14577 Memoir is based on the standard book class, but it can also emulate the
14578 article class (see below).
14581 \begin_layout Standard
14582 Peter Wilson, the developer of Memoir, is known as the author of lots of
14583 useful packages in the LaTeX world.
14584 Most of them have been merged with Memoir.
14585 Therefore, it is much easier to layout the table of contents, appendices,
14586 chapter designs and such.
14587 LyX, though, does not support all of these goodies natively.
14588 Some of them might be added to forthcoming releases
14592 \begin_layout Plain Layout
14593 You are invited to send suggestions to
14594 \begin_inset Flex URL
14597 \begin_layout Plain Layout
14599 lyx-devel@lists.lyx.org
14609 , lots will probably never, due to the limitations of LyX's framework.
14610 Of course you can still use all features with the help of some native LaTeX
14615 \begin_layout Plain Layout
14620 \begin_layout Plain Layout
14630 \begin_inset space ~
14634 \begin_inset CommandInset ref
14636 reference "sec:Inserting-TeX-Code"
14646 In this section, we can only list those features which are natively supported
14648 For detailed descriptions (and for the rest of features) we recommend you
14649 have a look at the detailed manual of the Memoir class
14653 \begin_layout Plain Layout
14658 \begin_layout Plain Layout
14668 \begin_inset Flex URL
14671 \begin_layout Plain Layout
14673 CTAN:/macros/latex/memoir/memman.pdf
14683 , which is not only a user guide for the class, but also both a comprehensive
14684 description on good typesetting and a superb example for good typesetting
14688 \begin_layout Subsection
14689 Basic features and restrictions
14692 \begin_layout Standard
14693 Memoir supports basically all features of the standard book classes.
14694 There are, however, some differences, as follows:
14697 \begin_layout Description
14699 \begin_inset space ~
14702 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14705 \begin_layout Description
14707 \begin_inset space ~
14710 style: The fancy page style is not supported, due to a command clash between
14711 Memoir and the fancyhdr package (they both define a command with the same
14712 name, which confuses LaTeX).
14713 Instead, Memoir comes with a number of its own page styles (see
14715 Layout\SpecialChar \menuseparator
14716 Document\SpecialChar \menuseparator
14718 \begin_inset space ~
14724 If you want to use these for the chapter pages, you have to use the command
14731 in the main text or in preamble (e.
14732 \begin_inset space \thinspace{}
14736 \begin_inset space \space{}
14743 chapterstyle{companion}
14748 \begin_layout Description
14749 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
14750 optional argument in the standard classes.
14751 With this, you can specify an alternative version of the title for the
14752 table of contents and the headers (for instance, if the title is too long).
14753 In LyX, you can do this via
14755 Insert\SpecialChar \menuseparator
14757 \begin_inset space ~
14762 at the beginning of a chapter/section.
14763 Memoir features a second optional argument and thus separates the table
14764 of contents from the header.
14765 You can define three variants of a title with this: one for the main text,
14766 one for the table of contents, and one for the headers.
14767 Simply insert two optional arguments if you need this feature, the first
14768 one containing the short title for the Table of Contents, the second one
14769 containing an alternative short title for the headers.
14772 \begin_layout Description
14773 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
14774 of contents, the list of figures and the list of table start a new page
14776 Memoir does not follow this route.
14777 You have to insert a page break yourself, if you want to have one.
14780 \begin_layout Description
14781 Titlepage: For some unknown reason, Memoir uses pagination on the title
14782 page (in the standard classes, title pages are
14783 \begin_inset Quotes eld
14787 \begin_inset Quotes erd
14791 \begin_inset space \thinspace{}
14795 \begin_inset space \space{}
14799 If you want an empty title page, type
14803 aliaspagestyle{title}{empty}
14808 \begin_layout Description
14809 Article: With the class option
14815 Layout\SpecialChar \menuseparator
14816 Document\SpecialChar \menuseparator
14818 \begin_inset space ~
14823 ), you can emulate article style.
14824 That is, counters (footnotes, figures, tables etc.) will not be reset on
14825 new chapters, chapters don't start a new page (but are—in contrary to
14826 \begin_inset Quotes eld
14830 \begin_inset Quotes erd
14833 article classes—still allowed), parts, though, use their own page, as in
14837 \begin_layout Description
14838 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
14839 font commands, which have been used in the old LaTeX version 2.09 (e.
14840 \begin_inset space \thinspace{}
14844 \begin_inset space \space{}
14860 It produces an error and stops LaTeX whenever such a command appears.
14865 reallows the commands and spits out warnings instead (which does at least
14867 Since a lot of packages and particularly BibTeX style files are still using
14868 those commands, we have decided to use this option by default.
14871 \begin_layout Subsection
14875 \begin_layout Standard
14876 We will only describe the features supported by LyX (which is not much currently
14878 Please consult the Memoir manual
14882 \begin_layout Plain Layout
14887 \begin_layout Plain Layout
14897 \begin_inset Flex URL
14900 \begin_layout Plain Layout
14902 CTAN:/macros/latex/memoir/memman.pdf
14915 \begin_layout Description
14916 Abstract: You may wonder why an abstract is an extra feature.
14917 Well, it is in book class.
14918 Usually books don't have abstracts.
14919 Memoir, however, has.
14920 You can use it wherever and how often you like.
14923 \begin_layout Description
14924 Chapterprecis: You may know this older typesetting style: The contents of
14925 a chapter are summarized below the title and also in the table of contents
14927 \begin_inset space \thinspace{}
14931 \begin_inset space \space{}
14936 Our hero arrives in Troia; he loses some friends; he finds others
14939 Chapterprecis does exactly this.
14940 It is therefore only sensible below a chapter.
14943 \begin_layout Description
14944 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
14945 The epigraph environment provides an elegant way of typesetting such a
14947 The motto itself (text) and its author (source) are divided by a short
14949 Unfortunately, we have to fool LyX a bit here again, since the environment
14950 needs two arguments (text and source).
14951 In this case, we have to use curly brackets (in TeX mode) between the two
14962 <author of the slogan>.
14965 \begin_layout Description
14966 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
14967 complex figurative poems).
14968 LyX can only support a few of them.
14969 One is poemtitle, which is a centered title for poems, which will also
14970 be added to the table of contents (verse is the standard environment for
14972 Memoir has some enhanced versions of verse, but you need to use TeX code,
14973 because they have to be nested inside regular verse environments, which
14974 is not possible with LyX).
14977 \begin_layout Description
14978 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
14981 \begin_layout Section
14982 Article (mwart), book (mwbk) and report (mwrep)
14983 \begin_inset Argument
14986 \begin_layout Plain Layout
14999 \begin_layout Standard
15005 \begin_layout Standard
15006 The LyX document classes
15022 correspond to the LaTeX document classes
15035 They are replacements for the standard document classes
15047 , resp., and fit better to Polish typography conventions in a number of points.
15051 \begin_layout Standard
15055 \begin_layout Itemize
15056 Unnumbered titles (with star, e.
15057 \begin_inset space \thinspace{}
15061 \begin_inset space \space{}
15068 ) are added into table of contents,
15071 \begin_layout Itemize
15072 Additional page styles:
15076 \begin_layout Description
15077 uheadings header with separated lines,
15080 \begin_layout Description
15081 myheadings custom header, contents headers via commands:
15096 \begin_layout Description
15097 myuheadings custom header with separated lines,
15100 \begin_layout Description
15101 outer page number is placed on outer side of page
15105 \begin_layout Itemize
15110 \begin_layout Description
15111 rmheadings serif titles — default,
15114 \begin_layout Description
15115 sfheadings sansserif titles,
15118 \begin_layout Description
15119 authortitle on title page first placed is author next title — default,
15122 \begin_layout Description
15123 titleauthor on title page first placed is title next author,
15126 \begin_layout Description
15127 withmarginpar reserve place on page for margins.
15131 \begin_layout Section
15135 \begin_layout Standard
15140 provides an alternative to the standard
15145 It provides similar functionality, but you might prefer this layout with
15146 sans serif sections, headings, and more.
15149 \begin_layout Section
15153 \begin_layout Standard
15159 \begin_layout Standard
15160 \begin_inset VSpace bigskip
15166 \begin_layout Standard
15171 \begin_inset space ~
15176 textclass works with the American Physical Sociey's RevTeX 4.0 (the
15177 \begin_inset Formula $\beta$
15180 release of May, 1999) class.
15183 \begin_layout Standard
15188 textclass, which works with RevTeX 3.1.
15189 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15190 That means that it doesn't interact very well with LyX, which requires
15191 LaTeX2e, although it has been kludged to work.
15192 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15196 \begin_inset space ~
15201 textclass should also be pretty easy to use.
15204 \begin_layout Standard
15205 These documents are supposed to be used in
15209 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15210 macros, and assume you'll know what to put in the preamble if necessary.
15213 \begin_layout Subsection
15217 \begin_layout Standard
15218 All you need to do is install RevTeX 4, as described in the package's README
15220 The package can be found at The RevTeX 4 Web Site
15221 \begin_inset Flex URL
15224 \begin_layout Plain Layout
15226 http://publish.aps.org/revtex4/
15232 Install it somewhere that LaTeX can see it.
15233 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15235 \begin_inset space \thinspace{}
15239 \begin_inset space \space{}
15242 not the directory where you installed the class file.) Then, if you reconfigure
15243 LyX, it will find the class file and let you use the RevTeX4 textclass.
15246 \begin_layout Standard
15247 Probably the easiest way to get started is either to import a RevTeX 4 document
15255 \begin_inset space ~
15260 template, found in the templates directory.
15263 \begin_layout Subsection
15267 \begin_layout Standard
15268 Optional arguments to
15275 \begin_inset Quotes eld
15279 \begin_inset Quotes erd
15283 \begin_inset Quotes eld
15287 \begin_inset Quotes erd
15297 \begin_inset space ~
15305 \begin_inset space ~
15311 Remember that in RevTeX, at least one optional argument is required!
15314 \begin_layout Standard
15315 Other preamble matter, like
15322 \begin_inset space ~
15328 \begin_inset space ~
15333 dialog, also as usual.
15336 \begin_layout Subsection
15340 \begin_layout Standard
15341 The layouts basically correspond to the commands in RevTeX4.0.
15342 For example, the Email layout corresponds to
15349 Note that (at least as of RevTeX 4.0 Beta), the
15357 layouts are exactly equivalent, so you shouldn't need to use both.
15361 \begin_layout Plain Layout
15362 In case you're curious, both were included so that
15366 would be able to translate both
15386 \begin_layout Subsection
15390 \begin_layout Standard
15391 There are a couple of important unique aspects of RevTeX 4 which might cause
15392 bugs that will be even more confusing in LyX.
15395 \begin_layout Standard
15413 The LyX equivalent is that there is a separate Thanks layout.
15418 write footnotes in the
15422 layout, or weird things may happen.
15423 See the RevTeX 4 documentation for more details.
15426 \begin_layout Standard
15430 \begin_inset space ~
15438 \begin_inset space ~
15447 layouts must be placed
15455 layout and the corresponding
15472 , the LaTeX won't compile.
15475 \begin_layout Subsection
15479 \begin_layout Standard
15480 The main problem with this layout is that you can't use the optional arguments
15481 to layouts like Email and Title.
15482 (The problem is not unique to this layout; you can't use optional arguments
15483 to the Section layouts either.) This means that after you export that file
15484 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15485 need to edit the LaTeX file with a text editor to add the optional arguments
15487 \begin_inset space \thinspace{}
15491 \begin_inset space \space{}
15494 the running title for the page headers.
15495 Lacking these layouts makes the
15501 (and the equivalent
15507 ) useless, so the corresponding layouts don't exist, and will have to be
15512 \begin_layout Plain Layout
15517 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15518 has not been updated yet to take advantage of it.
15526 \begin_layout Section
15527 Springer Journals (
15534 \begin_layout Standard
15540 \begin_layout Subsection
15544 \begin_layout Standard
15545 These are the layout files for some of the journal formats used by Springer
15546 Verlag and listed on
15547 \begin_inset Flex URL
15550 \begin_layout Plain Layout
15552 http://www.springer.de/author/tex/help-journals.html
15557 , where you should also go to fetch the class files (yes, these are LaTeX2e
15559 It is a modular system: the things common to all journals are implemented
15564 , which journal-specific layout files (such as, e.
15565 \begin_inset space \thinspace{}
15569 \begin_inset space \space{}
15576 for Journal of Geodesy) can include.
15579 \begin_layout Standard
15580 This means that implementing support for any other Springer journal on this
15581 list is as simple as writing your own
15589 file following the outline given in
15597 \begin_layout Standard
15598 It is reasonably well tested only for the Journal of Geodesy.
15607 come with the standard LyX distribution.
15608 Install the relevant class file (downloaded from Springer) in a proper
15609 directory, reconfigure LaTeX (in the teTeX case by running
15613 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15614 and it should work.
15617 \begin_layout Subsection
15621 \begin_layout Standard
15622 A large number of theorem-like styles —
15628 \SpecialChar \ldots{}
15634 \begin_layout Standard
15637 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15638 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15641 See the Springer class file documentation for details.
15644 \begin_layout Subsection
15648 \begin_layout Itemize
15660 \begin_layout Itemize
15663 Probability Theory and Related Fields
15669 — Jean-Marc Lasgouttes
15672 \begin_layout Standard
15673 Add your own, it isn't so hard!
15676 \begin_layout Subsection
15680 \begin_layout Standard
15681 These files are partly based on the older
15685 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15686 file from Springer.
15691 layout, are now defunct.
15692 Jean-Marc Lasgouttes helped out big in making me find my way around the
15693 LyX layout file mechanism.
15696 \begin_layout Subsection
15700 \begin_layout Standard
15702 But probably less than in the old hacked-LaTeX
15709 \begin_layout Standard
15711 \begin_inset space \thinspace{}
15714 g.: does not display the number for theorem-like layouts, just #.
15717 \begin_layout Section
15723 \begin_inset CommandInset label
15732 \begin_layout Standard
15740 \begin_layout Subsection
15744 \begin_layout Standard
15745 This section describes how to use LyX to make slides for overhead projectors.
15746 There are two document classes that can do this: the default slides class
15752 This section documents the former.
15755 \begin_layout Standard
15756 I'm going to say this again, nice and clear, so that there's no misunderstanding
15760 \begin_layout Standard
15761 \begin_inset VSpace bigskip
15767 \begin_layout Standard
15771 This section documents the class
15772 \begin_inset Quotes eld
15780 \begin_inset Quotes erd
15788 \begin_layout Standard
15789 \begin_inset VSpace bigskip
15795 \begin_layout Standard
15796 If you're looking for the documentation for
15797 \begin_inset Quotes eld
15805 \begin_inset Quotes erd
15808 , check out section
15809 \begin_inset space ~
15813 \begin_inset CommandInset ref
15815 reference "sec:foiltex"
15825 \begin_inset Quotes eld
15833 \begin_inset Quotes erd
15836 ] is actually somewhat better than the default
15844 \begin_layout Plain Layout
15845 \SpecialChar \ldots{}
15846 or so I've been told repeatedly by its advocates.
15847 Having never used it, I have no idea if this claim is true or not.
15852 which this section documents.
15855 \begin_layout Standard
15856 This class is the LaTeX2e improvement of the old
15861 Every LaTeX2e distribution includes this class [which I'll just refer to
15863 \begin_inset Quotes eld
15871 \begin_inset Quotes erd
15874 from now on], so you're bound to have it.
15875 As I noted earlier, there are other classes, such as
15879 , which also produce slides for overhead projectors and do a better job
15881 However, there are some things which
15885 can do which the others can't, such as generate overlays.
15886 Read on to learn more!
15889 \begin_layout Subsection
15891 \begin_inset CommandInset label
15893 name "sec:slidesetup"
15900 \begin_layout Standard
15901 Obviously, to use this document class, you need to select
15902 \begin_inset Quotes eld
15910 \begin_inset Quotes erd
15913 from the class list in the
15915 Document\SpecialChar \menuseparator
15919 There are some other special things you should know about this class:
15922 \begin_layout Itemize
15923 Don't bother changing the options
15928 They're not supported by the
15935 \begin_layout Itemize
15939 \begin_inset space ~
15944 behaves a bit differently for this class.
15945 The possible choices and what they do are as follows:
15949 \begin_layout Description
15954 The final output contains page numbers in the lower right corner.
15957 \begin_layout Description
15966 , but also prints out any time markers you've put in.
15967 This is the default.
15970 \begin_layout Description
15975 The final output contains no page numbers, time markers, or alignment markers.
15979 \begin_layout Itemize
15984 class has an extra option:
15990 \begin_inset Quotes eld
15998 \begin_inset Quotes erd
16001 in the extra class options.
16005 \begin_layout Standard
16006 Using this options allows you to add time markers to
16012 \begin_inset space ~
16016 \begin_inset CommandInset ref
16018 reference "sec:slideNote"
16026 \begin_layout Standard
16027 You can also use the template file
16028 \begin_inset Quotes eld
16036 \begin_inset Quotes erd
16039 to automatically set up a document to use the
16045 File\SpecialChar \menuseparator
16047 \begin_inset space ~
16051 \begin_inset space ~
16056 to open your new document].
16057 The template file also contains some examples of the special paragraph
16058 environments used by this class.
16059 I'll describe those next.
16062 \begin_layout Subsection
16063 Paragraph Environments
16066 \begin_layout Subsubsection
16067 Supported Environments
16070 \begin_layout Standard
16071 The first thing you'll notice when you start up a new
16075 document is the font size and type: it's the equivalent of the size
16076 \begin_inset Quotes eld
16084 \begin_inset Quotes erd
16090 \begin_inset space ~
16096 This is also what's used in the output.
16098 \begin_inset Quotes eld
16102 \begin_inset Quotes erd
16105 to remind you that this is a slide.
16106 Your final slides will use a larger font; ergo, you'll have less space.
16107 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16110 \begin_layout Standard
16111 The next thing that becomes obvious is the changes to the paragraph environment
16112 pull-down box [at the far-left end of the toolbar].
16113 Most of the paragraph environments you're used to seeing are missing.
16114 There are also five new ones.
16119 class itself only supports certain paragraph environments:
16122 \begin_layout Itemize
16128 \begin_layout Itemize
16134 \begin_layout Itemize
16140 \begin_layout Itemize
16146 \begin_layout Itemize
16152 \begin_layout Itemize
16158 \begin_layout Itemize
16164 \begin_layout Itemize
16170 \begin_layout Itemize
16176 \begin_layout Itemize
16182 \begin_layout Itemize
16188 \begin_layout Standard
16189 All of the other standard environments, including the section-heading environmen
16190 ts, aren't used in the
16197 \begin_layout Standard
16198 On the other hand, you'll notice the following new environments:
16201 \begin_layout Itemize
16207 \begin_layout Itemize
16213 \begin_layout Itemize
16219 \begin_layout Itemize
16225 \begin_layout Itemize
16231 \begin_layout Standard
16232 These five are kind of quirky, due to a
16233 \begin_inset Quotes eld
16237 \begin_inset Quotes erd
16241 You see, LyX doesn't permit you to nest any other paragraph environment
16242 into an empty environment.
16243 Now, that's fine and dandy, but it means that you wouldn't be able to start
16244 a slide with anything except plain text.
16245 To deal with this, I've performed a little
16246 \begin_inset Quotes eld
16250 \begin_inset Quotes erd
16256 \begin_layout Subsubsection
16257 Quirks of the New Environments
16258 \begin_inset CommandInset label
16260 name "sec:slideQuirk"
16267 \begin_layout Standard
16268 All five of the new paragraph environments are somewhat quirky due to inherent
16269 limitiations in the current version of LyX.
16270 As I just mentioned, LyX forbids environments that begin with another environme
16272 To get around this, the
16276 environment isn't a paragraph environment as described in the
16284 \begin_layout Standard
16285 You should consider
16298 \begin_inset Quotes eld
16301 pseudo-environments.
16302 \begin_inset Quotes erd
16305 They look like a section heading or a
16306 \begin_inset Quotes eld
16314 \begin_inset Quotes erd
16317 but really begin a [and, if necessary, end the previous] paragraph environment.
16327 \begin_inset Quotes eld
16331 \begin_inset Quotes erd
16334 These two perform some action.
16337 \begin_layout Standard
16338 A common feature of all five environments,
16358 , is a rather long-ish label.
16359 The text following this label — ordinarily the contents of the paragraph
16360 environment — is utterly irrelevant for
16381 LyX completely ignores it.
16382 In fact, you can leave these five environments completely empty.
16386 \begin_layout Standard
16391 to put any text after the rather long-ish label, you might want to.
16392 This could be a short description of the contents of the
16397 In that case, enter your descriptive comment and hit
16401 as you normally would.
16404 \begin_layout Standard
16405 If, on the other hand, you don't want to enter any descriptive text, you'll
16406 hit another LyX quirk.
16407 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16408 environment until you put something in the old one.
16412 \begin_layout Itemize
16413 Start entering the text that will
16441 \begin_layout Itemize
16442 Now move to the beginning of that paragraph.
16446 \begin_layout Itemize
16455 \begin_layout Itemize
16456 Finally, change this new, empty paragraph to a
16480 \begin_layout Standard
16481 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16485 \begin_layout Subsection
16486 Making a Presentation with
16499 \begin_layout Subsubsection
16507 \begin_layout Standard
16508 If you're expecting this section to teach you how to actually make a presentatio
16509 n, you'll be sorely disappointed.
16510 Naturally, I'll describe all of the ways the
16514 class can assist you in preparing the materials for a presentation.
16515 Filling in the contents, however, is up to you.
16520 the LyX philosophy.]
16523 \begin_layout Standard
16528 environment [in the manner described in section
16529 \begin_inset space ~
16533 \begin_inset CommandInset ref
16535 reference "sec:slideQuirk"
16539 ] tells LyX to begin a new slide [duh].
16540 The label for this environment/
16541 \begin_inset Quotes erd
16545 \begin_inset Quotes erd
16549 \begin_inset Quotes eld
16553 \begin_inset Quotes erd
16556 in cool blue, followed by the label,
16557 \begin_inset Quotes eld
16561 \begin_inset Quotes erd
16565 Any text or paragraph environments that follow this one go on the new slide.
16569 \begin_layout Standard
16570 Slides are probably the only time you'll need to forcibly end pages in LyX
16571 (this can be specified in the
16576 In fact, you'll want to, once you finish entering the contents of one slide.
16577 If you've entered more text than can physically fit on a slide, the extra
16578 overflows onto a new slide.
16579 I don't recommend doing this, however, since the overflow slide won't have
16580 any page number on it.
16581 Furthermore, it may interfere with any
16585 you've made to accompany the oversized
16592 \begin_layout Standard
16601 environments work the same way as the
16606 They both create an
16607 \begin_inset Quotes eld
16611 \begin_inset Quotes erd
16614 followed by a label [
16615 \begin_inset Quotes eld
16619 \begin_inset Quotes erd
16623 \begin_inset Quotes eld
16627 \begin_inset Quotes erd
16631 The color is a stunning magenta instead of blue, and the
16632 \begin_inset Quotes eld
16636 \begin_inset Quotes erd
16639 will look different, in style and in length.
16640 The label fonts of all three also differ from one another.
16643 \begin_layout Standard
16648 , if the contents of a
16656 exceed the physical size of a slide or sheet of paper, the extra will overflow
16658 Again, you should avoid this.
16659 It defeats the whole purpose of
16670 \begin_layout Subsubsection
16680 \begin_layout Standard
16685 is a slide that sits atop another slide.
16686 Perhaps you wish to discuss a figure on the main
16690 before displaying the text associated with it.
16691 One way to accomplish this is tape a flap of dark paper over the part of
16696 you want to display later.
16697 This method fails, however, if you wish to overlap one graph with another,
16699 You would then have to fumble while speaking to align the two separate,
16704 s to align the two graphs.
16709 environment in both cases makes life much easier.
16712 \begin_layout Standard
16717 receives the page number of its
16718 \begin_inset Quotes eld
16722 \begin_inset Quotes erd
16730 \begin_inset Quotes eld
16738 \begin_inset Quotes erd
16745 \begin_layout Plain Layout
16746 Presumably, mutliple
16751 \begin_inset Quotes eld
16759 \begin_inset Quotes erd
16763 \begin_inset Quotes eld
16771 \begin_inset Quotes erd
16775 \begin_inset Quotes eld
16783 \begin_inset Quotes erd
16787 \begin_inset space ~
16790 appended to the page number of the parent
16800 Clearly, you want the contents of both the
16808 to each fit on a single physical slide! You should probably consider an
16814 \begin_inset Quotes eld
16818 \begin_inset Quotes erd
16830 class provides a visual cue for this: the label at the start of an
16834 is shorter than that at the start of a
16839 Lastly, when you generate printable output, you'll find alignment markers
16840 in all four corners of both the
16844 page and its parent
16849 These will assist you in lining up the two physical slides.
16852 \begin_layout Standard
16853 The major problem in overlaying two slides is aligning the contents of the
16854 two transparencies.
16855 How much space should you leave for that graph on the second slide? Worse
16856 still, what if you want a graph and a sentence on second slide, but there
16857 is text on the main transparency that goes in between them? You could try
16858 and insert vertical space of the right size.
16859 The better way is to use
16870 \begin_layout Standard
16871 As their names imply,
16879 are two command-like paragraph environments that make all subsequent text
16880 invisible and visible, respectively.
16882 \begin_inset space ~
16886 \begin_inset CommandInset ref
16888 reference "sec:slideQuirk"
16892 that you don't place anything
16896 these two environments, however.
16901 , it inserts a centered, sky-blue label into the page reading
16902 \begin_inset Quotes eld
16905 <Invisible Text Follows>
16906 \begin_inset Quotes erd
16910 For paragraphs following this label, the parts of the
16918 ; it doesn't matter which] where they would be contain instead blank space.
16922 \begin_layout Standard
16927 , the corresponding centered label is
16928 \begin_inset Quotes eld
16931 <Visible Text Follows>
16932 \begin_inset Quotes erd
16936 Paragraphs following this label behave normally.
16937 Note that the beginning of a new
16949 automatically shuts off an
16954 It's therefore not necessary to use
16965 \begin_layout Standard
16966 By now, it should be obvious how to create overlay transparencies using
16967 the proper combination of
16986 \begin_layout Enumerate
16991 , including everything that will appear on it, whether on the main slide
16999 \begin_layout Enumerate
17000 Before each figure or paragraph that will appear only on the
17009 If necessary, insert a
17013 environment after the
17020 \begin_layout Enumerate
17025 immediately following the
17032 \begin_layout Enumerate
17033 Copy the contents of this
17044 \begin_layout Enumerate
17049 , change all of the
17060 \begin_layout Standard
17062 You've just made an
17069 \begin_layout Standard
17070 There's one problem with the way I've designed the LyX
17074 class: you can't make text in the middle of a paragraph invisible, nor
17075 make text in the middle of an invisible paragraph visible again.
17076 To accomplish this feat, you'll need to use some inlined LaTeX codes.
17080 \begin_layout Plain Layout
17081 The commands of interest are:
17084 \begin_layout Itemize
17089 invisible \SpecialChar \ldots{}
17093 \begin_layout Itemize
17098 visible \SpecialChar \ldots{}
17102 \begin_layout Plain Layout
17103 \SpecialChar \ldots{}
17104 and need to be marked as TeX.
17106 \begin_inset Quotes eld
17110 \begin_inset Quotes erd
17113 you wish to change goes in between the brackets [and after the
17126 If you don't know how to mark text as TeX, see the appropriate section
17139 \begin_layout Subsubsection
17149 \begin_inset CommandInset label
17151 name "sec:slideNote"
17158 \begin_layout Standard
17167 is associated with a
17168 \begin_inset Quotes eld
17172 \begin_inset Quotes erd
17184 class provides visual cues.
17189 is shorter than that of a
17193 [yet longer than that of an
17197 ] and, like the label of an
17201 is shockingly magenta.
17202 Additionally, the printed
17206 has the page number of its
17207 \begin_inset Quotes eld
17211 \begin_inset Quotes erd
17219 \begin_inset Quotes eld
17227 \begin_inset Quotes erd
17231 \begin_inset Quotes eld
17239 \begin_inset Quotes erd
17243 \begin_inset Quotes eld
17251 \begin_inset Quotes erd
17255 You can have multiple
17259 s associated with a single
17271 , you'll probably want to break up long
17275 s so that they fit on a single sheet of paper.
17278 \begin_layout Standard
17283 is obvious: it contains anything additional you might want to say about
17289 It could also be used as a sheet of reminders for a particular
17294 In the case of the latter, you might want to make use of time markers.
17300 \begin_inset Quotes eld
17304 \begin_inset Quotes erd
17307 support for time markers, a
17312 So, you'll have to resort to using the LaTeX codes.
17315 \begin_layout Standard
17316 To use time markers, you'll need to specify the extra class option
17317 \begin_inset Quotes eld
17325 \begin_inset Quotes erd
17329 \begin_inset space ~
17333 \begin_inset CommandInset ref
17335 reference "sec:slidesetup"
17340 This option turns on timing marks, which will appear in the lower-left-hand
17346 To set what appears in the time marker, you use the LaTeX commands
17347 \begin_inset Quotes eld
17357 \begin_inset Quotes erd
17361 \begin_inset Quotes eld
17371 \begin_inset Quotes erd
17375 The arguments of both commands are time measured in seconds.
17377 \begin_inset Quotes eld
17387 \begin_inset Quotes erd
17390 sets the time marker to a given time.
17392 \begin_inset Quotes eld
17402 \begin_inset Quotes erd
17405 increments the time marker by the specified amount.
17406 Using time markers and
17410 s in this fashion, you can remind yourself how much time to spend on a particula
17418 \begin_layout Standard
17419 There's one last feature to describe.
17420 Clearly, you'd like to print out all of your
17428 s on transparencies while printing all of your
17445 with which it is associated.
17446 What's a person to do?
17449 \begin_layout Standard
17450 Luckily, there are two LaTeX commands that allow you to select what to print
17452 Both must be placed into the preamble of your document.
17454 \begin_inset Quotes eld
17466 \begin_inset Quotes erd
17469 will cause the output to contain only the
17478 Correspondingly, the command
17479 \begin_inset Quotes eld
17491 \begin_inset Quotes erd
17494 prevents the output of anything but
17499 I'd advise placing both commands in the preamble and initially comment
17501 You can then preview your entire presentation as you write.
17502 When you're done writing, you can then uncomment one of the two to select
17503 what you want to print.
17504 I like to uncomment
17505 \begin_inset Quotes eld
17517 \begin_inset Quotes erd
17520 , print to a file with
17521 \begin_inset Quotes eld
17529 \begin_inset Quotes erd
17532 in its name, comment it back out, then uncomment
17533 \begin_inset Quotes eld
17545 \begin_inset Quotes erd
17549 \begin_inset Quotes eld
17557 \begin_inset Quotes erd
17561 I can then send either file to a printer, loading transparencies or plain
17562 paper as appropriate.
17565 \begin_layout Standard
17566 You can also provide other arguments to the
17567 \begin_inset Quotes eld
17577 \begin_inset Quotes erd
17581 \begin_inset Quotes eld
17591 \begin_inset Quotes erd
17595 See a good LaTeX book for details.
17598 \begin_layout Subsection
17603 Class Template File
17606 \begin_layout Standard
17607 I have also provided a template file,
17608 \begin_inset Quotes eld
17616 \begin_inset Quotes erd
17624 To use it, begin your new presentation with
17629 ile\SpecialChar \menuseparator
17631 \begin_inset space ~
17635 \begin_inset space ~
17645 Your new LyX presentation file will contain an example
17666 additionally contain an example of the use of
17675 Lastly, the preamble will contain:
17678 \begin_layout LyX-Code
17679 % Uncomment to print out only slides and overlays
17682 \begin_layout LyX-Code
17686 \begin_layout LyX-Code
17692 \begin_inset Newline newline
17698 \begin_layout LyX-Code
17699 % Uncomment to print out only notes
17702 \begin_layout LyX-Code
17706 \begin_layout LyX-Code
17714 \begin_layout Standard
17715 One final thing: I created this class to support the LaTeX2e
17716 \begin_inset Quotes eld
17724 \begin_inset Quotes erd
17727 class, one of the built-in LaTeX2e classes.
17728 Neither I nor the rest of the LyX Team endorse or oppose the use of this
17729 built-in slide class.
17730 It's here if you want it or need it.
17731 There exist other LaTeX2e classes for creating presentations, such as the
17737 \begin_inset space ~
17741 \begin_inset CommandInset ref
17743 reference "sec:foiltex"
17748 \begin_inset Quotes eld
17756 \begin_inset Quotes erd
17759 package [present on some TeX distributions].
17760 The latter is not yet supported under LyX.
17764 \begin_layout Plain Layout
17765 Perhaps you can take on the task\SpecialChar \ldots{}
17771 I know nothing about these other classes.
17772 Try them out to see what sort of alternative they provide.
17775 \begin_layout Chapter
17776 LyX Features needing Extra Software
17779 \begin_layout Section
17783 \begin_layout Standard
17789 \begin_layout Subsection
17793 \begin_layout Standard
17802 \begin_layout Plain Layout
17807 is not yet available when you are using the LaTeX distribution MiKTeX.
17812 , you'll find in the
17819 \begin_inset space ~
17830 \begin_inset CommandInset href
17832 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
17839 \begin_layout Standard
17844 package is a program that was written by
17845 \begin_inset Flex Noun
17848 \begin_layout Plain Layout
17850 \begin_inset space ~
17858 in frustration because some constructs in LaTeX are sometimes non-intuitive,
17859 and easy to forget.
17860 The program runs over your LaTeX file, checks the integrity of the file,
17861 and flags some common errors.
17862 In other technical words, it is
17869 \begin_layout Standard
17870 Well, what is a syntax checker doing in LyX which is supposed to produce
17871 correct LaTeX anyways? The answer is simple: Just as
17875 not only checks the
17879 of C programs, but also does
17883 checks for type-errors,
17887 catches some common
17891 errors, in addition to the syntactical ones.
17896 is capable of detecting several common errors, such as
17899 \begin_layout Itemize
17900 Ellipsis detection:
17901 \begin_inset Newline newline
17904 Use \SpecialChar \ldots{}
17908 \begin_layout Itemize
17909 No space in front of/after parenthesis:
17910 \begin_inset Newline newline
17916 \begin_layout Itemize
17917 Enforcement of normal space after common abbreviations:
17918 \begin_inset Newline newline
17922 \begin_inset space \thinspace{}
17926 \begin_inset space \space{}
17929 is too wide spacing.
17932 \begin_layout Itemize
17933 Enforcement of end-of-sentence space when the last sentence ends with a
17935 \begin_inset Newline newline
17939 And this is wrong spacing.
17942 \begin_layout Itemize
17943 Space in front of labels and similar commands:
17944 \begin_inset Newline newline
17947 The label should stick right up to the text to avoid falling to a wrong
17950 \begin_inset CommandInset label
17960 \begin_layout Plain Layout
17961 This footnote is in danger of falling off to a wrong page
17966 The label is separated too much.
17969 \begin_layout Itemize
17970 Space in front of references, instead of hard spaces:
17971 \begin_inset Newline newline
17974 In you are in bad luck, the text will break right between the referenced
17975 text and reference number, and that's a pity.
17977 \begin_inset CommandInset ref
17979 reference "sec:chktex"
17986 \begin_layout Itemize
17988 \begin_inset Quotes eld
17992 \begin_inset Quotes erd
17996 \begin_inset Formula $\times$
18000 \begin_inset Newline newline
18003 2x2 looks cheap compared to
18004 \begin_inset Formula $2\times2$
18010 \begin_layout Standard
18011 and more \SpecialChar \ldots{}
18012 It is an invaluable tool when you are
18013 \begin_inset Quotes eld
18017 \begin_inset Quotes erd
18020 your document before printing, and you should run it right after the obligatory
18021 spelling check, and before you go fine tuning the typesetting.
18024 \begin_layout Subsection
18028 \begin_layout Standard
18029 If you have the program installed, usage is as simple as choosing
18031 Tools\SpecialChar \menuseparator
18033 \begin_inset space ~
18039 This will make LyX generate a LaTeX file of your document, start
18043 to check it, and then make LyX insert
18044 \begin_inset Quotes eld
18048 \begin_inset Quotes erd
18051 with the warnings from
18055 , if there were any.
18056 The warnings will be placed close to the point of the mistake, and you
18057 can quickly find them by using the
18059 Navigate\SpecialChar \menuseparator
18062 menu item, or the shortcut key
18071 Open the error boxes by clicking on them with the mouse, or use the shortcut
18080 bindings, or the corresponding
18089 Read the warning and correct the mistake, if it is a mistake.
18090 If you have trouble understanding what the warning is about, you can safely
18092 Remember that there is a hidden layer between the document on screen and
18093 the technical details in invoking
18097 , and this gap can make some warnings seem arcane or just right down plain
18101 \begin_layout Standard
18102 This document is an excellent testing bed for the feature, and it should
18103 provide quite a few warnings for you to fiddle with.
18104 Since computers are only so smart, expect most of the warnings to be false
18108 \begin_layout Subsection
18109 How to fine tune it
18112 \begin_layout Standard
18113 Sometimes, you'll find that
18117 makes more noise than suits your mood.
18118 Then you can choose not to use it, wait until your mood changes, or try
18123 to get better along with you.
18126 \begin_layout Standard
18135 very configurable and extensible, you shouldn't expect to solve all problems
18141 Since LyX has to generate a somewhat special LaTeX file to be able to match
18142 the line numbers from the
18150 \begin_layout Plain Layout
18151 You can inspect the specific output from
18157 Edit\SpecialChar \menuseparator
18159 \begin_inset space ~
18163 \begin_inset space ~
18177 to the internal document structure, some of the warnings will not seen
18178 to appear correctly.
18179 There are two things you can do about this:
18182 \begin_layout Itemize
18187 invocation command line in
18203 installation configuration file (usually with the file
18208 See below to learn what warnings can be enabled and disabled on the command
18213 \begin_layout Itemize
18214 Export your document as a raw LaTeX file using
18216 File\SpecialChar \menuseparator
18217 Export\SpecialChar \menuseparator
18225 Invoked in this way, it can be a hassle to find the corresponding place
18226 in the document inside LyX, but with a little patience, you should be able
18230 \begin_layout Standard
18231 Here follows the warning messages that can be enabled and disabled in
18240 to disable a warning, and
18244 to enable a warning.
18245 The emphasized entries are disabled by default, because the default is
18248 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18253 \begin_layout Standard
18254 Notice that you should only use the options that enable and disable warnings,
18255 because LyX relies on some of the other command line parameters to be set
18256 in a specific way to have a chance to communicate with
18263 \begin_layout Enumerate
18267 Command terminated with space.
18270 \begin_layout Enumerate
18273 Non-breaking space (
18274 \begin_inset Quotes eld
18282 \begin_inset Quotes erd
18285 ) should have been used.
18288 \begin_layout Enumerate
18292 You should enclose the previous parenthesis with
18293 \begin_inset Quotes eld
18301 \begin_inset Quotes erd
18307 \begin_layout Enumerate
18310 Italic correction (
18311 \begin_inset Quotes eld
18321 \begin_inset Quotes erd
18324 ) found in non-italic buffer.
18327 \begin_layout Enumerate
18330 Italic correction (
18331 \begin_inset Quotes eld
18341 \begin_inset Quotes erd
18344 ) found more than once.
18347 \begin_layout Enumerate
18351 No italic correction (
18352 \begin_inset Quotes eld
18362 \begin_inset Quotes erd
18368 \begin_layout Enumerate
18372 \begin_inset Quotes eld
18380 \begin_inset Quotes erd
18384 \begin_inset Quotes eld
18392 \begin_inset Quotes erd
18398 \begin_layout Enumerate
18401 Wrong length of dash may have been used.
18404 \begin_layout Enumerate
18408 \begin_inset Quotes eld
18416 \begin_inset Quotes erd
18420 \begin_inset Quotes eld
18428 \begin_inset Quotes erd
18434 \begin_layout Enumerate
18438 \begin_inset Quotes eld
18446 \begin_inset Quotes erd
18452 \begin_layout Enumerate
18456 \begin_inset Quotes eld
18464 \begin_inset Quotes erd
18467 to achieve an ellipsis.
18470 \begin_layout Enumerate
18473 Inter-word spacing (
18474 \begin_inset Quotes eld
18484 \begin_inset Quotes eld
18487 ) should perhaps be used.
18490 \begin_layout Enumerate
18493 Inter-sentence spacing (
18494 \begin_inset Quotes eld
18504 \begin_inset Quotes erd
18507 ) should perhaps be used.
18510 \begin_layout Enumerate
18513 Could not find argument for command.
18516 \begin_layout Enumerate
18520 \begin_inset Quotes eld
18528 \begin_inset Quotes erd
18534 \begin_layout Enumerate
18537 Math mode still on at end of LaTeX file.
18540 \begin_layout Enumerate
18544 \begin_inset Quotes eld
18552 \begin_inset Quotes erd
18555 doesn't match the number of
18556 \begin_inset Quotes eld
18564 \begin_inset Quotes erd
18570 \begin_layout Enumerate
18573 You should use either
18576 \begin_inset Quotes eld
18584 \begin_inset Quotes erd
18589 as an alternative to
18590 \begin_inset Quotes eld
18598 \begin_inset Quotes erd
18604 \begin_layout Enumerate
18611 " (ASCII 39) instead of "
18618 \begin_layout Enumerate
18621 User-specified pattern found.
18624 \begin_layout Enumerate
18627 This command might not be intended.
18630 \begin_layout Enumerate
18637 \begin_layout Enumerate
18655 \begin_layout Enumerate
18658 Delete this space to maintain correct page references.
18661 \begin_layout Enumerate
18665 You might wish to put this between a pair of
18666 \begin_inset Quotes eld
18674 \begin_inset Quotes erd
18680 \begin_layout Enumerate
18683 You ought to remove spaces in front of punctuation.
18686 \begin_layout Enumerate
18689 Could not execute LaTeX command.
18692 \begin_layout Enumerate
18701 in front of small punctuation.
18704 \begin_layout Enumerate
18712 may look prettier here.
18715 \begin_layout Enumerate
18719 Multiple spaces detected in output.
18722 \begin_layout Enumerate
18725 This text may be ignored.
18728 \begin_layout Enumerate
18734 \begin_inset Quotes eld
18739 to begin quotation, not
18746 \begin_layout Enumerate
18753 to end quotation, not
18756 \begin_inset Quotes eld
18764 \begin_layout Enumerate
18770 \begin_layout Enumerate
18773 You should perhaps use
18774 \begin_inset Quotes eld
18782 \begin_inset Quotes erd
18788 \begin_layout Enumerate
18791 You should put a space in front of/after parenthesis.
18794 \begin_layout Enumerate
18797 You should avoid spaces in front of/after parenthesis.
18800 \begin_layout Enumerate
18804 You should not use punctuation in front of/after quotes.
18807 \begin_layout Enumerate
18810 Double space found.
18813 \begin_layout Enumerate
18816 You should put punctuation outside inner/inside display math mode.
18819 \begin_layout Enumerate
18822 You ought to not use primitive TeX in LaTeX code.
18825 \begin_layout Enumerate
18828 You should remove spaces in front of
18829 \begin_inset Quotes eld
18837 \begin_inset Quotes erd
18843 \begin_layout Enumerate
18846 \begin_inset Quotes eld
18854 \begin_inset Quotes erd
18857 is normally not followed by
18858 \begin_inset Quotes eld
18866 \begin_inset Quotes erd
18872 \begin_layout Standard
18873 In later versions of LyX, we hope to provide a more complete interface to
18874 this tool (and it's smaller cousin
18878 ) to exploit the full power of it.
18879 But it's not exactly useless as it is now: go try it on one of your existing
18880 documents of a certain length and be surprised.
18883 \begin_layout Section
18884 Version Control in LyX
18887 \begin_layout Standard
18890 Lars Gullik Bjønnes
18897 \begin_layout Subsection
18901 \begin_layout Standard
18902 A friend of mine wanted to try LyX for a group project.
18903 When he didn't find support for version control or file locking, he dropped
18905 This angered me a bit, so I thought that I should at least make support
18906 for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
18907 This has been done.
18908 LyX now supports some of the most basic RCS/CVS/SVN commands.
18909 If you need something a bit more sophisticated you will have to do that
18910 manually in a terminal.
18913 \begin_layout Standard
18914 Also note that CVS support is not as good as subversion support so we advice
18916 Good place to start with Subversion is SVN Book
18920 \begin_layout Plain Layout
18921 \begin_inset CommandInset href
18923 target "http://svnbook.red-bean.com/"
18933 In case of RCS you should read
18934 \begin_inset Quotes eld
18938 \begin_inset Quotes erd
18941 (a man file, read it with
18946 This file describes all the basic features of RCS.
18947 You should especially notice the comment about a RCS directory, and the
18948 notion of a master RCS file (the file ending in
18955 \begin_layout Standard
18956 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
18957 package—no guarantees are made for older versions.
18958 Most of the log messages are not currently displayed after operations —
18959 you can check them in Messages pane if unsure.
18962 \begin_layout Standard
18963 For introducing your own external commands consult vc-command in the manual
18967 \begin_layout Subsection
18968 RCS commands in LyX
18971 \begin_layout Standard
18972 The following sections describe the RCS commands supported by LyX.
18973 You can find them in the
18975 File\SpecialChar \menuseparator
18977 \begin_inset space ~
18983 LyX was tested against RCS 5.7.
18986 \begin_layout Subsubsection
18992 \begin_layout Standard
18993 If your document is not under revision control, this is the only item shown
18995 And if it is under revision control, the
18999 item is not visible.
19003 \begin_layout Standard
19004 This command registers your document with RCS (unless you are under the
19005 directory managed by CVS)\SpecialChar \@.
19006 You are asked interactively to supply an initial
19007 description of the document.
19008 The document is now set in Read-Only mode and you have to
19011 \begin_inset space ~
19015 \begin_inset space ~
19019 \begin_inset space ~
19024 , before making any changes to it.
19025 A document under revision control has a
19026 \begin_inset Quotes eld
19029 [RCS:<version> <locker>]
19030 \begin_inset Quotes erd
19033 item tagged to the filename in the minibuffer.
19036 \begin_layout Standard
19037 RCS command that is run:
19039 ci -q -u -i -t-"<initial description>" <file-name>
19042 \begin_layout Standard
19047 to understand the switches.
19051 \begin_layout Subsubsection
19057 \begin_layout Standard
19058 When you are finished editing a file, you check in your changes.
19059 When you do this, you are asked for a description of the changes.
19060 This is stored in the history log.
19061 The version number is bumped, your changes are applied to the master RCS
19062 file, the document is unlocked and set to Read-Only mode.
19066 \begin_layout Standard
19069 ci -q -u -m"<description>" <file-name>
19072 \begin_layout Subsubsection
19078 \begin_layout Standard
19079 By doing this you lock the document so that only you can edit it.
19080 This will also make the document Read-Write only for you.
19081 You will usually continue editing for a while and when you are finished
19082 you check in your changes.
19083 The status line is changed to reflect that you have locked the file.
19087 \begin_layout Standard
19090 co -q -l <file-name>
19093 \begin_layout Subsubsection
19096 Revert To Repository Version
19099 \begin_layout Standard
19100 This will discard all changes made to the document since the last check
19102 You get a warning before changes are discarded.
19105 \begin_layout Standard
19108 co -f -u<version> <file-name>
19111 \begin_layout Subsubsection
19117 \begin_layout Standard
19118 This makes as if the last check in never happened.
19119 No changes are made to the document loaded into LyX, but the last version
19120 is removed from the master RCS file.
19124 \begin_layout Standard
19127 rcs -o<version> <file-name>
19130 \begin_layout Subsubsection
19136 \begin_layout Standard
19137 This shows the complete history of the RCS document.
19142 is shown in a browser.
19150 \begin_layout Subsubsection
19154 \begin_layout Standard
19155 LyX supports RCS version number, author name, date and time of last commit.
19156 All those are extracted from
19158 rlog -r <file-name>
19161 For other details see
19162 \begin_inset CommandInset ref
19164 reference "sub:VCS-Revision-Information"
19171 \begin_layout Subsection
19172 CVS commands in LyX
19175 \begin_layout Standard
19176 A subset of CVS operations is supported by LyX.
19177 You can find the commands in the
19179 File\SpecialChar \menuseparator
19181 \begin_inset space ~
19187 The version control system SVN is more powerful, so please use it instead
19188 of CVS if possible.
19191 \begin_layout Subsubsection
19197 \begin_layout Standard
19198 If you start from scratch with CVS you have to create your repository and
19199 checkout the working copy with external tools.
19200 If you're using a client-server setup you may need to login before doing
19201 the first repository checkout.
19204 \begin_layout Standard
19205 If your documents are under revision control and others are using the same
19206 repository problems arise when different changes to the same document at
19207 the same location happen.
19208 Standard CVS repositories doesn't operate with a file locking mechanism.
19209 This may be surprising, but conflicts only occur if people disagree on
19210 the proper content of the same part of a document.
19211 So, if co-workers are used to communicate regularly, these conflicts occur
19213 If they don't communicate they have a fundamental problem anyway.
19214 Nevertheless some people like to work with so called
19215 \begin_inset Quotes eld
19219 \begin_inset Quotes erd
19223 If they do so the working copy of all files is readonly when checked out
19224 first and the user starts editing after using a special command to make
19225 the working copy writable.
19226 When the changes are checked in the working copy returns to readonly state.
19227 With LyX one has to edit the
19228 \begin_inset Flex Code
19231 \begin_layout Plain Layout
19237 file and add the line
19238 \begin_inset Flex Code
19241 \begin_layout Plain Layout
19247 to work with reserved checkouts.
19248 The benefit is the possibility to see who is using a writable copy of some
19250 It's not guaranteed only one user makes a copy writable.
19253 \begin_layout Standard
19254 LyX tries to guess if you're using reserved or non-reserved checkouts.
19255 If your working copy is readonly or it is writable and an additional copy
19256 of your document exists in the CVS/Base sub-directory a reserved otherwise
19257 a non-reserved checkout is assumed.
19258 When a reserved checkout is detected you have to use
19259 \begin_inset Flex MenuItem
19262 \begin_layout Plain Layout
19268 to make your working copy writable if it's readonly.
19270 \begin_inset Flex MenuItem
19273 \begin_layout Plain Layout
19279 operation is possible and that makes your working copy readonly again after
19280 transferring your changes to the repository.
19283 \begin_layout Standard
19284 More information about CVS can be found here
19285 \begin_inset Flex URL
19288 \begin_layout Plain Layout
19290 http://www.nongnu.org/cvs
19296 \begin_inset Flex URL
19299 \begin_layout Plain Layout
19301 http://ximbiot.com/cvs
19309 \begin_layout Standard
19314 to understand the sub-commands and the switches mentioned below.
19317 \begin_layout Subsubsection
19323 \begin_layout Standard
19324 If your document is not under revision control, this is the only item shown
19326 And if it is under revision control, the
19333 item is not visible.
19337 \begin_layout Standard
19338 This command registers in CVS your document
19339 \begin_inset Flex Strong
19342 \begin_layout Plain Layout
19350 in case you have already the documents directory under CVS control (in
19356 This means you have to create or checkout the archive by yourself using
19358 (In case you forget that step LyX registers the document with RCS.)
19361 \begin_layout Standard
19362 Then you are asked interactively to supply an initial description of the
19364 Don't forget that registered file is not yet checked in.
19367 \begin_layout Standard
19368 CVS command that is run:
19370 cvs -q add -m"<entered message>" "<file-name>"
19373 \begin_layout Standard
19378 above and for all other CVS commands is an abbreviation for
19379 \begin_inset Quotes eld
19382 change the current working directory to file location and use the file name
19383 without path component as argument
19384 \begin_inset Quotes erd
19390 \begin_layout Subsubsection
19396 \begin_layout Standard
19397 When you are finished editing a file, you commit your changes.
19398 When you do this and you had changed the document, you are asked for a
19399 description of the changes.
19400 After that changes are written to the repository.
19401 In case you didn't change the document and a reserved checkout is detected
19402 the reservation made on
19403 \begin_inset Flex MenuItem
19406 \begin_layout Plain Layout
19415 \begin_layout Labeling
19416 \labelwidthstring 00.00.0000
19418 \begin_inset space ~
19422 \begin_inset space ~
19426 \begin_inset Newline newline
19430 \begin_inset Flex Code
19433 \begin_layout Plain Layout
19436 -q commit -m"<description>" "<file-name>"
19442 \begin_inset Newline newline
19446 \begin_inset Flex Code
19449 \begin_layout Plain Layout
19460 \begin_layout Subsubsection
19466 \begin_layout Standard
19467 When you are sharing a repository with others, you may have to incorporate
19468 their changes into your working copy.
19471 \begin_layout Standard
19474 cvs -q update "<file-name>"
19477 \begin_layout Standard
19478 If a readonly checkout is detected the working copy is made writable and
19482 \begin_layout Standard
19485 cvs -q edit "<file-name>"
19488 \begin_layout Subsubsection
19491 Revert To Repository Version
19494 \begin_layout Standard
19495 This will discard all changes made to the document since the last check
19497 You get a warning before changes are discarded.
19498 Firstly the file is deleted, secondly CVS update command is run.
19501 \begin_layout Standard
19504 cvs -q update "<file-name>"
19507 \begin_layout Standard
19508 If a reserved checkout is detected and the working copy has no changes only
19509 the reservation is undone.
19512 \begin_layout Standard
19515 cvs -q unedit "<file-name>"
19518 \begin_layout Subsubsection
19519 Update of the local directory checkout from repository
19522 \begin_layout Standard
19523 Once your documents gets more complex, containing sub-documents and pictures,
19525 \begin_inset Flex Code
19528 \begin_layout Plain Layout
19534 files and so on using version control becomes more complicated.
19535 LyX supports updating the whole tree in which resides the document.
19536 This become especially useful once you cooperate with people which neither
19537 have detailed knowledge about CVS usage nor they have ambition to commit
19538 additional material to the repository.
19539 You have to organize the files structure so that all external files are
19540 in the same directory or subdirectories of the document.
19541 It's good practice anyway to store multipart documents in an extra directory.
19544 \begin_layout Standard
19546 \begin_inset Flex Code
19549 \begin_layout Plain Layout
19550 Update local directory from repository
19555 command updates the whole directory.
19556 If local changes are detected user is warned before update starts.
19557 In case of merge conflicts both versions of the conflicting document parts
19558 are placed in the final document.
19559 You have to review and correct the result of the merge.
19560 You'll find the conflicts enclosed in pairs of
19561 \begin_inset Flex Code
19564 \begin_layout Plain Layout
19571 \begin_inset Flex Code
19574 \begin_layout Plain Layout
19581 \begin_inset Flex Code
19584 \begin_layout Plain Layout
19591 The first part is your version as before the update operation with the
19592 document name prepended.
19593 The second one is the repository version with the version number after
19595 \begin_inset Flex Code
19598 \begin_layout Plain Layout
19607 \begin_layout Labeling
19608 \labelwidthstring 00.00.0000
19610 \begin_inset space ~
19614 \begin_inset space ~
19618 \begin_inset Newline newline
19622 \begin_inset Flex Code
19625 \begin_layout Plain Layout
19633 (Ask if changes are detected.)
19634 \begin_inset Newline newline
19638 \begin_inset Flex Code
19641 \begin_layout Plain Layout
19642 cd $path; cvs -q update
19652 \begin_layout Standard
19654 \begin_inset Flex Code
19657 \begin_layout Plain Layout
19663 stands for the path to the document.
19666 \begin_layout Subsubsection
19672 \begin_layout Standard
19673 This shows the complete history of the CVS document.
19676 cvs log "<file-name>"
19678 is shown in a browser.
19681 \begin_layout Subsection
19682 SVN commands in LyX
19685 \begin_layout Standard
19686 SVN is now partially supported by LyX.
19687 You can find the commands in the
19689 File\SpecialChar \menuseparator
19691 \begin_inset space ~
19697 Please note that if you use password protected access to repository via
19698 ssh, you will be asked in terminal window.
19699 LyX was tested against SVN 1.5 and 1.6
19703 \begin_layout Plain Layout
19704 Most of the commands will work with 1.4 too, see
19705 \begin_inset CommandInset ref
19707 reference "sub:SVN-Repo-Update"
19719 \begin_layout Subsubsection
19725 \begin_layout Standard
19726 If your document is not under revision control, this is the only item shown
19728 And if it is under revision control, the
19735 item is not visible.
19739 \begin_layout Standard
19740 This command registers in SVN your document ONLY in case you have already
19741 the documents directory under SVN control (in particular
19746 This means you have to checkout the archive by yourself.
19750 \begin_layout Standard
19751 Then you are asked interactively to supply an initial description of the
19753 Don't forget that registered file is not yet commited.
19756 \begin_layout Standard
19757 SVN command that is run:
19760 \begin_inset Quotes eld
19764 \begin_inset Quotes erd
19770 \begin_layout Standard
19775 to understand the switches.
19779 \begin_layout Subsubsection
19785 \begin_layout Standard
19786 When you are finished editing a file, you commit your changes.
19787 When you do this, you are asked for a description of the changes.
19788 After that changes are commited.
19791 \begin_layout Standard
19796 \begin_layout Plain Layout
19797 In case locking is not enabled.
19799 \begin_inset CommandInset ref
19801 reference "subsec:SVN-File-Locking"
19812 svn commit -q -m"<description>" <file-name>
19815 \begin_layout Subsubsection
19821 \begin_layout Standard
19822 Updates the changes of this file from the repository.
19823 Be sure you understand SVN merging and conflicts resolving before using
19824 this function, because all conflicts has to be resolved manually by you!
19827 \begin_layout Standard
19832 \begin_layout Plain Layout
19840 svn update --non-interactive
19841 \begin_inset Quotes eld
19845 \begin_inset Quotes erd
19851 \begin_layout Subsubsection
19854 Revert To Repository Version
19857 \begin_layout Standard
19858 This will discard all changes made to the document since the last check
19860 You get a warning before changes are discarded.
19864 \begin_layout Standard
19868 \begin_inset Quotes eld
19872 \begin_inset Quotes erd
19878 \begin_layout Subsubsection
19879 \begin_inset CommandInset label
19881 name "sub:SVN-Repo-Update"
19885 Update of the local directory checkout from repository
19889 \begin_layout Plain Layout
19890 Note that this command will work only with subversion
19891 \begin_inset Formula $\geqq1.5$
19902 \begin_layout Standard
19903 All the commands above have one shortcomming - they deal with the current
19905 Once your document contains pictures, includes external
19906 \begin_inset Flex Code
19909 \begin_layout Plain Layout
19915 files and so on administration becomes more complicated.
19916 LyX now supports updating the whole tree in which resides the document
19920 \begin_layout Plain Layout
19921 One need to organize the files structure so that all external files are
19922 in the same directory or subdirectories of the document.
19929 This become especially useful once you cooperate with people which neither
19930 know about subversion management nor they have ambition to commit additional
19931 material to the repository.
19935 \begin_layout Standard
19936 \begin_inset Flex Code
19939 \begin_layout Plain Layout
19940 Update local directory from repository
19945 command updates the whole directory and in case of merge conflicts local
19946 version of the files are left, so no unintended data loss occurs.
19947 If local changes are detected user is warned before update starts.
19950 \begin_layout Labeling
19951 \labelwidthstring 00.00.0000
19953 \begin_inset space ~
19957 \begin_inset space ~
19961 \begin_inset Newline newline
19965 \begin_inset Flex Code
19968 \begin_layout Plain Layout
19974 (Ask if changes are detected.)
19975 \begin_inset Newline newline
19979 \begin_inset Flex Code
19982 \begin_layout Plain Layout
19983 svn update --accept mine-full $path
19991 \begin_layout Standard
19993 \begin_inset Flex Code
19996 \begin_layout Plain Layout
20002 stands for the path to the document.
20005 \begin_layout Subsubsection
20011 \begin_layout Standard
20012 This shows the complete history of the SVN document.
20016 \begin_inset Quotes eld
20020 \begin_inset Quotes erd
20025 is shown in a browser.
20028 \begin_layout Subsubsection
20030 \begin_inset CommandInset label
20032 name "subsec:SVN-File-Locking"
20039 \begin_layout Standard
20040 The file exchange through various revision control systems brings the problem
20041 of merge conflicts in case two different users try to edit the same (parts
20043 When such a conflict happens it needs manual resolving and one reasonable
20044 alternative is to provide some kind of locking mechanism, which guarantees
20045 that only one user is allowed to edit file at the given time.
20048 \begin_layout Standard
20049 SVN has two such mechanisms to provide mutual exclusivity for file access
20050 - locks and automatic setting of write permissions (see sec.
20052 \begin_inset CommandInset ref
20054 reference "subsec:Automatical-Locking-Property"
20059 \begin_inset Flex Code
20062 \begin_layout Plain Layout
20072 \begin_layout Plain Layout
20073 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20079 If this property is detected for a given document LyX starts to use SVN
20080 locks for document editing automatically and the whole check-in/out mechanism
20081 switches to the same regimen as for RCS.
20082 This in particular means there are two different modes of file use in LyX:
20085 \begin_layout Itemize
20087 The loaded file is in the read-only mode.
20088 For editing on needs to check-out.
20093 consists of updating from the repository and gaining write lock.
20094 If the lock is not possible to obtain, we remain in unlocked state.
20097 \begin_layout Itemize
20099 The loaded file is in the 'normal' edit mode.
20100 No other user is allowed to edit the file.
20105 consists of commiting changes and releasing write-lock.
20106 If no changes have been made to the document, no commit will be produced
20110 \begin_layout Plain Layout
20111 Don't be puzzled by the fact that you will be asked for commit message anyway.
20116 and only the write-lock will be released.
20119 \begin_layout Standard
20123 \begin_layout Labeling
20124 \labelwidthstring 00.00.0000
20127 svn commit -q -m"<description>" "<file-name>"
20128 \begin_inset Newline newline
20131 svn unlock "<file-name>"
20134 \begin_layout Labeling
20135 \labelwidthstring 00.00.0000
20138 svn update "<file-name>"
20139 \begin_inset Newline newline
20142 svn lock "<file-name>"
20145 \begin_layout Subsubsection
20148 \begin_inset CommandInset label
20150 name "subsec:Automatical-Locking-Property"
20156 Automatic Locking Property
20159 \begin_layout Standard
20160 The above mentioned automatic setting of write permissions of the .lyx file
20166 ile\SpecialChar \menuseparator
20172 \begin_inset space ~
20175 Control\SpecialChar \menuseparator
20180 oggle locking property
20183 This command is active only when the file is not locked on the svn server
20185 you need to check-out before proceeding).
20188 \begin_layout Labeling
20189 \labelwidthstring 00.00.0000
20191 \begin_inset space ~
20197 \begin_layout Labeling
20198 \labelwidthstring 00.00.0000
20201 svn propset svn:needs-lock ON "<file-name>"
20204 \begin_layout Labeling
20205 \labelwidthstring 00.00.0000
20208 svn propdel svn:needs-lock "<file-name>"
20211 \begin_layout Subsubsection
20212 \begin_inset CommandInset label
20214 name "sub:VCS-Revision-Information"
20218 Revision Information in Documents
20221 \begin_layout Standard
20222 There are more possibilities how to activate revision information in our
20226 \begin_layout Itemize
20227 LyX supports directly:
20231 \begin_layout Itemize
20232 tree revision information (
20233 \begin_inset Flex Code
20236 \begin_layout Plain Layout
20243 The result is the output of the
20244 \begin_inset Flex Code
20247 \begin_layout Plain Layout
20253 command, the following table gives you an idea, how to read the results.
20256 \begin_layout Standard
20258 \begin_inset Tabular
20259 <lyxtabular version="3" rows="6" columns="2">
20260 <features tabularvalignment="middle">
20261 <column alignment="center" valignment="top" width="0">
20262 <column alignment="center" valignment="top" width="0">
20264 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20267 \begin_layout Plain Layout
20273 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20276 \begin_layout Plain Layout
20284 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20287 \begin_layout Plain Layout
20293 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20296 \begin_layout Plain Layout
20297 mixed revision working copy
20304 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20307 \begin_layout Plain Layout
20313 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20316 \begin_layout Plain Layout
20317 modified working copy
20324 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20327 \begin_layout Plain Layout
20333 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20336 \begin_layout Plain Layout
20337 switched working copy
20344 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20347 \begin_layout Plain Layout
20353 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20356 \begin_layout Plain Layout
20357 partial working copy, from a sparse checkout
20364 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20367 \begin_layout Plain Layout
20373 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20376 \begin_layout Plain Layout
20377 mixed revision, modified, switched working copy
20390 \begin_layout Itemize
20391 file revision information.
20392 The result comes from parsing the output of
20393 \begin_inset Flex Code
20396 \begin_layout Plain Layout
20398 \begin_inset space ~
20402 \begin_inset space ~
20406 \begin_inset space ~
20415 Supported flags are:
20419 \begin_layout Itemize
20420 version number of the last commit (
20421 \begin_inset Flex Code
20424 \begin_layout Plain Layout
20433 \begin_layout Itemize
20434 author of the last commit (
20435 \begin_inset Flex Code
20438 \begin_layout Plain Layout
20447 \begin_layout Itemize
20448 date of the last commit (
20449 \begin_inset Flex Code
20452 \begin_layout Plain Layout
20461 \begin_layout Itemize
20462 time of the last commit (
20463 \begin_inset Flex Code
20466 \begin_layout Plain Layout
20476 \begin_layout Standard
20477 You can obtain this info via InsetInfo (e.g.
20479 \begin_inset Flex Code
20482 \begin_layout Plain Layout
20483 info-insert buffer vcs-date
20489 The information will be available only when you have the file stored under
20490 svn managment (i.e.
20492 \begin_inset Flex Code
20495 \begin_layout Plain Layout
20501 directory is available with your document).
20505 \begin_layout Itemize
20506 Another---a hacking one---possibility is to use svn keywords
20510 \begin_layout Plain Layout
20511 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20517 In short -- you set file keywords property (e.g.
20520 svn propset svn:keywords 'Rev' file.lyx
20522 ) and then paste keyword TeX code
20526 \begin_layout Plain Layout
20527 This is an easy way how to ensure that LyX won't break the line in the middle
20533 tag in your document (e.g.
20538 \begin_layout Plain Layout
20546 This way svn client will automatically substitute revision number (e.g.
20551 \begin_layout Plain Layout
20558 ) after each update and commit.
20559 There are more problems with this approach.
20560 Firstly, the '$' character is used in TeX world for math equations, so
20561 any occurence of math formula
20562 \begin_inset Formula $Rev$
20566 \begin_inset Formula $Rev:59$
20569 in your LyX document.
20570 Similarly for other keywords like Id, Date, Author, etc.
20571 Secondly svn output is dependent on your locales, so its very easy that
20572 svn would produce some problematic strings once Date is used.
20573 Thirdly you get the whole 'Rev: 59' string in your document instead of
20575 Until subversion implements user's custom keywords it will be hard to use
20576 this approach reliably or let LyX to support it directly.
20579 \begin_layout Subsection
20580 SVN and Windows Environment
20583 \begin_layout Quote
20584 My inclination is to say that if the user cannot figure out the command
20585 line operations on their own fairly quickly, they would be well advised
20586 to use TortoiseSVN.
20592 \begin_layout Subsubsection
20596 \begin_layout Standard
20597 In addition to installing LyX, and having access to a Subversion repository,
20598 the user will need to install the Subversion client program.
20599 A Windows installer for the client program is available from
20600 \begin_inset CommandInset href
20603 target "http://www.collab.net/nonav/downloads/subversion/"
20608 The user may also want to install
20609 \begin_inset CommandInset href
20612 target "http://tortoisesvn.tigris.org/"
20616 , which integrates Subversion operations into the context (rightclick) menu
20617 of Windows Explorer.
20618 Operations done outside LyX will typically be more convenient using the
20619 Explorer context menu.
20620 Note that TortoiseSVN is not a replacement for the client program, which
20621 is what LyX itself will use.
20624 \begin_layout Subsubsection
20625 Bringing a document under Subversion control
20628 \begin_layout Standard
20629 Before a LyX document can be brought under version control in Subversion,
20630 its parent directory needs to be under version control.
20631 If the document is being added to a project already in the repository,
20632 this is accomplished by checking the project out to the directory where
20633 the new document will be placed.
20634 If the project itself is not yet under version control (for instance, if
20635 this document starts a new project), the directory must be imported into
20637 This is done outside LyX.
20638 Both import and checkout are easily accomplished from the Explorer context
20639 menu using TortoiseSVN, or alternatively can be done using the command
20640 line client at a DOS prompt.
20641 The procedure for importing the project using TortoiseSVN is described
20642 below, assuming an existing repository and a new project being started
20650 For information on using the Subversion client program, run
20657 \begin_layout Enumerate
20664 in Windows Explorer, right click it, and select
20666 TortoiseSVN > Repo-browser
20669 If necessary, adjust the URL for the repository, then click OK.
20672 \begin_layout Enumerate
20673 Right click the level of the repository under which you want to place the
20674 new project folder (typically the top level) and click
20676 Create folder\SpecialChar \ldots{}
20679 Supply a name for the project folder and click OK.
20680 Add a message for the log file if desired, then click OK again.
20681 The new project folder should appear in the repository.
20682 Finally, click OK again to exit the repository browser.
20685 \begin_layout Enumerate
20686 Once again right click
20692 , this time selecting SVN Checkout\SpecialChar \ldots{}
20693 Select the URL of the project folder
20694 you just created in the repository, and set the checkout directory to
20702 You will be warned about a non-empty folder; click OK to proceed.
20703 You should now have a
20714 \begin_layout Enumerate
20715 Create or open your document in LyX and click
20720 ile\SpecialChar \menuseparator
20726 \begin_inset space ~
20729 Control\SpecialChar \menuseparator
20737 Add a log message and click OK to commit the document to version control.
20740 \begin_layout Standard
20741 From this point onward, you should have full functionality in the
20746 ile\SpecialChar \menuseparator
20752 \begin_inset space ~
20758 You also have the option of checking the document in and out, viewing its
20760 using the TortoiseSVN context menu in Windows Explorer or the Subversion
20761 client program from a command prompt.
20764 \begin_layout Subsubsection
20765 SSH tunnel used with SVN under Windows
20768 \begin_layout Standard
20769 Compared with Linux setting up svn client to communicate over ssh under
20770 Windows is a rather troublesome task.
20771 We will at least offer some hints how to setup the client side but prior
20772 knowledge about ssh and the Windows command line is needed, also be prepared
20773 for a great deal of frustration\SpecialChar \ldots{}
20777 \begin_layout Enumerate
20778 Get a svn client for windows, as described in the previous sections.
20779 When it is a fresh install run some svn command (e.g.
20781 \begin_inset Flex Code
20784 \begin_layout Plain Layout
20790 ) to create config files, which you will need to change later on.
20793 \begin_layout Enumerate
20794 Choose a ssh client for Windows.
20795 There are several possibilities, we will use the one from Putty tools
20799 \begin_layout Plain Layout
20800 \begin_inset Flex URL
20803 \begin_layout Plain Layout
20805 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
20816 You will need to set the connection up so that the client doesn't ask for
20817 any password from you.
20818 To keep things easy we will use only keys without any additional password
20823 \begin_layout Enumerate
20825 \begin_inset Flex Code
20828 \begin_layout Plain Layout
20835 Save your private .ppk key file and put the public one on the server side.
20836 If the SVN server runs on Linux, note that the format of the public key
20837 is not compatible with Linux openssh and you will need to direcly copy-paste
20840 Public key for pasting into OpenSSH authorized_keys file
20842 :” edit field into the server's
20843 \begin_inset Flex Code
20846 \begin_layout Plain Layout
20847 ~/.ssh/authorized_keys
20853 \begin_inset Flex Code
20856 \begin_layout Plain Layout
20865 \begin_layout Enumerate
20867 \begin_inset Flex Code
20870 \begin_layout Plain Layout
20877 In the SVN config file
20881 \begin_layout Plain Layout
20882 Exact path depends on Windows version, usually somewhere around
20883 \begin_inset Flex Code
20886 \begin_layout Plain Layout
20889 Documents and Settings
20903 \begin_inset Flex Code
20906 \begin_layout Plain Layout
20921 , section [tunnels], setup ssh command, e.g.
20923 \begin_inset Flex Code
20926 \begin_layout Plain Layout
20927 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
20936 \begin_layout Plain Layout
20937 It will usually take a lot of time to get exact command right and it depends
20939 For example do not have some remote server saved as a default session in
20941 If things fail, try to connect via plink without SVN first.
20950 \begin_layout Enumerate
20951 Checkout the SVN archive, e.g.
20953 \begin_inset Flex Code
20956 \begin_layout Plain Layout
20957 svn co svn+ssh://user@server/repository_path
20965 \begin_layout Subsubsection
20966 End-of-Line Conversions
20969 \begin_layout Standard
20970 When the collsraborators are mixing Linux and Windows environments, LyX
20971 will use different line endings inside the .lyx files.
20972 This is not a problem as far as LyX functionality is concerned, but the
20973 commit diffs will be huge and merge-conflicts prone.
20974 Fortunately SVN itself knows
20978 \begin_layout Plain Layout
20979 \begin_inset Flex URL
20982 \begin_layout Plain Layout
20984 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
20994 how to deal with CR/LF problems when switching .lyx files to the
20995 \begin_inset Flex Code
20998 \begin_layout Plain Layout
21008 \begin_layout Plain Layout
21010 \begin_inset Flex Code
21013 \begin_layout Plain Layout
21014 svn propset svn:eol-style native FILE_NAME
21027 \begin_layout Subsection
21031 \begin_layout Standard
21032 With the recent addition of the vc-command function LyX power users are
21033 allowed to create their own commands for revision control.
21036 \begin_layout Standard
21037 As an example you can see how two TortoiseSVN commands could be integrated
21041 \begin_layout Description
21043 \begin_inset Flex Code
21046 \begin_layout Plain Layout
21047 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21055 \begin_layout Description
21057 \begin_inset Flex Code
21060 \begin_layout Plain Layout
21061 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21069 \begin_layout Subsection
21070 Version control and Document comparison
21073 \begin_layout Standard
21074 One of the typical uses of version control is to inspect the changes between
21075 revisions, usually by creating
21076 \begin_inset Flex Code
21079 \begin_layout Plain Layout
21086 While this is useful for plain text files, it is much less useful in the
21087 case of LyX files, which have more complicated structure.
21088 Hence we provide binding to the Document comparison feature.
21089 They are two ways of calling this feature - either by direct call of
21090 \begin_inset Flex Code
21093 \begin_layout Plain Layout
21099 LyX function (for details see LyX functions manual) or by icon/menu item
21101 \begin_inset Flex MenuItem
21104 \begin_layout Plain Layout
21105 Compare with older revision...
21111 One can either compare two chosen revisions of the document or he can simply
21112 compare the current version of edited text with older revisions (where
21114 \begin_inset Flex MenuItem
21117 \begin_layout Plain Layout
21123 ' revisions back means comparison of the edited file with last commited
21128 \begin_layout Standard
21129 This feature is supported for SVN and RCS though due to the more complicated
21130 versioning scheme of RCS there is a constraint -- when addressing the revisions
21131 in dialog, numbers always point to the last number in RCS revision number,
21136 \begin_layout Section
21137 Literate Programming
21140 \begin_layout Standard
21145 (kayvan@sylvan.com)
21149 original documentation written by
21151 Edmar Wienskoski Jr.
21154 (edmar-w-jr@technologist.com)
21157 \begin_layout Subsection
21161 \begin_layout Standard
21162 The main purpose of this documentation is to show you how to use LyX for
21163 literate programming, where it is assumed that you are familiar with this
21164 programming technique, and know what
21165 \begin_inset Quotes eld
21169 \begin_inset Quotes erd
21173 \begin_inset Quotes eld
21177 \begin_inset Quotes erd
21181 If that is not the case, please follow the web links provided in the following
21183 There is a lot of good documentation out there covering old development
21184 history to the latest tools tips.
21187 \begin_layout Standard
21188 It is also assumed that you are familiar with LyX itself to a point that
21189 you are comfortable changing your LyX preferences, and X resources file.
21190 If that is not the case please refer to other LyX documentation to cover
21191 your specific needs.
21194 \begin_layout Subsection
21195 Literate Programming
21198 \begin_layout Standard
21199 From the Literate Programming FAQ:
21202 \begin_layout Quotation
21203 Literate programming is the combination of documentation and source together
21204 in a fashion suited for reading by human beings.
21205 In fact, literate programs should be enjoyable reading, even inviting!
21206 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21207 and documentation in a single file.
21208 Literate programming tools then parse the file to produce either readable
21209 documentation or compilable source.
21210 The WEB style of literate programming was created by D.
21211 \begin_inset space \thinspace{}
21215 Knuth during the development of his TeX typesetting software.
21219 \begin_layout Standard
21220 Another excerpt says:
21223 \begin_layout Quotation
21226 How is literate programming different from verbose commenting?
21229 \begin_layout Quotation
21230 There are three distinguishing characteristics.
21231 In order of importance, they are:
21235 \begin_layout Itemize
21236 flexible order of elaboration
21239 \begin_layout Itemize
21240 automatic support for browsing
21243 \begin_layout Itemize
21244 typeset documentation, especially diagrams and mathematics
21248 \begin_layout Standard
21249 Now that I sparked your curiosity, take a look in the references.
21252 \begin_layout Subsubsection
21256 \begin_layout Standard
21257 The complete Literate Programming FAQ can be found at:
21260 \begin_layout Quote
21261 Literate Programming FAQ
21262 \begin_inset Flex URL
21265 \begin_layout Plain Layout
21267 http://www.literateprogramming.com/lpfaq.pdf
21275 \begin_layout Standard
21276 The FAQ lists 23 (twenty three!) different literate programming tools.
21277 Where some are specialized or
21278 \begin_inset Quotes eld
21282 \begin_inset Quotes erd
21285 for particular programming languages, while other have general scope.
21290 for my own use for several reasons:
21293 \begin_layout Itemize
21294 It can generate the documentation either in LaTeX or HTML.
21297 \begin_layout Itemize
21298 It has a open architecture, i.
21299 \begin_inset space \thinspace{}
21303 \begin_inset space \space{}
21306 it is easy to plug in new filters and to perform special processing that
21311 \begin_layout Itemize
21312 There is a good selection of filters available already (the HTML is one
21316 \begin_layout Itemize
21320 \begin_layout Standard
21321 The Noweb web page can be found at:
21324 \begin_layout Quote
21326 \begin_inset Flex URL
21329 \begin_layout Plain Layout
21331 http://www.cs.virginia.edu/~nr/noweb/
21339 \begin_layout Standard
21340 Starting from there you can reach many other interesting links and even
21341 some literate program examples.
21344 \begin_layout Subsection
21345 LyX and Literate Programming
21348 \begin_layout Standard
21349 The LyX support for Literate Programming is provided by using the generic
21350 LyX converters mechanism.
21351 This support is provided in a
21352 \begin_inset Quotes eld
21356 \begin_inset Quotes erd
21360 \begin_inset space \thinspace{}
21364 \begin_inset space \space{}
21367 you will be able to use this new LyX feature with some other literate programmin
21368 g tool of your choice by just changing your LyX preferences.
21371 \begin_layout Subsubsection
21372 Generating documents and code (weaving and tangling)
21375 \begin_layout Paragraph
21376 Selecting the document class
21379 \begin_layout Standard
21380 If you have installed Noweb and LyX successfully, whenever you open a new
21381 document or try to change the document class of an existing one, you will
21382 find that there are three new document classes available:
21385 \begin_layout Itemize
21389 \begin_layout Itemize
21393 \begin_layout Itemize
21397 \begin_layout Standard
21398 You must select one of them to create your literate documents from.
21402 \begin_layout Standard
21403 Note that literate documents are not limited to these three classes.
21404 New classes can be generated from other styles like letter or in combination
21405 with other class variations like Article (AMS).
21406 If you have special needs that cannot be covered by one of the existing
21407 classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21408 will arrange to insert a new entry, or teach you how to do it.
21412 \begin_layout Plain Layout
21413 It is very simple, it involves the creation of a file with four lines, and
21414 re-running of the auto configuration.
21419 Moreover, if you use a literate tool other than Noweb you may need to create
21420 a new set of document classes for it.
21423 \begin_layout Paragraph
21427 \begin_layout Standard
21428 LyX enables you to write code with a layout named
21436 \begin_layout Plain Layout
21437 The equivalent Noweb term is
21438 \begin_inset Quotes eld
21442 \begin_inset Quotes erd
21446 For historical reasons, I got used to the term
21447 \begin_inset Quotes eld
21451 \begin_inset Quotes erd
21454 introduced by other literate tool named Nuweb, which I used for many years
21455 before rendering myself to Noweb.
21460 Noweb delimits scraps like this:
21463 \begin_layout LyX-Code
21467 \begin_layout LyX-Code
21471 \begin_layout LyX-Code
21475 \begin_layout LyX-Code
21479 \begin_layout LyX-Code
21483 \begin_layout Standard
21484 The problem is that whatever is written in between the << and the
21488 must be taken literally, i.
21489 \begin_inset space \thinspace{}
21493 \begin_inset space \space{}
21496 LyX should be prevented from making any special interpretation of what has
21498 This is handled by a special layout named Scrap, that works like a normal
21499 paragraph but has a free spacing capability.
21502 \begin_layout Standard
21503 The down side of the Scrap paragraph layout is that consecutive paragraphs
21504 of code will be spaced with one empty line in the source code and also
21505 in the printed documentation.
21506 The work around is to enter each line of code within a single Scrap, with
21507 a newline (ctrl-return).
21508 The example above will look like this:
21512 \begin_layout Plain Layout
21513 If you have a printed version of this document you will not see any difference
21514 between the previous example and this one.
21522 \begin_layout LyX-Code
21524 \begin_inset Newline newline
21528 \begin_inset Newline newline
21532 \begin_inset Newline newline
21536 \begin_inset Newline newline
21542 \begin_layout Standard
21543 This layout works fine.
21544 The only real inconvenience is that you have to type ctrl-return instead
21549 \begin_layout Plain Layout
21550 It is in my list of
21551 \begin_inset Quotes eld
21555 \begin_inset Quotes erd
21566 \begin_layout Standard
21567 As a special note, you can also use the
21568 \begin_inset Quotes eld
21572 \begin_inset Quotes erd
21575 construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21579 \begin_layout LyX-Code
21581 \begin_inset Newline newline
21584 def some_function(args):
21585 \begin_inset Newline newline
21588 "This is the doc string for this function."
21589 \begin_inset Newline newline
21592 print "My args: ", args
21595 \begin_layout LyX-Code
21596 @ %def some_function
21599 \begin_layout Standard
21600 For an example of this usage and the resulting cross-reference output, look
21601 at the Literate python program in
21603 LIBDIR/examples/listerrors.lyx
21605 which should make this all clear.
21608 \begin_layout Paragraph
21609 Generating the documentation
21612 \begin_layout Standard
21613 At this point you already have a new document file with a proper document
21614 class, and with some code and text on it.
21615 How do I print it? The answer is simple, you select
21617 View\SpecialChar \menuseparator
21621 Just like you would do for a plain document.
21622 No special procedure is required.
21625 \begin_layout Standard
21626 To help orientate you, I will now explain what happens inside LyX:
21629 \begin_layout Enumerate
21632 Update\SpecialChar \menuseparator
21635 menu option is chosen, a LaTeX file is generated.
21640 \begin_layout Standard
21641 If the document is of any literate class the generated file will be named
21642 with an extension name defined by the
21643 \begin_inset Quotes eld
21647 \begin_inset Quotes erd
21650 format (defined in the Preferences panel), otherwise the file will have
21659 \begin_layout Enumerate
21660 Note that the only difference so far is in the name of the file, no special
21661 processing is required by LyX.
21662 Given that you formatted the code using the Scrap layout that, by itself,
21663 takes care of the business.
21666 \begin_layout Enumerate
21667 If the document is of any literate class LyX will then use the internal
21668 LyX to Noweb converter, followed by the Noweb to LaTeX converter
21672 \begin_layout Plain Layout
21673 The converters are defined in the
21675 Tools\SpecialChar \menuseparator
21679 \begin_inset Quotes eld
21683 \begin_inset Quotes erd
21695 manual for general information about converters.
21700 to generate the LaTeX file.
21704 \begin_layout Standard
21705 Otherwise it will just skip this step.
21709 \begin_layout Enumerate
21710 Finally, LaTeX is invoked and the regular post processing continues as in
21714 \begin_layout Standard
21715 Independence from a particular
21716 \begin_inset Quotes eld
21720 \begin_inset Quotes erd
21723 is easily achieved by changing the commands that are run by the various
21727 \begin_layout Paragraph
21728 Generating the code
21731 \begin_layout Standard
21732 When the build menu option is chosen or the corresponding button in the
21733 toolbar is pressed, a LaTeX file is generated just like step 1 above.
21734 Next, LyX invokes the
21739 This converter needs to be defined by the user and is not installed by
21740 default, though the Program format is.
21741 This converter (like any other converter) will have two parts:
21744 \begin_layout Enumerate
21745 The converter program itself.
21746 This program performs the conversion from the one format to the other (in
21747 this case, from the Noweb format to the Program pseudo-format).
21750 \begin_layout Enumerate
21751 The error log parser.
21752 This is a program whose sole purpose is to rewrite error messages in a
21753 format that LyX understands.
21754 This makes it possible for LyX to place error boxes in the right places
21755 in the file buffer.
21758 \begin_layout Standard
21759 The first part, the
21760 \begin_inset Quotes eld
21764 \begin_inset Quotes erd
21767 setting, should be set to
21768 \begin_inset Quotes eld
21776 \begin_inset Quotes erd
21780 This basically means that LyX will call
21781 \begin_inset Quotes eld
21785 \begin_inset Quotes erd
21788 (a program or script) with the name of the Noweb file (normally a file
21789 in the LyX temp directory).
21793 \begin_layout Standard
21794 This is an implementation of
21795 \begin_inset Quotes eld
21799 \begin_inset Quotes erd
21802 that you can place in a directory on your path:
21805 \begin_layout LyX-Code
21809 \begin_layout LyX-Code
21813 \begin_layout LyX-Code
21814 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
21817 \begin_layout Standard
21818 The next part of the converter setting is the
21819 \begin_inset Quotes eld
21823 \begin_inset Quotes erd
21826 which is to be set to
21827 \begin_inset Quotes eld
21832 parselog=listerrors
21835 \begin_inset Quotes erd
21839 This will run any errors that are generated by the
21840 \begin_inset Quotes eld
21844 \begin_inset Quotes erd
21847 process through the
21848 \begin_inset Quotes eld
21852 \begin_inset Quotes erd
21858 \begin_layout Standard
21859 The converter code looks in
21867 then on the path for the
21868 \begin_inset Quotes eld
21872 \begin_inset Quotes erd
21878 \begin_layout Standard
21879 The build will normally take place in LyX's temporary directory, so the
21880 files produced by the conversion will be in that directory.
21881 LyX will copy out what it regards as the `main' file, but the
21885 conversion may produce several files, and so most of these would then be
21886 deleted when LyX was closed.
21887 The present solution is to use a `copier',
21891 \begin_layout Plain Layout
21900 manual for information on these.
21909 script in its default mode, so that the entire contents of the temporary
21910 directory is copied.
21911 More will get copied than is needed, to be sure, but nothing will be lost.
21912 If, however, you know what extensions the generated files will have, this
21913 can be improved by using the
21922 This option takes a comma-separated list of extensions to copy.
21923 So, for example, if the conversion will generate only files with the extensions
21932 , then the correct definition would be:
21935 \begin_layout LyX-Code
21936 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
21939 \begin_layout Standard
21940 The result will be that only files with these two extensions will be copied
21944 \begin_layout Paragraph
21945 Build instructions in the document
21948 \begin_layout Standard
21949 The last piece of the integration between LyX and noweb is the
21950 \begin_inset Quotes eld
21954 \begin_inset Quotes erd
21958 Generally, the instructions for building your program should be embedded
21959 in a scrap of its own.
21961 \begin_inset Quotes eld
21965 \begin_inset Quotes erd
21968 above uses the notangle command to look for this scrap (called
21969 \begin_inset Quotes eld
21973 \begin_inset Quotes erd
21976 ) and runs its contents through
21977 \begin_inset Quotes eld
21981 \begin_inset Quotes erd
21987 \begin_layout Standard
21988 Typically, such a scrap would look something like this:
21991 \begin_layout LyX-Code
21993 \begin_inset Newline newline
21997 \begin_inset Newline newline
22001 \begin_inset Newline newline
22004 if [ -z "${NOWEB_SOURCE}" ]
22005 \begin_inset Newline newline
22009 \begin_inset Newline newline
22012 NOWEB_SOURCE=myfile.nw
22013 \begin_inset Newline newline
22017 \begin_inset Newline newline
22021 code to extract files ...]
22022 \begin_inset Newline newline
22026 code to compile files ...]
22027 \begin_inset Newline newline
22033 \begin_layout Standard
22036 LIBDIR/examples/listerrors.lyx
22040 LIBDIR/examples/Literate.lyx
22042 which implement two versions of the
22043 \begin_inset Quotes eld
22047 \begin_inset Quotes erd
22050 program for some illustrations of how all of these pieces go together or
22053 LIBDIR/examples/noweb2lyx.lyx.
22056 Interestingly, these three files show off the language-indepence of the
22057 LyX literate programming support since they are written in Python, C and
22061 \begin_layout Subsubsection
22065 \begin_layout Standard
22066 All the Literate Programming support is configured by the
22068 Tools\SpecialChar \menuseparator
22072 \begin_inset Quotes eld
22076 \begin_inset Quotes erd
22080 The important parts are:
22083 \begin_layout Description
22085 \begin_inset space ~
22089 \begin_inset Quotes eld
22093 \begin_inset Quotes erd
22097 \begin_inset space ~
22100 format Set up via the Formats tab, this is where the Noweb-specific pieces
22110 , the file extension is set to
22115 This tells LyX to create a file with a
22119 extension in the first step of the conversion process.
22122 \begin_layout Description
22124 \begin_inset space ~
22132 \begin_inset space ~
22135 format This is an empty format whose sole purpose is to be the endpoint
22136 of a conversion (which then allows us to set up a converter for it).
22139 \begin_layout Description
22148 This converter performs the
22149 \begin_inset Quotes eld
22153 \begin_inset Quotes erd
22156 of the literate document.
22157 For Noweb, it is set to
22158 \begin_inset Quotes eld
22163 noweave -delay -index $$i > $$o
22166 \begin_inset Quotes erd
22172 \begin_layout Description
22182 \begin_inset Quotes eld
22186 \begin_inset Quotes erd
22190 As stated above, the Converter is set to
22191 \begin_inset Quotes eld
22199 \begin_inset Quotes erd
22202 , with Flags set to
22203 \begin_inset Quotes eld
22208 originaldir,parselog=listerrors
22211 \begin_inset Quotes erd
22217 \begin_layout Subsubsection
22221 \begin_layout Standard
22222 There is also a new function implemented in the LyX server, the
22223 \begin_inset Quotes eld
22226 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22230 \begin_layout Standard
22231 When debugging code with ddd/gdb, it is possible to invoke a text editor
22232 at the current execution position with a single key stroke.
22233 The default ddd configuration for that is shift-ctrl-V.
22234 It happens that you can define the editor command line invocation in ddd
22237 Edit\SpecialChar \menuseparator
22238 Preferences\SpecialChar \menuseparator
22241 dialog and changing the "Edit Sources" entry.
22244 \begin_layout Standard
22245 I take advantage of the new created LyX server function and this ddd feature,
22247 \begin_inset Quotes eld
22251 \begin_inset Quotes erd
22257 \begin_layout LyX-Code
22258 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22261 \begin_layout Standard
22262 With this, whenever you are using ddd and find a point in the program that
22263 you want to edit, you just press shift-ctrl-V (in the ddd window), and
22264 ddd you forward this information to LyX through the LyX server and then
22265 the LyX window will show the same file with the cursor at the same position
22266 ddd was pointing to.
22267 No more guessing or long scrolling to locate a point in the program back
22271 \begin_layout Standard
22272 Note however that you must enable the LyX server to get this feature working
22273 (it is disabled by default).
22274 You can enable it in
22286 ) by entering in the
22291 \begin_inset Quotes eld
22296 /home/<your-home-directory>/.lyx/lyxpipe
22299 \begin_inset Quotes erd
22305 \begin_layout Standard
22306 Read the LyX server documentation in the
22308 Customization Manual
22310 for further information.
22313 \begin_layout Subsubsection
22317 \begin_layout Standard
22318 There are six new buttons that can be added to your LyX toolbar.
22319 Five of these buttons are short cuts to layout styles:
22340 The last one is a short cut to the
22341 \begin_inset Quotes eld
22345 \begin_inset Quotes erd
22352 \begin_layout Standard
22353 LyX has a range of buttons that are available for tool bar customization.
22354 In my toolbar I like to combine the six short cuts above with two more:
22359 \SpecialChar \menuseparator
22364 \SpecialChar \menuseparator
22371 View\SpecialChar \menuseparator
22375 Here is how it looks like:
22378 \begin_layout LyX-Code
22382 \begin_layout LyX-Code
22386 \begin_layout LyX-Code
22387 Icon "layout Standard"
22390 \begin_layout LyX-Code
22391 Icon "layout Section"
22394 \begin_layout LyX-Code
22395 Icon "layout LaTeX"
22398 \begin_layout LyX-Code
22399 Icon "layout LyX-Code"
22402 \begin_layout LyX-Code
22403 Icon "layout Scrap"
22406 \begin_layout LyX-Code
22410 \begin_layout LyX-Code
22414 \begin_layout LyX-Code
22415 Icon "buffer-typeset"
22418 \begin_layout LyX-Code
22419 Icon "build-program"
22422 \begin_layout LyX-Code
22426 \begin_layout LyX-Code
22430 \begin_layout LyX-Code
22434 \begin_layout LyX-Code
22438 \begin_layout LyX-Code
22442 \begin_layout Subsubsection
22443 Colors customization
22446 \begin_layout Standard
22447 There are a number of colors in LyX that can be customized in
22452 One of the things that bothers people is the LaTeX font color.
22453 The default color is red, since the scraps uses LaTeX font, and there is
22454 a lot of scraps in literate documents, you may get tired of seeing everything
22456 You can change it by going to the tabs
22465 \begin_layout Standard
22466 The next thing is the visible presence of the newline character in the screen.
22467 You can choose the color of this particular character and make it blend
22469 I recommend you choosing a color that is close to the background but not
22470 equal, that way you still can see it is there, but it is not bothering
22475 \begin_layout Chapter
22479 \begin_layout Standard
22480 You can do everything with LyX that you can do with LaTeX.
22481 However, LyX cannot support every LaTeX feature directly.
22482 But you can always use TeX Code.
22483 This chapter shows you some more special things you might want to use.
22484 For other special things you can do with figures, tables, floats, boxes
22485 and notes, have a look at the
22492 \begin_layout Section
22496 \begin_layout Standard
22497 The aim for this section is to show how the LaTeX package
22501 can be used in a LyX document.
22502 LyX does not support the
22506 package natively yet, so you have to use some TeX code.
22509 \begin_layout Standard
22514 package allows switching between one and multicolumn format on the same
22516 Footnotes are handled correctly, but will be placed at the bottom of the
22517 page and not under each column.
22518 Within the different columns you can use everyting, with the limitation
22519 that for floats you need to use the option
22526 \begin_layout Subsection
22530 \begin_layout Standard
22531 If you want to have two columns in your text, insert the comand
22534 \begin_layout Standard
22539 begin{multicols}{2}
22542 \begin_layout Standard
22543 at the point where you want the two column layout to start, and then
22546 \begin_layout Standard
22554 \begin_layout Standard
22555 where you want it to end.
22559 \begin_layout Standard
22563 \begin_layout Plain Layout
22567 begin{multicols}{2}
22575 \begin_layout Standard
22580 The Adventure of the Empty House
22583 \begin_inset Newline newline
22588 Sir Arthur Conan Doyle
22591 \begin_layout Standard
22594 It was in the spring of the year 1894 that all London was interested, and
22595 the fashionable world dismayed, by the murder of the Honourable Ronald
22596 Adair under most unusual and inexplicable circumstances.
22597 The public has already learned those particulars of the crime which came
22598 out in the police investigation, but a good deal was suppressed upon that
22599 occasion, since the case for the prosecution was so overwhelmingly strong
22600 that it was not necessary to bring forward all the facts.
22601 Only now, at the end of nearly ten years, am I allowed to supply those
22602 missing links which make up the whole of that remarkable chain.
22603 The crime was of interest in itself, but that interest was as nothing to
22604 me compared to the inconceivable sequel, which afforded me the greatest
22605 shock and surprise of any event in my adventurous life.
22606 Even now, after this long interval, I find myself thrilling as I think
22607 of it, and feeling once more that sudden flood of joy, amazement, and increduli
22608 ty which utterly submerged my mind.
22609 Let me say to that public, which has shown some interest in those glimpses
22610 which I have occasionally given them of the thoughts and actions of a very
22611 remarkable man, that they are not to blame me if I have not shared my knowledge
22612 with them, for I should have considered it my first duty to do so, had
22613 I not been barred by a positive prohibition from his own lips, which was
22614 only withdrawn upon the third of last month.
22617 \begin_layout Standard
22621 \begin_layout Plain Layout
22633 \begin_layout Subsection
22637 \begin_layout Standard
22638 The same pattern is used when you want more than two columns:
22641 \begin_layout Standard
22645 \begin_layout Plain Layout
22649 begin{multicols}{3}
22657 \begin_layout Standard
22660 It can be imagined that my close intimacy with Sherlock Holmes had interested
22661 me deeply in crime, and that after his disappearance I never failed to
22662 read with care the various problems which came before the public.
22663 And I even attempted, more than once, for my own private satisfaction,
22664 to employ his methods in their solution, though with indifferent success.
22665 There was none, however, which appealed to me like this tragedy of Ronald
22667 As I read the evidence at the inquest, which led up to a verdict of willful
22668 murder against some person or persons unknown, I realized more clearly
22669 than I had ever done the loss which the community had sustained by the
22670 death of Sherlock Holmes.
22671 There were points about this strange business which would, I was sure,
22672 have specially appealed to him, and the efforts of the police would have
22673 been supplemented, or more probably anticipated, by the trained observation
22674 and the alert mind of the first criminal agent in Europe.
22675 All day, as I drove upon my round, I turned over the case in my mind and
22676 found no explanation which appeared to me to be adequate.
22677 At the risk of telling a twice-told tale, I will recapitulate the facts
22678 as they were known to the public at the conclusion of the inquest.
22681 \begin_layout Standard
22685 \begin_layout Plain Layout
22697 \begin_layout Standard
22698 You can have more than 3 columns if you want to, but that might not be very
22699 pleasant for the eye.
22702 \begin_layout Subsection
22703 Columns inside columns
22706 \begin_layout Standard
22707 You can even have columns inside columns:
22710 \begin_layout Standard
22714 \begin_layout Plain Layout
22718 begin{multicols}{2}
22726 \begin_layout Standard
22729 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
22730 at that time governor of one of the Australian colonies.
22731 Adair's mother had returned from Australia to undergo the operation for
22732 cataract, and she, her son Ronald, and her daughter Hilda were living together
22736 \begin_layout Standard
22740 \begin_layout Plain Layout
22744 begin{multicols}{2}
22752 \begin_layout Standard
22755 The youth moved in the best society–had, so far as was known, no enemies
22756 and no particular vices.
22757 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
22758 had been broken off by mutual consent some months before, and there was
22759 no sign that it had left any very profound feeling behind it.
22760 For the rest {sic} the man's life moved in a narrow and conventional circle,
22761 for his habits were quiet and his nature unemotional.
22762 Yet it was upon this easy-going young aristocrat that death came, in most
22763 strange and unexpected form, between the hours of ten and eleven-twenty
22764 on the night of March 30, 1894.
22767 \begin_layout Standard
22771 \begin_layout Plain Layout
22783 \begin_layout Standard
22786 Ronald Adair was fond of cards–playing continually, but never for such stakes
22788 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
22789 It was shown that, after dinner on the day of his death, he had played
22790 a rubber of whist at the latter club.
22791 He had also played there in the afternoon.
22796 The evidence of those who had played with him– Mr.
22797 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
22798 and that there was a fairly equal fall of the cards.
22799 Adair might have lost five pounds, but not more.
22800 His fortune was a considerable one, and such a loss could not in any way
22802 He had played nearly every day at one club or other, but he was a cautious
22803 player, and usually rose a winner.
22804 It came out in evidence that, in partnership with Colonel Moran, he had
22805 actually won as much as four hundred and twenty pounds in a sitting, some
22806 weeks before, from Godfrey Milner and Lord Balmoral.
22807 So much for his recent history as it came out at the inquest.
22810 \begin_layout Standard
22814 \begin_layout Plain Layout
22826 \begin_layout Standard
22827 Please read the example file
22831 for more advanced examples including column and header spacing, vertical
22832 separator lines, and more.
22835 \begin_layout Section
22839 \begin_layout Standard
22844 \begin_layout Plain Layout
22850 tmpfont}{cmr17 scaled 2500}{
22862 \begin_layout Standard
22867 \begin_layout Plain Layout
22878 hose of you who like the style of old books probably also like
22879 \begin_inset Quotes eld
22883 \begin_inset Quotes erd
22886 —those large capital letters which begin each new chapter or section.
22887 Implementing them with plain LyX/LaTeX is straightforward (assuming you
22888 know some plain TeX!) but does require a lot of work and many iterations,
22889 as you can see by all the ugly TeX-mode stuff at the beginning of this
22893 \begin_layout Standard
22897 \begin_layout Plain Layout
22903 bigdrop{-1em}{3}{ptmri}{T}+
22908 here is a much easier way of doing this, of course.
22917 ) package from CTAN allows a simple way to add such letters to your documents.
22918 Since this package is not a standard part of TeXLive, I can't demonstrate
22919 it within this document, but if you copy this paragraph to a new document,
22921 \begin_inset Quotes eld
22931 \begin_inset Quotes erd
22934 and the pluses from the TeX code at the beginning of the paragraph, and
22939 usepackage{dropcaps}
22941 to your LaTeX preamble, you will get a nice Times Roman Italic
22942 \begin_inset Quotes eld
22946 \begin_inset Quotes erd
22949 , whose height is three lines of text and which protrudes 1 em into the
22951 (Make certain you have copied
22952 \begin_inset Quotes eld
22960 \begin_inset Quotes erd
22963 into a directory where TeX can see it.) The first argument is the amount
22964 of indentation; in this case the negative sign moves it into the margin.
22965 The second argument is the height of the letter in number of lines of text.
22966 The third argument is the font name: virtually anything which has a tfm
22967 file should work (wade through the
22969 .../texmf/fonts/tfm
22971 directory for possibilities).
22972 My personal favorite is
22973 \begin_inset Quotes eld
22981 \begin_inset Quotes erd
22984 , a fancy German font specifically designed for dropped capitals.
22985 The fourth argument is the letter (or letters) to be dropped.
22990 package also offers the
22996 command, as well as a slightly simplified
23005 \begin_layout Standard
23006 \begin_inset Newpage newpage
23012 \begin_layout Section
23013 Non-standard Paragraph Shapes
23016 \begin_layout Standard
23020 \begin_layout Plain Layout
23032 \begin_layout Standard
23036 \begin_layout Plain Layout
23045 \begin_layout Plain Layout
23059 \begin_layout Standard
23064 \begin_layout Plain Layout
23075 \begin_layout Plain Layout
23084 \begin_layout Plain Layout
23093 \begin_layout Plain Layout
23102 \begin_layout Plain Layout
23111 \begin_layout Plain Layout
23120 \begin_layout Plain Layout
23129 \begin_layout Plain Layout
23138 \begin_layout Plain Layout
23147 \begin_layout Plain Layout
23156 \begin_layout Plain Layout
23165 \begin_layout Plain Layout
23174 \begin_layout Plain Layout
23183 \begin_layout Plain Layout
23192 \begin_layout Plain Layout
23201 \begin_layout Plain Layout
23210 \begin_layout Plain Layout
23219 \begin_layout Plain Layout
23228 \begin_layout Plain Layout
23237 \begin_layout Plain Layout
23243 There are times when the tyranny of rectangular paragraphs must be overthrown.
23244 In such situations, a call to the delightful plain TeX command
23251 As you can see, completely arbitrary shapes can be laid out with a suitable
23252 set of linelength definitions.
23253 While this parshape may look a bit silly and useless, one could conceive
23254 of situations such as finely tuned dropped capitals, word wrapping around
23255 non-rectangular graphics, etc.
23256 which will benefit from such handcrafting.
23259 \begin_layout Standard
23260 \begin_inset VSpace bigskip
23266 \begin_layout Standard
23271 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23278 is the number of lines of text which define the paragraph.
23279 If there turn out to be fewer lines, the shape is truncated; if there are
23280 more, the excess lines have the same dimensions as the last line of the
23290 entries specify the indentation of the line from the left margin, and the
23291 length of the line as measured from that point.
23292 The shape applies only to the current paragraph; everything is reset to
23293 normal for the next paragraph.
23296 \begin_layout Standard
23300 \begin_layout Plain Layout