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,liststotoc,bibtotoc,idxtotoc,BCOR7.5mm,titlepage,tablecaptionabove
48 \use_default_options false
54 \maintain_unincluded_children false
57 InsetLayout CharStyle:MenuItem
66 \newcommand*{\menuitem}[1]{{\sffamily #1}}
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, pdfpagelabels"
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
148 \begin_layout Plain Layout
150 Principal maintainer of this file is
155 If you have comments or error corrections, please send them to the LyX
156 Documentation mailing list,
157 \begin_inset Flex Code
160 \begin_layout Plain Layout
162 <lyx-docs@lists.lyx.org>
175 \begin_layout Standard
176 \begin_inset CommandInset toc
177 LatexCommand tableofcontents
184 \begin_layout Chapter
188 \begin_layout Standard
189 This manual is essentially Part II of the
191 User's Guide\SpecialChar \@.
194 The reason for separating this document out is simple: the
198 is already quite lengthy, and it contains information on all of the basic
199 features one needs to know in order to prepare most documents.
200 However, the LyX Team has worked to make LyX extensible through various
201 configuration files and external packages.
202 That means that if you want to support the Fizzwizzle LaTeX package, you
203 can create a layout file (or module) for it without having to alter LyX
205 We've already had contributions of several new features this way, and some
206 of them are documented here.
207 There are also some more `advanced' features, such as how to control the
208 presentation of bibliographies and how to work with multi-part documents,
209 that are not covered in the
213 and are discussed here.
216 \begin_layout Standard
217 This manual also documents some special features, like fax support, version
218 control, and SGML support, which require additional software to work properly.
219 There is also a chapter on LyX's support for HTML.
220 And lastly, there's a chapter of LaTeX tools and tips, things you can use
221 to spruce up your documents by directly using the powerful features of
227 only WYSIWYM and will only ever interface to some, not all, LaTeX features.
230 \begin_layout Standard
231 If you haven't read the
235 yet, you are definitely in the wrong manual.
240 is the first place to go, since it describes the notation and format of
242 You should also be thoroughly familiar with the
246 and all of the basic features of LyX before attempting to read this one.
249 \begin_layout Standard
250 Since many of the topics in this manual depend heavily on LyX's interaction
251 with LaTeX, this first chapter covers the inner workings of LyX and how
252 to direct LyX to generate exactly the LaTeX code you want.
253 It is obviously for more seasoned LyX users.
256 \begin_layout Chapter
260 \begin_layout Section
264 \begin_layout Standard
265 This chapter is for both TeX-nicians and the LaTeX-curious.
266 In it, we'll explain how LyX and LaTeX work together to produce printable
268 This is the only place in any of the manuals where we assume you know something
272 \begin_layout Standard
273 At one time, LyX was called a
274 \begin_inset Quotes eld
277 WYSIWYM frontend to LaTeX,
278 \begin_inset Quotes erd
281 but that's no longer true.
282 There are frontends to LaTeX out there.
286 \begin_layout Plain Layout
287 Some familar ones are TeXmaker and kile, on Linux, and TeXshop, OSX.
288 There are also the LaTeX modes for vi and emacs, of course.
293 These are basically text editors with the ability to run LaTeX and mark
294 any errors in the file you're editing.
303 run LaTeX, and it also indicates errors in the file, it also does much,
305 For one thing, you don't need to know LaTeX to use LyX effectively.
306 And LyX has added its own extensions to LaTeX.
307 Try the following sometime: select
308 \begin_inset Flex MenuItem
311 \begin_layout Plain Layout
312 Export\SpecialChar \menuseparator
319 \begin_inset Flex MenuItem
322 \begin_layout Plain Layout
329 \begin_inset Flex MenuItem
332 \begin_layout Plain Layout
333 View\SpecialChar \menuseparator
339 ), then look at the preamble of the resulting
340 \begin_inset Flex Code
343 \begin_layout Plain Layout
350 You'll notice a variety of new macros defined specifically by LyX.
351 These macros are defined automatically, according to the features you use
355 \begin_layout Standard
356 There are several commands that automatically invoke LaTeX.
360 \begin_layout Itemize
361 \begin_inset Flex MenuItem
364 \begin_layout Plain Layout
365 View\SpecialChar \menuseparator
374 \begin_layout Itemize
375 \begin_inset Flex MenuItem
378 \begin_layout Plain Layout
379 View\SpecialChar \menuseparator
380 Update\SpecialChar \menuseparator
389 \begin_layout Itemize
390 \begin_inset Flex MenuItem
393 \begin_layout Plain Layout
394 File\SpecialChar \menuseparator
403 \begin_layout Itemize
404 \begin_inset Flex MenuItem
407 \begin_layout Plain Layout
408 File\SpecialChar \menuseparator
417 \begin_layout Standard
418 They will only invoke LaTeX if the file has changed since the last time
423 \begin_layout Standard
424 When LyX runs LaTeX on the file you're editing, it performs these steps:
427 \begin_layout Enumerate
428 Convert the document to LaTeX and save to a file with the extension
429 \begin_inset Flex Code
432 \begin_layout Plain Layout
439 \begin_inset Flex Code
442 \begin_layout Plain Layout
451 \begin_layout Enumerate
453 \begin_inset Flex Code
456 \begin_layout Plain Layout
462 file (maybe several times), and run any other commands (such as
463 \begin_inset Flex Code
466 \begin_layout Plain Layout
473 \begin_inset Flex Code
476 \begin_layout Plain Layout
482 ) needed to compile the LaTeX file.
485 \begin_layout Enumerate
486 If there are any errors, show the error log.
489 \begin_layout Standard
490 If you've run LaTeX using
491 \begin_inset Flex MenuItem
494 \begin_layout Plain Layout
497 \SpecialChar \menuseparator
505 , LyX then runs a DVI viewer to display the DVI-file.
507 \begin_inset Flex MenuItem
510 \begin_layout Plain Layout
513 \SpecialChar \menuseparator
521 , LyX performs further steps:
524 \begin_layout Itemize
526 \begin_inset Flex Code
529 \begin_layout Plain Layout
535 to convert the DVI file to PostScript.
538 \begin_layout Itemize
539 Run a PostScript viewer, such as
540 \begin_inset Flex Code
543 \begin_layout Plain Layout
549 , to display the PostScript file.
552 \begin_layout Standard
553 LyX does similar things when viewing, or exporting, other formats.
556 \begin_layout Section
557 Translating LaTeX files into LyX
560 \begin_layout Standard
561 You can import a LaTeX file into LyX by using the
562 \begin_inset Flex MenuItem
565 \begin_layout Plain Layout
566 File\SpecialChar \menuseparator
567 Import\SpecialChar \menuseparator
574 This will call a program named
575 \begin_inset Flex Code
578 \begin_layout Plain Layout
584 which will create a file
585 \begin_inset Flex Code
588 \begin_layout Plain Layout
595 \begin_inset Flex Code
598 \begin_layout Plain Layout
605 LyX will then open that file.
609 \begin_layout Plain Layout
610 \begin_inset Flex Code
613 \begin_layout Plain Layout
619 can also be run from the command line, of course.
627 \begin_layout Standard
628 \begin_inset Flex Code
631 \begin_layout Plain Layout
637 will translate most legal LaTeX, but not everything.
638 It will put things it doesn't understand into TeX code, so after translating
640 \begin_inset Flex Code
643 \begin_layout Plain Layout
649 , you can look for TeX code and hand-edit it until it looks right.
652 \begin_layout Standard
653 If you don't know what TeX code is, read the next section.
656 \begin_layout Section
657 \begin_inset CommandInset label
659 name "sec:Inserting-TeX-Code"
663 Inserting TeX Code into LyX Documents
666 \begin_layout Standard
667 Anything you can do in LaTeX you can do in LyX, for a very simple reason:
668 You can always insert TeX code into any LyX document.
669 LyX cannot, and will never be able to, display every possible LaTeX construct.
670 If ever you need to insert LaTeX commands into your LyX document, you can
672 \begin_inset Flex Code
675 \begin_layout Plain Layout
681 box, which you can insert into your document with
682 \begin_inset Flex MenuItem
685 \begin_layout Plain Layout
686 Insert\SpecialChar \menuseparator
695 \begin_layout Standard
696 Here's an example of inserting LaTeX commands in a LyX document.
697 The code looks like this:
700 \begin_layout LyX-Code
704 \begin_inset Newline newline
710 \begin_inset Newline newline
713 This is an example for a minipage environment.
715 \begin_inset Newline newline
718 can put nearly everything in it, even (non-floating)
719 \begin_inset Newline newline
724 \begin_inset Newline newline
730 \begin_inset Newline newline
734 \begin_inset Newline newline
740 \begin_inset Newline newline
746 \begin_inset Newline newline
752 \begin_inset Newline newline
757 \begin_inset Newline newline
763 \begin_inset Newline newline
769 \begin_inset Newline newline
775 \begin_inset Newline newline
783 \begin_layout LyX-Code
787 \begin_layout Standard
789 \begin_inset Flex Code
792 \begin_layout Plain Layout
798 box containing this text is directly after this paragraph.
799 Those of you reading the manual in LyX will only see the TeX code inset.
800 Those reading a printed version of the manuals will see the actual results:
803 \begin_layout Standard
807 \begin_layout Plain Layout
814 \begin_layout Plain Layout
821 \begin_layout Plain Layout
823 This is an example for a minipage environment.
824 You can put nearly everything in it, even (non-floating) figures and tables.
828 \begin_layout Plain Layout
835 \begin_layout Plain Layout
840 \begin_layout Plain Layout
847 \begin_layout Plain Layout
854 \begin_layout Plain Layout
861 \begin_layout Plain Layout
867 \begin_layout Plain Layout
874 \begin_layout Plain Layout
881 \begin_layout Plain Layout
888 \begin_layout Plain Layout
900 \begin_layout Standard
901 In addition to using TeX code, you can also create a separate file containing
902 some complex LaTeX structure and then use
903 \begin_inset Flex MenuItem
906 \begin_layout Plain Layout
907 Insert\SpecialChar \menuseparator
917 to include your file (you should select the type
918 \begin_inset Flex Code
921 \begin_layout Plain Layout
928 We recommend that you only do this if you have a
929 \begin_inset Flex Code
932 \begin_layout Plain Layout
943 Otherwise, you'll have a big job tracking down LaTeX errors.
946 \begin_layout Standard
947 There are a few last points to emphasize:
950 \begin_layout Itemize
955 check if your LaTeX code is correct.
958 \begin_layout Itemize
959 Beware reinventing the wheel.
962 \begin_layout Standard
963 On that last point, LyX does have quite a few features tucked into it, and
965 Be sure to check the manuals to make sure that LyX doesn't have such-and-such
966 feature before you decide you have to do it by hand.
967 Moreover, there are numerous LaTeX packages out there to do all sorts of
968 things, from labels to envelopes to fancy multipage tables.
970 \begin_inset CommandInset href
973 target "http://www.ctan.org/"
977 for details, and see chapter
978 \begin_inset CommandInset ref
980 reference "cha:secrets"
987 \begin_layout Standard
988 If you do need to do some wild and fancy things within your document, be
989 sure to check out a good LaTeX book for assistance.
990 There are a number of them listed in the bibliography of the
997 \begin_layout Section
998 LyX and the LaTeX Preamble
1001 \begin_layout Subsection
1002 About the LaTeX Preamble
1005 \begin_layout Standard
1006 If you already know LaTeX, there is no need to explain here what the preamble
1008 If you don't, the following will give you some ideas—we recommend again
1009 that you consult a LaTeX book for further information.
1010 In any case, you should read the points below, because they explain what
1011 you can do and what you don't need to do in the LaTeX preamble of a LyX
1015 \begin_layout Standard
1016 The LaTeX preamble comes at the very beginning of a document,
1024 \begin_layout Itemize
1025 Declare the document class.
1027 \begin_inset Newline newline
1030 LyX already does this for you.
1031 If you're a seasoned LaTeX-nician, and you have a custom document class
1032 you want to use, check out the
1034 Customization Manual
1036 for information on how to make LyX interface to it.
1039 \begin_layout Itemize
1040 Declare the usage of packages.
1042 \begin_inset Newline newline
1045 LaTeX packages provide special commands, which are only available within
1046 a document when the package has been declared in the preamble.
1047 For example, the package
1048 \begin_inset Flex Code
1051 \begin_layout Plain Layout
1057 forces all paragraphs to be indented.
1058 There are other packages for labels, envelopes, margins, etc.
1062 \begin_layout Itemize
1063 Set counters, variables, lengths and widths.
1065 \begin_inset Newline newline
1068 There are several LaTeX counters and variables which
1072 be set globally from within the preamble in order to have the desired effect.
1073 (There are variables which you can set and reset inside the document, too.)
1074 Margins are a good example of something which must be set in the preamble.
1075 Another example is the label format for lists.
1076 You can actually set these just about anywhere, but it's best to do it
1077 just once, inside the preamble.
1080 \begin_layout Itemize
1081 Declare user defined commands (with
1082 \begin_inset Flex Code
1085 \begin_layout Plain Layout
1094 \begin_inset Flex Code
1097 \begin_layout Plain Layout
1106 \begin_inset Newline newline
1109 These are abbreviations for LaTeX commands which appear very often inside
1111 Although the preamble is a good place to declare such commands, they
1115 be declared anywhere (before they are used for the first time, of course).
1116 This can be useful if there is a lot of raw LaTeX code in your document,
1117 which normally should not be the case.
1120 \begin_layout Standard
1121 LyX adds its own set of definitions to the preamble of the
1122 \begin_inset Flex Code
1125 \begin_layout Plain Layout
1132 This makes LaTeX files generated by LyX portable.
1135 \begin_layout Subsection
1136 Changing the Preamble
1139 \begin_layout Standard
1140 The commands which LyX adds to the preamble of a LaTeX file are fixed; you
1141 can't change them without patching LyX itself.
1142 You can, however, add your own stuff to the preamble by selecting
1143 \begin_inset Flex MenuItem
1146 \begin_layout Plain Layout
1148 \begin_inset space ~
1157 \begin_inset Flex MenuItem
1160 \begin_layout Plain Layout
1161 Document\SpecialChar \menuseparator
1168 LyX adds anything in the
1169 \begin_inset Flex MenuItem
1172 \begin_layout Plain Layout
1178 dialog to its own built-in preamble.
1179 Before adding your own declarations in the preamble, you should make sure
1180 that LyX doesn't already support what you want to do.
1181 (Remember what we said about reinventing the wheel?) Also,
1183 make sure your preamble code is correct
1186 LyX doesn't check it for you.
1187 If there is an error, you're likely to get an error like
1188 \begin_inset Quotes eld
1192 \begin_inset Flex Code
1195 \begin_layout Plain Layout
1204 \begin_inset Quotes erd
1208 If you see this error, check your preamble.
1211 \begin_layout Subsection
1215 \begin_layout Standard
1216 Here are some examples of what you can add to a preamble, and what they
1220 \begin_layout Subsubsection
1224 \begin_layout Standard
1225 There are two variables under LaTeX that control page position:
1226 \begin_inset Flex Code
1229 \begin_layout Plain Layout
1238 \begin_inset Flex Code
1241 \begin_layout Plain Layout
1250 Their names should be self-explanatory.
1251 These variables are useful if you think for a moment about computer labels.
1252 Sometimes, the size of a print medium and the area of the medium that you
1253 can actually print on aren't the same.
1255 \begin_inset Flex Code
1258 \begin_layout Plain Layout
1267 \begin_inset Flex Code
1270 \begin_layout Plain Layout
1281 \begin_layout Standard
1282 The default values for
1283 \begin_inset Flex Code
1286 \begin_layout Plain Layout
1295 \begin_inset Flex Code
1298 \begin_layout Plain Layout
1307 \begin_inset space \thinspace{}
1311 \begin_inset space \thinspace{}
1315 \begin_inset space \space{}
1318 the page isn't shifted.
1319 Unfortunately, some DVI drivers always seem to shift the page.
1320 We have no idea why, or why the sysadmin hasn't fixed such behavior.
1321 If you're using LyX on a system that you don't personally maintain, and
1322 your sysadmin is a doofus,
1323 \begin_inset Flex Code
1326 \begin_layout Plain Layout
1335 \begin_inset Flex Code
1338 \begin_layout Plain Layout
1347 Suppose your left and top margins are always 0.5
1348 \begin_inset space \thinspace{}
1352 You can add this to the preamble:
1355 \begin_layout LyX-Code
1363 \begin_layout LyX-Code
1371 \begin_layout Standard
1372 and your margins should now be correct.
1375 \begin_layout Subsubsection
1379 \begin_layout Standard
1380 Speaking of labels, suppose you wanted to print out a bunch of address labels.
1381 There's a rather nice package, available at your nearest CTAN archive,
1382 for printing sheets of labels:
1383 \begin_inset Flex Code
1386 \begin_layout Plain Layout
1393 Now, your system may not have this package installed by default.
1394 We leave that up to you to check.
1395 You'll also want to read the documentation for it; we're not going to do
1397 Since this is an example, however, we'll give you an example of how you
1401 \begin_layout Standard
1402 First, make sure you're using the
1403 \begin_inset Flex Code
1406 \begin_layout Plain Layout
1413 Next, you need to put the following in your preamble:
1416 \begin_layout LyX-Code
1422 \begin_layout LyX-Code
1428 \begin_layout LyX-Code
1434 \begin_layout LyX-Code
1440 \begin_layout LyX-Code
1446 \begin_layout LyX-Code
1452 \begin_layout LyX-Code
1458 \begin_layout Standard
1459 This sets things up for Avery label sheets, stock #5360.
1460 You're now ready to print labels, but you'll need to insert LaTeX code,
1461 placing the commands
1462 \begin_inset Flex Code
1465 \begin_layout Plain Layout
1474 \begin_inset Flex Code
1477 \begin_layout Plain Layout
1485 around each label text.
1486 This and other special features of
1487 \begin_inset Flex Code
1490 \begin_layout Plain Layout
1496 are explained in its documentation.
1499 \begin_layout Standard
1500 Someday, someone may write a LyX layout file to support this package directly.
1501 Maybe that someone is you.
1504 \begin_layout Subsubsection
1505 Example #3: Paragraph Indentation
1508 \begin_layout Standard
1509 Americans are trained to indent the first line of
1514 As with all of their other weird quirks, most Americans will whine and
1515 moan until they can have their way and indent the first line of all paragraphs.
1524 \begin_layout Standard
1525 Of course, this behavior isn't standard typography.
1526 In books, you typically only indent the first line of a paragraph
1530 it follows another one.
1531 The idea behind indenting the first line of a paragraph is to distinguish
1532 neighboring paragraphs from one another.
1533 If there is no previous paragraph—for example, if it follows a figure or
1534 is the first paragraph in a section—then there is no need for indentation.
1538 \begin_layout Standard
1539 If you're a typical American (we're still joking!), though, you don't care
1540 about such esoteric things; you want your indentation! Add this to the
1544 \begin_layout LyX-Code
1547 usepackage{indentfirst}
1550 \begin_layout Standard
1551 If your TeX distribution isn't braindead, you'll have this package, and
1552 all of your paragraphs will get the indentation the Founding Fathers intended
1556 \begin_layout Subsubsection
1557 Example #4: This Document
1560 \begin_layout Standard
1561 You can also check out the preamble of this document to get an idea of some
1562 of the advanced things you can do.
1563 Also, there are more examples and an assortment of LaTeX
1564 \begin_inset Quotes eld
1568 \begin_inset Quotes erd
1572 \begin_inset space ~
1576 \begin_inset CommandInset ref
1578 reference "cha:secrets"
1586 \begin_layout Section
1587 LyX and LaTeX Errors
1590 \begin_layout Standard
1591 When LyX calls LaTeX, it tells LaTeX to blithely ignore any errors and keep
1593 It then uses the logfile from the LaTeX run to do a post-mortem.
1594 After analyzing the logfile,LyX displays a dialog listing the errors.
1595 Clicking on any one of them will take you to the position in your LyX file
1596 where the error occurred.
1600 \begin_layout Plain Layout
1602 Analyzing the logfile is a tough job, and LyX doesn't always go to the
1604 There are also cases where LaTeX reports the error on one line, but the
1605 actual error is earlier.
1606 This is not unlike forgetting a closing brace in a program: You'll get
1607 an error, but only later.
1615 \begin_layout Standard
1616 Some folks also like to look at the log file directly: It is available from
1618 \begin_inset Flex MenuItem
1621 \begin_layout Plain Layout
1624 \SpecialChar \menuseparator
1628 \begin_inset space ~
1637 There are some fairly common error messages and warnings.
1638 We'll cover those here.
1639 You should look at a good LaTeX book for a complete listing.
1642 \begin_layout Itemize
1643 \begin_inset Flex Code
1646 \begin_layout Plain Layout
1653 \begin_inset Newline newline
1656 Anything beginning with these words is a warning message for the purpose
1658 \begin_inset Quotes eld
1662 \begin_inset Quotes erd
1665 the LaTeX code itself.
1666 You'll get messages like this if you added or changed cross-references
1667 or bibliography entries, in which case, LaTeX is trying to tell you that
1668 you need to make another run.
1669 You can by-and-large ignore these.
1672 \begin_layout Itemize
1673 \begin_inset Flex Code
1676 \begin_layout Plain Layout
1683 \begin_inset Newline newline
1686 Another warning message, this time about fonts which LaTeX couldn't find.
1687 The rest of the message will often say something about a replacement font
1689 You can safely ignore these, too.
1692 \begin_layout Itemize
1693 \begin_inset Flex Code
1696 \begin_layout Plain Layout
1705 \begin_inset Newline newline
1713 They are warnings about lines that were too long and run past the right
1715 Almost always, this is unnoticeable in the final output.
1716 (It can be just a point or two.) Or, only one or two characters extend past
1718 LaTeX seems to generate at least one of these messages for just about any
1720 \begin_inset Newline newline
1723 You can ignore these messages.
1724 Your eyes will tell you if there's a problem with something that's too
1725 wide; just look at the output.
1729 \begin_layout Plain Layout
1730 You can also enable the `draft' option in
1731 \begin_inset Flex MenuItem
1734 \begin_layout Plain Layout
1737 \SpecialChar \menuseparator
1745 , and then LaTeX will draw a black box in the margin of lines that are overfull.
1753 \begin_layout Itemize
1754 \begin_inset Flex Code
1757 \begin_layout Plain Layout
1766 \begin_inset Newline newline
1769 Not quite as common as its cousin.
1770 LaTeX seems to like to print lines that are a bit too wide as opposed to
1771 ones that are a bit too narrow.
1772 We have no idea why.
1775 \begin_layout Itemize
1776 \begin_inset Flex Code
1779 \begin_layout Plain Layout
1788 \begin_inset Flex Code
1791 \begin_layout Plain Layout
1800 \begin_inset Newline newline
1803 Warnings about troubles breaking the page.
1804 Once again, just look at the output.
1805 Your eyes will tell you where something has gone wrong.
1808 \begin_layout Itemize
1809 \begin_inset Flex Code
1812 \begin_layout Plain Layout
1814 \begin_inset Quotes els
1818 \begin_inset Quotes ers
1827 \begin_inset Newline newline
1831 \begin_inset Quotes eld
1835 \begin_inset Quotes erd
1838 isn't installed on this system.
1839 This usually appears because some package your document needs isn't installed.
1840 If you didn't touch the preamble or didn't use the
1841 \begin_inset Flex Code
1844 \begin_layout Plain Layout
1852 command, then one of the packages LyX tried to load is missing.
1854 \begin_inset Flex MenuItem
1857 \begin_layout Plain Layout
1858 Help\SpecialChar \menuseparator
1864 to get a list of packages that LyX knows about.
1865 This file is updated whenever you reconfigure LyX (using
1866 \begin_inset Flex MenuItem
1869 \begin_layout Plain Layout
1870 Tools\SpecialChar \menuseparator
1876 ) and tells you which packages have been detected and what they do.
1877 \begin_inset Newline newline
1881 \begin_inset Flex Code
1884 \begin_layout Plain Layout
1892 command and the package in question isn't installed, then you'll need to
1893 install it yourself.
1896 \begin_layout Itemize
1897 \begin_inset Flex Code
1900 \begin_layout Plain Layout
1901 LaTeX Error: Unknown option
1907 \begin_inset Newline newline
1910 Error messages beginning with this are trying to tell you that you specified
1911 a bad or undefined option to a package.
1912 Check the package's documentation.
1915 \begin_layout Itemize
1916 \begin_inset Flex Code
1919 \begin_layout Plain Layout
1920 Undefined control sequence
1926 \begin_inset Newline newline
1929 If you've inserted LaTeX code into your document, but made a typo, you'll
1931 You may have forgotten to load a package.
1932 In any case, this error message usually means that you used an undefined
1937 \begin_layout Standard
1938 There are other error and warning messages.
1939 Some are self-explanatory.
1940 These are usually LaTeX messages.
1941 Others are downright cryptic.
1942 These are usually TeX error messages, and we really have
1946 what they mean or how to decipher them.
1950 \begin_layout Standard
1951 There's a general sequence you should follow if you get error messages:
1954 \begin_layout Enumerate
1955 Look at the LaTeX code you inserted for typos.
1958 \begin_layout Enumerate
1959 If there are no typos, check that you used the command(s) correctly.
1962 \begin_layout Enumerate
1963 If you get a bunch of error boxes piled up at the very top of the document—and
1964 especially if you see a
1965 \begin_inset Quotes eld
1969 \begin_inset Flex Code
1972 \begin_layout Plain Layout
1981 \begin_inset Quotes erd
1984 error—it means that there are errors in the preamble.
1985 Start debugging your preamble.
1988 \begin_layout Enumerate
1989 If you didn't add anything to the preamble and didn't add any LaTeX code
1990 to the document, the first suspect is your LaTeX distribution itself.
1991 Check for missing packages and install them.
1994 \begin_layout Enumerate
1995 Okay, so there are no missing packages.
1996 Did you use any of the fine-tuning options in LyX? Specifically, did you
2001 any of them, like trying to manually insert lots of
2002 \begin_inset Flex Code
2005 \begin_layout Plain Layout
2007 \begin_inset space ~
2016 \begin_inset Flex Code
2019 \begin_layout Plain Layout
2026 \begin_inset Flex Code
2029 \begin_layout Plain Layout
2035 ? Did you try to kludge something together with these instead of using the
2036 appropriate paragraph environment?
2039 \begin_layout Enumerate
2040 All right, you didn't use any of the fine-tuning options, you played by
2042 Did you try to pull a fancy maneuver? Did you do something funky inside
2043 a table or an equation, like inserting a graphic into a table cell?
2046 \begin_layout Enumerate
2047 Do you have long sections of text where LaTeX cannot find a place to break
2048 a line? By default, LaTeX is rather strict about how much extra inter-word
2049 spacing it will add in order to break a line.
2050 Preferably, you should rework the paragraph to avoid the problem.
2051 If this isn't an option, you can wrap your text in
2052 \begin_inset Flex Code
2055 \begin_layout Plain Layout
2063 to make LaTeX's line breaking more, well, sloppy.
2066 \begin_layout Enumerate
2067 Did you go overboard with the nesting? LyX (currently) doesn't check to
2068 make sure you're in the limits for nesting environments.
2069 If you nested a bunch of environments to the
2070 \begin_inset Formula $17^{\mathrm{th}}$
2073 level, that's the problem.
2074 (The limit in LaTeX is five.)
2077 \begin_layout Enumerate
2078 Okay, you didn't get any error messages, but your output looks awful.
2079 If you have a table or figure that's too wide or long for the page, you
2084 \begin_layout Enumerate
2085 rescale the figure so it fits.
2088 \begin_layout Enumerate
2089 trim down the table so it fits.
2093 \begin_layout Enumerate
2094 If something else is wrong with the output, and you didn't try to pull anything
2095 fancy or kludge the fine-tuning options, we're not sure what's wrong.
2098 \begin_layout Standard
2099 If all this doesn't help—well, then
2103 you might have found a bug in LyX\SpecialChar \ldots{}
2107 \begin_layout Chapter
2111 \begin_layout Section
2112 Customizing Bibliographies with BibTeX
2115 \begin_layout Standard
2116 The most basic information about how to use BibTeX with LyX is contained
2119 Bibliography databases (BibTeX)
2126 The following subsections explain special bibliography features supported
2130 \begin_layout Subsection
2131 Alternative Citation Styles
2134 \begin_layout Standard
2135 Standard BibTeX uses numbers (e.
2136 \begin_inset space \thinspace{}
2140 \begin_inset space \space{}
2144 \begin_inset Quotes eld
2148 \begin_inset Quotes erd
2151 ) to refer to a cited work.
2152 However, in many scientific disciplines, other citation styles are in use.
2153 The most common one is the author-year style (e.
2154 \begin_inset space \thinspace{}
2158 \begin_inset space \space{}
2162 \begin_inset Quotes eld
2166 \begin_inset Quotes erd
2170 LyX supports two packages that provide this style,
2171 \begin_inset Flex Code
2174 \begin_layout Plain Layout
2181 \begin_inset Flex Code
2184 \begin_layout Plain Layout
2191 Both packages have their pros and cons, which cannot be listed in detail.
2192 If you only want to have simple author-year (or author-numerical) style,
2193 or if you want to use one of the countless style files for
2194 \begin_inset Flex Code
2197 \begin_layout Plain Layout
2203 , than the established
2204 \begin_inset Flex Code
2207 \begin_layout Plain Layout
2213 package is probably your choice.
2214 If you need special features like short title references, ibidem etc., you
2216 \begin_inset Flex Code
2219 \begin_layout Plain Layout
2228 \begin_layout Standard
2229 The handling of both packages in LyX is basically the same.
2231 \begin_inset Flex MenuItem
2234 \begin_layout Plain Layout
2235 Document\SpecialChar \menuseparator
2242 \begin_inset Flex MenuItem
2245 \begin_layout Plain Layout
2252 \begin_inset Flex MenuItem
2255 \begin_layout Plain Layout
2262 \begin_inset Flex MenuItem
2265 \begin_layout Plain Layout
2272 With both packages, you will get some extra features in the citation dialog
2273 and you can select the style of the reference (
2274 \begin_inset Quotes eld
2278 \begin_inset Quotes erd
2282 \begin_inset Quotes eld
2286 \begin_inset Quotes erd
2290 \begin_inset Quotes eld
2294 \begin_inset Quotes erd
2298 \begin_inset Quotes eld
2302 \begin_inset Quotes erd
2306 Note that both packages need specifically designed style files.
2307 They both ship their own, but there are lots of additional style files,
2308 and there is even an interactive style file builder
2312 \begin_layout Plain Layout
2314 \begin_inset Flex URL
2317 \begin_layout Plain Layout
2319 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/custom-bib/
2330 \begin_inset Flex Code
2333 \begin_layout Plain Layout
2342 \begin_layout Subsection
2343 Sectioned Bibliographies
2346 \begin_layout Standard
2347 Sometimes you might need to divide your bibliography into several sections.
2348 If you are for instance a historian, the possibility to separate sources
2349 and scientific works is most likely a
2350 \begin_inset Quotes eld
2354 \begin_inset Quotes erd
2358 Unfortunately, BibTeX itself does not allow you to do this.
2359 But with the help of some LaTeX packages, BibTeX can be extended to fit
2363 \begin_layout Standard
2364 LyX provides native support for one of these packages,
2372 \begin_layout Plain Layout
2374 \begin_inset Flex URL
2377 \begin_layout Plain Layout
2379 ftp://ctan.tug.org/tex-archive/macros/latex/contrib/bibtopic/
2389 The advantage of this package (compared to other packages like
2393 ) is that you don't need to define new citation commands.
2394 Instead, you need to prepare different bibliographic databases which include
2395 the entries for the different sections of the bibliography.
2396 For example: If you want to divide your bibliography into the sections
2398 \begin_inset Quotes eld
2402 \begin_inset Quotes erd
2406 \begin_inset Quotes eld
2410 \begin_inset Quotes erd
2413 , you first need to create two bibliographic databases, e.
2414 \begin_inset space \thinspace{}
2418 \begin_inset space \space{}
2422 \begin_inset Flex Code
2425 \begin_layout Plain Layout
2432 \begin_inset Flex Code
2435 \begin_layout Plain Layout
2445 \begin_layout Standard
2447 \begin_inset Flex MenuItem
2450 \begin_layout Plain Layout
2451 Document\SpecialChar \menuseparator
2458 \begin_inset Flex MenuItem
2461 \begin_layout Plain Layout
2468 \begin_inset Flex MenuItem
2471 \begin_layout Plain Layout
2472 Sectioned bibliography
2478 Now you can insert multiple BibTeX bibliographies, one for each section
2479 of your bibliography.
2480 Returning to our example: Insert the BibTeX bibliography
2481 \begin_inset Flex Code
2484 \begin_layout Plain Layout
2490 and a second one for the database
2491 \begin_inset Flex Code
2494 \begin_layout Plain Layout
2501 You are free to use the same or different styles for each section.
2502 Additionally, you can chose if the bibliography section should contain
2504 \begin_inset Quotes eld
2507 all cited references
2508 \begin_inset Quotes erd
2511 of the specified database(s) (which is the default),
2512 \begin_inset Quotes eld
2515 all uncited references
2516 \begin_inset Quotes erd
2520 \begin_inset Quotes eld
2524 \begin_inset Quotes erd
2528 This might be useful if you would like to separate your bibliography into
2530 \begin_inset Quotes eld
2534 \begin_inset Quotes erd
2538 \begin_inset Quotes eld
2542 \begin_inset Quotes erd
2546 \begin_inset Quotes eld
2550 \begin_inset Quotes erd
2554 The titles for the sections can be added as ordinary sections or subsections.
2556 \begin_inset Flex Code
2559 \begin_layout Plain Layout
2565 removes the bibliography title, you have manually re-add that, too (as
2566 a chapter* or section*, for instance).
2569 \begin_layout Subsection
2570 Multiple Bibliographies
2573 \begin_layout Standard
2574 Multiple bibliographies, e.
2575 \begin_inset space \thinspace{}
2579 \begin_inset space \space{}
2582 a bibliography for each section or chapter of the document, are not supported
2585 \begin_inset Flex Code
2588 \begin_layout Plain Layout
2594 package, which is used for the creation of sectioned bibliographies in
2595 LyX (see the previous section), provides an easy way to solve this task,
2596 if you are willing to use some
2597 \begin_inset Flex MenuItem
2600 \begin_layout Plain Layout
2607 \begin_inset space ~
2611 \begin_inset CommandInset ref
2613 reference "sec:Inserting-TeX-Code"
2621 \begin_layout Plain Layout
2622 An alternative approach is to use the
2623 \begin_inset Flex Code
2626 \begin_layout Plain Layout
2633 \begin_inset Flex Code
2636 \begin_layout Plain Layout
2642 package, respectively.
2650 \begin_layout Standard
2652 \begin_inset Flex MenuItem
2655 \begin_layout Plain Layout
2656 Document\SpecialChar \menuseparator
2663 \begin_inset Flex MenuItem
2666 \begin_layout Plain Layout
2673 \begin_inset Flex MenuItem
2676 \begin_layout Plain Layout
2677 Sectioned bibliography
2683 In the document, you have to enclose the sections, which shall contain
2684 their own bibliography (including the BibTeX bibliography itself), between
2686 \begin_inset Flex Code
2689 \begin_layout Plain Layout
2698 \begin_inset Flex Code
2701 \begin_layout Plain Layout
2709 (those commands have to be inserted as TeX code).
2710 The bibliography will contain all references which have been cited in the
2712 \begin_inset Flex Code
2715 \begin_layout Plain Layout
2726 If you are using this approach, then every citation reference has to be
2728 \begin_inset Flex Code
2731 \begin_layout Plain Layout
2739 \begin_inset Flex Code
2742 \begin_layout Plain Layout
2751 \begin_layout Section
2755 \begin_layout Subsection
2759 \begin_layout Standard
2760 When you are working on a large file with many sections, it is often convenient
2761 to break up the document into several files, or perhaps you have something
2762 where a table may change from time to time, but the preceding text does
2764 In these cases, you should seriously consider using multipart documents.
2765 For example, scientific papers often have five major sections: the introduction
2766 , observations, results, discussion, and conclusion.
2767 Each of these could be its own separate LyX file, with one
2768 \begin_inset Quotes eld
2772 \begin_inset Quotes erd
2775 file which contains the title, authors, abstract, references, etc., plus
2776 the five included files.
2777 It is important to note that each of these files is a full LyX file which
2778 can be formatted and printed on its own, as well as included in a master
2780 Each of these files must have the same document class, however—don't attempt
2781 to mix book classes with article classes.
2782 You may also include LaTeX files; however, these files must not have their
2784 \begin_inset space \thinspace{}
2788 \begin_inset space \space{}
2791 everything up to and including the
2792 \begin_inset Flex Code
2795 \begin_layout Plain Layout
2804 \begin_inset Flex Code
2807 \begin_layout Plain Layout
2815 line must be deleted) or else errors will be generated when you try to
2819 \begin_layout Standard
2820 LyX allows you to include files quite easily with
2821 \begin_inset Flex MenuItem
2824 \begin_layout Plain Layout
2825 Insert\SpecialChar \menuseparator
2827 \begin_inset space ~
2836 When you click on this selection a small box is inserted into the file
2837 at the current cursor location.
2838 Clicking on the box raises a dialog which allows you to select the file
2839 to be included, and the method of its inclusion.
2843 \begin_layout Standard
2844 The file selection box should by now be obvious.
2845 The three inclusion methods are
2846 \begin_inset Quotes eld
2850 \begin_inset Quotes erd
2854 \begin_inset Quotes eld
2858 \begin_inset Quotes erd
2862 \begin_inset Quotes eld
2866 \begin_inset Quotes erd
2870 The difference between
2871 \begin_inset Quotes eld
2875 \begin_inset Quotes erd
2879 \begin_inset Quotes eld
2883 \begin_inset Quotes erd
2886 is really only meaningful to LaTeXperts, but the practical difference is
2887 that files which are
2888 \begin_inset Quotes eld
2892 \begin_inset Quotes erd
2895 are typeset beginning on a new page, while files which are
2896 \begin_inset Quotes eld
2900 \begin_inset Quotes erd
2903 are typeset starting on the current page.
2906 \begin_layout Standard
2907 Generally, the master file is converted into a full LaTeX file before typesettin
2908 g, while the included files are converted to LaTeX files which do not have
2909 all the preamble information.
2912 \begin_layout Standard
2914 \begin_inset Quotes eld
2918 \begin_inset Quotes erd
2921 included file allows you to include a file typeset exactly as it appears
2923 \begin_inset space \thinspace{}
2927 \begin_inset space \space{}
2931 \begin_inset Flex Code
2934 \begin_layout Plain Layout
2940 mode, with the characters set in a fixed-width typewriter font.
2941 Normally, spaces in this file are invisible, though two consecutive spaces
2942 are conserved, unlike LyX's normal treatment of spaces.
2943 However, setting the
2944 \begin_inset Flex MenuItem
2947 \begin_layout Plain Layout
2949 \begin_inset space ~
2953 \begin_inset space ~
2957 \begin_inset space ~
2965 checkbox typesets a mark to unambiguously define the presence of a space.
2969 \begin_layout Subsection
2970 Cross-References Between Files
2973 \begin_layout Standard
2974 \begin_inset Box Shadowbox
2984 height_special "totalheight"
2987 \begin_layout Plain Layout
2988 This section is somewhat out of date.
2989 Need to describe default master documents and how children are opened when
2999 \begin_layout Standard
3000 It is possible to set up cross-references between the different files.
3001 First, open all the files in question: let's call them A and B in a two
3002 file example, where B is included in A.
3003 Let's say you insert a label in A, then want to reference it in B.
3004 Open the cross-reference dialog in whilst in document B, and you can select
3006 \begin_inset Quotes eld
3010 \begin_inset Quotes erd
3016 \begin_layout Subsection
3017 Bibliography Lists in all Subdocuments
3020 \begin_layout Standard
3021 \begin_inset Box Frameless
3031 height_special "totalheight"
3034 \begin_layout Plain Layout
3035 This section also needs updating.
3036 There is now material about this on the wiki, and it could be copied here.
3044 \begin_layout Standard
3045 Copy the bibliography list with all entries to all subdocuments and transform
3047 This way LyX will find the
3048 \begin_inset Flex Code
3051 \begin_layout Plain Layout
3057 -files and you can easily insert references without making the bibliography
3061 \begin_layout Standard
3062 As the bibliography list is in a comment, LaTeX won't use use it and the
3063 references will look like this: [?], instead of like this: [1].
3064 One solution is to use the LaTeX-package
3065 \begin_inset Flex Code
3068 \begin_layout Plain Layout
3074 that will only include comments by processing the files separately.
3075 To do this, add in the LaTeX preamble of every subdocument the following:
3078 \begin_layout LyX-Code
3084 \begin_layout LyX-Code
3087 includecomment{comment}
3090 \begin_layout Standard
3092 \begin_inset Flex URL
3095 \begin_layout Plain Layout
3097 http://wiki.lyx.org/FAQ/Unsorted#toc31
3105 \begin_layout Section
3109 \begin_layout Standard
3110 Users sometimes need to be able to
3111 \begin_inset Quotes eld
3115 \begin_inset Quotes erd
3118 a LyX file together with all the images (and other files) on which it depends,
3119 either for sending to a publisher or for sharing with a co-author.
3120 LyX 2.0 includes a Python script (
3121 \begin_inset Flex Code
3124 \begin_layout Plain Layout
3130 ) that automates this process.
3131 To use it, you must have either the
3132 \begin_inset Flex Code
3135 \begin_layout Plain Layout
3142 \begin_inset Flex Code
3145 \begin_layout Plain Layout
3151 python modules installed on your system.
3152 By default, the script prefers the
3153 \begin_inset Flex Code
3156 \begin_layout Plain Layout
3163 \begin_inset Flex Code
3166 \begin_layout Plain Layout
3172 format on Unix-like systems and the
3173 \begin_inset Flex Code
3176 \begin_layout Plain Layout
3185 \begin_layout Standard
3186 LyX's configuration process will set the script up to export a `LyX Archive',
3187 and this format will then be available under
3188 \begin_inset Flex Code
3191 \begin_layout Plain Layout
3192 File\SpecialChar \menuseparator
3201 \begin_layout Standard
3202 Independently of the platform, the generation of a particular archive format
3203 can be forced by adding either the
3204 \begin_inset Flex Code
3207 \begin_layout Plain Layout
3214 \begin_inset Flex Code
3217 \begin_layout Plain Layout
3224 \begin_inset Flex Code
3227 \begin_layout Plain Layout
3234 \begin_inset Flex Code
3237 \begin_layout Plain Layout
3243 format) switch to the
3244 \begin_inset Flex Code
3247 \begin_layout Plain Layout
3248 LyX\SpecialChar \menuseparator
3255 \begin_inset Flex Code
3258 \begin_layout Plain Layout
3259 Tools\SpecialChar \menuseparator
3260 Preferences\SpecialChar \menuseparator
3261 File Handling\SpecialChar \menuseparator
3268 (Make sure you add the switch after the script name, not before it.)
3271 \begin_layout Section
3272 Fancy Headers and Footers
3275 \begin_layout Standard
3276 The default page layout is rather plain; for an
3277 \begin_inset Flex Code
3280 \begin_layout Plain Layout
3286 document class, all you get is a centered page number at the bottom of
3288 This document uses KOMA-script's book class, so it appears to be a bit
3290 But to really put on a show, you need to set the document page style to
3292 \begin_inset Quotes eld
3296 \begin_inset Quotes erd
3299 , as mentioned in the
3304 This section describes the LaTeX code you need to insert in your LaTeX
3305 preamble in order to get the desired effects.
3308 \begin_layout Standard
3309 For more information on fancy headers, see the
3310 \begin_inset Flex Code
3313 \begin_layout Plain Layout
3319 package documentation.
3321 \begin_inset Flex URL
3324 \begin_layout Plain Layout
3326 http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
3334 \begin_layout Standard
3335 The page header is divided into three fields, not surprisingly labeled
3336 \begin_inset Quotes eld
3340 \begin_inset Quotes erd
3344 \begin_inset Quotes eld
3348 \begin_inset Quotes erd
3352 \begin_inset Quotes eld
3356 \begin_inset Quotes erd
3360 The footer is also divided into these three fields.
3361 The LaTeX commands to set these fields in the simplest manner are
3362 \begin_inset Flex Code
3365 \begin_layout Plain Layout
3374 \begin_inset Flex Code
3377 \begin_layout Plain Layout
3386 \begin_inset Flex Code
3389 \begin_layout Plain Layout
3398 \begin_inset Flex Code
3401 \begin_layout Plain Layout
3410 Suppose you wish to put your name in the upper left hand corner of each
3412 Simply insert the following command in the preamble:
3415 \begin_layout Standard
3424 \begin_layout Standard
3425 You will now see your name in the upper left.
3426 If a field has a default entry that you would like to get rid of (often
3427 the page number appears in the central footer, simply include a command
3428 with a blank argument, e.
3429 \begin_inset space \thinspace{}
3435 \begin_layout Standard
3443 \begin_layout Standard
3444 Let's get really fancy: lets put the section number with the word
3445 \begin_inset Quotes eld
3449 \begin_inset Quotes erd
3453 \begin_inset space \thinspace{}
3457 \begin_inset space \space{}
3460 Section 3) in the upper left, the page number (e.
3461 \begin_inset space \thinspace{}
3465 \begin_inset space \space{}
3468 Page 4) in the upper right, your name in the lower left, and the date in
3470 The following commands should now appear in the preamble:
3473 \begin_layout Standard
3483 \begin_layout Standard
3491 \begin_layout Standard
3501 \begin_layout Standard
3510 \begin_layout Standard
3518 \begin_layout Standard
3528 \begin_layout Standard
3530 \begin_inset Flex Code
3533 \begin_layout Plain Layout
3542 \begin_inset Flex Code
3545 \begin_layout Plain Layout
3553 access LaTeX's section and page counters, and so print out the current
3554 section and page numbers.
3556 \begin_inset Flex Code
3559 \begin_layout Plain Layout
3567 simply prints out today's date.
3570 \begin_layout Standard
3571 The thicknesses of the horizontal rules drawn beneath the header and above
3572 the footer can also be modified.
3573 If you don't want one of the rules, set its thickness to 0.
3574 The header rule has a default thickness of 0.4pt, the footer rule is 0pt.
3580 \begin_inset Flex Code
3583 \begin_layout Plain Layout
3588 headrulewidth}{0.4pt}
3594 \begin_inset Flex Code
3597 \begin_layout Plain Layout
3602 footrulewidth}{0.4pt}
3607 to set the thicknesses.
3610 \begin_layout Standard
3611 You can switch the header/footer settings on and off for individual pages
3613 \begin_inset Flex Code
3616 \begin_layout Plain Layout
3619 thispagestyle{empty}
3625 \begin_inset Flex Code
3628 \begin_layout Plain Layout
3631 thispagestyle{plain}
3637 \begin_inset Flex Code
3640 \begin_layout Plain Layout
3643 thispagestyle{fancy}
3649 Simply insert them in the text on the page you want changed and mark them
3651 In fact, title pages are marked as plain by default, while following pages
3652 are marked fancy when using the global fancy setting.
3655 \begin_layout Standard
3656 As a final example, it is possible to include an image in the header or
3658 Suppose you want to put a company logo in the upper lefthand corner.
3659 You might try something like
3662 \begin_layout Standard
3671 includegraphics{logo.eps}}}
3674 \begin_layout Standard
3676 (you may need to preface this with
3677 \begin_inset Flex Code
3680 \begin_layout Plain Layout
3684 usepackage{graphics}
3689 if you don't include graphics elsewhere in your document).
3692 \begin_layout Section
3693 Itemize Bullet Selection
3694 \begin_inset CommandInset label
3703 \begin_layout Standard
3709 \begin_layout Subsection
3713 \begin_layout Standard
3714 LyX provides 216 bullet shapes that can be accessed from a simple dialog.
3715 Using this dialog you can easily specify what bullet shape to use at each
3716 level of an itemized list.
3717 These settings are document-wide so you won't be able to specify different
3718 sets of bullets for different paragraphs.
3722 \begin_layout Plain Layout
3723 Well, actually you can but you'll have to do it by hand.
3731 \begin_layout Subsection
3735 \begin_layout Standard
3736 Open the dialog by selecting the
3737 \begin_inset Flex MenuItem
3740 \begin_layout Plain Layout
3741 Document\SpecialChar \menuseparator
3747 menu item and then select the
3748 \begin_inset Flex MenuItem
3751 \begin_layout Plain Layout
3760 \begin_layout Standard
3761 The dialog provides you with a table of bullet shapes.
3762 A column of buttons on the left of the table provides access to the six
3763 different panels of bullet shapes.
3764 The row of buttons across the top is used to select which bullet depth
3766 A text entry under the table shows the currently selected bullet shape's
3767 LaTeX equivalent and this can be edited if desired.
3768 If you do modify the text you will also need to specify any needed packages
3769 in the LaTeX preamble.
3772 \begin_layout Standard
3773 The six panels are divided up by the packages they require.
3774 The following table shows the mappings from button name to LaTeX packages.
3777 \begin_layout Standard
3779 \begin_inset Tabular
3780 <lyxtabular version="3" rows="7" columns="2">
3781 <features tabularvalignment="middle">
3782 <column alignment="center" valignment="top" width="0pt">
3783 <column alignment="center" valignment="top" width="0pt">
3785 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
3788 \begin_layout Plain Layout
3803 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
3806 \begin_layout Plain Layout
3823 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3826 \begin_layout Plain Layout
3841 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3844 \begin_layout Plain Layout
3860 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3863 \begin_layout Plain Layout
3878 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3881 \begin_layout Plain Layout
3898 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3901 \begin_layout Plain Layout
3916 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3919 \begin_layout Plain Layout
3936 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3939 \begin_layout Plain Layout
3954 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3957 \begin_layout Plain Layout
3974 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
3977 \begin_layout Plain Layout
3992 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
3995 \begin_layout Plain Layout
4012 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4015 \begin_layout Plain Layout
4030 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4033 \begin_layout Plain Layout
4056 \begin_layout Standard
4057 LyX doesn't stop you using bullets from packages you don't have.
4058 If you get errors from LaTeX when you try to view or print the file, then
4059 it is likely you are missing a package.
4063 \begin_layout Plain Layout
4064 LyX doesn't restrict your use since you may be editing locally and exporting
4073 \begin_layout Subsection
4077 \begin_layout Standard
4078 Select which bullet depth you want to change then select the bullet shape
4080 Any changes will not be visible in LyX, but are visible when viewing the
4084 \begin_layout Standard
4085 You can reset a bullet shape to the default simply by clicking your right
4086 mouse button on the appropriate bullet depth button.
4090 \begin_layout Plain Layout
4095 want to have multiple sets of paragraphs with different sets of bullets
4096 in each, then you're going to have to get your hands dirty with TeX code.
4097 The bullet selection dialog can help though because it provides you with
4098 the LaTeX code for a wide range of bullet shapes.
4099 To make your own custom paragraphs you have the following options:
4102 \begin_layout Plain Layout
4106 \begin_layout Plain Layout
4122 \begin_layout Plain Layout
4126 \begin_layout Plain Layout
4148 \begin_layout Itemize
4149 Use the LaTeX command
4150 \begin_inset Flex Code
4153 \begin_layout Plain Layout
4161 to specify a new bullet shape for a given depth.
4162 You'll also need to save the current bullet shape so you can restore it
4164 In this itemized list the following LaTeX code was used to change the bullet
4165 used for the first depth.
4169 \begin_layout LyX-Code
4179 \begin_layout LyX-Code
4196 \begin_layout Itemize
4197 Note that the itemize depth is specified in Roman numerals as part of the
4207 \begin_layout Itemize
4211 \begin_layout Plain Layout
4224 Specify each individual entry by starting each item with the bullet shape
4225 enclosed in square brackets and set as
4226 \begin_inset Flex MenuItem
4229 \begin_layout Plain Layout
4236 For example, this item was started with
4237 \begin_inset Flex Code
4240 \begin_layout Plain Layout
4255 \begin_layout Plain Layout
4259 \begin_layout Plain Layout
4275 \begin_layout Plain Layout
4276 You'll also need to revert the labelitem back to its previous setting for
4277 the global bullet shape settings to remain in effect.
4278 The way used here was:
4281 \begin_layout LyX-Code
4296 \begin_layout Chapter
4297 LyX and the World Wide Web
4300 \begin_layout Standard
4301 LyX has long supported the export of documents to various web-friendly formats,
4303 Before verson 2.0, however, HTML export was always accomplished by the use
4304 of external converters.
4308 \begin_layout Plain Layout
4309 For details on the use of external converters with LyX, see the
4313 section of the Customization manual.
4318 These fall into two large groups: there are converters that use LaTeX as
4319 an intermediate format, such as
4320 \begin_inset Flex Code
4323 \begin_layout Plain Layout
4330 \begin_inset Flex Code
4333 \begin_layout Plain Layout
4340 \begin_inset Flex Code
4343 \begin_layout Plain Layout
4349 , relying upon LyX to produce the LaTeX; and there is a converter that works
4350 directly on LyX files,
4351 \begin_inset Flex Code
4354 \begin_layout Plain Layout
4361 All of these have different advantages and disadvantages.
4365 \begin_layout Standard
4366 The LaTeX-based converters have the advantage that, in principle, they know
4367 everything about the exported document that LaTeX does.
4368 Such converters do not care, for example, if a certain block of code was
4369 produced by LyX or was Evil Red Text.
4370 These converters know about
4371 \begin_inset Flex Code
4374 \begin_layout Plain Layout
4380 files, counters, and references, and can often make use of the
4381 \begin_inset Flex Code
4384 \begin_layout Plain Layout
4390 files generated by BibTeX.
4391 On the other hand, LaTeX is a very hard language to parse---it is sometimes
4392 said that only TeX itself understands TeX---and LaTeX-based converters
4393 will often choke on what seem to be quite simple constructs; complex ones
4394 can throw them completely, and as of this writing, for example, the
4398 manual will not export with
4399 \begin_inset Flex Code
4402 \begin_layout Plain Layout
4408 , though the others will.
4409 The other issue concerns how math is handled.
4410 These converters typically convert the formulae into little pictures that
4411 are then linked from the HTML document.
4412 Since these are actually generated by LaTeX, they are accurate.
4413 But they do not scale well, and just getting them to look as if they are
4414 actually meant to be in your document---so that the font sizes seem to
4415 be roughly the same---can be a challenge.
4418 \begin_layout Standard
4420 \begin_inset Flex Code
4423 \begin_layout Plain Layout
4430 \begin_inset CommandInset href
4432 name "http://elyxer.nongnu.org/"
4433 target "http://elyxer.nongnu.org/"
4437 ) solves some of these problems.
4438 In particular, the formulae it produces scale perfectly, since it renders
4439 math using a combination of HTML and CSS rather than converting the formulae
4441 But even moderately complex formula are rendered less well than with
4442 \begin_inset Flex Code
4445 \begin_layout Plain Layout
4451 ; this reflects the limitations of HTML.
4455 \begin_layout Plain Layout
4457 \begin_inset Flex Code
4460 \begin_layout Plain Layout
4466 can also use jsMath and MathJax for equations, but this setting is only
4467 available globally and requires one to have access to a server that runs
4473 More importantly (as of version 1.1.1, at least),
4474 \begin_inset Flex Code
4477 \begin_layout Plain Layout
4483 has limited support for math macros and no support for user-defined paragraph
4484 or character styles.
4485 These limitations make
4486 \begin_inset Flex Code
4489 \begin_layout Plain Layout
4495 unsuitable for many of the documents LyX users produce.
4496 In principle, of course, these problems could be solved, but the LyX developers
4497 have decided to follow a different path and have made LyX itself capable
4498 of writing XHTML, just as it is capable of writing LaTeX, DocBook, and
4502 \begin_layout Standard
4503 As of this writing, XHTML output remains under development and should probably
4505 \begin_inset Quotes eld
4509 \begin_inset Quotes erd
4516 \begin_layout Plain Layout
4518 \begin_inset Flex Code
4521 \begin_layout Plain Layout
4522 development/HTML.notes
4527 , which can be found in the LyX source tree or
4528 \begin_inset CommandInset href
4530 name "accessed online"
4531 target "http://www.lyx.org/trac/browser/lyx-devel/trunk/development/HTML/HTML.notes"
4535 , usually contains up-to-date information about the state of XHTML output.
4536 See also the list of XHTML bugs on
4537 \begin_inset CommandInset href
4539 name "the bug tracker"
4540 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"
4549 Still, the developers have chosen this approach because it has several
4550 potential advantages over the other two.
4553 \begin_layout Standard
4554 These advantages are primarily due to the fact that the XHTML output routines,
4555 since they are part of LyX, know everything LyX knows about the document
4560 \begin_layout Plain Layout
4561 Another advantage is that, since these routines are internal to LyX, they
4562 are immune to changes in LyX's file format, or to changes in the semantics
4568 So they know about the table of contents (as displayed in the outline),
4569 about the counters associated with different paragraph styles, and about
4570 user-defined styles.
4571 The XHTML output routines know what LyX knows about internationalization,
4572 too, so they will output
4573 \begin_inset Quotes eld
4577 \begin_inset Quotes erd
4581 \begin_inset Quotes eld
4589 \begin_inset Quotes erd
4592 , depending upon the language in effect at the time.
4596 \begin_layout Standard
4597 Quite generally, the output routines know what LyX knows about document
4598 layout, that is, about how the document is to be rendered on screen.
4599 We use this information when we output the document as XHTML.
4604 generates CSS style information corresponding to the layout information
4605 it uses to render the document on screen: if section headings are supposed
4606 to be sans-serif and bold as seen in LyX, then (by default) they will be
4607 sans-serif and bold when viewed in a web browser, too.
4608 And this is true not just for pre-defined styles, like Section, but for
4609 any style, including user-defined styles.
4610 Indeed, the XHTML output routines make no distinction between user-defined
4611 paragraph and character styles and LyX's own pre-defined styles: in each
4612 case, everything LyX knows about the styles is contained in the layout
4614 And much the same is true as regards pre-defined textual insets, such as
4615 footnotes, and various custom insets.
4619 \begin_layout Standard
4620 The result is that XHTML output can be customized and extended in exactly
4621 the same way LaTeX output can be customized and extended: through layout
4623 See chapter five of the
4627 manual for the details.
4630 \begin_layout Standard
4631 The remainder of this chapter contains more detailed information on XHTML
4632 output, its limitations, and ways to work around those limitations.
4635 \begin_layout Section
4636 Math Output in XHTML
4639 \begin_layout Standard
4640 LyX offers four choices for how math is rendered.
4641 These have various advantages and disadvantages:
4644 \begin_layout Itemize
4646 \begin_inset Newline newline
4649 MathML is a dialect of XML designed specifically for mathematics on the
4650 web, and it typically renders very well in browsers that support it.
4651 The disadvantage is that not all browsers support MathML, and support is
4652 not complete even in the Gecko-based browsers, such as Firefox.
4653 \begin_inset Newline newline
4656 If LyX is unable to render a formula as MathML---for example, if the formula
4658 \begin_inset Flex Code
4661 \begin_layout Plain Layout
4667 package or ERT---then it will instead output the formula as an image.
4671 \begin_layout Itemize
4673 \begin_inset Newline newline
4677 \begin_inset Flex Code
4680 \begin_layout Plain Layout
4686 outputs math as HTML, styled by CSS.
4690 \begin_layout Plain Layout
4691 LyX has borrowed some of the CSS for its HTML output from
4692 \begin_inset Flex Code
4695 \begin_layout Plain Layout
4706 For simple formulae, this can work quite well, though with more complicated
4707 formulae it tends to break down.
4708 Still, this method has the advantage that it is very widely supported and
4709 so it may be appropriate for documents that contain only a little, fairly
4711 \begin_inset Newline newline
4714 If Lyx is unable to render a formula as HTML---for example, if the formula
4716 \begin_inset Flex Code
4719 \begin_layout Plain Layout
4725 package or ERT---then it will instead output the formula as an image.
4729 \begin_layout Itemize
4731 \begin_inset Newline newline
4735 \begin_inset Flex Code
4738 \begin_layout Plain Layout
4744 , LyX will output formulae as images, the very same images, in fact, that
4745 are used for instant preview.
4749 \begin_layout Plain Layout
4750 Instant preview does
4754 have to be on for images to be output, however.
4759 The advantage to this method is that the images are simply generated by
4760 LaTeX, so they are very accurate.
4761 The disadvantage, as mentioned earlier, is that these are bitmapped images,
4762 so they do not scale terribly well, and one cannot copy them, etc.
4763 (As of this writing, there are also problems about equation numbering.
4765 \begin_inset CommandInset href
4768 target "http://www.lyx.org/trac/ticket/6894"
4773 \begin_inset Newline newline
4776 The size of the images can be controlled by setting the
4777 \begin_inset Quotes eld
4781 \begin_inset Quotes erd
4785 \begin_inset Flex MenuItem
4788 \begin_layout Plain Layout
4789 Document\SpecialChar \menuseparator
4790 Settings\SpecialChar \menuseparator
4800 \begin_layout Plain Layout
4801 For those who want to know, this controls the resolution of the image in
4802 dots per inch and is based upon a default of 75 dpi.
4808 \begin_inset Newline newline
4811 If LyX for some reason fails to create an image for a formula (e.g., if a
4812 required LaTeX package is not installed), then it will fall back to outputing
4816 \begin_layout Itemize
4818 \begin_inset Newline newline
4821 Finally, LyX will happily output math as LaTeX.
4822 As well as being the output of last resort, this method can be used with
4824 \begin_inset CommandInset href
4827 target "http://www.math.union.edu/~dpvc/jsMath/"
4831 , which uses JavaScript to render LaTeX embedded in HTML documents.
4832 LyX wraps the LaTeX in either a
4833 \begin_inset Flex Code
4836 \begin_layout Plain Layout
4842 (for inline formulas) or
4843 \begin_inset Flex Code
4846 \begin_layout Plain Layout
4852 (for displayed formulas) with
4853 \begin_inset Flex Code
4856 \begin_layout Plain Layout
4862 , as is required for jsMath.
4865 \begin_layout Standard
4866 One of these output methods must be selected under
4867 \begin_inset Flex MenuItem
4870 \begin_layout Plain Layout
4871 Document\SpecialChar \menuseparator
4872 Settings\SpecialChar \menuseparator
4879 By default, LyX outputs MathML.
4880 This is a document-wide setting, therefore.
4883 \begin_layout Standard
4884 Eventually, LyX will offer the user the option to select an alternate output
4885 method for a particular inset, say, one that isn't being rendered very
4890 \begin_layout Plain Layout
4891 That said, since LyX falls back to images if the inset contains ERT, then
4892 one can force output as an image by putting some harmless ERT into the
4894 \begin_inset Formula $a=b\relax$
4905 \begin_layout Section
4906 Bibliography and Citations
4909 \begin_layout Standard
4910 XHTML output fully supports bibliographies and citations.
4914 \begin_layout Standard
4915 Citation labels are generated by the same machinery that generates LyX's
4916 on-screen labels, so the labels will look in the output much as they do
4917 in LyX, though better.
4918 If you are using numerical citations, then LyX will output numerical labels,
4919 such as [1] or [17], rather than simply showing the citation key in square
4920 brackets, as it does on-screen.
4921 If you are using author-year citations, then LyX will add lowercase letters
4922 to the years, just as BibTeX does, if it finds more than one citation for
4923 a given author-year combination.
4924 The labels will be printed with the bibliography entries.
4925 Note that there is, at present, no way to customize the appearance of the
4926 labels, for example, to choose between square brackets and parentheses.
4929 \begin_layout Standard
4930 Bibliography output is handled by the same machinery that handles the presentati
4931 on of reference information in the citation dialog, so you will see in the
4932 XHTML output pretty much what you would see if you were to look at a given
4933 entry in the citation dialog.
4934 The formatting can be customized in your layout file or, preferably, in
4940 manual for the details.
4943 \begin_layout Standard
4944 The main defect at present is that cross-referenced information is printed
4945 with every entry with which it is associated.
4946 So you can see things like this:
4951 \begin_inset Quotes eld
4954 Context and Logical Form
4955 \begin_inset Quotes erd
4960 Language in Context: Selected Essays
4962 (Oxford: Oxford University Press, 2007), pp.
4968 \begin_inset Quotes eld
4971 Semantics in Context
4972 \begin_inset Quotes erd
4977 Language in Context: Selected Essays
4979 (Oxford: Oxford University Press, 2007), pp.
4983 \begin_layout Standard
4984 This should be fixed before long.
4987 \begin_layout Standard
4988 There is no support at present for sectioned bibliographies.
4989 If you have multiple bibliographies, then LyX will print the same bibliography
4993 \begin_layout Section
4997 \begin_layout Standard
4998 LyX will happily export indexes as XHTML, but with certain limitations at
5002 \begin_layout Standard
5003 Index export will be most reliable when you do not attempt to use the fancy
5004 constructs that are described in the section on indexes in the
5012 \begin_layout Plain Layout
5013 The main issue here is that LyX itself does not really handle these.
5014 It just lets you enter what you would have to enter in raw LaTeX.
5019 We'll describe how they are handled using the subsection headings from
5023 \begin_layout Itemize
5024 Grouping Index Entries (aka, sub-entries): LyX makes an effort to support
5025 these, but the entries must be separated by
5026 \begin_inset Quotes eld
5030 \begin_inset Quotes erd
5033 , that is, there must be spaces around the exclamation point.
5034 This is because it is otherwise too difficult to check for escaped exclamation
5035 points, ones in math, and so forth.
5038 \begin_layout Itemize
5039 Page Ranges: There is no support at all for page ranges, since these make
5040 no sense with XHMTL.
5041 Instead, you will just get two index entries, one at either end.
5044 \begin_layout Itemize
5045 Cross-referencing: There is no support for cross-referencing.
5046 If LyX finds an entry containing the
5047 \begin_inset Quotes eld
5050 |see\SpecialChar \ldots{}
5052 \begin_inset Quotes erd
5055 construct, it is just dropped, and the rest is treated as an ordinary index
5059 \begin_layout Itemize
5060 Index Entry Order: LyX does support attempts to fix the sorting order.
5061 It will take what is before the first `@' it finds and use that for sorting,
5062 taking what follows the first `@' to be the actual entry.
5063 At present, LyX does not check for escaped `@', so do not try to index
5067 \begin_layout Itemize
5068 Index Entry Layout: You can format entries by using the text style dialog,
5069 or by using any other method available within LyX itself.
5070 There is no support for constructs like:
5071 \begin_inset Quotes eld
5075 \begin_inset Quotes erd
5079 Indeed, if LyX finds a pipe symbol, `|', in an entry, it will delete it
5080 and everything that follows it.
5083 \begin_layout Itemize
5084 Multiple Indexes: There is no support for multiple indexes.
5085 Rather, all index entries will be printed as one large index.
5086 To avoid our printing several versions of the index, we print only the
5087 main index, so make sure you have one.
5090 \begin_layout Section
5091 Nomenclature and Glossary
5094 \begin_layout Standard
5095 There is at present no support for glossaries.
5096 Adding it would be fairly trivial, and welcome.
5099 \begin_layout Chapter
5103 \begin_layout Section
5107 \begin_layout Standard
5108 The `LyX server' allows other programs to talk to LyX, invoke LyX commands,
5109 and retrieve information about the LyX internal state.
5110 This is only intended for advanced users, but they should find it useful.
5111 It is by writing to the LyX server, for example, that bibliography managers,
5112 such as JabRef, are able to
5113 \begin_inset Quotes eld
5117 \begin_inset Quotes erd
5123 \begin_layout Section
5124 Starting the LyX Server
5127 \begin_layout Standard
5128 The LyX server works through the use of a pair of named pipes.
5129 These are usually located in
5130 \begin_inset Flex Code
5133 \begin_layout Plain Layout
5139 , (except on Windows, where
5143 named pipes are special objects located in
5144 \begin_inset Flex Code
5147 \begin_layout Plain Layout
5159 ) and have the names
5160 \begin_inset Quotes eld
5164 \begin_inset Flex Code
5167 \begin_layout Plain Layout
5174 \begin_inset Quotes erd
5178 \begin_inset Quotes eld
5182 \begin_inset Flex Code
5185 \begin_layout Plain Layout
5192 \begin_inset Quotes erd
5196 External programs write into
5197 \begin_inset Flex Code
5200 \begin_layout Plain Layout
5206 and read back data from
5207 \begin_inset Flex Code
5210 \begin_layout Plain Layout
5217 The stem of the pipe names can be defined in the
5218 \begin_inset Flex MenuItem
5221 \begin_layout Plain Layout
5222 Tools\SpecialChar \menuseparator
5229 \begin_inset Flex Code
5232 \begin_layout Plain Layout
5233 "/home/myhome/lyxpipe"
5239 \begin_inset Flex Code
5242 \begin_layout Plain Layout
5256 on Windows (but any working path can be used).
5261 configure this manually in order for the server to start.
5264 \begin_layout Standard
5266 \begin_inset Flex Code
5269 \begin_layout Plain Layout
5276 \begin_inset Flex Code
5279 \begin_layout Plain Layout
5285 ' to create the pipes.
5286 If one of the pipes already exists, LyX will assume that another LyX process
5287 is already running and will not start the server.
5288 On POSIX (Unix like) systems, if for some other reason, an unused
5289 \begin_inset Quotes eld
5293 \begin_inset Quotes erd
5296 pipe is left in existence when LyX closes, then LyX will try to delete
5298 If this fails for some reason, you will need to delete the pipes manually
5299 and then restart LyX.
5300 On Windows, pipes are deleted by the OS on program termination or crash,
5302 \begin_inset Quotes eld
5306 \begin_inset Quotes erd
5309 pipes should not be possible.
5312 \begin_layout Standard
5313 To have several LyX processes with servers at the same time, you have to
5314 use different configurations, perhaps by using separate user directories,
5316 \begin_inset Flex Code
5319 \begin_layout Plain Layout
5325 file, for each process.
5328 \begin_layout Standard
5329 If you are developing a client program, you might find it useful to enable
5330 debugging information from the LyX server.
5331 Do this by starting LyX as
5332 \begin_inset Flex Code
5335 \begin_layout Plain Layout
5344 \begin_layout Standard
5345 You can find a complete example client written in C in the source distribution
5347 \begin_inset Flex Code
5350 \begin_layout Plain Layout
5351 development/lyxserver/server_monitor.c
5359 \begin_layout Standard
5360 Another useful tool is command-line based client you will find in
5361 \begin_inset Flex Code
5364 \begin_layout Plain Layout
5365 src/client/lyxclient
5373 \begin_layout Section
5374 Normal communication
5377 \begin_layout Standard
5378 To issue a LyX call, the client writes a line of ASCII text into the input
5380 This line has the following format:
5397 \begin_layout Description
5398 clientname is a name that the client can choose arbitrarily.
5399 Its only use is that LyX will echo it if it sends an answer—so a client
5400 can dispatch results from different requesters.
5403 \begin_layout Description
5404 function is the function you want LyX to perform.
5405 It is the same as the commands you'd use in the minibuffer.
5408 \begin_layout Description
5409 argument is an optional argument which is meaningful only to some functions
5411 \begin_inset Quotes eld
5415 \begin_inset Quotes erd
5418 LFUN will insert the argument as text at the cursor position).
5421 \begin_layout Standard
5422 The answer from LyX will arrive in the output pipe and be of the form
5439 \begin_layout Standard
5448 are just echoed from the command request, while
5452 is more or less useful information filled according to how the command
5453 execution worked out.
5454 Some commands, such as
5455 \begin_inset Quotes eld
5459 \begin_inset Quotes erd
5462 , will return information about the internal state of LyX, while other will
5463 return an empty data-response.
5464 This means that the command execution went fine.
5467 \begin_layout Standard
5468 In case of errors, the response from LyX will have this form
5485 \begin_layout Standard
5490 should contain an explanation of why the command failed.
5493 \begin_layout Standard
5497 \begin_layout LyX-Code
5498 echo "LYXCMD:test:beginning-of-buffer:" >~/.lyxpipe.in
5499 \begin_inset Newline newline
5502 echo "LYXCMD:test:get-xy:" >~/.lyxpipe.in
5503 \begin_inset Newline newline
5506 read a <~/.lyxpipe.out
5507 \begin_inset Newline newline
5513 \begin_layout Section
5517 \begin_layout Standard
5518 LyX can notify clients of events going on asynchronously.
5519 Currently it will only do this if the user binds a key sequence with the
5521 \begin_inset Quotes eld
5525 \begin_inset Quotes erd
5529 The format of the string LyX sends is as follows:
5533 \begin_inset Flex Code
5536 \begin_layout Plain Layout
5547 \begin_layout Standard
5552 is the printed representation of the key sequence that was actually typed
5556 \begin_layout Standard
5557 This mechanism can be used to extend LyX's command set and implement macros.
5558 Bind some key sequence to
5559 \begin_inset Quotes eld
5563 \begin_inset Quotes erd
5567 Then start a client that listens on the output pipe, dispatches the command
5568 according to the sequence, and starts a function that may use LyX calls
5569 and LyX requests to issue a command or a series of commands to LyX.
5572 \begin_layout Section
5573 The simple LyX Server Protocol
5576 \begin_layout Standard
5577 LyX implements a simple protocol that can be used for session management.
5578 All messages are of the form
5591 \begin_layout Standard
5597 \begin_inset Quotes eld
5601 \begin_inset Quotes erd
5605 \begin_inset Quotes eld
5609 \begin_inset Quotes erd
5614 \begin_inset Quotes eld
5618 \begin_inset Quotes erd
5621 is received from a client, LyX will report back to inform the client that
5622 it's listening to it's messages, while
5623 \begin_inset Quotes eld
5627 \begin_inset Quotes erd
5630 sent from LyX will inform clients that LyX is closing.
5633 \begin_layout Section
5634 Reverse DVI/PDF search
5637 \begin_layout Standard
5638 Some DVI/PDF viewers
5642 \begin_layout Plain Layout
5643 The following viewers offer the reverse PDF search feature: Okular on KDE/Linux,
5644 Skim on Mac OSX and SumatraPDF on Windows.
5653 facility (also called
5658 This means that you can tell LyX to put the cursor to a specific line in
5659 the document by clicking at the respective position in the DVI/PDF output.
5660 To achieve this, the viewer must be able to communicate with LyX.
5661 This is done via the LyX server either by using the named pipe (
5665 ), or the UNIX domain socket (
5669 ) that LyX creates in its temporary directory (this is the way the
5670 \begin_inset Flex Code
5673 \begin_layout Plain Layout
5679 program communicates with LyX).
5680 In some cases, you need a helper script that mediates between the viewer
5681 and LyX, in others, the viewer can communicate with LyX directly.
5682 This depends on the selected viewer and on your operating system.
5683 The same applies to the way viewers need to be configured and the way the
5684 reverse search is actually performed.
5685 In what follows, we will thus describe how to setup reverse search for
5687 Before we turn to this, though, we will explain what needs to be done generally
5688 to enable reverse search in the DVI/PDF output.
5691 \begin_layout Subsection
5692 \begin_inset CommandInset label
5694 name "sub:rev-search"
5701 \begin_layout Standard
5702 In most cases LyX will do the work for you by enabling
5703 \begin_inset Flex MenuItem
5706 \begin_layout Plain Layout
5707 Document\SpecialChar \menuseparator
5708 Output\SpecialChar \menuseparator
5709 Synchronize with Output
5715 In such a case LyX will automatically insert the necessary SyncTeX macro
5716 (for PDF) or load the srcltx package (for DVI) respectively.
5717 This option can be easily reached also on
5718 \begin_inset Flex Code
5721 \begin_layout Plain Layout
5730 \begin_layout Standard
5731 If you need a different setting, you can select or input a custom macro
5732 from the drop down box just below
5733 \begin_inset Flex MenuItem
5736 \begin_layout Plain Layout
5737 Document\SpecialChar \menuseparator
5738 Output\SpecialChar \menuseparator
5739 Synchronize with Output
5747 \begin_layout Standard
5748 Please note that including the
5749 \begin_inset Flex Code
5752 \begin_layout Plain Layout
5759 \begin_inset Flex Code
5762 \begin_layout Plain Layout
5768 sometimes has an undesired impact on the typesetting.
5769 Thus, you should switch output synchronization off for the final typesetting
5771 \begin_inset Flex Code
5774 \begin_layout Plain Layout
5781 \begin_inset Flex Code
5784 \begin_layout Plain Layout
5793 \begin_layout Standard
5794 In case you need some more special settings that are not covered by the
5795 automatic settings, read the next section about how to set up output synchroniz
5797 If the automatic setup suits your needs, you can readily jump to section
5798 \begin_inset space ~
5802 \begin_inset CommandInset ref
5804 reference "sub:configuring-viewers"
5808 , where the necessary configuration steps in your viewer -- needed both
5809 with the automatic and the manual setup -- are described.
5812 \begin_layout Subsection
5816 \begin_layout Standard
5817 LaTeX provides several different methods for reverse search.
5818 Some are built-in in the
5819 \begin_inset Flex Code
5822 \begin_layout Plain Layout
5828 program, some are provided by external packages.
5829 Your choice depends on whether your LaTeX distribution already provides
5830 a given method (the built-in methods are rather new) and whether your viewer
5832 The available methods are described in the following.
5835 \begin_layout Subsubsection*
5836 Built-in DVI-search via src-specials (DVI only)
5839 \begin_layout Standard
5840 This method provides the DVI file with the necessary information for reverse
5842 It is available in LaTeX since quite some time (any somewhat recent LaTeX
5843 distribution should include it), and it works reliably.
5844 To enable it, change the
5845 \begin_inset Flex MenuItem
5848 \begin_layout Plain Layout
5853 \begin_layout Plain Layout
5866 \begin_inset Flex MenuItem
5869 \begin_layout Plain Layout
5874 \begin_layout Plain Layout
5881 eX (plain)->DraftDVI
5887 \begin_inset Flex MenuItem
5890 \begin_layout Plain Layout
5891 Preferences\SpecialChar \menuseparator
5892 File Handling\SpecialChar \menuseparator
5899 \begin_inset Flex Code
5902 \begin_layout Plain Layout
5903 latex -src-specials $$i
5909 If this doesn't work, check if your TeX engine needs different options
5910 (the syntax might differ in some distributions).
5913 \begin_layout Subsubsection*
5914 External Packages (PDFSync and scrltx)
5917 \begin_layout Standard
5926 provide reverse search facility for PDF output (via pdflatex) and DVI output,
5928 In order to enable it, load the packages in the LyX preamble:
5931 \begin_layout Itemize
5932 \begin_inset Flex Code
5935 \begin_layout Plain Layout
5943 for reverse PDF search,
5946 \begin_layout Itemize
5947 \begin_inset Flex Code
5950 \begin_layout Plain Layout
5953 usepackage[active]{srcltx}
5958 for reverse DVI search.
5961 \begin_layout Standard
5962 If you want to be able to perform both DVI and PDF reverse searches, you
5963 can also insert in the preamble the following lines
5966 \begin_layout LyX-Code
5970 \begin_inset Newline newline
5976 \begin_inset Newline newline
5982 \begin_inset Newline newline
5988 \begin_inset Newline newline
5993 usepackage[active]{srcltx}
5994 \begin_inset Newline newline
6002 \begin_layout Standard
6003 This way, you can preview the file as either DVI or PDF (pdflatex) and the
6004 right package will be used.
6007 \begin_layout Standard
6008 Note that PDFSync might affect the output layout of your document.
6009 It is therefore advised to disable PDFsync for final documents.
6012 \begin_layout Subsubsection*
6013 Built-in reverse search via SyncTeX (DVI and PDF)
6016 \begin_layout Standard
6018 \begin_inset Flex Code
6021 \begin_layout Plain Layout
6027 have built-in support for both PDF and DVI reverse search.
6032 facility is basically the result of the integration of the PDFSync package
6033 to the pdftex program and its merge with the
6038 You need at least TeXLive 2008 or a recent MikTeX distribution in order
6040 Also note that only a few PDF viewers (Skim on the Mac, SumatraPDF on Windows)
6041 already provide SyncTeX support.
6044 \begin_layout Standard
6045 To enable SyncTeX for DVI output, change the
6046 \begin_inset Flex MenuItem
6049 \begin_layout Plain Layout
6054 \begin_layout Plain Layout
6067 \begin_inset Flex MenuItem
6070 \begin_layout Plain Layout
6075 \begin_layout Plain Layout
6082 eX (plain) -> DraftDVI
6088 \begin_inset Flex MenuItem
6091 \begin_layout Plain Layout
6092 Preferences\SpecialChar \menuseparator
6093 File Handling\SpecialChar \menuseparator
6100 \begin_inset Flex Code
6103 \begin_layout Plain Layout
6104 latex -synctex=1 $$i
6109 , and for PDF output, change the
6110 \begin_inset Flex MenuItem
6113 \begin_layout Plain Layout
6118 \begin_layout Plain Layout
6125 eX (pdflatex) -> PDF (pdflatex)
6131 \begin_inset Flex Code
6134 \begin_layout Plain Layout
6135 pdflatex -synctex=1 $$i
6141 Check the documentation of your viewer whether the viewer needs to be configure
6142 d for the use with SyncTeX.
6146 \begin_layout Plain Layout
6148 \begin_inset Flex Code
6151 \begin_layout Plain Layout
6157 option enables gzip compression.
6158 If your viewer does not support it, you should instead use
6159 \begin_inset Flex Code
6162 \begin_layout Plain Layout
6176 \begin_layout Subsection
6177 Configuring and using specific viewers
6178 \begin_inset CommandInset label
6180 name "sub:configuring-viewers"
6187 \begin_layout Subsubsection*
6188 Xdvi (all platforms)
6191 \begin_layout Standard
6193 \begin_inset Flex Code
6196 \begin_layout Plain Layout
6202 , you don't need to do anything else for performing a reverse DVI search,
6203 as LyX already provides the necessary hooks for automatically using the
6205 \begin_inset Flex Code
6208 \begin_layout Plain Layout
6215 Just setup your document as described above (reverse search is triggered
6216 by Ctrl-click or Alt-click on Mac OSX, respectively).
6219 \begin_layout Standard
6220 However, if for whatever reason you want to use the named pipe instead of
6221 the socket for communicating with LyX, simply change the DVI viewer in
6223 \begin_inset Flex MenuItem
6226 \begin_layout Plain Layout
6227 Preferences\SpecialChar \menuseparator
6228 File Handling\SpecialChar \menuseparator
6238 \begin_layout Plain Layout
6239 On Mac OSX you have to use
6240 \begin_inset Flex Code
6243 \begin_layout Plain Layout
6244 DISPLAY=:0.0 xdvi -editor 'lyxeditor.sh %f %l'
6255 \begin_inset Flex Code
6258 \begin_layout Plain Layout
6259 xdvi -editor 'lyxeditor.sh %f %l'
6265 \begin_inset Flex Code
6268 \begin_layout Plain Layout
6274 is a suitable script.
6275 For example, a minimal shell script is the following one:
6278 \begin_layout LyX-Code
6280 \begin_inset Newline newline
6283 LYXPIPE="/path/to/lyxpipe"
6284 \begin_inset Newline newline
6287 COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
6288 \begin_inset Newline newline
6291 echo "$COMMAND" > "${LYXPIPE}".in || exit
6292 \begin_inset Newline newline
6295 read < "${LYXPIPE}".out || exit
6298 \begin_layout Standard
6300 \begin_inset Flex Code
6303 \begin_layout Plain Layout
6313 \begin_layout Plain Layout
6320 XServer pipe path specified in
6321 \begin_inset Flex MenuItem
6324 \begin_layout Plain Layout
6325 Preferences\SpecialChar \menuseparator
6335 \begin_layout Plain Layout
6337 \begin_inset Flex Code
6340 \begin_layout Plain Layout
6346 folder of a source distribution you can find a
6347 \begin_inset Flex Code
6350 \begin_layout Plain Layout
6356 script which is able to locate the
6360 based on your preferences.
6368 \begin_layout Subsubsection*
6372 \begin_layout Standard
6374 \begin_inset Flex Code
6377 \begin_layout Plain Layout
6378 /Applications/MacDviX_Folder/calleditor.script
6383 , add the following lines:
6386 \begin_layout LyX-Code
6391 \begin_layout Plain Layout
6398 X.app/Contents/MacOS/lyxeditor "$2" $1
6399 \begin_inset Newline newline
6405 \begin_layout Standard
6406 Modify the lines accordingly if you install LyX somewhere else than in the
6407 Applications folder.
6410 \begin_layout Standard
6411 Reverse search is triggered by Alt-click (OPTION-click).
6414 \begin_layout Subsubsection*
6418 \begin_layout Standard
6420 \begin_inset Flex Code
6423 \begin_layout Plain Layout
6424 open -a Skim.app $$i
6429 to the viewer setting in
6430 \begin_inset Flex MenuItem
6433 \begin_layout Plain Layout
6434 Preferences\SpecialChar \menuseparator
6435 File Handling\SpecialChar \menuseparator
6436 File formats\SpecialChar \menuseparator
6443 \begin_inset Flex MenuItem
6446 \begin_layout Plain Layout
6447 Skim\SpecialChar \menuseparator
6448 Preferences\SpecialChar \menuseparator
6458 \begin_layout Plain Layout
6468 \begin_layout Standard
6469 Reverse search is triggered by COMMAND-SHIFT-click
6472 \begin_layout Subsubsection*
6476 \begin_layout Standard
6478 \begin_inset Flex MenuItem
6481 \begin_layout Plain Layout
6482 Settings\SpecialChar \menuseparator
6483 Configure Okular\SpecialChar \ldots{}
6484 \SpecialChar \menuseparator
6491 \begin_inset Quotes eld
6495 \begin_inset Quotes erd
6499 \begin_inset Flex Code
6502 \begin_layout Plain Layout
6511 \begin_layout Standard
6512 Reverse search is triggered by SHIFT-click.
6515 \begin_layout Subsubsection*
6519 \begin_layout Standard
6520 Launch yap, choose its
6521 \begin_inset Flex MenuItem
6524 \begin_layout Plain Layout
6525 View\SpecialChar \menuseparator
6532 \begin_inset Quotes eld
6536 \begin_inset Quotes erd
6541 \begin_inset Quotes eld
6544 New\SpecialChar \ldots{}
6546 \begin_inset Quotes erd
6549 button and, in the window that opens, enter
6550 \begin_inset Quotes eld
6554 \begin_inset Quotes erd
6557 (or any other name you like) in the
6558 \begin_inset Quotes eld
6562 \begin_inset Quotes erd
6566 Now click on the button labeled
6567 \begin_inset Quotes eld
6570 \SpecialChar \ldots{}
6572 \begin_inset Quotes erd
6575 to open a file dialog and navigate to the directory containing the batch
6577 \begin_inset Flex Code
6580 \begin_layout Plain Layout
6588 \begin_inset Flex Code
6591 \begin_layout Plain Layout
6597 and then specify the program arguments as
6598 \begin_inset Flex Code
6601 \begin_layout Plain Layout
6609 \begin_inset Flex Code
6612 \begin_layout Plain Layout
6618 wrapper is used for communicating with LyX through the
6625 \begin_layout LyX-Code
6627 \begin_inset Newline newline
6630 echo LYXCMD:revdvi:server-goto-file-row:%1 %2>
6639 \begin_inset Newline newline
6653 \begin_layout Standard
6654 Make sure that the LyXServer pipe path you specified in LyX is
6655 \begin_inset Flex Code
6658 \begin_layout Plain Layout
6672 , otherwise change the
6673 \begin_inset Flex Code
6676 \begin_layout Plain Layout
6682 wrapper accordingly.
6685 \begin_layout Standard
6686 In yap, reverse search is triggered by double-click.
6689 \begin_layout Subsubsection*
6690 SumatraPDF (Windows)
6693 \begin_layout Standard
6694 In order to use SumatraPDF for inverse search, enter
6695 \begin_inset Flex Code
6698 \begin_layout Plain Layout
6699 SumatraPDF -inverse-search "lyxeditor.bat %f %l"
6704 in the viewer setting in
6705 \begin_inset Flex MenuItem
6708 \begin_layout Plain Layout
6709 Preferences\SpecialChar \menuseparator
6710 File Handling\SpecialChar \menuseparator
6711 File formats\SpecialChar \menuseparator
6718 \begin_inset Flex Code
6721 \begin_layout Plain Layout
6727 is the previous wrapper.
6728 If SumatraPDF.exe is not in your command PATH, use its full file name.
6731 \begin_layout Standard
6732 Reverse search is triggered by double-click.
6735 \begin_layout Subsubsection*
6739 \begin_layout Standard
6740 First of all, make sure that yap is your default DVI viewer in the Windows
6741 environment, then launch it, choose its
6742 \begin_inset Flex MenuItem
6745 \begin_layout Plain Layout
6746 View\SpecialChar \menuseparator
6753 \begin_inset Quotes eld
6757 \begin_inset Quotes erd
6762 \begin_inset Quotes eld
6765 New\SpecialChar \ldots{}
6767 \begin_inset Quotes erd
6770 button and, in the window that opens, enter
6771 \begin_inset Quotes eld
6775 \begin_inset Quotes erd
6778 (or any other name you like) in the
6779 \begin_inset Quotes eld
6783 \begin_inset Quotes erd
6787 Now click on the button labeled
6788 \begin_inset Quotes eld
6791 \SpecialChar \ldots{}
6793 \begin_inset Quotes erd
6796 to open a file dialog and navigate to the directory containing the
6797 \begin_inset Flex Code
6800 \begin_layout Plain Layout
6806 program (which is installed by default on Cygwin along with the LyX executable).
6808 \begin_inset Flex Code
6811 \begin_layout Plain Layout
6817 and then specify the program arguments as
6818 \begin_inset Flex Code
6821 \begin_layout Plain Layout
6828 In this way, you will be using the
6832 for communicating with LyX.
6833 If, for whatever reason, you want to use the
6838 \begin_inset Flex Code
6841 \begin_layout Plain Layout
6847 option and be sure to specify the LyXServer pipe path in the LyX preferences.
6850 \begin_layout Standard
6851 In yap, reverse search is triggered by double-click.
6854 \begin_layout Subsubsection*
6858 \begin_layout Standard
6859 In order to use SumatraPDF for inverse search, enter
6860 \begin_inset Flex Code
6863 \begin_layout Plain Layout
6869 in the viewer setting in
6870 \begin_inset Flex MenuItem
6873 \begin_layout Plain Layout
6874 Preferences\SpecialChar \menuseparator
6875 File Handling\SpecialChar \menuseparator
6876 File formats\SpecialChar \menuseparator
6883 \begin_inset Flex Code
6886 \begin_layout Plain Layout
6892 is the following script (to be placed in your command PATH,
6893 \begin_inset Flex Code
6896 \begin_layout Plain Layout
6902 being the best choice):
6905 \begin_layout LyX-Code
6907 \begin_inset Newline newline
6911 \begin_inset Newline newline
6914 SumatraPDF -inverse-search "lyxeditor -g %f %l" $(basename $1)
6917 \begin_layout Standard
6918 This wrapper script is needed because SumatraPDF is a native Windows application
6919 and does not understand the posix paths used by the Cygwin version of LyX.
6920 If SumatraPDF.exe is not in your command PATH, use its full posix path in
6923 \begin_inset Flex Code
6926 \begin_layout Plain Layout
6932 enables communication via the
6938 \begin_inset Flex Code
6941 \begin_layout Plain Layout
6947 option if you want to use the
6951 , and be sure to specify the LyXServer pipe path in the LyX preferences.
6954 \begin_layout Standard
6955 Reverse search is triggered by double-click.
6958 \begin_layout Section
6962 \begin_layout Standard
6963 Forward search is, as the name implies, in a sense the
6964 \begin_inset Quotes eld
6968 \begin_inset Quotes erd
6972 It allows you to let the viewer jump to a given position from within LyX.
6973 If forward search is set up (as described in what follows), you can put
6974 the cursor anywhere in your LyX document, and hit
6975 \begin_inset Flex MenuItem
6978 \begin_layout Plain Layout
6979 Navigate\SpecialChar \menuseparator
6986 \begin_inset Flex MenuItem
6989 \begin_layout Plain Layout
6995 in the context menu via right mouse click), and then the viewer will jump
6996 to that position as well.
6997 This implies, of course, that your viewer supports this function.
7000 \begin_layout Standard
7001 To make forward search possible, you first need to provide the generated
7002 output PDF/DVI file with additional information about the TeX sources.
7003 This can be done via the methods described in the section
7004 \begin_inset CommandInset ref
7006 reference "sub:rev-search"
7013 \begin_layout Standard
7014 Additionally, you need to configure LyX for using your viewers in
7015 \begin_inset Flex MenuItem
7018 \begin_layout Plain Layout
7019 Tools\SpecialChar \menuseparator
7020 Preferences\SpecialChar \menuseparator
7021 Output\SpecialChar \menuseparator
7028 We provide a range of tested configurations for some viewers, which you
7029 can select from the drop down list.
7030 If none of these configurations suits you, you have to find out and enter
7031 a suitable configuration yourself.
7032 The definition syntax uses the following placeholders:
7035 \begin_layout Itemize
7037 \begin_inset Flex Code
7040 \begin_layout Plain Layout
7049 \begin_layout Itemize
7051 \begin_inset Flex Code
7054 \begin_layout Plain Layout
7060 : name of the (temporary) exported .tex file
7063 \begin_layout Itemize
7065 \begin_inset Flex Code
7068 \begin_layout Plain Layout
7074 : name of the exported output file (either dvi or pdf, depending on which
7075 one exists in the temporary directory)
7078 \begin_layout Standard
7079 Note that only some of the viewers provide full forward search functionality,
7080 among them yap, xdvi, okular and Sumatra PDF
7084 \begin_layout Plain Layout
7085 For Sumatra CMCDDE is needed --- downloadable from http://www.istri.fr/zip/CMCDDE.z
7092 While many of the widespread PDF viewers (most notably Adobe Reader) do
7093 not support forward search at all, some other viewers -- e.
7094 \begin_inset space \thinspace{}
7098 evince and xpdf -- allow at least to reload the document and jump to a
7099 specific page of the file, so you can at least navigate
7100 \begin_inset Quotes eld
7104 \begin_inset Quotes erd
7108 These latter functionality is provided by an external call of synctex (see
7109 the predefined example configurations).
7113 \begin_layout Standard
7114 Forward search works both with DVI and PDF output.
7115 LyX simply checks which preview format you have used before (i.
7116 \begin_inset space \thinspace{}
7119 e., which format is already there in the temporary directory) and chooses
7120 the appropriate configuration for the respective format.
7124 \begin_layout Chapter
7125 Special Document Classes
7128 \begin_layout Section
7132 \begin_layout Standard
7138 \begin_layout Subsection
7142 \begin_layout Standard
7143 This section describes how LyX can be used to write articles for submission
7144 to the scientific journal
7146 Astronomy and Astrophysics
7148 (www.edpsciences.fr/aa/
7149 \begin_inset Flex URL
7152 \begin_layout Plain Layout
7154 http://www.edpsciences.fr/aa/
7159 ) using Version 5.01 of the document class
7164 This package can be downloaded from the ftp site
7167 \begin_layout Standard
7168 \begin_inset VSpace medskip
7174 \begin_layout Standard
7176 \begin_inset Flex URL
7179 \begin_layout Plain Layout
7181 ftp://ftp.edpsciences.org/pub/aa/readme.html
7189 \begin_layout Standard
7190 \begin_inset VSpace medskip
7196 \begin_layout Standard
7197 A manual comes together with that package, and this text is not meant to
7198 replace the original manual but is merely a short guide in how to realize
7199 the correct form of your paper.
7203 \begin_layout Standard
7204 Please note that the publisher of the journal was changed from Springer
7205 to EDP Sciences starting January 1, 2001.
7206 That change involved also some slight changes to the style files, namely
7207 the removal of the thesaurus command.
7208 The LyX class aa supports the newest version of these style files, V 5.01.
7209 If you have an older version installed, please upgrade.
7210 For compatibility, the old (version 4) layout has been kept as
7215 Please refer to the comments in
7217 LyXDir/layouts/aapaper.layout
7222 \begin_layout Subsection
7226 \begin_layout Standard
7227 It is recommended you start from the example template distributed with LyX.
7228 If you are not using a template, note the following settings:
7231 \begin_layout Itemize
7238 Document\SpecialChar \menuseparator
7241 dialog (OK, that one was obvious).
7244 \begin_layout Itemize
7245 Don't change the option
7248 \begin_inset space ~
7258 The whole layout is done by the macros, you shouldn't change anything.
7261 \begin_layout Subsection
7265 \begin_layout Standard
7266 First thing to enter is the header information.
7267 It consists of seven entries, of which some are optional.
7271 \begin_layout Itemize
7279 \begin_layout Itemize
7287 \begin_layout Itemize
7295 \begin_layout Itemize
7303 \begin_layout Itemize
7308 : [optional] if more than one author: whom to contact for offprint requests.
7311 \begin_layout Itemize
7316 : [optional] mail address for contacts.
7319 \begin_layout Itemize
7327 Received: <date>; Accepted <date>
7330 \begin_layout Standard
7331 There is no need to issue the
7337 command, this is done automatically by LyX when the header is finished.
7338 Although the order of the single header entries doesn't matter it is advised
7339 to keep the above sequence, just to get the best optics and meets the layout
7340 of the real document.
7343 \begin_layout Standard
7344 If you want to place footnotes in the header block, e.
7345 \begin_inset space \thinspace{}
7349 \begin_inset space \space{}
7352 to state your present address, just use the standard footnote via the menu
7355 Insert\SpecialChar \menuseparator
7359 LyX will automagically use the term
7368 \begin_layout Standard
7369 In addition to these topics, the macros use three additional LaTeX commands
7370 that have no counterpart in LyX:
7373 \begin_layout Itemize
7380 to separate different names for more than one author and institute, respectivel
7384 \begin_layout Itemize
7391 to mark corresponding author/institute pairs.
7392 The institutes are numbered sequentially as they appear in the
7396 field, so you have to put a marker to each author.
7399 \begin_layout Itemize
7406 to supply an email address for fast contact.
7409 \begin_layout Standard
7410 In all cases, the appropriate command has to be entered in LyX and marked
7416 \begin_layout Subsection
7420 \begin_layout Standard
7421 The abstract should immediately follow the header block.
7422 With version 5 the abstract environment was changed to a command, and there
7423 is now a resctriction to only one paragraph.
7424 In addition, it should contain an entry with the keywords.
7425 This is not yet implemented for LyX, therefore you have to enter the LaTeX
7432 by hand and mark it as LaTeX code.
7433 Refer to the example paper.
7436 \begin_layout Subsection
7437 Supported environments
7440 \begin_layout Standard
7441 The A&A paper layout supports the following environments for structuring
7445 \begin_layout Itemize
7451 \begin_layout Itemize
7457 \begin_layout Itemize
7463 \begin_layout Itemize
7469 \begin_layout Itemize
7475 \begin_layout Itemize
7481 \begin_layout Itemize
7487 \begin_layout Itemize
7493 \begin_layout Itemize
7499 \begin_layout Itemize
7505 \begin_layout Itemize
7511 \begin_layout Itemize
7517 \begin_layout Subsection
7518 Commands not supported by LyX
7521 \begin_layout Standard
7522 Some commands are not yet supported by the
7527 Some have already been mentioned.
7528 For the sake of completeness, they are listed all together here:
7531 \begin_layout Itemize
7539 \begin_layout Itemize
7547 \begin_layout Itemize
7555 \begin_layout Itemize
7563 \begin_layout Itemize
7571 \begin_layout Itemize
7579 \begin_layout Itemize
7587 \begin_layout Itemize
7595 \begin_layout Standard
7596 If you want to use any of these commands, you have to enter them yourself.
7599 Do not forget to mark them as LaTeX code!
7602 \begin_layout Subsection
7603 Figure and Table Floats
7606 \begin_layout Standard
7607 LyX provides support for the necessary float environments
7609 figure, figure*, table
7615 , therefore we won't tell much about it here.
7619 \begin_inset space ~
7625 Just remember that tables should be left-aligned.
7626 For that, select the table and change the alignment in
7628 Edit\SpecialChar \menuseparator
7630 \begin_inset space ~
7636 \begin_layout Standard
7637 There is only one special thing: the figures with caption besides the figure.
7638 To create such a figure, you have to do the following:
7641 \begin_layout Enumerate
7642 Create a wide figure float:
7644 Insert\SpecialChar \menuseparator
7645 Float\SpecialChar \menuseparator
7648 , then right click in the figure and select
7654 \begin_inset space ~
7662 \begin_layout Enumerate
7663 Enter your caption text.
7666 \begin_layout Enumerate
7671 to move the cursor above the caption.
7674 \begin_layout Enumerate
7678 \begin_layout Enumerate
7679 Position the cursor behind the figure and insert a horizontal fill:
7681 Insert\SpecialChar \menuseparator
7683 \begin_inset space ~
7686 Character\SpecialChar \menuseparator
7688 \begin_inset space ~
7696 \begin_layout Enumerate
7697 Switch to LaTeX mode:
7700 \begin_inset space ~
7708 \begin_layout Enumerate
7718 Do not close the brace!
7721 \begin_layout Enumerate
7722 Position the cursor behind the caption text, switch to LaTeX mode and insert
7726 \begin_inset space ~
7738 \begin_layout Standard
7739 Also, refer to the figures in the example paper.
7742 \begin_layout Subsection
7746 \begin_layout Standard
7747 For submission, the paper has to be formated in a special double-spacing
7749 For this purpose, you have to give the option
7753 to the documentclass.
7754 This must be done using the extra class options field in the
7756 Document\SpecialChar \menuseparator
7760 Just enter the string
7767 \begin_layout Subsection
7771 \begin_layout Standard
7776 directory contains an example paper written with LyX.
7777 It is the example paper from the original macro package, translated to
7779 Use it for inspiration, and compare the original LaTeX code with LyX way
7783 \begin_layout Section
7787 \begin_layout Standard
7793 \begin_layout Subsection
7797 \begin_layout Standard
7798 AASTeX is a set of macros produced by the American Astronomical Society
7799 to facilitate electronic manuscript submission to the three journals they
7800 publish: the Astrophysical Journal (including the Letters and Supplement),
7801 the Astronomical Journal, and the Publications of the Astronomical Society
7803 LyX has proven to be an excellent tool for generating these documents,
7804 especially given its equation, citation, and figure handling capabilities.
7805 LyX requires version 5.0 (or higher) of these macros; preferably 5.2, which
7806 is the version described here, or higher.
7807 Versions prior to 5.0 are intended for use with LaTeX2.09 and are fundamentally
7808 incompatible with LyX.
7809 The AASTeX package may be downloaded from the AASTeX Web site
7812 \begin_layout Standard
7813 \begin_inset VSpace medskip
7819 \begin_layout Standard
7821 \begin_inset Flex URL
7824 \begin_layout Plain Layout
7826 http://www.journals.uchicago.edu/AAS/AASTeX
7834 \begin_layout Standard
7835 \begin_inset VSpace medskip
7841 \begin_layout Standard
7842 A complete user guide is contained in that package and you should familiarize
7843 yourself with it thoroughly before embarking on writing a paper in LyX.
7844 LyX will not reduce the need to figure out all the AASTeX commands, it
7845 will only reduce the drudgery of typing everything in.
7846 It is your responsibility to ensure that the final exported LaTeX document
7847 conforms completely to the requirements of the journal to which you are
7848 submitting your paper.
7851 \begin_layout Subsection
7852 Starting a New Paper
7855 \begin_layout Standard
7856 I strongly suggest that you start with the AASTeX template file.
7859 File\SpecialChar \menuseparator
7866 , enter the new file name, then choose the
7871 This will show the most common fields found in a manuscript.
7872 Simply overwrite the existing text (including the brackets,
7876 ) with the correct information.
7877 Many of the AASTeX commands and environments can be implemented directly
7878 in LyX, but some cannot: most noticeably
7890 , which should stick out like a sore thumb if you actually just opened the
7892 For commands such as these, the LaTeX code must be entered directly and
7894 Such commands are referred to as TeX code, or Evil Red Text.
7895 I tried to minimize the amount of TeX code needed in an AASTeX document,
7896 but there is still a bit more required than any of us would like.
7899 \begin_layout Subsection
7900 Finishing Your Paper
7903 \begin_layout Standard
7904 When the paper is finished to your satisfaction and previews/prints correctly,
7906 \begin_inset Quotes eld
7910 \begin_inset Quotes erd
7913 actions which need to be done before you submit it to the journals.
7917 \begin_layout Enumerate
7918 Export your paper as a LaTeX file (
7920 File\SpecialChar \menuseparator
7921 Export\SpecialChar \menuseparator
7928 \begin_layout Enumerate
7933 file with your favorite text editor
7937 \begin_layout Enumerate
7938 remove the comment lines before the
7947 \begin_layout Enumerate
7952 usepackage...{fontenc}
7954 line if it appears (usually just after
7969 \begin_layout Enumerate
7970 remove everything between (and including) the
7982 commands, except for any commands you specifically put into the LaTeX preamble
7983 (which should appear immediately after the
7984 \begin_inset Quotes eld
7987 User specified LaTeX commands
7988 \begin_inset Quotes erd
7999 \begin_layout Enumerate
8000 Run the resulting file through LaTeX to make sure it still processes correctly.
8003 \begin_layout Enumerate
8004 Reread the journal requirements to make sure your filenames and formats
8008 \begin_layout Enumerate
8012 \begin_layout Subsection
8013 Comments On Specific Commands
8016 \begin_layout Standard
8017 I will not describe the detailed usage of the individual AASTeX commands:
8018 the AASTeX User Guide (
8022 ) gives a good description of each.
8023 Thus it's probably easiest for me to go down the list as found in the guide
8024 and offer comments where necessary.
8025 So let's begin \SpecialChar \ldots{}
8029 \begin_layout Subsubsection
8030 Things that work as expected
8033 \begin_layout Standard
8037 \begin_layout Plain Layout
8049 \begin_layout Standard
8050 Because they work as you might expect, I simply list them and the section
8151 begin{thebibliography}
8159 (2.13.2), all the cite commands and their variations (2.13.2), the generic
8160 graphicx figure commands (2.14.1),
8184 (2.15.4, amongst other places),
8211 \begin_layout Standard
8212 The following style options also work correctly:
8233 Simply put them in the
8239 Layout\SpecialChar \menuseparator
8245 \begin_layout Standard
8249 \begin_layout Plain Layout
8261 \begin_layout Subsubsection
8262 Things that work, but require more comment
8265 \begin_layout Standard
8266 The following items work, but require a little more discussion:
8269 \begin_layout Itemize
8270 These items are reserved for use by the journal editors, but you can put
8271 them into the LaTeX preamble if you feel compelled to do so:
8304 \begin_layout Itemize
8305 These items may be placed in the LaTeX preamble, and are included as blanks
8306 in the template file:
8327 \begin_layout Itemize
8334 (2.3) – can only be used
8335 \begin_inset Quotes eld
8339 \begin_inset Quotes erd
8342 , not in the middle of a paragraph.
8343 Use TeX code if you need to embed it.
8346 \begin_layout Itemize
8353 (2.3) – will have extra {} after it.
8354 This should not cause an error.
8357 \begin_layout Itemize
8364 (2.6) – can only be used
8365 \begin_inset Quotes eld
8369 \begin_inset Quotes erd
8372 , not in the middle of a paragraph.
8373 Use TeX code if you need to embed it.
8376 \begin_layout Itemize
8383 (2.8) – can't insert a cross-reference tag, you must type the tag name by
8387 \begin_layout Itemize
8401 \begin_layout Itemize
8408 (2.9) – will have extra {} after it.
8409 This should not cause an error.
8412 \begin_layout Itemize
8419 (2.11) – will have extra {} after it.
8420 This should not cause an error.
8423 \begin_layout Itemize
8430 (2.14.2) – you can insert an optional filename argument by placing the cursor
8431 at the beginning of the text and selecting
8433 Insert\SpecialChar \menuseparator
8438 \begin_inset Quotes eld
8442 \begin_inset Quotes erd
8445 inserts an optional argument of the type needed by
8452 Hopefully it will be renamed someday.
8455 \begin_layout Itemize
8468 for the catalog ID optional parameter
8471 \begin_layout Itemize
8484 for the catalog ID optional parameter
8487 \begin_layout Subsubsection
8488 Things not implemented, use TeX code
8491 \begin_layout Standard
8495 \begin_layout Plain Layout
8507 \begin_layout Standard
8530 setcounter{equation}
8532 (2.12), Journal name abbreviations (2.13.4),
8568 (2.15.4, insert it as the first element in the lefthand cell after where
8570 Don't use any of LyX's rules in the table),
8582 (2.15.5), much of Misc (2.17, except
8633 \begin_layout Standard
8637 \begin_layout Plain Layout
8649 \begin_layout Subsubsection
8650 Things that cannot be implemented
8653 \begin_layout Standard
8654 \SpecialChar \ldots{}
8655 at least in any meaningful sort of way, so I suggest ignoring them.
8656 They are the references environment (2.13.3), and the deluxetable environment
8658 If you really, really need to use deluxetable, I suggest editing it in
8659 a separate file with a text editor, then using
8661 Insert\SpecialChar \menuseparator
8663 \begin_inset space ~
8668 to include it in your LyX document.
8673 file to see an example of this.
8676 \begin_layout Subsection
8677 FAQs, Tips, Tricks, and Other Ruminations
8680 \begin_layout Subsubsection
8681 Getting LyX and AASTeX to cooperate
8684 \begin_layout Standard
8685 It can be a bit tricky to get LyX to recognize a new layout and document
8687 When all else fails, do this:
8690 \begin_layout Enumerate
8691 Make certain that LaTeX can find AASTeX.
8692 Copy sample.tex (and perhaps table.tex) from the AASTeX distribution into
8693 a directory completely unrelated to LaTeX or AASTeX and run LaTeX on
8700 \begin_layout Enumerate
8712 \begin_layout Enumerate
8715 Tools\SpecialChar \menuseparator
8718 in LyX, then restart LyX.
8721 \begin_layout Enumerate
8722 Open a regular new file, not from a template.
8723 Does AASTeX appear in the class list in
8725 Document\SpecialChar \menuseparator
8731 \begin_layout Standard
8732 If you get a warning from an existing AASTeX document about not being able
8733 to find the AASTeX layout or a message about
8734 \begin_inset Quotes eld
8737 You should not mix title layouts with normal ones
8738 \begin_inset Quotes erd
8741 , things haven't been installed correctly.
8744 \begin_layout Subsubsection
8745 LaTeX error processing a table
8748 \begin_layout Standard
8749 LyX, by default, attempts to center the table caption/title.
8750 This seems to produce a bad interaction in AASTeX so you should click somewhere
8751 in the caption/title, then select
8753 Edit\SpecialChar \menuseparator
8755 \begin_inset space ~
8769 This took care of it for me.
8772 \begin_layout Subsubsection
8776 \begin_layout Standard
8777 A couple of things: 1) I have noticed some funny spacing in the reference
8778 entries in the text.
8779 When you enter the bibliography item data, make sure their is
8783 space between the last author and the parenthesis setting off the year;
8787 \begin_inset space \thinspace{}
8791 \begin_inset space \space{}
8805 2) Entering the references at all is not obvious.
8806 The easiest thing is to start typing your first reference at the end of
8807 the document, then mark it as type
8812 That will put a small gray box in front of what you just typed.
8813 Click on the box to fill in the rest of the information.
8814 For new references, go to the end of an existing reference and press return.
8815 That will create a new line with its own box, etc.
8818 \begin_layout Subsubsection
8822 \begin_layout Standard
8823 Even though AASTeX provides its own figure commands (
8829 , for example), I much prefer LaTeX's standard figure commands (with the
8838 \begin_inset space ~
8841 commands as TeX code into a Figure Float box if you desire, but I never
8842 have much luck getting the layout right.
8843 With the standard graphics, LyX will insert a
8847 usepackage{graphicx}
8849 command into the LaTeX preamble and handle the figures in the standard
8850 LaTeX2e way, interspersing the figures in the text.
8851 I believe ApJ accepts figures exactly this way now; AJ might still use
8853 \begin_inset Quotes eld
8856 stack everything at the end
8857 \begin_inset Quotes erd
8863 \begin_layout Subsubsection
8864 Things I could have done, but didn't
8867 \begin_layout Standard
8869 \begin_inset Quotes eld
8873 \begin_inset Quotes erd
8876 things I could have implemented, but chose not to.
8877 For instance, I saw no point in double-spacing the text in the LyX window,
8878 even though it is double-spaced in the paper manuscript.
8879 Also, I chose not to make separate layouts for the preprint and preprint2
8881 Since I assume you will spend most of your time in the plain manuscript
8882 mode anyway, I decided not to chew up more disk space with this.
8886 \begin_layout Subsection
8890 \begin_layout Standard
8891 Your mileage may vary.
8892 I've now had papers published by both ApJ and AJ that have had 98% of the
8893 effort done in LyX; the last 2% was the LaTeX post-processing and a few
8895 I have had no trouble with the submission process, and I'm sure the journals
8896 were never aware that there might be a difference.
8897 So, go forth and publish!
8900 \begin_layout Section
8904 \begin_layout Standard
8907 David Johnson; updated by Richard Heck
8910 \begin_layout Standard
8911 \begin_inset VSpace bigskip
8917 \begin_layout Standard
8919 The AMS LaTeX layouts are set up to conform to suggested styles for mathematical
8920 papers to be submitted to American Mathematical Society publications.
8921 The layouts are not tailored to a specific journal, but easily can be.
8922 You should refer to the AMS documentation for specific instructions for
8923 each journal (usually it will entail only changing a single line in the
8925 That documentation is available on the Web at
8926 \begin_inset Flex URL
8929 \begin_layout Plain Layout
8937 \begin_inset Flex URL
8940 \begin_layout Plain Layout
8942 ftp://ftp.ams.org/pub/tex/amslatex/
8948 These layouts are appropriate, and useful, for any mathematical writing.
8952 \begin_layout Standard
8953 There are two basic AMS LaTeX layouts:
8956 \begin_layout Itemize
8957 amsart: The standard AMS article format.
8960 \begin_layout Itemize
8961 amsbook: the standard AMS book (really, monograph) format.
8965 \begin_layout Standard
8966 The layouts themselves contain only the minimum necessary to use the AMS
8968 They do not, in particular, contain any of the `theorem' environments used
8969 for setting theorems, lemmas, and the like.
8970 These are contained, instead, in the
8971 \begin_inset Flex Code
8974 \begin_layout Plain Layout
8980 module, which is loaded by default when when you select one of the AMS
8982 (It can also be used with other classes and can be removed, if you would
8983 rather use something else.) Less commonly used environments are in the
8984 \begin_inset Flex Code
8987 \begin_layout Plain Layout
8988 Theorems (AMS-Extended)
8993 module, which must be loaded manually.
8996 \begin_layout Standard
8997 By default, theorems and the like are numbered consecutively throughout
8998 the document, but this may be modified by loading the module
8999 \begin_inset Flex Code
9002 \begin_layout Plain Layout
9003 Theorems (Order by Section)
9008 or, if you are using
9009 \begin_inset Flex Code
9012 \begin_layout Plain Layout
9019 \begin_inset Flex Code
9022 \begin_layout Plain Layout
9023 Theorems (Order by Chapter)
9029 These will number the results as
9030 \begin_inset Formula $n.m$
9033 , where the first number refers to the section (or chapter) and the second
9034 refers to the total number of results so far in that section (or chapter).
9035 Many environments are also available unnumbered.
9036 These are indicated by an asterisk at the end.
9037 If you happen to want
9041 unnumbered results, the module
9042 \begin_inset Flex Code
9045 \begin_layout Plain Layout
9051 provides that option.
9054 \begin_layout Standard
9055 Note that these modules do not
9059 to be used with the AMS classes.
9060 It is perfectly possible to use the
9061 \begin_inset Flex Code
9064 \begin_layout Plain Layout
9070 module, and the others mentioned, with other classes, such as
9071 \begin_inset Flex Code
9074 \begin_layout Plain Layout
9081 \begin_inset Flex Code
9084 \begin_layout Plain Layout
9091 \begin_inset Flex Code
9094 \begin_layout Plain Layout
9103 \begin_layout Subsection
9104 What these layouts provide
9107 \begin_layout Standard
9108 There is a long list of included environments provided by these layouts.
9109 In AMS-LaTeX, there is, in fact, an opportunity to define an unlimited
9110 variety of `theorem' environments.
9111 However, the AMS recommends the environments that are available in LyX.
9115 \begin_layout Standard
9116 The following environments—as well as the standard environments, such as
9118 \begin_inset Flex Noun
9121 \begin_layout Plain Layout
9128 \begin_inset Flex Noun
9131 \begin_layout Plain Layout
9138 \begin_inset Flex Noun
9141 \begin_layout Plain Layout
9148 \begin_inset Flex Noun
9151 \begin_layout Plain Layout
9158 \begin_inset Flex Noun
9161 \begin_layout Plain Layout
9168 \begin_inset Flex Code
9171 \begin_layout Plain Layout
9178 \begin_inset Flex Code
9181 \begin_layout Plain Layout
9190 \begin_layout Description
9191 Address This should be the author's permanent address.
9194 \begin_layout Description
9196 \begin_inset space ~
9199 Address This should be the author's temporary address at the time of submission,
9200 if different from the Address.
9203 \begin_layout Description
9204 Email Author's e-mail address
9207 \begin_layout Description
9208 URL Author's Web address, if desired.
9211 \begin_layout Description
9212 Keywords Key words or phrases used to identify specific topics discussed
9216 \begin_layout Description
9217 Subjectclass These refer to the AMS Subject Classifications, published and
9220 Mathematical Reviews
9223 These are also available online at the AMS cites listed above.
9226 \begin_layout Description
9230 \begin_layout Description
9234 \begin_layout Description
9238 \begin_layout Standard
9239 The following environments are provided by both the
9240 \begin_inset Flex Code
9243 \begin_layout Plain Layout
9250 \begin_inset Flex Code
9253 \begin_layout Plain Layout
9259 modules, in the latter case in both starred (unnumbered) and unstarred
9260 (numbered) versions.
9261 These same environments are provided only in the starred versions by the
9263 \begin_inset Flex Code
9266 \begin_layout Plain Layout
9275 \begin_layout Theorem
9276 This is typically used for the statements of major results.
9280 \begin_layout Corollary*
9281 This is used for statements which follow fairly directly from previous statement
9283 Again, these can be major results.
9288 These are smaller results needed to prove other statements.
9291 \begin_layout Proposition
9292 These are less major results which (hopefully) add to the general theory
9296 \begin_layout Conjecture
9297 These are statements provided without justification, which the author does
9298 not know how to prove, but which seem to be true (to the author, at least).
9301 \begin_layout Definition*
9302 Guess what this is for.
9303 The font is different for this environment than for the previous ones.
9307 \begin_layout Example*
9308 Used for examples illustrating proven results.
9311 \begin_layout Problem
9312 It's not really known what this is for.
9313 You should figure it out.
9316 \begin_layout Exercise*
9317 Write a description for this one.
9320 \begin_layout Remark
9321 This environment is also a type of theorem, usually a lesser sort of observation.
9324 \begin_layout Claim*
9325 Often used in the course of giving a proof of a larger result.
9329 Generally, these are used to break up long arguments, using specific instances
9335 The numbering scheme for cases is on its own, not together with other numbered
9341 At the end of this environment, a QED symbol (usually a square, but it can
9342 vary with different styles) is placed.
9343 If you want to have other environments within this one—for example, Case
9344 environments—and have the QED symbol appear only after them, then the other
9345 environments need to be nested within the proof environment.
9348 Nesting Environments
9354 for information on nesting.
9357 \begin_layout Standard
9358 And these environments are provided by
9359 \begin_inset Flex Code
9362 \begin_layout Plain Layout
9363 Theorems (AMS-Extended)
9371 \begin_layout Criterion*
9372 A required condition.
9375 \begin_layout Algorithm*
9376 A general procedure to be used.
9379 \begin_layout Axiom*
9380 This is a property or statement taken as true within the system being discussed.
9383 \begin_layout Condition*
9384 Sometimes used to state a condition assumed within the present context of
9389 Similar to a Remark.
9392 \begin_layout Notation*
9393 Used for the explanation of, yes, notation.
9396 \begin_layout Summary
9397 Do we really need to tell you?
9400 \begin_layout Acknowledgement*
9404 \begin_layout Conclusion*
9405 Sometimes used at the end of a long train of argument.
9409 Used in a way similar to Proposition, though perhaps lower on the scale.
9412 \begin_layout Standard
9413 In addition, the AMS classes automatically provide the AMS LaTeX and AMS
9415 They need to be available on your system in order to use these environments.
9418 \begin_layout Section
9426 \begin_layout Standard
9432 \begin_layout Subsection
9436 \begin_layout Standard
9437 These are the layout files for some of the journals of the American Geophysical
9439 It is assumed that you have both the AGU's own class files and AGUplus
9440 installed (everything to be found at
9441 \begin_inset Flex URL
9444 \begin_layout Plain Layout
9446 ftp://ftp.agu.org/journals/latex/journals
9454 \begin_layout Subsection
9458 \begin_layout Standard
9468 They are still called this in the LyX GUI, though their LaTeX equivalents
9469 in the AGU classes are
9480 \begin_layout Standard
9481 Newly defined styles are
9518 These are mostly manuscript attributes and defined in the AGU class documentati
9522 \begin_layout Standard
9523 I suspect this is still badly incomplete.
9526 \begin_layout Subsection
9530 \begin_layout Standard
9547 \begin_layout Subsection
9551 \begin_layout Itemize
9554 Journal of Geophysical Research
9563 \begin_layout Standard
9564 Add your own, it isn't so hard! Look at the
9575 \begin_layout Subsection
9576 Bugs and things to remember
9579 \begin_layout Standard
9580 In order to use the new layouts, you must remember to do the following for
9584 \begin_layout Enumerate
9590 This can be done in the
9592 Layout\SpecialChar \menuseparator
9597 Document\SpecialChar \menuseparator
9601 (AGU articles are always in English, right? So
9608 \begin_layout Enumerate
9618 (Yes, this is a bug.)
9621 \begin_layout Enumerate
9622 Make sure you use the
9626 bibliography style, by entering
9630 into the second field of the BibTeX inset.
9631 None of the standard styles will do.
9634 \begin_layout Section
9638 \begin_layout Standard
9644 \begin_layout Subsection
9648 \begin_layout Standard
9649 Broadway is for writing plays.
9650 The format is more decorative than Hollywood, and much less standardized.
9651 This format should be suitable for workshops.
9654 \begin_layout Subsection
9658 \begin_layout Standard
9659 The same as in Hollywood.
9662 \begin_layout Subsection
9666 \begin_layout Standard
9671 names as labels then cross-reference the label to insert the name.
9672 The cross-reference dialog will show the current cast of characters.
9675 \begin_layout Subsection
9676 Paper size and Margins
9679 \begin_layout Standard
9680 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
9683 \begin_layout Subsection
9687 \begin_layout Standard
9688 The following environments are available.
9689 You can use broadway.bind to get the bind keys shown at the right.
9692 \begin_layout Itemize
9696 \begin_inset Newline newline
9701 You should not have to use this, but it is here for anything that does not
9705 \begin_layout Itemize
9709 \begin_inset space \hfill{}
9713 \begin_inset Newline newline
9718 Used to describe stage setting and the action.
9719 First use of speaker names in all CAPs.
9722 \begin_layout Itemize
9726 \begin_inset space \hfill{}
9730 \begin_inset Newline newline
9735 Automatically numbered.
9736 On screen it will be arabic, but will print as Roman.
9739 \begin_layout Itemize
9743 \begin_inset space \hfill{}
9747 \begin_inset Newline newline
9757 It is just centered text.
9760 \begin_layout Itemize
9764 \begin_inset space \hfill{}
9768 \begin_inset Newline newline
9773 Not automatically numbered.
9774 You supply the number.
9775 This is because I couldn't figure out how.
9778 \begin_layout Itemize
9782 \begin_inset space \hfill{}
9786 \begin_inset Newline newline
9791 A special case of Narrative to describe the setting and action as the curtain
9795 \begin_layout Itemize
9799 \begin_inset space \hfill{}
9803 \begin_inset Newline newline
9808 The speaker's (actor's) title, centered in all CAPS.
9811 \begin_layout Itemize
9815 \begin_inset space \hfill{}
9819 \begin_inset Newline newline
9824 Instructions to the speaker.
9825 The parentheses are automatically inserted.
9826 The ( will appear on screen, but both will be in the printed play.
9827 This environment is only used within
9834 \begin_layout Itemize
9838 \begin_inset space \hfill{}
9842 \begin_inset Newline newline
9847 What the Speaker says.
9850 \begin_layout Itemize
9854 \begin_inset space \hfill{}
9858 \begin_inset Newline newline
9863 The curtain comes down.
9866 \begin_layout Itemize
9870 \begin_inset space \hfill{}
9876 \begin_layout Itemize
9880 \begin_inset space \hfill{}
9886 \begin_layout Itemize
9890 \begin_inset space \hfill{}
9896 \begin_layout Standard
9900 \begin_layout Section
9904 \begin_layout Standard
9909 can be used to type letters according to German conventions.
9910 A template file is included in
9912 .../lyx/share/templates
9914 for you to use as a starting point.
9917 \begin_layout Section
9925 \begin_layout Standard
9931 \begin_layout Subsection
9935 \begin_layout Standard
9936 This is the layout file for the European Geophysical Society journals.
9941 can be downloaded from the web site of the EGS under
9942 \begin_inset Flex URL
9945 \begin_layout Plain Layout
9955 \begin_layout Subsection
9959 \begin_layout Standard
9962 Right_address, Latex_Title, Affil, Journal, msnumber, FirstAuthor, Received,
9970 The current layout file is unfortunately very unmodular and would benefit
9971 from using the various
9978 \begin_layout Section
9982 \begin_layout Standard
9988 \begin_layout Standard
9989 Elsevier Science Publishers B.V.
9990 provides a standard LaTeX document class (
9994 ) for submitting articles to their various journals.
9995 The style file can be downloaded directly from their web site:
9996 \begin_inset Flex URL
9999 \begin_layout Plain Layout
10001 http://www.elsevier.com/wps/find/authorsview.authors/latex
10007 Instructions are supplied along with the class file, which details the
10008 requirements of the publishers.
10009 LyX includes a package that allows for the use of this class, by a layout
10010 and a template file.
10011 Installation of the class file is the same as for any other LaTeX package;
10012 instructions are provided in the Elsevier documentation.
10015 \begin_layout Standard
10025 As the Elsevier class file is based mainly on the standard article class,
10026 most of the normal functionality is provided.
10027 The Elsevier class defines a number of mathematical environments, which
10028 are similar to the AMS environments.
10029 These commands are all described in the Elsevier documentation, and are
10033 \begin_layout Standard
10034 The easiest way to use the Elsevier style is to base documents on the included
10036 It is best not to use options such as fancy headings or the geometry package,
10037 as elements such as these are defined by Elsevier in their style file.
10038 Ideally, no extra packages except those mentioned in the Elsevier documentation
10040 Essentially, Elsevier require as
10041 \begin_inset Quotes eld
10045 \begin_inset Quotes erd
10048 a LaTeX file as possible, as their intention is to take the supplied file
10049 and replace the class file with one for the particular journal to which
10050 the paper has been submitted.
10051 This also means that not too much time should be spent on the formating
10053 When it comes to be published, this will change anyway.
10054 The rest of the usage for this layout is substantially the same as for
10055 the normal article class.
10056 For details of what Elsevier do and don't allow, refer to their documentation.
10059 \begin_layout Section
10065 \begin_inset CommandInset label
10074 \begin_layout Standard
10080 \begin_layout Subsection
10084 \begin_layout Standard
10085 This section describes how to use LyX to make slides for overhead projectors.
10086 There are two document classes that can do this: the default slides class
10092 This section documents the latter.
10095 \begin_layout Standard
10096 I'm going to say this again, nice and clear, so that there's no misunderstanding
10100 \begin_layout Standard
10101 \begin_inset VSpace bigskip
10107 \begin_layout Standard
10111 This section documents the class
10112 \begin_inset Quotes eld
10120 \begin_inset Quotes erd
10128 \begin_layout Standard
10129 \begin_inset VSpace bigskip
10135 \begin_layout Standard
10136 If you're looking for the documentation for
10137 \begin_inset Quotes eld
10145 \begin_inset Quotes erd
10148 , check out section
10149 \begin_inset space ~
10153 \begin_inset CommandInset ref
10155 reference "sec:slitex"
10160 If your machine doesn't have the
10165 \begin_inset Quotes eld
10173 \begin_inset Quotes erd
10176 ] installed, you'll probably have to use the default
10180 class, which isn't quite as good as
10185 \begin_layout Standard
10190 class is designed for use with version 2.1 of the
10194 LaTeX class file which is now an integral part of LaTeX2e.
10197 \begin_layout Subsection
10201 \begin_layout Standard
10202 Obviously, to use this document class, you need to select
10203 \begin_inset Quotes eld
10211 \begin_inset Quotes erd
10221 \begin_inset space ~
10227 There are some settings in the
10230 \begin_inset space ~
10235 dialog that you should know about that are specific to this class:
10238 \begin_layout Itemize
10239 Don't change the options
10250 \begin_inset space ~
10256 They're ignored by the
10263 \begin_layout Itemize
10264 The default font size is 20
10265 \begin_inset space \thinspace{}
10268 pt with the other options being 17
10269 \begin_inset space \thinspace{}
10273 \begin_inset space \thinspace{}
10277 \begin_inset space \thinspace{}
10283 \begin_layout Itemize
10284 The default font is
10292 but all math equations are still typeset in the usual roman font.
10295 \begin_layout Itemize
10300 supports A4 and Letter paper sizes as well as a special size for working
10302 \begin_inset space \thinspace{}
10306 It doesn't support A5, B5, legal or executive paper sizes.
10309 \begin_layout Itemize
10310 Don't bother changing the
10314 settings because they are ignored anyway.
10315 All floats appear where they are defined in the text.
10318 \begin_layout Itemize
10323 setting behaves a bit differently for this class.
10328 provides extensive footer and header capabilities including a user-defined
10331 \begin_inset space ~
10335 \begin_inset CommandInset ref
10337 reference "sec:foilfoot"
10342 The title page is treated differently to all other pages in the document
10351 has the logo centered at the bottom of the page (if one is defined).
10352 The possible page style choices and what they do are as follows:
10356 \begin_layout Labeling
10357 \labelwidthstring MMMMMMM
10364 The final output contains no page numbers, or other headers or footers
10365 (except footnotes of course).
10369 \begin_layout Labeling
10370 \labelwidthstring MMMMMMM
10377 The final output contains page numbers centered at the bottom of the page.
10378 No other headings or footers (other than footnotes).
10381 \begin_layout Labeling
10382 \labelwidthstring MMMMMMM
10387 Page numbers in lower right corner.
10388 Additional headers and footers are also shown.
10389 This is also the default.
10392 \begin_layout Labeling
10393 \labelwidthstring MMMMMMM
10398 Gives you access to the
10402 package although its use with
10406 is discouraged by the writer of the
10410 package because of some potential page layout clashes.
10414 \begin_layout Subsubsection
10418 \begin_layout Standard
10419 The following options may be used in the extra class options in the
10421 Document\SpecialChar \menuseparator
10427 \begin_layout Labeling
10428 \labelwidthstring MMMMMMx
10433 This sets up the page layout for 7.33
10434 \begin_inset space \thinspace{}
10438 \begin_inset space \thinspace{}
10441 in paper, which is about the same aspect ratio as a 35
10442 \begin_inset space \thinspace{}
10445 mm slide, making it a bit easier to work with this medium.
10448 \begin_layout Labeling
10449 \labelwidthstring MMMMMMx
10454 Places a rule across the page below the header on every page except the
10458 \begin_layout Labeling
10459 \labelwidthstring MMMMMMx
10464 Places a rule across the page above the footer on every page except the
10468 \begin_layout Labeling
10469 \labelwidthstring MMMMMMx
10474 This is automatically set each time you create a new
10483 to use the dvips driver to rotate those pages that are set as landscape
10487 \begin_layout Labeling
10488 \labelwidthstring MMMMMMx
10493 Simply changes the page dimensions to those of a landscape page but doesn't
10495 Thus if you use this option you need to use an external program to rotate
10496 each page or feed your paper through your printer as landscape.
10497 Note that this option effectively reverses the roles of the
10505 environments (don't worry these are described in the next section).
10508 \begin_layout Labeling
10509 \labelwidthstring MMMMMMx
10514 Equation numbers on the left.
10517 \begin_layout Labeling
10518 \labelwidthstring MMMMMMx
10523 Flush-left equations.
10526 \begin_layout Subsection
10527 Supported Environments
10530 \begin_layout Standard
10531 Most of the environments commonly supported in other classes are also supported
10537 There are several additional environments provided by
10541 as well as a couple added by LyX.
10542 The following environments are shared with other classes:
10545 \begin_layout Standard
10549 \begin_layout Plain Layout
10553 begin{multicols}{2}
10561 \begin_layout Itemize
10567 \begin_layout Itemize
10573 \begin_layout Itemize
10579 \begin_layout Itemize
10585 \begin_layout Itemize
10591 \begin_layout Itemize
10597 \begin_layout Itemize
10603 \begin_layout Itemize
10609 \begin_layout Itemize
10615 \begin_layout Itemize
10621 \begin_layout Itemize
10627 \begin_layout Itemize
10633 \begin_layout Itemize
10639 \begin_layout Itemize
10645 \begin_layout Itemize
10651 \begin_layout Itemize
10657 \begin_layout Itemize
10663 \begin_layout Itemize
10669 \begin_layout Standard
10673 \begin_layout Plain Layout
10685 \begin_layout Standard
10686 That is, all the major environments apart from the sectioning environments.
10687 Since foils are essentially self-contained sections, with a title and body,
10692 provides specific commands for starting new foils and these are:
10695 \begin_layout Itemize
10701 \begin_layout Itemize
10707 \begin_layout Standard
10708 LyX also provides slightly modified versions of these two environments called:
10711 \begin_layout Itemize
10717 \begin_layout Itemize
10720 ShortRotatefoilhead
10723 \begin_layout Standard
10724 and the differences will be explained in the next section.
10727 \begin_layout Standard
10728 Since foils are often used in presenting ideas or new theorems and such
10733 also provides a comprehensive box of goodies for presenting them:
10736 \begin_layout Standard
10740 \begin_layout Plain Layout
10744 begin{multicols}{2}
10752 \begin_layout Itemize
10758 \begin_layout Itemize
10764 \begin_layout Itemize
10770 \begin_layout Itemize
10776 \begin_layout Itemize
10782 \begin_layout Itemize
10788 \begin_layout Itemize
10794 \begin_layout Itemize
10800 \begin_layout Itemize
10806 \begin_layout Itemize
10812 \begin_layout Itemize
10818 \begin_layout Standard
10822 \begin_layout Plain Layout
10834 \begin_layout Standard
10835 The starred versions are unnumbered while the unstarred versions are numbered.
10836 There are also two list environments added by LyX and these are:
10839 \begin_layout Itemize
10845 \begin_layout Itemize
10851 \begin_layout Standard
10856 provides some powerful header and footer capabilities that are best set
10857 in the preamble although they may be set at any point in a document.
10858 If you want to change these settings in your document the best place to
10859 do so is at the very top of a foil, i.
10860 \begin_inset space \thinspace{}
10866 \begin_inset space \space{}
10871 straight after the foilhead.
10874 \begin_layout Standard
10875 For this purpose, the following command styles are provided [
10882 \begin_layout Standard
10886 \begin_layout Plain Layout
10890 begin{multicols}{2}
10898 \begin_layout Itemize
10902 \begin_inset space ~
10908 \begin_layout Itemize
10914 \begin_layout Itemize
10918 \begin_inset space ~
10924 \begin_layout Itemize
10928 \begin_inset space ~
10934 \begin_layout Itemize
10938 \begin_inset space ~
10945 \begin_layout Standard
10946 \begin_inset space ~
10953 \begin_layout Standard
10957 \begin_layout Plain Layout
10969 \begin_layout Standard
10970 There are also a few commands provided by
10974 that aren't directly supported by LyX but I'll tell you what they do and
10975 how to use them in section
10976 \begin_inset space ~
10980 \begin_inset CommandInset ref
10982 reference "sec:unsuppfoils"
10989 \begin_layout Subsection
10990 Building a Set of Foils
10993 \begin_layout Standard
10994 This section will give a simple introduction to using the different environments
10995 to build a set of foils.
10996 If you want to see an example set of foils, take a look at the
11000 file you find in LyX's
11007 \begin_layout Subsubsection
11008 Give It a Title Page
11011 \begin_layout Standard
11012 Unlike other classes that provide
11032 creates the title on a page of its own.
11033 If you leave out the
11037 environment LaTeX will substitute the current date (every time you regenerate
11041 \begin_layout Subsubsection
11045 \begin_layout Standard
11046 As I mentioned earlier, there are four ways of starting a new foil.
11047 For portrait foils you should use
11056 The difference between these two environments is the amount of space between
11057 the title of the foil (the foilhead) and the body of the foil.
11060 \begin_layout Standard
11061 Landscape foils are generated using the
11067 ShortRotatefoilhead
11070 Again the only difference is the spacing between foilhead and body.
11071 Both of the short versions have 0.5 inches less separation between the foilhead
11076 \begin_layout Standard
11077 One problem with the support for landscape foils is the requirement that
11078 you have to use the
11082 driver to generate the PostScript output otherwise the foils won't be rotated.
11083 It is possible to get landscape foils even if you haven't got the
11087 driver provided you can feed your foils sideways through your printer ;-)
11090 \begin_layout Subsubsection
11091 Theorems, Lemmas, Proofs and more
11094 \begin_layout Standard
11095 Due to a small bug in LyX you can't have two of the same type of these environme
11096 nts directly following each other.
11097 They must be separated by something.
11098 If you try, you will just be extending the previous environment as if you
11099 had merged the two environments together.
11100 So, how do you get around this problem? The simplest option is to insert
11101 some text between the two environments or add a
11105 environment between the two with just a
11106 \begin_inset Quotes eld
11114 \begin_inset Quotes erd
11118 This will force LyX to produce two separate environments and hence the
11119 correct LaTeX output.
11120 An example is provided in the example file included with the LyX distribution.
11121 Remember, this problem only occurs if you are trying to place two of the
11122 same type of theorem-like environments one directly after the other.
11125 \begin_layout Subsubsection
11129 \begin_layout Standard
11130 You get all the commonly supported list styles found in other classes as
11131 well as two new ones.
11132 I'll only describe the new ones here.
11133 If you want to find out more about the other list environments check out
11139 If you intend to use itemized lists you might also want to read about the
11143 \begin_inset space ~
11147 \begin_inset space ~
11152 dialog described above in section
11153 \begin_inset space ~
11157 \begin_inset CommandInset ref
11159 reference "sec:bullet"
11166 \begin_layout Standard
11167 The two new list styles,
11175 , are designed to make it easier for you to create lists of do's and don'ts
11176 or right and wrong by providing dedicated environments that use a tick
11177 or a cross as the label of the list.
11178 These lists are in fact dedicated variants of the
11183 They do however require that you have the
11187 packages installed.
11190 \begin_layout Subsubsection
11194 \begin_layout Standard
11199 redefines the floating tables and figures so that they appear exactly where
11200 they are in the text rather than pushing them to the top of the page or
11201 to some user specified location.
11202 In fact if you change the float placement settings they are simply ignored.
11205 \begin_layout Subsubsection
11206 Page Headers and Footers
11207 \begin_inset CommandInset label
11209 name "sec:foilfoot"
11216 \begin_layout Standard
11220 \begin_inset space ~
11229 are two commands used to control the left-footer text string.
11230 The first is meant to allow you to include a graphic logo on your foils
11232 \begin_inset Quotes eld
11240 \begin_inset Quotes erd
11244 While the second is meant to provide a classification for the audience,
11248 \begin_inset space \thinspace{}
11254 \begin_inset space \space{}
11258 It is empty by default.
11261 \begin_layout Standard
11262 The remaining page corners can be filled by
11265 \begin_inset space ~
11270 (which defaults to page numbers),
11273 \begin_inset space ~
11281 \begin_inset space ~
11289 \begin_layout Subsection
11295 \begin_inset CommandInset label
11297 name "sec:unsuppfoils"
11304 \begin_layout Standard
11305 All the commands mentioned below need to be set in a
11313 within another environment.
11316 \begin_layout Subsubsection
11320 \begin_layout Standard
11321 All lengths are adjusted using the
11344 should be replaced by the name given to the length you want to change and
11349 is the length value.
11350 All lengths should be specified in units of length such as inches (
11362 ) or relative to some document or font-based length such as
11372 \begin_layout Standard
11373 It's possible to change the spacing between a foilhead and the body of the
11374 foil by adjusting the length specified by
11381 For example, to make
11386 \begin_inset space \space{}
11389 in closer to their bodies put the following in the preamble:
11395 foilheadskip}{-0.5in}
11398 \begin_layout Standard
11399 The spacings around floats can be adjusted by setting these lengths:
11402 \begin_layout Labeling
11403 \labelwidthstring MMMMMMMMMMM
11410 Separation between the text and the top of the float
11413 \begin_layout Labeling
11414 \labelwidthstring MMMMMMMMMMM
11421 Separation between the float and the caption
11424 \begin_layout Labeling
11425 \labelwidthstring MMMMMMMMMMM
11432 Separation between the caption and the following text
11435 \begin_layout Labeling
11436 \labelwidthstring MMMMMMMMMMM
11443 You can make the captions narrower than the surrounding text by adjusting
11445 Best done relative to
11454 \begin_layout Standard
11455 There are also several title page related lengths that you may find useful
11456 if you have a long title or several authors:
11459 \begin_layout Labeling
11460 \labelwidthstring MMMMMMMMMMM
11467 Separation from headers to
11472 \begin_layout Labeling
11473 \labelwidthstring MMMMMMMMMMM
11491 \begin_layout Labeling
11492 \labelwidthstring MMMMMMMMMMM
11506 \begin_layout Labeling
11507 \labelwidthstring MMMMMMMMMMM
11523 \begin_layout Labeling
11524 \labelwidthstring MMMMMMMMMMM
11540 \begin_layout Standard
11541 The last length related command affects all the list environments.
11552 a list environment then all the vertical spacing between the list items
11554 Note that this is a command not a length so it doesn't require
11560 like the stuff mentioned above.
11563 \begin_layout Subsubsection
11564 Headers and Footers
11567 \begin_layout Standard
11580 commands control whether the logo in the
11584 definition appear on a given page.
11591 in the preamble then none of the foils will have the logo on them.
11592 If you don't want the logo on a particular page place the
11598 directly after the foilhead of that page and the
11604 directly after the next foilhead.
11607 \begin_layout Standard
11608 If you decide to use the
11612 page style setting in the
11615 \begin_inset space ~
11620 dialog you should probably add
11630 to your preamble so headers and footers on landscape pages are correctly
11631 placed when rotated.
11632 This is due to some clashes between the page layouts provided by the
11643 \begin_layout Section
11644 Hollywood (Hollywood spec scripts)
11647 \begin_layout Standard
11653 \begin_layout Subsection
11657 \begin_layout Standard
11658 Getting the format of a Hollywood script right is a
11659 \begin_inset Quotes eld
11663 \begin_inset Quotes erd
11666 It is designed to make the readers focus on content and to be easy and
11667 familiar for the actors to read.
11668 Each page of a script should be one minute of film.
11669 Nothing goes in a script that you cannot see or hear on screen.
11670 The courier 12 pt font should be used throughout.
11674 \begin_layout Subsection
11678 \begin_layout Standard
11679 Speakers' lines should NEVER break in mid-sentence.
11680 If a speaker's lines continue over a page break, repeat the
11684 title followed by (Cont'd).
11687 \begin_layout Subsection
11691 \begin_layout Standard
11696 names as labels then cross-reference the label to insert the name.
11697 The cross-reference dialog will show the current cast of characters.
11698 You can use this to insert the speaker name in narratives also.
11701 \begin_layout Subsection
11702 Paper size and Margins
11705 \begin_layout Standard
11706 USLetter, left 1.6in, right 0.75in, top 0.5in, bottom 0.75in
11709 \begin_layout Subsection
11713 \begin_layout Standard
11714 The following environments are available.
11715 You can use hollywood.bind to get the bind keys shown at the right.
11718 \begin_layout Itemize
11722 \begin_inset Newline newline
11727 Used where nothing else works.
11731 \begin_layout Itemize
11737 \begin_inset space \hfill{}
11745 \begin_inset Newline newline
11748 Usually followed by something like
11749 \begin_inset Quotes eld
11752 on Sally waking up.
11753 \begin_inset Quotes erd
11759 \begin_layout Itemize
11763 \begin_inset space \hfill{}
11767 \begin_inset Newline newline
11772 Introduces a new INTERIOR camera set-up.
11773 Always followed by DAY or NIGHT, or something similar to define the lighting
11775 Everthing on this line in CAPS.
11778 \begin_layout Itemize
11782 \begin_inset space \hfill{}
11786 \begin_inset Newline newline
11791 Introduces a new EXTERIOR camera set-up.
11792 Everthing on this line in CAPS.
11795 \begin_layout Itemize
11799 \begin_inset space \hfill{}
11803 \begin_inset Newline newline
11808 The character speaking.
11811 \begin_layout Itemize
11815 \begin_inset space \hfill{}
11819 \begin_inset Newline newline
11824 Instructions to the speaker.
11825 The () are automatically inserted, but only the ( will show in LyX.
11826 Both will be printed.
11829 \begin_layout Itemize
11833 \begin_inset space \hfill{}
11837 \begin_inset Newline newline
11849 \begin_layout Itemize
11853 \begin_inset space \hfill{}
11857 \begin_inset Newline newline
11862 Camera movement instruction.
11864 \begin_inset space \thinspace{}
11868 \begin_inset space \space{}
11874 \begin_layout Itemize
11878 \begin_inset space \hfill{}
11884 \begin_layout Itemize
11888 \begin_inset space \hfill{}
11894 \begin_layout Itemize
11898 \begin_inset space \hfill{}
11904 \begin_layout Itemize
11908 \begin_inset space \hfill{}
11914 \begin_layout Subsection
11918 \begin_layout Itemize
11922 \begin_layout Itemize
11926 \begin_layout Itemize
11928 \begin_inset space \thinspace{}
11935 \begin_layout Itemize
11940 \begin_layout Itemize
11941 PAN — camera movement
11944 \begin_layout Itemize
11945 INSERT — cut to close-up of
11948 \begin_layout Section
11952 \begin_layout Standard
11955 Panayotis Papasotiriou
11958 \begin_layout Subsection
11962 \begin_layout Standard
11963 The ijmpc package is a set of macros that facilitates electronic manuscript
11966 International Journal of Modern Physics C
11969 Similarly, the ijmpd package is for creating manuscripts to be submitted
11972 International Journal of Modern Physics D
11975 Both journals are published by World Scientific.
11976 The corresponding document classes are named
11985 These files, together with instructions for the authors, can be downloaded
11987 \begin_inset Flex URL
11990 \begin_layout Plain Layout
11992 http://www.worldscinet.com/ijmpc/mkt/guidelines.shtml
11998 \begin_inset Flex URL
12001 \begin_layout Plain Layout
12003 http://www.worldscinet.com/ijmpd/mkt/guidelines.shtml
12009 Both packages are modified versions of the standard
12010 \begin_inset Quotes eld
12014 \begin_inset Quotes erd
12017 package, and they are almost (but not exactly) identical.
12018 Most of their features are supported by LyX.
12019 I have used LyX successfully to write articles submitted to both journals
12020 without any problem.
12023 \begin_layout Subsection
12027 \begin_layout Standard
12028 As usual, the easiest way to write a paper is to start with a template.
12031 File\SpecialChar \menuseparator
12050 This will give an (almost) empty document that includes the most common
12051 fields found in a manuscript.
12052 Simply overwrite the existing text (including the brackets,
12057 You should keep in mind the following remarks.
12060 \begin_layout Enumerate
12061 LyX won't let you change the font size and the page style of the document,
12062 because such modifications are not allowed by both packages.
12065 \begin_layout Enumerate
12066 The language of the document should not be changed.
12067 Before previewing your paper, be sure that the babel package is not used.
12068 To do this, click on
12070 Tools\SpecialChar \menuseparator
12081 checkbox in the language settings, and click on
12089 , if you wish to make this change permanent).
12092 \begin_layout Enumerate
12094 \begin_inset Quotes eld
12098 \begin_inset Quotes erd
12101 style must be used to define keywords.
12104 \begin_layout Enumerate
12105 The ijmpc package provides a style named
12106 \begin_inset Quotes eld
12109 Classification Codes
12110 \begin_inset Quotes erd
12113 , which can be used to define classification codes, such as PACS numbers.
12114 Note that this facility is not supported by the ijmpd package.
12117 \begin_layout Enumerate
12118 Several new environments are available:
12119 \begin_inset Quotes eld
12123 \begin_inset Quotes erd
12127 \begin_inset Quotes eld
12131 \begin_inset Quotes erd
12135 \begin_inset Quotes eld
12139 \begin_inset Quotes erd
12143 \begin_inset Quotes eld
12147 \begin_inset Quotes erd
12151 \begin_inset Quotes eld
12155 \begin_inset Quotes erd
12159 \begin_inset Quotes eld
12163 \begin_inset Quotes erd
12167 \begin_inset Quotes eld
12171 \begin_inset Quotes erd
12175 \begin_inset Quotes eld
12179 \begin_inset Quotes erd
12183 \begin_inset Quotes eld
12187 \begin_inset Quotes erd
12191 \begin_inset Quotes eld
12195 \begin_inset Quotes erd
12199 \begin_inset Quotes eld
12203 \begin_inset Quotes erd
12207 \begin_inset Quotes eld
12211 \begin_inset Quotes erd
12215 \begin_inset Quotes eld
12219 \begin_inset Quotes erd
12223 \begin_inset Quotes eld
12227 \begin_inset Quotes erd
12231 Their use is more or less obvious.
12232 LyX supports all these environments; it will use the proper label, text
12233 style, and numbering scheme for each of them.
12236 \begin_layout Enumerate
12237 Both packages use basic citations; the natbib package should not be used.
12238 In LyX, citation references are shown as usual; in the output, citations
12239 are shown as superscripts.
12240 If you want to use a citation as normal text, you should use the
12245 \begin_inset space \thinspace{}
12249 \begin_inset space \space{}
12253 \begin_inset Quotes eld
12257 \begin_inset space \space{}
12267 \begin_inset Quotes erd
12273 \begin_layout Enumerate
12275 \begin_inset Quotes eld
12279 \begin_inset Quotes erd
12282 section in both packages.
12283 To put acknowledgments, just use the
12284 \begin_inset Quotes eld
12288 \begin_inset Quotes erd
12294 \begin_layout Enumerate
12295 Appendices may be added to the paper,
12299 the Acknowledgments and
12304 LyX provides a special environment, called
12305 \begin_inset Quotes eld
12309 \begin_inset Quotes erd
12312 which marks the beginning of the appendices.
12313 This environment should be left blank; it just sends a LaTeX command, but
12314 nothing is really printed.
12316 \begin_inset Quotes eld
12320 \begin_inset Quotes erd
12323 is printed with blue letters, as a signal that all sections after that
12324 point are appendices.
12325 To write an appendix, use the
12326 \begin_inset Quotes eld
12330 \begin_inset Quotes erd
12334 LyX will number each appendix with capital letters, as required by both
12337 \begin_inset Quotes eld
12341 \begin_inset Quotes erd
12348 be present before the first appendix; if not, all appendices will be numbered
12349 as normal sections in the output.
12352 \begin_layout Enumerate
12353 The ijmpc and the ijmpd packages use the
12357 command to implement table captions.
12358 As a result, a table created by LyX is printed correctly, but its caption
12360 However, you can use some TeX code to overcome this problem, so that captions
12361 are printed as expected.
12362 To do so, create a float table as usual, remove the caption, and replace
12363 it with the TeX code
12373 (sic); you must also the TeX code
12377 immediately after the tabular material.
12378 Study the example table included in the template files to see how this
12379 trick is implemented.
12380 Alternatively, If you need table captions, you should implement the whole
12385 file, then include this file to the LyX document (
12387 Insert\SpecialChar \menuseparator
12388 File\SpecialChar \menuseparator
12390 \begin_inset space ~
12396 Details on how to create a table float can be found in the files
12404 , included in the corresponding packages.
12407 \begin_layout Subsection
12408 Preparing a paper for submission
12411 \begin_layout Standard
12412 Before you submit your paper you must export the LyX document as a LaTeX
12415 File\SpecialChar \menuseparator
12416 Export\SpecialChar \menuseparator
12423 \begin_layout Plain Layout
12424 Actually you have the choice between LaTeX (plain) and pdflatex.
12425 If you intend to use pdflatex to prepare the paper, you should use the
12426 pdflatex option so that included graphics are converted to PDF format,
12427 ready for use by pdflatex.
12432 , then make the following changes to the resulting
12439 \begin_layout Enumerate
12440 Remove the comment lines before the
12449 \begin_layout Enumerate
12450 Remove everything between (and including) the
12462 commands, except for any commands you specifically put into the LaTeX preamble.
12465 \begin_layout Standard
12470 file should be saved and processed through LaTeX as many times as necessary.
12471 You may also want to check the resulting
12478 \begin_layout Subsection
12482 \begin_layout Standard
12483 The use of TeX code is reduced to two commands, which must be placed at
12484 the top of the document.
12485 If you started writing your paper by using the
12493 template, the TeX code needed is already in its place; you usually don't
12495 You may only modify the first TeX code to specify the information printed
12496 to the top of odd and even pages (authors' names and short paper's title,
12498 This TeX code must have the form
12502 markboth{Authors' Names}{Short Paper's Title}
12507 \begin_layout Section
12511 \begin_layout Standard
12517 \begin_layout Subsection
12521 \begin_layout Standard
12522 The iopart package provides a document class to create electronic manuscript
12523 submission to the journals published by the Institute of Physics.
12524 Instructions for the authors how to create a paper using the iopart class
12525 can be downloaded together with the iopart package from the site
12526 \begin_inset Flex URL
12529 \begin_layout Plain Layout
12531 ftp://ftp.iop.org/pub/journals/latex2e
12539 \begin_layout Subsection
12543 \begin_layout Standard
12544 The easiest way to write a paper is to start with the file
12548 that is available in LyX's examples files folder.
12549 Open this file, save it under a new name, and start writing.
12550 The example file explains how to use the special text environments.
12551 Here are the most important advices:
12554 \begin_layout Itemize
12555 To be able to compile your document to a PDF, PS, or DVI, ensure that the
12558 Use AMS math package
12560 in the document settings under
12567 \begin_layout Itemize
12570 The title environment defines the kind of your paper.
12571 So use one of the following environments for the title:
12575 \begin_layout Itemize
12584 \begin_layout Itemize
12593 \begin_layout Itemize
12599 for a Topical review
12602 \begin_layout Itemize
12611 \begin_layout Itemize
12620 \begin_layout Itemize
12626 for a Paper (same as Title)
12629 \begin_layout Itemize
12635 for a Preliminary communication
12638 \begin_layout Itemize
12644 for a Rapid communication
12647 \begin_layout Itemize
12653 for a Letter to the editor
12657 \begin_layout Itemize
12660 All title environments except of
12664 can have an optional short title.
12667 \begin_layout Itemize
12668 There is a general title environment
12672 which is not directly supported by the LyX.
12673 This can be used as TeX code when your document doesn't fit into one of
12674 the other title types.
12677 \begin_layout Standard
12678 For more informations like hints for special table and formula formatting,
12679 look at the IOP author guidelines.
12682 \begin_layout Section
12686 \begin_layout Standard
12689 Panayotis Papasotiriou
12692 \begin_layout Subsection
12696 \begin_layout Standard
12697 The Kluwer package is a set of macros produced by Kluwer Academic Publishers
12698 that facilitates electronic manuscript submission to the journals they
12700 Most known of them (at least in my domain of interest) are
12702 Astrophysics and Space Science
12708 , but there are many others (see a complete list at
12709 \begin_inset Flex URL
12712 \begin_layout Plain Layout
12714 http://www.wkap.nl/jrnllist.htm/JRNLHOME
12720 The Kluwer package may be downloaded from the site
12721 \begin_inset Flex URL
12724 \begin_layout Plain Layout
12726 http://www.wkap.nl/kaphtml.htm/STYLEFILES
12732 A complete user guide is contained in that package (but it can also be
12733 downloaded separately).
12736 \begin_layout Standard
12737 LyX supports many features of the package but not everything.
12738 However, the TeX code needed is reduced to some
12739 \begin_inset Quotes eld
12743 \begin_inset Quotes erd
12746 commands of the package (see
12747 \begin_inset space ~
12751 \begin_inset CommandInset ref
12753 reference "subsec:kluwer_peculiarities"
12758 I have recently used LyX to write an article submitted to the
12760 Astrophysics and Space Science
12762 without any problem.
12765 \begin_layout Subsection
12769 \begin_layout Standard
12770 The easiest way to write a paper is to start with the Kluwer template file.
12773 File\SpecialChar \menuseparator
12785 This will give an (almost) empty document that includes the most common
12786 fields found in a manuscript and a short description of their use.
12787 As in most templates, simply overwrite the existing text (including the
12792 ) with the correct information.
12795 \begin_layout Subsection
12796 Preparing a paper for submission
12799 \begin_layout Standard
12800 As in the AASTeX package, before you submit your paper to a journal you
12802 \begin_inset Quotes eld
12806 \begin_inset Quotes erd
12812 \begin_layout Enumerate
12813 Export your paper as a LaTeX file.
12814 To do this, click on
12816 File\SpecialChar \menuseparator
12817 Export\SpecialChar \menuseparator
12824 \begin_layout Enumerate
12829 file with a text editor and make the following changes
12833 \begin_layout Enumerate
12834 remove the comment lines before the
12843 \begin_layout Enumerate
12844 remove everything between (and including) the
12856 commands, except for any commands you specifically put into the LaTeX preamble.
12859 \begin_layout Standard
12868 \begin_layout Enumerate
12873 file through LaTeX as many times as necessary (usually up to three).
12876 \begin_layout Enumerate
12882 \begin_inset space \thinspace{}
12886 \begin_inset space \space{}
12893 , and check if everything is OK (it should, if you didn't make any mistake).
12896 \begin_layout Subsection
12897 \begin_inset Quotes eld
12901 \begin_inset Quotes erd
12904 of the Kluwer package
12905 \begin_inset CommandInset label
12907 name "subsec:kluwer_peculiarities"
12914 \begin_layout Standard
12915 The Kluwer package has the following
12916 \begin_inset Quotes eld
12920 \begin_inset Quotes erd
12926 \begin_layout Enumerate
12927 It is possible to write multiple articles in the same LaTeX file
12931 \begin_layout Plain Layout
12932 I can't imagine any good reason to do this.
12938 Each article must be included in the environment
12939 \begin_inset Quotes eld
12943 \begin_inset Quotes erd
12947 Unfortunately, this environment cannot be omitted, even if you write just
12949 Therefore, each article starts with the command
12955 and, obviously, ends with the command
12962 Although this can be implemented in LyX, I didn't included it, since it
12963 looks ugly and can confuse the novice user.
12964 Therefore, you need to enter them directly and mark them as LaTeX code
12966 \begin_inset Quotes eld
12970 \begin_inset Quotes erd
12976 \begin_layout Enumerate
12977 Information given at the beginning of the article (i.
12978 \begin_inset space \thinspace{}
12982 \begin_inset space \space{}
12985 title, subtitle, author, institution, running title, running author, abstract
12986 and keywords) must be included in an environment called
12987 \begin_inset Quotes eld
12991 \begin_inset Quotes erd
12995 This is not implemented in LyX, so you must enter title, subtitle etc.
12996 \begin_inset space ~
12999 between two TeX code lines (
13014 \begin_layout Enumerate
13015 According to the user manual, the label of each bibliography item must be
13039 \begin_layout Standard
13044 template takes care of all these
13045 \begin_inset Quotes eld
13049 \begin_inset Quotes erd
13053 If you start a new paper using this template you don't need to do anything
13058 \begin_layout Enumerate
13059 don't delete the TeX code included in the template, and
13062 \begin_layout Enumerate
13063 copy the example bibliography item included in the template and modify it
13064 as necessary to enter new bibliography items.
13067 \begin_layout Section
13071 \begin_layout Standard
13077 \begin_layout Subsection
13081 \begin_layout Standard
13082 The LyX document classes
13084 article (koma-script)
13088 report (koma-script)
13106 correspond to the LaTeX document classes
13123 \begin_inset space ~
13126 of the Koma-Script family.
13127 They are replacements for the standard document classes
13143 , resp., and fit better to European typography conventions in a number of
13147 \begin_layout Itemize
13148 Standard character size is 11pt in
13150 article (koma-script)
13154 report (koma-script)
13162 letter (koma-script)
13167 \begin_layout Itemize
13168 Headings, labels of the description environment, and a number of elements
13171 letter (koma-script)
13173 document class are set in a bold sans serif font.
13177 \begin_layout Plain Layout
13178 There is a big difference between the bold sans serif old cm fonts and new
13179 ec fonts, especially in the appearance of headings.
13180 In comparison, the ec bold sans serif fonts look a bit thin.
13181 Here the LaTeX package
13189 helps to produce the
13190 \begin_inset Quotes eld
13194 \begin_inset Quotes erd
13197 appearance when using the ec fonts.
13202 The numbering of chapter headings is made in the same way as the numbering
13203 of section headings, that is without the extra line
13204 \begin_inset Quotes eld
13207 Chapter\SpecialChar \ldots{}
13209 \begin_inset Quotes erd
13213 In addition, the appearance of the headings can be modified by using a
13214 number of options (in LyX to be entered in the field
13217 \begin_inset space ~
13224 Layout\SpecialChar \menuseparator
13231 \begin_layout Itemize
13232 The main means in the Koma-Script document classes to design the type area
13241 (in LyX to be entered in the extra class options field in the dialog
13243 Document\SpecialChar \menuseparator
13247 They make a clearer modification of page margins possible as do the options
13250 Document\SpecialChar \menuseparator
13257 \begin_layout Itemize
13258 The LaTeX document classes of the Koma-Script family define a number of
13259 additional commands.
13260 Those part of it which makes sense in LyX is implemented in corresponding
13264 \begin_layout Standard
13265 Detailed descriptions of the LaTeX document classes of the Koma-Script family
13266 can be found in the Koma-Script documentation
13277 \begin_layout Subsection
13278 article (koma-script), report (koma-script), and book (koma-script)
13281 \begin_layout Standard
13282 The document classes
13284 article (koma-script)
13288 report (koma-script)
13298 are implemented in the layout files
13311 They contain all the paragraph types of the corresponding standard document
13324 , resp., partly modified, with the exception of the LyX specific
13328 -type, which is replaced by the new
13332 -type having the same functionality.
13337 -Type there is a number of new paragraph types added.
13344 letter (koma-script)
13349 \begin_layout Itemize
13358 : are equivalents to
13366 , resp., additionally inserting an entry in the table of contents.
13375 are not contained in
13377 article (koma-script)
13382 \begin_layout Itemize
13391 : behave exactly as
13399 , resp., additionally clearing running heads.
13404 is not contained in
13406 article (koma-script)
13412 \begin_layout Plain Layout
13425 report (koma-script)
13427 , but since this is identical to
13431 , is has not been implemented in LyX.
13439 \begin_layout Itemize
13444 : generates a heading directly above the following paragraph in the standard
13445 character size without affecting the structure of the document.
13448 \begin_layout Itemize
13457 are special captions which respect the different space settings needed
13458 for captions placed above or below an element (if you follow strict typographic
13459 rules, you might want to place table captions always above the table).
13460 You can also use the class option
13464 , which will switch
13477 You need at least Koma-Script version 2.8q to use this.
13480 \begin_layout Itemize
13485 : can be used to set a bonmot, e.
13486 \begin_inset space \thinspace{}
13490 \begin_inset space \space{}
13493 at the beginning of a chapter.
13494 If you use the optional argument (
13496 Insert\SpecialChar \menuseparator
13498 \begin_inset space ~
13503 ), you can insert the dictum's author there.
13504 Dictum and author are separated by a line.
13505 You need at least Koma-Script version 2.8q to use this.
13510 is not contained in
13512 article (koma-script)
13517 \begin_layout Standard
13518 The following types, together with the standard types
13530 , form the title area of the document.
13531 They must be entered ahead of the first
13532 \begin_inset Quotes eld
13536 \begin_inset Quotes erd
13543 \begin_layout Plain Layout
13544 The corresponding LaTeX commands must appear before the
13555 When such a type is used more than once, the latter usage overwrites the
13556 former one, that means, for every type only the latest usage is valid.
13557 The order of the different types however has, like
13569 , no effect on the appearance of the produced document.
13572 \begin_layout Itemize
13577 : produces a centered paragraph above the ordinary title (
13589 ) for the subject of the document.
13592 \begin_layout Itemize
13597 : produces a centered paragraph below the ordinary title (
13609 ) for the publishers' name.
13612 \begin_layout Itemize
13619 report (koma-script)
13625 produces a centered paragraph on its own page behind the title page, or
13628 article (koma-script)
13630 produces a centered paragraph below the ordinary title (
13646 ) for a dedication.
13649 \begin_layout Itemize
13654 : produces a left aligned paragraph above the ordinary title (
13670 ) for a document`s head.
13673 \begin_layout Itemize
13678 : produces in a double-sided print in
13680 report (koma-script)
13686 a left-aligned paragraph at the top of the title page`s back or has no
13687 effect in a single-sided print or in
13689 article (koma-script)
13694 \begin_layout Itemize
13699 : produces in a double-sided print in
13701 report (koma-script)
13707 a left-aligned paragraph at the bottom of the title page`s back or has
13708 no effect in a single-sided print or in
13710 article (koma-script)
13715 \begin_layout Itemize
13720 : produces a special
13721 \begin_inset Quotes eld
13725 \begin_inset Quotes erd
13728 page ahead of the actual document containing a paragraph without special
13732 \begin_layout Standard
13733 The layout files for the document classes
13735 article (koma-script)
13739 report (koma-script)
13745 do include the file
13750 This is thought of as a place to define your own types.
13755 in your personal layout directory and edit the file!
13758 \begin_layout Subsection
13759 letter (koma-script)
13762 \begin_layout Standard
13766 \begin_layout Plain Layout
13778 \begin_layout Standard
13782 letter (koma-script)
13784 is implemented in the layout file
13789 It contains all the paragraph types of the corresponding standard document
13794 , partly modified, with the exception of the LyX specific types
13806 type, which is replaced by the new
13811 In addition, it contains, in contrast to the standard document class, the
13829 Furthermore, there are a number of new letter specific types.
13832 \begin_layout Standard
13836 \begin_layout Plain Layout
13848 \begin_layout Standard
13849 The appearance of the letter produced by this document class can be controlled
13850 by a number of LaTeX commands, which you can put in the LaTeX preamble.
13854 \begin_layout Plain Layout
13855 For example, the standard appearance of the letter`s heading, consisting
13856 of name and address, is quite self-willed.
13858 \begin_inset Quotes eld
13862 \begin_inset Quotes erd
13865 heading is produced by the following LaTeX commands in the preamble:
13868 \begin_layout LyX-Code
13878 \begin_layout LyX-Code
13894 \begin_layout LyX-Code
13904 \begin_layout LyX-Code
13924 A detailed German description of such LaTeX commands can be found in the
13925 Koma-Script documentation
13930 With it, the letter's author can produce his personal letter layout.
13933 \begin_layout Standard
13942 define the beginning of the letter and must be used in every letter.
13943 To emphasize them in the LyX document class, they are marked with the letter
13953 \begin_inset space ~
13956 in the left margin.
13957 It is possible to write any number of letters in one file.
13962 type produces a new letter using the same addressee and a
13966 type produces a new addressee.
13983 are ordinary paragraph types and can also be used several times in one
13984 and the same letter.
13987 \begin_layout Itemize
13992 : produces a paragraph for the addressee and implicitly defines the beginning
13996 \begin_layout Itemize
14001 : produces a paragraph for the form of address and implicitly produces a
14005 \begin_layout Itemize
14010 : produces a paragraph for a close.
14013 \begin_layout Itemize
14018 : produces a paragraph for a postscript.
14021 \begin_layout Itemize
14026 : produces a paragraph for a distribution list.
14029 \begin_layout Itemize
14034 : produces a paragraph for enclosures.
14037 \begin_layout Standard
14078 are input types provided with a label to enter information, which will
14079 be processed by the document class.
14083 \begin_layout Plain Layout
14084 It could be seen as a matter of inconsequence, that the types
14092 described above are not such input types as well.
14093 Because of the special meaning of those types, however, I have implemented
14094 them as ordinary paragraph types with a one letter mark in the left margin.
14095 Moreover, it would affect my feeling of symmetry, if the
14103 type had such a serious different appearance.
14108 The types must be used ahead of the corresponding
14115 \begin_layout Standard
14116 An implementation of these types in a WYSIWYG fashion does not seem to make
14117 sense, because the real appearance of the produced letter does not only
14118 depend on the usage of the particular type, but also on other factors.
14119 For example, a signature entered in the
14123 type will in the standard behavior appear in the produced letter only,
14124 when in the same letter also a
14129 The entered value of the
14133 type will in the standard behavior not appear in the produced letter at
14135 The possibility to design the letter`s heading freely is already indicated
14136 in a footnote above.
14139 \begin_layout Standard
14140 The input types can also be used as empty paragraphs.
14141 This makes sense e.
14142 \begin_inset space \thinspace{}
14146 \begin_inset space \space{}
14158 type is not used at all, in the standard behavior the value of the
14162 type is used as signature, whereas if an empty
14166 type is used, no signature value is defined.
14169 \begin_layout Standard
14170 By using the input types it is possible to write a letter template, containing
14171 filled input types with your personal dates (name, address, etc.) and empty
14172 input types for other dates you want to enter.
14175 \begin_layout Itemize
14180 : sender's name, in the standard behavior appears as a centered paragraph
14181 in small caps in the letter`s heading.
14184 \begin_layout Itemize
14189 : sender's signature, in the standard behavior appears below the
14198 type is used, the value of the
14202 type appears instead.
14205 \begin_layout Itemize
14210 : sender's address, in the standard behavior appears in a centered paragraph
14211 in the letter`s heading below the sender's name.
14214 \begin_layout Itemize
14219 : sender's telephone number, in the standard behavior only sets the LaTeX
14229 \begin_layout Itemize
14234 : place of the letter`s making.
14237 \begin_layout Itemize
14242 : date of the letter`s making.
14251 , in the standard behavior, produce the place and the date in a right-aligned
14252 line below the addressee's field.
14257 type is used, neither place nor date appear, independent of the value of
14267 type is used, the date of the letter `s production is used.
14270 \begin_layout Itemize
14275 : sender`s back address, in the standard behavior appears above the addressee's
14276 field in a small sans serif font.
14279 \begin_layout Itemize
14284 : special mail information, in the standard behavior appears underlined
14285 above the addressee's field below the back address.
14288 \begin_layout Itemize
14293 : additional information, in the standard behavior appears on right side
14294 below the addressee`s field.
14297 \begin_layout Itemize
14302 : the letter's title, in the standard behavior appears in a big, bold, sans
14303 serif font above the subject.
14306 \begin_layout Itemize
14311 : the letter's subject, in the standard behavior appears in a bold font
14319 \begin_layout Standard
14340 produce a business letter like line above the
14344 line containing the fields
14345 \begin_inset Quotes eld
14349 \begin_inset Quotes erd
14353 \begin_inset Quotes eld
14357 \begin_inset Quotes erd
14361 \begin_inset Quotes eld
14365 \begin_inset Quotes erd
14369 \begin_inset Quotes eld
14373 \begin_inset Quotes erd
14377 \begin_inset Quotes eld
14381 \begin_inset Quotes erd
14385 \begin_inset Quotes eld
14389 \begin_inset Quotes erd
14393 For the date field, the value of the
14399 \begin_inset Quotes eld
14402 business letter types
14403 \begin_inset Quotes erd
14406 is used, the value of the
14410 type however does not appear, but only the LaTeX variable
14417 The ordinary output of place and date in a right-aligned line below the
14418 addressee`s field is suppressed.
14419 The types are implemented as input types provided with a label and must
14420 be used ahead of the corresponding
14427 \begin_layout Itemize
14435 \begin_layout Itemize
14443 \begin_layout Itemize
14451 \begin_layout Itemize
14459 \begin_layout Itemize
14467 \begin_layout Subsection
14468 The new letter class: letter (koma-script v.2)
14471 \begin_layout Standard
14477 \begin_layout Standard
14478 \begin_inset VSpace medskip
14484 \begin_layout Standard
14486 Koma-Script version 2.8 has introduced a new letter class
14490 which supersedes the now unsupported
14495 It has — on the LaTeX side — a completely new interface and is not compatible
14496 with the old class.
14497 Therefore, LyX supports both, though it is recommended you use the new
14501 \begin_layout Standard
14502 This class covers the same functionality as
14504 letter (koma-script),
14507 The basic items are
14511 (receiver's address, same as
14515 in the old layout),
14528 will start a new letter (i.
14529 \begin_inset space \thinspace{}
14533 \begin_inset space \space{}
14536 you can write several letters per document).
14537 New elements are sender's
14553 and the possibility to use a
14559 Insert\SpecialChar \menuseparator
14565 \begin_layout Standard
14566 The biggest improvement is, though, that the letter's layout is configurable
14567 to meet almost any needs.
14568 This can be done via the preamble or with a special style file (Letter
14569 Class Option, extension
14573 ), that will be read in as a class option.
14577 \begin_layout Plain Layout
14578 The KOMA package comes with some default
14583 There is, for instance, a
14587 file that follows german typesetting rules, or a
14591 that provides the default layout of the old
14596 The latter can be loaded with the class option
14605 ayout\SpecialChar \menuseparator
14610 ocument\SpecialChar \menuseparator
14622 template that is included in LyX for examples.
14623 A detailed description is to be found in the Koma-Script documentation
14631 \begin_layout Subsection
14635 \begin_layout Standard
14636 Visualizing the Koma-Script document classes in LyX, the LyX internals cause
14640 \begin_layout Itemize
14641 The chapter number of a
14645 type appears on a line of its own above the chapter heading instead of
14646 appearing in the same line ahead of it.
14647 The cause for that is the LyX internal behavior for the labeltype
14651 in the layout file.
14654 \begin_layout Itemize
14655 The headings of the types
14663 are only put in the
14664 \begin_inset Quotes eld
14668 \begin_inset Quotes erd
14671 LaTeX table of contents, but not in the LyX table of contents (
14673 Document\SpecialChar \menuseparator
14675 \begin_inset space ~
14679 \begin_inset space ~
14687 \begin_layout Itemize
14688 The paragraphs in a
14692 document class appear in a skip separation mode, not indented.
14693 This is the standard behavior, no special LaTeX commands are needed for
14697 Document\SpecialChar \menuseparator
14700 dialog the corresponding radio button indicates
14709 value always has the effect that extra LaTeX commands are inserted in the
14710 document to produce the gap, which is not what is wanted in this case.
14713 \begin_layout Section
14714 Latex8 (IEEE Conference Papers)
14717 \begin_layout Standard
14723 \begin_layout Subsection
14727 \begin_layout Standard
14728 Since this class is specifically for writing submissions to IEEE sponsored
14729 conferences I strongly recommend that you get a copy of their Authors Kit.
14734 package and associated bibliography style file is included in the kit.
14735 The Authors Kit is usually sent out by email once your initial submission
14737 There is a lot of useful information in the Authors Kit explaining formatting
14738 restrictions and so on and I will assume you have read this since that
14739 means I don't have to repeat it all here.
14742 \begin_layout Subsection
14746 \begin_layout Standard
14747 [AR\SpecialChar \@.
14751 \begin_layout Subsection
14752 Supported Environments
14755 \begin_layout Itemize
14761 \begin_layout Itemize
14767 \begin_layout Itemize
14773 \begin_layout Itemize
14779 \begin_layout Itemize
14785 \begin_layout Itemize
14791 \begin_layout Itemize
14797 \begin_layout Itemize
14803 \begin_layout Itemize
14809 \begin_layout Subsection
14810 Differences Between Screen and Paper
14813 \begin_layout Standard
14814 There are slight differences in appearance mainly with the presentation
14815 of section counters.
14816 On screen the trailing period of the section counter is missing but it
14817 will appear in the output so don't let this worry you.
14820 \begin_layout Section
14824 \begin_layout Standard
14830 \begin_layout Subsection
14834 \begin_layout Standard
14835 Memoir is a very powerful and constantly evolving class.
14836 It has been designed with regard to fictional and non-fictional literature.
14837 Its aim is to let the user have maximum control over the typesetting of
14839 Memoir is based on the standard book class, but it can also emulate the
14840 article class (see below).
14843 \begin_layout Standard
14844 Peter Wilson, the developer of Memoir, is known as the author of lots of
14845 useful packages in the LaTeX world.
14846 Most of them have been merged with Memoir.
14847 Therefore, it is much easier to layout the table of contents, appendices,
14848 chapter designs and such.
14849 LyX, though, does not support all of these goodies natively.
14850 Some of them might be added to forthcoming releases
14854 \begin_layout Plain Layout
14855 You are invited to send suggestions to
14856 \begin_inset Flex URL
14859 \begin_layout Plain Layout
14861 lyx-devel@lists.lyx.org
14871 , lots will probably never, due to the limitations of LyX's framework.
14872 Of course you can still use all features with the help of some native LaTeX
14877 \begin_layout Plain Layout
14882 \begin_layout Plain Layout
14892 \begin_inset space ~
14896 \begin_inset CommandInset ref
14898 reference "sec:Inserting-TeX-Code"
14908 In this section, we can only list those features which are natively supported
14910 For detailed descriptions (and for the rest of features) we recommend you
14911 have a look at the detailed manual of the Memoir class
14915 \begin_layout Plain Layout
14920 \begin_layout Plain Layout
14930 \begin_inset Flex URL
14933 \begin_layout Plain Layout
14935 CTAN:/macros/latex/memoir/memman.pdf
14945 , which is not only a user guide for the class, but also both a comprehensive
14946 description on good typesetting and a superb example for good typesetting
14950 \begin_layout Subsection
14951 Basic features and restrictions
14954 \begin_layout Standard
14955 Memoir supports basically all features of the standard book classes.
14956 There are, however, some differences, as follows:
14959 \begin_layout Description
14961 \begin_inset space ~
14964 sizes: Memoir has a broader range of font sizes: 9, 10, 11, 12, 14, 17
14967 \begin_layout Description
14969 \begin_inset space ~
14972 style: The fancy page style is not supported, due to a command clash between
14973 Memoir and the fancyhdr package (they both define a command with the same
14974 name, which confuses LaTeX).
14975 Instead, Memoir comes with a number of its own page styles (see
14977 Layout\SpecialChar \menuseparator
14978 Document\SpecialChar \menuseparator
14980 \begin_inset space ~
14986 If you want to use these for the chapter pages, you have to use the command
14993 in the main text or in preamble (e.
14994 \begin_inset space \thinspace{}
14998 \begin_inset space \space{}
15005 chapterstyle{companion}
15010 \begin_layout Description
15011 Sectioning: Sectionings (chapter, section, subsection etc.) come with an
15012 optional argument in the standard classes.
15013 With this, you can specify an alternative version of the title for the
15014 table of contents and the headers (for instance, if the title is too long).
15015 In LyX, you can do this via
15017 Insert\SpecialChar \menuseparator
15019 \begin_inset space ~
15024 at the beginning of a chapter/section.
15025 Memoir features a second optional argument and thus separates the table
15026 of contents from the header.
15027 You can define three variants of a title with this: one for the main text,
15028 one for the table of contents, and one for the headers.
15029 Simply insert two optional arguments if you need this feature, the first
15030 one containing the short title for the Table of Contents, the second one
15031 containing an alternative short title for the headers.
15034 \begin_layout Description
15035 TOC/LOT/LOF: In the standard classes (and in many other classes), the table
15036 of contents, the list of figures and the list of table start a new page
15038 Memoir does not follow this route.
15039 You have to insert a page break yourself, if you want to have one.
15042 \begin_layout Description
15043 Titlepage: For some unknown reason, Memoir uses pagination on the title
15044 page (in the standard classes, title pages are
15045 \begin_inset Quotes eld
15049 \begin_inset Quotes erd
15053 \begin_inset space \thinspace{}
15057 \begin_inset space \space{}
15061 If you want an empty title page, type
15065 aliaspagestyle{title}{empty}
15070 \begin_layout Description
15071 Article: With the class option
15077 Layout\SpecialChar \menuseparator
15078 Document\SpecialChar \menuseparator
15080 \begin_inset space ~
15085 ), you can emulate article style.
15086 That is, counters (footnotes, figures, tables etc.) will not be reset on
15087 new chapters, chapters don't start a new page (but are—in contrary to
15088 \begin_inset Quotes eld
15092 \begin_inset Quotes erd
15095 article classes—still allowed), parts, though, use their own page, as in
15099 \begin_layout Description
15100 Oldfontcommands: By default, Memoir does not allow the use of the deprecated
15101 font commands, which have been used in the old LaTeX version 2.09 (e.
15102 \begin_inset space \thinspace{}
15106 \begin_inset space \space{}
15122 It produces an error and stops LaTeX whenever such a command appears.
15127 reallows the commands and spits out warnings instead (which does at least
15129 Since a lot of packages and particularly BibTeX style files are still using
15130 those commands, we have decided to use this option by default.
15133 \begin_layout Subsection
15137 \begin_layout Standard
15138 We will only describe the features supported by LyX (which is not much currently
15140 Please consult the Memoir manual
15144 \begin_layout Plain Layout
15149 \begin_layout Plain Layout
15159 \begin_inset Flex URL
15162 \begin_layout Plain Layout
15164 CTAN:/macros/latex/memoir/memman.pdf
15177 \begin_layout Description
15178 Abstract: You may wonder why an abstract is an extra feature.
15179 Well, it is in book class.
15180 Usually books don't have abstracts.
15181 Memoir, however, has.
15182 You can use it wherever and how often you like.
15185 \begin_layout Description
15186 Chapterprecis: You may know this older typesetting style: The contents of
15187 a chapter are summarized below the title and also in the table of contents
15189 \begin_inset space \thinspace{}
15193 \begin_inset space \space{}
15198 Our hero arrives in Troia; he loses some friends; he finds others
15201 Chapterprecis does exactly this.
15202 It is therefore only sensible below a chapter.
15205 \begin_layout Description
15206 Epigraph: An epigraph is a smart slogan or motto at the beginning of a chapter.
15207 The epigraph environment provides an elegant way of typesetting such a
15209 The motto itself (text) and its author (source) are divided by a short
15211 Unfortunately, we have to fool LyX a bit here again, since the environment
15212 needs two arguments (text and source).
15213 In this case, we have to use curly brackets (in TeX mode) between the two
15224 <author of the slogan>.
15227 \begin_layout Description
15228 Poemtitle: Memoir has lots of possibilities to typeset poetry (up to very
15229 complex figurative poems).
15230 LyX can only support a few of them.
15231 One is poemtitle, which is a centered title for poems, which will also
15232 be added to the table of contents (verse is the standard environment for
15234 Memoir has some enhanced versions of verse, but you need to use TeX code,
15235 because they have to be nested inside regular verse environments, which
15236 is not possible with LyX).
15239 \begin_layout Description
15240 Poemtitle*: Same as poemtitle, but it adds no entry to the table of contents.
15243 \begin_layout Section
15244 Article (mwart), book (mwbk) and report (mwrep)
15245 \begin_inset Argument
15248 \begin_layout Plain Layout
15261 \begin_layout Standard
15267 \begin_layout Standard
15268 The LyX document classes
15284 correspond to the LaTeX document classes
15297 They are replacements for the standard document classes
15309 , resp., and fit better to Polish typography conventions in a number of points.
15313 \begin_layout Standard
15317 \begin_layout Itemize
15318 Unnumbered titles (with star, e.
15319 \begin_inset space \thinspace{}
15323 \begin_inset space \space{}
15330 ) are added into table of contents,
15333 \begin_layout Itemize
15334 Additional page styles:
15338 \begin_layout Description
15339 uheadings header with separated lines,
15342 \begin_layout Description
15343 myheadings custom header, contents headers via commands:
15358 \begin_layout Description
15359 myuheadings custom header with separated lines,
15362 \begin_layout Description
15363 outer page number is placed on outer side of page
15367 \begin_layout Itemize
15372 \begin_layout Description
15373 rmheadings serif titles — default,
15376 \begin_layout Description
15377 sfheadings sansserif titles,
15380 \begin_layout Description
15381 authortitle on title page first placed is author next title — default,
15384 \begin_layout Description
15385 titleauthor on title page first placed is title next author,
15388 \begin_layout Description
15389 withmarginpar reserve place on page for margins.
15393 \begin_layout Section
15397 \begin_layout Standard
15402 provides an alternative to the standard
15407 It provides similar functionality, but you might prefer this layout with
15408 sans serif sections, headings, and more.
15411 \begin_layout Section
15415 \begin_layout Standard
15421 \begin_layout Standard
15422 \begin_inset VSpace bigskip
15428 \begin_layout Standard
15433 \begin_inset space ~
15438 textclass works with the American Physical Sociey's RevTeX 4.0 (the
15439 \begin_inset Formula $\beta$
15442 release of May, 1999) class.
15445 \begin_layout Standard
15450 textclass, which works with RevTeX 3.1.
15451 However, v3.1 is basically obsolete, as it works with LaTeX 2.09.
15452 That means that it doesn't interact very well with LyX, which requires
15453 LaTeX2e, although it has been kludged to work.
15454 Since RevTeX 4.0 has been designed to work much more cleanly with LaTeX2e,
15458 \begin_inset space ~
15463 textclass should also be pretty easy to use.
15466 \begin_layout Standard
15467 These documents are supposed to be used in
15471 to the RevTeX 4.0 documents, so we don't describe any of the special RevTeX
15472 macros, and assume you'll know what to put in the preamble if necessary.
15475 \begin_layout Subsection
15479 \begin_layout Standard
15480 All you need to do is install RevTeX 4, as described in the package's README
15482 The package can be found at The RevTeX 4 Web Site
15483 \begin_inset Flex URL
15486 \begin_layout Plain Layout
15488 http://publish.aps.org/revtex4/
15494 Install it somewhere that LaTeX can see it.
15495 Test it by trying to LaTeX a short RevTeX 4 document in some random directory
15497 \begin_inset space \thinspace{}
15501 \begin_inset space \space{}
15504 not the directory where you installed the class file.) Then, if you reconfigure
15505 LyX, it will find the class file and let you use the RevTeX4 textclass.
15508 \begin_layout Standard
15509 Probably the easiest way to get started is either to import a RevTeX 4 document
15517 \begin_inset space ~
15522 template, found in the templates directory.
15525 \begin_layout Subsection
15529 \begin_layout Standard
15530 Optional arguments to
15537 \begin_inset Quotes eld
15541 \begin_inset Quotes erd
15545 \begin_inset Quotes eld
15549 \begin_inset Quotes erd
15559 \begin_inset space ~
15567 \begin_inset space ~
15573 Remember that in RevTeX, at least one optional argument is required!
15576 \begin_layout Standard
15577 Other preamble matter, like
15584 \begin_inset space ~
15590 \begin_inset space ~
15595 dialog, also as usual.
15598 \begin_layout Subsection
15602 \begin_layout Standard
15603 The layouts basically correspond to the commands in RevTeX4.0.
15604 For example, the Email layout corresponds to
15611 Note that (at least as of RevTeX 4.0 Beta), the
15619 layouts are exactly equivalent, so you shouldn't need to use both.
15623 \begin_layout Plain Layout
15624 In case you're curious, both were included so that
15628 would be able to translate both
15648 \begin_layout Subsection
15652 \begin_layout Standard
15653 There are a couple of important unique aspects of RevTeX 4 which might cause
15654 bugs that will be even more confusing in LyX.
15657 \begin_layout Standard
15675 The LyX equivalent is that there is a separate Thanks layout.
15680 write footnotes in the
15684 layout, or weird things may happen.
15685 See the RevTeX 4 documentation for more details.
15688 \begin_layout Standard
15692 \begin_inset space ~
15700 \begin_inset space ~
15709 layouts must be placed
15717 layout and the corresponding
15734 , the LaTeX won't compile.
15737 \begin_layout Subsection
15741 \begin_layout Standard
15742 The main problem with this layout is that you can't use the optional arguments
15743 to layouts like Email and Title.
15744 (The problem is not unique to this layout; you can't use optional arguments
15745 to the Section layouts either.) This means that after you export that file
15746 to LaTeX (which you'll need to do eventually to send it in to APS), you'll
15747 need to edit the LaTeX file with a text editor to add the optional arguments
15749 \begin_inset space \thinspace{}
15753 \begin_inset space \space{}
15756 the running title for the page headers.
15757 Lacking these layouts makes the
15763 (and the equivalent
15769 ) useless, so the corresponding layouts don't exist, and will have to be
15774 \begin_layout Plain Layout
15779 actually, LyX 1.3.0 supports some forms of optional arguments, but this layout
15780 has not been updated yet to take advantage of it.
15788 \begin_layout Section
15789 Springer Journals (
15796 \begin_layout Standard
15802 \begin_layout Subsection
15806 \begin_layout Standard
15807 These are the layout files for some of the journal formats used by Springer
15808 Verlag and listed on
15809 \begin_inset Flex URL
15812 \begin_layout Plain Layout
15814 http://www.springer.de/author/tex/help-journals.html
15819 , where you should also go to fetch the class files (yes, these are LaTeX2e
15821 It is a modular system: the things common to all journals are implemented
15826 , which journal-specific layout files (such as, e.
15827 \begin_inset space \thinspace{}
15831 \begin_inset space \space{}
15838 for Journal of Geodesy) can include.
15841 \begin_layout Standard
15842 This means that implementing support for any other Springer journal on this
15843 list is as simple as writing your own
15851 file following the outline given in
15859 \begin_layout Standard
15860 It is reasonably well tested only for the Journal of Geodesy.
15869 come with the standard LyX distribution.
15870 Install the relevant class file (downloaded from Springer) in a proper
15871 directory, reconfigure LaTeX (in the teTeX case by running
15875 , as root if necessary — doesn't LyX take care of this?), reconfigure LyX
15876 and it should work.
15879 \begin_layout Subsection
15883 \begin_layout Standard
15884 A large number of theorem-like styles —
15890 \SpecialChar \ldots{}
15896 \begin_layout Standard
15899 Headnote, Dedication, Subtitle, Running_LaTeX_Title, Author_Running, Institute,
15900 Mail, Offprints, Keywords, Acknowledgements, Acknowledgement
15903 See the Springer class file documentation for details.
15906 \begin_layout Subsection
15910 \begin_layout Itemize
15922 \begin_layout Itemize
15925 Probability Theory and Related Fields
15931 — Jean-Marc Lasgouttes
15934 \begin_layout Standard
15935 Add your own, it isn't so hard!
15938 \begin_layout Subsection
15942 \begin_layout Standard
15943 These files are partly based on the older
15947 , which was again based on a tinkered-with version of an old LaTeX 2.09 style
15948 file from Springer.
15953 layout, are now defunct.
15954 Jean-Marc Lasgouttes helped out big in making me find my way around the
15955 LyX layout file mechanism.
15958 \begin_layout Subsection
15962 \begin_layout Standard
15964 But probably less than in the old hacked-LaTeX
15971 \begin_layout Standard
15973 \begin_inset space \thinspace{}
15976 g.: does not display the number for theorem-like layouts, just #.
15979 \begin_layout Section
15985 \begin_inset CommandInset label
15994 \begin_layout Standard
16002 \begin_layout Subsection
16006 \begin_layout Standard
16007 This section describes how to use LyX to make slides for overhead projectors.
16008 There are two document classes that can do this: the default slides class
16014 This section documents the former.
16017 \begin_layout Standard
16018 I'm going to say this again, nice and clear, so that there's no misunderstanding
16022 \begin_layout Standard
16023 \begin_inset VSpace bigskip
16029 \begin_layout Standard
16033 This section documents the class
16034 \begin_inset Quotes eld
16042 \begin_inset Quotes erd
16050 \begin_layout Standard
16051 \begin_inset VSpace bigskip
16057 \begin_layout Standard
16058 If you're looking for the documentation for
16059 \begin_inset Quotes eld
16067 \begin_inset Quotes erd
16070 , check out section
16071 \begin_inset space ~
16075 \begin_inset CommandInset ref
16077 reference "sec:foiltex"
16087 \begin_inset Quotes eld
16095 \begin_inset Quotes erd
16098 ] is actually somewhat better than the default
16106 \begin_layout Plain Layout
16107 \SpecialChar \ldots{}
16108 or so I've been told repeatedly by its advocates.
16109 Having never used it, I have no idea if this claim is true or not.
16114 which this section documents.
16117 \begin_layout Standard
16118 This class is the LaTeX2e improvement of the old
16123 Every LaTeX2e distribution includes this class [which I'll just refer to
16125 \begin_inset Quotes eld
16133 \begin_inset Quotes erd
16136 from now on], so you're bound to have it.
16137 As I noted earlier, there are other classes, such as
16141 , which also produce slides for overhead projectors and do a better job
16143 However, there are some things which
16147 can do which the others can't, such as generate overlays.
16148 Read on to learn more!
16151 \begin_layout Subsection
16153 \begin_inset CommandInset label
16155 name "sec:slidesetup"
16162 \begin_layout Standard
16163 Obviously, to use this document class, you need to select
16164 \begin_inset Quotes eld
16172 \begin_inset Quotes erd
16175 from the class list in the
16177 Document\SpecialChar \menuseparator
16181 There are some other special things you should know about this class:
16184 \begin_layout Itemize
16185 Don't bother changing the options
16190 They're not supported by the
16197 \begin_layout Itemize
16201 \begin_inset space ~
16206 behaves a bit differently for this class.
16207 The possible choices and what they do are as follows:
16211 \begin_layout Description
16216 The final output contains page numbers in the lower right corner.
16219 \begin_layout Description
16228 , but also prints out any time markers you've put in.
16229 This is the default.
16232 \begin_layout Description
16237 The final output contains no page numbers, time markers, or alignment markers.
16241 \begin_layout Itemize
16246 class has an extra option:
16252 \begin_inset Quotes eld
16260 \begin_inset Quotes erd
16263 in the extra class options.
16267 \begin_layout Standard
16268 Using this options allows you to add time markers to
16274 \begin_inset space ~
16278 \begin_inset CommandInset ref
16280 reference "sec:slideNote"
16288 \begin_layout Standard
16289 You can also use the template file
16290 \begin_inset Quotes eld
16298 \begin_inset Quotes erd
16301 to automatically set up a document to use the
16307 File\SpecialChar \menuseparator
16309 \begin_inset space ~
16313 \begin_inset space ~
16318 to open your new document].
16319 The template file also contains some examples of the special paragraph
16320 environments used by this class.
16321 I'll describe those next.
16324 \begin_layout Subsection
16325 Paragraph Environments
16328 \begin_layout Subsubsection
16329 Supported Environments
16332 \begin_layout Standard
16333 The first thing you'll notice when you start up a new
16337 document is the font size and type: it's the equivalent of the size
16338 \begin_inset Quotes eld
16346 \begin_inset Quotes erd
16352 \begin_inset space ~
16358 This is also what's used in the output.
16360 \begin_inset Quotes eld
16364 \begin_inset Quotes erd
16367 to remind you that this is a slide.
16368 Your final slides will use a larger font; ergo, you'll have less space.
16369 Of course, the larger default screen font isn't WYSIWYG, only a reminder.
16372 \begin_layout Standard
16373 The next thing that becomes obvious is the changes to the paragraph environment
16374 pull-down box [at the far-left end of the toolbar].
16375 Most of the paragraph environments you're used to seeing are missing.
16376 There are also five new ones.
16381 class itself only supports certain paragraph environments:
16384 \begin_layout Itemize
16390 \begin_layout Itemize
16396 \begin_layout Itemize
16402 \begin_layout Itemize
16408 \begin_layout Itemize
16414 \begin_layout Itemize
16420 \begin_layout Itemize
16426 \begin_layout Itemize
16432 \begin_layout Itemize
16438 \begin_layout Itemize
16444 \begin_layout Itemize
16450 \begin_layout Standard
16451 All of the other standard environments, including the section-heading environmen
16452 ts, aren't used in the
16459 \begin_layout Standard
16460 On the other hand, you'll notice the following new environments:
16463 \begin_layout Itemize
16469 \begin_layout Itemize
16475 \begin_layout Itemize
16481 \begin_layout Itemize
16487 \begin_layout Itemize
16493 \begin_layout Standard
16494 These five are kind of quirky, due to a
16495 \begin_inset Quotes eld
16499 \begin_inset Quotes erd
16503 You see, LyX doesn't permit you to nest any other paragraph environment
16504 into an empty environment.
16505 Now, that's fine and dandy, but it means that you wouldn't be able to start
16506 a slide with anything except plain text.
16507 To deal with this, I've performed a little
16508 \begin_inset Quotes eld
16512 \begin_inset Quotes erd
16518 \begin_layout Subsubsection
16519 Quirks of the New Environments
16520 \begin_inset CommandInset label
16522 name "sec:slideQuirk"
16529 \begin_layout Standard
16530 All five of the new paragraph environments are somewhat quirky due to inherent
16531 limitiations in the current version of LyX.
16532 As I just mentioned, LyX forbids environments that begin with another environme
16534 To get around this, the
16538 environment isn't a paragraph environment as described in the
16546 \begin_layout Standard
16547 You should consider
16560 \begin_inset Quotes eld
16563 pseudo-environments.
16564 \begin_inset Quotes erd
16567 They look like a section heading or a
16568 \begin_inset Quotes eld
16576 \begin_inset Quotes erd
16579 but really begin a [and, if necessary, end the previous] paragraph environment.
16589 \begin_inset Quotes eld
16593 \begin_inset Quotes erd
16596 These two perform some action.
16599 \begin_layout Standard
16600 A common feature of all five environments,
16620 , is a rather long-ish label.
16621 The text following this label — ordinarily the contents of the paragraph
16622 environment — is utterly irrelevant for
16643 LyX completely ignores it.
16644 In fact, you can leave these five environments completely empty.
16648 \begin_layout Standard
16653 to put any text after the rather long-ish label, you might want to.
16654 This could be a short description of the contents of the
16659 In that case, enter your descriptive comment and hit
16663 as you normally would.
16666 \begin_layout Standard
16667 If, on the other hand, you don't want to enter any descriptive text, you'll
16668 hit another LyX quirk.
16669 LyX, like nature, abhors a vacuum, and will not let you start a new paragraph
16670 environment until you put something in the old one.
16674 \begin_layout Itemize
16675 Start entering the text that will
16703 \begin_layout Itemize
16704 Now move to the beginning of that paragraph.
16708 \begin_layout Itemize
16717 \begin_layout Itemize
16718 Finally, change this new, empty paragraph to a
16742 \begin_layout Standard
16743 Some future version of LyX will, hopefully, resolve this quirkiness\SpecialChar \ldots{}
16747 \begin_layout Subsection
16748 Making a Presentation with
16761 \begin_layout Subsubsection
16769 \begin_layout Standard
16770 If you're expecting this section to teach you how to actually make a presentatio
16771 n, you'll be sorely disappointed.
16772 Naturally, I'll describe all of the ways the
16776 class can assist you in preparing the materials for a presentation.
16777 Filling in the contents, however, is up to you.
16782 the LyX philosophy.]
16785 \begin_layout Standard
16790 environment [in the manner described in section
16791 \begin_inset space ~
16795 \begin_inset CommandInset ref
16797 reference "sec:slideQuirk"
16801 ] tells LyX to begin a new slide [duh].
16802 The label for this environment/
16803 \begin_inset Quotes erd
16807 \begin_inset Quotes erd
16811 \begin_inset Quotes eld
16815 \begin_inset Quotes erd
16818 in cool blue, followed by the label,
16819 \begin_inset Quotes eld
16823 \begin_inset Quotes erd
16827 Any text or paragraph environments that follow this one go on the new slide.
16831 \begin_layout Standard
16832 Slides are probably the only time you'll need to forcibly end pages in LyX
16833 (this can be specified in the
16838 In fact, you'll want to, once you finish entering the contents of one slide.
16839 If you've entered more text than can physically fit on a slide, the extra
16840 overflows onto a new slide.
16841 I don't recommend doing this, however, since the overflow slide won't have
16842 any page number on it.
16843 Furthermore, it may interfere with any
16847 you've made to accompany the oversized
16854 \begin_layout Standard
16863 environments work the same way as the
16868 They both create an
16869 \begin_inset Quotes eld
16873 \begin_inset Quotes erd
16876 followed by a label [
16877 \begin_inset Quotes eld
16881 \begin_inset Quotes erd
16885 \begin_inset Quotes eld
16889 \begin_inset Quotes erd
16893 The color is a stunning magenta instead of blue, and the
16894 \begin_inset Quotes eld
16898 \begin_inset Quotes erd
16901 will look different, in style and in length.
16902 The label fonts of all three also differ from one another.
16905 \begin_layout Standard
16910 , if the contents of a
16918 exceed the physical size of a slide or sheet of paper, the extra will overflow
16920 Again, you should avoid this.
16921 It defeats the whole purpose of
16932 \begin_layout Subsubsection
16942 \begin_layout Standard
16947 is a slide that sits atop another slide.
16948 Perhaps you wish to discuss a figure on the main
16952 before displaying the text associated with it.
16953 One way to accomplish this is tape a flap of dark paper over the part of
16958 you want to display later.
16959 This method fails, however, if you wish to overlap one graph with another,
16961 You would then have to fumble while speaking to align the two separate,
16966 s to align the two graphs.
16971 environment in both cases makes life much easier.
16974 \begin_layout Standard
16979 receives the page number of its
16980 \begin_inset Quotes eld
16984 \begin_inset Quotes erd
16992 \begin_inset Quotes eld
17000 \begin_inset Quotes erd
17007 \begin_layout Plain Layout
17008 Presumably, mutliple
17013 \begin_inset Quotes eld
17021 \begin_inset Quotes erd
17025 \begin_inset Quotes eld
17033 \begin_inset Quotes erd
17037 \begin_inset Quotes eld
17045 \begin_inset Quotes erd
17049 \begin_inset space ~
17052 appended to the page number of the parent
17062 Clearly, you want the contents of both the
17070 to each fit on a single physical slide! You should probably consider an
17076 \begin_inset Quotes eld
17080 \begin_inset Quotes erd
17092 class provides a visual cue for this: the label at the start of an
17096 is shorter than that at the start of a
17101 Lastly, when you generate printable output, you'll find alignment markers
17102 in all four corners of both the
17106 page and its parent
17111 These will assist you in lining up the two physical slides.
17114 \begin_layout Standard
17115 The major problem in overlaying two slides is aligning the contents of the
17116 two transparencies.
17117 How much space should you leave for that graph on the second slide? Worse
17118 still, what if you want a graph and a sentence on second slide, but there
17119 is text on the main transparency that goes in between them? You could try
17120 and insert vertical space of the right size.
17121 The better way is to use
17132 \begin_layout Standard
17133 As their names imply,
17141 are two command-like paragraph environments that make all subsequent text
17142 invisible and visible, respectively.
17144 \begin_inset space ~
17148 \begin_inset CommandInset ref
17150 reference "sec:slideQuirk"
17154 that you don't place anything
17158 these two environments, however.
17163 , it inserts a centered, sky-blue label into the page reading
17164 \begin_inset Quotes eld
17167 <Invisible Text Follows>
17168 \begin_inset Quotes erd
17172 For paragraphs following this label, the parts of the
17180 ; it doesn't matter which] where they would be contain instead blank space.
17184 \begin_layout Standard
17189 , the corresponding centered label is
17190 \begin_inset Quotes eld
17193 <Visible Text Follows>
17194 \begin_inset Quotes erd
17198 Paragraphs following this label behave normally.
17199 Note that the beginning of a new
17211 automatically shuts off an
17216 It's therefore not necessary to use
17227 \begin_layout Standard
17228 By now, it should be obvious how to create overlay transparencies using
17229 the proper combination of
17248 \begin_layout Enumerate
17253 , including everything that will appear on it, whether on the main slide
17261 \begin_layout Enumerate
17262 Before each figure or paragraph that will appear only on the
17271 If necessary, insert a
17275 environment after the
17282 \begin_layout Enumerate
17287 immediately following the
17294 \begin_layout Enumerate
17295 Copy the contents of this
17306 \begin_layout Enumerate
17311 , change all of the
17322 \begin_layout Standard
17324 You've just made an
17331 \begin_layout Standard
17332 There's one problem with the way I've designed the LyX
17336 class: you can't make text in the middle of a paragraph invisible, nor
17337 make text in the middle of an invisible paragraph visible again.
17338 To accomplish this feat, you'll need to use some inlined LaTeX codes.
17342 \begin_layout Plain Layout
17343 The commands of interest are:
17346 \begin_layout Itemize
17351 invisible \SpecialChar \ldots{}
17355 \begin_layout Itemize
17360 visible \SpecialChar \ldots{}
17364 \begin_layout Plain Layout
17365 \SpecialChar \ldots{}
17366 and need to be marked as TeX.
17368 \begin_inset Quotes eld
17372 \begin_inset Quotes erd
17375 you wish to change goes in between the brackets [and after the
17388 If you don't know how to mark text as TeX, see the appropriate section
17401 \begin_layout Subsubsection
17411 \begin_inset CommandInset label
17413 name "sec:slideNote"
17420 \begin_layout Standard
17429 is associated with a
17430 \begin_inset Quotes eld
17434 \begin_inset Quotes erd
17446 class provides visual cues.
17451 is shorter than that of a
17455 [yet longer than that of an
17459 ] and, like the label of an
17463 is shockingly magenta.
17464 Additionally, the printed
17468 has the page number of its
17469 \begin_inset Quotes eld
17473 \begin_inset Quotes erd
17481 \begin_inset Quotes eld
17489 \begin_inset Quotes erd
17493 \begin_inset Quotes eld
17501 \begin_inset Quotes erd
17505 \begin_inset Quotes eld
17513 \begin_inset Quotes erd
17517 You can have multiple
17521 s associated with a single
17533 , you'll probably want to break up long
17537 s so that they fit on a single sheet of paper.
17540 \begin_layout Standard
17545 is obvious: it contains anything additional you might want to say about
17551 It could also be used as a sheet of reminders for a particular
17556 In the case of the latter, you might want to make use of time markers.
17562 \begin_inset Quotes eld
17566 \begin_inset Quotes erd
17569 support for time markers, a
17574 So, you'll have to resort to using the LaTeX codes.
17577 \begin_layout Standard
17578 To use time markers, you'll need to specify the extra class option
17579 \begin_inset Quotes eld
17587 \begin_inset Quotes erd
17591 \begin_inset space ~
17595 \begin_inset CommandInset ref
17597 reference "sec:slidesetup"
17602 This option turns on timing marks, which will appear in the lower-left-hand
17608 To set what appears in the time marker, you use the LaTeX commands
17609 \begin_inset Quotes eld
17619 \begin_inset Quotes erd
17623 \begin_inset Quotes eld
17633 \begin_inset Quotes erd
17637 The arguments of both commands are time measured in seconds.
17639 \begin_inset Quotes eld
17649 \begin_inset Quotes erd
17652 sets the time marker to a given time.
17654 \begin_inset Quotes eld
17664 \begin_inset Quotes erd
17667 increments the time marker by the specified amount.
17668 Using time markers and
17672 s in this fashion, you can remind yourself how much time to spend on a particula
17680 \begin_layout Standard
17681 There's one last feature to describe.
17682 Clearly, you'd like to print out all of your
17690 s on transparencies while printing all of your
17707 with which it is associated.
17708 What's a person to do?
17711 \begin_layout Standard
17712 Luckily, there are two LaTeX commands that allow you to select what to print
17714 Both must be placed into the preamble of your document.
17716 \begin_inset Quotes eld
17728 \begin_inset Quotes erd
17731 will cause the output to contain only the
17740 Correspondingly, the command
17741 \begin_inset Quotes eld
17753 \begin_inset Quotes erd
17756 prevents the output of anything but
17761 I'd advise placing both commands in the preamble and initially comment
17763 You can then preview your entire presentation as you write.
17764 When you're done writing, you can then uncomment one of the two to select
17765 what you want to print.
17766 I like to uncomment
17767 \begin_inset Quotes eld
17779 \begin_inset Quotes erd
17782 , print to a file with
17783 \begin_inset Quotes eld
17791 \begin_inset Quotes erd
17794 in its name, comment it back out, then uncomment
17795 \begin_inset Quotes eld
17807 \begin_inset Quotes erd
17811 \begin_inset Quotes eld
17819 \begin_inset Quotes erd
17823 I can then send either file to a printer, loading transparencies or plain
17824 paper as appropriate.
17827 \begin_layout Standard
17828 You can also provide other arguments to the
17829 \begin_inset Quotes eld
17839 \begin_inset Quotes erd
17843 \begin_inset Quotes eld
17853 \begin_inset Quotes erd
17857 See a good LaTeX book for details.
17860 \begin_layout Subsection
17865 Class Template File
17868 \begin_layout Standard
17869 I have also provided a template file,
17870 \begin_inset Quotes eld
17878 \begin_inset Quotes erd
17886 To use it, begin your new presentation with
17891 ile\SpecialChar \menuseparator
17893 \begin_inset space ~
17897 \begin_inset space ~
17907 Your new LyX presentation file will contain an example
17928 additionally contain an example of the use of
17937 Lastly, the preamble will contain:
17940 \begin_layout LyX-Code
17941 % Uncomment to print out only slides and overlays
17944 \begin_layout LyX-Code
17948 \begin_layout LyX-Code
17954 \begin_inset Newline newline
17960 \begin_layout LyX-Code
17961 % Uncomment to print out only notes
17964 \begin_layout LyX-Code
17968 \begin_layout LyX-Code
17976 \begin_layout Standard
17977 One final thing: I created this class to support the LaTeX2e
17978 \begin_inset Quotes eld
17986 \begin_inset Quotes erd
17989 class, one of the built-in LaTeX2e classes.
17990 Neither I nor the rest of the LyX Team endorse or oppose the use of this
17991 built-in slide class.
17992 It's here if you want it or need it.
17993 There exist other LaTeX2e classes for creating presentations, such as the
17999 \begin_inset space ~
18003 \begin_inset CommandInset ref
18005 reference "sec:foiltex"
18010 \begin_inset Quotes eld
18018 \begin_inset Quotes erd
18021 package [present on some TeX distributions].
18022 The latter is not yet supported under LyX.
18026 \begin_layout Plain Layout
18027 Perhaps you can take on the task\SpecialChar \ldots{}
18033 I know nothing about these other classes.
18034 Try them out to see what sort of alternative they provide.
18037 \begin_layout Chapter
18038 LyX Features needing Extra Software
18041 \begin_layout Section
18045 \begin_layout Standard
18051 \begin_layout Subsection
18055 \begin_layout Standard
18064 \begin_layout Plain Layout
18069 is not yet available when you are using the LaTeX distribution MiKTeX.
18074 , you'll find in the
18081 \begin_inset space ~
18092 \begin_inset CommandInset href
18094 target "http://www.ctan.org/tex-archive/help/Catalogue/entries/chktex.html"
18101 \begin_layout Standard
18106 package is a program that was written by
18107 \begin_inset Flex Noun
18110 \begin_layout Plain Layout
18112 \begin_inset space ~
18120 in frustration because some constructs in LaTeX are sometimes non-intuitive,
18121 and easy to forget.
18122 The program runs over your LaTeX file, checks the integrity of the file,
18123 and flags some common errors.
18124 In other technical words, it is
18131 \begin_layout Standard
18132 Well, what is a syntax checker doing in LyX which is supposed to produce
18133 correct LaTeX anyways? The answer is simple: Just as
18137 not only checks the
18141 of C programs, but also does
18145 checks for type-errors,
18149 catches some common
18153 errors, in addition to the syntactical ones.
18158 is capable of detecting several common errors, such as
18161 \begin_layout Itemize
18162 Ellipsis detection:
18163 \begin_inset Newline newline
18166 Use \SpecialChar \ldots{}
18170 \begin_layout Itemize
18171 No space in front of/after parenthesis:
18172 \begin_inset Newline newline
18178 \begin_layout Itemize
18179 Enforcement of normal space after common abbreviations:
18180 \begin_inset Newline newline
18184 \begin_inset space \thinspace{}
18188 \begin_inset space \space{}
18191 is too wide spacing.
18194 \begin_layout Itemize
18195 Enforcement of end-of-sentence space when the last sentence ends with a
18197 \begin_inset Newline newline
18201 And this is wrong spacing.
18204 \begin_layout Itemize
18205 Space in front of labels and similar commands:
18206 \begin_inset Newline newline
18209 The label should stick right up to the text to avoid falling to a wrong
18212 \begin_inset CommandInset label
18222 \begin_layout Plain Layout
18223 This footnote is in danger of falling off to a wrong page
18228 The label is separated too much.
18231 \begin_layout Itemize
18232 Space in front of references, instead of hard spaces:
18233 \begin_inset Newline newline
18236 In you are in bad luck, the text will break right between the referenced
18237 text and reference number, and that's a pity.
18239 \begin_inset CommandInset ref
18241 reference "sec:chktex"
18248 \begin_layout Itemize
18250 \begin_inset Quotes eld
18254 \begin_inset Quotes erd
18258 \begin_inset Formula $\times$
18262 \begin_inset Newline newline
18265 2x2 looks cheap compared to
18266 \begin_inset Formula $2\times2$
18272 \begin_layout Standard
18273 and more \SpecialChar \ldots{}
18274 It is an invaluable tool when you are
18275 \begin_inset Quotes eld
18279 \begin_inset Quotes erd
18282 your document before printing, and you should run it right after the obligatory
18283 spelling check, and before you go fine tuning the typesetting.
18286 \begin_layout Subsection
18290 \begin_layout Standard
18291 If you have the program installed, usage is as simple as choosing
18293 Tools\SpecialChar \menuseparator
18295 \begin_inset space ~
18301 This will make LyX generate a LaTeX file of your document, start
18305 to check it, and then make LyX insert
18306 \begin_inset Quotes eld
18310 \begin_inset Quotes erd
18313 with the warnings from
18317 , if there were any.
18318 The warnings will be placed close to the point of the mistake, and you
18319 can quickly find them by using the
18321 Navigate\SpecialChar \menuseparator
18324 menu item, or the shortcut key
18333 Open the error boxes by clicking on them with the mouse, or use the shortcut
18342 bindings, or the corresponding
18351 Read the warning and correct the mistake, if it is a mistake.
18352 If you have trouble understanding what the warning is about, you can safely
18354 Remember that there is a hidden layer between the document on screen and
18355 the technical details in invoking
18359 , and this gap can make some warnings seem arcane or just right down plain
18363 \begin_layout Standard
18364 This document is an excellent testing bed for the feature, and it should
18365 provide quite a few warnings for you to fiddle with.
18366 Since computers are only so smart, expect most of the warnings to be false
18370 \begin_layout Subsection
18371 How to fine tune it
18374 \begin_layout Standard
18375 Sometimes, you'll find that
18379 makes more noise than suits your mood.
18380 Then you can choose not to use it, wait until your mood changes, or try
18385 to get better along with you.
18386 Another choice in the most desperate situations is to use
18388 View\SpecialChar \menuseparator
18390 \begin_inset space ~
18394 \begin_inset space ~
18398 \begin_inset space ~
18403 , which will get rid of all warnings instantly.
18406 \begin_layout Standard
18415 very configurable and extensible, you shouldn't expect to solve all problems
18421 Since LyX has to generate a somewhat special LaTeX file to be able to match
18422 the line numbers from the
18430 \begin_layout Plain Layout
18431 You can inspect the specific output from
18437 Edit\SpecialChar \menuseparator
18439 \begin_inset space ~
18443 \begin_inset space ~
18457 to the internal document structure, some of the warnings will not seen
18458 to appear correctly.
18459 There are two things you can do about this:
18462 \begin_layout Itemize
18467 invocation command line in
18483 installation configuration file (usually with the file
18488 See below to learn what warnings can be enabled and disabled on the command
18493 \begin_layout Itemize
18494 Export your document as a raw LaTeX file using
18496 File\SpecialChar \menuseparator
18497 Export\SpecialChar \menuseparator
18505 Invoked in this way, it can be a hassle to find the corresponding place
18506 in the document inside LyX, but with a little patience, you should be able
18510 \begin_layout Standard
18511 Here follows the warning messages that can be enabled and disabled in
18520 to disable a warning, and
18524 to enable a warning.
18525 The emphasized entries are disabled by default, because the default is
18528 chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
18533 \begin_layout Standard
18534 Notice that you should only use the options that enable and disable warnings,
18535 because LyX relies on some of the other command line parameters to be set
18536 in a specific way to have a chance to communicate with
18543 \begin_layout Enumerate
18547 Command terminated with space.
18550 \begin_layout Enumerate
18553 Non-breaking space (
18554 \begin_inset Quotes eld
18562 \begin_inset Quotes erd
18565 ) should have been used.
18568 \begin_layout Enumerate
18572 You should enclose the previous parenthesis with
18573 \begin_inset Quotes eld
18581 \begin_inset Quotes erd
18587 \begin_layout Enumerate
18590 Italic correction (
18591 \begin_inset Quotes eld
18601 \begin_inset Quotes erd
18604 ) found in non-italic buffer.
18607 \begin_layout Enumerate
18610 Italic correction (
18611 \begin_inset Quotes eld
18621 \begin_inset Quotes erd
18624 ) found more than once.
18627 \begin_layout Enumerate
18631 No italic correction (
18632 \begin_inset Quotes eld
18642 \begin_inset Quotes erd
18648 \begin_layout Enumerate
18652 \begin_inset Quotes eld
18660 \begin_inset Quotes erd
18664 \begin_inset Quotes eld
18672 \begin_inset Quotes erd
18678 \begin_layout Enumerate
18681 Wrong length of dash may have been used.
18684 \begin_layout Enumerate
18688 \begin_inset Quotes eld
18696 \begin_inset Quotes erd
18700 \begin_inset Quotes eld
18708 \begin_inset Quotes erd
18714 \begin_layout Enumerate
18718 \begin_inset Quotes eld
18726 \begin_inset Quotes erd
18732 \begin_layout Enumerate
18736 \begin_inset Quotes eld
18744 \begin_inset Quotes erd
18747 to achieve an ellipsis.
18750 \begin_layout Enumerate
18753 Inter-word spacing (
18754 \begin_inset Quotes eld
18764 \begin_inset Quotes eld
18767 ) should perhaps be used.
18770 \begin_layout Enumerate
18773 Inter-sentence spacing (
18774 \begin_inset Quotes eld
18784 \begin_inset Quotes erd
18787 ) should perhaps be used.
18790 \begin_layout Enumerate
18793 Could not find argument for command.
18796 \begin_layout Enumerate
18800 \begin_inset Quotes eld
18808 \begin_inset Quotes erd
18814 \begin_layout Enumerate
18817 Math mode still on at end of LaTeX file.
18820 \begin_layout Enumerate
18824 \begin_inset Quotes eld
18832 \begin_inset Quotes erd
18835 doesn't match the number of
18836 \begin_inset Quotes eld
18844 \begin_inset Quotes erd
18850 \begin_layout Enumerate
18853 You should use either
18856 \begin_inset Quotes eld
18864 \begin_inset Quotes erd
18869 as an alternative to
18870 \begin_inset Quotes eld
18878 \begin_inset Quotes erd
18884 \begin_layout Enumerate
18891 " (ASCII 39) instead of "
18898 \begin_layout Enumerate
18901 User-specified pattern found.
18904 \begin_layout Enumerate
18907 This command might not be intended.
18910 \begin_layout Enumerate
18917 \begin_layout Enumerate
18935 \begin_layout Enumerate
18938 Delete this space to maintain correct page references.
18941 \begin_layout Enumerate
18945 You might wish to put this between a pair of
18946 \begin_inset Quotes eld
18954 \begin_inset Quotes erd
18960 \begin_layout Enumerate
18963 You ought to remove spaces in front of punctuation.
18966 \begin_layout Enumerate
18969 Could not execute LaTeX command.
18972 \begin_layout Enumerate
18981 in front of small punctuation.
18984 \begin_layout Enumerate
18992 may look prettier here.
18995 \begin_layout Enumerate
18999 Multiple spaces detected in output.
19002 \begin_layout Enumerate
19005 This text may be ignored.
19008 \begin_layout Enumerate
19014 \begin_inset Quotes eld
19019 to begin quotation, not
19026 \begin_layout Enumerate
19033 to end quotation, not
19036 \begin_inset Quotes eld
19044 \begin_layout Enumerate
19050 \begin_layout Enumerate
19053 You should perhaps use
19054 \begin_inset Quotes eld
19062 \begin_inset Quotes erd
19068 \begin_layout Enumerate
19071 You should put a space in front of/after parenthesis.
19074 \begin_layout Enumerate
19077 You should avoid spaces in front of/after parenthesis.
19080 \begin_layout Enumerate
19084 You should not use punctuation in front of/after quotes.
19087 \begin_layout Enumerate
19090 Double space found.
19093 \begin_layout Enumerate
19096 You should put punctuation outside inner/inside display math mode.
19099 \begin_layout Enumerate
19102 You ought to not use primitive TeX in LaTeX code.
19105 \begin_layout Enumerate
19108 You should remove spaces in front of
19109 \begin_inset Quotes eld
19117 \begin_inset Quotes erd
19123 \begin_layout Enumerate
19126 \begin_inset Quotes eld
19134 \begin_inset Quotes erd
19137 is normally not followed by
19138 \begin_inset Quotes eld
19146 \begin_inset Quotes erd
19152 \begin_layout Standard
19153 In later versions of LyX, we hope to provide a more complete interface to
19154 this tool (and it's smaller cousin
19158 ) to exploit the full power of it.
19159 But it's not exactly useless as it is now: go try it on one of your existing
19160 documents of a certain length and be surprised.
19163 \begin_layout Section
19164 Version Control in LyX
19167 \begin_layout Standard
19170 Lars Gullik Bjønnes
19177 \begin_layout Subsection
19181 \begin_layout Standard
19182 A friend of mine wanted to try LyX for a group project.
19183 When he didn't find support for version control or file locking, he dropped
19185 This angered me a bit, so I thought that I should at least make support
19186 for RCS (with the possibility of CVS and/or SCCS as a future improvement.)
19187 This has been done.
19188 LyX now supports some of the most basic RCS/CVS/SVN commands.
19189 If you need something a bit more sophisticated you will have to do that
19190 manually in a terminal.
19193 \begin_layout Standard
19194 Before you begin to use the version control features in LyX, you should
19195 be familiar with RCS/CVS/SVN usage before start using it under LyX.
19196 Also note that CVS support is not as good as subversion support so we advice
19198 Good place to start with Subversion is SVN Book
19202 \begin_layout Plain Layout
19203 \begin_inset CommandInset href
19205 target "http://svnbook.red-bean.com/"
19215 In case of RCS you should read
19216 \begin_inset Quotes eld
19220 \begin_inset Quotes erd
19223 (a man file, read it with
19228 This file describes all the basic features of RCS.
19229 You should especially notice the comment about a RCS directory, and the
19230 notion of a master RCS file (the file ending in
19237 \begin_layout Standard
19238 The implementation in LyX assumes a recent version of the GNU RCS or CVS/SVN
19239 package—no guarantees are made for older versions.
19240 Most of the log messages are not currently displayed after operations —
19241 you can check them in Messages pane if unsure.
19244 \begin_layout Standard
19245 For introducing your own external commands consult vc-command in the manual
19249 \begin_layout Subsection
19250 RCS commands in LyX
19253 \begin_layout Standard
19254 The following sections describe the RCS commands supported by LyX.
19255 You can find them in the
19257 File\SpecialChar \menuseparator
19259 \begin_inset space ~
19265 LyX was tested against RCS 5.7.
19268 \begin_layout Subsubsection
19274 \begin_layout Standard
19275 If your document is not under revision control, this is the only item shown
19277 And if it is under revision control, the
19281 item is not visible.
19285 \begin_layout Standard
19286 This command registers your document with RCS (unless you are under the
19287 directory managed by CVS)\SpecialChar \@.
19288 You are asked interactively to supply an initial
19289 description of the document.
19290 The document is now set in Read-Only mode and you have to
19293 \begin_inset space ~
19297 \begin_inset space ~
19301 \begin_inset space ~
19306 , before making any changes to it.
19307 A document under revision control has a
19308 \begin_inset Quotes eld
19311 [RCS:<version> <locker>]
19312 \begin_inset Quotes erd
19315 item tagged to the filename in the minibuffer.
19318 \begin_layout Standard
19319 RCS command that is run:
19321 ci -q -u -i -t-"<initial description>" <file-name>
19324 \begin_layout Standard
19329 to understand the switches.
19333 \begin_layout Subsubsection
19339 \begin_layout Standard
19340 When you are finished editing a file, you check in your changes.
19341 When you do this, you are asked for a description of the changes.
19342 This is stored in the history log.
19343 The version number is bumped, your changes are applied to the master RCS
19344 file, the document is unlocked and set to Read-Only mode.
19348 \begin_layout Standard
19351 ci -q -u -m"<description>" <file-name>
19354 \begin_layout Subsubsection
19360 \begin_layout Standard
19361 By doing this you lock the document so that only you can edit it.
19362 This will also make the document Read-Write only for you.
19363 You will usually continue editing for a while and when you are finished
19364 you check in your changes.
19365 The status line is changed to reflect that you have locked the file.
19369 \begin_layout Standard
19372 co -q -l <file-name>
19375 \begin_layout Subsubsection
19378 Revert To Repository Version
19381 \begin_layout Standard
19382 This will discard all changes made to the document since the last check
19384 You get a warning before changes are discarded.
19387 \begin_layout Standard
19390 co -f -u<version> <file-name>
19393 \begin_layout Subsubsection
19399 \begin_layout Standard
19400 This makes as if the last check in never happened.
19401 No changes are made to the document loaded into LyX, but the last version
19402 is removed from the master RCS file.
19406 \begin_layout Standard
19409 rcs -o<version> <file-name>
19412 \begin_layout Subsubsection
19418 \begin_layout Standard
19419 This shows the complete history of the RCS document.
19424 is shown in a browser.
19432 \begin_layout Subsubsection
19436 \begin_layout Standard
19437 LyX supports RCS version number information (only), see
19438 \begin_inset CommandInset ref
19440 reference "sub:VCS-Revision-Information"
19447 \begin_layout Subsection
19448 CVS commands in LyX
19451 \begin_layout Standard
19452 A subset of CVS operations is supported by LyX.
19453 You can find the commands in the
19455 File\SpecialChar \menuseparator
19457 \begin_inset space ~
19463 The version control system SVN is more powerful, so please use it instead
19464 of CVS if possible.
19467 \begin_layout Subsubsection
19473 \begin_layout Standard
19474 If you start from scratch with CVS you have to create your repository and
19475 checkout the working copy with external tools.
19476 If you're using a client-server setup you may need to login before doing
19477 the first repository checkout.
19480 \begin_layout Standard
19481 If your documents are under revision control and others are using the same
19482 repository problems arise when different changes to the same document at
19483 the same location happen.
19484 Standard CVS repositories doesn't operate with a file locking mechanism.
19485 This may be surprising, but conflicts only occur if people disagree on
19486 the proper content of the same part of a document.
19487 So, if co-workers are used to communicate regularly, these conflicts occur
19489 If they don't communicate they have a fundamental problem anyway.
19490 Nevertheless some people like to work with so called
19491 \begin_inset Quotes eld
19495 \begin_inset Quotes erd
19499 If they do so the working copy of all files is readonly when checked out
19500 first and the user starts editing after using a special command to make
19501 the working copy writable.
19502 When the changes are checked in the working copy returns to readonly state.
19503 With LyX one has to edit the
19504 \begin_inset Flex Code
19507 \begin_layout Plain Layout
19513 file and add the line
19514 \begin_inset Flex Code
19517 \begin_layout Plain Layout
19523 to work with reserved checkouts.
19524 The benefit is the possibility to see who is using a writable copy of some
19526 It's not guaranteed only one user makes a copy writable.
19529 \begin_layout Standard
19530 LyX tries to guess if you're using reserved or non-reserved checkouts.
19531 If your working copy is readonly or it is writable and an additional copy
19532 of your document exists in the CVS/Base sub-directory a reserved otherwise
19533 a non-reserved checkout is assumed.
19534 When a reserved checkout is detected you have to use
19535 \begin_inset Flex MenuItem
19538 \begin_layout Plain Layout
19544 to make your working copy writable if it's readonly.
19546 \begin_inset Flex MenuItem
19549 \begin_layout Plain Layout
19555 operation is possible and that makes your working copy readonly again after
19556 transferring your changes to the repository.
19559 \begin_layout Standard
19560 More information about CVS can be found here
19561 \begin_inset Flex URL
19564 \begin_layout Plain Layout
19566 http://www.nongnu.org/cvs
19572 \begin_inset Flex URL
19575 \begin_layout Plain Layout
19577 http://ximbiot.com/cvs
19585 \begin_layout Standard
19590 to understand the sub-commands and the switches mentioned below.
19593 \begin_layout Subsubsection
19599 \begin_layout Standard
19600 If your document is not under revision control, this is the only item shown
19602 And if it is under revision control, the
19609 item is not visible.
19613 \begin_layout Standard
19614 This command registers in CVS your document
19615 \begin_inset Flex Strong
19618 \begin_layout Plain Layout
19626 in case you have already the documents directory under CVS control (in
19632 This means you have to create or checkout the archive by yourself using
19634 (In case you forget that step LyX registers the document with RCS.)
19637 \begin_layout Standard
19638 Then you are asked interactively to supply an initial description of the
19640 Don't forget that registered file is not yet checked in.
19643 \begin_layout Standard
19644 CVS command that is run:
19646 cvs -q add -m"<entered message>" "<file-name>"
19649 \begin_layout Standard
19654 above and for all other CVS commands is an abbreviation for
19655 \begin_inset Quotes eld
19658 change the current working directory to file location and use the file name
19659 without path component as argument
19660 \begin_inset Quotes erd
19666 \begin_layout Subsubsection
19672 \begin_layout Standard
19673 When you are finished editing a file, you commit your changes.
19674 When you do this and you had changed the document, you are asked for a
19675 description of the changes.
19676 After that changes are written to the repository.
19677 In case you didn't change the document and a reserved checkout is detected
19678 the reservation made on
19679 \begin_inset Flex MenuItem
19682 \begin_layout Plain Layout
19691 \begin_layout Labeling
19692 \labelwidthstring 00.00.0000
19694 \begin_inset space ~
19698 \begin_inset space ~
19702 \begin_inset Newline newline
19706 \begin_inset Flex Code
19709 \begin_layout Plain Layout
19712 -q commit -m"<description>" "<file-name>"
19718 \begin_inset Newline newline
19722 \begin_inset Flex Code
19725 \begin_layout Plain Layout
19736 \begin_layout Subsubsection
19742 \begin_layout Standard
19743 When you are sharing a repository with others, you may have to incorporate
19744 their changes into your working copy.
19747 \begin_layout Standard
19750 cvs -q update "<file-name>"
19753 \begin_layout Standard
19754 If a readonly checkout is detected the working copy is made writable and
19758 \begin_layout Standard
19761 cvs -q edit "<file-name>"
19764 \begin_layout Subsubsection
19767 Revert To Repository Version
19770 \begin_layout Standard
19771 This will discard all changes made to the document since the last check
19773 You get a warning before changes are discarded.
19774 Firstly the file is deleted, secondly CVS update command is run.
19777 \begin_layout Standard
19780 cvs -q update "<file-name>"
19783 \begin_layout Standard
19784 If a reserved checkout is detected and the working copy has no changes only
19785 the reservation is undone.
19788 \begin_layout Standard
19791 cvs -q unedit "<file-name>"
19794 \begin_layout Subsubsection
19795 Update of the local directory checkout from repository
19798 \begin_layout Standard
19799 Once your documents gets more complex, containing sub-documents and pictures,
19801 \begin_inset Flex Code
19804 \begin_layout Plain Layout
19810 files and so on using version control becomes more complicated.
19811 LyX supports updating the whole tree in which resides the document.
19812 This become especially useful once you cooperate with people which neither
19813 have detailed knowledge about CVS usage nor they have ambition to commit
19814 additional material to the repository.
19815 You have to organize the files structure so that all external files are
19816 in the same directory or subdirectories of the document.
19817 It's good practice anyway to store multipart documents in an extra directory.
19820 \begin_layout Standard
19822 \begin_inset Flex Code
19825 \begin_layout Plain Layout
19826 Update local directory from repository
19831 command updates the whole directory.
19832 If local changes are detected user is warned before update starts.
19833 In case of merge conflicts both versions of the conflicting document parts
19834 are placed in the final document.
19835 You have to review and correct the result of the merge.
19836 You'll find the conflicts enclosed in pairs of
19837 \begin_inset Flex Code
19840 \begin_layout Plain Layout
19847 \begin_inset Flex Code
19850 \begin_layout Plain Layout
19857 \begin_inset Flex Code
19860 \begin_layout Plain Layout
19867 The first part is your version as before the update operation with the
19868 document name prepended.
19869 The second one is the repository version with the version number after
19871 \begin_inset Flex Code
19874 \begin_layout Plain Layout
19883 \begin_layout Labeling
19884 \labelwidthstring 00.00.0000
19886 \begin_inset space ~
19890 \begin_inset space ~
19894 \begin_inset Newline newline
19898 \begin_inset Flex Code
19901 \begin_layout Plain Layout
19909 (Ask if changes are detected.)
19910 \begin_inset Newline newline
19914 \begin_inset Flex Code
19917 \begin_layout Plain Layout
19918 cd $path; cvs -q update
19928 \begin_layout Standard
19930 \begin_inset Flex Code
19933 \begin_layout Plain Layout
19939 stands for the path to the document.
19942 \begin_layout Subsubsection
19948 \begin_layout Standard
19949 This shows the complete history of the CVS document.
19952 cvs log "<file-name>"
19954 is shown in a browser.
19957 \begin_layout Subsection
19958 SVN commands in LyX
19961 \begin_layout Standard
19962 SVN is now partially supported by LyX.
19963 You can find the commands in the
19965 File\SpecialChar \menuseparator
19967 \begin_inset space ~
19973 Please note that if you use password protected access to repository via
19974 ssh, you will be asked in terminal window.
19975 LyX was tested against SVN 1.5 and 1.6
19979 \begin_layout Plain Layout
19980 Most of the commands will work with 1.4 too, see
19981 \begin_inset CommandInset ref
19983 reference "sub:SVN-Repo-Update"
19995 \begin_layout Subsubsection
20001 \begin_layout Standard
20002 If your document is not under revision control, this is the only item shown
20004 And if it is under revision control, the
20011 item is not visible.
20015 \begin_layout Standard
20016 This command registers in SVN your document ONLY in case you have already
20017 the documents directory under SVN control (in particular
20022 This means you have to checkout the archive by yourself.
20026 \begin_layout Standard
20027 Then you are asked interactively to supply an initial description of the
20029 Don't forget that registered file is not yet commited.
20032 \begin_layout Standard
20033 SVN command that is run:
20036 \begin_inset Quotes eld
20040 \begin_inset Quotes erd
20046 \begin_layout Standard
20051 to understand the switches.
20055 \begin_layout Subsubsection
20061 \begin_layout Standard
20062 When you are finished editing a file, you commit your changes.
20063 When you do this, you are asked for a description of the changes.
20064 After that changes are commited.
20067 \begin_layout Standard
20072 \begin_layout Plain Layout
20073 In case locking is not enabled.
20075 \begin_inset CommandInset ref
20077 reference "subsec:SVN-File-Locking"
20088 svn commit -q -m"<description>" <file-name>
20091 \begin_layout Subsubsection
20097 \begin_layout Standard
20098 Updates the changes of this file from the repository.
20099 Be sure you understand SVN merging and conflicts resolving before using
20100 this function, because all conflicts has to be resolved manually by you!
20103 \begin_layout Standard
20108 \begin_layout Plain Layout
20116 svn update --non-interactive
20117 \begin_inset Quotes eld
20121 \begin_inset Quotes erd
20127 \begin_layout Subsubsection
20130 Revert To Repository Version
20133 \begin_layout Standard
20134 This will discard all changes made to the document since the last check
20136 You get a warning before changes are discarded.
20140 \begin_layout Standard
20144 \begin_inset Quotes eld
20148 \begin_inset Quotes erd
20154 \begin_layout Subsubsection
20155 \begin_inset CommandInset label
20157 name "sub:SVN-Repo-Update"
20161 Update of the local directory checkout from repository
20165 \begin_layout Plain Layout
20166 Note that this command will work only with subversion
20167 \begin_inset Formula $\geqq1.5$
20178 \begin_layout Standard
20179 All the commands above have one shortcomming - they deal with the current
20181 Once your document contains pictures, includes external
20182 \begin_inset Flex Code
20185 \begin_layout Plain Layout
20191 files and so on administration becomes more complicated.
20192 LyX now supports updating the whole tree in which resides the document
20196 \begin_layout Plain Layout
20197 One need to organize the files structure so that all external files are
20198 in the same directory or subdirectories of the document.
20205 This become especially useful once you cooperate with people which neither
20206 know about subversion management nor they have ambition to commit additional
20207 material to the repository.
20211 \begin_layout Standard
20212 \begin_inset Flex Code
20215 \begin_layout Plain Layout
20216 Update local directory from repository
20221 command updates the whole directory and in case of merge conflicts local
20222 version of the files are left, so no unintended data loss occurs.
20223 If local changes are detected user is warned before update starts.
20226 \begin_layout Labeling
20227 \labelwidthstring 00.00.0000
20229 \begin_inset space ~
20233 \begin_inset space ~
20237 \begin_inset Newline newline
20241 \begin_inset Flex Code
20244 \begin_layout Plain Layout
20250 (Ask if changes are detected.)
20251 \begin_inset Newline newline
20255 \begin_inset Flex Code
20258 \begin_layout Plain Layout
20259 svn update --accept mine-full $path
20267 \begin_layout Standard
20269 \begin_inset Flex Code
20272 \begin_layout Plain Layout
20278 stands for the path to the document.
20281 \begin_layout Subsubsection
20287 \begin_layout Standard
20288 This shows the complete history of the SVN document.
20292 \begin_inset Quotes eld
20296 \begin_inset Quotes erd
20301 is shown in a browser.
20304 \begin_layout Subsubsection
20306 \begin_inset CommandInset label
20308 name "subsec:SVN-File-Locking"
20315 \begin_layout Standard
20316 The file exchange through various revision control systems brings the problem
20317 of merge conflicts in case two different users try to edit the same (parts
20319 When such a conflict happens it needs manual resolving and one reasonable
20320 alternative is to provide some kind of locking mechanism, which guarantees
20321 that only one user is allowed to edit file at the given time.
20324 \begin_layout Standard
20325 SVN has two such mechanisms to provide mutual exclusivity for file access
20326 - locks and automatic setting of write permissions (see sec.
20328 \begin_inset CommandInset ref
20330 reference "subsec:Automatical-Locking-Property"
20335 \begin_inset Flex Code
20338 \begin_layout Plain Layout
20348 \begin_layout Plain Layout
20349 http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html
20355 If this property is detected for a given document LyX starts to use SVN
20356 locks for document editing automatically and the whole check-in/out mechanism
20357 switches to the same regimen as for RCS.
20358 This in particular means there are two different modes of file use in LyX:
20361 \begin_layout Itemize
20363 The loaded file is in the read-only mode.
20364 For editing on needs to check-out.
20369 consists of updating from the repository and gaining write lock.
20370 If the lock is not possible to obtain, we remain in unlocked state.
20373 \begin_layout Itemize
20375 The loaded file is in the 'normal' edit mode.
20376 No other user is allowed to edit the file.
20381 consists of commiting changes and releasing write-lock.
20382 If no changes have been made to the document, no commit will be produced
20386 \begin_layout Plain Layout
20387 Don't be puzzled by the fact that you will be asked for commit message anyway.
20392 and only the write-lock will be released.
20395 \begin_layout Standard
20399 \begin_layout Labeling
20400 \labelwidthstring 00.00.0000
20403 svn commit -q -m"<description>" "<file-name>"
20404 \begin_inset Newline newline
20407 svn unlock "<file-name>"
20410 \begin_layout Labeling
20411 \labelwidthstring 00.00.0000
20414 svn update "<file-name>"
20415 \begin_inset Newline newline
20418 svn lock "<file-name>"
20421 \begin_layout Subsubsection
20424 \begin_inset CommandInset label
20426 name "subsec:Automatical-Locking-Property"
20432 Automatic Locking Property
20435 \begin_layout Standard
20436 The above mentioned automatic setting of write permissions of the .lyx file
20442 ile\SpecialChar \menuseparator
20448 \begin_inset space ~
20451 Control\SpecialChar \menuseparator
20456 oggle locking property
20459 This command is active only when the file is not locked on the svn server
20461 you need to check-out before proceeding).
20464 \begin_layout Labeling
20465 \labelwidthstring 00.00.0000
20467 \begin_inset space ~
20473 \begin_layout Labeling
20474 \labelwidthstring 00.00.0000
20477 svn propset svn:needs-lock ON "<file-name>"
20480 \begin_layout Labeling
20481 \labelwidthstring 00.00.0000
20484 svn propdel svn:needs-lock "<file-name>"
20487 \begin_layout Subsubsection
20488 \begin_inset CommandInset label
20490 name "sub:VCS-Revision-Information"
20494 Revision Information in Documents
20497 \begin_layout Standard
20498 There are more possibilities how to activate revision information in our
20502 \begin_layout Itemize
20503 LyX supports directly:
20507 \begin_layout Itemize
20508 tree revision information (
20509 \begin_inset Flex Code
20512 \begin_layout Plain Layout
20519 The result is the output of the
20520 \begin_inset Flex Code
20523 \begin_layout Plain Layout
20529 command, the following table gives you an idea, how to read the results.
20532 \begin_layout Standard
20534 \begin_inset Tabular
20535 <lyxtabular version="3" rows="6" columns="2">
20536 <features tabularvalignment="middle">
20537 <column alignment="center" valignment="top" width="0">
20538 <column alignment="center" valignment="top" width="0">
20540 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20543 \begin_layout Plain Layout
20549 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20552 \begin_layout Plain Layout
20560 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20563 \begin_layout Plain Layout
20569 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20572 \begin_layout Plain Layout
20573 mixed revision working copy
20580 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20583 \begin_layout Plain Layout
20589 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20592 \begin_layout Plain Layout
20593 modified working copy
20600 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20603 \begin_layout Plain Layout
20609 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20612 \begin_layout Plain Layout
20613 switched working copy
20620 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
20623 \begin_layout Plain Layout
20629 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
20632 \begin_layout Plain Layout
20633 partial working copy, from a sparse checkout
20640 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
20643 \begin_layout Plain Layout
20649 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
20652 \begin_layout Plain Layout
20653 mixed revision, modified, switched working copy
20666 \begin_layout Itemize
20667 file revision information.
20668 The result comes from parsing the output of
20669 \begin_inset Flex Code
20672 \begin_layout Plain Layout
20674 \begin_inset space ~
20678 \begin_inset space ~
20682 \begin_inset space ~
20691 Supported flags are:
20695 \begin_layout Itemize
20696 version number of the last commit (
20697 \begin_inset Flex Code
20700 \begin_layout Plain Layout
20709 \begin_layout Itemize
20710 author of the last commit (
20711 \begin_inset Flex Code
20714 \begin_layout Plain Layout
20723 \begin_layout Itemize
20724 date of the last commit (
20725 \begin_inset Flex Code
20728 \begin_layout Plain Layout
20737 \begin_layout Itemize
20738 time of the last commit (
20739 \begin_inset Flex Code
20742 \begin_layout Plain Layout
20752 \begin_layout Standard
20753 You can obtain this info via InsetInfo (e.g.
20755 \begin_inset Flex Code
20758 \begin_layout Plain Layout
20759 info-insert buffer vcs-date
20765 The information will be available only when you have the file stored under
20766 svn managment (i.e.
20768 \begin_inset Flex Code
20771 \begin_layout Plain Layout
20777 directory is available with your document).
20781 \begin_layout Itemize
20782 Another---a hacking one---possibility is to use svn keywords
20786 \begin_layout Plain Layout
20787 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html
20793 In short -- you set file keywords property (e.g.
20796 svn propset svn:keywords 'Rev' file.lyx
20798 ) and then paste keyword TeX code
20802 \begin_layout Plain Layout
20803 This is an easy way how to ensure that LyX won't break the line in the middle
20809 tag in your document (e.g.
20814 \begin_layout Plain Layout
20822 This way svn client will automatically substitute revision number (e.g.
20827 \begin_layout Plain Layout
20834 ) after each update and commit.
20835 There are more problems with this approach.
20836 Firstly, the '$' character is used in TeX world for math equations, so
20837 any occurence of math formula
20838 \begin_inset Formula $Rev$
20842 \begin_inset Formula $Rev:59$
20845 in your LyX document.
20846 Similarly for other keywords like Id, Date, Author, etc.
20847 Secondly svn output is dependent on your locales, so its very easy that
20848 svn would produce some problematic strings once Date is used.
20849 Thirdly you get the whole 'Rev: 59' string in your document instead of
20851 Until subversion implements user's custom keywords it will be hard to use
20852 this approach reliably or let LyX to support it directly.
20855 \begin_layout Subsection
20856 SVN and Windows Environment
20859 \begin_layout Quote
20860 My inclination is to say that if the user cannot figure out the command
20861 line operations on their own fairly quickly, they would be well advised
20862 to use TortoiseSVN.
20868 \begin_layout Subsubsection
20872 \begin_layout Standard
20873 In addition to installing LyX, and having access to a Subversion repository,
20874 the user will need to install the Subversion client program.
20875 A Windows installer for the client program is available from
20876 \begin_inset CommandInset href
20879 target "http://www.collab.net/nonav/downloads/subversion/"
20884 The user may also want to install
20885 \begin_inset CommandInset href
20888 target "http://tortoisesvn.tigris.org/"
20892 , which integrates Subversion operations into the context (rightclick) menu
20893 of Windows Explorer.
20894 Operations done outside LyX will typically be more convenient using the
20895 Explorer context menu.
20896 Note that TortoiseSVN is not a replacement for the client program, which
20897 is what LyX itself will use.
20900 \begin_layout Subsubsection
20901 Bringing a document under Subversion control
20904 \begin_layout Standard
20905 Before a LyX document can be brought under version control in Subversion,
20906 its parent directory needs to be under version control.
20907 If the document is being added to a project already in the repository,
20908 this is accomplished by checking the project out to the directory where
20909 the new document will be placed.
20910 If the project itself is not yet under version control (for instance, if
20911 this document starts a new project), the directory must be imported into
20913 This is done outside LyX.
20914 Both import and checkout are easily accomplished from the Explorer context
20915 menu using TortoiseSVN, or alternatively can be done using the command
20916 line client at a DOS prompt.
20917 The procedure for importing the project using TortoiseSVN is described
20918 below, assuming an existing repository and a new project being started
20926 For information on using the Subversion client program, run
20933 \begin_layout Enumerate
20940 in Windows Explorer, right click it, and select
20942 TortoiseSVN > Repo-browser
20945 If necessary, adjust the URL for the repository, then click OK.
20948 \begin_layout Enumerate
20949 Right click the level of the repository under which you want to place the
20950 new project folder (typically the top level) and click
20952 Create folder\SpecialChar \ldots{}
20955 Supply a name for the project folder and click OK.
20956 Add a message for the log file if desired, then click OK again.
20957 The new project folder should appear in the repository.
20958 Finally, click OK again to exit the repository browser.
20961 \begin_layout Enumerate
20962 Once again right click
20968 , this time selecting SVN Checkout\SpecialChar \ldots{}
20969 Select the URL of the project folder
20970 you just created in the repository, and set the checkout directory to
20978 You will be warned about a non-empty folder; click OK to proceed.
20979 You should now have a
20990 \begin_layout Enumerate
20991 Create or open your document in LyX and click
20996 ile\SpecialChar \menuseparator
21002 \begin_inset space ~
21005 Control\SpecialChar \menuseparator
21013 Add a log message and click OK to commit the document to version control.
21016 \begin_layout Standard
21017 From this point onward, you should have full functionality in the
21022 ile\SpecialChar \menuseparator
21028 \begin_inset space ~
21034 You also have the option of checking the document in and out, viewing its
21036 using the TortoiseSVN context menu in Windows Explorer or the Subversion
21037 client program from a command prompt.
21040 \begin_layout Subsubsection
21041 SSH tunnel used with SVN under Windows
21044 \begin_layout Standard
21045 Compared with Linux setting up svn client to communicate over ssh under
21046 Windows is a rather troublesome task.
21047 We will at least offer some hints how to setup the client side but prior
21048 knowledge about ssh and the Windows command line is needed, also be prepared
21049 for a great deal of frustration\SpecialChar \ldots{}
21053 \begin_layout Enumerate
21054 Get a svn client for windows, as described in the previous sections.
21055 When it is a fresh install run some svn command (e.g.
21057 \begin_inset Flex Code
21060 \begin_layout Plain Layout
21066 ) to create config files, which you will need to change later on.
21069 \begin_layout Enumerate
21070 Choose a ssh client for Windows.
21071 There are several possibilities, we will use the one from Putty tools
21075 \begin_layout Plain Layout
21076 \begin_inset Flex URL
21079 \begin_layout Plain Layout
21081 http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
21092 You will need to set the connection up so that the client doesn't ask for
21093 any password from you.
21094 To keep things easy we will use only keys without any additional password
21099 \begin_layout Enumerate
21101 \begin_inset Flex Code
21104 \begin_layout Plain Layout
21111 Save your private .ppk key file and put the public one on the server side.
21112 If the SVN server runs on Linux, note that the format of the public key
21113 is not compatible with Linux openssh and you will need to direcly copy-paste
21116 Public key for pasting into OpenSSH authorized_keys file
21118 :” edit field into the server's
21119 \begin_inset Flex Code
21122 \begin_layout Plain Layout
21123 ~/.ssh/authorized_keys
21129 \begin_inset Flex Code
21132 \begin_layout Plain Layout
21141 \begin_layout Enumerate
21143 \begin_inset Flex Code
21146 \begin_layout Plain Layout
21153 In the SVN config file
21157 \begin_layout Plain Layout
21158 Exact path depends on Windows version, usually somewhere around
21159 \begin_inset Flex Code
21162 \begin_layout Plain Layout
21165 Documents and Settings
21179 \begin_inset Flex Code
21182 \begin_layout Plain Layout
21197 , section [tunnels], setup ssh command, e.g.
21199 \begin_inset Flex Code
21202 \begin_layout Plain Layout
21203 ssh=c:/path/plink.exe -i c:/path/private_key.ppk
21212 \begin_layout Plain Layout
21213 It will usually take a lot of time to get exact command right and it depends
21215 For example do not have some remote server saved as a default session in
21217 If things fail, try to connect via plink without SVN first.
21226 \begin_layout Enumerate
21227 Checkout the SVN archive, e.g.
21229 \begin_inset Flex Code
21232 \begin_layout Plain Layout
21233 svn co svn+ssh://user@server/repository_path
21241 \begin_layout Subsubsection
21242 End-of-Line Conversions
21245 \begin_layout Standard
21246 When the collsraborators are mixing Linux and Windows environments, LyX
21247 will use different line endings inside the .lyx files.
21248 This is not a problem as far as LyX functionality is concerned, but the
21249 commit diffs will be huge and merge-conflicts prone.
21250 Fortunately SVN itself knows
21254 \begin_layout Plain Layout
21255 \begin_inset Flex URL
21258 \begin_layout Plain Layout
21260 http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html
21270 how to deal with CR/LF problems when switching .lyx files to the
21271 \begin_inset Flex Code
21274 \begin_layout Plain Layout
21284 \begin_layout Plain Layout
21286 \begin_inset Flex Code
21289 \begin_layout Plain Layout
21290 svn propset svn:eol-style native FILE_NAME
21303 \begin_layout Subsection
21307 \begin_layout Standard
21308 With the recent addition of the vc-command function LyX power users are
21309 allowed to create their own commands for revision control.
21312 \begin_layout Standard
21313 As an example you can see how two TortoiseSVN commands could be integrated
21317 \begin_layout Description
21319 \begin_inset Flex Code
21322 \begin_layout Plain Layout
21323 vc-command DR "." "TortoiseProc /command:commit /path:$$p"
21331 \begin_layout Description
21333 \begin_inset Flex Code
21336 \begin_layout Plain Layout
21337 vc-command DR "." "TortoiseProc /command:revert /path:$$p"
21345 \begin_layout Subsection
21346 Version control and Document comparison
21349 \begin_layout Standard
21350 One of the typical uses of version control is to inspect the changes between
21351 revisions, usually by creating
21352 \begin_inset Flex Code
21355 \begin_layout Plain Layout
21362 While this is useful for plain text files, it is much less useful in the
21363 case of LyX files, which have more complicated structure.
21364 Hence we provide binding to the Document comparison feature.
21365 They are two ways of calling this feature - either by direct call of
21366 \begin_inset Flex Code
21369 \begin_layout Plain Layout
21375 LyX function (for details see LyX functions manual) or by icon/menu item
21377 \begin_inset Flex MenuItem
21380 \begin_layout Plain Layout
21381 Compare with older revision...
21387 One can either compare two chosen revisions of the document or he can simply
21388 compare the current version of edited text with older revisions (where
21390 \begin_inset Flex MenuItem
21393 \begin_layout Plain Layout
21399 ' revisions back means comparison of the edited file with last commited
21404 \begin_layout Standard
21405 This feature is supported for SVN and RCS though due to the more complicated
21406 versioning scheme of RCS there is a constraint -- when addressing the revisions
21407 in dialog, numbers always point to the last number in RCS revision number,
21412 \begin_layout Section
21413 Literate Programming
21416 \begin_layout Standard
21421 (kayvan@sylvan.com)
21425 original documentation written by
21427 Edmar Wienskoski Jr.
21430 (edmar-w-jr@technologist.com)
21433 \begin_layout Subsection
21437 \begin_layout Standard
21438 The main purpose of this documentation is to show you how to use LyX for
21439 literate programming, where it is assumed that you are familiar with this
21440 programming technique, and know what
21441 \begin_inset Quotes eld
21445 \begin_inset Quotes erd
21449 \begin_inset Quotes eld
21453 \begin_inset Quotes erd
21457 If that is not the case, please follow the web links provided in the following
21459 There is a lot of good documentation out there covering old development
21460 history to the latest tools tips.
21463 \begin_layout Standard
21464 It is also assumed that you are familiar with LyX itself to a point that
21465 you are comfortable changing your LyX preferences, and X resources file.
21466 If that is not the case please refer to other LyX documentation to cover
21467 your specific needs.
21470 \begin_layout Subsection
21471 Literate Programming
21474 \begin_layout Standard
21475 From the Literate Programming FAQ:
21478 \begin_layout Quotation
21479 Literate programming is the combination of documentation and source together
21480 in a fashion suited for reading by human beings.
21481 In fact, literate programs should be enjoyable reading, even inviting!
21482 (Sorry Bob, I couldn't resist!) In general, literate programs combine source
21483 and documentation in a single file.
21484 Literate programming tools then parse the file to produce either readable
21485 documentation or compilable source.
21486 The WEB style of literate programming was created by D.
21487 \begin_inset space \thinspace{}
21491 Knuth during the development of his TeX typesetting software.
21495 \begin_layout Standard
21496 Another excerpt says:
21499 \begin_layout Quotation
21502 How is literate programming different from verbose commenting?
21505 \begin_layout Quotation
21506 There are three distinguishing characteristics.
21507 In order of importance, they are:
21511 \begin_layout Itemize
21512 flexible order of elaboration
21515 \begin_layout Itemize
21516 automatic support for browsing
21519 \begin_layout Itemize
21520 typeset documentation, especially diagrams and mathematics
21524 \begin_layout Standard
21525 Now that I sparked your curiosity, take a look in the references.
21528 \begin_layout Subsubsection
21532 \begin_layout Standard
21533 The complete Literate Programming FAQ can be found at:
21536 \begin_layout Quote
21537 Literate Programming FAQ
21538 \begin_inset Flex URL
21541 \begin_layout Plain Layout
21543 http://www.literateprogramming.com/lpfaq.pdf
21551 \begin_layout Standard
21552 The FAQ lists 23 (twenty three!) different literate programming tools.
21553 Where some are specialized or
21554 \begin_inset Quotes eld
21558 \begin_inset Quotes erd
21561 for particular programming languages, while other have general scope.
21566 for my own use for several reasons:
21569 \begin_layout Itemize
21570 It can generate the documentation either in LaTeX or HTML.
21573 \begin_layout Itemize
21574 It has a open architecture, i.
21575 \begin_inset space \thinspace{}
21579 \begin_inset space \space{}
21582 it is easy to plug in new filters and to perform special processing that
21587 \begin_layout Itemize
21588 There is a good selection of filters available already (the HTML is one
21592 \begin_layout Itemize
21596 \begin_layout Standard
21597 The Noweb web page can be found at:
21600 \begin_layout Quote
21602 \begin_inset Flex URL
21605 \begin_layout Plain Layout
21607 http://www.cs.virginia.edu/~nr/noweb/
21615 \begin_layout Standard
21616 Starting from there you can reach many other interesting links and even
21617 some literate program examples.
21620 \begin_layout Subsection
21621 LyX and Literate Programming
21624 \begin_layout Standard
21625 The LyX support for Literate Programming is provided by using the generic
21626 LyX converters mechanism.
21627 This support is provided in a
21628 \begin_inset Quotes eld
21632 \begin_inset Quotes erd
21636 \begin_inset space \thinspace{}
21640 \begin_inset space \space{}
21643 you will be able to use this new LyX feature with some other literate programmin
21644 g tool of your choice by just changing your LyX preferences.
21647 \begin_layout Subsubsection
21648 Generating documents and code (weaving and tangling)
21651 \begin_layout Paragraph
21652 Selecting the document class
21655 \begin_layout Standard
21656 If you have installed Noweb and LyX successfully, whenever you open a new
21657 document or try to change the document class of an existing one, you will
21658 find that there are three new document classes available:
21661 \begin_layout Itemize
21665 \begin_layout Itemize
21669 \begin_layout Itemize
21673 \begin_layout Standard
21674 You must select one of them to create your literate documents from.
21678 \begin_layout Standard
21679 Note that literate documents are not limited to these three classes.
21680 New classes can be generated from other styles like letter or in combination
21681 with other class variations like Article (AMS).
21682 If you have special needs that cannot be covered by one of the existing
21683 classes, let the LyX developers list (lyx-devel@lists.lyx.org) know and we
21684 will arrange to insert a new entry, or teach you how to do it.
21688 \begin_layout Plain Layout
21689 It is very simple, it involves the creation of a file with four lines, and
21690 re-running of the auto configuration.
21695 Moreover, if you use a literate tool other than Noweb you may need to create
21696 a new set of document classes for it.
21699 \begin_layout Paragraph
21703 \begin_layout Standard
21704 LyX enables you to write code with a layout named
21712 \begin_layout Plain Layout
21713 The equivalent Noweb term is
21714 \begin_inset Quotes eld
21718 \begin_inset Quotes erd
21722 For historical reasons, I got used to the term
21723 \begin_inset Quotes eld
21727 \begin_inset Quotes erd
21730 introduced by other literate tool named Nuweb, which I used for many years
21731 before rendering myself to Noweb.
21736 Noweb delimits scraps like this:
21739 \begin_layout LyX-Code
21743 \begin_layout LyX-Code
21747 \begin_layout LyX-Code
21751 \begin_layout LyX-Code
21755 \begin_layout LyX-Code
21759 \begin_layout Standard
21760 The problem is that whatever is written in between the << and the
21764 must be taken literally, i.
21765 \begin_inset space \thinspace{}
21769 \begin_inset space \space{}
21772 LyX should be prevented from making any special interpretation of what has
21774 This is handled by a special layout named Scrap, that works like a normal
21775 paragraph but has a free spacing capability.
21778 \begin_layout Standard
21779 The down side of the Scrap paragraph layout is that consecutive paragraphs
21780 of code will be spaced with one empty line in the source code and also
21781 in the printed documentation.
21782 The work around is to enter each line of code within a single Scrap, with
21783 a newline (ctrl-return).
21784 The example above will look like this:
21788 \begin_layout Plain Layout
21789 If you have a printed version of this document you will not see any difference
21790 between the previous example and this one.
21798 \begin_layout LyX-Code
21800 \begin_inset Newline newline
21804 \begin_inset Newline newline
21808 \begin_inset Newline newline
21812 \begin_inset Newline newline
21818 \begin_layout Standard
21819 This layout works fine.
21820 The only real inconvenience is that you have to type ctrl-return instead
21825 \begin_layout Plain Layout
21826 It is in my list of
21827 \begin_inset Quotes eld
21831 \begin_inset Quotes erd
21842 \begin_layout Standard
21843 As a special note, you can also use the
21844 \begin_inset Quotes eld
21848 \begin_inset Quotes erd
21851 construct of Noweb in your scraps to add items to Noweb's identifier cross-refe
21855 \begin_layout LyX-Code
21857 \begin_inset Newline newline
21860 def some_function(args):
21861 \begin_inset Newline newline
21864 "This is the doc string for this function."
21865 \begin_inset Newline newline
21868 print "My args: ", args
21871 \begin_layout LyX-Code
21872 @ %def some_function
21875 \begin_layout Standard
21876 For an example of this usage and the resulting cross-reference output, look
21877 at the Literate python program in
21879 LIBDIR/examples/listerrors.lyx
21881 which should make this all clear.
21884 \begin_layout Paragraph
21885 Generating the documentation
21888 \begin_layout Standard
21889 At this point you already have a new document file with a proper document
21890 class, and with some code and text on it.
21891 How do I print it? The answer is simple, you select
21893 View\SpecialChar \menuseparator
21897 Just like you would do for a plain document.
21898 No special procedure is required.
21901 \begin_layout Standard
21902 To help orientate you, I will now explain what happens inside LyX:
21905 \begin_layout Enumerate
21908 Update\SpecialChar \menuseparator
21911 menu option is chosen, a LaTeX file is generated.
21916 \begin_layout Standard
21917 If the document is of any literate class the generated file will be named
21918 with an extension name defined by the
21919 \begin_inset Quotes eld
21923 \begin_inset Quotes erd
21926 format (defined in the Preferences panel), otherwise the file will have
21935 \begin_layout Enumerate
21936 Note that the only difference so far is in the name of the file, no special
21937 processing is required by LyX.
21938 Given that you formatted the code using the Scrap layout that, by itself,
21939 takes care of the business.
21942 \begin_layout Enumerate
21943 If the document is of any literate class LyX will then use the internal
21944 LyX to Noweb converter, followed by the Noweb to LaTeX converter
21948 \begin_layout Plain Layout
21949 The converters are defined in the
21951 Tools\SpecialChar \menuseparator
21955 \begin_inset Quotes eld
21959 \begin_inset Quotes erd
21971 manual for general information about converters.
21976 to generate the LaTeX file.
21980 \begin_layout Standard
21981 Otherwise it will just skip this step.
21985 \begin_layout Enumerate
21986 Finally, LaTeX is invoked and the regular post processing continues as in
21990 \begin_layout Standard
21991 Independence from a particular
21992 \begin_inset Quotes eld
21996 \begin_inset Quotes erd
21999 is easily achieved by changing the commands that are run by the various
22003 \begin_layout Paragraph
22004 Generating the code
22007 \begin_layout Standard
22008 When the build menu option is chosen or the corresponding button in the
22009 toolbar is pressed, a LaTeX file is generated just like step 1 above.
22010 Next, LyX invokes the
22015 This converter needs to be defined by the user and is not installed by
22016 default, though the Program format is.
22017 This converter (like any other converter) will have two parts:
22020 \begin_layout Enumerate
22021 The converter program itself.
22022 This program performs the conversion from the one format to the other (in
22023 this case, from the Noweb format to the Program pseudo-format).
22026 \begin_layout Enumerate
22027 The error log parser.
22028 This is a program whose sole purpose is to rewrite error messages in a
22029 format that LyX understands.
22030 This makes it possible for LyX to place error boxes in the right places
22031 in the file buffer.
22034 \begin_layout Standard
22035 The first part, the
22036 \begin_inset Quotes eld
22040 \begin_inset Quotes erd
22043 setting, should be set to
22044 \begin_inset Quotes eld
22052 \begin_inset Quotes erd
22056 This basically means that LyX will call
22057 \begin_inset Quotes eld
22061 \begin_inset Quotes erd
22064 (a program or script) with the name of the Noweb file (normally a file
22065 in the LyX temp directory).
22069 \begin_layout Standard
22070 This is an implementation of
22071 \begin_inset Quotes eld
22075 \begin_inset Quotes erd
22078 that you can place in a directory on your path:
22081 \begin_layout LyX-Code
22085 \begin_layout LyX-Code
22089 \begin_layout LyX-Code
22090 notangle -Rbuild-script $1 | env NOWEB_SOURCE=$1 sh
22093 \begin_layout Standard
22094 The next part of the converter setting is the
22095 \begin_inset Quotes eld
22099 \begin_inset Quotes erd
22102 which is to be set to
22103 \begin_inset Quotes eld
22108 parselog=listerrors
22111 \begin_inset Quotes erd
22115 This will run any errors that are generated by the
22116 \begin_inset Quotes eld
22120 \begin_inset Quotes erd
22123 process through the
22124 \begin_inset Quotes eld
22128 \begin_inset Quotes erd
22134 \begin_layout Standard
22135 The converter code looks in
22143 then on the path for the
22144 \begin_inset Quotes eld
22148 \begin_inset Quotes erd
22154 \begin_layout Standard
22155 The build will normally take place in LyX's temporary directory, so the
22156 files produced by the conversion will be in that directory.
22157 LyX will copy out what it regards as the `main' file, but the
22161 conversion may produce several files, and so most of these would then be
22162 deleted when LyX was closed.
22163 The present solution is to use a `copier',
22167 \begin_layout Plain Layout
22176 manual for information on these.
22185 script in its default mode, so that the entire contents of the temporary
22186 directory is copied.
22187 More will get copied than is needed, to be sure, but nothing will be lost.
22188 If, however, you know what extensions the generated files will have, this
22189 can be improved by using the
22198 This option takes a comma-separated list of extensions to copy.
22199 So, for example, if the conversion will generate only files with the extensions
22208 , then the correct definition would be:
22211 \begin_layout LyX-Code
22212 python -tt $$s/scripts/ext_copy.py -e c,h $$i $$o
22215 \begin_layout Standard
22216 The result will be that only files with these two extensions will be copied
22220 \begin_layout Paragraph
22221 Build instructions in the document
22224 \begin_layout Standard
22225 The last piece of the integration between LyX and noweb is the
22226 \begin_inset Quotes eld
22230 \begin_inset Quotes erd
22234 Generally, the instructions for building your program should be embedded
22235 in a scrap of its own.
22237 \begin_inset Quotes eld
22241 \begin_inset Quotes erd
22244 above uses the notangle command to look for this scrap (called
22245 \begin_inset Quotes eld
22249 \begin_inset Quotes erd
22252 ) and runs its contents through
22253 \begin_inset Quotes eld
22257 \begin_inset Quotes erd
22263 \begin_layout Standard
22264 Typically, such a scrap would look something like this:
22267 \begin_layout LyX-Code
22269 \begin_inset Newline newline
22273 \begin_inset Newline newline
22277 \begin_inset Newline newline
22280 if [ -z "${NOWEB_SOURCE}" ]
22281 \begin_inset Newline newline
22285 \begin_inset Newline newline
22288 NOWEB_SOURCE=myfile.nw
22289 \begin_inset Newline newline
22293 \begin_inset Newline newline
22297 code to extract files ...]
22298 \begin_inset Newline newline
22302 code to compile files ...]
22303 \begin_inset Newline newline
22309 \begin_layout Standard
22312 LIBDIR/examples/listerrors.lyx
22316 LIBDIR/examples/Literate.lyx
22318 which implement two versions of the
22319 \begin_inset Quotes eld
22323 \begin_inset Quotes erd
22326 program for some illustrations of how all of these pieces go together or
22329 LIBDIR/examples/noweb2lyx.lyx.
22332 Interestingly, these three files show off the language-indepence of the
22333 LyX literate programming support since they are written in Python, C and
22337 \begin_layout Subsubsection
22341 \begin_layout Standard
22342 All the Literate Programming support is configured by the
22344 Tools\SpecialChar \menuseparator
22348 \begin_inset Quotes eld
22352 \begin_inset Quotes erd
22356 The important parts are:
22359 \begin_layout Description
22361 \begin_inset space ~
22365 \begin_inset Quotes eld
22369 \begin_inset Quotes erd
22373 \begin_inset space ~
22376 format Set up via the Formats tab, this is where the Noweb-specific pieces
22386 , the file extension is set to
22391 This tells LyX to create a file with a
22395 extension in the first step of the conversion process.
22398 \begin_layout Description
22400 \begin_inset space ~
22408 \begin_inset space ~
22411 format This is an empty format whose sole purpose is to be the endpoint
22412 of a conversion (which then allows us to set up a converter for it).
22415 \begin_layout Description
22424 This converter performs the
22425 \begin_inset Quotes eld
22429 \begin_inset Quotes erd
22432 of the literate document.
22433 For Noweb, it is set to
22434 \begin_inset Quotes eld
22439 noweave -delay -index $$i > $$o
22442 \begin_inset Quotes erd
22448 \begin_layout Description
22458 \begin_inset Quotes eld
22462 \begin_inset Quotes erd
22466 As stated above, the Converter is set to
22467 \begin_inset Quotes eld
22475 \begin_inset Quotes erd
22478 , with Flags set to
22479 \begin_inset Quotes eld
22484 originaldir,parselog=listerrors
22487 \begin_inset Quotes erd
22493 \begin_layout Subsubsection
22497 \begin_layout Standard
22498 There is also a new function implemented in the LyX server, the
22499 \begin_inset Quotes eld
22502 server-goto-file-row" function, to be used with ddd/gdb or other debugger.
22506 \begin_layout Standard
22507 When debugging code with ddd/gdb, it is possible to invoke a text editor
22508 at the current execution position with a single key stroke.
22509 The default ddd configuration for that is shift-ctrl-V.
22510 It happens that you can define the editor command line invocation in ddd
22513 Edit\SpecialChar \menuseparator
22514 Preferences\SpecialChar \menuseparator
22517 dialog and changing the "Edit Sources" entry.
22520 \begin_layout Standard
22521 I take advantage of the new created LyX server function and this ddd feature,
22523 \begin_inset Quotes eld
22527 \begin_inset Quotes erd
22533 \begin_layout LyX-Code
22534 echo "LYXCMD:monitor:server-goto-file-row:@FILE@ @LINE@" >~/.lyxpipe.in
22537 \begin_layout Standard
22538 With this, whenever you are using ddd and find a point in the program that
22539 you want to edit, you just press shift-ctrl-V (in the ddd window), and
22540 ddd you forward this information to LyX through the LyX server and then
22541 the LyX window will show the same file with the cursor at the same position
22542 ddd was pointing to.
22543 No more guessing or long scrolling to locate a point in the program back
22547 \begin_layout Standard
22548 Note however that you must enable the LyX server to get this feature working
22549 (it is disabled by default).
22550 You can enable it in
22562 ) by entering in the
22567 \begin_inset Quotes eld
22572 /home/<your-home-directory>/.lyx/lyxpipe
22575 \begin_inset Quotes erd
22581 \begin_layout Standard
22582 Read the LyX server documentation in the
22584 Customization Manual
22586 for further information.
22589 \begin_layout Subsubsection
22593 \begin_layout Standard
22594 There are six new buttons that can be added to your LyX toolbar.
22595 Five of these buttons are short cuts to layout styles:
22616 The last one is a short cut to the
22617 \begin_inset Quotes eld
22621 \begin_inset Quotes erd
22628 \begin_layout Standard
22629 LyX has a range of buttons that are available for tool bar customization.
22630 In my toolbar I like to combine the six short cuts above with two more:
22635 \SpecialChar \menuseparator
22640 \SpecialChar \menuseparator
22647 View\SpecialChar \menuseparator
22651 Here is how it looks like:
22654 \begin_layout LyX-Code
22658 \begin_layout LyX-Code
22662 \begin_layout LyX-Code
22663 Icon "layout Standard"
22666 \begin_layout LyX-Code
22667 Icon "layout Section"
22670 \begin_layout LyX-Code
22671 Icon "layout LaTeX"
22674 \begin_layout LyX-Code
22675 Icon "layout LyX-Code"
22678 \begin_layout LyX-Code
22679 Icon "layout Scrap"
22682 \begin_layout LyX-Code
22686 \begin_layout LyX-Code
22690 \begin_layout LyX-Code
22691 Icon "buffer-typeset"
22694 \begin_layout LyX-Code
22695 Icon "build-program"
22698 \begin_layout LyX-Code
22702 \begin_layout LyX-Code
22706 \begin_layout LyX-Code
22710 \begin_layout LyX-Code
22714 \begin_layout LyX-Code
22718 \begin_layout Subsubsection
22719 Colors customization
22722 \begin_layout Standard
22723 There are a number of colors in LyX that can be customized in
22728 One of the things that bothers people is the LaTeX font color.
22729 The default color is red, since the scraps uses LaTeX font, and there is
22730 a lot of scraps in literate documents, you may get tired of seeing everything
22732 You can change it by going to the tabs
22741 \begin_layout Standard
22742 The next thing is the visible presence of the newline character in the screen.
22743 You can choose the color of this particular character and make it blend
22745 I recommend you choosing a color that is close to the background but not
22746 equal, that way you still can see it is there, but it is not bothering
22751 \begin_layout Chapter
22752 Secrets of the LaTeX Masters
22753 \begin_inset CommandInset label
22762 \begin_layout Standard
22763 Though LyX is a powerful tool, it cannot hope to support everything that
22764 can be done with pure TeX/LaTeX.
22765 However, many familiar dirty TeX and LaTeX tricks can be done within LyX,
22766 as long as you are not afraid to use that
22767 \begin_inset Quotes eld
22771 \begin_inset Quotes erd
22774 button on the toolbar or add things to the LaTeX preamble.
22775 This section lists some tips, tricks, and otherwise cool ideas to give
22776 your document that extra little flair.
22779 Do try this at home
22781 , just start with something a little smaller and less important than your
22785 \begin_layout Standard
22786 Most ideas in this section require less common files in your LaTeX installation.
22787 If you have a system like TeXLive, most will already be available.
22788 A few, however, will need to be downloaded from one of the CTAN archives.
22789 Often, there are several ways to do something, or several LaTeX style files
22790 which do the same thing.
22791 We do not endorse one choice over another, we simply claim that we have
22792 done a particular task with a particular file.
22793 Put on your wizard hat, keep an eye out for dragons, and let us begin.
22796 \begin_layout Section
22800 \begin_layout Standard
22803 Lars Gullik Bjønnes
22806 \begin_layout Subsection
22810 \begin_layout Standard
22811 The aim for this chapter
22815 \begin_layout Plain Layout
22816 Editor's note: Lars' original chapter was a masterful description of how
22822 However, it was too long to flow smoothly in this document.
22823 I have therefore chosen to excerpt the most important sections here (sorry,
22824 Lars); you can read the original chapter (and more of the story!) in the
22827 examples/multicol.lyx
22835 is to show how the LaTeX package
22839 can be used in a LyX document.
22840 As LyX doesn't support the
22844 package natively yet, we have to use some small hacks.
22845 By reading this section it should be obvious how to do this.
22848 \begin_layout Subsection
22852 \begin_layout Standard
22857 package allows switching between one and multicolumn format on the same
22859 Footnotes are handled correctly (for the most part), but will be placed
22860 at the bottom of the page and not under each column.
22861 LaTeX's float mechanism, however, is partly disabled in the current implementat
22863 At the moment only page-wide floats can be used within the scope of the
22867 \begin_layout Subsection
22871 \begin_layout Subsubsection
22875 \begin_layout Standard
22876 If you want to have two columns in your text, you have use LaTeX mode to
22881 begin{multicols}{2}
22883 at the point where you want the two column layout to start, and then
22889 where you want it to end.
22893 \begin_layout Standard
22897 \begin_layout Plain Layout
22901 begin{multicols}{2}
22909 \begin_layout Standard
22914 The Adventure of the Empty House
22917 \begin_inset Newline newline
22922 Sir Arthur Conan Doyle
22925 \begin_layout Standard
22928 It was in the spring of the year 1894 that all London was interested, and
22929 the fashionable world dismayed, by the murder of the Honourable Ronald
22930 Adair under most unusual and inexplicable circumstances.
22931 The public has already learned those particulars of the crime which came
22932 out in the police investigation, but a good deal was suppressed upon that
22933 occasion, since the case for the prosecution was so overwhelmingly strong
22934 that it was not necessary to bring forward all the facts.
22935 Only now, at the end of nearly ten years, am I allowed to supply those
22936 missing links which make up the whole of that remarkable chain.
22937 The crime was of interest in itself, but that interest was as nothing to
22938 me compared to the inconceivable sequel, which afforded me the greatest
22939 shock and surprise of any event in my adventurous life.
22940 Even now, after this long interval, I find myself thrilling as I think
22941 of it, and feeling once more that sudden flood of joy, amazement, and increduli
22942 ty which utterly submerged my mind.
22943 Let me say to that public, which has shown some interest in those glimpses
22944 which I have occasionally given them of the thoughts and actions of a very
22945 remarkable man, that they are not to blame me if I have not shared my knowledge
22946 with them, for I should have considered it my first duty to do so, had
22947 I not been barred by a positive prohibition from his own lips, which was
22948 only withdrawn upon the third of last month.
22951 \begin_layout Standard
22955 \begin_layout Plain Layout
22967 \begin_layout Subsubsection
22971 \begin_layout Standard
22972 The same pattern is used when you want more than two columns:
22975 \begin_layout Standard
22979 \begin_layout Plain Layout
22983 begin{multicols}{3}
22991 \begin_layout Standard
22994 It can be imagined that my close intimacy with Sherlock Holmes had interested
22995 me deeply in crime, and that after his disappearance I never failed to
22996 read with care the various problems which came before the public.
22997 And I even attempted, more than once, for my own private satisfaction,
22998 to employ his methods in their solution, though with indifferent success.
22999 There was none, however, which appealed to me like this tragedy of Ronald
23001 As I read the evidence at the inquest, which led up to a verdict of willful
23002 murder against some person or persons unknown, I realized more clearly
23003 than I had ever done the loss which the community had sustained by the
23004 death of Sherlock Holmes.
23005 There were points about this strange business which would, I was sure,
23006 have specially appealed to him, and the efforts of the police would have
23007 been supplemented, or more probably anticipated, by the trained observation
23008 and the alert mind of the first criminal agent in Europe.
23009 All day, as I drove upon my round, I turned over the case in my mind and
23010 found no explanation which appeared to me to be adequate.
23011 At the risk of telling a twice-told tale, I will recapitulate the facts
23012 as they were known to the public at the conclusion of the inquest.
23015 \begin_layout Standard
23019 \begin_layout Plain Layout
23031 \begin_layout Standard
23032 You can have more than 3 columns if you want to, but that might not be very
23033 pleasant for the eye.
23036 \begin_layout Subsubsection
23037 Columns inside columns
23040 \begin_layout Standard
23041 You can even have columns inside columns:
23044 \begin_layout Standard
23048 \begin_layout Plain Layout
23052 begin{multicols}{2}
23060 \begin_layout Standard
23063 The Honourable Ronald Adair was the second son of the Earl of Maynooth,
23064 at that time governor of one of the Australian colonies.
23065 Adair's mother had returned from Australia to undergo the operation for
23066 cataract, and she, her son Ronald, and her daughter Hilda were living together
23070 \begin_layout Standard
23074 \begin_layout Plain Layout
23078 begin{multicols}{2}
23086 \begin_layout Standard
23089 The youth moved in the best society–had, so far as was known, no enemies
23090 and no particular vices.
23091 He had been engaged to Miss Edith Woodley, of Carstairs, but the engagement
23092 had been broken off by mutual consent some months before, and there was
23093 no sign that it had left any very profound feeling behind it.
23094 For the rest {sic} the man's life moved in a narrow and conventional circle,
23095 for his habits were quiet and his nature unemotional.
23096 Yet it was upon this easy-going young aristocrat that death came, in most
23097 strange and unexpected form, between the hours of ten and eleven-twenty
23098 on the night of March 30, 1894.
23101 \begin_layout Standard
23105 \begin_layout Plain Layout
23117 \begin_layout Standard
23120 Ronald Adair was fond of cards–playing continually, but never for such stakes
23122 He was a member of the Baldwin, the Cavendish, and the Bagatelle card clubs.
23123 It was shown that, after dinner on the day of his death, he had played
23124 a rubber of whist at the latter club.
23125 He had also played there in the afternoon.
23130 The evidence of those who had played with him– Mr.
23131 Murray, Sir John Hardy, and Colonel Moran–showed that the game was whist,
23132 and that there was a fairly equal fall of the cards.
23133 Adair might have lost five pounds, but not more.
23134 His fortune was a considerable one, and such a loss could not in any way
23136 He had played nearly every day at one club or other, but he was a cautious
23137 player, and usually rose a winner.
23138 It came out in evidence that, in partnership with Colonel Moran, he had
23139 actually won as much as four hundred and twenty pounds in a sitting, some
23140 weeks before, from Godfrey Milner and Lord Balmoral.
23141 So much for his recent history as it came out at the inquest.
23144 \begin_layout Standard
23148 \begin_layout Plain Layout
23160 \begin_layout Standard
23161 Please do read the file
23163 examples/multicol.lyx
23165 for more advanced examples including column and header spacing, vertical
23166 separator lines, and more.
23169 \begin_layout Section
23174 Paragraph Environment
23175 \begin_inset Argument
23178 \begin_layout Plain Layout
23179 Numbering in Enumerate
23187 \begin_layout Standard
23193 \begin_layout Standard
23194 \begin_inset VSpace bigskip
23200 \begin_layout Standard
23202 The default numbering for the
23206 paragraph environment begins with Arabic numbers and ends with uppercase
23208 Suppose, however, you wanted a different type of numbering scheme.
23209 Here's a quickie example of how to change the numbering scheme:
23212 \begin_layout LyX-Code
23222 \begin_layout LyX-Code
23232 \begin_layout LyX-Code
23242 \begin_layout LyX-Code
23252 \begin_layout Standard
23253 \SpecialChar \ldots{}
23254 which changes the numbering scheme to uppercase Roman numerals, uppercase
23255 letters, Arabic numbers, and lowercase letter.
23258 \begin_layout Standard
23259 Additionally, the previous example also adds a little bit extra to the numbering
23261 For example, the first level label actually looks like:
23262 \begin_inset Quotes eld
23266 \begin_inset Quotes erd
23270 For ease of reading, we'll describe what the numbering schemes look like
23271 using a notation something like this: <
23272 \begin_inset Quotes eld
23276 \begin_inset Quotes erd
23280 \begin_inset space ~
23284 \begin_inset Quotes erd
23288 \begin_inset Quotes erd
23292 \begin_inset space ~
23296 \begin_inset Quotes erd
23300 \begin_inset Quotes erd
23304 \begin_inset space ~
23308 \begin_inset Quotes eld
23312 \begin_inset Quotes erd
23319 \begin_layout Standard
23320 As you can see in the example, there is a label command for each nesting
23327 \SpecialChar \ldots{}
23334 , as well as a counter,
23338 \SpecialChar \ldots{}
23344 There are also five
23345 \begin_inset Quotes eld
23349 \begin_inset Quotes erd
23382 , each of which take one counter as an argument.
23383 You can add characters before or after these, but there's no need to add
23387 \begin_layout Standard
23388 You can get really fancy with these.
23392 \begin_layout LyX-Code
23406 \begin_layout LyX-Code
23418 \begin_layout LyX-Code
23428 \begin_layout LyX-Code
23438 \begin_layout Standard
23439 produces the somewhat out of hand numbering scheme: <
23440 \begin_inset Quotes eld
23444 \begin_inset Quotes erd
23448 \begin_inset space ~
23452 \begin_inset Quotes erd
23456 \begin_inset Quotes erd
23460 \begin_inset space ~
23464 \begin_inset Quotes erd
23468 \begin_inset Quotes erd
23472 \begin_inset space ~
23476 \begin_inset Quotes eld
23480 \begin_inset Quotes erd
23487 \begin_layout Section
23491 \begin_layout Standard
23497 \begin_layout Standard
23498 \begin_inset VSpace bigskip
23504 \begin_layout Standard
23509 \begin_layout Plain Layout
23515 tmpfont}{cmr17 scaled 2500}{
23527 \begin_layout Standard
23532 \begin_layout Plain Layout
23543 hose of you who like the style of old books probably also like
23544 \begin_inset Quotes eld
23548 \begin_inset Quotes erd
23551 —those large capital letters which begin each new chapter or section.
23552 Implementing them with plain LyX/LaTeX is straightforward (assuming you
23553 know some plain TeX!) but does require a lot of work and many iterations,
23554 as you can see by all the ugly TeX-mode stuff at the beginning of this
23558 \begin_layout Standard
23562 \begin_layout Plain Layout
23568 bigdrop{-1em}{3}{ptmri}{T}+
23573 here is a much easier way of doing this, of course.
23582 ) package from CTAN allows a simple way to add such letters to your documents.
23583 Since this package is not a standard part of TeXLive, I can't demonstrate
23584 it within this document, but if you copy this paragraph to a new document,
23586 \begin_inset Quotes eld
23596 \begin_inset Quotes erd
23599 and the pluses from the TeX code at the beginning of the paragraph, and
23604 usepackage{dropcaps}
23606 to your LaTeX preamble, you will get a nice Times Roman Italic
23607 \begin_inset Quotes eld
23611 \begin_inset Quotes erd
23614 , whose height is three lines of text and which protrudes 1 em into the
23616 (Make certain you have copied
23617 \begin_inset Quotes eld
23625 \begin_inset Quotes erd
23628 into a directory where TeX can see it.) The first argument is the amount
23629 of indentation; in this case the negative sign moves it into the margin.
23630 The second argument is the height of the letter in number of lines of text.
23631 The third argument is the font name: virtually anything which has a tfm
23632 file should work (wade through the
23634 .../texmf/fonts/tfm
23636 directory for possibilities).
23637 My personal favorite is
23638 \begin_inset Quotes eld
23646 \begin_inset Quotes erd
23649 , a fancy German font specifically designed for dropped capitals.
23650 The fourth argument is the letter (or letters) to be dropped.
23655 package also offers the
23661 command, as well as a slightly simplified
23670 \begin_layout Section
23671 Non-standard Paragraph Shapes
23674 \begin_layout Standard
23680 \begin_layout Standard
23681 \begin_inset VSpace bigskip
23687 \begin_layout Standard
23691 \begin_layout Plain Layout
23703 \begin_layout Standard
23707 \begin_layout Plain Layout
23716 \begin_layout Plain Layout
23730 \begin_layout Standard
23735 \begin_layout Plain Layout
23746 \begin_layout Plain Layout
23755 \begin_layout Plain Layout
23764 \begin_layout Plain Layout
23773 \begin_layout Plain Layout
23782 \begin_layout Plain Layout
23791 \begin_layout Plain Layout
23800 \begin_layout Plain Layout
23809 \begin_layout Plain Layout
23818 \begin_layout Plain Layout
23827 \begin_layout Plain Layout
23836 \begin_layout Plain Layout
23845 \begin_layout Plain Layout
23854 \begin_layout Plain Layout
23863 \begin_layout Plain Layout
23872 \begin_layout Plain Layout
23881 \begin_layout Plain Layout
23890 \begin_layout Plain Layout
23899 \begin_layout Plain Layout
23908 \begin_layout Plain Layout
23914 There are times when the tyranny of rectangular paragraphs must be overthrown.
23915 In such situations, a call to the delightful plain TeX command
23922 As you can see, completely arbitrary shapes can be laid out with a suitable
23923 set of linelength definitions.
23924 While this parshape may look a bit silly and useless, one could conceive
23925 of situations such as finely tuned dropped capitals, word wrapping around
23926 non-rectangular graphics, etc.
23927 which will benefit from such handcrafting.
23930 \begin_layout Standard
23931 \begin_inset VSpace bigskip
23937 \begin_layout Standard
23942 parshape numlines #1indent #1length #2indent #2length \SpecialChar \ldots{}
23949 is the number of lines of text which define the paragraph.
23950 If there turn out to be fewer lines, the shape is truncated; if there are
23951 more, the excess lines have the same dimensions as the last line of the
23961 entries specify the indentation of the line from the left margin, and the
23962 length of the line as measured from that point.
23963 The shape applies only to the current paragraph; everything is reset to
23964 normal for the next paragraph.
23967 \begin_layout Standard
23971 \begin_layout Plain Layout
23983 \begin_layout Section
23987 \begin_layout Standard
23988 As you can see, the examples in this section range from the useful to the
23990 While I don't expect that anyone will ever need the paragraph shape demonstrate
23991 d in the last section, the important point is that you can do almost anything
23992 you want in LyX if you are willing to figure out how to do it in TeX and
23994 TeX is a fantastically powerful typesetting system and all that power is
23995 available to you since LyX uses it as its backend.